mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
feat(sandbox): boot the shared microVM at startup when sandboxing is enabled
Startup and the enforcement toggle now run the same ensureWorkspaceSandbox path a command triggers, so the image pull, microVM boot, attestation and exec-user provisioning are done before the first command instead of on it. One microVM serves every repo and schedule worktree.
This commit is contained in:
1 parent
2eba81d524
commit
297f6a5237
3 files changed
+63
-35
No files matched your search
@@ -664,11 +664,9 @@ export class SandboxRuntimeService {
|
||||
if (!capability.available) return
|
||||
if (getProcessIdentityAttestationError() !== null) return
|
||||
await cacheSandboxImage()
|
||||
if (buildSandboxProvisionArgs().length === 0) return
|
||||
const entry = findWorkspaceSandboxEntry(await listSandboxes())
|
||||
if (entry === null || !entry.running) return
|
||||
await ensureWorkspaceSandbox()
|
||||
await provisionSandboxExecUserPasswd()
|
||||
logger.info('Provisioned the workspace sandbox exec user passwd entry')
|
||||
logger.info('Workspace sandbox is running and its exec user is provisioned')
|
||||
}
|
||||
|
||||
isEnabled(): boolean {
|
||||
|
||||
Reference in new issue
Block a user