FabricFabricStudio

Script tab

JS REPL with `fabric` in scope.

The Script tab is a server-side sandbox for executing arbitrary JavaScript against your fabric instance.

Sandbox model

Studio uses new AsyncFunction('fabric', code). For local dev (Studio is invoked from the developer's own terminal, no cross-tenant access concerns), this is sufficient.

Limits:

  • 16 KB max script size
  • 10 s execution timeout
  • No isolated-vm — set up a hosted Studio with proper isolation if you need it for multi-tenant access

Tenant selector

The header has a tenant input next to the Run button. When set, the server route threads the value through fabric.withTenant() so your script sees a tenant-scoped client — handy for testing per-tenant behavior without wrapping every call manually.

Example

// Top-level await is supported.
const channels = await fabric.slack.api.channels.list({ limit: 5 });
return channels.map((c) => c.name);

The return value is JSON-stringified server-side and rendered as a code block. undefined returns become (undefined). BigInts, Errors, and functions are handled by a custom JSON replacer.