| 451 | const SHELL_FONT_BYTES = Buffer.from('woff2-bundle-bytes', 'utf-8'); |
| 452 | |
| 453 | function makeShellDir(): string { |
| 454 | const dir = mkdtempSync(join(tmpdir(), 'ok-mcp-mount-shell-')); |
| 455 | tmpDirs.push(dir); |
| 456 | writeFileSync( |
| 457 | join(dir, 'index.html'), |
| 458 | '<!DOCTYPE html><html><body data-test="shell">ok</body></html>', |
| 459 | ); |
| 460 | mkdirSync(join(dir, 'assets')); |
| 461 | writeFileSync(join(dir, 'assets', 'app-abc123.js'), 'console.log("bundle");'); |
| 462 | writeFileSync(join(dir, 'assets', 'inter-cafebabe.woff2'), SHELL_FONT_BYTES); |
| 463 | return dir; |
| 464 | } |
| 465 | |
| 466 | async function startWithShell(opts?: { |
| 467 | contentAssetMiddleware?: MountMcpAndApiOptions['contentAssetMiddleware']; |