FabricFabricHarness
EcosystemSandboxes

Modal

Run Fabric sessions in Modal sandboxes through the first-party TypeScript SDK adapter.

pnpm add @fabric-harness/connectors modal
fh add modal

Create a Modal sandbox with the provider SDK and pass the native handle to Fabric:

import { ModalClient } from 'modal';
import { modalSdkSandbox } from '@fabric-harness/connectors/modal';

const client = new ModalClient();
const app = await client.apps.fromName('fabric-harness', { createIfMissing: true });
const image = client.images.fromRegistry('node:22-alpine');
const remote = await client.sandboxes.create(app, image, {
  timeoutMs: 300_000,
  workdir: '/workspace',
});
const sandbox = modalSdkSandbox(remote, { cleanup: true });
const fabric = await init({ sandbox });

The adapter maps Modal's streamed process handles, binary filesystem API, timeout, portable sandboxId, reconnect, and termination behavior to SandboxEnv. Credentials stay inside ModalClient; they are never serialized into a session or model request. The runnable examples/with-modal project uses this path, and the protected live suite publishes the nine-check sandbox certification report for Modal SDK 0.9.