@@ -12,7 +12,7 @@ afterEach(async () => {
1212
1313describe ( 'OneComputerSandboxRuntimeAdapter' , ( ) => {
1414 it ( 'only exposes browser MCP controls when the governed runtime explicitly enables them' , async ( ) => {
15- const { GOVERNED_BROWSER_TOOLS , browserEvidenceFor, governedClaudeTools, isGovernedBrowserTool } = await import ( './onecomputer-sandbox-runner.js' )
15+ const { GOVERNED_BROWSER_TOOLS , browserEvidenceFor, governedClaudeTools, isGovernedBrowserTool, isSandboxRuntimeReady } = await import ( './onecomputer-sandbox-runner.js' )
1616 expect ( governedClaudeTools ( false ) ) . toEqual ( [ 'Read' , 'Write' , 'Edit' , 'Glob' , 'Grep' ] )
1717 expect ( governedClaudeTools ( true ) ) . toEqual ( expect . arrayContaining ( [ ...GOVERNED_BROWSER_TOOLS ] ) )
1818 expect ( GOVERNED_BROWSER_TOOLS ) . toEqual ( expect . arrayContaining ( [ 'mcp__playwright__browser_select_option' , 'mcp__playwright__browser_wait_for' ] ) )
@@ -21,6 +21,9 @@ describe('OneComputerSandboxRuntimeAdapter', () => {
2121 expect ( isGovernedBrowserTool ( 'mcp__playwright__browser_evaluate' ) ) . toBe ( false )
2222 expect ( browserEvidenceFor ( 'mcp__playwright__browser_navigate' , { url : 'https://user:password@example.com/path?token=hidden#fragment' } ) ) . toEqual ( { tool : 'browser_navigate' , url : 'https://example.com/path' } )
2323 expect ( browserEvidenceFor ( 'mcp__playwright__browser_navigate' , { url : 'file:///tmp/onevibe/task/index.html' } ) ) . toEqual ( { tool : 'browser_navigate' , url : 'file://sandbox-local/index.html' } )
24+ expect ( isSandboxRuntimeReady ( { state : 'started' , bootstrapped : false } ) ) . toBe ( false )
25+ expect ( isSandboxRuntimeReady ( { state : 'started' , bootstrapped : true } ) ) . toBe ( true )
26+ expect ( isSandboxRuntimeReady ( { state : 'started' } ) ) . toBe ( true )
2427 } )
2528
2629 it ( 'builds generated projects only in the sandbox and disables install lifecycle scripts' , async ( ) => {
0 commit comments