@quenty/studio-bridge 0.7.0 → 0.8.0
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/CHANGELOG.md +15 -39
- package/README.md +166 -115
- package/dist/src/bridge/bridge-connection-remote.test.d.ts +7 -0
- package/dist/src/bridge/bridge-connection-remote.test.d.ts.map +1 -0
- package/dist/src/bridge/bridge-connection-remote.test.js +144 -0
- package/dist/src/bridge/bridge-connection-remote.test.js.map +1 -0
- package/dist/src/bridge/bridge-connection.d.ts +112 -0
- package/dist/src/bridge/bridge-connection.d.ts.map +1 -0
- package/dist/src/bridge/bridge-connection.js +528 -0
- package/dist/src/bridge/bridge-connection.js.map +1 -0
- package/dist/src/bridge/bridge-connection.test.d.ts +6 -0
- package/dist/src/bridge/bridge-connection.test.d.ts.map +1 -0
- package/dist/src/bridge/bridge-connection.test.js +773 -0
- package/dist/src/bridge/bridge-connection.test.js.map +1 -0
- package/dist/src/bridge/bridge-session.d.ts +38 -0
- package/dist/src/bridge/bridge-session.d.ts.map +1 -0
- package/dist/src/bridge/bridge-session.js +259 -0
- package/dist/src/bridge/bridge-session.js.map +1 -0
- package/dist/src/bridge/bridge-session.test.d.ts +6 -0
- package/dist/src/bridge/bridge-session.test.d.ts.map +1 -0
- package/dist/src/bridge/bridge-session.test.js +264 -0
- package/dist/src/bridge/bridge-session.test.js.map +1 -0
- package/dist/src/bridge/index.d.ts +13 -0
- package/dist/src/bridge/index.d.ts.map +1 -0
- package/dist/src/bridge/index.js +13 -0
- package/dist/src/bridge/index.js.map +1 -0
- package/dist/src/bridge/internal/__tests__/failover-crash.test.d.ts +9 -0
- package/dist/src/bridge/internal/__tests__/failover-crash.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/__tests__/failover-crash.test.js +159 -0
- package/dist/src/bridge/internal/__tests__/failover-crash.test.js.map +1 -0
- package/dist/src/bridge/internal/__tests__/failover-graceful.test.d.ts +9 -0
- package/dist/src/bridge/internal/__tests__/failover-graceful.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/__tests__/failover-graceful.test.js +218 -0
- package/dist/src/bridge/internal/__tests__/failover-graceful.test.js.map +1 -0
- package/dist/src/bridge/internal/__tests__/failover-inflight.test.d.ts +9 -0
- package/dist/src/bridge/internal/__tests__/failover-inflight.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/__tests__/failover-inflight.test.js +246 -0
- package/dist/src/bridge/internal/__tests__/failover-inflight.test.js.map +1 -0
- package/dist/src/bridge/internal/__tests__/host-client-integration.test.d.ts +10 -0
- package/dist/src/bridge/internal/__tests__/host-client-integration.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/__tests__/host-client-integration.test.js +298 -0
- package/dist/src/bridge/internal/__tests__/host-client-integration.test.js.map +1 -0
- package/dist/src/bridge/internal/bridge-client.d.ts +70 -0
- package/dist/src/bridge/internal/bridge-client.d.ts.map +1 -0
- package/dist/src/bridge/internal/bridge-client.js +344 -0
- package/dist/src/bridge/internal/bridge-client.js.map +1 -0
- package/dist/src/bridge/internal/bridge-client.test.d.ts +7 -0
- package/dist/src/bridge/internal/bridge-client.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/bridge-client.test.js +301 -0
- package/dist/src/bridge/internal/bridge-client.test.js.map +1 -0
- package/dist/src/bridge/internal/bridge-host.d.ts +78 -0
- package/dist/src/bridge/internal/bridge-host.d.ts.map +1 -0
- package/dist/src/bridge/internal/bridge-host.js +383 -0
- package/dist/src/bridge/internal/bridge-host.js.map +1 -0
- package/dist/src/bridge/internal/bridge-host.test.d.ts +7 -0
- package/dist/src/bridge/internal/bridge-host.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/bridge-host.test.js +377 -0
- package/dist/src/bridge/internal/bridge-host.test.js.map +1 -0
- package/dist/src/bridge/internal/environment-detection.d.ts +44 -0
- package/dist/src/bridge/internal/environment-detection.d.ts.map +1 -0
- package/dist/src/bridge/internal/environment-detection.js +91 -0
- package/dist/src/bridge/internal/environment-detection.js.map +1 -0
- package/dist/src/bridge/internal/environment-detection.test.d.ts +7 -0
- package/dist/src/bridge/internal/environment-detection.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/environment-detection.test.js +150 -0
- package/dist/src/bridge/internal/environment-detection.test.js.map +1 -0
- package/dist/src/bridge/internal/hand-off.d.ts +69 -0
- package/dist/src/bridge/internal/hand-off.d.ts.map +1 -0
- package/dist/src/bridge/internal/hand-off.js +178 -0
- package/dist/src/bridge/internal/hand-off.js.map +1 -0
- package/dist/src/bridge/internal/hand-off.test.d.ts +7 -0
- package/dist/src/bridge/internal/hand-off.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/hand-off.test.js +325 -0
- package/dist/src/bridge/internal/hand-off.test.js.map +1 -0
- package/dist/src/bridge/internal/health-endpoint.d.ts +32 -0
- package/dist/src/bridge/internal/health-endpoint.d.ts.map +1 -0
- package/dist/src/bridge/internal/health-endpoint.js +73 -0
- package/dist/src/bridge/internal/health-endpoint.js.map +1 -0
- package/dist/src/bridge/internal/health-endpoint.test.d.ts +6 -0
- package/dist/src/bridge/internal/health-endpoint.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/health-endpoint.test.js +122 -0
- package/dist/src/bridge/internal/health-endpoint.test.js.map +1 -0
- package/dist/src/bridge/internal/host-protocol.d.ts +60 -0
- package/dist/src/bridge/internal/host-protocol.d.ts.map +1 -0
- package/dist/src/bridge/internal/host-protocol.js +184 -0
- package/dist/src/bridge/internal/host-protocol.js.map +1 -0
- package/dist/src/bridge/internal/host-protocol.test.d.ts +6 -0
- package/dist/src/bridge/internal/host-protocol.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/host-protocol.test.js +307 -0
- package/dist/src/bridge/internal/host-protocol.test.js.map +1 -0
- package/dist/src/bridge/internal/session-tracker.d.ts +67 -0
- package/dist/src/bridge/internal/session-tracker.d.ts.map +1 -0
- package/dist/src/bridge/internal/session-tracker.js +138 -0
- package/dist/src/bridge/internal/session-tracker.js.map +1 -0
- package/dist/src/bridge/internal/session-tracker.test.d.ts +6 -0
- package/dist/src/bridge/internal/session-tracker.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/session-tracker.test.js +342 -0
- package/dist/src/bridge/internal/session-tracker.test.js.map +1 -0
- package/dist/src/bridge/internal/transport-client.d.ts +43 -0
- package/dist/src/bridge/internal/transport-client.d.ts.map +1 -0
- package/dist/src/bridge/internal/transport-client.js +146 -0
- package/dist/src/bridge/internal/transport-client.js.map +1 -0
- package/dist/src/bridge/internal/transport-client.test.d.ts +6 -0
- package/dist/src/bridge/internal/transport-client.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/transport-client.test.js +176 -0
- package/dist/src/bridge/internal/transport-client.test.js.map +1 -0
- package/dist/src/bridge/internal/transport-server.d.ts +59 -0
- package/dist/src/bridge/internal/transport-server.d.ts.map +1 -0
- package/dist/src/bridge/internal/transport-server.js +189 -0
- package/dist/src/bridge/internal/transport-server.js.map +1 -0
- package/dist/src/bridge/internal/transport-server.test.d.ts +6 -0
- package/dist/src/bridge/internal/transport-server.test.d.ts.map +1 -0
- package/dist/src/bridge/internal/transport-server.test.js +171 -0
- package/dist/src/bridge/internal/transport-server.test.js.map +1 -0
- package/dist/src/bridge/types.d.ts +117 -0
- package/dist/src/bridge/types.d.ts.map +1 -0
- package/dist/src/bridge/types.js +68 -0
- package/dist/src/bridge/types.js.map +1 -0
- package/dist/src/cli/adapters/cli-command-adapter-handler.test.d.ts +6 -0
- package/dist/src/cli/adapters/cli-command-adapter-handler.test.d.ts.map +1 -0
- package/dist/src/cli/adapters/cli-command-adapter-handler.test.js +260 -0
- package/dist/src/cli/adapters/cli-command-adapter-handler.test.js.map +1 -0
- package/dist/src/cli/adapters/cli-command-adapter.d.ts +39 -0
- package/dist/src/cli/adapters/cli-command-adapter.d.ts.map +1 -0
- package/dist/src/cli/adapters/cli-command-adapter.js +241 -0
- package/dist/src/cli/adapters/cli-command-adapter.js.map +1 -0
- package/dist/src/cli/adapters/cli-command-adapter.test.d.ts +5 -0
- package/dist/src/cli/adapters/cli-command-adapter.test.d.ts.map +1 -0
- package/dist/src/cli/adapters/cli-command-adapter.test.js +188 -0
- package/dist/src/cli/adapters/cli-command-adapter.test.js.map +1 -0
- package/dist/src/cli/adapters/group-builder.d.ts +29 -0
- package/dist/src/cli/adapters/group-builder.d.ts.map +1 -0
- package/dist/src/cli/adapters/group-builder.js +54 -0
- package/dist/src/cli/adapters/group-builder.js.map +1 -0
- package/dist/src/cli/adapters/group-builder.test.d.ts +5 -0
- package/dist/src/cli/adapters/group-builder.test.d.ts.map +1 -0
- package/dist/src/cli/adapters/group-builder.test.js +108 -0
- package/dist/src/cli/adapters/group-builder.test.js.map +1 -0
- package/dist/src/cli/adapters/help-formatter.d.ts +11 -0
- package/dist/src/cli/adapters/help-formatter.d.ts.map +1 -0
- package/dist/src/cli/adapters/help-formatter.js +78 -0
- package/dist/src/cli/adapters/help-formatter.js.map +1 -0
- package/dist/src/cli/adapters/help-formatter.test.d.ts +5 -0
- package/dist/src/cli/adapters/help-formatter.test.d.ts.map +1 -0
- package/dist/src/cli/adapters/help-formatter.test.js +79 -0
- package/dist/src/cli/adapters/help-formatter.test.js.map +1 -0
- package/dist/src/cli/adapters/target-resolver.d.ts +54 -0
- package/dist/src/cli/adapters/target-resolver.d.ts.map +1 -0
- package/dist/src/cli/adapters/target-resolver.js +90 -0
- package/dist/src/cli/adapters/target-resolver.js.map +1 -0
- package/dist/src/cli/adapters/target-resolver.test.d.ts +5 -0
- package/dist/src/cli/adapters/target-resolver.test.d.ts.map +1 -0
- package/dist/src/cli/adapters/target-resolver.test.js +169 -0
- package/dist/src/cli/adapters/target-resolver.test.js.map +1 -0
- package/dist/src/cli/args/global-args.d.ts +2 -0
- package/dist/src/cli/args/global-args.d.ts.map +1 -1
- package/dist/src/cli/cli.d.ts +6 -3
- package/dist/src/cli/cli.d.ts.map +1 -1
- package/dist/src/cli/cli.js +82 -20
- package/dist/src/cli/cli.js.map +1 -1
- package/dist/src/cli/resolve-script-content.d.ts +19 -0
- package/dist/src/cli/resolve-script-content.d.ts.map +1 -0
- package/dist/src/cli/resolve-script-content.js +22 -0
- package/dist/src/cli/resolve-script-content.js.map +1 -0
- package/dist/src/cli/resolve-session.d.ts +21 -0
- package/dist/src/cli/resolve-session.d.ts.map +1 -0
- package/dist/src/cli/resolve-session.js +40 -0
- package/dist/src/cli/resolve-session.js.map +1 -0
- package/dist/src/cli/resolve-session.test.d.ts +5 -0
- package/dist/src/cli/resolve-session.test.d.ts.map +1 -0
- package/dist/src/cli/resolve-session.test.js +112 -0
- package/dist/src/cli/resolve-session.test.js.map +1 -0
- package/dist/src/cli/script-executor.d.ts +1 -0
- package/dist/src/cli/script-executor.d.ts.map +1 -1
- package/dist/src/cli/script-executor.js +7 -1
- package/dist/src/cli/script-executor.js.map +1 -1
- package/dist/src/cli/types.d.ts +11 -0
- package/dist/src/cli/types.d.ts.map +1 -0
- package/dist/src/cli/types.js +5 -0
- package/dist/src/cli/types.js.map +1 -0
- package/dist/src/commands/connect.d.ts +16 -0
- package/dist/src/commands/connect.d.ts.map +1 -0
- package/dist/src/commands/connect.js +15 -0
- package/dist/src/commands/connect.js.map +1 -0
- package/dist/src/commands/connect.test.d.ts +5 -0
- package/dist/src/commands/connect.test.d.ts.map +1 -0
- package/dist/src/commands/connect.test.js +46 -0
- package/dist/src/commands/connect.test.js.map +1 -0
- package/dist/src/commands/console/exec/exec.d.ts +43 -0
- package/dist/src/commands/console/exec/exec.d.ts.map +1 -0
- package/dist/src/commands/console/exec/exec.js +79 -0
- package/dist/src/commands/console/exec/exec.js.map +1 -0
- package/dist/src/commands/console/exec/exec.test.d.ts +5 -0
- package/dist/src/commands/console/exec/exec.test.d.ts.map +1 -0
- package/dist/src/commands/console/exec/exec.test.js +191 -0
- package/dist/src/commands/console/exec/exec.test.js.map +1 -0
- package/dist/src/commands/console/logs/logs.d.ts +23 -0
- package/dist/src/commands/console/logs/logs.d.ts.map +1 -0
- package/dist/src/commands/console/logs/logs.js +80 -0
- package/dist/src/commands/console/logs/logs.js.map +1 -0
- package/dist/src/commands/console/logs/logs.test.d.ts +5 -0
- package/dist/src/commands/console/logs/logs.test.d.ts.map +1 -0
- package/dist/src/commands/console/logs/logs.test.js +111 -0
- package/dist/src/commands/console/logs/logs.test.js.map +1 -0
- package/dist/src/commands/disconnect.d.ts +9 -0
- package/dist/src/commands/disconnect.d.ts.map +1 -0
- package/dist/src/commands/disconnect.js +8 -0
- package/dist/src/commands/disconnect.js.map +1 -0
- package/dist/src/commands/disconnect.test.d.ts +5 -0
- package/dist/src/commands/disconnect.test.d.ts.map +1 -0
- package/dist/src/commands/disconnect.test.js +17 -0
- package/dist/src/commands/disconnect.test.js.map +1 -0
- package/dist/src/commands/explorer/query/query.d.ts +31 -0
- package/dist/src/commands/explorer/query/query.d.ts.map +1 -0
- package/dist/src/commands/explorer/query/query.js +106 -0
- package/dist/src/commands/explorer/query/query.js.map +1 -0
- package/dist/src/commands/explorer/query/query.test.d.ts +5 -0
- package/dist/src/commands/explorer/query/query.test.d.ts.map +1 -0
- package/dist/src/commands/explorer/query/query.test.js +228 -0
- package/dist/src/commands/explorer/query/query.test.js.map +1 -0
- package/dist/src/commands/formatters.test.d.ts +6 -0
- package/dist/src/commands/formatters.test.d.ts.map +1 -0
- package/dist/src/commands/formatters.test.js +211 -0
- package/dist/src/commands/formatters.test.js.map +1 -0
- package/dist/src/commands/framework/action-loader.d.ts +25 -0
- package/dist/src/commands/framework/action-loader.d.ts.map +1 -0
- package/dist/src/commands/framework/action-loader.js +46 -0
- package/dist/src/commands/framework/action-loader.js.map +1 -0
- package/dist/src/commands/framework/action-loader.test.d.ts +5 -0
- package/dist/src/commands/framework/action-loader.test.d.ts.map +1 -0
- package/dist/src/commands/framework/action-loader.test.js +89 -0
- package/dist/src/commands/framework/action-loader.test.js.map +1 -0
- package/dist/src/commands/framework/arg-builder.d.ts +92 -0
- package/dist/src/commands/framework/arg-builder.d.ts.map +1 -0
- package/dist/src/commands/framework/arg-builder.js +137 -0
- package/dist/src/commands/framework/arg-builder.js.map +1 -0
- package/dist/src/commands/framework/arg-builder.test.d.ts +5 -0
- package/dist/src/commands/framework/arg-builder.test.d.ts.map +1 -0
- package/dist/src/commands/framework/arg-builder.test.js +246 -0
- package/dist/src/commands/framework/arg-builder.test.js.map +1 -0
- package/dist/src/commands/framework/command-registry.d.ts +23 -0
- package/dist/src/commands/framework/command-registry.d.ts.map +1 -0
- package/dist/src/commands/framework/command-registry.js +42 -0
- package/dist/src/commands/framework/command-registry.js.map +1 -0
- package/dist/src/commands/framework/command-registry.test.d.ts +5 -0
- package/dist/src/commands/framework/command-registry.test.d.ts.map +1 -0
- package/dist/src/commands/framework/command-registry.test.js +158 -0
- package/dist/src/commands/framework/command-registry.test.js.map +1 -0
- package/dist/src/commands/framework/define-command.d.ts +76 -0
- package/dist/src/commands/framework/define-command.d.ts.map +1 -0
- package/dist/src/commands/framework/define-command.js +28 -0
- package/dist/src/commands/framework/define-command.js.map +1 -0
- package/dist/src/commands/framework/define-command.test.d.ts +5 -0
- package/dist/src/commands/framework/define-command.test.d.ts.map +1 -0
- package/dist/src/commands/framework/define-command.test.js +135 -0
- package/dist/src/commands/framework/define-command.test.js.map +1 -0
- package/dist/src/commands/framework/index.d.ts +8 -0
- package/dist/src/commands/framework/index.d.ts.map +1 -0
- package/dist/src/commands/framework/index.js +8 -0
- package/dist/src/commands/framework/index.js.map +1 -0
- package/dist/src/commands/index.d.ts +20 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +20 -0
- package/dist/src/commands/index.js.map +1 -0
- package/dist/src/commands/linux/inject-credentials/inject-credentials.d.ts +15 -0
- package/dist/src/commands/linux/inject-credentials/inject-credentials.d.ts.map +1 -0
- package/dist/src/commands/linux/inject-credentials/inject-credentials.js +88 -0
- package/dist/src/commands/linux/inject-credentials/inject-credentials.js.map +1 -0
- package/dist/src/commands/linux/setup/setup.d.ts +19 -0
- package/dist/src/commands/linux/setup/setup.d.ts.map +1 -0
- package/dist/src/commands/linux/setup/setup.js +107 -0
- package/dist/src/commands/linux/setup/setup.js.map +1 -0
- package/dist/src/commands/linux/status/status.d.ts +34 -0
- package/dist/src/commands/linux/status/status.d.ts.map +1 -0
- package/dist/src/commands/linux/status/status.js +134 -0
- package/dist/src/commands/linux/status/status.js.map +1 -0
- package/dist/src/commands/plugin/install/install.d.ts +10 -0
- package/dist/src/commands/plugin/install/install.d.ts.map +1 -0
- package/dist/src/commands/plugin/install/install.js +23 -0
- package/dist/src/commands/plugin/install/install.js.map +1 -0
- package/dist/src/commands/plugin/uninstall/uninstall.d.ts +9 -0
- package/dist/src/commands/plugin/uninstall/uninstall.d.ts.map +1 -0
- package/dist/src/commands/plugin/uninstall/uninstall.js +41 -0
- package/dist/src/commands/plugin/uninstall/uninstall.js.map +1 -0
- package/dist/src/commands/process/close/close.d.ts +22 -0
- package/dist/src/commands/process/close/close.d.ts.map +1 -0
- package/dist/src/commands/process/close/close.js +34 -0
- package/dist/src/commands/process/close/close.js.map +1 -0
- package/dist/src/commands/process/format-state.d.ts +7 -0
- package/dist/src/commands/process/format-state.d.ts.map +1 -0
- package/dist/src/commands/process/format-state.js +19 -0
- package/dist/src/commands/process/format-state.js.map +1 -0
- package/dist/src/commands/process/info/info.d.ts +17 -0
- package/dist/src/commands/process/info/info.d.ts.map +1 -0
- package/dist/src/commands/process/info/info.js +38 -0
- package/dist/src/commands/process/info/info.js.map +1 -0
- package/dist/src/commands/process/info/info.test.d.ts +5 -0
- package/dist/src/commands/process/info/info.test.d.ts.map +1 -0
- package/dist/src/commands/process/info/info.test.js +58 -0
- package/dist/src/commands/process/info/info.test.js.map +1 -0
- package/dist/src/commands/process/launch/launch.d.ts +17 -0
- package/dist/src/commands/process/launch/launch.d.ts.map +1 -0
- package/dist/src/commands/process/launch/launch.js +26 -0
- package/dist/src/commands/process/launch/launch.js.map +1 -0
- package/dist/src/commands/process/launch/launch.test.d.ts +5 -0
- package/dist/src/commands/process/launch/launch.test.d.ts.map +1 -0
- package/dist/src/commands/process/launch/launch.test.js +49 -0
- package/dist/src/commands/process/launch/launch.test.js.map +1 -0
- package/dist/src/commands/process/list/list.d.ts +16 -0
- package/dist/src/commands/process/list/list.d.ts.map +1 -0
- package/dist/src/commands/process/list/list.js +56 -0
- package/dist/src/commands/process/list/list.js.map +1 -0
- package/dist/src/commands/process/list/list.test.d.ts +5 -0
- package/dist/src/commands/process/list/list.test.d.ts.map +1 -0
- package/dist/src/commands/process/list/list.test.js +71 -0
- package/dist/src/commands/process/list/list.test.js.map +1 -0
- package/dist/src/commands/process/run/run.d.ts +31 -0
- package/dist/src/commands/process/run/run.d.ts.map +1 -0
- package/dist/src/commands/process/run/run.js +63 -0
- package/dist/src/commands/process/run/run.js.map +1 -0
- package/dist/src/commands/rgba-to-png.d.ts +17 -0
- package/dist/src/commands/rgba-to-png.d.ts.map +1 -0
- package/dist/src/commands/rgba-to-png.js +85 -0
- package/dist/src/commands/rgba-to-png.js.map +1 -0
- package/dist/src/commands/serve/serve.d.ts +17 -0
- package/dist/src/commands/serve/serve.d.ts.map +1 -0
- package/dist/src/commands/serve/serve.js +128 -0
- package/dist/src/commands/serve/serve.js.map +1 -0
- package/dist/src/commands/serve/serve.test.d.ts +5 -0
- package/dist/src/commands/serve/serve.test.d.ts.map +1 -0
- package/dist/src/commands/serve/serve.test.js +100 -0
- package/dist/src/commands/serve/serve.test.js.map +1 -0
- package/dist/src/commands/viewport/screenshot/screenshot.d.ts +17 -0
- package/dist/src/commands/viewport/screenshot/screenshot.d.ts.map +1 -0
- package/dist/src/commands/viewport/screenshot/screenshot.js +45 -0
- package/dist/src/commands/viewport/screenshot/screenshot.js.map +1 -0
- package/dist/src/commands/viewport/screenshot/screenshot.test.d.ts +5 -0
- package/dist/src/commands/viewport/screenshot/screenshot.test.d.ts.map +1 -0
- package/dist/src/commands/viewport/screenshot/screenshot.test.js +143 -0
- package/dist/src/commands/viewport/screenshot/screenshot.test.js.map +1 -0
- package/dist/src/docker/docker-delegator.d.ts +30 -0
- package/dist/src/docker/docker-delegator.d.ts.map +1 -0
- package/dist/src/docker/docker-delegator.js +201 -0
- package/dist/src/docker/docker-delegator.js.map +1 -0
- package/dist/src/docker/docker-delegator.test.d.ts +2 -0
- package/dist/src/docker/docker-delegator.test.d.ts.map +1 -0
- package/dist/src/docker/docker-delegator.test.js +132 -0
- package/dist/src/docker/docker-delegator.test.js.map +1 -0
- package/dist/src/index.d.ts +9 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.test.d.ts +2 -0
- package/dist/src/index.test.d.ts.map +1 -0
- package/dist/src/index.test.js +51 -0
- package/dist/src/index.test.js.map +1 -0
- package/dist/src/linux/index.d.ts +12 -0
- package/dist/src/linux/index.d.ts.map +1 -0
- package/dist/src/linux/index.js +11 -0
- package/dist/src/linux/index.js.map +1 -0
- package/dist/src/linux/linux-config.d.ts +37 -0
- package/dist/src/linux/linux-config.d.ts.map +1 -0
- package/dist/src/linux/linux-config.js +70 -0
- package/dist/src/linux/linux-config.js.map +1 -0
- package/dist/src/linux/linux-config.test.d.ts +2 -0
- package/dist/src/linux/linux-config.test.d.ts.map +1 -0
- package/dist/src/linux/linux-config.test.js +54 -0
- package/dist/src/linux/linux-config.test.js.map +1 -0
- package/dist/src/linux/linux-credential-writer.d.ts +35 -0
- package/dist/src/linux/linux-credential-writer.d.ts.map +1 -0
- package/dist/src/linux/linux-credential-writer.js +300 -0
- package/dist/src/linux/linux-credential-writer.js.map +1 -0
- package/dist/src/linux/linux-display-manager.d.ts +24 -0
- package/dist/src/linux/linux-display-manager.d.ts.map +1 -0
- package/dist/src/linux/linux-display-manager.js +92 -0
- package/dist/src/linux/linux-display-manager.js.map +1 -0
- package/dist/src/linux/linux-env-guard.d.ts +13 -0
- package/dist/src/linux/linux-env-guard.d.ts.map +1 -0
- package/dist/src/linux/linux-env-guard.js +31 -0
- package/dist/src/linux/linux-env-guard.js.map +1 -0
- package/dist/src/linux/linux-env-guard.test.d.ts +2 -0
- package/dist/src/linux/linux-env-guard.test.d.ts.map +1 -0
- package/dist/src/linux/linux-env-guard.test.js +48 -0
- package/dist/src/linux/linux-env-guard.test.js.map +1 -0
- package/dist/src/linux/linux-fflags.d.ts +17 -0
- package/dist/src/linux/linux-fflags.d.ts.map +1 -0
- package/dist/src/linux/linux-fflags.js +33 -0
- package/dist/src/linux/linux-fflags.js.map +1 -0
- package/dist/src/linux/linux-fflags.test.d.ts +2 -0
- package/dist/src/linux/linux-fflags.test.d.ts.map +1 -0
- package/dist/src/linux/linux-fflags.test.js +55 -0
- package/dist/src/linux/linux-fflags.test.js.map +1 -0
- package/dist/src/linux/linux-prerequisites.d.ts +24 -0
- package/dist/src/linux/linux-prerequisites.d.ts.map +1 -0
- package/dist/src/linux/linux-prerequisites.js +118 -0
- package/dist/src/linux/linux-prerequisites.js.map +1 -0
- package/dist/src/linux/linux-shader-patcher.d.ts +17 -0
- package/dist/src/linux/linux-shader-patcher.d.ts.map +1 -0
- package/dist/src/linux/linux-shader-patcher.js +48 -0
- package/dist/src/linux/linux-shader-patcher.js.map +1 -0
- package/dist/src/linux/linux-shader-patcher.test.d.ts +2 -0
- package/dist/src/linux/linux-shader-patcher.test.d.ts.map +1 -0
- package/dist/src/linux/linux-shader-patcher.test.js +55 -0
- package/dist/src/linux/linux-shader-patcher.test.js.map +1 -0
- package/dist/src/linux/linux-studio-installer.d.ts +10 -0
- package/dist/src/linux/linux-studio-installer.d.ts.map +1 -0
- package/dist/src/linux/linux-studio-installer.js +79 -0
- package/dist/src/linux/linux-studio-installer.js.map +1 -0
- package/dist/src/linux/linux-studio-launcher.d.ts +10 -0
- package/dist/src/linux/linux-studio-launcher.d.ts.map +1 -0
- package/dist/src/linux/linux-studio-launcher.js +73 -0
- package/dist/src/linux/linux-studio-launcher.js.map +1 -0
- package/dist/src/linux/linux-version-resolver.d.ts +18 -0
- package/dist/src/linux/linux-version-resolver.d.ts.map +1 -0
- package/dist/src/linux/linux-version-resolver.js +49 -0
- package/dist/src/linux/linux-version-resolver.js.map +1 -0
- package/dist/src/linux/linux-wine-env.d.ts +11 -0
- package/dist/src/linux/linux-wine-env.d.ts.map +1 -0
- package/dist/src/linux/linux-wine-env.js +33 -0
- package/dist/src/linux/linux-wine-env.js.map +1 -0
- package/dist/src/linux/linux-wine-env.test.d.ts +2 -0
- package/dist/src/linux/linux-wine-env.test.d.ts.map +1 -0
- package/dist/src/linux/linux-wine-env.test.js +47 -0
- package/dist/src/linux/linux-wine-env.test.js.map +1 -0
- package/dist/src/plugin/persistent-plugin-installer.d.ts +21 -0
- package/dist/src/plugin/persistent-plugin-installer.d.ts.map +1 -0
- package/dist/src/plugin/persistent-plugin-installer.js +69 -0
- package/dist/src/plugin/persistent-plugin-installer.js.map +1 -0
- package/dist/src/plugin/persistent-plugin-installer.test.d.ts +5 -0
- package/dist/src/plugin/persistent-plugin-installer.test.d.ts.map +1 -0
- package/dist/src/plugin/persistent-plugin-installer.test.js +109 -0
- package/dist/src/plugin/persistent-plugin-installer.test.js.map +1 -0
- package/dist/src/plugin/plugin-discovery.d.ts +7 -0
- package/dist/src/plugin/plugin-discovery.d.ts.map +1 -0
- package/dist/src/plugin/plugin-discovery.js +18 -0
- package/dist/src/plugin/plugin-discovery.js.map +1 -0
- package/dist/src/plugin/plugin-discovery.test.d.ts +5 -0
- package/dist/src/plugin/plugin-discovery.test.d.ts.map +1 -0
- package/dist/src/plugin/plugin-discovery.test.js +55 -0
- package/dist/src/plugin/plugin-discovery.test.js.map +1 -0
- package/dist/src/plugin/plugin-injector.js +1 -1
- package/dist/src/plugin/plugin-injector.js.map +1 -1
- package/dist/src/process/studio-process-manager.d.ts +7 -3
- package/dist/src/process/studio-process-manager.d.ts.map +1 -1
- package/dist/src/process/studio-process-manager.js +38 -11
- package/dist/src/process/studio-process-manager.js.map +1 -1
- package/dist/src/process/studio-process-manager.test.js +18 -1
- package/dist/src/process/studio-process-manager.test.js.map +1 -1
- package/dist/src/server/action-dispatcher.d.ts +35 -0
- package/dist/src/server/action-dispatcher.d.ts.map +1 -0
- package/dist/src/server/action-dispatcher.js +67 -0
- package/dist/src/server/action-dispatcher.js.map +1 -0
- package/dist/src/server/action-dispatcher.test.d.ts +6 -0
- package/dist/src/server/action-dispatcher.test.d.ts.map +1 -0
- package/dist/src/server/action-dispatcher.test.js +173 -0
- package/dist/src/server/action-dispatcher.test.js.map +1 -0
- package/dist/src/server/index.d.ts +1 -1
- package/dist/src/server/index.d.ts.map +1 -1
- package/dist/src/server/pending-request-map.d.ts +33 -0
- package/dist/src/server/pending-request-map.d.ts.map +1 -0
- package/dist/src/server/pending-request-map.js +69 -0
- package/dist/src/server/pending-request-map.js.map +1 -0
- package/dist/src/server/pending-request-map.test.d.ts +2 -0
- package/dist/src/server/pending-request-map.test.d.ts.map +1 -0
- package/dist/src/server/pending-request-map.test.js +192 -0
- package/dist/src/server/pending-request-map.test.js.map +1 -0
- package/dist/src/server/plugin-detection.test.d.ts +7 -0
- package/dist/src/server/plugin-detection.test.d.ts.map +1 -0
- package/dist/src/server/plugin-detection.test.js +154 -0
- package/dist/src/server/plugin-detection.test.js.map +1 -0
- package/dist/src/server/studio-bridge-server.d.ts +44 -7
- package/dist/src/server/studio-bridge-server.d.ts.map +1 -1
- package/dist/src/server/studio-bridge-server.js +341 -91
- package/dist/src/server/studio-bridge-server.js.map +1 -1
- package/dist/src/server/studio-bridge-server.test.js +231 -207
- package/dist/src/server/studio-bridge-server.test.js.map +1 -1
- package/dist/src/server/web-socket-protocol-basic.test.d.ts +2 -0
- package/dist/src/server/web-socket-protocol-basic.test.d.ts.map +1 -0
- package/dist/src/server/web-socket-protocol-basic.test.js +98 -0
- package/dist/src/server/web-socket-protocol-basic.test.js.map +1 -0
- package/dist/src/server/web-socket-protocol.d.ts +218 -20
- package/dist/src/server/web-socket-protocol.d.ts.map +1 -1
- package/dist/src/server/web-socket-protocol.js +346 -20
- package/dist/src/server/web-socket-protocol.js.map +1 -1
- package/dist/src/server/web-socket-protocol.test.js +572 -146
- package/dist/src/server/web-socket-protocol.test.js.map +1 -1
- package/dist/src/test/e2e/hand-off.test.d.ts +9 -0
- package/dist/src/test/e2e/hand-off.test.d.ts.map +1 -0
- package/dist/src/test/e2e/hand-off.test.js +274 -0
- package/dist/src/test/e2e/hand-off.test.js.map +1 -0
- package/dist/src/test/e2e/persistent-session.test.d.ts +11 -0
- package/dist/src/test/e2e/persistent-session.test.d.ts.map +1 -0
- package/dist/src/test/e2e/persistent-session.test.js +367 -0
- package/dist/src/test/e2e/persistent-session.test.js.map +1 -0
- package/dist/src/test/e2e/split-server.test.d.ts +14 -0
- package/dist/src/test/e2e/split-server.test.d.ts.map +1 -0
- package/dist/src/test/e2e/split-server.test.js +230 -0
- package/dist/src/test/e2e/split-server.test.js.map +1 -0
- package/dist/src/test/helpers/mock-plugin-client.d.ts +69 -0
- package/dist/src/test/helpers/mock-plugin-client.d.ts.map +1 -0
- package/dist/src/test/helpers/mock-plugin-client.js +213 -0
- package/dist/src/test/helpers/mock-plugin-client.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docker/.dockerignore +2 -0
- package/docker/Dockerfile +113 -0
- package/docker/docker-compose.yml +20 -0
- package/docker/entrypoint.sh +19 -0
- package/package.json +8 -6
- package/src/bridge/bridge-connection-remote.test.ts +189 -0
- package/src/bridge/bridge-connection.test.ts +1076 -0
- package/src/bridge/bridge-connection.ts +718 -0
- package/src/bridge/bridge-session.test.ts +336 -0
- package/src/bridge/bridge-session.ts +365 -0
- package/src/bridge/index.ts +42 -0
- package/src/bridge/internal/__tests__/failover-crash.test.ts +191 -0
- package/src/bridge/internal/__tests__/failover-graceful.test.ts +268 -0
- package/src/bridge/internal/__tests__/failover-inflight.test.ts +329 -0
- package/src/bridge/internal/__tests__/host-client-integration.test.ts +387 -0
- package/src/bridge/internal/bridge-client.test.ts +399 -0
- package/src/bridge/internal/bridge-client.ts +434 -0
- package/src/bridge/internal/bridge-host.test.ts +501 -0
- package/src/bridge/internal/bridge-host.ts +531 -0
- package/src/bridge/internal/environment-detection.test.ts +180 -0
- package/src/bridge/internal/environment-detection.ts +119 -0
- package/src/bridge/internal/hand-off.test.ts +408 -0
- package/src/bridge/internal/hand-off.ts +275 -0
- package/src/bridge/internal/health-endpoint.test.ts +147 -0
- package/src/bridge/internal/health-endpoint.ts +100 -0
- package/src/bridge/internal/host-protocol.test.ts +415 -0
- package/src/bridge/internal/host-protocol.ts +255 -0
- package/src/bridge/internal/session-tracker.test.ts +535 -0
- package/src/bridge/internal/session-tracker.ts +198 -0
- package/src/bridge/internal/transport-client.test.ts +241 -0
- package/src/bridge/internal/transport-client.ts +194 -0
- package/src/bridge/internal/transport-server.test.ts +220 -0
- package/src/bridge/internal/transport-server.ts +242 -0
- package/src/bridge/types.ts +161 -0
- package/src/cli/adapters/cli-command-adapter-handler.test.ts +318 -0
- package/src/cli/adapters/cli-command-adapter.test.ts +221 -0
- package/src/cli/adapters/cli-command-adapter.ts +342 -0
- package/src/cli/adapters/group-builder.test.ts +146 -0
- package/src/cli/adapters/group-builder.ts +81 -0
- package/src/cli/adapters/help-formatter.test.ts +97 -0
- package/src/cli/adapters/help-formatter.ts +86 -0
- package/src/cli/adapters/target-resolver.test.ts +222 -0
- package/src/cli/adapters/target-resolver.ts +144 -0
- package/src/cli/args/global-args.ts +2 -0
- package/src/cli/cli.ts +100 -21
- package/src/cli/resolve-script-content.ts +36 -0
- package/src/cli/resolve-session.test.ts +141 -0
- package/src/cli/resolve-session.ts +66 -0
- package/src/cli/script-executor.ts +22 -4
- package/src/cli/types.ts +11 -0
- package/src/commands/connect.test.ts +61 -0
- package/src/commands/connect.ts +32 -0
- package/src/commands/console/exec/exec.test.ts +258 -0
- package/src/commands/console/exec/exec.ts +130 -0
- package/src/commands/console/exec/execute.luau +202 -0
- package/src/commands/console/logs/logs.test.ts +138 -0
- package/src/commands/console/logs/logs.ts +115 -0
- package/src/commands/console/logs/query-logs.luau +76 -0
- package/src/commands/disconnect.test.ts +21 -0
- package/src/commands/disconnect.ts +12 -0
- package/src/commands/explorer/query/query-data-model.luau +206 -0
- package/src/commands/explorer/query/query.test.ts +297 -0
- package/src/commands/explorer/query/query.ts +157 -0
- package/src/commands/formatters.test.ts +237 -0
- package/src/commands/framework/action-loader.test.ts +118 -0
- package/src/commands/framework/action-loader.ts +65 -0
- package/src/commands/framework/arg-builder.test.ts +298 -0
- package/src/commands/framework/arg-builder.ts +203 -0
- package/src/commands/framework/command-registry.test.ts +204 -0
- package/src/commands/framework/command-registry.ts +51 -0
- package/src/commands/framework/define-command.test.ts +161 -0
- package/src/commands/framework/define-command.ts +114 -0
- package/src/commands/framework/index.ts +33 -0
- package/src/commands/index.ts +72 -0
- package/src/commands/linux/inject-credentials/inject-credentials.ts +118 -0
- package/src/commands/linux/setup/setup.ts +145 -0
- package/src/commands/linux/status/status.ts +180 -0
- package/src/commands/plugin/install/install.ts +31 -0
- package/src/commands/plugin/uninstall/uninstall.ts +54 -0
- package/src/commands/process/close/close.ts +52 -0
- package/src/commands/process/format-state.ts +21 -0
- package/src/commands/process/info/info.test.ts +76 -0
- package/src/commands/process/info/info.ts +54 -0
- package/src/commands/process/info/query-state.luau +48 -0
- package/src/commands/process/launch/launch.test.ts +65 -0
- package/src/commands/process/launch/launch.ts +45 -0
- package/src/commands/process/list/list.test.ts +82 -0
- package/src/commands/process/list/list.ts +75 -0
- package/src/commands/process/run/run.ts +98 -0
- package/src/commands/rgba-to-png.ts +98 -0
- package/src/commands/serve/serve.test.ts +139 -0
- package/src/commands/serve/serve.ts +161 -0
- package/src/commands/viewport/screenshot/capture-screenshot.luau +247 -0
- package/src/commands/viewport/screenshot/screenshot.test.ts +181 -0
- package/src/commands/viewport/screenshot/screenshot.ts +71 -0
- package/src/docker/docker-delegator.test.ts +159 -0
- package/src/docker/docker-delegator.ts +240 -0
- package/src/index.test.ts +58 -0
- package/src/index.ts +104 -3
- package/src/linux/README.md +130 -0
- package/src/linux/index.ts +25 -0
- package/src/linux/linux-config.test.ts +66 -0
- package/src/linux/linux-config.ts +102 -0
- package/src/linux/linux-credential-writer.ts +421 -0
- package/src/linux/linux-display-manager.ts +106 -0
- package/src/linux/linux-env-guard.test.ts +62 -0
- package/src/linux/linux-env-guard.ts +38 -0
- package/src/linux/linux-fflags.test.ts +78 -0
- package/src/linux/linux-fflags.ts +48 -0
- package/src/linux/linux-prerequisites.ts +152 -0
- package/src/linux/linux-shader-patcher.test.ts +76 -0
- package/src/linux/linux-shader-patcher.ts +56 -0
- package/src/linux/linux-studio-installer.ts +113 -0
- package/src/linux/linux-studio-launcher.ts +90 -0
- package/src/linux/linux-version-resolver.ts +74 -0
- package/src/linux/linux-wine-env.test.ts +56 -0
- package/src/linux/linux-wine-env.ts +38 -0
- package/src/linux/write-cred.c +48 -0
- package/src/plugin/persistent-plugin-installer.test.ts +168 -0
- package/src/plugin/persistent-plugin-installer.ts +90 -0
- package/src/plugin/plugin-discovery.test.ts +70 -0
- package/src/plugin/plugin-discovery.ts +21 -0
- package/src/plugin/plugin-injector.ts +1 -1
- package/src/process/studio-process-manager.test.ts +22 -1
- package/src/process/studio-process-manager.ts +57 -18
- package/src/server/action-dispatcher.test.ts +240 -0
- package/src/server/action-dispatcher.ts +89 -0
- package/src/server/index.ts +0 -3
- package/src/server/pending-request-map.test.ts +261 -0
- package/src/server/pending-request-map.ts +87 -0
- package/src/server/plugin-detection.test.ts +195 -0
- package/src/server/studio-bridge-server.test.ts +321 -283
- package/src/server/studio-bridge-server.ts +469 -111
- package/src/server/web-socket-protocol-basic.test.ts +131 -0
- package/src/server/web-socket-protocol.test.ts +658 -159
- package/src/server/web-socket-protocol.ts +668 -58
- package/src/test/e2e/hand-off.test.ts +338 -0
- package/src/test/e2e/persistent-session.test.ts +442 -0
- package/src/test/e2e/split-server.test.ts +290 -0
- package/src/test/helpers/mock-plugin-client.ts +276 -0
- package/templates/studio-bridge-plugin/src/Shared/ActionRouter.luau +245 -0
- package/templates/studio-bridge-plugin/src/Shared/DiscoveryStateMachine.luau +203 -0
- package/templates/studio-bridge-plugin/src/Shared/MessageBuffer.luau +144 -0
- package/templates/studio-bridge-plugin/src/Shared/Protocol.luau +132 -0
- package/templates/studio-bridge-plugin/src/StudioBridgePlugin.server.lua +364 -133
- package/templates/studio-bridge-plugin/src/Vendor/png.luau +1247 -0
- package/templates/studio-bridge-plugin-test/test/actions.test.luau +580 -0
- package/templates/studio-bridge-plugin-test/test/discovery.test.luau +622 -0
- package/templates/studio-bridge-plugin-test/test/execute-handler.test.luau +406 -0
- package/templates/studio-bridge-plugin-test/test/hash-lifecycle.test.luau +814 -0
- package/templates/studio-bridge-plugin-test/test/integration.test.luau +1020 -0
- package/templates/studio-bridge-plugin-test/test/new-actions.test.luau +339 -0
- package/templates/studio-bridge-plugin-test/test/plugin-entry.test.luau +493 -0
- package/templates/studio-bridge-plugin-test/test/protocol.test.luau +506 -0
- package/templates/studio-bridge-plugin-test/test/roblox-mocks.luau +108 -0
- package/templates/studio-bridge-plugin-test/test/test-runner.luau +112 -0
- package/dist/src/cli/commands/exec-command.d.ts +0 -15
- package/dist/src/cli/commands/exec-command.d.ts.map +0 -1
- package/dist/src/cli/commands/exec-command.js +0 -35
- package/dist/src/cli/commands/exec-command.js.map +0 -1
- package/dist/src/cli/commands/run-command.d.ts +0 -15
- package/dist/src/cli/commands/run-command.d.ts.map +0 -1
- package/dist/src/cli/commands/run-command.js +0 -47
- package/dist/src/cli/commands/run-command.js.map +0 -1
- package/dist/src/cli/commands/terminal/terminal-command.d.ts +0 -17
- package/dist/src/cli/commands/terminal/terminal-command.d.ts.map +0 -1
- package/dist/src/cli/commands/terminal/terminal-command.js +0 -41
- package/dist/src/cli/commands/terminal/terminal-command.js.map +0 -1
- package/dist/src/cli/commands/terminal/terminal-editor.d.ts +0 -43
- package/dist/src/cli/commands/terminal/terminal-editor.d.ts.map +0 -1
- package/dist/src/cli/commands/terminal/terminal-editor.js +0 -430
- package/dist/src/cli/commands/terminal/terminal-editor.js.map +0 -1
- package/dist/src/cli/commands/terminal/terminal-mode.d.ts +0 -13
- package/dist/src/cli/commands/terminal/terminal-mode.d.ts.map +0 -1
- package/dist/src/cli/commands/terminal/terminal-mode.js +0 -141
- package/dist/src/cli/commands/terminal/terminal-mode.js.map +0 -1
- package/dist/src/server/web-socket-protocol.smoke.test.d.ts +0 -6
- package/dist/src/server/web-socket-protocol.smoke.test.d.ts.map +0 -1
- package/dist/src/server/web-socket-protocol.smoke.test.js +0 -196
- package/dist/src/server/web-socket-protocol.smoke.test.js.map +0 -1
- package/src/cli/commands/exec-command.ts +0 -48
- package/src/cli/commands/run-command.ts +0 -63
- package/src/cli/commands/terminal/terminal-command.ts +0 -54
- package/src/cli/commands/terminal/terminal-editor.ts +0 -500
- package/src/cli/commands/terminal/terminal-mode.ts +0 -184
- package/src/server/web-socket-protocol.smoke.test.ts +0 -255
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transparent Docker delegation for `process run` on Linux environments
|
|
3
|
+
* without Wine. Detects when Docker is available and delegates the entire
|
|
4
|
+
* command to the pre-built container image.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fs from 'fs/promises';
|
|
8
|
+
import * as os from 'os';
|
|
9
|
+
import * as path from 'path';
|
|
10
|
+
import { execa } from 'execa';
|
|
11
|
+
import { OutputHelper } from '@quenty/cli-output-helpers';
|
|
12
|
+
import { validateCookieAsync } from '@quenty/nevermore-cli-helpers';
|
|
13
|
+
import type { ExecuteScriptOptions } from '../cli/script-executor.js';
|
|
14
|
+
|
|
15
|
+
const DOCKER_IMAGE_BASE = 'ghcr.io/quenty/nevermore-studio-linux';
|
|
16
|
+
const CHECK_TIMEOUT_MS = 5_000;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Resolves the Docker image to use. Defaults to :latest, but can be
|
|
20
|
+
* overridden with STUDIO_BRIDGE_DOCKER_TAG (e.g. "canary-feat-my-branch").
|
|
21
|
+
*/
|
|
22
|
+
function resolveDockerImage(): string {
|
|
23
|
+
const tag = process.env.STUDIO_BRIDGE_DOCKER_TAG ?? 'latest';
|
|
24
|
+
return `${DOCKER_IMAGE_BASE}:${tag}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns true if the current environment should delegate to Docker
|
|
29
|
+
* (Linux without Wine, but with Docker available).
|
|
30
|
+
*/
|
|
31
|
+
export async function shouldDelegateToDockerAsync(): Promise<boolean> {
|
|
32
|
+
if (os.platform() !== 'linux') {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Check if Wine is available locally
|
|
37
|
+
try {
|
|
38
|
+
await execa('wine', ['--version'], { timeout: CHECK_TIMEOUT_MS });
|
|
39
|
+
return false; // Wine works, use local path
|
|
40
|
+
} catch {
|
|
41
|
+
// Wine not available, check Docker
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
await execa('docker', ['info'], {
|
|
46
|
+
timeout: CHECK_TIMEOUT_MS,
|
|
47
|
+
stdio: 'ignore',
|
|
48
|
+
});
|
|
49
|
+
return true;
|
|
50
|
+
} catch {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Delegates script execution to the Docker container. Streams stdio
|
|
57
|
+
* transparently and propagates the exit code. Does not return — calls
|
|
58
|
+
* process.exit().
|
|
59
|
+
*/
|
|
60
|
+
export async function delegateToDockerAsync(
|
|
61
|
+
options: ExecuteScriptOptions
|
|
62
|
+
): Promise<never> {
|
|
63
|
+
const cookie = process.env.ROBLOSECURITY;
|
|
64
|
+
if (!cookie) {
|
|
65
|
+
OutputHelper.error(
|
|
66
|
+
'ROBLOSECURITY environment variable is required for Docker delegation.'
|
|
67
|
+
);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const validation = await validateCookieAsync(cookie);
|
|
72
|
+
if (!validation.valid) {
|
|
73
|
+
if (validation.reason === 'network_error') {
|
|
74
|
+
OutputHelper.warn(
|
|
75
|
+
'Could not validate ROBLOSECURITY cookie (network error). Continuing anyway.'
|
|
76
|
+
);
|
|
77
|
+
} else {
|
|
78
|
+
OutputHelper.error(
|
|
79
|
+
`ROBLOSECURITY cookie is invalid or expired (HTTP ${validation.status}). Update the cookie and try again.`
|
|
80
|
+
);
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const image = resolveDockerImage();
|
|
86
|
+
await ensureImageAsync(image);
|
|
87
|
+
|
|
88
|
+
const cwd = process.cwd();
|
|
89
|
+
const args = await buildDockerRunArgsAsync(options, cwd, cookie, image);
|
|
90
|
+
|
|
91
|
+
OutputHelper.verbose(`[StudioBridge] docker run args: ${args.join(' ')}`);
|
|
92
|
+
|
|
93
|
+
// Pass ROBLOSECURITY through the docker process's env (referenced by name in
|
|
94
|
+
// the args via `-e ROBLOSECURITY`) rather than baking the value into argv,
|
|
95
|
+
// where it would be visible via `ps`.
|
|
96
|
+
const result = await execa('docker', args, {
|
|
97
|
+
stdio: 'inherit',
|
|
98
|
+
reject: false,
|
|
99
|
+
env: { ...process.env, ROBLOSECURITY: cookie },
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
process.exit(result.exitCode ?? 1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const STALE_DAYS = 7;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Ensures the Docker image is available locally, pulling if needed.
|
|
109
|
+
* Warns if the local image is older than STALE_DAYS.
|
|
110
|
+
*/
|
|
111
|
+
async function ensureImageAsync(image: string): Promise<void> {
|
|
112
|
+
try {
|
|
113
|
+
const { stdout } = await execa('docker', [
|
|
114
|
+
'image',
|
|
115
|
+
'inspect',
|
|
116
|
+
'--format',
|
|
117
|
+
'{{.Created}}',
|
|
118
|
+
image,
|
|
119
|
+
]);
|
|
120
|
+
const created = new Date(stdout.trim());
|
|
121
|
+
const ageDays = (Date.now() - created.getTime()) / (1000 * 60 * 60 * 24);
|
|
122
|
+
if (ageDays > STALE_DAYS) {
|
|
123
|
+
OutputHelper.warn(
|
|
124
|
+
`Docker image is ${Math.floor(
|
|
125
|
+
ageDays
|
|
126
|
+
)} days old. Run 'docker pull ${image}' to update.`
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
} catch {
|
|
130
|
+
OutputHelper.info(`Pulling ${image}...`);
|
|
131
|
+
await execa('docker', ['pull', image], { stdio: 'inherit' });
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Builds the docker run argument array, writing inline script content
|
|
137
|
+
* to a temp file if needed.
|
|
138
|
+
*
|
|
139
|
+
* The cookie value is NOT placed in the returned argv. Instead `-e
|
|
140
|
+
* ROBLOSECURITY` (no value) is used so docker reads the value from its own
|
|
141
|
+
* environment at spawn time, keeping the cookie out of `ps` output. The
|
|
142
|
+
* caller is responsible for setting ROBLOSECURITY in the spawned docker
|
|
143
|
+
* process's env. The `cookie` parameter is retained only for validation in
|
|
144
|
+
* `delegateToDockerAsync`.
|
|
145
|
+
*/
|
|
146
|
+
export async function buildDockerRunArgsAsync(
|
|
147
|
+
options: ExecuteScriptOptions,
|
|
148
|
+
cwd: string,
|
|
149
|
+
_cookie: string,
|
|
150
|
+
image: string = `${DOCKER_IMAGE_BASE}:latest`
|
|
151
|
+
): Promise<string[]> {
|
|
152
|
+
const { scriptContent, placePath, timeoutMs, verbose } = options;
|
|
153
|
+
|
|
154
|
+
// Write script to a temp file in CWD to avoid shell escaping issues
|
|
155
|
+
let tmpFile: string | undefined;
|
|
156
|
+
let scriptFilePath: string;
|
|
157
|
+
|
|
158
|
+
if (options.filePath) {
|
|
159
|
+
scriptFilePath = path.resolve(options.filePath);
|
|
160
|
+
// Validate file is within CWD
|
|
161
|
+
if (!scriptFilePath.startsWith(cwd)) {
|
|
162
|
+
OutputHelper.error(
|
|
163
|
+
`Cannot delegate: file ${scriptFilePath} is outside working directory ${cwd}`
|
|
164
|
+
);
|
|
165
|
+
process.exit(1);
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
tmpFile = path.join(cwd, `.studio-bridge-tmp-${process.pid}.lua`);
|
|
169
|
+
await fs.writeFile(tmpFile, scriptContent, 'utf-8');
|
|
170
|
+
scriptFilePath = tmpFile;
|
|
171
|
+
|
|
172
|
+
// Register cleanup
|
|
173
|
+
const cleanup = async () => {
|
|
174
|
+
try {
|
|
175
|
+
await fs.unlink(tmpFile!);
|
|
176
|
+
} catch {
|
|
177
|
+
// Ignore
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
process.on('exit', () => {
|
|
181
|
+
void cleanup();
|
|
182
|
+
});
|
|
183
|
+
process.on('SIGINT', () => {
|
|
184
|
+
void cleanup();
|
|
185
|
+
});
|
|
186
|
+
process.on('SIGTERM', () => {
|
|
187
|
+
void cleanup();
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const innerArgs = [
|
|
192
|
+
'studio-bridge',
|
|
193
|
+
'linux',
|
|
194
|
+
'inject-credentials',
|
|
195
|
+
'&&',
|
|
196
|
+
'studio-bridge',
|
|
197
|
+
'process',
|
|
198
|
+
'run',
|
|
199
|
+
'--file',
|
|
200
|
+
scriptFilePath,
|
|
201
|
+
'--timeout',
|
|
202
|
+
String(timeoutMs),
|
|
203
|
+
];
|
|
204
|
+
|
|
205
|
+
if (placePath) {
|
|
206
|
+
const resolvedPlace = path.resolve(placePath);
|
|
207
|
+
if (!resolvedPlace.startsWith(cwd)) {
|
|
208
|
+
OutputHelper.error(
|
|
209
|
+
`Cannot delegate: place file ${resolvedPlace} is outside working directory ${cwd}`
|
|
210
|
+
);
|
|
211
|
+
process.exit(1);
|
|
212
|
+
}
|
|
213
|
+
innerArgs.push('--place', resolvedPlace);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (verbose) {
|
|
217
|
+
innerArgs.push('--verbose');
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Docker-level timeout: script timeout + 60s buffer for auth/setup
|
|
221
|
+
const dockerTimeoutSec = Math.ceil((timeoutMs + 60_000) / 1000);
|
|
222
|
+
|
|
223
|
+
return [
|
|
224
|
+
'run',
|
|
225
|
+
'--rm',
|
|
226
|
+
'--init',
|
|
227
|
+
'--stop-timeout',
|
|
228
|
+
String(dockerTimeoutSec),
|
|
229
|
+
'-e',
|
|
230
|
+
'ROBLOSECURITY',
|
|
231
|
+
'-v',
|
|
232
|
+
`${cwd}:${cwd}`,
|
|
233
|
+
'-w',
|
|
234
|
+
cwd,
|
|
235
|
+
image,
|
|
236
|
+
'bash',
|
|
237
|
+
'-c',
|
|
238
|
+
innerArgs.join(' '),
|
|
239
|
+
];
|
|
240
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import * as barrel from './index.js';
|
|
3
|
+
|
|
4
|
+
describe('index barrel exports', () => {
|
|
5
|
+
it('exports existing StudioBridge class', () => {
|
|
6
|
+
expect(barrel.StudioBridge).toBeDefined();
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it('exports BridgeConnection class', () => {
|
|
10
|
+
expect(barrel.BridgeConnection).toBeDefined();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('exports BridgeSession class', () => {
|
|
14
|
+
expect(barrel.BridgeSession).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('exports error classes', () => {
|
|
18
|
+
expect(barrel.SessionNotFoundError).toBeDefined();
|
|
19
|
+
expect(barrel.ActionTimeoutError).toBeDefined();
|
|
20
|
+
expect(barrel.SessionDisconnectedError).toBeDefined();
|
|
21
|
+
expect(barrel.CapabilityNotSupportedError).toBeDefined();
|
|
22
|
+
expect(barrel.ContextNotFoundError).toBeDefined();
|
|
23
|
+
expect(barrel.HostUnreachableError).toBeDefined();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('exports protocol encoding/decoding functions', () => {
|
|
27
|
+
expect(barrel.encodeMessage).toBeDefined();
|
|
28
|
+
expect(barrel.decodePluginMessage).toBeDefined();
|
|
29
|
+
expect(barrel.decodeServerMessage).toBeDefined();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('exports studio process utilities', () => {
|
|
33
|
+
expect(barrel.findStudioPathAsync).toBeDefined();
|
|
34
|
+
expect(barrel.findPluginsFolder).toBeDefined();
|
|
35
|
+
expect(barrel.launchStudioAsync).toBeDefined();
|
|
36
|
+
expect(barrel.injectPluginAsync).toBeDefined();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('exports plugin discovery', () => {
|
|
40
|
+
expect(barrel.isPersistentPluginInstalled).toBeDefined();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('exports command handler functions', () => {
|
|
44
|
+
expect(barrel.listSessionsHandlerAsync).toBeDefined();
|
|
45
|
+
expect(barrel.serveHandlerAsync).toBeDefined();
|
|
46
|
+
expect(barrel.installPluginHandlerAsync).toBeDefined();
|
|
47
|
+
expect(barrel.uninstallPluginHandlerAsync).toBeDefined();
|
|
48
|
+
expect(barrel.queryStateHandlerAsync).toBeDefined();
|
|
49
|
+
expect(barrel.queryLogsHandlerAsync).toBeDefined();
|
|
50
|
+
expect(barrel.captureScreenshotHandlerAsync).toBeDefined();
|
|
51
|
+
expect(barrel.queryDataModelHandlerAsync).toBeDefined();
|
|
52
|
+
expect(barrel.execHandlerAsync).toBeDefined();
|
|
53
|
+
expect(barrel.runHandlerAsync).toBeDefined();
|
|
54
|
+
expect(barrel.launchHandlerAsync).toBeDefined();
|
|
55
|
+
expect(barrel.connectHandlerAsync).toBeDefined();
|
|
56
|
+
expect(barrel.disconnectHandler).toBeDefined();
|
|
57
|
+
});
|
|
58
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,44 @@ export type {
|
|
|
19
19
|
} from './server/studio-bridge-server.js';
|
|
20
20
|
export type { OutputLevel } from './server/web-socket-protocol.js';
|
|
21
21
|
|
|
22
|
+
// Bridge network layer (persistent sessions)
|
|
23
|
+
export {
|
|
24
|
+
BridgeConnection,
|
|
25
|
+
BridgeSession,
|
|
26
|
+
SessionNotFoundError,
|
|
27
|
+
ActionTimeoutError,
|
|
28
|
+
SessionDisconnectedError,
|
|
29
|
+
CapabilityNotSupportedError,
|
|
30
|
+
ContextNotFoundError,
|
|
31
|
+
HostUnreachableError,
|
|
32
|
+
} from './bridge/index.js';
|
|
33
|
+
|
|
34
|
+
export type {
|
|
35
|
+
BridgeConnectionOptions,
|
|
36
|
+
SessionInfo,
|
|
37
|
+
InstanceInfo,
|
|
38
|
+
SessionContext,
|
|
39
|
+
SessionOrigin,
|
|
40
|
+
ExecResult,
|
|
41
|
+
StateResult,
|
|
42
|
+
ScreenshotResult,
|
|
43
|
+
LogsResult,
|
|
44
|
+
DataModelResult,
|
|
45
|
+
LogEntry,
|
|
46
|
+
LogOptions,
|
|
47
|
+
QueryDataModelOptions,
|
|
48
|
+
LogFollowOptions,
|
|
49
|
+
} from './bridge/index.js';
|
|
50
|
+
|
|
51
|
+
// Protocol types
|
|
52
|
+
export type {
|
|
53
|
+
Capability,
|
|
54
|
+
StudioState,
|
|
55
|
+
DataModelInstance,
|
|
56
|
+
ErrorCode,
|
|
57
|
+
SerializedValue,
|
|
58
|
+
} from './server/web-socket-protocol.js';
|
|
59
|
+
|
|
22
60
|
// Lower-level exports for advanced usage / testing
|
|
23
61
|
export {
|
|
24
62
|
findStudioPathAsync,
|
|
@@ -26,17 +64,80 @@ export {
|
|
|
26
64
|
launchStudioAsync,
|
|
27
65
|
} from './process/studio-process-manager.js';
|
|
28
66
|
export { injectPluginAsync } from './plugin/plugin-injector.js';
|
|
67
|
+
export { isPersistentPluginInstalled } from './plugin/plugin-discovery.js';
|
|
29
68
|
export {
|
|
30
69
|
encodeMessage,
|
|
31
70
|
decodePluginMessage,
|
|
71
|
+
decodeServerMessage,
|
|
32
72
|
} from './server/web-socket-protocol.js';
|
|
33
73
|
export type {
|
|
34
74
|
PluginMessage,
|
|
35
75
|
ServerMessage,
|
|
36
|
-
HelloMessage,
|
|
37
|
-
OutputMessage,
|
|
38
76
|
ScriptCompleteMessage,
|
|
39
|
-
WelcomeMessage,
|
|
40
77
|
ExecuteMessage,
|
|
41
78
|
ShutdownMessage,
|
|
79
|
+
// plugin -> server
|
|
80
|
+
RegisterMessage,
|
|
81
|
+
StateResultMessage,
|
|
82
|
+
ScreenshotResultMessage,
|
|
83
|
+
DataModelResultMessage,
|
|
84
|
+
LogsResultMessage,
|
|
85
|
+
StateChangeMessage,
|
|
86
|
+
HeartbeatMessage,
|
|
87
|
+
PluginErrorMessage,
|
|
88
|
+
// server -> plugin
|
|
89
|
+
QueryStateMessage,
|
|
90
|
+
CaptureScreenshotMessage,
|
|
91
|
+
QueryDataModelMessage,
|
|
92
|
+
QueryLogsMessage,
|
|
93
|
+
ServerErrorMessage,
|
|
94
|
+
// dynamic action registration
|
|
95
|
+
RegisterActionMessage,
|
|
96
|
+
RegisterActionResultMessage,
|
|
42
97
|
} from './server/web-socket-protocol.js';
|
|
98
|
+
|
|
99
|
+
// Command handlers
|
|
100
|
+
export {
|
|
101
|
+
listSessionsHandlerAsync,
|
|
102
|
+
serveHandlerAsync,
|
|
103
|
+
installPluginHandlerAsync,
|
|
104
|
+
uninstallPluginHandlerAsync,
|
|
105
|
+
queryStateHandlerAsync,
|
|
106
|
+
queryLogsHandlerAsync,
|
|
107
|
+
captureScreenshotHandlerAsync,
|
|
108
|
+
queryDataModelHandlerAsync,
|
|
109
|
+
execHandlerAsync,
|
|
110
|
+
runHandlerAsync,
|
|
111
|
+
launchHandlerAsync,
|
|
112
|
+
connectHandlerAsync,
|
|
113
|
+
disconnectHandler,
|
|
114
|
+
} from './commands/index.js';
|
|
115
|
+
|
|
116
|
+
export type {
|
|
117
|
+
SessionsResult,
|
|
118
|
+
ServeOptions,
|
|
119
|
+
ServeResult,
|
|
120
|
+
InstallPluginResult,
|
|
121
|
+
UninstallPluginResult,
|
|
122
|
+
QueryOptions,
|
|
123
|
+
QueryResult,
|
|
124
|
+
DataModelNode,
|
|
125
|
+
RunOptions,
|
|
126
|
+
RunResult,
|
|
127
|
+
LaunchOptions,
|
|
128
|
+
LaunchResult,
|
|
129
|
+
ConnectOptions,
|
|
130
|
+
ConnectResult,
|
|
131
|
+
DisconnectResult,
|
|
132
|
+
} from './commands/index.js';
|
|
133
|
+
|
|
134
|
+
// Command option/result types that conflict with bridge types are aliased
|
|
135
|
+
export type {
|
|
136
|
+
StateResult as CommandStateResult,
|
|
137
|
+
LogsResult as CommandLogsResult,
|
|
138
|
+
LogsOptions as CommandLogsOptions,
|
|
139
|
+
ScreenshotResult as CommandScreenshotResult,
|
|
140
|
+
ScreenshotOptions as CommandScreenshotOptions,
|
|
141
|
+
ExecOptions as CommandExecOptions,
|
|
142
|
+
ExecResult as CommandExecResult,
|
|
143
|
+
} from './commands/index.js';
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Linux/Wine Support for studio-bridge
|
|
2
|
+
|
|
3
|
+
Run Roblox Studio headlessly on Linux via Wine 11, Xvfb, and Mesa llvmpipe. This enables AI agents and CI pipelines to launch Studio in devcontainers and GitHub Actions without a physical display or GPU.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
| Tool | Version | Purpose |
|
|
8
|
+
|------|---------|---------|
|
|
9
|
+
| Wine | 11.0+ | Windows compatibility layer |
|
|
10
|
+
| Xvfb | any | Virtual X11 framebuffer |
|
|
11
|
+
| openbox | any | Window manager (required for modal dialogs) |
|
|
12
|
+
| x86_64-w64-mingw32-gcc | any | Cross-compiler for write-cred.exe |
|
|
13
|
+
| unzip | any | Extract Studio packages |
|
|
14
|
+
|
|
15
|
+
All can be installed via `studio-bridge linux setup --install-deps` on Debian/Ubuntu.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# One-time setup: install deps, download Studio, patch shaders, write FFlags
|
|
21
|
+
studio-bridge linux setup --install-deps
|
|
22
|
+
|
|
23
|
+
# Inject authentication (reads $ROBLOSECURITY env var)
|
|
24
|
+
studio-bridge linux inject-credentials
|
|
25
|
+
|
|
26
|
+
# Verify everything is ready
|
|
27
|
+
studio-bridge linux status
|
|
28
|
+
|
|
29
|
+
# Launch Studio and execute code through the bridge
|
|
30
|
+
studio-bridge exec 'print("Hello from Linux!")'
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Architecture
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
linux-config.ts Path resolution + constants (STUDIO_DIR, WINEPREFIX, DISPLAY)
|
|
37
|
+
linux-wine-env.ts Wine env vars (DISPLAY, Mesa overrides, WINEDEBUG)
|
|
38
|
+
linux-prerequisites.ts Check/install system deps
|
|
39
|
+
linux-display-manager.ts Start/stop Xvfb + openbox
|
|
40
|
+
linux-version-resolver.ts Fetch Studio version from CDN
|
|
41
|
+
linux-studio-installer.ts Download 34 zip packages, extract, write AppSettings.xml
|
|
42
|
+
linux-shader-patcher.ts Binary-patch #version 150 → #version 420
|
|
43
|
+
linux-fflags.ts Write ClientAppSettings.json (D3D11 renderer flags)
|
|
44
|
+
linux-credential-writer.ts Compile write-cred.c, inject 3 credentials via Wine
|
|
45
|
+
write-cred.c Bundled C source for Windows Credential Manager writes
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The process manager (`src/process/studio-process-manager.ts`) uses lazy `import()` for all Linux modules — zero overhead on Windows/macOS.
|
|
49
|
+
|
|
50
|
+
## How It Works
|
|
51
|
+
|
|
52
|
+
### Rendering: D3D11 via WineD3D
|
|
53
|
+
|
|
54
|
+
Studio must use the D3D11 renderer, not OpenGL. Wine's OpenGL/EGL backend has a bug where `wglSwapBuffers` always targets the same EGL surface regardless of HWND, which breaks DockWidget rendering (Explorer, Properties, Toolbox all stay black).
|
|
55
|
+
|
|
56
|
+
WineD3D translates D3D11 calls to OpenGL internally but manages per-window swapchains correctly. The FFlags force this path:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"FFlagDebugGraphicsPreferD3D11": true,
|
|
61
|
+
"FFlagDebugGraphicsDisableVulkan": true,
|
|
62
|
+
"FFlagDebugGraphicsDisableD3D11FL10": true,
|
|
63
|
+
"FFlagDebugGraphicsDisableOpenGL": true
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Shader Patching
|
|
68
|
+
|
|
69
|
+
Studio's GLSL shader pack declares `#version 150` but uses `unpackHalf2x16()`, which requires GLSL 4.20+. NVIDIA/AMD drivers are lenient about this; Mesa's llvmpipe is strict and rejects the shaders.
|
|
70
|
+
|
|
71
|
+
The fix is a binary patch: replace all `#version 150` with `#version 420` in `shaders/shaders_glsl3.pack`. Both strings are exactly 12 bytes, so the patch is safe and in-place.
|
|
72
|
+
|
|
73
|
+
### Authentication
|
|
74
|
+
|
|
75
|
+
Studio expects three entries in Windows Credential Manager:
|
|
76
|
+
|
|
77
|
+
1. `https://www.roblox.com:RobloxStudioAuthuserid` → numeric user ID
|
|
78
|
+
2. `https://www.roblox.com:RobloxStudioAuthCookies` → `.ROBLOSECURITY` (cookie name)
|
|
79
|
+
3. `https://www.roblox.com:RobloxStudioAuth.ROBLOSECURITY{userId}` → the cookie value
|
|
80
|
+
|
|
81
|
+
The `linux inject-credentials` command:
|
|
82
|
+
1. Resolves the cookie via `getRobloxCookieAsync()` (env var → Wine cred store → interactive prompt)
|
|
83
|
+
2. Fetches the user ID from `users.roblox.com/v1/users/authenticated`
|
|
84
|
+
3. Compiles `write-cred.c` with MinGW (one-time)
|
|
85
|
+
4. Runs `wine write-cred.exe` three times to inject all entries
|
|
86
|
+
|
|
87
|
+
On first launch, Studio exchanges the cookie for OAuth2 tokens. Subsequent launches use the refresh token, so the original cookie can expire.
|
|
88
|
+
|
|
89
|
+
## Environment Variables
|
|
90
|
+
|
|
91
|
+
| Variable | Default | Description |
|
|
92
|
+
|----------|---------|-------------|
|
|
93
|
+
| `STUDIO_DIR` | `~/roblox-studio` | Studio installation directory |
|
|
94
|
+
| `WINEPREFIX` | `~/.wine` | Wine prefix directory |
|
|
95
|
+
| `DISPLAY` | `:99` | X11 display number |
|
|
96
|
+
| `ROBLOSECURITY` | — | .ROBLOSECURITY cookie for auth |
|
|
97
|
+
|
|
98
|
+
## CLI Commands
|
|
99
|
+
|
|
100
|
+
### `studio-bridge linux setup`
|
|
101
|
+
|
|
102
|
+
Install Wine dependencies and Roblox Studio.
|
|
103
|
+
|
|
104
|
+
| Flag | Description |
|
|
105
|
+
|------|-------------|
|
|
106
|
+
| `--install-deps` | Install system deps via apt-get (requires sudo) |
|
|
107
|
+
| `--version <hash>` | Studio version hash (default: latest from CDN) |
|
|
108
|
+
| `--studio-dir <path>` | Override installation directory |
|
|
109
|
+
| `--skip-shaders` | Skip shader patching |
|
|
110
|
+
| `--force` | Force reinstall even if same version exists |
|
|
111
|
+
|
|
112
|
+
### `studio-bridge linux inject-credentials`
|
|
113
|
+
|
|
114
|
+
Inject .ROBLOSECURITY cookie into Wine Credential Manager.
|
|
115
|
+
|
|
116
|
+
| Flag | Description |
|
|
117
|
+
|------|-------------|
|
|
118
|
+
| `--cookie <value>` | Explicit cookie value |
|
|
119
|
+
| `--cookie -` | Read cookie from stdin |
|
|
120
|
+
| _(none)_ | Falls back to `$ROBLOSECURITY` or interactive prompt |
|
|
121
|
+
|
|
122
|
+
### `studio-bridge linux status`
|
|
123
|
+
|
|
124
|
+
Read-only health check. Reports on prerequisites, display, Studio installation, FFlags, shaders, and authentication. Exits with code 1 if any issues found.
|
|
125
|
+
|
|
126
|
+
## Resource Requirements
|
|
127
|
+
|
|
128
|
+
- **Disk**: ~813MB for Studio installation + ~450MB download cache
|
|
129
|
+
- **RAM**: ~450MB–800MB at runtime. 16GB recommended for the host; 8GB may OOM.
|
|
130
|
+
- **CPU**: No GPU required — Mesa llvmpipe does software rendering.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export {
|
|
2
|
+
resolveLinuxConfig,
|
|
3
|
+
ROBLOX_CDN_BASE,
|
|
4
|
+
ROBLOX_USERS_API,
|
|
5
|
+
STUDIO_PACKAGES,
|
|
6
|
+
} from './linux-config.js';
|
|
7
|
+
export type { LinuxStudioConfig } from './linux-config.js';
|
|
8
|
+
export { buildWineEnv } from './linux-wine-env.js';
|
|
9
|
+
export {
|
|
10
|
+
checkPrerequisites,
|
|
11
|
+
allPrerequisitesMet,
|
|
12
|
+
installDependenciesAsync,
|
|
13
|
+
} from './linux-prerequisites.js';
|
|
14
|
+
export {
|
|
15
|
+
ensureDisplayAsync,
|
|
16
|
+
ensureWindowManagerAsync,
|
|
17
|
+
isXvfbRunning,
|
|
18
|
+
isOpenboxRunning,
|
|
19
|
+
} from './linux-display-manager.js';
|
|
20
|
+
export { resolveStudioVersionAsync } from './linux-version-resolver.js';
|
|
21
|
+
export { installStudioAsync } from './linux-studio-installer.js';
|
|
22
|
+
export { patchShadersAsync } from './linux-shader-patcher.js';
|
|
23
|
+
export { writeFflagsAsync } from './linux-fflags.js';
|
|
24
|
+
export { injectCredentialsAsync } from './linux-credential-writer.js';
|
|
25
|
+
export { launchStudioLinuxAsync } from './linux-studio-launcher.js';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { describe, it, expect, afterEach } from 'vitest';
|
|
2
|
+
import { resolveLinuxConfig, STUDIO_PACKAGES } from './linux-config.js';
|
|
3
|
+
|
|
4
|
+
describe('resolveLinuxConfig', () => {
|
|
5
|
+
const originalEnv = { ...process.env };
|
|
6
|
+
|
|
7
|
+
afterEach(() => {
|
|
8
|
+
process.env = { ...originalEnv };
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('returns HOME-based defaults when no env vars set', () => {
|
|
12
|
+
delete process.env.STUDIO_DIR;
|
|
13
|
+
delete process.env.WINEPREFIX;
|
|
14
|
+
delete process.env.DISPLAY;
|
|
15
|
+
process.env.HOME = '/home/testuser';
|
|
16
|
+
|
|
17
|
+
const config = resolveLinuxConfig();
|
|
18
|
+
expect(config.studioDir).toContain('roblox-studio');
|
|
19
|
+
expect(config.winePrefix).toContain('.wine');
|
|
20
|
+
expect(config.display).toBe(':99');
|
|
21
|
+
expect(config.studioExe).toMatch(/RobloxStudioBeta\.exe$/);
|
|
22
|
+
expect(config.clientSettingsPath).toContain('ClientAppSettings.json');
|
|
23
|
+
expect(config.pluginsDir).toMatch(/Plugins$/);
|
|
24
|
+
expect(config.writeCredExe).toMatch(/write-cred\.exe$/);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('respects STUDIO_DIR env var', () => {
|
|
28
|
+
process.env.STUDIO_DIR = '/opt/studio';
|
|
29
|
+
|
|
30
|
+
const config = resolveLinuxConfig();
|
|
31
|
+
expect(config.studioDir).toBe('/opt/studio');
|
|
32
|
+
expect(config.studioExe).toBe('/opt/studio/RobloxStudioBeta.exe');
|
|
33
|
+
expect(config.pluginsDir).toBe('/opt/studio/Plugins');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('respects WINEPREFIX env var', () => {
|
|
37
|
+
process.env.WINEPREFIX = '/tmp/test-wine';
|
|
38
|
+
|
|
39
|
+
const config = resolveLinuxConfig();
|
|
40
|
+
expect(config.winePrefix).toBe('/tmp/test-wine');
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('respects DISPLAY env var', () => {
|
|
44
|
+
process.env.DISPLAY = ':42';
|
|
45
|
+
|
|
46
|
+
const config = resolveLinuxConfig();
|
|
47
|
+
expect(config.display).toBe(':42');
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
describe('STUDIO_PACKAGES', () => {
|
|
52
|
+
it('has 34 package entries', () => {
|
|
53
|
+
expect(Object.keys(STUDIO_PACKAGES)).toHaveLength(34);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it('includes critical packages', () => {
|
|
57
|
+
expect(STUDIO_PACKAGES).toHaveProperty('RobloxStudio.zip');
|
|
58
|
+
expect(STUDIO_PACKAGES).toHaveProperty('shaders.zip');
|
|
59
|
+
expect(STUDIO_PACKAGES).toHaveProperty('Libraries.zip');
|
|
60
|
+
expect(STUDIO_PACKAGES).toHaveProperty('content-fonts.zip');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('maps shaders.zip to shaders/ directory', () => {
|
|
64
|
+
expect(STUDIO_PACKAGES['shaders.zip']).toBe('shaders/');
|
|
65
|
+
});
|
|
66
|
+
});
|