Reference
API reference
Generated public API inventory for every published Fabric Harness entrypoint.
This reference is generated from the declaration files shipped in each package. Import from the
entrypoint shown in the table; symbols marked type are TypeScript-only exports.
@fabric-harness/azure
@fabric-harness/azure
| Export | Kind | Summary |
|---|---|---|
azureAgent | value | Public export. |
AzureAgentOptions | type | Public export. |
AzureAksClusterRef | type | Public export. |
azureAksRunCommandTool | value | Public export. |
AzureArmClient | value | Public export. |
AzureArmClientOptions | type | Public export. |
AzureBlobArtifactStore | type | Public export. |
AzureBlobArtifactStoreOptions | type | Public export. |
AzureBundle | type | Public export. |
AzureBundleConfig | type | Public export. |
AzureContainerAppsJobRef | type | Public export. |
azureContainerAppsJobTool | value | Public export. |
azureContainerInstanceExecTool | value | Public export. |
AzureContainerInstanceRef | type | Public export. |
azureKeyVaultSecretProvider | value | Key Vault adapter for chainSecretProviders() and secretResolver(). |
AzureKeyVaultSecretResolverOptions | type | Public export. |
AzureOpenAIModelProvider | value | Public export. |
AzureOpenAIModelProviderOptions | type | Public export. |
AzureResourceRef | type | Public export. |
createAzureArmClient | value | Public export. |
createAzureBlobArtifactStore | value | Public export. |
createAzureKeyVaultSecretResolver | value | Public export. |
createFoundryAgentServiceClient | value | Public export. |
defineAzureAgent | value | Public export. |
DefineAzureAgentOptions | type | Public export. |
FoundryAgentDefinition | type | Public export. |
FoundryAgentInvocationOptions | type | Public export. |
FoundryAgentInvocationResult | type | Public export. |
foundryAgentLifecycleTools | value | Public export. |
FoundryAgentServiceClient | value | Public export. |
FoundryAgentServiceOptions | type | Public export. |
foundryAgentTool | value | Public export. |
FoundryHostedAgentSandboxOptions | type | Public export. |
FoundryRuntimeModelProvider | value | Model provider that calls the Foundry-managed Azure OpenAI surface using a Bearer token (managed identity) instead of an API key. Designed for the Azure AI Foundry Hosted Agent runtime, but useful on any Azure compute with a managed identity (ACA / AKS / VM) — you don't need the Foundry runtime adapter to use this provider. The runtime injects: - AZURE_OPENAI_ENDPOINT — the Foundry-routed Azure OpenAI endpoint. - AZURE_OPENAI_DEPLOYMENT — the model deployment name. - FOUNDRY_AGENT_TOKEN (or AZURE_AI_FOUNDRY_TOKEN) — a pre-issued token when running inside the Hosted Agent contain... |
FoundryRuntimeModelProviderOptions | type | Public export. |
FoundryThreadMessage | type | Public export. |
FoundryTokenResolver | type | Token resolver — returns a Bearer token for the Foundry runtime's managed Azure OpenAI surface. Implementations may cache and refresh. |
MockAzureModelProvider | value | A deterministic ModelProvider for Azure agent tests and init templates. Returns structured responses without requiring real Azure credentials. |
MockAzureModelProviderOptions | type | Public export. |
resolveToolRefs | value | Public export. |
@fabric-harness/azure/aks-sandbox
| Export | Kind | Summary |
|---|---|---|
aksSandbox | value | Public export. |
AksSandboxOptions | type | AKS-flavored Kubernetes sandbox. Pulls cluster credentials from the AKS listClusterUserCredentials endpoint, builds a @kubernetes/client-node KubeConfig, and delegates to kubernetesSandbox. Requires both peer deps: ```sh npm install |
@fabric-harness/azure/app-insights
| Export | Kind | Summary |
|---|---|---|
ApplicationInsightsClientLike | type | Optional Azure Monitor / Application Insights telemetry exporter. Adapts Fabric's TelemetrySpan shape into App Insights TelemetryClient trackDependency calls. The Azure Monitor SDK is provided by the caller — we don't take a hard dependency. Install peer dep: See the package declarations for an example. Usage: See the package declarations for an example. |
applicationInsightsExporter | value | Public export. |
ApplicationInsightsExporterOptions | type | Public export. |
@fabric-harness/azure/foundry-runtime
| Export | Kind | Summary |
|---|---|---|
FoundryRuntimeModelProvider | value | Model provider that calls the Foundry-managed Azure OpenAI surface using a Bearer token (managed identity) instead of an API key. Designed for the Azure AI Foundry Hosted Agent runtime, but useful on any Azure compute with a managed identity (ACA / AKS / VM) — you don't need the Foundry runtime adapter to use this provider. The runtime injects: - AZURE_OPENAI_ENDPOINT — the Foundry-routed Azure OpenAI endpoint. - AZURE_OPENAI_DEPLOYMENT — the model deployment name. - FOUNDRY_AGENT_TOKEN (or AZURE_AI_FOUNDRY_TOKEN) — a pre-issued token when running inside the Hosted Agent contain... |
FoundryRuntimeModelProviderOptions | type | Public export. |
FoundryTokenResolver | type | Token resolver — returns a Bearer token for the Foundry runtime's managed Azure OpenAI surface. Implementations may cache and refresh. |
@fabric-harness/azure/agent
| Export | Kind | Summary |
|---|---|---|
azure | value | Bundle factory for Azure agents. Returns an AzureBundle with a model provider, Azure-specific tools, and a safe default egress policy. |
azureAgent | value | Public export. |
AzureAgentOptions | type | Public export. |
AzureBundle | type | Public export. |
AzureBundleConfig | type | Public export. |
defineAzureAgent | value | Public export. |
DefineAzureAgentOptions | type | Public export. |
resolveToolRefs | value | Public export. |
@fabric-harness/channels
@fabric-harness/channels
| Export | Kind | Summary |
|---|---|---|
bytesToHex | value | Public export. |
Channel | type | Public export. |
channelCompatibility | value | Published channel compatibility contract. Provider payload changes that only add fields are supported without a Fabric release; breaking provider versions are added here before becoming the default. |
ChannelCompatibility | type | Public export. |
channelCompatibilityPolicy | value | Public export. |
ChannelCompatibilityStatus | type | Public export. |
ChannelContext | type | Public export. |
ChannelDispatch | type | Public export. |
ChannelDispatchRequest | type | Public export. |
ChannelRoute | type | Channels turn platform webhooks (Slack, GitHub, …) into agent dispatches. Handlers are written against the Web Request/Response API and crypto.subtle, so the same channel runs on Node and Cloudflare. A channel is a stateless route container plus a conversation-id (de)serializer — session continuity falls out of the key (same thread → same key → same session). |
conversationKey | value | Public export. |
defineChannel | value | Validates and brands a channel's routes. |
FirstPartyChannelName | type | Public export. |
hexToBytes | value | Public export. |
hmacSha256 | value | Public export. |
parseConversationKey | value | Public export. |
ParsedConversationKey | type | Public export. |
readRequestBody | value | Reads the full request body as bytes, or returns undefined if it exceeds limitBytes. NOTE: this consumes the request stream (single read). Signature-verifying channels need the exact bytes for HMAC and the parsed JSON afterward — don't call request.json() as well. Use readJsonBody to get both from one read. |
verifyHmacSha256 | value | Constant-time HMAC-SHA256 verification (via crypto.subtle.verify). |
@fabric-harness/channels/compatibility
| Export | Kind | Summary |
|---|---|---|
channelCompatibility | value | Published channel compatibility contract. Provider payload changes that only add fields are supported without a Fabric release; breaking provider versions are added here before becoming the default. |
ChannelCompatibility | type | Public export. |
channelCompatibilityPolicy | value | Public export. |
ChannelCompatibilityStatus | type | Public export. |
FirstPartyChannelName | type | Public export. |
@fabric-harness/channels/slack
| Export | Kind | Summary |
|---|---|---|
createSlackChannel | value | Slack events channel. Verifies the v0 HMAC signature, answers the URL-verification challenge, and dispatches app_mention / threaded message events to a persistent agent keyed by the Slack thread — with the Slack event_id as the dedupe key (exactly-once), the team as tenant, and the user as the acting actor (which is what powers on-behalf-of governance downstream). |
parseSlackConversationKey | value | Parse a Slack instance id back into the thread ref (e.g. to bind replyInSlackThread at agent init). |
replyInSlackThread | value | Outbound tool: reply in the Slack thread this agent is handling. |
SlackChannel | type | Public export. |
SlackChannelOptions | type | Public export. |
slackConversationKey | value | Serialize a Slack thread into the stable instance id used by createSlackChannel. |
SlackEvent | type | Public export. |
SlackEventsPayload | type | Public export. |
SlackThreadRef | type | Public export. |
@fabric-harness/channels/github
| Export | Kind | Summary |
|---|---|---|
commentOnGitHubIssue | value | Outbound tool: comment on the GitHub issue / PR this agent is handling. |
createGitHubChannel | value | GitHub webhook channel. Verifies the X-Hub-Signature-256 (sha256=<hex> HMAC over the raw body), and dispatches issue / PR / comment events to a persistent agent keyed by owner/repo/<kind>/<number> — with X-GitHub-Delivery as the dedupe key (exactly-once), the owner as tenant, and the sender as the acting actor. Bot senders are ignored to avoid loops; ping is acknowledged. |
GitHubChannel | type | Public export. |
GitHubChannelOptions | type | Public export. |
githubConversationKey | value | Public export. |
GitHubIssueRef | type | Public export. |
GitHubWebhookPayload | type | Public export. |
NormalizedGitHubEvent | type | Public export. |
normalizeGitHubEvent | value | Public export. |
parseGitHubConversationKey | value | Public export. |
@fabric-harness/channels/discord
| Export | Kind | Summary |
|---|---|---|
createDiscordChannel | value | Public export. |
DiscordChannel | type | Public export. |
DiscordChannelOptions | type | Public export. |
discordConversationKey | value | Public export. |
DiscordConversationRef | type | Public export. |
DiscordInteractionPayload | type | Public export. |
parseDiscordConversationKey | value | Public export. |
replyInDiscord | value | Public export. |
verifyDiscordSignature | value | Public export. |
@fabric-harness/channels/teams
| Export | Kind | Summary |
|---|---|---|
BotFrameworkAuthenticatorOptions | type | Public export. |
createBotFrameworkAuthenticator | value | Verify Microsoft Bot Connector signatures, issuer, audience, lifetime, service URL, and endorsement. |
createTeamsChannel | value | Public export. |
parseTeamsConversationKey | value | Public export. |
replyInTeamsConversation | value | Public export. |
TeamsActivityPayload | type | Public export. |
TeamsChannel | type | Public export. |
TeamsChannelOptions | type | Public export. |
teamsConversationKey | value | Public export. |
TeamsConversationRef | type | Public export. |
@fabric-harness/channels/telegram
| Export | Kind | Summary |
|---|---|---|
createTelegramChannel | value | Public export. |
parseTelegramConversationKey | value | Public export. |
replyInTelegram | value | Public export. |
TelegramChannel | type | Public export. |
TelegramChannelOptions | type | Public export. |
telegramConversationKey | value | Public export. |
TelegramConversationRef | type | Public export. |
TelegramMessagePayload | type | Public export. |
TelegramUpdatePayload | type | Public export. |
@fabric-harness/channels/twilio
| Export | Kind | Summary |
|---|---|---|
createTwilioChannel | value | Public export. |
parseTwilioConversationKey | value | Public export. |
replyWithTwilio | value | Public export. |
TwilioChannel | type | Public export. |
TwilioChannelOptions | type | Public export. |
twilioConversationKey | value | Public export. |
TwilioConversationRef | type | Public export. |
TwilioMessagePayload | type | Public export. |
verifyTwilioSignature | value | Public export. |
@fabric-harness/channels/whatsapp
| Export | Kind | Summary |
|---|---|---|
createWhatsAppChannel | value | Public export. |
parseWhatsAppConversationKey | value | Public export. |
replyInWhatsApp | value | Public export. |
WhatsAppChannel | type | Public export. |
WhatsAppChannelOptions | type | Public export. |
whatsAppConversationKey | value | Public export. |
WhatsAppConversationRef | type | Public export. |
WhatsAppWebhookPayload | type | Public export. |
@fabric-harness/channels/google-chat
| Export | Kind | Summary |
|---|---|---|
createGoogleChatChannel | value | Public export. |
GoogleChatChannel | type | Public export. |
GoogleChatChannelOptions | type | Public export. |
googleChatConversationKey | value | Public export. |
GoogleChatConversationRef | type | Public export. |
GoogleChatEvent | type | Public export. |
parseGoogleChatConversationKey | value | Public export. |
replyInGoogleChat | value | Public export. |
verifyGoogleChatRequest | value | Public export. |
@fabric-harness/channels/linear
| Export | Kind | Summary |
|---|---|---|
commentOnLinearIssue | value | Public export. |
createLinearChannel | value | Public export. |
LinearChannel | type | Public export. |
LinearChannelOptions | type | Public export. |
linearConversationKey | value | Public export. |
LinearConversationRef | type | Public export. |
LinearWebhookPayload | type | Public export. |
parseLinearConversationKey | value | Public export. |
@fabric-harness/channels/notion
| Export | Kind | Summary |
|---|---|---|
commentOnNotionPage | value | Public export. |
createNotionChannel | value | Public export. |
NotionChannel | type | Public export. |
NotionChannelOptions | type | Public export. |
notionConversationKey | value | Public export. |
NotionConversationRef | type | Public export. |
NotionWebhookPayload | type | Public export. |
parseNotionConversationKey | value | Public export. |
@fabric-harness/channels/stripe
| Export | Kind | Summary |
|---|---|---|
createStripeChannel | value | Public export. |
parseStripeConversationKey | value | Public export. |
StripeChannel | type | Public export. |
StripeChannelOptions | type | Public export. |
stripeConversationKey | value | Public export. |
StripeConversationRef | type | Public export. |
StripeEventPayload | type | Public export. |
updateStripeCustomer | value | Public export. |
verifyStripeSignature | value | Public export. |
@fabric-harness/channels/zendesk
| Export | Kind | Summary |
|---|---|---|
commentOnZendeskTicket | value | Public export. |
createZendeskChannel | value | Public export. |
parseZendeskConversationKey | value | Public export. |
ZendeskChannel | type | Public export. |
ZendeskChannelOptions | type | Public export. |
zendeskConversationKey | value | Public export. |
ZendeskConversationRef | type | Public export. |
ZendeskWebhookPayload | type | Public export. |
@fabric-harness/channels/intercom
| Export | Kind | Summary |
|---|---|---|
createIntercomChannel | value | Public export. |
IntercomChannel | type | Public export. |
IntercomChannelOptions | type | Public export. |
intercomConversationKey | value | Public export. |
IntercomConversationRef | type | Public export. |
IntercomWebhookPayload | type | Public export. |
parseIntercomConversationKey | value | Public export. |
replyInIntercom | value | Public export. |
@fabric-harness/channels/shopify
| Export | Kind | Summary |
|---|---|---|
createShopifyChannel | value | Public export. |
parseShopifyConversationKey | value | Public export. |
ShopifyChannel | type | Public export. |
ShopifyChannelOptions | type | Public export. |
shopifyConversationKey | value | Public export. |
ShopifyConversationRef | type | Public export. |
ShopifyWebhookPayload | type | Public export. |
updateShopifyOrderNote | value | Public export. |
@fabric-harness/channels/messenger
| Export | Kind | Summary |
|---|---|---|
createMessengerChannel | value | Public export. |
MessengerChannel | type | Public export. |
MessengerChannelOptions | type | Public export. |
messengerConversationKey | value | Public export. |
MessengerConversationRef | type | Public export. |
MessengerWebhookPayload | type | Public export. |
parseMessengerConversationKey | value | Public export. |
replyInMessenger | value | Public export. |
@fabric-harness/channels/resend
| Export | Kind | Summary |
|---|---|---|
createResendChannel | value | Public export. |
parseResendConversationKey | value | Public export. |
ResendChannel | type | Public export. |
ResendChannelOptions | type | Public export. |
resendConversationKey | value | Public export. |
ResendConversationRef | type | Public export. |
ResendWebhookPayload | type | Public export. |
sendWithResend | value | Public export. |
verifyResendSignature | value | Public export. |
@fabric-harness/channels/salesforce-marketing-cloud
| Export | Kind | Summary |
|---|---|---|
createSalesforceMarketingCloudChannel | value | Public export. |
parseSalesforceMarketingCloudConversationKey | value | Public export. |
SalesforceMarketingCloudChannel | type | Public export. |
SalesforceMarketingCloudChannelOptions | type | Public export. |
salesforceMarketingCloudConversationKey | value | Public export. |
SalesforceMarketingCloudConversationRef | type | Public export. |
SalesforceMarketingCloudEvent | type | Public export. |
SalesforceMarketingCloudWebhookPayload | type | Public export. |
sendMarketingCloudMessage | value | Public export. |
@fabric-harness/cli
@fabric-harness/cli
| Export | Kind | Summary |
|---|---|---|
| No named exports |
@fabric-harness/cli/config
| Export | Kind | Summary |
|---|---|---|
defineConfig | value | Public export. |
DefineConfigInput | type | Public export. |
@fabric-harness/cloudflare
@fabric-harness/cloudflare
| Export | Kind | Summary |
|---|---|---|
cloudflare | value | One-call wiring for a Cloudflare-native agent: model provider, Workers AI binding tools, a safe default egress policy, and an optional Durable Object session store. |
CLOUDFLARE_BUILD_TARGET | value | Public export. |
cloudflareAgent | value | Public export. |
CloudflareAgentOptions | type | Public export. |
CloudflareBundle | type | Public export. |
CloudflareBundleConfig | type | Public export. |
CloudflareCronHandlerOptions | type | Public export. |
CloudflareDurableObjectSessionStoreOptions | type | Public export. |
CloudflareDurableObjectSqlStorage | type | Public export. |
CloudflareDurablePersistenceStores | type | Public export. |
CloudflareExecutionContextLike | type | Public export. |
CloudflareExtension | type | Public export. |
CloudflareR2BucketLike | type | Public export. |
CloudflareR2ListResultLike | type | Public export. |
CloudflareR2ObjectBodyLike | type | Public export. |
CloudflareSandboxEnvOptions | type | Public export. |
CloudflareSandboxExecResult | type | Public export. |
CloudflareSandboxFileInfo | type | Public export. |
CloudflareSandboxLike | type | Public export. |
CloudflareSandboxProcessLike | type | Public export. |
CloudflareScheduledController | type | Public export. |
CloudflareScheduledJob | type | Public export. |
cloudflareScheduleIdempotencyKey | value | Public export. |
createCloudflareCronHandler | value | Build a Cloudflare scheduled() handler that admits matching jobs through the finite-run seam. |
createCloudflareDurableObjectSessionStore | value | Minimal Durable Object SQL-backed SessionStore used by the Cloudflare build target. It intentionally depends only on the small SQL shape exposed by Workers Durable Objects so Cloudflare SDK types do not leak into the SDK. |
createCloudflareDurablePersistenceStores | value | Durable Object SQLite stores for the v2 submission and stream lifecycle. |
createCloudflareRunStore | value | Cloudflare Durable Object SQL-backed RunStore for workflow events. Enforces append-only semantics via a UNIQUE(run_id, event_index) primary key on the fabric_harness_workflow_events table. Duplicate event indexes for the same runId are rejected at the storage layer. A BEFORE INSERT trigger on fabric_harness_runs deletes existing events when a run is reset with the same id (same-ID reset behaviour). |
createCloudflareSandboxEnv | value | Adapt an instance returned by getSandbox(env.Sandbox, id) from @cloudflare/sandbox into Fabric's provider-neutral SandboxEnv contract. |
defineCloudflareAgent | value | Public export. |
DefineCloudflareAgentOptions | type | Public export. |
extend | value | Public export. |
ExtensionClass | type | Public export. |
MockCloudflareModelProvider | value | A deterministic ModelProvider for Cloudflare agent tests and init templates. Returns structured responses without requiring real Cloudflare credentials. |
MockCloudflareModelProviderOptions | type | Public export. |
r2FilesystemSource | value | Read Cloudflare R2 objects as a Fabric filesystem source. Mount it with withFilesystemSources() so support agents can grep/read R2-backed knowledge bases through the normal sandbox tools. |
R2FilesystemSourceOptions | type | Public export. |
registerCloudflareSandboxRefDecoder | value | Register cross-process/Worker attachment for Cloudflare Sandbox IDs. |
resolveCloudflareExtension | value | Public export. |
ResolvedCloudflareExtension | type | Public export. |
resolveToolRefs | value | Public export. |
@fabric-harness/cloudflare/agent
| Export | Kind | Summary |
|---|---|---|
cloudflareAgent | value | Public export. |
CloudflareAgentOptions | type | Public export. |
defineCloudflareAgent | value | Public export. |
DefineCloudflareAgentOptions | type | Public export. |
resolveToolRefs | value | Public export. |
@fabric-harness/cloudflare/workers-ai
| Export | Kind | Summary |
|---|---|---|
BUILTIN_WORKERS_AI_MODEL_INFO | value | Public export. |
CLOUDFLARE_WORKERS_AI_MODEL_PREFIX | value | Reserved model-string prefix that routes through the Workers AI binding provider. init({ model: 'cloudflare/@cf/meta/llama-3.1-8b-instruct' }) picks this provider when one is registered with the matching name. |
CloudflareWorkersAIBindingLike | type | Structural shape of Cloudflare Workers' AI binding (env.AI). The real Ai type lives in @cloudflare/workers-types; we accept a narrower structural type so this package doesn't peer-dep workers-types. The run() method accepts the OpenAI Chat Completions request body and returns an OpenAI-shaped response when stream: false is passed. |
CloudflareWorkersAIGatewayOptions | type | Public export. |
CloudflareWorkersAIModelInfo | type | Public export. |
CloudflareWorkersAIModelProvider | value | Model provider that dispatches to Cloudflare Workers AI via the platform binding (env.AI.run()) instead of HTTP. Use on a Cloudflare Workers deployment to skip API tokens, gain Workers-AI-native rate limiting, and keep inference inside Cloudflare's network. Workers AI accepts the OpenAI Chat Completions request body verbatim, so we serialize through the SDK's toOpenAIMessage/toOpenAITool helpers and parse the binding's response with openAIChatCompletionToModelResponse. See the package declarations for an example. Pair with the cloudflare/ model prefix to make routing explicit when... |
CloudflareWorkersAIModelProviderOptions | type | Public export. |
mapReasoningEffort | value | Map Fabric's ordinal ThinkingLevel to Cloudflare's shared reasoning_effort option: minimal/low → low, medium → medium, high/xhigh → high. 'off' is handled by the caller (the field is omitted) and never reaches this function. |
stripCloudflarePrefix | value | Strip the cloudflare/ routing prefix from a model id, leaving the raw Workers AI model id (e.g. @cf/meta/llama-3.1-8b-instruct). |
WorkersAIReasoningEffort | type | Cloudflare Workers AI reasoning-effort wire values. |
@fabric-harness/cloudflare/shell
| Export | Kind | Summary |
|---|---|---|
CloudflareShellCodeExecutorLike | type | Public export. |
CloudflareShellCodeInput | type | Public export. |
CloudflareShellCodeToolOptions | type | Public export. |
CloudflareShellContext | type | Public export. |
CloudflareShellWorkspaceSandbox | type | Public export. |
CloudflareShellWorkspaceSandboxOptions | type | Public export. |
CloudflareWorkerLoaderLike | type | Public export. |
createCloudflareShellCodeTool | value | Public export. |
createCloudflareShellCodeToolFromExecutor | value | Public export. |
createCloudflareShellWorkspaceSandboxEnv | value | Public export. |
getCloudflareShellContext | value | Public export. |
getCloudflareShellWorkspaceSandbox | value | Public export. |
getDefaultCloudflareWorkspace | value | Construct the default |
GetDefaultCloudflareWorkspaceOptions | type | Public export. |
hydrateCloudflareWorkspaceFromR2 | value | Eagerly copy R2 objects into a |
HydrateCloudflareWorkspaceFromR2Options | type | Public export. |
registerCloudflareShellWorkspaceRefDecoder | value | Register attachment for a durable Cloudflare Shell workspace routing ID. |
runWithCloudflareShellContext | value | Public export. |
@fabric-harness/cloudflare/scheduled
| Export | Kind | Summary |
|---|---|---|
CloudflareCronHandlerOptions | type | Public export. |
CloudflareExecutionContextLike | type | Public export. |
CloudflareScheduledController | type | Public export. |
CloudflareScheduledJob | type | Public export. |
cloudflareScheduleIdempotencyKey | value | Public export. |
createCloudflareCronHandler | value | Build a Cloudflare scheduled() handler that admits matching jobs through the finite-run seam. |
@fabric-harness/cloudflare/persistence
| Export | Kind | Summary |
|---|---|---|
CloudflareDurablePersistenceStores | type | Public export. |
createCloudflareDurablePersistenceStores | value | Durable Object SQLite stores for the v2 submission and stream lifecycle. |
@fabric-harness/connectors
@fabric-harness/connectors
| Export | Kind | Summary |
|---|---|---|
assertSandboxCertification | value | Public export. |
AzureBlobBodyLike | type | Public export. |
AzureBlobFilesystemClientLike | type | Public export. |
azureBlobFilesystemSource | value | Public export. |
AzureBlobListResultLike | type | Public export. |
certifySandboxAdapter | value | Exercise the portable Fabric sandbox contract and return secret-free, machine-readable evidence suitable for a CI artifact. |
daytonaSandbox | value | Public export. |
daytonaSandboxFactory | value | Public export. |
DaytonaSandboxLike | type | Public export. |
DaytonaSandboxOptions | type | Public export. |
e2bSandbox | value | Public export. |
E2BSandboxLike | type | Public export. |
FilesystemSource | type | A read-only content source that can be mounted into a sandbox at sandbox-creation time. The agent then has built-in read, glob, and grep tools available over the mounted content — no retrieval pipeline, no embeddings, no vector store required. Sources are intentionally minimal: they yield (path, content) pairs. Implementations decide how to enumerate (eager vs lazy is up to the source author) — the mount step pulls the full set into the sandbox. |
ModalFileInfoLike | type | Public export. |
ModalFilesystemLike | type | Public export. |
ModalProcessLike | type | Public export. |
ModalReadStreamLike | type | Public export. |
modalSandbox | value | Public export. |
ModalSandboxLike | type | Public export. |
modalSdkSandbox | value | Adapt a native Modal TypeScript SDK Sandbox without exposing credentials to the Fabric runtime or model context. |
ModalSdkSandboxLike | type | Structural subset implemented by modal 0.9 Sandbox. |
ModalSdkSandboxOptions | type | Public export. |
ObjectStorageFilesystemSourceOptions | type | Public export. |
ProviderCleanupOptions | type | Public export. |
RemoteAdapterOptions | type | Public export. |
remoteSandbox | value | Dependency-free structural connector for provider-owned remote sandboxes. Provider-specific packages can keep their SDK/client types private and map them to RemoteSandboxApi, then return this SandboxFactory. Credentials stay in the provider client and are never serialized into Fabric session history. |
RemoteSandboxApi | type | Public export. |
RemoteSandboxConnectorOptions | type | Public export. |
remoteSandboxEnv | value | Public export. |
RemoteSandboxOptions | type | Public export. |
S3FilesystemClientLike | type | Public export. |
s3FilesystemSource | value | Public export. |
S3ObjectBodyLike | type | Public export. |
S3ObjectListResultLike | type | Public export. |
SANDBOX_PROVIDER_COMPATIBILITY | value | Public export. |
SandboxAdapterValidationOptions | type | Public export. |
SandboxAdapterValidationResult | type | Public export. |
SandboxCertificationCheck | type | Public export. |
SandboxCertificationCheckName | type | Public export. |
SandboxCertificationError | value | Public export. |
SandboxCertificationOptions | type | Public export. |
SandboxCertificationReport | type | Public export. |
SandboxFactory | type | Public export. |
validateSandboxAdapter | value | Public export. |
@fabric-harness/connectors/s3
| Export | Kind | Summary |
|---|---|---|
s3Source | value | Read-only S3 connector. Mount with session.mount(mountAt, s3Source(...)). The agent's built-in read, grep, glob, and bash tools then operate over the mounted prefix as if it were a local directory. |
S3SourceOptions | type | Concrete S3 connector backed by @aws-sdk/client-s3. Users pass bucket config; this module constructs the SDK client internally and adapts it to Fabric Harness's FilesystemSource contract. Install peer dep: ```sh npm install |
s3Writer | value | Public export. |
S3Writer | type | Public export. |
S3WriterOptions | type | Write-side helper for S3. Use to publish artifacts or mount a writable view. See the package declarations for an example. |
@fabric-harness/connectors/azure-blob
| Export | Kind | Summary |
|---|---|---|
azureBlobSource | value | Public export. |
AzureBlobSourceOptions | type | Concrete Azure Blob connector backed by @azure/storage-blob. Install peer deps: ```sh npm install |
azureBlobWriter | value | Public export. |
AzureBlobWriter | type | Public export. |
AzureBlobWriterOptions | type | Public export. |
@fabric-harness/connectors/gcs
| Export | Kind | Summary |
|---|---|---|
gcsSource | value | Public export. |
GcsSourceOptions | type | Concrete Google Cloud Storage connector backed by @google-cloud/storage. Install peer dep: ```sh npm install |
gcsWriter | value | Public export. |
GcsWriter | type | Public export. |
GcsWriterOptions | type | Public export. |
@fabric-harness/connectors/github
| Export | Kind | Summary |
|---|---|---|
githubSource | value | Public export. |
GithubSourceOptions | type | Read-only GitHub repository connector backed by octokit. Mounts a repository (at a given ref) as files inside the sandbox. Uses the Git Trees API in recursive mode for efficient enumeration. Install peer dep: See the package declarations for an example. |
@fabric-harness/connectors/databricks-volume
| Export | Kind | Summary |
|---|---|---|
databricksVolumeSource | value | Public export. |
DatabricksVolumeSourceOptions | type | Databricks Unity Catalog Volume connector backed by the Files API (/api/2.0/fs/files/...). No SDK dependency — uses fetch directly. Volume paths are addressed as /Volumes/<catalog>/<schema>/<volume>/<path>. Usage: See the package declarations for an example. |
databricksVolumeWriter | value | Public export. |
DatabricksVolumeWriter | type | Public export. |
DatabricksVolumeWriterOptions | type | Public export. |
@fabric-harness/connectors/k8s
| Export | Kind | Summary |
|---|---|---|
createKubernetesEgressNetworkPolicy | value | Build a deny-by-default Kubernetes egress boundary. Domain filtering belongs in the selected proxy; Kubernetes NetworkPolicy is intentionally limited to DNS, that proxy, and explicit private endpoint CIDRs. |
createKubernetesPod | value | Public export. |
createKubernetesPodFromImage | value | Public export. |
CreateKubernetesPodFromImageOptions | type | Provision an ephemeral pod from an image and return a KubernetesPodLike ready for kubernetesSandbox(). Works against any cluster reachable via the resolved kubeconfig — in-cluster, $KUBECONFIG, or ~/.kube/config. The pod is created with restartPolicy: Never and runs sleep infinity so it stays attachable. cleanup() (when wired via kubernetesSandbox's cleanup: true) deletes the pod. For Azure-managed clusters, prefer aksSandbox() from @fabric-harness/azure/aks-sandbox which adds ARM-resolved kubeconfig. See the package declarations for an example. |
CreateKubernetesPodOptions | type | Convenience helper: build a KubernetesPodLike from a @kubernetes/client-node KubeConfig plus pod identity. Suitable when kubectl already gets you in the door — for AKS, prefer aksSandbox() from @fabric-harness/azure. Files are transferred over exec using base64-encoded cat / tee. Works for text and small binaries; for large objects mount external storage via s3Source / gcsSource / azureBlobSource instead. |
KubernetesEgressNetworkPolicyOptions | type | Public export. |
KubernetesNetworkPolicyManifest | type | Public export. |
KubernetesPodLike | type | Structural Kubernetes pod adapter. The caller wires up @kubernetes/client-node (or any SPDY/exec-capable client) and supplies an object that satisfies KubernetesPodLike. Why structural: cluster auth, RBAC, and the exec wire format vary too much across environments (in-cluster, kubeconfig, AKS managed identity, GKE Workload Identity, EKS IRSA, …) for a single concrete adapter to be sensible. Pattern matches daytonaSandbox / e2bSandbox. For Azure-hosted clusters use the higher-level aksSandbox() from @fabric-harness/azure, which wires this adapter to Azure-managed credentials. |
kubernetesSandbox | value | Public export. |
KubernetesSandboxOptions | type | Public export. |
@fabric-harness/connectors/vercel
| Export | Kind | Summary |
|---|---|---|
vercelSandbox | value | Wrap a Vercel Sandbox instance as a Fabric Harness SandboxEnv. The sandbox's filesystem and shell exec are mapped to the fabric contract; cleanup: true calls sandbox.stop() when the Fabric session tears down. See the package declarations for an example. Vercel's runCommand accepts cwd, env, AbortSignal, and output streams. Fabric maps its millisecond timeout to an AbortSignal and resolves the command object's async stdout()/stderr() methods used by SDK 1.x. |
vercelSandboxFactory | value | Convenience factory that returns a SandboxFactory, suitable for init({ sandbox: vercelSandboxFactory(...) }). Provisions a fresh sandbox on first use via the supplied create() callback. |
VercelSandboxLike | type | Structural shape of @vercel/sandbox's Sandbox instance, kept narrow so this package doesn't peer-dep on @vercel/sandbox directly. Pass any object satisfying this contract — the real Sandbox from @vercel/sandbox does. See https://vercel.com/docs/vercel-sandbox/sdk-reference for the upstream API. This adapter targets the post-GA shape (runCommand, fs.*). |
VercelSandboxOptions | type | Public export. |
@fabric-harness/connectors/modal
| Export | Kind | Summary |
|---|---|---|
ModalFileInfoLike | type | Public export. |
ModalFilesystemLike | type | Public export. |
ModalProcessLike | type | Public export. |
ModalReadStreamLike | type | Public export. |
modalSdkSandbox | value | Adapt a native Modal TypeScript SDK Sandbox without exposing credentials to the Fabric runtime or model context. |
ModalSdkSandboxLike | type | Structural subset implemented by modal 0.9 Sandbox. |
ModalSdkSandboxOptions | type | Public export. |
@fabric-harness/connectors/sandbox-refs
| Export | Kind | Summary |
|---|---|---|
RegisterStandardDecodersOptions | type | Standard cross-process sandbox-ref decoders for the connectors that ship here. Call this once at startup in any process that needs to attach to sandboxes encoded by session.sandboxRef({ portable: true }). Each connect* callback is responsible for hydrating a provider-native client object from providerData; the connectors package wraps that client in a SandboxEnv exactly the way the upstream factory functions do (daytonaSandbox, e2bSandbox, modalSandbox, kubernetesSandbox). See the package declarations for an example. |
registerStandardSandboxRefDecoders | value | Public export. |
@fabric-harness/connectors/sandbox-certification
| Export | Kind | Summary |
|---|---|---|
assertSandboxCertification | value | Public export. |
certifySandboxAdapter | value | Exercise the portable Fabric sandbox contract and return secret-free, machine-readable evidence suitable for a CI artifact. |
SandboxCertificationCheck | type | Public export. |
SandboxCertificationCheckName | type | Public export. |
SandboxCertificationError | value | Public export. |
SandboxCertificationOptions | type | Public export. |
SandboxCertificationReport | type | Public export. |
@fabric-harness/databases
@fabric-harness/databases
| Export | Kind | Summary |
|---|---|---|
assertReadOnlyStatement | value | Public export. |
governedDatabaseTool | value | Common database tool boundary: effect metadata, timeout, size cap, and redacted failures. |
GovernedDatabaseToolOptions | type | Public export. |
MongoCollectionLike | type | Public export. |
MongoCursorLike | type | Public export. |
mongoFindTool | value | Collection-bound find tool. Host code constructs the filter and projection. |
MongoFindToolOptions | type | Public export. |
MysqlClientLike | type | Public export. |
mysqlTool | value | Public export. |
MysqlToolOptions | type | Public export. |
PostgresClientLike | type | Public export. |
postgresTool | value | Fixed-statement Postgres tool. The model supplies values, never SQL text. |
PostgresToolOptions | type | Public export. |
RedisClientLike | type | Public export. |
RedisToolOptions | type | Public export. |
redisTools | value | Public export. |
SqliteClientLike | type | Public export. |
SqliteStatementLike | type | Public export. |
sqliteTool | value | Public export. |
SqliteToolOptions | type | Public export. |
@fabric-harness/databases/postgres
| Export | Kind | Summary |
|---|---|---|
PostgresClientLike | type | Public export. |
postgresTool | value | Fixed-statement Postgres tool. The model supplies values, never SQL text. |
PostgresToolOptions | type | Public export. |
@fabric-harness/databases/mysql
| Export | Kind | Summary |
|---|---|---|
MysqlClientLike | type | Public export. |
mysqlTool | value | Public export. |
MysqlToolOptions | type | Public export. |
@fabric-harness/databases/sqlite
| Export | Kind | Summary |
|---|---|---|
SqliteClientLike | type | Public export. |
SqliteStatementLike | type | Public export. |
sqliteTool | value | Public export. |
SqliteToolOptions | type | Public export. |
@fabric-harness/databases/mongodb
| Export | Kind | Summary |
|---|---|---|
MongoCollectionLike | type | Public export. |
MongoCursorLike | type | Public export. |
mongoFindTool | value | Collection-bound find tool. Host code constructs the filter and projection. |
MongoFindToolOptions | type | Public export. |
@fabric-harness/databases/redis
| Export | Kind | Summary |
|---|---|---|
RedisClientLike | type | Public export. |
RedisToolOptions | type | Public export. |
redisTools | value | Public export. |
@fabric-harness/databricks
@fabric-harness/databricks
| Export | Kind | Summary |
|---|---|---|
AgentEvaluationRecord | type | Public export. |
appServicePrincipalFromEnv | value | The service principal a Databricks App runs as, from the standard app runtime environment (DATABRICKS_HOST / DATABRICKS_CLIENT_ID / DATABRICKS_CLIENT_SECRET). Returns undefined when any variable is missing, so callers can fall back to explicit configuration. |
buildMlflowTrace | value | Build the MLflow V3 POST /api/3.0/mlflow/traces payload for one settled submission. Pure and deterministic: trace/span ids derive from the submission id (+ span index) via SHA-256, so replaying the same settled submission produces byte-identical ids. The root span covers the whole submission; buffered TelemetrySpans become its children. |
ConsumptionGroupBy | type | Public export. |
ConsumptionSummary | type | Public export. |
ConsumptionSummaryOptions | type | Public export. |
createDatabricksClient | value | Public export. |
createDatabricksRagChain | value | Thin orchestration of Databricks-native Vector Search + Model Serving for the online RAG inference chain documented in the Databricks AI Cookbook. Prefer databricksRagChain from the package root when you have a databricks({ vectorSearch }) config — it wires the bundle for you. Does not implement offline chunking/indexing (use Databricks Jobs/Lakeflow). Does not replace Mosaic Agent Evaluation — export turns with rag-eval helpers. |
databricks | value | One-call wiring for a Databricks-native agent: model serving, a UC principal threaded through model + data + state, governed tools, an approval/egress policy, and (optionally) Lakebase-backed durable state. Also registers databricks/* model refs. Everything is layered on Unity Catalog — never a replacement for it. |
DATABRICKS_API_VERSIONS | value | Public export. |
DATABRICKS_AUTH_MODES | value | Public export. |
DATABRICKS_PACKAGE_COMPATIBILITY | value | Public export. |
databricksActualCostSource | value | Create a Databricks-backed ActualCostSource that queries system.billing.usage joined to system.billing.list_prices for real spend data. Results are cached per-scope-key for cacheTtlMs (default 60s) to avoid hammering the SQL warehouse. |
DatabricksActualCostSourceOptions | type | Public export. |
databricksAgent | value | Public export. |
DatabricksAgentOptions | type | Public export. |
databricksAiQueryTool | value | ai_query(endpoint, request) — run model inference inside the SQL warehouse against a serving endpoint. Drives both serving and SQL-warehouse consumption. Uses named SQL parameters, so the endpoint and request are never string-interpolated into SQL. |
DatabricksAiQueryToolOptions | type | Public export. |
databricksApp | value | Public export. |
DatabricksAppOptions | type | Production preset for agents hosted on Databricks Apps (v2, workstream C5). One call resolves the runtime from the standard app environment: the app's service principal (client-credentials OAuth), the workspace REST client and serving-endpoint model provider, Lakebase-backed persistence for sessions + submissions + conversation streams, and submission-keyed telemetry — all running as one governed identity that Unity Catalog enforces. See the package declarations for an example. |
DatabricksApprovalRuleOptions | type | Public export. |
databricksApprovalRules | value | Builds approval rules (one per gated tool) for CapabilityPolicy.toolPolicy.approvalRules. |
DatabricksAppRuntime | type | Public export. |
DatabricksAppUserAuthorizationInspection | type | Public export. |
DatabricksBundle | type | Public export. |
DatabricksBundleConfig | type | Public export. |
DatabricksCertificationCheck | type | Public export. |
DatabricksCertificationEvidence | type | Public export. |
DatabricksCertificationResult | type | Public export. |
DatabricksCertificationStatus | type | Public export. |
DatabricksClientOptions | type | Public export. |
DatabricksCloud | type | Public export. |
databricksCompatibilityRecord | value | Convert successful, fully identified certification evidence into a publishable matrix row. |
databricksConsumption | value | System-Tables consumption reporting. Reads system.billing.usage joined to list_prices to report real DBUs + list cost — the "prove the consumption" artifact for chargeback and partner credit. |
DatabricksConsumption | type | Public export. |
DatabricksConsumptionOptions | type | Public export. |
databricksConsumptionTool | value | Agent-callable consumption report over the last days (default 30) or an explicit date window. |
DatabricksConsumptionToolOptions | type | Public export. |
DatabricksCostReconciliationOptions | type | Public export. |
DatabricksCostReconciliationResult | type | Public export. |
databricksEmbeddings | value | Embeddings via a Mosaic AI serving embedding endpoint. Databricks exposes the OpenAI-compatible embeddings surface at <host>/serving-endpoints/embeddings with the endpoint name as model. Reuses the bundle's REST client, so it inherits the rotating UC-principal token. (URL/response schema worth a smoke test against a live embedding endpoint — chat and embeddings share the OpenAI-compatible convention but endpoint families can differ.) |
DatabricksEmbeddingsOptions | type | Public export. |
databricksFeatureLookupTool | value | Low-latency feature lookup from a Databricks Feature Serving endpoint (backed by an Online Table). The model passes primary-key records; the endpoint returns the served feature values. Drives serving consumption and keeps features governed by Unity Catalog under the bundle principal. |
DatabricksFeatureLookupToolOptions | type | Public export. |
databricksFoundationModelProvider | value | Databricks inference provider supporting both Unity AI Gateway model services and custom Model Serving endpoints. In auto mode, fully-qualified system.ai.* models use AI Gateway and other endpoint names retain the /serving-endpoints route. |
databricksGenieTool | value | AI/BI Genie — delegate a natural-language analytics question to a governed Genie space. Genie generates and runs SQL on the warehouse and returns an answer; this tool returns the answer text, the generated SQL, and the result rows. Pass conversationId to continue a multi-turn thread. Genie response field names vary by API version — parsed defensively; smoke-test against a live space. |
DatabricksGenieToolOptions | type | Public export. |
DatabricksGovernanceOptions | type | Public export. |
databricksGovernancePolicy | value | Assembles a CapabilityPolicy for a Databricks tool set: approval routing for sensitive operations (if stewardAudience is set) plus an egress allowlist pinned to the workspace host(s). Used by the databricks() bundle; can also be merged into an agent's own policy. |
DatabricksGovernancePolicyOptions | type | Public export. |
databricksIdentity | value | Builds a cached, auto-refreshing token provider for a Databricks principal. |
DatabricksInferenceMode | type | Public export. |
databricksJobs | value | Public export. |
DatabricksJobs | value | Public export. |
DatabricksJobsWaitOptions | type | Public export. |
databricksLakeflowTools | value | The default Lakeflow tool set added by the bundle's lakeflow option. |
DatabricksLineageEvidenceRow | type | Public export. |
DatabricksLineageRecord | type | Governance for Databricks tools is layered on top of Unity Catalog, never a replacement. UC enforces table/row/column ACLs natively via the acting principal (see identity.ts). These helpers add the things UC doesn't: an audit/lineage stamp on every tool call, approval routing for sensitive operations, and an egress allowlist pinned to the workspace — all expressed through the SDK's existing CapabilityPolicy, so the loop enforces them without a bespoke engine. |
databricksMlflowLogMetricTool | value | Public export. |
databricksMlflowLogParamTool | value | Public export. |
databricksModelBaseUrl | value | Build the OpenAI-compatible base URL used for one Databricks inference mode. |
DatabricksModelOptions | type | Public export. |
DatabricksModelService | type | Public export. |
DatabricksModelServiceDiscoveryOptions | type | Public export. |
databricksNotebookTool | value | Public export. |
databricksPersistence | value | One-call Lakebase persistence for Databricks-hosted agents. See the package declarations for an example. The Postgres store implementations come from @fabric-harness/node (optional peer) and run unchanged against Lakebase — the only Databricks specifics are database-credential exchange, refresh caching, and TLS defaults from lakebaseClient. |
DatabricksPersistence | type | Everything the v2 runtime persists, on Lakebase, in one adapter: sessions (canonical conversation state), durable agent submissions (admission/FIFO/leases/settlement), and offset-addressable conversation streams. Implements the SDK PersistenceAdapter contract, so it plugs straight into init({ persistence }); the extra connect* methods feed startDevServer({ submissionStore, conversationStreamStore }). |
DatabricksPersistenceOptions | type | Public export. |
DatabricksPersistenceStoreModule | type | The slice of @fabric-harness/node this adapter assembles. Loaded dynamically (node is an optional peer — Databricks Apps always run on Node, but this package stays importable without it); injectable for tests. |
databricksPipelineListTool | value | Lakeflow Declarative Pipelines (formerly DLT). These drive heavy continuous-compute consumption. start/stop mutate pipeline state (effect: 'execute', governable); list/status are reads. |
databricksPipelineStartTool | value | Public export. |
databricksPipelineStatusTool | value | Public export. |
databricksPipelineStopTool | value | Public export. |
DatabricksPrincipal | type | Public export. |
DatabricksPrincipalEnvOptions | type | Public export. |
databricksPrincipalFromEnv | value | Resolve a PAT or OAuth M2M principal consistently across CLIs, recipes, Apps, and tests. |
databricksRagChain | value | Cookbook-style online RAG chain over native Mosaic Vector Search + Model Serving. See the package declarations for an example. |
DatabricksRagChain | type | Public export. |
DatabricksRagChainOptions | type | Public export. |
DatabricksRagChainResolvedOptions | type | Inputs once a bundle (or explicit retriever + model) is resolved. |
DatabricksRequestOptions | type | Public export. |
DatabricksRequestTags | type | Public export. |
DatabricksRestClient | value | Public export. |
databricksRunJobTool | value | Public export. |
DatabricksRunLifeCycleState | type | Public export. |
DatabricksRunOutput | type | Public export. |
DatabricksRunReceipt | type | Public export. |
DatabricksRunResultState | type | Public export. |
DatabricksRunState | type | Public export. |
DatabricksRunTimeoutError | value | Public export. |
databricksSecretsProvider | value | Databricks Secret Management adapter. Secret values are decoded only at runtime. |
DatabricksSecretsProviderOptions | type | Public export. |
databricksSqlTool | value | Public export. |
DatabricksSqlToolOptions | type | Public export. |
databricksTableInfoTool | value | Public export. |
databricksTelemetry | value | Public export. |
DatabricksTelemetry | type | Public export. |
DatabricksTelemetryOptions | type | Cost + lineage as core telemetry (v2, workstream C4): submission lifecycle events and governed tool-call lineage land in Lakebase tables keyed by the same submissionId that drives events, settlement, and audit — so spend, lineage, and outcomes join on one stable key. Writes are fire-and-forget: a telemetry failure must never affect execution. |
databricksTenantCostLimit | value | Public export. |
DatabricksTokenProvider | type | A bearer-token resolver awaited per request. Shape matches what DatabricksRestClient, databricksFoundationModelProvider (via tokenProvider), and the Lakebase store accept, so a single principal threads through model calls, data calls, and state. |
databricksVectorSearch | value | Databricks Mosaic AI Vector Search as a Retriever. Runs under the bundle's UC principal. |
DatabricksVectorSearchOptions | type | Public export. |
DatabricksWaitOptions | type | Public export. |
DatabricksWorkspaceCompatibilityRecord | type | Public export. |
databricksWorkspaceOrigin | value | Normalize a workspace hostname or URL to its HTTPS origin. |
databricksWorkspaceSource | value | Public export. |
DatabricksWorkspaceSourceOptions | type | Public export. |
defineDatabricksAgent | value | Public export. |
DefineDatabricksAgentOptions | type | Public export. |
ensureDatabricksAiGateway | value | Verify that Unity AI Gateway v2 is enabled. A successful empty listing still means the service is available; model-service discovery reports whether usable models exist. |
ensureDatabricksTelemetryTables | value | Create the telemetry tables when absent. Idempotent. |
exportAgentEvaluationJsonl | value | Serialize evaluation records as JSONL for MLflow / Agent Evaluation import. |
exportMlflow3EvaluationJsonl | value | Serialize structured MLflow 3 evaluation rows as newline-delimited JSON. |
fabricPrincipalFor | value | Map a Databricks principal onto the SDK's FabricPrincipal so the governed identity rides submissions → tool calls → lineage/cost records. Never carries a token — ids and labels only. |
FabricPrincipalOverrides | type | Public export. |
inferenceTableUsageQuery | value | SQL aggregating a serving endpoint's inference/payload table by client_request_id — one row per submission with the request count and the first/last request timestamps — for offline joins against fh_submission_telemetry.submission_id. Join contract: callers MUST send the submission id as the serving request's client_request_id (e.g. the client_request_id field on the serving-endpoint invocation) — the inference table records it verbatim, and this query's submission_id column only joins when that convention holds. Rows without a client_request_id (traffic from other callers) are... |
InferenceTableUsageQueryOptions | type | Public export. |
inspectDatabricksAppUserAuthorization | value | Validate a Databricks Apps forwarded user token and return non-secret identity/lifetime metadata suitable for OBO lifecycle certification. The access token is never returned or included in an error. |
isDatabricksModelService | value | True for Unity Catalog model-service identifiers accepted by Unity AI Gateway. |
lakebaseClient | value | Public export. |
LakebaseClient | type | Public export. |
LakebaseClientOptions | type | Public export. |
lakebaseCredentialProvider | value | Exchange a workspace OAuth token for a Lakebase database credential. The result is cached, refreshed early with jitter, and refreshes are single-flight. |
LakebaseCredentialProviderOptions | type | Public export. |
LakebasePoolConfig | type | Public export. |
LakebasePoolFactory | type | Public export. |
LegacyAgentEvaluationRecord | type | One row in the shape commonly used with Databricks / MLflow GenAI evaluation tables (request / response / retrieved_context). This is an export for Mosaic Agent Evaluation and notebooks — not a reimplementation of judges. |
listDatabricksModelServices | value | List fully-qualified Unity Catalog model services with bounded, loop-safe pagination. |
Mlflow3RagEvaluationRecord | type | MLflow 3 evaluation-dataset row with structured inputs, outputs, and expectations. |
mlflowTraceExporter | value | Public export. |
MlflowTraceExporter | type | Public export. |
MlflowTraceExporterOptions | type | MLflow trace export (v2 migration, workstream C6): one MLflow trace per settled submission, so agent activity shows up in the workspace's MLflow experiment UI next to models and evaluations. Wiring: sink goes into createSubmissionRunner({ telemetry }) and onEvent fans in with the app's onEvent callback. A submission_started telemetry event opens a span buffer keyed by the store session id (agent:<agent>:<instanceId>:<session> — the sessionId stamped on FabricEvents during the attempt); every event that matches an open buffer and converts via the S... |
MlflowTraceInput | type | Public export. |
MlflowTracePayload | type | Public export. |
MockDatabricksModelProvider | value | A deterministic ModelProvider for Databricks agent tests and init templates. Returns structured responses for SQL/table-info tool calls without requiring real Databricks credentials. |
MockDatabricksModelProviderOptions | type | Public export. |
onBehalfOfFromHeaders | value | On-behalf-of principal from Databricks Apps user-authorization headers: the platform forwards the signed-in user's access token as x-forwarded-access-token (plus x-forwarded-email/x-forwarded-user). Returns undefined when the request carries no user token (e.g. app service-to-service traffic) so callers fall back to the app principal. |
queryDatabricksLineageEvidence | value | Join governed object access to the submission actor, outcome, and model/tool cost. |
RagChainPostProcessOptions | type | Public export. |
RagChainPromptOptions | type | Public export. |
RagEvalExpected | type | Public export. |
RagPreprocess | type | Public export. |
RagTurn | type | Structured result of one online RAG inference turn. Mirrors the Databricks AI Cookbook chain: preprocess → retrieve (Vector Search) → prompt augment → generate → post-process. Fabric does not reimplement Vector Search or Model Serving — this is a thin orchestration over native Databricks APIs already exposed by this package. |
ragTurnCitationsScorer | value | Public export. |
ragTurnContainsScorer | value | Adapter for @fabric-harness/evals scorers when the suite output is a RagTurn. Keep heavy quality judges in Databricks Agent Evaluation; use these for CI smoke. |
RagTurnScore | type | Public export. |
reconcileDatabricksCost | value | Compare immediate estimates with delayed System Tables actuals and apply an explicit outage policy. |
registerDatabricksModelProvider | value | Register databricks/<model> model references. |
resolveToolRefs | value | Public export. |
runDatabricksCertification | value | Run live capability checks and produce stable, secret-redacted CI evidence. |
RunDatabricksCertificationOptions | type | Public export. |
RunDatabricksJobInput | type | Public export. |
scoreRagTurn | value | Lightweight local checks before/alongside Databricks Agent Evaluation. |
servingUsageCapture | value | Build an onEvent fan-in that turns model-usage events into submission_usage telemetry. For every FabricEvent carrying data.usage ({ inputTokens?, outputTokens?, costUsd? }, at least one numeric field) — and optionally data.model — while an ambient currentSubmissionContext is set, it emits one submission_usage event stamped with the submission correlation (submission/attempt ids, agent identity, tenant, actor). Events observed outside a submission context are dropped silently — not every session turn belongs to a submission. The submission context does not carry the... |
ServingUsageCaptureOptions | type | Serving usage capture (v2 migration, workstream C7): attribute model/serving spend to submissions through the ambient submission context. |
SubmitDatabricksNotebookInput | type | Public export. |
toAgentEvaluationRecord | value | Convert a RagTurn into a Databricks-friendly evaluation record. Upload JSONL of these rows to MLflow / Agent Evaluation rather than building a parallel judge stack in Fabric. |
toMlflow3EvaluationRecord | value | Convert a RAG turn into the structured MLflow 3 evaluation-dataset shape. |
UcVolumesAttachmentStore | value | Public export. |
UcVolumesAttachmentStoreOptions | type | Unity Catalog Volumes attachment backend (v2 migration, workstream C2). Implements the SDK AttachmentStore contract on a UC Volume via the Databricks Files API, so attachment bytes are governed by Unity Catalog grants like every other Databricks asset. Layout under the volume: See the package declarations for an example. The bare <digest> file holds the raw bytes; the <digest>.json sidecar holds the AttachmentRef metadata and doubles as the record's existence marker: put is first-write-wins per (scope, digest) — when the sidecar already exists the put is a no-op, so... |
unityCatalogTablesTool | value | Public export. |
waitForDatabricksRun | value | Public export. |
waitForDatabricksStatement | value | Public export. |
withGovernance | value | Wraps one Databricks tool to stamp lineage/audit and enforce the optional catalog allowlist. |
withGovernanceTools | value | Wraps a set of Databricks tools with withGovernance. |
@fabric-harness/databricks/agent
| Export | Kind | Summary |
|---|---|---|
databricksAgent | value | Public export. |
DatabricksAgentOptions | type | Public export. |
defineDatabricksAgent | value | Public export. |
DefineDatabricksAgentOptions | type | Public export. |
resolveToolRefs | value | Public export. |
@fabric-harness/databricks/sql-sandbox
| Export | Kind | Summary |
|---|---|---|
databricksSqlSandbox | value | Public export. |
DatabricksSqlSandboxOptions | type | Sandbox backend that maps exec(command) to a Databricks SQL Statement Execution API call against a SQL Warehouse. Useful for data agents whose "shell" is a query interface. Behavior: - exec(sql) runs the SQL synchronously (with a timeout) and returns the serialized result set as stdout (newline-delimited JSON rows by default, or CSV when resultFormat: 'csv'). - File operations are intentionally minimal: the sandbox-virtual filesystem keeps a small in-memory map. SQL warehouses are not file servers; mount actual data via databricksVolumeSource from @fabric-harness/connectors. Usa... |
@fabric-harness/node
@fabric-harness/node
| Export | Kind | Summary |
|---|---|---|
AgentDescription | type | Public export. |
AgentModule | type | Public export. |
AgentNotFoundError | value | Public export. |
AgentSummary | type | Public export. |
applyEnvModelProvider | value | Public export. |
ApprovalSummary | type | Public export. |
asJsonObject | value | Public export. |
assertDataResidency | value | Public export. |
BackupObjectStore | type | Public export. |
backupPostgresPersistence | value | Create a transactionally consistent logical backup and write it to object storage. |
BuildBundleStrategy | type | Public export. |
BuildManifest | type | Public export. |
BuildManifestAgent | type | Public export. |
BuildManifestFile | type | Public export. |
BuildManifestRole | type | Public export. |
BuildManifestSkill | type | Public export. |
BuildSummary | type | Public export. |
BuildTarget | type | Public export. |
buildWorkspace | value | Public export. |
BuildWorkspaceOptions | type | Public export. |
BuildWorkspaceResult | type | Public export. |
cancelSessionTask | value | Public export. |
cancelTaskInStore | value | Public export. |
CheckpointSummary | type | Public export. |
compactPersistedSession | value | Public export. |
CompactPersistedSessionOptions | type | Public export. |
compactSessionInStore | value | Public export. |
createConfiguredSessionStore | value | Public export. |
CreateConfiguredSessionStoreOptions | type | Public export. |
createFabricRunContext | value | Public export. |
CreateFabricRunContextOptions | type | Public export. |
createMcpHttpServer | value | Expose governed Harness tools through stateless MCP Streamable HTTP. |
createPersistentDispatchProcessor | value | Build a DispatchProcessor that applies dispatched inputs to a persistent instance session. Idempotent by dispatchId: a marker entry is appended to the instance session after a dispatch is applied, and re-delivery of the same dispatchId is skipped. The marker lives in the shared session store, so dedup holds across separate processings (and survives restart when the store is durable). |
createPersistentSubmissionExecutor | value | The SubmissionExecutor that applies durable submissions to persistent instance sessions. execute runs a real session turn (session.prompt is idempotent by submission id, so a recovered attempt resumes instead of double-applying its input); everything else operates store-level so reconciliation never needs a live agent. |
createPrivateNetworkFetch | value | Create an outbound Node client with one policy and transport trust path. Credentials and PEM material remain in the dispatcher and are never placed in request URLs, Fabric events, or model messages. |
currentMcpRequestContext | value | Public export. |
databricksAppsOidcAuthenticator | value | Databricks workspace OIDC preset for Apps ingress and workspace-scoped RBAC claims. |
DatabricksAppsOidcAuthenticatorOptions | type | Public export. |
daytona | value | One-call wiring for a Daytona-native agent: resolves the model provider from config or env, includes Daytona-specific workspace tools, and sets a safe default egress policy. |
daytonaAgent | value | Public export. |
DaytonaAgentOptions | type | Public export. |
DaytonaBundle | type | Public export. |
DaytonaBundleConfig | type | Public export. |
defineApplication | value | Identity helper that preserves route/middleware inference in workspace config. |
defineDaytonaAgent | value | Public export. |
DefineDaytonaAgentOptions | type | Public export. |
defineDockerAgent | value | Public export. |
DefineDockerAgentOptions | type | Public export. |
defineE2bAgent | value | Public export. |
DefineE2bAgentOptions | type | Public export. |
defineK8sAgent | value | Public export. |
DefineK8sAgentOptions | type | Public export. |
defineModalAgent | value | Public export. |
DefineModalAgentOptions | type | Public export. |
defineNodeAgent | value | Public export. |
DefineNodeAgentOptions | type | Public export. |
DeletionEvidenceSigner | type | Public export. |
DeletionEvidenceStore | type | Public export. |
describeAgentFile | value | Public export. |
DevServerHandle | type | Public export. |
DevServerOptions | type | Public export. |
discoverWorkspace | value | Public export. |
docker | value | One-call wiring for a Docker-native agent: resolves the model provider from config or env, includes Docker-specific container tools, and sets a safe default egress policy. |
dockerAgent | value | Public export. |
DockerAgentOptions | type | Public export. |
DockerBundle | type | Public export. |
DockerBundleConfig | type | Public export. |
e2b | value | One-call wiring for an E2B-native agent: resolves the model provider from config or env, includes built-in tools, and sets a safe default egress policy. |
e2bAgent | value | Public export. |
E2bAgentOptions | type | Public export. |
E2bBundle | type | Public export. |
E2bBundleConfig | type | Public export. |
ed25519DeletionEvidenceSigner | value | Public export. |
enforcePersistenceRetention | value | Enforce durable data retention. Use a deletion-evidence-wrapped bundle for signed session receipts. |
ensurePostgresAttachmentTables | value | Create the attachments table when absent. Idempotent. |
ensurePostgresConversationStreamTables | value | Create the conversation stream tables when absent. Idempotent. |
ensurePostgresSubmissionTables | value | Create the submission tables and indexes when absent. Idempotent. |
ensureSqliteAttachmentTables | value | Create the attachments table when absent. Idempotent. |
ensureSqliteConversationStreamTables | value | Create the conversation stream tables when absent. Idempotent. |
ensureSqliteSubmissionTables | value | Create the submission tables and indexes when absent. Idempotent. |
entraIdAuthenticator | value | Microsoft Entra ID v2 preset with tenant, roles, groups, and app/user identity mapping. |
EntraIdAuthenticatorOptions | type | Public export. |
ExternalRetentionTarget | type | Public export. |
FabricApplication | type | Public export. |
FabricApplicationMiddleware | type | Public export. |
FabricApplicationNext | type | Public export. |
FabricApplicationPublicMiddleware | type | Public export. |
FabricApplicationPublicRequestContext | type | Public export. |
FabricApplicationRequestContext | type | Public export. |
FabricApplicationRoute | type | Public export. |
FabricApplicationStores | type | Public export. |
FabricBuildContext | type | Public export. |
FabricBuildError | value | Public export. |
FabricBuildErrorCode | type | Public export. |
FabricBuildPlugin | type | Public export. |
FabricHarnessConfig | type | Public export. |
FabricHarnessDatabricksConfig | type | Public export. |
FabricHarnessDatabricksServingConfig | type | Public export. |
FabricHarnessEnvironmentConfig | type | Public export. |
FabricHarnessPersistenceConfig | type | Public export. |
FabricHarnessSandboxConfig | type | Public export. |
FabricHarnessStoreConfig | type | Public export. |
FabricHarnessTemporalConfig | type | Public export. |
FabricMcpHttpServer | type | Public export. |
FabricMcpRequestContext | type | Public export. |
FabricPersistence | type | Public export. |
FabricPersistenceError | value | Public export. |
FabricPersistenceErrorCode | type | Public export. |
FabricPersistenceHealth | type | Public export. |
fabricPostgresMigrations | value | Public export. |
FabricRetentionPolicy | type | Public export. |
FileAttachmentStore | value | Public export. |
FileAttachmentStoreOptions | type | Public export. |
FileConversationStreamStore | value | Public export. |
FileConversationStreamStoreOptions | type | Public export. |
FileSessionStore | value | Public export. |
FileSessionStoreOptions | type | Public export. |
findWorkspaceRoot | value | Public export. |
forkSessionAtStep | value | Forks a session at the given step into a new session in the same store. The new session contains the active-path entries up to and including stepId, and its leafId is set to stepId. Used by fh replay --rerun. If a user_prompt entry exists immediately after the cut on the original active path, its text is returned as resumePromptText so the caller can resubmit it against the forked session. |
ForkSessionAtStepResult | type | Public export. |
getMetricsFromStore | value | Public export. |
getRequiredAgentDefinition | value | Public export. |
getSessionApprovalState | value | Public export. |
getSessionArtifact | value | Public export. |
getSessionMetrics | value | Public export. |
getSessionTask | value | Public export. |
getSessionTimeline | value | Public export. |
getTaskFromStore | value | Public export. |
hmacDeletionEvidenceSigner | value | Public export. |
httpBackupObjectStore | value | HTTP PUT/GET object store for presigned S3/R2, Azure Blob SAS, or an internal object gateway. |
HttpRateLimitClass | type | Public export. |
HttpRateLimitConfig | type | Public export. |
HttpRateLimitContext | type | Public export. |
HttpRateLimitDecision | type | Public export. |
HttpRateLimiter | type | Public export. |
HttpRateLimitRule | type | Public export. |
inspectReplay | value | Public export. |
inspectReplayFromStore | value | Public export. |
inspectSession | value | Public export. |
inspectSessionFromStore | value | Public export. |
isDefinedAgent | value | Public export. |
isPersistentAgent | value | Public export. |
JobScheduler | type | Public export. |
JobSchedulerOptions | type | Public export. |
k8s | value | One-call wiring for a Kubernetes-native agent: resolves the model provider from config or env, includes K8s-specific kubectl tools, and sets a safe default egress policy. |
k8sAgent | value | Public export. |
K8sAgentOptions | type | Public export. |
K8sBundle | type | Public export. |
K8sBundleConfig | type | Public export. |
libsqlPersistence | value | Full local libSQL or remote Turso bundle using optimistic version fencing. |
LibSqlPersistenceClient | type | Public export. |
LibSqlPersistenceOptions | type | Public export. |
LibSqlResultSet | type | Public export. |
listAgentFiles | value | Public export. |
listAgentSummaries | value | Public export. |
listApprovalsFromStore | value | Public export. |
listApprovalStatesFromStore | value | Public export. |
listBuilds | value | Public export. |
listCheckpointsFromStore | value | Public export. |
listSessionApprovals | value | Public export. |
listSessionApprovalStates | value | Public export. |
listSessionArtifacts | value | Public export. |
listSessionCheckpoints | value | Public export. |
listSessions | value | Public export. |
listSessionSummariesFromStore | value | Public export. |
listSessionTasks | value | Public export. |
listTasksFromStore | value | Public export. |
loadAgentModule | value | Public export. |
LoadAgentModuleOptions | type | Public export. |
loadFabricHarnessConfig | value | Public export. |
LoadFabricHarnessConfigOptions | type | Public export. |
loadRoles | value | Public export. |
loadSkills | value | Public export. |
mapOidcPrincipal | value | Public export. |
memoryDeletionEvidenceStore | value | Public export. |
memoryPersistence | value | Infrastructure-free unified bundle for tests and lightweight applications. |
memorySchedulerLeaseStore | value | Public export. |
migratePostgresPersistence | value | Public export. |
MockDaytonaModelProvider | value | A deterministic ModelProvider for Daytona agent tests and init templates. Returns structured responses without requiring real API credentials. |
MockDaytonaModelProviderOptions | type | Public export. |
MockDockerModelProvider | value | A deterministic ModelProvider for Docker agent tests and init templates. Returns structured responses without requiring real API credentials. |
MockDockerModelProviderOptions | type | Public export. |
MockE2bModelProvider | value | A deterministic ModelProvider for E2B agent tests and init templates. Returns structured responses without requiring real API credentials. |
MockE2bModelProviderOptions | type | Public export. |
MockK8sModelProvider | value | A deterministic ModelProvider for Kubernetes agent tests and init templates. Returns structured responses without requiring real API credentials. |
MockK8sModelProviderOptions | type | Public export. |
MockModalModelProvider | value | A deterministic ModelProvider for Modal agent tests and init templates. Returns structured responses without requiring real API credentials. |
MockModalModelProviderOptions | type | Public export. |
MockNodeModelProvider | value | A deterministic ModelProvider for Node agent tests and init templates. Returns structured responses without requiring real API credentials. |
MockNodeModelProviderOptions | type | Public export. |
modal | value | One-call wiring for a Modal-native agent: resolves the model provider from config or env, includes built-in tools, and sets a safe default egress policy. |
modalAgent | value | Public export. |
ModalAgentOptions | type | Public export. |
ModalBundle | type | Public export. |
ModalBundleConfig | type | Public export. |
mongodbPersistence | value | Full bundle over a MongoDB collection using _id + version compare-and-swap. |
MongoPersistenceClient | type | Public export. |
MongoPersistenceCollection | type | Public export. |
MongoPersistenceOptions | type | Public export. |
mysqlPersistence | value | Full bundle over a MySQL 8 compatible database using version-fenced snapshot rows. |
MySqlPersistenceClient | type | Public export. |
MySqlPersistenceOptions | type | Public export. |
nextScheduledAt | value | Public export. |
node | value | One-call wiring for a Node-native agent: resolves the model provider from config or env, includes built-in file/shell tools, and sets a safe default egress policy. |
nodeAgent | value | Public export. |
NodeAgentOptions | type | Public export. |
NodeBundle | type | Public export. |
NodeBundleConfig | type | Public export. |
OidcClaimMapping | type | Public export. |
oidcJwtAuthenticator | value | Validate Bearer JWTs with a local or remote JWKS and map claims into server RBAC. |
OidcJwtAuthenticatorOptions | type | Public export. |
OidcPrincipalContext | type | Public export. |
parseCookie | value | Parse the Cookie header on an IncomingMessage and return a named cookie's value, or undefined when missing. Use inside a custom extractAuthToken to validate session cookies set by your existing identity layer. |
parseFrontmatter | value | Public export. |
pathExists | value | Public export. |
PersistedCompactionResult | type | Public export. |
PersistentDispatchProcessorOptions | type | Public export. |
PersistentPromptOptions | type | Public export. |
PersistentPromptResult | type | Public export. |
PersistentSessionBusyError | value | Public export. |
PersistentSubmissionExecutorOptions | type | Public export. |
PostgresAttachmentStore | value | Public export. |
PostgresAttachmentStoreOptions | type | Public export. |
PostgresBackupRecord | type | Public export. |
PostgresClientLike | type | Public export. |
PostgresConversationStreamStore | value | Public export. |
PostgresConversationStreamStoreOptions | type | Public export. |
postgresCostBudgetStore | value | Postgres-backed cost budget store. Pair with init({ costLimit: { perScope, scopeKey, store } }) to enforce a budget that survives process restarts — per-tenant, per-day, per-organization caps, etc. The table holds one row per scope key: (scope TEXT PRIMARY KEY, total_usd NUMERIC, updated_at TIMESTAMPTZ). Increments use ON CONFLICT UPDATE for atomic compare-and-set semantics. |
PostgresCostBudgetStoreOptions | type | Public export. |
postgresDeletionEvidenceStore | value | Public export. |
PostgresMigration | type | Public export. |
PostgresMigrationResult | type | Public export. |
postgresPersistence | value | One Postgres/Lakebase bundle for every durable Node server store. |
PostgresPersistenceOptions | type | Public export. |
PostgresRestoreResult | type | Public export. |
postgresSandboxOwnershipLeaseStore | value | Atomic, expiry-aware ownership leases for portable sandboxes. |
postgresSchedulerLeaseStore | value | Postgres-backed scheduler leases for horizontally scaled Node deployments. |
postgresSessionMemory | value | Postgres-backed SessionMemory. Persistent across process restarts; scoped by tenantId. Pair with init({ memory }) to share recall across a fleet of agents. Schema: CREATE TABLE fabric_harness_session_memory ( tenant_id TEXT NOT NULL DEFAULT '', key TEXT NOT NULL, value JSONB NOT NULL, metadata JSONB, expires_at TIMESTAMPTZ, updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), PRIMARY KEY (tenant_id, key) ); Set/Get scrub expired rows lazily on access. Run a scheduled DELETE WHERE expires_at < NOW() if you have many TTL'd entries. |
PostgresSessionMemoryOptions | type | Public export. |
PostgresSessionStore | value | Public export. |
PostgresSessionStoreOptions | type | Public export. |
PostgresSubmissionStore | value | Public export. |
PostgresSubmissionStoreOptions | type | Public export. |
principalHasPermission | value | Public export. |
principalToActor | value | Public export. |
principalToApprovalActor | value | Public export. |
PrivateNetworkFetchClient | type | Public export. |
PrivateNetworkFetchOptions | type | Public export. |
PrivateNetworkProxyOptions | type | Public export. |
PrivateNetworkTlsOptions | type | Public export. |
readBuildManifest | value | Public export. |
redisApprovalNotificationStore | value | Distributed dedupe state for approvalNotificationHandler(). |
RedisApprovalNotificationStoreOptions | type | Public export. |
RedisClientLike | type | Cross-process token-bucket rate limiter backed by Redis. Pair with OpenAICompatibleModelProvider / AnthropicModelProvider to enforce a shared API-key quota across a fleet of containers. RedisClientLike only requires an eval method — both ioredis and @upstash/redis ship a compatible signature. fabric-harness does NOT depend on either; users pass their own client. |
redisHttpRateLimiter | value | Creates an atomic, cross-process HTTP limiter for startDevServer. The caller supplies its Redis client so the Node package has no Redis SDK dependency. |
RedisHttpRateLimiterOptions | type | Public export. |
redisPersistence | value | Redis/Valkey bundle with cluster-safe keys, binary attachments, and optional retention TTL. |
RedisPersistenceClient | type | Public export. |
RedisPersistenceOptions | type | Public export. |
redisRateLimiter | value | Public export. |
RedisRateLimiterOptions | type | Public export. |
renderOperatorConsole | value | Public export. |
ReplayInspection | type | Public export. |
resolveAgentPath | value | Public export. |
resolveApprovalInStore | value | Public export. |
resolveConfigPath | value | Public export. |
resolveDaytonaToolRefs | value | Public export. |
resolveDockerToolRefs | value | Public export. |
resolveE2bToolRefs | value | Public export. |
resolveK8sToolRefs | value | Public export. |
resolveModalToolRefs | value | Public export. |
resolvePrincipalTenant | value | Public export. |
resolveServerPermission | value | Public export. |
resolveSessionApproval | value | Public export. |
resolveSseKeepaliveMs | value | Resolve the SSE keepalive interval from the environment. Returns the parsed FABRIC_HARNESS_SSE_KEEPALIVE_MS value, or the 15000ms default. Negative or unparseable values fall back to the default. Returns 0 when explicitly set to 0, disabling keepalive. |
resolveToolRefs | value | Public export. |
restorePostgresPersistence | value | Verify and restore a logical backup under an exclusive advisory lock and transaction. |
RetentionResult | type | Public export. |
RetentionRule | type | Public export. |
runAgent | value | Public export. |
RunAgentOptions | type | Public export. |
RunAgentResult | type | Public export. |
runPersistentPrompt | value | Public export. |
runPostgresRecoveryDrill | value | Public export. |
SandboxOwnershipPostgresClient | type | Public export. |
SchedulerLeaseStore | type | Public export. |
SchedulerPostgresClient | type | Public export. |
ServerAuthorizationContext | type | Public export. |
ServerPermission | type | Public export. |
ServerPrincipal | type | Public export. |
SessionMetrics | type | Public export. |
sessionRunStore | value | Public export. |
SessionSummary | type | Public export. |
SessionTimeline | type | Public export. |
SqliteAttachmentStore | value | Public export. |
SqliteAttachmentStoreOptions | type | Public export. |
SqliteConversationStreamStore | value | Public export. |
SqliteConversationStreamStoreOptions | type | Public export. |
SqliteCostBudgetStore | value | Atomic cross-process cost totals for a single-node SQLite deployment. |
SqliteCostBudgetStoreOptions | type | Public export. |
SqliteDatabaseLike | type | The slice of node:sqlite's DatabaseSync this store uses. |
sqlitePersistence | value | Unified durable bundle for local and single-node deployments. |
SqlitePersistenceOptions | type | Public export. |
SQLiteSessionStore | value | Public export. |
SQLiteSessionStoreOptions | type | Public export. |
SqliteSubmissionStore | value | Public export. |
SqliteSubmissionStoreOptions | type | Public export. |
SSE_KEEPALIVE_DEFAULT_MS | value | Public export. |
startDevServer | value | Public export. |
startJobScheduler | value | Start an in-process cron scheduler for finite job triggers.schedule values. |
TaskStatus | type | Public export. |
TaskSummary | type | Public export. |
TimelineItem | type | Public export. |
transpileAgent | value | Public export. |
TranspileAgentOptions | type | Public export. |
vaultSecretProvider | value | HashiCorp Vault KV v2 provider. Vault tokens remain in the adapter closure. |
VaultSecretProviderOptions | type | Public export. |
verifyAttestation | value | Public export. |
verifyProvenance | value | Public export. |
withDeletionEvidence | value | Add signed, append-only deletion evidence to any persistence bundle. |
withPostgresConnection | value | Public export. |
WorkspaceInfo | type | Public export. |
@fabric-harness/node/agent
| Export | Kind | Summary |
|---|---|---|
defineNodeAgent | value | Public export. |
DefineNodeAgentOptions | type | Public export. |
node | value | One-call wiring for a Node-native agent: resolves the model provider from config or env, includes built-in file/shell tools, and sets a safe default egress policy. |
nodeAgent | value | Public export. |
NodeAgentOptions | type | Public export. |
NodeBundle | type | Public export. |
NodeBundleConfig | type | Public export. |
resolveToolRefs | value | Public export. |
@fabric-harness/node/docker-agent
| Export | Kind | Summary |
|---|---|---|
defineDockerAgent | value | Public export. |
DefineDockerAgentOptions | type | Public export. |
docker | value | One-call wiring for a Docker-native agent: resolves the model provider from config or env, includes Docker-specific container tools, and sets a safe default egress policy. |
dockerAgent | value | Public export. |
DockerAgentOptions | type | Public export. |
DockerBundle | type | Public export. |
DockerBundleConfig | type | Public export. |
resolveDockerToolRefs | value | Public export. |
@fabric-harness/node/k8s-agent
| Export | Kind | Summary |
|---|---|---|
defineK8sAgent | value | Public export. |
DefineK8sAgentOptions | type | Public export. |
k8s | value | One-call wiring for a Kubernetes-native agent: resolves the model provider from config or env, includes K8s-specific kubectl tools, and sets a safe default egress policy. |
k8sAgent | value | Public export. |
K8sAgentOptions | type | Public export. |
K8sBundle | type | Public export. |
K8sBundleConfig | type | Public export. |
resolveK8sToolRefs | value | Public export. |
@fabric-harness/sdk
@fabric-harness/sdk
| Export | Kind | Summary |
|---|---|---|
actionAsTool | value | Expose an action to the model as a tool on an agent profile. The tool's JSON schema comes from the action's input schema; execution validates input/output exactly like runAction. |
ActionContext | type | Context passed to an action's run. Unlike a tool's execute (a leaf capability invoked by the model), an action receives the harness itself and can orchestrate: prompt models, spawn sessions, call other actions. |
ActionDefinition | type | A named, schema-validated unit of harness work created with defineAction. First-class in v2: registrable on agent profiles as a tool, callable from jobs and agents, evaluable via fh test, and deployable as a platform job task. |
ActionError | value | Public export. |
ActionHost | type | What an action runs against: the harness entry point (init can prompt models, spawn sessions, and call tools) plus the platform environment. Jobs, agents, and servers all satisfy this — it is the harness slice of FabricContext. |
ActionOptions | type | Public export. |
ActivateSkillInput | type | Public export. |
ActorIdentity | type | Public export. |
ActualCostSource | type | External source for actual (non-estimated) spend. Implementations can query provider billing APIs, Databricks usage tables, or other real-time cost data. |
admitSubmissionWithBackend | value | Shared submission admission algorithm for row-oriented backends: dispatch-receipt check → insert-or-ignore → read-back → payload compare (idempotent replay vs. conflict). The message payload is stored as JSON verbatim; payload identity is deep JSON equality, so a backend that normalizes stored JSON (e.g. Postgres JSONB key ordering) still recognizes an exact replay. The caller owns transaction scoping — invoke this inside one transaction and pass callbacks bound to it. When every callback is synchronous the result is returned synchronously, so the algorithm also fits synchronous backends. |
agent | value | Defaults-injecting agent builder. Exported as agent from the bare @fabric-harness/sdk entry point. Wraps init() so the headless defaults are applied unless the caller overrides them: - runtime: 'stateless' - sandbox: 'virtual' - loopRuntime: pi-agent-core - compaction: { enabled: true } If runtime: 'temporal' is selected from this builder, a one-time console.warn is emitted because auto-compaction is non-deterministic across Temporal replay. Use @fabric-harness/sdk/strict for Temporal. |
AgentAttemptMarker | type | Harness-owned durable evidence that a submission attempt was started and has not yet settled. A coordinator inserts a marker immediately before starting an attempt and deletes it when the attempt settles; reconciliation treats a fresh marker as proof that the attempt may still be running and must not be reconciled as interrupted. |
AgentDefinition | type | Public export. |
AgentDispatchAdmission | type | Public export. |
AgentDispatchReceipt | type | Public export. |
AgentDispatchRequest | type | Async delivery request to a persistent agent instance + session. |
AgentEvent | type | Public export. |
AgentEventBase | type | Common envelope shared by every event variant. |
AgentEventCallback | type | Callback signature accepted by init({ onEvent }), agent.session(id, { onEvent }), and session.prompt(text, { onEvent }). |
AgentEventType | type | Public export. |
AgentInit | type | Public export. |
AgentLoopRuntime | type | Public export. |
AgentProfile | type | Public export. |
AgentProfileOptions | type | Public export. |
AgentSubmission | type | Public export. |
AgentSubmissionDurability | type | Public export. |
AgentSubmissionInput | type | One admitted agent submission — the persisted operational payload for both transports. kind records how the submission arrived ('dispatch' via dispatch(), 'direct' via the agent HTTP route); a dispatch's submissionId is the public dispatchId from its receipt. |
AgentSubmissionStatus | type | Public export. |
AgentSubmissionStore | type | Durable submission lifecycle storage. Stability: the lease method group mirrors the durable-execution engine and is subject to change until 1.0. This applies to every backend equally. |
AgentTriggers | type | Public export. |
aiGateway | value | Generic OpenAI-compatible AI gateway helper. Use for any gateway that speaks the OpenAI Chat Completions request/response shape: Helicone, Portkey, LiteLLM (self-hosted), Cloudflare AI Gateway, internal corp proxies, etc. See the package declarations for an example. For Vercel AI Gateway, prefer the vercelAIGateway preset — same factory under the hood with the gateway URL pre-baked. |
AIGatewayOptions | type | Public export. |
AnthropicModelProvider | value | Public export. |
AnthropicProviderOptions | type | Public export. |
applyEstimatedCost | value | Idempotently populate usage.costUsd from the static price table. Mutates usage and returns it. No-op when: - usage is undefined, - usage.costUsd is already set (provider supplied it directly), - no price row matches modelRef. |
ApprovalCallback | type | Public export. |
ApprovalDecision | type | Public export. |
ApprovalNotification | type | Public export. |
ApprovalNotificationDeadLetter | type | Public export. |
ApprovalNotificationDeliveryStore | type | Public export. |
approvalNotificationFromEvent | value | Public export. |
approvalNotificationHandler | value | Convert approval events into retryable, deduplicated notifications. This callback never throws. |
ApprovalNotificationHandlerOptions | type | Public export. |
ApprovalNotificationState | type | Public export. |
ApprovalNotifier | type | Public export. |
ApprovalOptions | type | Public export. |
ApprovalPolicyRule | type | Per-pattern approval metadata. Lets policy authors route specific tools/commands to a named audience (e.g. 'reviewer', 'compliance-team', 'project-admin'). The audience id is opaque to fabric-harness — host applications map ids to humans via their own identity layer. |
ApprovalRequest | type | Public export. |
ApprovalResponse | type | Public export. |
ApprovalRisk | type | Public export. |
ApprovalState | type | Public export. |
approvalStatesFromEntries | value | Public export. |
ApprovalStateStatus | type | Public export. |
ApprovalUnavailableStrategy | type | Public export. |
ApprovalVote | type | Public export. |
ArtifactCreateOptions | type | Public export. |
ArtifactRef | type | Public export. |
assertEnforceableNetworkPolicy | value | Refuse production network policy when it can be bypassed by code in the sandbox. This validates an operator assertion; the named network boundary must still be provisioned by Docker, Kubernetes, or the cloud provider. |
attachmentDigest | value | Lowercase hex SHA-256 of the bytes (WebCrypto). |
AttachmentLimitError | value | Public export. |
AttachmentPutInput | type | Public export. |
AttachmentRef | type | Content-addressed descriptor of one stored attachment. |
AttachmentStore | type | Durable content-addressed attachment storage. - put is idempotent by (scope, digest) — re-putting the same content succeeds without duplicating storage (the first stored ref metadata is retained). It MUST verify the digest against the bytes and reject a mismatch with AttachmentStoreError('DIGEST_MISMATCH') before writing. - get/getByAttachmentId return null on a miss. - delete removes one stored attachment and throws AttachmentStoreError('NOT_FOUND') when nothing is stored under (scope, digest). |
AttachmentStoreError | value | Public export. |
attachSandbox | value | Build a SandboxFactory that, when invoked, returns an AttachedSandboxEnv delegating to the registered sandbox without owning its lifecycle. Calling cleanup() on the attached env unregisters this attachment but does NOT tear down the underlying sandbox. Pass an in-process SandboxRef to attach within the same process, or a SerializedSandboxRef (from session.sandboxRef({ portable: true })) to rehydrate a sandbox handed off from another process. Cross-process refs require a decoder registered for serialized.provider via registerSandboxRefDecoder(). |
AttachSandboxOptions | type | Public export. |
AttributionQuery | type | Query filters for retrieving aggregated cost attribution rows. |
AutonomyMode | type | Public export. |
AutonomyOptions | type | Public export. |
AzureOpenAIModelProvider | value | Public export. |
AzureOpenAIProviderOptions | type | Public export. |
BashInput | type | Public export. |
bashTool | value | Public export. |
BedrockModelProvider | value | Public export. |
BedrockProviderOptions | type | Public export. |
buildModelMessagesFromHistory | value | Public export. |
buildResultFollowUpPrompt | value | Follow-up prompt sent when the LLM ends a turn without calling finish or give_up. |
buildResultFooter | value | Footer appended to user prompts/skill bodies when a result schema is set. |
buildResultRetryPrompt | value | Public export. |
BuiltinFileTool | type | Public export. |
BuiltinTool | type | Public export. |
bytesToHex | value | Public export. |
CapabilityPolicy | type | Public export. |
CartesiaSttProvider | value | Public export. |
CartesiaSttProviderOptions | type | Public export. |
CartesiaTtsProvider | value | Public export. |
CartesiaTtsProviderOptions | type | Public export. |
chainSecretProviders | value | Resolve from providers in order; errors fail closed instead of falling through. |
Channel | type | Public export. |
ChannelContext | type | Public export. |
ChannelDispatch | type | Public export. |
ChannelDispatchRequest | type | Public export. |
ChannelRoute | type | Channels turn platform webhooks (Slack, GitHub, …) into agent dispatches. Handlers are written against the Web Request/Response API and crypto.subtle, so the same channel runs on Node and Cloudflare. A channel is a stateless route container plus a conversation-id (de)serializer — session continuity falls out of the key (same thread → same key → same session). |
CheckpointCreateOptions | type | Public export. |
CheckpointRestoreOptions | type | Public export. |
CheckpointResult | type | Public export. |
claimSandboxOwnership | value | Claim exclusive ownership of an already-connected portable sandbox. |
clampCommandTimeout | value | Public export. |
clampReadLimit | value | Public export. |
classifySubmissionState | value | Classify how far a persisted submission input progressed. - absent — the input entry never landed in session history: the attempt crashed before applying it. Safe to requeue for a clean first attempt. - completed — finished work: a canonical settlement entry exists, an assistant response follows the input with no unresolved trailing tool batch, or a later user input shows the conversation moved on. Settle as success; never retry (retrying completed work is the one unrecoverable corruption). - continuable — the trailing turn carries unresolved tool calls. The next session.prompt() re... |
CohereModelProvider | value | Public export. |
CohereProviderOptions | type | Public export. |
combineSubmissionTelemetrySinks | value | Fan one event out to several sinks. |
Command | type | Public export. |
CommandEnvValue | type | Public export. |
CommandPolicy | type | Public export. |
CommandToolInput | type | Public export. |
CommandToolOptions | type | Public export. |
CompactionOptions | type | Public export. |
CompactionResult | type | Public export. |
configureDispatchRuntime | value | Configure the ambient dispatch queue used by dispatch. |
configureJobInvocationRuntime | value | Public export. |
connectFabricVoice | value | Public export. |
connectFabricWs | value | Public export. |
connectMcpServer | value | Public export. |
consoleTelemetryExporter | value | Telemetry exporter that writes spans through the SDK logger (default console-backed). Useful for local development and as a fallback when no OpenTelemetry collector is wired up. Use openTelemetryExporter or langfuseExporter for production. |
ContextBudget | type | Public export. |
ContextBudgetOptions | type | Public export. |
CONVERSATION_STREAM_DEFAULT_READ_LIMIT | value | Public export. |
CONVERSATION_STREAM_MAX_READ_LIMIT | value | Public export. |
conversationKey | value | Public export. |
ConversationProducerClaim | type | Public export. |
ConversationProjector | value | Public export. |
ConversationStreamAppendInput | type | Public export. |
ConversationStreamBatch | type | Public export. |
ConversationStreamIdentity | type | Public export. |
ConversationStreamMeta | type | Public export. |
conversationStreamPath | value | Stream path for a session's conversation projection. |
ConversationStreamReadResult | type | Public export. |
ConversationStreamRecord | type | Append-only conversation stream — the durable, offset-addressable projection of a session's active path (v2 migration, phase A4). The SessionEntry DAG remains the single source of truth for model context; this stream exists so clients can read a conversation with offsets (catch-up + live tail), across processes, without count-based replay. The projection appends one record per active-path entry, and — because the DAG can branch (fork/replay/checkpoint-restore) while a stream cannot — an explicit truncated record whenever the active path rewinds, paired with a producer-epoch bump so stale... |
ConversationStreamStore | type | Durable append-only conversation stream storage. Batch atomicity is a hard contract requirement: every record in an append must be persisted together under one offset, all-or-nothing. First-party adapters satisfy this by serializing the batch into a single row/document write; an adapter that splits records across non-atomic writes violates the contract. Producer fencing: acquireProducer bumps the producer epoch; appends carrying a stale epoch are rejected. The (path, producerId, epoch, sequence) uniqueness makes redelivered appends idempotent — a retried append with the same coo... |
ConversationStreamStoreError | value | Public export. |
CostAttribution | type | Attribution dimensions for a single cost observation. All fields are optional so callers can tag as much or as little metadata as they have. |
CostAttributionRow | type | A single row of aggregated cost attribution data. |
CostBudgetStore | type | Async store for cross-process spend aggregation. Pair with CostLimit.scopeKey + CostLimit.perScope to enforce a budget that survives process restarts — "tenant:acme spends ≤ $50 today" or "company-wide ≤ $100 this hour". Built-in implementations: - inMemoryCostBudgetStore() — process-local; default. - @fabric-harness/node exposes postgresCostBudgetStore({ pool }). |
CostBudgetTracker | value | Tracks cumulative session spend. Cheap to construct; one per session. |
CostLimit | type | Public export. |
CostLimitContext | type | Public export. |
CostLimitExceededError | value | Public export. |
createActivateSkillTool | value | Public export. |
createAgent | value | Define a persistent, URL-addressable agent. Files in .fabricharness/agents/ default-export createAgent(...); the runtime resolves a fresh config per interaction and keeps sessions across direct prompts and dispatched inputs. |
createAttachmentRef | value | Build an AttachmentRef for the given bytes, computing the SHA-256 digest via WebCrypto (crypto.subtle) so the SDK stays runtime-agnostic. |
createBuiltinTools | value | Public export. |
createCommandTools | value | Public export. |
createConsoleLogger | value | Build a Console-backed logger with an explicit level. Useful for tests that want to capture or silence SDK output without touching globals. |
CreatedAgent | type | A persistent, addressable agent created with createAgent. Distinct from a finite agent({ run }) job: it has no run — the initializer returns configuration, and the runtime maintains sessions across interactions. |
createDirectAgentSubmissionInput | value | Mint a direct-prompt submission input with a fresh submission id. |
createDispatchAgentSubmissionInput | value | Map a DispatchInput onto the persisted submission input shape. |
createFabricContext | value | Public export. |
createFabricFs | value | Adapt a sandbox into the public filesystem convenience surface. |
createFileTools | value | Public export. |
createMcpAuthorizationCodeAuth | value | Authorization-code + PKCE provider; the MCP SDK refreshes stored tokens automatically. |
createMcpClientCredentialsAuth | value | OAuth client-credentials provider with MCP SDK token refresh handling. |
createMcpTools | value | Public export. |
CreateMcpToolsOptions | type | Public export. |
createObservabilityObserver | value | Create a fail-open event observer suitable for Braintrust, Sentry, Jetty, or a custom sink. |
createObservabilityRecord | value | Convert a Fabric event into a vendor-neutral, low-cardinality record. |
createOperationalMetricsCollector | value | Low-cardinality operational metrics collector suitable for OTel/Prometheus bridging. |
createRemoteSandboxEnv | value | Wrap a provider-owned remote sandbox client in Fabric's SandboxEnv contract. Provider credentials and SDK objects remain outside model context/history; Fabric only sees the narrow file/shell/snapshot API exposed here. |
createResultTools | value | Produce the per-call finish and give_up tool pair for a given ResultValidator. - finish's parameters are a generic JSON Schema object because we can't derive a precise schema from ResultValidator. The validator's safeParse handles actual validation. - First successful finish (or give_up) call wins. Subsequent calls return an error tool result rather than throwing, to keep the conversation transcript natural. |
createSandboxEnv | value | Public export. |
createScopedSandboxEnv | value | Return a view of a sandbox with a narrower default cwd. Relative file paths and shell cwd values are resolved from this scoped cwd while the underlying sandbox still enforces its workspace boundary. |
createSearchTool | value | Exposes a Retriever to the model as a search tool. The tool is read-only; wrap it with a governance decorator to stamp lineage or route approvals. |
createSessionSubmissionExecutor | value | Provider-neutral durable submission executor for hosts that can open a Fabric session themselves. Node, Durable Objects, and custom runtimes share the same recovery and conservative interrupted-tool settlement behavior. |
createStdioMcpClient | value | Public export. |
createSubmissionRunner | value | Public export. |
createUnifiedInMemoryStore | value | Factory that returns a fresh UnifiedInMemoryStore. The returned object can be passed as store, streamChunkStore, and runStore simultaneously. |
createVirtualSandboxEnv | value | Public export. |
CredentialMissingStrategy | type | Public export. |
currentJobInvocation | value | Public export. |
currentSubmissionContext | value | The submission owning the current execution, or undefined outside one. |
DeepgramSttProvider | value | Public export. |
DeepgramSttProviderOptions | type | Public export. |
DEFAULT_HEADLESS_PREAMBLE | value | Public export. |
defaultAgentProfile | value | Public export. |
defaultLoopRuntime | value | Public export. |
defaultModelProvider | value | Public export. |
defaultSessionStore | value | Public export. |
defineAction | value | Define an action — the harness-context counterpart to defineTool. A tool is a leaf capability the model calls; an action holds the harness (context.init) and can prompt, spawn sessions, and compose other work. Input/output use the harness schema builders and are validated on every runAction call; outputs must be JSON-serializable. |
defineAgent | value | Canonical v2 name for createAgent: persistent, URL-addressable agents are defined, and the runtime instantiates them per addressed id. createAgent remains supported as an alias. |
defineAgentProfile | value | Public export. |
defineChannel | value | Validates and brands a channel's routes. |
defineCommand | value | Public export. |
DefinedAgent | type | Public export. |
defineJob | value | Defaults-injecting finite-job builder exported from the bare SDK entry point. |
defineTool | value | Public export. |
defineWebhookSubscription | value | Helper that returns the definition unchanged. Useful for type inference and to keep agent files declarative. See the package declarations for an example. |
DeletionCompletionRecord | type | Public export. |
DeliveredAttachment | type | One attachment on a kind: 'user' message. Today the only supported attachment is an image, carried either inline (data, base64) or as a durable content-addressed reference (ref) once an attachment store is configured — admission materializes inline bytes into refs. An attachment must carry data or ref (or both, transiently during materialization). |
DeliveredAttachmentRef | type | Durable reference to attachment bytes in an attachment store. |
DeliveredMessage | type | DeliveredMessage — the single unified input shape for everything that enters a persistent agent's session: direct HTTP prompts, dispatch, channels/webhooks, Databricks events, SDK clients, and tests. kind: 'user' is a direct user talking to the assistant (1:1 chat surface), optionally carrying attachments. kind: 'signal' models everything beyond that direct exchange — a Slack thread or a Lakeflow job event is activity the agent observes, not the assistant's own user speaking. Sender identity and structured metadata go in attributes; the message itself in body. Signals render into mo... |
deliveredSignalToEntryData | value | Map a signal-kind message onto the persisted signal entry's data shape. |
deriveCompactionDefaults | value | Compute model-aware compaction defaults. Reserve is capped at the model's max output because reserving more than the model can emit in one turn wastes context; the preserved tail stays flat because recent-context fidelity depends on the active work, not on the model's total window size. |
dispatch | value | Public export. |
DispatchInput | type | Internal enqueued form, carrying correlation + isolation metadata. |
DispatchProcessor | type | Consumes enqueued dispatches and applies them to an instance session. |
DispatchQueue | type | Admission queue for dispatches. The default is in-process; durable backends implement the same shape. |
DispatchReceipt | type | Acceptance confirmation for an enqueued dispatch. |
DockerSandboxEnv | value | Public export. |
DockerSandboxOptions | type | Public export. |
DURABILITY_DEFAULT_MAX_ATTEMPTS | value | Default maximum total attempts before terminalization. |
DURABILITY_DEFAULT_TIMEOUT_MS | value | Default submission timeout in milliseconds (one hour). |
DurableSessionRuntime | type | Structural delegate for durable session execution. When init() is given a sessionRuntime factory that produces one of these, the SDK's session calls (prompt, task, shell, checkpoint.*) are routed through the runtime instead of executing inline. This is the seam for Temporal workflows, external orchestration runtimes, or test fakes. mount, history, artifact, and compact remain SDK-local concerns and are not delegated — they operate against the local session store. |
DurableSessionRuntimeFactory | type | Public export. |
editFileTool | value | Public export. |
EditInput | type | Public export. |
ElevenLabsTtsProvider | value | Public export. |
ElevenLabsTtsProviderOptions | type | Public export. |
EmbeddingProvider | type | Embeddings seam. Feeds self-managed-embedding vector indexes (embed the query → query vector) and any bring-your-own retrieval pipeline. Returns one vector per input text, order-preserving. |
emitOpenTelemetrySpan | value | Public export. |
emitSubmissionTelemetry | value | Deliver an event to a sink, swallowing (and reporting) sink failures. |
EmptySandboxEnv | value | Public export. |
enqueueDispatch | value | Validate + normalize a named request and enqueue it, generating the dispatch id. |
entryToTelemetrySpan | value | Public export. |
environmentSecretProvider | value | Runtime-only environment provider with optional prefix and explicit allowlist. |
EnvironmentSecretProviderOptions | type | Public export. |
estimateCostUsd | value | Estimate USD cost for a single model call. Returns 0 when no row matches modelRef — callers should treat 0 as "unknown" and not overwrite an existing costUsd from the provider. |
estimateModelMessagesTokens | value | Public export. |
estimateSessionEntriesTokens | value | Public export. |
estimateTextTokens | value | Public export. |
evaluateCommandPolicy | value | Public export. |
evaluateContextBudget | value | Public export. |
evaluateNetworkPolicy | value | Evaluate a URL or Request against the configured network policy. Returns { allowed: true } when the request is permitted, otherwise a denial with the reason and matched pattern. |
evaluateOperationalSlos | value | Public export. |
evaluateToolCallPolicy | value | Public export. |
eventToTelemetrySpan | value | Public export. |
ExistsInput | type | Public export. |
existsTool | value | Public export. |
extractResultValue | value | Public export. |
FABRIC_OPERATIONAL_METRICS | value | Public export. |
FabricActor | type | Public export. |
FabricAgent | type | Public export. |
FabricContext | type | Public export. |
FabricError | value | Public export. |
FabricErrorCode | type | Public export. |
FabricErrorOptions | type | Public export. |
FabricEvent | type | Public export. |
FabricEventCallback | type | Public export. |
FabricEventType | type | Public export. |
FabricFs | type | Out-of-band filesystem surface for a session sandbox. These operations do not write to conversation history and are intended for host-side plumbing: staging files, collecting artifacts, and preparing scratch space. If the model should reason about a file, prompt it to use the normal read/write/edit tools instead. |
FabricObservabilityRecord | type | Public export. |
FabricPrincipal | type | The governed identity a piece of work runs as (v2). Distinct from ActorIdentity (who asked): the principal is what the platform's access control enforces — a human user, a machine service principal, or a hosted app's own identity. ucPrincipal carries the catalog-governance principal name when the platform has one (e.g. Unity Catalog). |
FabricRuntime | type | Execution runtime selection. - inline (default): single-process execution. Uses the configured SessionStore (in-memory by default) for history, artifacts, approvals. - stateless: explicit headless / ephemeral mode. No session store, no artifact persistence, no approval waiting. Each invocation is independent. Use for high-volume webhook agents and edge runtimes where state would just be discarded anyway. In production (FABRIC_ENV=production or NODE_ENV=production) this mode must be selected explicitly — inline without an explicit store will warn or fail depending on `FABRIC_ALLO... |
FabricSession | type | Public export. |
FallbackModelProvider | value | Public export. |
FallbackModelProviderOptions | type | Public export. |
FileStat | type | Public export. |
FilesystemEntry | type | Public export. |
FilesystemPolicy | type | Public export. |
FilesystemSource | type | A read-only content source that can be mounted into a sandbox at sandbox-creation time. The agent then has built-in read, glob, and grep tools available over the mounted content — no retrieval pipeline, no embeddings, no vector store required. Sources are intentionally minimal: they yield (path, content) pairs. Implementations decide how to enumerate (eager vs lazy is up to the source author) — the mount step pulls the full set into the sandbox. |
findSubmissionInputIndex | value | Index of the (last) user_prompt entry carrying the submission id, or -1. |
findTrailingDanglingToolCalls | value | Find trailing tool_call entries on the active path that were never settled — no matching tool_result (paired by toolCallId, falling back to tool name) and no subsequent error entry for the same tool. A dangling call means a model turn died (crash/abort) between recording the call and recording its outcome. Left in place it produces an assistant tool_use with no tool_result on resume, which providers reject — the repair path appends synthetic interrupted outcomes for exactly the entries returned here. Conservative by construction: only the window after the last turn boundary (use... |
findTrailingUnfinishedTasks | value | Trailing task_start entries in the same window with no matching task_end — a subtask that was in flight when the turn died. These do not corrupt model context (task entries are bookkeeping), but settling them keeps UI/audit state coherent. |
formatSchemaIssues | value | Public export. |
formatStreamOffset | value | Public export. |
fumadocsSource | value | Mount a local Fumadocs content directory as a knowledge base. Strips MDX frontmatter by default for cleaner agent context. For a published Fumadocs site, fetch its llms.txt / sitemap and pass the URLs to httpFilesystemSource. |
GeminiModelProvider | value | Public export. |
GeminiProviderOptions | type | Public export. |
generateAffinityKey | value | Generate a deterministic aff_\u003cULID\u003e affinity key from an (agentId, sessionId) pair. The same pair always produces the same key, which is stable across restarts. Different pairs produce different keys with overwhelming probability. |
generateWithRuntime | value | Public export. |
getAgentDefinition | value | Public export. |
getCreatedAgent | value | Return the CreatedAgent carried by a value, or undefined. |
getLogger | value | Get the currently configured logger. |
getVirtualSandbox | value | One-liner helper for the most common pattern: mount a single read-only source into a virtual sandbox. Equivalent to: See the package declarations for an example. Used for support agents, runbook lookup, FAQ assistants — anywhere a small Markdown corpus needs to be searchable via the agent's built-in grep/glob/read tools. See the package declarations for an example. |
GlobInput | type | Public export. |
globTool | value | Public export. |
GrepInput | type | Public export. |
GrepMatch | type | Public export. |
grepTool | value | Public export. |
hasSubmissionSettledEntry | value | True when the path carries a canonical submission_settled entry for the id. |
hexToBytes | value | Public export. |
hmacSha256 | value | Public export. |
httpFilesystemSource | value | Fetch a list of URLs and mount each response body as a file. Useful for pulling a small published docs set into the sandbox so the built-in read/grep/glob tools can search it like local files. |
HttpResource | type | Public export. |
init | value | Public export. |
initializePersistentAgent | value | Resolve a persistent agent's config for an instance and build a FabricAgent. Runtime-specific resources (session store, workspace roles/skills, loop runtime) are layered by the host that calls this. |
inMemoryApprovalNotificationStore | value | Process-local atomic delivery state for development and single-process hosts. |
InMemoryAttachmentStore | value | In-memory attachment store (dev / runtime: 'stateless' / tests). |
InMemoryConversationStreamStore | value | In-memory conversation stream store (dev / runtime: 'stateless' / tests). |
inMemoryCostBudgetStore | value | Process-local cost budget store. Default when store is not provided. |
InMemoryDispatchQueue | value | In-process dispatch queue: microtask-drained, concurrent across sessions, serialized within a single session. Suitable for the inline/stateless runtimes and dev. Durable delivery (surviving restarts) is provided by the Temporal-backed queue, which implements this same interface. |
inMemorySessionMemory | value | Process-local in-memory implementation. Default when init({ memory }) is not configured — pair with Postgres for durability across restarts. |
InMemorySessionStore | value | Public export. |
inMemorySource | value | Build a source from an in-memory map of path -> content. Useful for tests, fixtures, and small static knowledge bases bundled into the agent module itself. |
InMemoryStreamChunkStore | value | Public export. |
InMemorySubmissionStore | value | Public export. |
InterruptedToolCallRef | type | A tool call settled with an explicit interrupted-outcome marker at terminalization. |
InvalidDeliveredMessageError | value | Thrown by parseDeliveredMessage on malformed input. |
invoke | value | Public export. |
isActionDefinition | value | Public export. |
isContextOverflowError | value | Public export. |
isCreatedAgent | value | Whether a value is a CreatedAgent. |
isDeliveredMessageShape | value | True when a raw value already looks like a DeliveredMessage (has a valid kind). |
isEvent | value | Type guard: narrow an AgentEvent to a specific variant. See the package declarations for an example. |
isFabricError | value | Public export. |
isInMemoryStore | value | Returns true when store is the in-memory default (no appendEntry persistence beyond memory). Used by stateless mode to skip writes. |
isStatelessRuntime | value | Public export. |
isSubmissionPayload | value | Validate that a parsed JSON payload matches the expected submission shape. Used after deserializing a persisted payload to verify the object is a well-formed AgentSubmissionInput that is consistent with the stored submission metadata. Both dispatch and direct payloads carry the same message: DeliveredMessage field — validated identically here regardless of transport kind. |
isValidAffinityKey | value | Public export. |
job | value | Defaults-injecting agent builder. Exported as agent from the bare @fabric-harness/sdk entry point. Wraps init() so the headless defaults are applied unless the caller overrides them: - runtime: 'stateless' - sandbox: 'virtual' - loopRuntime: pi-agent-core - compaction: { enabled: true } If runtime: 'temporal' is selected from this builder, a one-time console.warn is emitted because auto-compaction is non-deterministic across Temporal replay. Use @fabric-harness/sdk/strict for Temporal. |
JobContext | type | Runtime-ready context for finite jobs. The default session is initialized lazily. |
JobDefinition | type | Public export. |
JobInvocationContext | type | Public export. |
JobInvocationOptions | type | Public export. |
JobInvocationReceipt | type | Public export. |
JobInvocationRuntime | type | Public export. |
JobMiddleware | type | Public export. |
JournalCallbacks | type | Public export. |
jsonDeepEqual | value | Structural equality over JSON values (objects compared key-order-insensitively). |
JsonObject | type | Public export. |
JsonPrimitive | type | Public export. |
JsonSchemaObject | type | Public export. |
JsonValue | type | Public export. |
LangfuseClientLike | type | Optional Langfuse exporter. Adapts Fabric's TelemetrySpan shape to Langfuse's tracing API. The Langfuse client is provided by the caller — we don't take a hard dependency. Install peer dep: See the package declarations for an example. Usage: See the package declarations for an example. |
langfuseExporter | value | Public export. |
LangfuseExporterOptions | type | Public export. |
LEASE_DURATION_MS | value | Default lease duration for submission ownership in milliseconds (30 seconds). |
listModelPrices | value | All currently-registered rows (newest-last). Returns a copy. |
listSandboxRefDecoders | value | Returns the list of currently registered providers. |
localDirectorySource | value | Read a host directory recursively as a read-only source. include is called for each candidate file path (relative to hostPath). Return false to skip. Defaults to including everything. |
LocalSandboxEnv | value | Public export. |
LocalSandboxOptions | type | Public export. |
Logger | type | Minimal logger seam used by the SDK for non-event diagnostic output (warnings, deprecation notices, telemetry fallbacks). All console.* inside the SDK should route through getLogger() so ops teams can redirect or silence messages in production. The default logger writes to console and respects FABRIC_HARNESS_LOG_LEVEL=debug|info|warn|error|silent (default warn). |
LogLevel | type | Public export. |
lookupModelPrice | value | Look up the most recently-registered row matching modelRef. modelRef can be: - 'provider/model' (preferred, e.g. 'openai/gpt-4o') - 'model' alone (e.g. 'gpt-4o') — first row whose model matches wins Provider matching is case-insensitive. Model matching is exact. |
materializeMessageAttachments | value | Materialize a message's inline attachments into durable refs: decode the base64 data, store the bytes under scope, and return a NEW message whose attachments carry { type, mimeType, filename?, ref } and no data. Deterministic by construction — attachment ids are ${idPrefix}_${index} and digests derive from content — so an exact redelivery of the same message produces an identical materialized payload (admission idempotency). Messages without inline attachments are returned unchanged (same reference). |
MAX_ATTACHMENT_DATA_LENGTH | value | Maximum accepted base64 length for a single inline attachment. |
McpAuthorizationCodeOptions | type | Public export. |
McpAuthorizationCodeState | type | Public export. |
McpClientCredentialsOptions | type | Public export. |
McpClientLike | type | Public export. |
McpServerConnection | type | Public export. |
McpServerOptions | type | Public export. |
McpToolDescriptor | type | Public export. |
McpTransport | type | Public export. |
memorySandboxOwnershipLeaseStore | value | Process-local lease store for tests and single-replica durable workers. |
messageHasDataAttachments | value | True when the message carries at least one inline (base64) attachment. |
mintlifySource | value | Mount a checked-out Mintlify content directory. For a hosted Mintlify MCP server, use connectMcpServer('mintlify', { url, transport: 'streamable-http' }) instead. |
MissingInputStrategy | type | Public export. |
MkdirInput | type | Public export. |
mkdirTool | value | Public export. |
ModelAttemptEvent | type | Public export. |
ModelConfig | type | Public export. |
ModelMessage | type | Public export. |
ModelMessageRole | type | Public export. |
ModelMetadata | type | Public export. |
ModelPriceRow | type | Static USD price table for model providers. Used to populate ModelUsage.costUsd on responses that don't include billing info from the provider directly (most providers — only pi-loop-runtime and a handful of gateways report cost). Prices are stamped with effectiveAt. The table is best-effort: real billing reconciliation should use vendor invoices. Override or extend at runtime with registerModelPrices for custom-rate contracts. |
ModelPricingUsage | type | Public export. |
ModelProvider | type | Public export. |
ModelProviderFactory | type | Resolves a parsed provider/model-id ref into a concrete provider. Registered factories let out-of-core packages (e.g. |
ModelRequest | type | Public export. |
ModelResponse | type | Public export. |
ModelRuntimeOptions | type | Public export. |
ModelStreamChunk | type | Public export. |
ModelToolCall | type | Public export. |
ModelToolSchema | type | Public export. |
ModelUsage | type | Public export. |
MountedSource | type | Public export. |
MountResult | type | Public export. |
NamedAgentDispatchRequest | type | A dispatch request that names its target agent. |
NamedJobInvocation | type | Public export. |
NativeLoopRuntime | value | Public export. |
negotiateSandboxContinuity | value | Report the continuity operations that a backend or serialized ref can support. |
NetworkEnforcementLayer | type | Public export. |
NetworkEnforcementRequirement | type | Public export. |
NetworkPolicy | type | Public export. |
noopSessionStore | value | Public export. |
NoopSessionStore | value | No-op session store for runtime: 'stateless' mode. All writes are discarded; reads always return the empty initial session. Use this when the agent is intended as a pure request/response handler with no persistence (typical for high-volume webhooks and edge runtimes). Approvals and artifact retrieval are not supported — wiring those up requires a real store. Callers in stateless mode should not rely on artifact persistence or approval gating. |
normalizeDeliveredMessage | value | Normalize legacy inputs into a DeliveredMessage: - a string → a user message with that body - a value with a kind discriminator → validated as a DeliveredMessage - any other JSON value → a user message with the JSON-stringified body (matching the historical dispatch rendering, so behavior is unchanged for pre-DeliveredMessage callers) |
ObservabilityCorrelation | type | Public export. |
ObservabilityObserverOptions | type | Public export. |
OpenAIChatCompletion | type | Public export. |
openAIChatCompletionToModelResponse | value | Public export. |
OpenAICompatibleModelProvider | value | Public export. |
OpenAICompatibleProviderOptions | type | Public export. |
OpenAIRealtimeVoiceProvider | value | OpenAI Realtime voice provider. Connects via WebSocket; emits audio_delta / text_delta / transcript / tool_call / response_done events. No transitive dependency on ws — uses the global WebSocket available on Node 22+ and browsers. See the package declarations for an example. |
OpenAIRealtimeVoiceProviderOptions | type | Public export. |
openTelemetryExporter | value | Bridge Fabric's SDK-neutral TelemetrySpan into a real |
OpenTelemetryExporterOptions | type | Public export. |
OperationalMetricsCollector | type | Public export. |
OperationalMetricsSnapshot | type | Public export. |
OperationalSloEvaluation | type | Public export. |
OperationalSloTargets | type | Public export. |
parseConversationKey | value | Public export. |
ParsedConversationKey | type | Public export. |
parseDeliveredMessage | value | Validate a raw value as a DeliveredMessage. Shared by dispatch admission and the direct HTTP route so every transport produces the same structured error on bad input. |
ParsedModelRef | type | Public export. |
ParsedScopeKey | type | Public export. |
parseModelRef | value | Public export. |
parsePersistentSessionId | value | Inverse of persistentStoreSessionId: decode a store session id back into { agent, instanceId, session }, or undefined if it is not a persistent-instance key. Useful for admin surfaces that list raw session ids. |
parseRetryAfterMs | value | Parse a Retry-After header value (RFC 7231) into milliseconds. Accepts both delta-seconds and HTTP-date forms. Returns undefined when the value is missing or unparseable. |
parseScopeKey | value | Parse a scope key into its structured components. Recognized patterns: tenant:<id>:day:YYYY-MM-DD tenant:<id>:hour:YYYY-MM-DDTHH:00Z tenant:<id>:month:YYYY-MM agent:<id>:day:YYYY-MM-DD agent:<id>:hour:YYYY-MM-DDTHH:00Z agent:<id>:month:YYYY-MM user:<id>:day:YYYY-MM-DD user:<id>:hour:YYYY-MM-DDTHH:00Z user:<id>:month:YYYY-MM Unknown prefixes fall back to kind: 'custom' with raw: scopeKey. Returns undefined for empty strings. |
parseStreamOffset | value | Public export. |
persistenceAdapter | value | Create an in-memory PersistenceAdapter backed by a fresh InMemorySessionStore. This is the default when no persistence is configured. The returned adapter's connect() always returns the same store instance. |
PersistenceAdapter | type | A persistence adapter abstracts over storage backends (SQLite, Postgres, file, etc.). The SDK only requires connect() → SessionStore. Optional methods connectRunStore and connectRunRegistry are used by workflow backends (Temporal, Cloudflare). The optional migrate() hook is called once at startup to ensure schema exists, and close() releases resources. |
PersistenceBundle | type | Complete persistence surface consumed by a Fabric host. |
PersistenceDeleteResult | type | Public export. |
PersistenceHealth | type | Public export. |
PersistentAgentConfig | type | Runtime configuration returned by a createAgent initializer. Mirrors the agent-level slice of AgentInit; instructions becomes the session system prompt (a role), and subagents map to named roles. |
PersistentAgentContext | type | Per-interaction context passed to a createAgent initializer. id is the URL <id> of the addressed instance (or the dispatch target id); env is the platform environment supplied by the runtime. |
persistentConfigToAgentInit | value | Translate a PersistentAgentConfig into an AgentInit. |
PersistentSessionIdentity | type | Decoded identity of a persistent instance session store key. |
persistentStoreSessionId | value | Store-session key for a persistent instance's named session. Collapses the (agentName, instanceId, sessionName) identity onto Fabric's single-string sessionId, keeping persistent sessions inside the existing session stores. |
PipelineVoiceProvider | value | Public export. |
PipelineVoiceProviderOptions | type | Public export. |
policiedFetch | value | Public export. |
PoliciedFetchOptions | type | Wrap a fetch-like function with CapabilityPolicy enforcement. Tools and connectors that make outbound HTTP should accept a custom fetch and pass the result of policiedFetch(fetch, policy). Throws a FabricError (POLICY_DENIED) when a request violates the policy; never sends a forbidden request. |
PolicyDecision | type | Public export. |
PromptOptions | type | Public export. |
PromptRunInput | type | Public export. |
PromptRunResult | type | Public export. |
ProviderHttpError | value | Public export. |
ProvidersConfig | type | Public export. |
ProviderSettings | type | Public export. |
pruneSnapshots | value | Public export. |
RateLimiter | type | Public export. |
RateLimiterAcquireOptions | type | Process-local rate limiter for outbound provider calls. Use to prevent a fleet of agents from stampeding a single API key when the host runs many sessions in parallel. The default token-bucket impl is in-memory; Redis-backed implementations are a v1.8+ topic. fabric-harness ships this as a generic primitive — the same limiter can be reused for outbound HTTP calls inside connectors, webhook fan-out, or anywhere else throttling is useful. |
ReaddirInput | type | Public export. |
readdirTool | value | Public export. |
ReadFileBufferInput | type | Public export. |
readFileBufferTool | value | Public export. |
ReadFileInput | type | Public export. |
readFileTool | value | Public export. |
readJsonBody | value | Reads the body once and returns the raw bytes, the decoded text, and the parsed JSON together — so a channel can HMAC-verify the exact bytes and use the JSON without re-reading the (already consumed) stream. Returns undefined only when the body exceeds limitBytes. |
readRequestBody | value | Reads the full request body as bytes, or returns undefined if it exceeds limitBytes. NOTE: this consumes the request stream (single read). Signature-verifying channels need the exact bytes for HMAC and the parsed JSON afterward — don't call request.json() as well. Use readJsonBody to get both from one read. |
ReconstructedPartialAssistantMessage | type | Public export. |
reconstructInterruptedStream | value | Public export. |
redactError | value | Public export. |
RedactionOptions | type | Public export. |
redactJson | value | Public export. |
redactText | value | Public export. |
registerCreatedAgentName | value | Register a name for a CreatedAgent so dispatch(agent, ...) can resolve it. |
registeredModelProviders | value | Names of externally registered providers, for diagnostics. |
registerJobName | value | Public export. |
registerModelPrices | value | Add or override price rows. Later rows take precedence over earlier ones. |
registerModelProvider | value | Register a model provider resolvable via FABRIC_MODEL=<name>/<model-id>. Built-in providers always take precedence; registering a name a built-in already owns has no effect on routing. Idempotent by name (last registration wins). Call at module import time. |
registerSandbox | value | Register a sandbox in the in-process registry and return a portable ref. Subsequent calls for the same env return the same ref. |
registerSandboxRefDecoder | value | Register a decoder for provider so attachSandbox(serialized) can rehydrate a sandbox from another process. Typically called once at startup by the package that owns the provider integration (e.g. @fabric-harness/connectors/e2b registers the e2b provider). |
RemoteSandboxApi | type | Public export. |
RemoteSandboxOptions | type | Public export. |
renderDeliveredMessage | value | Render a delivered message to the prompt text form. User messages pass their body through verbatim; signals render as their XML envelope via the shared renderSignalMessage machinery. |
RequestBody | type | Public export. |
resetDispatchRuntime | value | Clear the ambient dispatch runtime (tests/teardown). |
resetJobInvocationRuntime | value | Public export. |
resetModelPricesToBuiltins | value | Reset the registry to the built-in seed (test/utility). |
ResolvedModelProvider | type | Public export. |
resolveModelProvider | value | Public export. |
ResolveModelProviderOptions | type | Public export. |
resolveRuntimeMode | value | Resolve the effective runtime mode for an init() call, applying production safety rules: - In production (FABRIC_ENV=production or NODE_ENV=production), choosing stateless is allowed but logged as an explicit choice. - inline (the default) without an explicit SessionStore falls back to in-memory storage. In production this emits a warning unless FABRIC_ALLOW_EPHEMERAL_STATE=1 is set or runtime is explicitly 'stateless'. - Unknown runtime values fall through to 'inline' with a warning. |
RESULT_END_DELIMITER | value | Public export. |
RESULT_START_DELIMITER | value | Public export. |
ResultExtractionOptions | type | Public export. |
ResultOutcome | type | Public export. |
ResultToolBundle | type | Public export. |
ResultUnavailableError | value | Thrown when the LLM calls the give_up tool, indicating it cannot produce a result that conforms to the required schema. |
ResultValidator | type | Public export. |
RetrievedChunk | type | Generic, provider-agnostic retrieval seam. RAG is query-time, so it does NOT fit FilesystemSource (an eager full-dump mount) — a retriever resolves the top matches for a query on demand. Databricks Vector Search is the flagship implementation, but this is reusable for any vector store. |
RetrieveOptions | type | Public export. |
Retriever | type | Public export. |
RmInput | type | Public export. |
rmTool | value | Public export. |
Role | type | Public export. |
runAction | value | Validate input, run the action against host, validate + JSON-clone the output. The returned value is always safely serializable (a fresh JSON clone), so callers can persist or transmit it without sharing references. |
RunEvent | type | A workflow event with append-only identity enforced by (runId, eventIndex). |
RunRegistry | type | Minimal interface for a workflow run registry. Used by durable runtime backends to index and track run statuses. |
RunStore | type | Minimal interface for a workflow/event run store. Used by durable runtime backends (Temporal, Cloudflare, etc.) to persist run metadata and events. |
RuntimeModeResolution | type | Public export. |
runWithJobInvocation | value | Public export. |
runWithSubmissionContext | value | Run fn with context as the ambient submission correlation. |
SandboxAdapterDescriptor | type | Adapter expectations: - Every backend must expose the SandboxEnv contract above and map paths into a scoped workspace. - Secrets and provider credentials must stay in adapter-owned environment/config, not model context. - exec should enforce backend-specific command, network, and timeout policy before process launch. - snapshot/restore is optional because not all targets support filesystem or VM snapshots. - Future adapters should be added without changing session/runtime code. Planned backends: local, Docker, Azure Container Apps, Azure Container Instances, AKS, Databricks, E2B, Daytona, C... |
SandboxBackend | type | Public export. |
SandboxCapabilities | type | Public export. |
SandboxContinuityCapabilities | type | Public export. |
SandboxContinuityMode | type | Public export. |
SandboxEnv | type | Public export. |
SandboxExecOptions | type | Public export. |
SandboxFactory | type | Public export. |
SandboxFactoryOptions | type | Public export. |
SandboxFork | type | Public export. |
SandboxOwnershipLeaseStore | type | Public export. |
SandboxOwnershipOptions | type | Public export. |
SandboxRef | type | Public export. |
SandboxRefDecoder | type | Decoder for a SerializedSandboxRef.provider. Returns a SandboxFactory that, when invoked, produces a SandboxEnv connected to the existing remote sandbox identified by providerData. Decoders SHOULD attach without owning the remote sandbox's lifecycle — the returned env's cleanup() should detach, not destroy. |
SandboxSnapshot | type | Public export. |
sanitizeObservabilityData | value | Public export. |
sanitizePublicJson | value | Public export. |
sanitizePublicText | value | Remove credentials and host filesystem locations from caller-visible text. |
schema | value | Public export. |
Schema | type | Public export. |
SchemaIssue | type | Public export. |
SchemaValidationError | value | Public export. |
SearchToolInput | type | Public export. |
SearchToolOptions | type | Public export. |
SearchToolResult | type | Public export. |
secret | value | Public export. |
SecretProvider | type | Public export. |
SecretRef | type | Public export. |
SecretResolutionContext | type | Public export. |
secretResolver | value | Adapt a provider to the existing init({ resolveSecret }) callback. |
SerializedFabricError | type | Public export. |
SerializedSandboxRef | type | Cross-process / cross-machine sandbox reference. Created by session.sandboxRef({ portable: true }) and re-attached via attachSandbox(serialized) in a separate process. Each provider string maps to a decoder registered via registerSandboxRefDecoder(). |
serializeFabricError | value | Convert any thrown value into the stable public/developer transport shape. |
serializeSandboxRef | value | Serialize an in-process SandboxRef into the cross-process form. Requires the underlying sandbox to implement encodeRef(). Throws SANDBOX_UNAVAILABLE if the backend is in-process-only. |
SessionData | type | Public export. |
SessionEntry | type | Public export. |
SessionEntryType | type | Public export. |
SessionHistory | value | Public export. |
SessionMemory | type | Public export. |
SessionMemoryEntry | type | Persistent key/value store for facts an agent should remember across sessions — borrower preferences, prior outcomes, learned task history. Distinct from SessionEntry (which is the audit log): memory is for recall, entries are for audit. Memory writes do NOT land in the session log, so they don't pollute prompt context unless the agent explicitly reads them. Tenancy: every operation accepts an optional tenantId. Two tenants with the same key get isolated values. tenantId defaults to the empty string for non-tenant deployments. |
SessionMemoryFilter | type | Public export. |
SessionMemoryGetOptions | type | Public export. |
SessionMemorySetInput | type | Public export. |
SessionOptions | type | Public export. |
SessionStore | type | Public export. |
SessionSubmissionExecutorOptions | type | Public export. |
setLogger | value | Replace the global SDK logger. Call once at startup before any init(). Pass a custom Logger to redirect to your structured logging system. |
ShellOptions | type | Public export. |
shellQuote | value | Public export. |
ShellResult | type | Public export. |
Skill | type | Public export. |
SkillOptions | type | Public export. |
slackApprovalNotifier | value | Slack incoming-webhook notifier. The webhook URL remains in host configuration, never event data. |
SnapshotPruneOptions | type | Public export. |
SnapshotPruneResult | type | Public export. |
StatInput | type | Public export. |
statTool | value | Public export. |
StdioMcpClient | value | Public export. |
StdioMcpClientOptions | type | Public export. |
StoredAttachment | type | Public export. |
StreamChunkStore | type | Public export. |
StreamChunkWriter | value | Public export. |
StreamListenerRegistry | value | Process-local listener registry shared by store implementations — registration, unsubscribe-and-prune, and error-swallowing notify. |
SttEvent | type | Public export. |
SttProvider | type | Public export. |
SttSession | type | Public export. |
SttSessionOptions | type | Public export. |
SttSessionUsage | type | Public export. |
SubmissionAbortedError | value | Public export. |
SubmissionAdmissionBackend | type | Storage callbacks for admitSubmissionWithBackend. Every callback runs inside the transaction the caller has already opened (or the backend's equivalent atomicity scope). Callbacks may return plain values (synchronous backends) or native Promises — non-native thenables are not supported. |
SubmissionAdmissionRow | type | The minimal shape admitSubmissionWithBackend needs from a persisted submission row: the transport kind and persisted payload it compares against the incoming admission. payload may be the serialized JSON string or an already-deserialized object (e.g. a Postgres JSONB column). |
SubmissionAttemptRef | type | Public export. |
SubmissionClaimRef | type | Public export. |
SubmissionContext | type | Public export. |
SubmissionDurability | type | Public export. |
SubmissionExecuteOptions | type | Public export. |
SubmissionExecutor | type | How the runner touches sessions. execute applies the submission's input to the addressed instance session and resolves with the turn result; everything else is store-level and must not require a live agent. Contract requirements: - execute must be idempotent by submission id (a resumed attempt whose input entry already exists must not append it again). - recordTerminal settles the conversation to a deterministic rest state (unresolved trailing tool calls get explicit interrupted-outcome markers — NEVER re-executed) and appends a terminal advisory. - appendSettlement appends the cano... |
SubmissionInsertRow | type | The queued row that admitSubmissionWithBackend writes on first admission. |
SubmissionInspection | type | Coarse persisted-progress classification consumed by reconciliation. |
SubmissionInterruptedError | value | Public export. |
SubmissionInterruption | type | Public export. |
SubmissionPayloadContext | type | Context needed for submission payload validation. Implementations extract these fields from their storage-specific row/document type before calling isSubmissionPayload. |
SubmissionRetryExhaustedError | value | Public export. |
SubmissionRunner | type | Public export. |
SubmissionRunnerOptions | type | Public export. |
submissionSessionKey | value | Store-session FIFO key of a submission (re-exported convenience). |
SubmissionSettledRecord | type | Minimal canonical settlement record for a direct submission. The conversation-stream phase reuses this shape as the durable terminal record a reconnecting waiter observes. |
SubmissionSettlement | type | Public export. |
submissionSettlementEntryId | value | Deterministic canonical settlement entry id for a submission. |
SubmissionSettlementObligation | type | Public export. |
submissionStoreSessionId | value | The harness identity string (agent:<name>:<id>:<session>) targeted by a submission input. This is the persistentStoreSessionId of the addressed instance session and the per-session FIFO key of the store. |
SubmissionTelemetryEvent | type | Public export. |
SubmissionTelemetrySink | type | Public export. |
SubmissionTimeoutError | value | Public export. |
TaskOptions | type | Public export. |
TelemetryExporter | type | Public export. |
TelemetrySpan | type | Public export. |
tenantCostLimit | value | Sugar over CostLimit.perScope + scopeKey + store for the common "per-tenant ceiling per period" pattern. Pick one of perDayUsd, perHourUsd, or perMonthUsd; when multiple are set, the most restrictive (smallest absolute) wins. Scope key convention: tenant:<id>:<period> where <period> is day:YYYY-MM-DD, hour:YYYY-MM-DDTHH:00Z, or month:YYYY-MM. Reset semantics (rollover) are the host's job — call store.reset(scopeKey) from a scheduled task to clear the period total. See the package declarations for an example. |
TenantCostLimit | type | Public export. |
ThinkingLevel | type | Reasoning-effort input level, ordered from least to most thinking. Maps to each provider's native control (Workers AI / OpenAI reasoning_effort, Anthropic thinking.budget_tokens, Gemini thinkingConfig). 'off' (the default when unset) requests no reasoning. Providers that don't support reasoning ignore the level — see ModelMetadata.supportsReasoning. |
toFabricError | value | Public export. |
tokenBucketRateLimiter | value | In-memory token-bucket rate limiter. Each key has its own bucket — keys are independent (waiting on one key doesn't block another). Buckets refill continuously at tokensPerSecond. |
TokenBucketRateLimiterOptions | type | Public export. |
ToolCall | type | Public export. |
ToolCallResult | type | Public export. |
ToolContext | type | Public export. |
ToolDef | type | Public export. |
ToolEffect | type | Public export. |
ToolPolicy | type | Public export. |
toolsToModelSchemas | value | Public export. |
toOpenAIMessage | value | Public export. |
toOpenAITool | value | Public export. |
TtsProvider | type | Public export. |
TtsSynthesisOptions | type | Public export. |
TtsSynthesisUsage | type | Public export. |
TurnJournalState | type | Public export. |
UnifiedInMemoryStore | value | A unified in-memory store that implements SessionStore, StreamChunkStore, and RunStore. Useful for testing and dev environments where a single object needs to be passed as store, streamChunkStore, and runStore. Backed by separate Maps for each concern so that stream chunks and run data do not pollute session state. |
UnimplementedSandboxEnv | value | Public export. |
unregisterSandbox | value | Mark a registered sandbox as dead so future attach attempts fail. Called from the owner session's cleanup path. |
unregisterSandboxRefDecoder | value | Test/internal: remove a decoder. |
validateResult | value | Public export. |
VERCEL_AI_GATEWAY_BASE_URL | value | Default base URL for Vercel AI Gateway's OpenAI-compatible Chat Completions endpoint. The gateway accepts the standard OpenAI request body and routes through to the configured provider; switching from OpenAI to the gateway is just a base-URL change. See https://vercel.com/docs/ai-gateway/sdks-and-apis/openai-compat |
vercelAIGateway | value | Vercel AI Gateway model provider. The gateway is an OpenAI-compatible HTTP endpoint that brokers between your agent and any of the major model providers (OpenAI, Anthropic, Google, xAI, Groq, etc.) with a single key, observability, caching, and spend controls. Use this provider on any deploy target — Node, Cloudflare Workers, Vercel — to route inference through the gateway. See the package declarations for an example. Returns an OpenAICompatibleModelProvider configured for the gateway — use it anywhere a ModelProvider is accepted. Compatible with fabric-harness's tool-calling, retries,... |
VercelAIGatewayProviderOptions | type | Public export. |
verifyAttachmentBytes | value | Verify that bytes match the ref's digest (and declared size), throwing AttachmentStoreError('DIGEST_MISMATCH') otherwise. Every store's put MUST run this check before persisting. |
verifyHmacSha256 | value | Constant-time HMAC-SHA256 verification (via crypto.subtle.verify). |
VertexAIModelProvider | value | Public export. |
VertexAIProviderOptions | type | Public export. |
VirtualSandboxEnv | value | Virtual sandbox backend powered by just-bash. Provides an in-memory filesystem and a bash subset (grep, glob, cat, read, mkdir, rm, ls, echo, etc.) without shelling out to the host. The backend is fast, cheap, safe, and high-concurrency. Selected automatically by the bare @fabric-harness/sdk import when the caller doesn't pass sandbox. Override with 'local', 'docker', a SandboxFactory, or a SandboxEnv when you need real shell access. |
VoiceAudioFormat | type | Bidirectional voice / audio streaming surface. fabric-harness ships an OpenAI Realtime implementation; bring-your-own-vendor for Anthropic / Gemini Live / on-prem TTS+ASR pipelines. Audio frames flow in raw bytes — the standard format is PCM 16-bit little-endian at 24kHz mono (OpenAI Realtime default). Telephony bridges (Twilio Media Streams μ-law 8kHz, etc.) resample at the edge. Tool execution is the caller's responsibility: a tool_call event surfaces, the host code runs the tool through whatever governance gates apply (approvals, cost caps, rate limits), then calls `submitToolResult(... |
VoiceConnectOptions | type | Public export. |
VoiceEvent | type | Events streamed from a VoiceSession. audio_delta carries raw audio bytes; text_delta and transcript carry text; tool_call and response_done mark structured boundaries; error is fatal. |
VoiceProvider | type | Public export. |
VoiceSession | type | Public export. |
VoiceToolResultInput | type | Public export. |
VoiceWsClientEvent | type | Public export. |
VoiceWsClientHandle | type | Public export. |
VoiceWsClientOptions | type | Lightweight WebSocket client for the fh server WS /sessions/:id/voice endpoint. Server-side bridge owns the provider connection and API keys; this client just streams audio + control messages over WS. Works in browsers and on Node 22+ (uses the global WebSocket). |
webhookApprovalNotifier | value | Public export. |
WebhookSubscriptionContext | type | Generic webhook subscription primitive — wakes an agent on inbound events from any external system (event bus, queue, scheduler, third-party SaaS webhook, your own application's domain events). fabric-harness consumes a JSON payload and dispatches to the user-provided handler. The host event system decides which payloads land here; fabric-harness has no opinion on event taxonomy or producer. |
WebhookSubscriptionDefinition | type | Public export. |
withConversationProjection | value | Wrap a SessionStore so active-path appends are mirrored into an append-only ConversationStreamStore projection (v2 A4). The SessionEntry DAG stays the single source of truth; the stream gives clients offset-based catch-up + live tail. Two rules keep them coherent: 1. Idempotent by entryId — a crash between the DAG write and the stream write is repaired on the next append: the projector diffs the stream tail against the active path and re-emits anything missing. 2. Truncation is explicit — the DAG can branch (fork/replay/ checkpoint-restore rewrite leafId); the stream cannot. W... |
withFilesystemSources | value | Public export. |
WriteFileInput | type | Public export. |
writeFileTool | value | Public export. |
WsClientCommand | type | Public export. |
WsClientHandle | type | Public export. |
WsClientOptions | type | Lightweight WebSocket client for the fh server WS /sessions/:id/ws endpoint. Works in browsers and on Node 22+ (uses the global WebSocket). Does NOT depend on the ws package — that's the server side's optional peer dep. |
@fabric-harness/sdk/strict
| Export | Kind | Summary |
|---|---|---|
actionAsTool | value | Expose an action to the model as a tool on an agent profile. The tool's JSON schema comes from the action's input schema; execution validates input/output exactly like runAction. |
ActionContext | type | Context passed to an action's run. Unlike a tool's execute (a leaf capability invoked by the model), an action receives the harness itself and can orchestrate: prompt models, spawn sessions, call other actions. |
ActionDefinition | type | A named, schema-validated unit of harness work created with defineAction. First-class in v2: registrable on agent profiles as a tool, callable from jobs and agents, evaluable via fh test, and deployable as a platform job task. |
ActionError | value | Public export. |
ActionHost | type | What an action runs against: the harness entry point (init can prompt models, spawn sessions, and call tools) plus the platform environment. Jobs, agents, and servers all satisfy this — it is the harness slice of FabricContext. |
ActionOptions | type | Public export. |
ActorIdentity | type | Public export. |
admitSubmissionWithBackend | value | Shared submission admission algorithm for row-oriented backends: dispatch-receipt check → insert-or-ignore → read-back → payload compare (idempotent replay vs. conflict). The message payload is stored as JSON verbatim; payload identity is deep JSON equality, so a backend that normalizes stored JSON (e.g. Postgres JSONB key ordering) still recognizes an exact replay. The caller owns transaction scoping — invoke this inside one transaction and pass callbacks bound to it. When every callback is synchronous the result is returned synchronously, so the algorithm also fits synchronous backends. |
agent | value | No-defaults agent builder. Exported as agent from @fabric-harness/sdk/strict. Every init() option must be declared explicitly — useful for Temporal replay determinism and audit/compliance workloads where implicit behaviour is unwelcome. |
AgentAttemptMarker | type | Harness-owned durable evidence that a submission attempt was started and has not yet settled. A coordinator inserts a marker immediately before starting an attempt and deletes it when the attempt settles; reconciliation treats a fresh marker as proof that the attempt may still be running and must not be reconciled as interrupted. |
AgentDefinition | type | Public export. |
AgentDispatchAdmission | type | Public export. |
AgentDispatchReceipt | type | Public export. |
AgentDispatchRequest | type | Async delivery request to a persistent agent instance + session. |
AgentEvent | type | Public export. |
AgentEventBase | type | Common envelope shared by every event variant. |
AgentEventCallback | type | Callback signature accepted by init({ onEvent }), agent.session(id, { onEvent }), and session.prompt(text, { onEvent }). |
AgentEventType | type | Public export. |
AgentInit | type | Public export. |
AgentLoopRuntime | type | Public export. |
AgentSubmission | type | Public export. |
AgentSubmissionDurability | type | Public export. |
AgentSubmissionInput | type | One admitted agent submission — the persisted operational payload for both transports. kind records how the submission arrived ('dispatch' via dispatch(), 'direct' via the agent HTTP route); a dispatch's submissionId is the public dispatchId from its receipt. |
AgentSubmissionStatus | type | Public export. |
AgentSubmissionStore | type | Durable submission lifecycle storage. Stability: the lease method group mirrors the durable-execution engine and is subject to change until 1.0. This applies to every backend equally. |
AgentTriggers | type | Public export. |
aiGateway | value | Generic OpenAI-compatible AI gateway helper. Use for any gateway that speaks the OpenAI Chat Completions request/response shape: Helicone, Portkey, LiteLLM (self-hosted), Cloudflare AI Gateway, internal corp proxies, etc. See the package declarations for an example. For Vercel AI Gateway, prefer the vercelAIGateway preset — same factory under the hood with the gateway URL pre-baked. |
AIGatewayOptions | type | Public export. |
AnthropicModelProvider | value | Public export. |
AnthropicProviderOptions | type | Public export. |
applyEstimatedCost | value | Idempotently populate usage.costUsd from the static price table. Mutates usage and returns it. No-op when: - usage is undefined, - usage.costUsd is already set (provider supplied it directly), - no price row matches modelRef. |
ApprovalCallback | type | Public export. |
ApprovalDecision | type | Public export. |
ApprovalNotification | type | Public export. |
ApprovalNotificationDeadLetter | type | Public export. |
ApprovalNotificationDeliveryStore | type | Public export. |
approvalNotificationFromEvent | value | Public export. |
approvalNotificationHandler | value | Convert approval events into retryable, deduplicated notifications. This callback never throws. |
ApprovalNotificationHandlerOptions | type | Public export. |
ApprovalNotificationState | type | Public export. |
ApprovalNotifier | type | Public export. |
ApprovalOptions | type | Public export. |
ApprovalPolicyRule | type | Per-pattern approval metadata. Lets policy authors route specific tools/commands to a named audience (e.g. 'reviewer', 'compliance-team', 'project-admin'). The audience id is opaque to fabric-harness — host applications map ids to humans via their own identity layer. |
ApprovalRequest | type | Public export. |
ApprovalResponse | type | Public export. |
ApprovalRisk | type | Public export. |
ApprovalState | type | Public export. |
approvalStatesFromEntries | value | Public export. |
ApprovalStateStatus | type | Public export. |
ApprovalUnavailableStrategy | type | Public export. |
ApprovalVote | type | Public export. |
ArtifactCreateOptions | type | Public export. |
ArtifactRef | type | Public export. |
assertEnforceableNetworkPolicy | value | Refuse production network policy when it can be bypassed by code in the sandbox. This validates an operator assertion; the named network boundary must still be provisioned by Docker, Kubernetes, or the cloud provider. |
attachmentDigest | value | Lowercase hex SHA-256 of the bytes (WebCrypto). |
AttachmentLimitError | value | Public export. |
AttachmentPutInput | type | Public export. |
AttachmentRef | type | Content-addressed descriptor of one stored attachment. |
AttachmentStore | type | Durable content-addressed attachment storage. - put is idempotent by (scope, digest) — re-putting the same content succeeds without duplicating storage (the first stored ref metadata is retained). It MUST verify the digest against the bytes and reject a mismatch with AttachmentStoreError('DIGEST_MISMATCH') before writing. - get/getByAttachmentId return null on a miss. - delete removes one stored attachment and throws AttachmentStoreError('NOT_FOUND') when nothing is stored under (scope, digest). |
AttachmentStoreError | value | Public export. |
attachSandbox | value | Build a SandboxFactory that, when invoked, returns an AttachedSandboxEnv delegating to the registered sandbox without owning its lifecycle. Calling cleanup() on the attached env unregisters this attachment but does NOT tear down the underlying sandbox. Pass an in-process SandboxRef to attach within the same process, or a SerializedSandboxRef (from session.sandboxRef({ portable: true })) to rehydrate a sandbox handed off from another process. Cross-process refs require a decoder registered for serialized.provider via registerSandboxRefDecoder(). |
AutonomyMode | type | Public export. |
AutonomyOptions | type | Public export. |
AzureOpenAIModelProvider | value | Public export. |
AzureOpenAIProviderOptions | type | Public export. |
BashInput | type | Public export. |
bashTool | value | Public export. |
BedrockModelProvider | value | Public export. |
BedrockProviderOptions | type | Public export. |
buildModelMessagesFromHistory | value | Public export. |
buildResultFollowUpPrompt | value | Follow-up prompt sent when the LLM ends a turn without calling finish or give_up. |
buildResultFooter | value | Footer appended to user prompts/skill bodies when a result schema is set. |
buildResultRetryPrompt | value | Public export. |
BuiltinFileTool | type | Public export. |
BuiltinTool | type | Public export. |
bytesToHex | value | Public export. |
CapabilityPolicy | type | Public export. |
CartesiaSttProvider | value | Public export. |
CartesiaSttProviderOptions | type | Public export. |
CartesiaTtsProvider | value | Public export. |
CartesiaTtsProviderOptions | type | Public export. |
chainSecretProviders | value | Resolve from providers in order; errors fail closed instead of falling through. |
Channel | type | Public export. |
ChannelContext | type | Public export. |
ChannelDispatch | type | Public export. |
ChannelDispatchRequest | type | Public export. |
ChannelRoute | type | Channels turn platform webhooks (Slack, GitHub, …) into agent dispatches. Handlers are written against the Web Request/Response API and crypto.subtle, so the same channel runs on Node and Cloudflare. A channel is a stateless route container plus a conversation-id (de)serializer — session continuity falls out of the key (same thread → same key → same session). |
CheckpointCreateOptions | type | Public export. |
CheckpointRestoreOptions | type | Public export. |
CheckpointResult | type | Public export. |
clampCommandTimeout | value | Public export. |
clampReadLimit | value | Public export. |
classifySubmissionState | value | Classify how far a persisted submission input progressed. - absent — the input entry never landed in session history: the attempt crashed before applying it. Safe to requeue for a clean first attempt. - completed — finished work: a canonical settlement entry exists, an assistant response follows the input with no unresolved trailing tool batch, or a later user input shows the conversation moved on. Settle as success; never retry (retrying completed work is the one unrecoverable corruption). - continuable — the trailing turn carries unresolved tool calls. The next session.prompt() re... |
CohereModelProvider | value | Public export. |
CohereProviderOptions | type | Public export. |
combineSubmissionTelemetrySinks | value | Fan one event out to several sinks. |
Command | type | Public export. |
CommandEnvValue | type | Public export. |
CommandPolicy | type | Public export. |
CommandToolInput | type | Public export. |
CommandToolOptions | type | Public export. |
CompactionOptions | type | Public export. |
CompactionResult | type | Public export. |
configureDispatchRuntime | value | Configure the ambient dispatch queue used by dispatch. |
configureJobInvocationRuntime | value | Public export. |
connectFabricVoice | value | Public export. |
connectFabricWs | value | Public export. |
connectMcpServer | value | Public export. |
consoleTelemetryExporter | value | Telemetry exporter that writes spans through the SDK logger (default console-backed). Useful for local development and as a fallback when no OpenTelemetry collector is wired up. Use openTelemetryExporter or langfuseExporter for production. |
ContextBudget | type | Public export. |
ContextBudgetOptions | type | Public export. |
CONVERSATION_STREAM_DEFAULT_READ_LIMIT | value | Public export. |
CONVERSATION_STREAM_MAX_READ_LIMIT | value | Public export. |
conversationKey | value | Public export. |
ConversationProducerClaim | type | Public export. |
ConversationProjector | value | Public export. |
ConversationStreamAppendInput | type | Public export. |
ConversationStreamBatch | type | Public export. |
ConversationStreamIdentity | type | Public export. |
ConversationStreamMeta | type | Public export. |
conversationStreamPath | value | Stream path for a session's conversation projection. |
ConversationStreamReadResult | type | Public export. |
ConversationStreamRecord | type | Append-only conversation stream — the durable, offset-addressable projection of a session's active path (v2 migration, phase A4). The SessionEntry DAG remains the single source of truth for model context; this stream exists so clients can read a conversation with offsets (catch-up + live tail), across processes, without count-based replay. The projection appends one record per active-path entry, and — because the DAG can branch (fork/replay/checkpoint-restore) while a stream cannot — an explicit truncated record whenever the active path rewinds, paired with a producer-epoch bump so stale... |
ConversationStreamStore | type | Durable append-only conversation stream storage. Batch atomicity is a hard contract requirement: every record in an append must be persisted together under one offset, all-or-nothing. First-party adapters satisfy this by serializing the batch into a single row/document write; an adapter that splits records across non-atomic writes violates the contract. Producer fencing: acquireProducer bumps the producer epoch; appends carrying a stale epoch are rejected. The (path, producerId, epoch, sequence) uniqueness makes redelivered appends idempotent — a retried append with the same coo... |
ConversationStreamStoreError | value | Public export. |
CostBudgetStore | type | Async store for cross-process spend aggregation. Pair with CostLimit.scopeKey + CostLimit.perScope to enforce a budget that survives process restarts — "tenant:acme spends ≤ $50 today" or "company-wide ≤ $100 this hour". Built-in implementations: - inMemoryCostBudgetStore() — process-local; default. - @fabric-harness/node exposes postgresCostBudgetStore({ pool }). |
CostBudgetTracker | value | Tracks cumulative session spend. Cheap to construct; one per session. |
CostLimit | type | Public export. |
CostLimitContext | type | Public export. |
CostLimitExceededError | value | Public export. |
createAgent | value | Define a persistent, URL-addressable agent. Files in .fabricharness/agents/ default-export createAgent(...); the runtime resolves a fresh config per interaction and keeps sessions across direct prompts and dispatched inputs. |
createAttachmentRef | value | Build an AttachmentRef for the given bytes, computing the SHA-256 digest via WebCrypto (crypto.subtle) so the SDK stays runtime-agnostic. |
createBuiltinTools | value | Public export. |
createCommandTools | value | Public export. |
createConsoleLogger | value | Build a Console-backed logger with an explicit level. Useful for tests that want to capture or silence SDK output without touching globals. |
CreatedAgent | type | A persistent, addressable agent created with createAgent. Distinct from a finite agent({ run }) job: it has no run — the initializer returns configuration, and the runtime maintains sessions across interactions. |
createDirectAgentSubmissionInput | value | Mint a direct-prompt submission input with a fresh submission id. |
createDispatchAgentSubmissionInput | value | Map a DispatchInput onto the persisted submission input shape. |
createFabricContext | value | Public export. |
createFabricFs | value | Adapt a sandbox into the public filesystem convenience surface. |
createFileTools | value | Public export. |
createMcpAuthorizationCodeAuth | value | Authorization-code + PKCE provider; the MCP SDK refreshes stored tokens automatically. |
createMcpClientCredentialsAuth | value | OAuth client-credentials provider with MCP SDK token refresh handling. |
createMcpTools | value | Public export. |
CreateMcpToolsOptions | type | Public export. |
createObservabilityObserver | value | Create a fail-open event observer suitable for Braintrust, Sentry, Jetty, or a custom sink. |
createObservabilityRecord | value | Convert a Fabric event into a vendor-neutral, low-cardinality record. |
createOperationalMetricsCollector | value | Low-cardinality operational metrics collector suitable for OTel/Prometheus bridging. |
createPiAgentLoopRuntime | value | Public export. |
createRemoteSandboxEnv | value | Wrap a provider-owned remote sandbox client in Fabric's SandboxEnv contract. Provider credentials and SDK objects remain outside model context/history; Fabric only sees the narrow file/shell/snapshot API exposed here. |
createResultTools | value | Produce the per-call finish and give_up tool pair for a given ResultValidator. - finish's parameters are a generic JSON Schema object because we can't derive a precise schema from ResultValidator. The validator's safeParse handles actual validation. - First successful finish (or give_up) call wins. Subsequent calls return an error tool result rather than throwing, to keep the conversation transcript natural. |
createSandboxEnv | value | Public export. |
createScopedSandboxEnv | value | Return a view of a sandbox with a narrower default cwd. Relative file paths and shell cwd values are resolved from this scoped cwd while the underlying sandbox still enforces its workspace boundary. |
createSearchTool | value | Exposes a Retriever to the model as a search tool. The tool is read-only; wrap it with a governance decorator to stamp lineage or route approvals. |
createStdioMcpClient | value | Public export. |
createSubmissionRunner | value | Public export. |
createVirtualSandboxEnv | value | Public export. |
CredentialMissingStrategy | type | Public export. |
currentJobInvocation | value | Public export. |
currentSubmissionContext | value | The submission owning the current execution, or undefined outside one. |
DeepgramSttProvider | value | Public export. |
DeepgramSttProviderOptions | type | Public export. |
DEFAULT_HEADLESS_PREAMBLE | value | Public export. |
defaultLoopRuntime | value | Public export. |
defaultModelProvider | value | Public export. |
defaultSessionStore | value | Public export. |
defineAction | value | Define an action — the harness-context counterpart to defineTool. A tool is a leaf capability the model calls; an action holds the harness (context.init) and can prompt, spawn sessions, and compose other work. Input/output use the harness schema builders and are validated on every runAction call; outputs must be JSON-serializable. |
defineAgent | value | Canonical v2 name for createAgent: persistent, URL-addressable agents are defined, and the runtime instantiates them per addressed id. createAgent remains supported as an alias. |
defineChannel | value | Validates and brands a channel's routes. |
defineCommand | value | Public export. |
DefinedAgent | type | Public export. |
defineJob | value | No-defaults finite-job builder with lazy default-session helpers. |
defineTool | value | Public export. |
defineWebhookSubscription | value | Helper that returns the definition unchanged. Useful for type inference and to keep agent files declarative. See the package declarations for an example. |
DeletionCompletionRecord | type | Public export. |
DeliveredAttachment | type | One attachment on a kind: 'user' message. Today the only supported attachment is an image, carried either inline (data, base64) or as a durable content-addressed reference (ref) once an attachment store is configured — admission materializes inline bytes into refs. An attachment must carry data or ref (or both, transiently during materialization). |
DeliveredAttachmentRef | type | Durable reference to attachment bytes in an attachment store. |
DeliveredMessage | type | DeliveredMessage — the single unified input shape for everything that enters a persistent agent's session: direct HTTP prompts, dispatch, channels/webhooks, Databricks events, SDK clients, and tests. kind: 'user' is a direct user talking to the assistant (1:1 chat surface), optionally carrying attachments. kind: 'signal' models everything beyond that direct exchange — a Slack thread or a Lakeflow job event is activity the agent observes, not the assistant's own user speaking. Sender identity and structured metadata go in attributes; the message itself in body. Signals render into mo... |
deliveredSignalToEntryData | value | Map a signal-kind message onto the persisted signal entry's data shape. |
deriveCompactionDefaults | value | Compute model-aware compaction defaults. Reserve is capped at the model's max output because reserving more than the model can emit in one turn wastes context; the preserved tail stays flat because recent-context fidelity depends on the active work, not on the model's total window size. |
dispatch | value | Public export. |
DispatchInput | type | Internal enqueued form, carrying correlation + isolation metadata. |
DispatchProcessor | type | Consumes enqueued dispatches and applies them to an instance session. |
DispatchQueue | type | Admission queue for dispatches. The default is in-process; durable backends implement the same shape. |
DispatchReceipt | type | Acceptance confirmation for an enqueued dispatch. |
DockerSandboxEnv | value | Public export. |
DockerSandboxOptions | type | Public export. |
DURABILITY_DEFAULT_MAX_ATTEMPTS | value | Default maximum total attempts before terminalization. |
DURABILITY_DEFAULT_TIMEOUT_MS | value | Default submission timeout in milliseconds (one hour). |
DurableSessionRuntime | type | Structural delegate for durable session execution. When init() is given a sessionRuntime factory that produces one of these, the SDK's session calls (prompt, task, shell, checkpoint.*) are routed through the runtime instead of executing inline. This is the seam for Temporal workflows, external orchestration runtimes, or test fakes. mount, history, artifact, and compact remain SDK-local concerns and are not delegated — they operate against the local session store. |
DurableSessionRuntimeFactory | type | Public export. |
editFileTool | value | Public export. |
EditInput | type | Public export. |
ElevenLabsTtsProvider | value | Public export. |
ElevenLabsTtsProviderOptions | type | Public export. |
EmbeddingProvider | type | Embeddings seam. Feeds self-managed-embedding vector indexes (embed the query → query vector) and any bring-your-own retrieval pipeline. Returns one vector per input text, order-preserving. |
emitOpenTelemetrySpan | value | Public export. |
emitSubmissionTelemetry | value | Deliver an event to a sink, swallowing (and reporting) sink failures. |
EmptySandboxEnv | value | Public export. |
enqueueDispatch | value | Validate + normalize a named request and enqueue it, generating the dispatch id. |
entryToTelemetrySpan | value | Public export. |
environmentSecretProvider | value | Runtime-only environment provider with optional prefix and explicit allowlist. |
EnvironmentSecretProviderOptions | type | Public export. |
estimateCostUsd | value | Estimate USD cost for a single model call. Returns 0 when no row matches modelRef — callers should treat 0 as "unknown" and not overwrite an existing costUsd from the provider. |
estimateModelMessagesTokens | value | Public export. |
estimateSessionEntriesTokens | value | Public export. |
estimateTextTokens | value | Public export. |
evaluateCommandPolicy | value | Public export. |
evaluateContextBudget | value | Public export. |
evaluateNetworkPolicy | value | Evaluate a URL or Request against the configured network policy. Returns { allowed: true } when the request is permitted, otherwise a denial with the reason and matched pattern. |
evaluateOperationalSlos | value | Public export. |
evaluateToolCallPolicy | value | Public export. |
eventToTelemetrySpan | value | Public export. |
ExistsInput | type | Public export. |
existsTool | value | Public export. |
extractResultValue | value | Public export. |
FABRIC_OPERATIONAL_METRICS | value | Public export. |
FabricActor | type | Public export. |
FabricAgent | type | Public export. |
FabricContext | type | Public export. |
FabricError | value | Public export. |
FabricErrorCode | type | Public export. |
FabricErrorOptions | type | Public export. |
FabricEvent | type | Public export. |
FabricEventCallback | type | Public export. |
FabricEventType | type | Public export. |
FabricFs | type | Out-of-band filesystem surface for a session sandbox. These operations do not write to conversation history and are intended for host-side plumbing: staging files, collecting artifacts, and preparing scratch space. If the model should reason about a file, prompt it to use the normal read/write/edit tools instead. |
FabricObservabilityRecord | type | Public export. |
FabricPrincipal | type | The governed identity a piece of work runs as (v2). Distinct from ActorIdentity (who asked): the principal is what the platform's access control enforces — a human user, a machine service principal, or a hosted app's own identity. ucPrincipal carries the catalog-governance principal name when the platform has one (e.g. Unity Catalog). |
FabricRuntime | type | Execution runtime selection. - inline (default): single-process execution. Uses the configured SessionStore (in-memory by default) for history, artifacts, approvals. - stateless: explicit headless / ephemeral mode. No session store, no artifact persistence, no approval waiting. Each invocation is independent. Use for high-volume webhook agents and edge runtimes where state would just be discarded anyway. In production (FABRIC_ENV=production or NODE_ENV=production) this mode must be selected explicitly — inline without an explicit store will warn or fail depending on `FABRIC_ALLO... |
FabricSession | type | Public export. |
FallbackModelProvider | value | Public export. |
FallbackModelProviderOptions | type | Public export. |
FileStat | type | Public export. |
FilesystemEntry | type | Public export. |
FilesystemPolicy | type | Public export. |
FilesystemSource | type | A read-only content source that can be mounted into a sandbox at sandbox-creation time. The agent then has built-in read, glob, and grep tools available over the mounted content — no retrieval pipeline, no embeddings, no vector store required. Sources are intentionally minimal: they yield (path, content) pairs. Implementations decide how to enumerate (eager vs lazy is up to the source author) — the mount step pulls the full set into the sandbox. |
findSubmissionInputIndex | value | Index of the (last) user_prompt entry carrying the submission id, or -1. |
findTrailingDanglingToolCalls | value | Find trailing tool_call entries on the active path that were never settled — no matching tool_result (paired by toolCallId, falling back to tool name) and no subsequent error entry for the same tool. A dangling call means a model turn died (crash/abort) between recording the call and recording its outcome. Left in place it produces an assistant tool_use with no tool_result on resume, which providers reject — the repair path appends synthetic interrupted outcomes for exactly the entries returned here. Conservative by construction: only the window after the last turn boundary (use... |
findTrailingUnfinishedTasks | value | Trailing task_start entries in the same window with no matching task_end — a subtask that was in flight when the turn died. These do not corrupt model context (task entries are bookkeeping), but settling them keeps UI/audit state coherent. |
formatSchemaIssues | value | Public export. |
formatStreamOffset | value | Public export. |
fumadocsSource | value | Mount a local Fumadocs content directory as a knowledge base. Strips MDX frontmatter by default for cleaner agent context. For a published Fumadocs site, fetch its llms.txt / sitemap and pass the URLs to httpFilesystemSource. |
GeminiModelProvider | value | Public export. |
GeminiProviderOptions | type | Public export. |
generateAffinityKey | value | Generate a deterministic aff_\u003cULID\u003e affinity key from an (agentId, sessionId) pair. The same pair always produces the same key, which is stable across restarts. Different pairs produce different keys with overwhelming probability. |
generateWithRuntime | value | Public export. |
getAgentDefinition | value | Public export. |
getCreatedAgent | value | Return the CreatedAgent carried by a value, or undefined. |
getLogger | value | Get the currently configured logger. |
getVirtualSandbox | value | One-liner helper for the most common pattern: mount a single read-only source into a virtual sandbox. Equivalent to: See the package declarations for an example. Used for support agents, runbook lookup, FAQ assistants — anywhere a small Markdown corpus needs to be searchable via the agent's built-in grep/glob/read tools. See the package declarations for an example. |
GlobInput | type | Public export. |
globTool | value | Public export. |
GrepInput | type | Public export. |
GrepMatch | type | Public export. |
grepTool | value | Public export. |
hasSubmissionSettledEntry | value | True when the path carries a canonical submission_settled entry for the id. |
hexToBytes | value | Public export. |
hmacSha256 | value | Public export. |
httpFilesystemSource | value | Fetch a list of URLs and mount each response body as a file. Useful for pulling a small published docs set into the sandbox so the built-in read/grep/glob tools can search it like local files. |
HttpResource | type | Public export. |
init | value | Public export. |
initializePersistentAgent | value | Resolve a persistent agent's config for an instance and build a FabricAgent. Runtime-specific resources (session store, workspace roles/skills, loop runtime) are layered by the host that calls this. |
inMemoryApprovalNotificationStore | value | Process-local atomic delivery state for development and single-process hosts. |
InMemoryAttachmentStore | value | In-memory attachment store (dev / runtime: 'stateless' / tests). |
InMemoryConversationStreamStore | value | In-memory conversation stream store (dev / runtime: 'stateless' / tests). |
inMemoryCostBudgetStore | value | Process-local cost budget store. Default when store is not provided. |
InMemoryDispatchQueue | value | In-process dispatch queue: microtask-drained, concurrent across sessions, serialized within a single session. Suitable for the inline/stateless runtimes and dev. Durable delivery (surviving restarts) is provided by the Temporal-backed queue, which implements this same interface. |
inMemorySessionMemory | value | Process-local in-memory implementation. Default when init({ memory }) is not configured — pair with Postgres for durability across restarts. |
InMemorySessionStore | value | Public export. |
inMemorySource | value | Build a source from an in-memory map of path -> content. Useful for tests, fixtures, and small static knowledge bases bundled into the agent module itself. |
InMemorySubmissionStore | value | Public export. |
InterruptedToolCallRef | type | A tool call settled with an explicit interrupted-outcome marker at terminalization. |
InvalidDeliveredMessageError | value | Thrown by parseDeliveredMessage on malformed input. |
invoke | value | Public export. |
isActionDefinition | value | Public export. |
isContextOverflowError | value | Public export. |
isCreatedAgent | value | Whether a value is a CreatedAgent. |
isDeliveredMessageShape | value | True when a raw value already looks like a DeliveredMessage (has a valid kind). |
isEvent | value | Type guard: narrow an AgentEvent to a specific variant. See the package declarations for an example. |
isFabricError | value | Public export. |
isInMemoryStore | value | Returns true when store is the in-memory default (no appendEntry persistence beyond memory). Used by stateless mode to skip writes. |
isStatelessRuntime | value | Public export. |
isSubmissionPayload | value | Validate that a parsed JSON payload matches the expected submission shape. Used after deserializing a persisted payload to verify the object is a well-formed AgentSubmissionInput that is consistent with the stored submission metadata. Both dispatch and direct payloads carry the same message: DeliveredMessage field — validated identically here regardless of transport kind. |
isValidAffinityKey | value | Public export. |
job | value | No-defaults agent builder. Exported as agent from @fabric-harness/sdk/strict. Every init() option must be declared explicitly — useful for Temporal replay determinism and audit/compliance workloads where implicit behaviour is unwelcome. |
JobContext | type | Runtime-ready context for finite jobs. The default session is initialized lazily. |
JobDefinition | type | Public export. |
JobInvocationContext | type | Public export. |
JobInvocationOptions | type | Public export. |
JobInvocationReceipt | type | Public export. |
JobInvocationRuntime | type | Public export. |
JobMiddleware | type | Public export. |
JournalCallbacks | type | Public export. |
jsonDeepEqual | value | Structural equality over JSON values (objects compared key-order-insensitively). |
JsonObject | type | Public export. |
JsonPrimitive | type | Public export. |
JsonSchemaObject | type | Public export. |
JsonValue | type | Public export. |
LangfuseClientLike | type | Optional Langfuse exporter. Adapts Fabric's TelemetrySpan shape to Langfuse's tracing API. The Langfuse client is provided by the caller — we don't take a hard dependency. Install peer dep: See the package declarations for an example. Usage: See the package declarations for an example. |
langfuseExporter | value | Public export. |
LangfuseExporterOptions | type | Public export. |
LEASE_DURATION_MS | value | Default lease duration for submission ownership in milliseconds (30 seconds). |
listModelPrices | value | All currently-registered rows (newest-last). Returns a copy. |
listSandboxRefDecoders | value | Returns the list of currently registered providers. |
localDirectorySource | value | Read a host directory recursively as a read-only source. include is called for each candidate file path (relative to hostPath). Return false to skip. Defaults to including everything. |
LocalSandboxEnv | value | Public export. |
LocalSandboxOptions | type | Public export. |
Logger | type | Minimal logger seam used by the SDK for non-event diagnostic output (warnings, deprecation notices, telemetry fallbacks). All console.* inside the SDK should route through getLogger() so ops teams can redirect or silence messages in production. The default logger writes to console and respects FABRIC_HARNESS_LOG_LEVEL=debug|info|warn|error|silent (default warn). |
LogLevel | type | Public export. |
lookupModelPrice | value | Look up the most recently-registered row matching modelRef. modelRef can be: - 'provider/model' (preferred, e.g. 'openai/gpt-4o') - 'model' alone (e.g. 'gpt-4o') — first row whose model matches wins Provider matching is case-insensitive. Model matching is exact. |
materializeMessageAttachments | value | Materialize a message's inline attachments into durable refs: decode the base64 data, store the bytes under scope, and return a NEW message whose attachments carry { type, mimeType, filename?, ref } and no data. Deterministic by construction — attachment ids are ${idPrefix}_${index} and digests derive from content — so an exact redelivery of the same message produces an identical materialized payload (admission idempotency). Messages without inline attachments are returned unchanged (same reference). |
MAX_ATTACHMENT_DATA_LENGTH | value | Maximum accepted base64 length for a single inline attachment. |
McpAuthorizationCodeOptions | type | Public export. |
McpAuthorizationCodeState | type | Public export. |
McpClientCredentialsOptions | type | Public export. |
McpClientLike | type | Public export. |
McpServerConnection | type | Public export. |
McpServerOptions | type | Public export. |
McpToolDescriptor | type | Public export. |
McpTransport | type | Public export. |
messageHasDataAttachments | value | True when the message carries at least one inline (base64) attachment. |
mintlifySource | value | Mount a checked-out Mintlify content directory. For a hosted Mintlify MCP server, use connectMcpServer('mintlify', { url, transport: 'streamable-http' }) instead. |
MissingInputStrategy | type | Public export. |
MkdirInput | type | Public export. |
mkdirTool | value | Public export. |
MockModelProvider | value | Public export. |
ModelAttemptEvent | type | Public export. |
ModelConfig | type | Public export. |
ModelMessage | type | Public export. |
ModelMessageRole | type | Public export. |
ModelMetadata | type | Public export. |
ModelPriceRow | type | Static USD price table for model providers. Used to populate ModelUsage.costUsd on responses that don't include billing info from the provider directly (most providers — only pi-loop-runtime and a handful of gateways report cost). Prices are stamped with effectiveAt. The table is best-effort: real billing reconciliation should use vendor invoices. Override or extend at runtime with registerModelPrices for custom-rate contracts. |
ModelPricingUsage | type | Public export. |
ModelProvider | type | Public export. |
ModelProviderFactory | type | Resolves a parsed provider/model-id ref into a concrete provider. Registered factories let out-of-core packages (e.g. |
ModelRequest | type | Public export. |
ModelResponse | type | Public export. |
ModelRuntimeOptions | type | Public export. |
ModelStreamChunk | type | Public export. |
ModelToolCall | type | Public export. |
ModelToolSchema | type | Public export. |
ModelUsage | type | Public export. |
MountedSource | type | Public export. |
MountResult | type | Public export. |
NamedAgentDispatchRequest | type | A dispatch request that names its target agent. |
NamedJobInvocation | type | Public export. |
NativeLoopRuntime | value | Public export. |
NetworkEnforcementLayer | type | Public export. |
NetworkEnforcementRequirement | type | Public export. |
NetworkPolicy | type | Public export. |
noopSessionStore | value | Public export. |
NoopSessionStore | value | No-op session store for runtime: 'stateless' mode. All writes are discarded; reads always return the empty initial session. Use this when the agent is intended as a pure request/response handler with no persistence (typical for high-volume webhooks and edge runtimes). Approvals and artifact retrieval are not supported — wiring those up requires a real store. Callers in stateless mode should not rely on artifact persistence or approval gating. |
normalizeDeliveredMessage | value | Normalize legacy inputs into a DeliveredMessage: - a string → a user message with that body - a value with a kind discriminator → validated as a DeliveredMessage - any other JSON value → a user message with the JSON-stringified body (matching the historical dispatch rendering, so behavior is unchanged for pre-DeliveredMessage callers) |
ObservabilityCorrelation | type | Public export. |
ObservabilityObserverOptions | type | Public export. |
openAIChatCompletionToModelResponse | value | Public export. |
OpenAICompatibleModelProvider | value | Public export. |
OpenAICompatibleProviderOptions | type | Public export. |
OpenAIRealtimeVoiceProvider | value | OpenAI Realtime voice provider. Connects via WebSocket; emits audio_delta / text_delta / transcript / tool_call / response_done events. No transitive dependency on ws — uses the global WebSocket available on Node 22+ and browsers. See the package declarations for an example. |
OpenAIRealtimeVoiceProviderOptions | type | Public export. |
openTelemetryExporter | value | Bridge Fabric's SDK-neutral TelemetrySpan into a real |
OpenTelemetryExporterOptions | type | Public export. |
OperationalMetricsCollector | type | Public export. |
OperationalMetricsSnapshot | type | Public export. |
OperationalSloEvaluation | type | Public export. |
OperationalSloTargets | type | Public export. |
parseConversationKey | value | Public export. |
ParsedConversationKey | type | Public export. |
parseDeliveredMessage | value | Validate a raw value as a DeliveredMessage. Shared by dispatch admission and the direct HTTP route so every transport produces the same structured error on bad input. |
ParsedModelRef | type | Public export. |
parseModelRef | value | Public export. |
parsePersistentSessionId | value | Inverse of persistentStoreSessionId: decode a store session id back into { agent, instanceId, session }, or undefined if it is not a persistent-instance key. Useful for admin surfaces that list raw session ids. |
parseRetryAfterMs | value | Parse a Retry-After header value (RFC 7231) into milliseconds. Accepts both delta-seconds and HTTP-date forms. Returns undefined when the value is missing or unparseable. |
parseStreamOffset | value | Public export. |
PersistenceBundle | type | Complete persistence surface consumed by a Fabric host. |
PersistenceDeleteResult | type | Public export. |
PersistenceHealth | type | Public export. |
PersistentAgentConfig | type | Runtime configuration returned by a createAgent initializer. Mirrors the agent-level slice of AgentInit; instructions becomes the session system prompt (a role), and subagents map to named roles. |
PersistentAgentContext | type | Per-interaction context passed to a createAgent initializer. id is the URL <id> of the addressed instance (or the dispatch target id); env is the platform environment supplied by the runtime. |
persistentConfigToAgentInit | value | Translate a PersistentAgentConfig into an AgentInit. |
PersistentSessionIdentity | type | Decoded identity of a persistent instance session store key. |
persistentStoreSessionId | value | Store-session key for a persistent instance's named session. Collapses the (agentName, instanceId, sessionName) identity onto Fabric's single-string sessionId, keeping persistent sessions inside the existing session stores. |
PiAgentLoopRuntime | value | Public export. |
PiAgentLoopRuntimeOptions | type | Public export. |
PiCustomModel | type | Public export. |
PipelineVoiceProvider | value | Public export. |
PipelineVoiceProviderOptions | type | Public export. |
policiedFetch | value | Public export. |
PoliciedFetchOptions | type | Wrap a fetch-like function with CapabilityPolicy enforcement. Tools and connectors that make outbound HTTP should accept a custom fetch and pass the result of policiedFetch(fetch, policy). Throws a FabricError (POLICY_DENIED) when a request violates the policy; never sends a forbidden request. |
policiedSandboxEnv | value | Wrap a SandboxEnv with CapabilityPolicy enforcement at the sandbox layer. Without this decorator, agent code that calls (await session.sandbox).exec(...) directly bypasses the policy that session.shell() and tool dispatch enforce. policiedSandboxEnv() closes that gap by re-running the same policy evaluation against exec / readFile / writeFile / mkdir / rm / etc. Throws FabricError: - COMMAND_DENIED when an exec is denied or requires approval. - POLICY_DENIED when a filesystem op is denied or requires approval. The decorator does NOT auto-resolve requireApproval p... |
PolicyDecision | type | Public export. |
PromptOptions | type | Public export. |
PromptRunInput | type | Public export. |
PromptRunResult | type | Public export. |
ProviderHttpError | value | Public export. |
ProvidersConfig | type | Public export. |
ProviderSettings | type | Public export. |
pruneSnapshots | value | Public export. |
RateLimiter | type | Public export. |
RateLimiterAcquireOptions | type | Process-local rate limiter for outbound provider calls. Use to prevent a fleet of agents from stampeding a single API key when the host runs many sessions in parallel. The default token-bucket impl is in-memory; Redis-backed implementations are a v1.8+ topic. fabric-harness ships this as a generic primitive — the same limiter can be reused for outbound HTTP calls inside connectors, webhook fan-out, or anywhere else throttling is useful. |
ReaddirInput | type | Public export. |
readdirTool | value | Public export. |
ReadFileBufferInput | type | Public export. |
readFileBufferTool | value | Public export. |
ReadFileInput | type | Public export. |
readFileTool | value | Public export. |
readJsonBody | value | Reads the body once and returns the raw bytes, the decoded text, and the parsed JSON together — so a channel can HMAC-verify the exact bytes and use the JSON without re-reading the (already consumed) stream. Returns undefined only when the body exceeds limitBytes. |
readRequestBody | value | Reads the full request body as bytes, or returns undefined if it exceeds limitBytes. NOTE: this consumes the request stream (single read). Signature-verifying channels need the exact bytes for HMAC and the parsed JSON afterward — don't call request.json() as well. Use readJsonBody to get both from one read. |
redactError | value | Public export. |
RedactionOptions | type | Public export. |
redactJson | value | Public export. |
redactText | value | Public export. |
registerCreatedAgentName | value | Register a name for a CreatedAgent so dispatch(agent, ...) can resolve it. |
registeredModelProviders | value | Names of externally registered providers, for diagnostics. |
registerJobName | value | Public export. |
registerModelPrices | value | Add or override price rows. Later rows take precedence over earlier ones. |
registerModelProvider | value | Register a model provider resolvable via FABRIC_MODEL=<name>/<model-id>. Built-in providers always take precedence; registering a name a built-in already owns has no effect on routing. Idempotent by name (last registration wins). Call at module import time. |
registerSandbox | value | Register a sandbox in the in-process registry and return a portable ref. Subsequent calls for the same env return the same ref. |
registerSandboxRefDecoder | value | Register a decoder for provider so attachSandbox(serialized) can rehydrate a sandbox from another process. Typically called once at startup by the package that owns the provider integration (e.g. @fabric-harness/connectors/e2b registers the e2b provider). |
RemoteSandboxApi | type | Public export. |
RemoteSandboxOptions | type | Public export. |
renderDeliveredMessage | value | Render a delivered message to the prompt text form. User messages pass their body through verbatim; signals render as their XML envelope via the shared renderSignalMessage machinery. |
RequestBody | type | Public export. |
resetDispatchRuntime | value | Clear the ambient dispatch runtime (tests/teardown). |
resetJobInvocationRuntime | value | Public export. |
resetModelPricesToBuiltins | value | Reset the registry to the built-in seed (test/utility). |
ResolvedModelProvider | type | Public export. |
resolveModelProvider | value | Public export. |
ResolveModelProviderOptions | type | Public export. |
resolveRuntimeMode | value | Resolve the effective runtime mode for an init() call, applying production safety rules: - In production (FABRIC_ENV=production or NODE_ENV=production), choosing stateless is allowed but logged as an explicit choice. - inline (the default) without an explicit SessionStore falls back to in-memory storage. In production this emits a warning unless FABRIC_ALLOW_EPHEMERAL_STATE=1 is set or runtime is explicitly 'stateless'. - Unknown runtime values fall through to 'inline' with a warning. |
RESULT_END_DELIMITER | value | Public export. |
RESULT_START_DELIMITER | value | Public export. |
ResultExtractionOptions | type | Public export. |
ResultOutcome | type | Public export. |
ResultToolBundle | type | Public export. |
ResultUnavailableError | value | Thrown when the LLM calls the give_up tool, indicating it cannot produce a result that conforms to the required schema. |
ResultValidator | type | Public export. |
RetrievedChunk | type | Generic, provider-agnostic retrieval seam. RAG is query-time, so it does NOT fit FilesystemSource (an eager full-dump mount) — a retriever resolves the top matches for a query on demand. Databricks Vector Search is the flagship implementation, but this is reusable for any vector store. |
RetrieveOptions | type | Public export. |
Retriever | type | Public export. |
RmInput | type | Public export. |
rmTool | value | Public export. |
Role | type | Public export. |
runAction | value | Validate input, run the action against host, validate + JSON-clone the output. The returned value is always safely serializable (a fresh JSON clone), so callers can persist or transmit it without sharing references. |
RuntimeModeResolution | type | Public export. |
runWithJobInvocation | value | Public export. |
runWithSubmissionContext | value | Run fn with context as the ambient submission correlation. |
SandboxAdapterDescriptor | type | Adapter expectations: - Every backend must expose the SandboxEnv contract above and map paths into a scoped workspace. - Secrets and provider credentials must stay in adapter-owned environment/config, not model context. - exec should enforce backend-specific command, network, and timeout policy before process launch. - snapshot/restore is optional because not all targets support filesystem or VM snapshots. - Future adapters should be added without changing session/runtime code. Planned backends: local, Docker, Azure Container Apps, Azure Container Instances, AKS, Databricks, E2B, Daytona, C... |
SandboxBackend | type | Public export. |
SandboxCapabilities | type | Public export. |
SandboxEnv | type | Public export. |
SandboxExecOptions | type | Public export. |
SandboxFactory | type | Public export. |
SandboxFactoryOptions | type | Public export. |
SandboxFork | type | Public export. |
SandboxRef | type | Public export. |
SandboxRefDecoder | type | Decoder for a SerializedSandboxRef.provider. Returns a SandboxFactory that, when invoked, produces a SandboxEnv connected to the existing remote sandbox identified by providerData. Decoders SHOULD attach without owning the remote sandbox's lifecycle — the returned env's cleanup() should detach, not destroy. |
SandboxSnapshot | type | Public export. |
sanitizeObservabilityData | value | Public export. |
sanitizePublicJson | value | Public export. |
sanitizePublicText | value | Remove credentials and host filesystem locations from caller-visible text. |
schema | value | Public export. |
Schema | type | Public export. |
SchemaIssue | type | Public export. |
SchemaValidationError | value | Public export. |
SearchToolInput | type | Public export. |
SearchToolOptions | type | Public export. |
SearchToolResult | type | Public export. |
secret | value | Public export. |
SecretProvider | type | Public export. |
SecretRef | type | Public export. |
SecretResolutionContext | type | Public export. |
secretResolver | value | Adapt a provider to the existing init({ resolveSecret }) callback. |
SerializedFabricError | type | Public export. |
SerializedSandboxRef | type | Cross-process / cross-machine sandbox reference. Created by session.sandboxRef({ portable: true }) and re-attached via attachSandbox(serialized) in a separate process. Each provider string maps to a decoder registered via registerSandboxRefDecoder(). |
serializeFabricError | value | Convert any thrown value into the stable public/developer transport shape. |
serializeSandboxRef | value | Serialize an in-process SandboxRef into the cross-process form. Requires the underlying sandbox to implement encodeRef(). Throws SANDBOX_UNAVAILABLE if the backend is in-process-only. |
SessionData | type | Public export. |
SessionEntry | type | Public export. |
SessionEntryType | type | Public export. |
SessionHistory | value | Public export. |
SessionMemory | type | Public export. |
SessionMemoryEntry | type | Persistent key/value store for facts an agent should remember across sessions — borrower preferences, prior outcomes, learned task history. Distinct from SessionEntry (which is the audit log): memory is for recall, entries are for audit. Memory writes do NOT land in the session log, so they don't pollute prompt context unless the agent explicitly reads them. Tenancy: every operation accepts an optional tenantId. Two tenants with the same key get isolated values. tenantId defaults to the empty string for non-tenant deployments. |
SessionMemoryFilter | type | Public export. |
SessionMemoryGetOptions | type | Public export. |
SessionMemorySetInput | type | Public export. |
SessionOptions | type | Public export. |
SessionStore | type | Public export. |
setLogger | value | Replace the global SDK logger. Call once at startup before any init(). Pass a custom Logger to redirect to your structured logging system. |
ShellOptions | type | Public export. |
shellQuote | value | Public export. |
ShellResult | type | Public export. |
Skill | type | Public export. |
SkillOptions | type | Public export. |
slackApprovalNotifier | value | Slack incoming-webhook notifier. The webhook URL remains in host configuration, never event data. |
SnapshotPruneOptions | type | Public export. |
SnapshotPruneResult | type | Public export. |
StatInput | type | Public export. |
statTool | value | Public export. |
StdioMcpClient | value | Public export. |
StdioMcpClientOptions | type | Public export. |
StoredAttachment | type | Public export. |
StreamListenerRegistry | value | Process-local listener registry shared by store implementations — registration, unsubscribe-and-prune, and error-swallowing notify. |
SttEvent | type | Public export. |
SttProvider | type | Public export. |
SttSession | type | Public export. |
SttSessionOptions | type | Public export. |
SttSessionUsage | type | Public export. |
StubFabricAgent | value | Public export. |
StubFabricSession | value | Public export. |
SubmissionAbortedError | value | Public export. |
SubmissionAdmissionBackend | type | Storage callbacks for admitSubmissionWithBackend. Every callback runs inside the transaction the caller has already opened (or the backend's equivalent atomicity scope). Callbacks may return plain values (synchronous backends) or native Promises — non-native thenables are not supported. |
SubmissionAdmissionRow | type | The minimal shape admitSubmissionWithBackend needs from a persisted submission row: the transport kind and persisted payload it compares against the incoming admission. payload may be the serialized JSON string or an already-deserialized object (e.g. a Postgres JSONB column). |
SubmissionAttemptRef | type | Public export. |
SubmissionClaimRef | type | Public export. |
SubmissionContext | type | Public export. |
SubmissionDurability | type | Public export. |
SubmissionExecuteOptions | type | Public export. |
SubmissionExecutor | type | How the runner touches sessions. execute applies the submission's input to the addressed instance session and resolves with the turn result; everything else is store-level and must not require a live agent. Contract requirements: - execute must be idempotent by submission id (a resumed attempt whose input entry already exists must not append it again). - recordTerminal settles the conversation to a deterministic rest state (unresolved trailing tool calls get explicit interrupted-outcome markers — NEVER re-executed) and appends a terminal advisory. - appendSettlement appends the cano... |
SubmissionInsertRow | type | The queued row that admitSubmissionWithBackend writes on first admission. |
SubmissionInspection | type | Coarse persisted-progress classification consumed by reconciliation. |
SubmissionInterruptedError | value | Public export. |
SubmissionInterruption | type | Public export. |
SubmissionPayloadContext | type | Context needed for submission payload validation. Implementations extract these fields from their storage-specific row/document type before calling isSubmissionPayload. |
SubmissionRetryExhaustedError | value | Public export. |
SubmissionRunner | type | Public export. |
SubmissionRunnerOptions | type | Public export. |
submissionSessionKey | value | Store-session FIFO key of a submission (re-exported convenience). |
SubmissionSettledRecord | type | Minimal canonical settlement record for a direct submission. The conversation-stream phase reuses this shape as the durable terminal record a reconnecting waiter observes. |
SubmissionSettlement | type | Public export. |
submissionSettlementEntryId | value | Deterministic canonical settlement entry id for a submission. |
SubmissionSettlementObligation | type | Public export. |
submissionStoreSessionId | value | The harness identity string (agent:<name>:<id>:<session>) targeted by a submission input. This is the persistentStoreSessionId of the addressed instance session and the per-session FIFO key of the store. |
SubmissionTelemetryEvent | type | Public export. |
SubmissionTelemetrySink | type | Public export. |
SubmissionTimeoutError | value | Public export. |
SuspendingSandboxEnv | value | Decorator that adds idle-based auto-suspend to any SandboxEnv whose underlying implementation supports suspend() / resume(). If the inner env doesn't implement them, the decorator is a no-op pass-through (the idle timer never fires anything). The decorator tracks a lastAccessAt timestamp on every operation. After idleSuspendMs elapses without activity, it calls inner.suspend(). The next operation transparently calls inner.resume() first (unless autoResumeOnAccess: false). cleanup() cancels the idle timer. |
SuspendingSandboxOptions | type | Public export. |
TaskOptions | type | Public export. |
TelemetryExporter | type | Public export. |
TelemetrySpan | type | Public export. |
tenantCostLimit | value | Sugar over CostLimit.perScope + scopeKey + store for the common "per-tenant ceiling per period" pattern. Pick one of perDayUsd, perHourUsd, or perMonthUsd; when multiple are set, the most restrictive (smallest absolute) wins. Scope key convention: tenant:<id>:<period> where <period> is day:YYYY-MM-DD, hour:YYYY-MM-DDTHH:00Z, or month:YYYY-MM. Reset semantics (rollover) are the host's job — call store.reset(scopeKey) from a scheduled task to clear the period total. See the package declarations for an example. |
TenantCostLimit | type | Public export. |
toFabricError | value | Public export. |
tokenBucketRateLimiter | value | In-memory token-bucket rate limiter. Each key has its own bucket — keys are independent (waiting on one key doesn't block another). Buckets refill continuously at tokensPerSecond. |
TokenBucketRateLimiterOptions | type | Public export. |
ToolCall | type | Public export. |
ToolCallResult | type | Public export. |
ToolContext | type | Public export. |
ToolDef | type | Public export. |
ToolEffect | type | Public export. |
ToolPolicy | type | Public export. |
toolsToModelSchemas | value | Public export. |
toOpenAIMessage | value | Public export. |
toOpenAITool | value | Public export. |
TtsProvider | type | Public export. |
TtsSynthesisOptions | type | Public export. |
TtsSynthesisUsage | type | Public export. |
TurnJournalState | type | Public export. |
UnimplementedSandboxEnv | value | Public export. |
unregisterSandbox | value | Mark a registered sandbox as dead so future attach attempts fail. Called from the owner session's cleanup path. |
unregisterSandboxRefDecoder | value | Test/internal: remove a decoder. |
validateResult | value | Public export. |
VERCEL_AI_GATEWAY_BASE_URL | value | Default base URL for Vercel AI Gateway's OpenAI-compatible Chat Completions endpoint. The gateway accepts the standard OpenAI request body and routes through to the configured provider; switching from OpenAI to the gateway is just a base-URL change. See https://vercel.com/docs/ai-gateway/sdks-and-apis/openai-compat |
vercelAIGateway | value | Vercel AI Gateway model provider. The gateway is an OpenAI-compatible HTTP endpoint that brokers between your agent and any of the major model providers (OpenAI, Anthropic, Google, xAI, Groq, etc.) with a single key, observability, caching, and spend controls. Use this provider on any deploy target — Node, Cloudflare Workers, Vercel — to route inference through the gateway. See the package declarations for an example. Returns an OpenAICompatibleModelProvider configured for the gateway — use it anywhere a ModelProvider is accepted. Compatible with fabric-harness's tool-calling, retries,... |
VercelAIGatewayProviderOptions | type | Public export. |
verifyAttachmentBytes | value | Verify that bytes match the ref's digest (and declared size), throwing AttachmentStoreError('DIGEST_MISMATCH') otherwise. Every store's put MUST run this check before persisting. |
verifyHmacSha256 | value | Constant-time HMAC-SHA256 verification (via crypto.subtle.verify). |
VertexAIModelProvider | value | Public export. |
VertexAIProviderOptions | type | Public export. |
VirtualSandboxEnv | value | Virtual sandbox backend powered by just-bash. Provides an in-memory filesystem and a bash subset (grep, glob, cat, read, mkdir, rm, ls, echo, etc.) without shelling out to the host. The backend is fast, cheap, safe, and high-concurrency. Selected automatically by the bare @fabric-harness/sdk import when the caller doesn't pass sandbox. Override with 'local', 'docker', a SandboxFactory, or a SandboxEnv when you need real shell access. |
VoiceAudioFormat | type | Bidirectional voice / audio streaming surface. fabric-harness ships an OpenAI Realtime implementation; bring-your-own-vendor for Anthropic / Gemini Live / on-prem TTS+ASR pipelines. Audio frames flow in raw bytes — the standard format is PCM 16-bit little-endian at 24kHz mono (OpenAI Realtime default). Telephony bridges (Twilio Media Streams μ-law 8kHz, etc.) resample at the edge. Tool execution is the caller's responsibility: a tool_call event surfaces, the host code runs the tool through whatever governance gates apply (approvals, cost caps, rate limits), then calls `submitToolResult(... |
VoiceConnectOptions | type | Public export. |
VoiceEvent | type | Events streamed from a VoiceSession. audio_delta carries raw audio bytes; text_delta and transcript carry text; tool_call and response_done mark structured boundaries; error is fatal. |
VoiceProvider | type | Public export. |
VoiceSession | type | Public export. |
VoiceToolResultInput | type | Public export. |
VoiceWsClientEvent | type | Public export. |
VoiceWsClientHandle | type | Public export. |
VoiceWsClientOptions | type | Lightweight WebSocket client for the fh server WS /sessions/:id/voice endpoint. Server-side bridge owns the provider connection and API keys; this client just streams audio + control messages over WS. Works in browsers and on Node 22+ (uses the global WebSocket). |
webhookApprovalNotifier | value | Public export. |
WebhookSubscriptionContext | type | Generic webhook subscription primitive — wakes an agent on inbound events from any external system (event bus, queue, scheduler, third-party SaaS webhook, your own application's domain events). fabric-harness consumes a JSON payload and dispatches to the user-provided handler. The host event system decides which payloads land here; fabric-harness has no opinion on event taxonomy or producer. |
WebhookSubscriptionDefinition | type | Public export. |
withConversationProjection | value | Wrap a SessionStore so active-path appends are mirrored into an append-only ConversationStreamStore projection (v2 A4). The SessionEntry DAG stays the single source of truth; the stream gives clients offset-based catch-up + live tail. Two rules keep them coherent: 1. Idempotent by entryId — a crash between the DAG write and the stream write is repaired on the next append: the projector diffs the stream tail against the active path and re-emits anything missing. 2. Truncation is explicit — the DAG can branch (fork/replay/ checkpoint-restore rewrite leafId); the stream cannot. W... |
withFilesystemSources | value | Public export. |
withIdleSuspend | value | Wrap any SandboxEnv with idle-based auto-suspend. Returns the inner env unchanged when idleSuspendMs is undefined or the inner env doesn't implement suspend(). |
WriteFileInput | type | Public export. |
writeFileTool | value | Public export. |
WsClientCommand | type | Public export. |
WsClientHandle | type | Public export. |
WsClientOptions | type | Lightweight WebSocket client for the fh server WS /sessions/:id/ws endpoint. Works in browsers and on Node 22+ (uses the global WebSocket). Does NOT depend on the ws package — that's the server side's optional peer dep. |
@fabric-harness/sdk/cloudflare
| Export | Kind | Summary |
|---|---|---|
CloudflareR2BucketLike | type | Public export. |
CloudflareR2ListResultLike | type | Public export. |
CloudflareR2ObjectBodyLike | type | Public export. |
r2FilesystemSource | value | Read Cloudflare R2 objects as a Fabric filesystem source. Mount it with withFilesystemSources() (or getVirtualSandbox(...)) so agents can grep/read R2-backed knowledge bases through the normal sandbox tools. See the package declarations for an example. |
R2FilesystemSourceOptions | type | Public export. |
@fabric-harness/sdk/channel
| Export | Kind | Summary |
|---|---|---|
bytesToHex | value | Public export. |
Channel | type | Public export. |
ChannelContext | type | Public export. |
ChannelDispatch | type | Public export. |
ChannelDispatchRequest | type | Public export. |
ChannelRoute | type | Channels turn platform webhooks (Slack, GitHub, …) into agent dispatches. Handlers are written against the Web Request/Response API and crypto.subtle, so the same channel runs on Node and Cloudflare. A channel is a stateless route container plus a conversation-id (de)serializer — session continuity falls out of the key (same thread → same key → same session). |
conversationKey | value | Public export. |
defineChannel | value | Validates and brands a channel's routes. |
defineTool | value | Edge-safe identity helper equivalent to the root SDK's defineTool. |
hexToBytes | value | Public export. |
hmacSha256 | value | Public export. |
parseConversationKey | value | Public export. |
ParsedConversationKey | type | Public export. |
readJsonBody | value | Reads the body once and returns the raw bytes, the decoded text, and the parsed JSON together — so a channel can HMAC-verify the exact bytes and use the JSON without re-reading the (already consumed) stream. Returns undefined only when the body exceeds limitBytes. |
readRequestBody | value | Reads the full request body as bytes, or returns undefined if it exceeds limitBytes. NOTE: this consumes the request stream (single read). Signature-verifying channels need the exact bytes for HMAC and the parsed JSON afterward — don't call request.json() as well. Use readJsonBody to get both from one read. |
RequestBody | type | Public export. |
ToolDef | type | Public export. |
ToolEffect | type | Public export. |
verifyHmacSha256 | value | Constant-time HMAC-SHA256 verification (via crypto.subtle.verify). |
@fabric-harness/sdk/experimental
| Export | Kind | Summary |
|---|---|---|
createPiAgentLoopRuntime | value | Public export. |
PiAgentLoopRuntime | value | Public export. |
PiAgentLoopRuntimeOptions | type | Public export. |
PiCustomModel | type | Public export. |
policiedSandboxEnv | value | Wrap a SandboxEnv with CapabilityPolicy enforcement at the sandbox layer. Without this decorator, agent code that calls (await session.sandbox).exec(...) directly bypasses the policy that session.shell() and tool dispatch enforce. policiedSandboxEnv() closes that gap by re-running the same policy evaluation against exec / readFile / writeFile / mkdir / rm / etc. Throws FabricError: - COMMAND_DENIED when an exec is denied or requires approval. - POLICY_DENIED when a filesystem op is denied or requires approval. The decorator does NOT auto-resolve requireApproval p... |
SuspendingSandboxEnv | value | Decorator that adds idle-based auto-suspend to any SandboxEnv whose underlying implementation supports suspend() / resume(). If the inner env doesn't implement them, the decorator is a no-op pass-through (the idle timer never fires anything). The decorator tracks a lastAccessAt timestamp on every operation. After idleSuspendMs elapses without activity, it calls inner.suspend(). The next operation transparently calls inner.resume() first (unless autoResumeOnAccess: false). cleanup() cancels the idle timer. |
SuspendingSandboxOptions | type | Public export. |
withIdleSuspend | value | Wrap any SandboxEnv with idle-based auto-suspend. Returns the inner env unchanged when idleSuspendMs is undefined or the inner env doesn't implement suspend(). |
@fabric-harness/sdk/otel-observer
| Export | Kind | Summary |
|---|---|---|
createOpenTelemetryObserver | value | Public export. |
OpenTelemetryObserverOptions | type | Build a hierarchical OpenTelemetry trace from Fabric's event stream. Unlike openTelemetryExporter (which emits one flat span per duration-bearing event), this observer nests spans into a tree: prompt/skill operations contain turns, which contain tool / shell spans, with task sub-work nested under the active operation. The result is a single parent trace per operation that visualizes the full agent run. This module lives on the @fabric-harness/sdk/otel-observer subpath (not the main entry) because building parent contexts requires @opentelemetry/api at runtime; the main SDK... |
@fabric-harness/sdk/testing
| Export | Kind | Summary |
|---|---|---|
MockModelProvider | value | Public export. |
StubFabricAgent | value | Public export. |
StubFabricSession | value | Public export. |
@fabric-harness/sdk/testing/contracts
| Export | Kind | Summary |
|---|---|---|
AttachmentStoreContractHandle | type | Public export. |
ChannelContractDispatch | type | Public export. |
ChannelContractFixture | type | Public export. |
ChannelContractRequest | type | Public export. |
ConversationStreamStoreContractHandle | type | Public export. |
defineAttachmentStoreContractTests | value | Register the standard AttachmentStore contract tests under the given describe label. Each test gets a fresh store from factory(). |
defineChannelContractTests | value | Shared behavioral contract for first-party and community channel adapters. |
defineConversationStreamStoreContractTests | value | Register the standard ConversationStreamStore contract tests under the given describe label. Each test gets a fresh store from factory(). |
definePersistenceBundleContractTests | value | Compose all store contracts with bundle health, cost, run, and cascade checks. |
defineSubmissionStoreContractTests | value | Register the standard AgentSubmissionStore contract tests under the given describe label. Each test gets a fresh store from factory(). |
PersistenceBundleContractHandle | type | Public export. |
SubmissionStoreContractHandle | type | Public export. |
@fabric-harness/temporal
@fabric-harness/temporal
| Export | Kind | Summary |
|---|---|---|
ActivityIdempotency | type | Public export. |
ActivityTimeoutPolicy | type | Public export. |
adaptSessionRuntime | value | Adapt any SessionRuntime (Temporal-backed, Mock, or otherwise) into the SDK's DurableSessionRuntime shape. The two interfaces are structurally identical, but the type bridging keeps SDK types out of the temporal package's public API. |
AppendSessionEntryActivityInput | type | Public export. |
AppendSessionEntryActivityResult | type | Public export. |
AppendSessionEventActivityInput | type | Public export. |
APPROVAL_SIGNAL | value | Public export. |
approvalSignal | value | Public export. |
ApprovalSignal | type | Public export. |
BuildContextActivityInput | type | Public export. |
BuildContextActivityResult | type | Public export. |
CHECKPOINT_CREATE_WORKFLOW_NAME | value | Public export. |
CHECKPOINT_RESTORE_WORKFLOW_NAME | value | Public export. |
CheckpointActivityInput | type | Public export. |
CheckpointActivityResult | type | Public export. |
checkpointCreateWorkflow | value | Public export. |
checkpointRestoreWorkflow | value | Public export. |
CompactSessionActivityInput | type | Public export. |
CompactSessionActivityResult | type | Public export. |
connectTemporalWithRetry | value | Public export. |
createInlineSessionRuntime | value | Public export. |
createLocalTemporalActivities | value | Public export. |
createMockTemporalRuntime | value | Public export. |
createTemporalClient | value | Public export. |
createTemporalClientConnectionOptions | value | Public export. |
createTemporalDispatchActivities | value | Wrap a DispatchProcessor as a Temporal activity. The processor is idempotent by dispatchId, so Temporal retries are safe. |
CreateTemporalDispatchActivitiesOptions | type | Public export. |
createTemporalSessionRuntimeActivities | value | Public export. |
CreateTemporalSessionRuntimeActivitiesOptions | type | Public export. |
createTemporalWorkerConnectionOptions | value | Public export. |
CUSTOM_APPROVAL_WORKFLOW_NAME | value | Public export. |
customApprovalWorkflow | value | Durable custom approval gate used by session.approval.request(). |
CustomApprovalWorkflowInput | type | Public export. |
DEFAULT_TEMPORAL_ACTIVITY_TIMEOUTS | value | Public export. |
DEFAULT_TEMPORAL_ADDRESS | value | Default Temporal frontend address used by CLI / build scaffolds when nothing is configured. |
DEFAULT_TEMPORAL_NAMESPACE | value | Default namespace. |
DEFAULT_TEMPORAL_TASK_QUEUE | value | Default task queue name. |
defineTemporalAgent | value | Public export. |
DefineTemporalAgentOptions | type | Public export. |
DISPATCH_WORKFLOW_NAME | value | Public export. |
dispatchWorkflow | value | Durable dispatch: applies one dispatched input to a persistent instance via the processDispatch activity. The activity is idempotent by dispatchId, so Temporal retries (and worker restarts) won't double-apply. |
ExecuteToolActivityInput | type | Public export. |
ExecuteToolActivityResult | type | Public export. |
HYBRID_PROMPT_WORKFLOW_NAME | value | Public export. |
hybridPromptWorkflow | value | Hybrid durable prompt workflow. The workflow owns deterministic turn orchestration while activities perform nondeterministic effects: context construction, model calls, tool execution, approval policy checks, and durable entry/event appends. |
InlineSessionRuntime | value | Public export. |
LoadSessionActivityInput | type | Public export. |
LocalTemporalActivitiesOptions | type | Public export. |
MockTemporalClient | value | Minimal mock Temporal client that satisfies enough of the TemporalClientHandle interface for agent tests. Delegates SessionRuntime calls to MockTemporalRuntime. |
MockTemporalModelProvider | value | Minimal mock model provider for Temporal agent tests. Returns deterministic responses based on the latest user message. |
MockTemporalRuntime | value | Public export. |
MockTemporalRuntimeOptions | type | Public export. |
ModelGenerateActivityInput | type | Public export. |
ModelGenerateActivityResult | type | Public export. |
PendingApprovalState | type | Public export. |
PROMPT_WORKFLOW_NAME | value | Public export. |
promptWorkflow | value | Coarse one-shot prompt workflow. Useful as a compatibility path while the hybrid loop is still gaining lower-level activity implementations. |
PromptWorkflowInput | type | Public export. |
PromptWorkflowResult | type | Public export. |
requireIdempotency | value | Public export. |
ResolvedTemporalConnectionConfig | type | Public export. |
ResolveSecretActivityInput | type | Public export. |
resolveTemporalConnectionConfig | value | Public export. |
resolveToolRefs | value | Public export. |
RuntimeCheckpointCreateActivityInput | type | Public export. |
RuntimeCheckpointRestoreActivityInput | type | Public export. |
RuntimePromptActivityInput | type | Public export. |
RuntimeShellActivityInput | type | Public export. |
SESSION_STATE_QUERY | value | Public export. |
SessionRuntime | type | Public export. |
SessionRuntimeApprovalInput | type | Public export. |
SessionRuntimeCheckpointCreateInput | type | Public export. |
SessionRuntimeCheckpointRestoreInput | type | Public export. |
SessionRuntimeFactory | type | Public export. |
SessionRuntimePromptInput | type | Public export. |
SessionRuntimeShellInput | type | Public export. |
SessionRuntimeTaskInput | type | Public export. |
sessionStateQuery | value | Public export. |
sessionWorkflow | value | Long-lived session coordination workflow. This first production Temporal integration supports approval signaling and state queries. Prompt/shell/checkpoint operations are workflows below. |
SessionWorkflowDefinition | type | Public export. |
SHELL_WORKFLOW_NAME | value | Public export. |
shellWorkflow | value | Public export. |
SnapshotRef | type | Public export. |
startTemporalWorker | value | Public export. |
TASK_WORKFLOW_NAME | value | Public export. |
taskWorkflow | value | Public export. |
TaskWorkflowInput | type | Public export. |
temporal | value | Public export. |
TemporalActivities | type | Public export. |
TemporalActivityTimeouts | type | Public export. |
temporalAgent | value | Public export. |
TemporalAgentOptions | type | Public export. |
TemporalBundle | type | Public export. |
TemporalBundleConfig | type | Public export. |
TemporalClientHandle | type | Public export. |
TemporalClientOptions | type | Public export. |
TemporalConnectionConfig | type | Public export. |
TemporalConnectRetryOptions | type | Public export. |
TemporalDispatchActivities | type | Activity that durably applies a dispatched input to a persistent instance. |
TemporalDispatchClientLike | type | Minimal Temporal client surface needed to start a dispatch workflow. |
temporalDispatchQueue | value | Durable dispatch queue. enqueue starts a dispatchWorkflow keyed by the dispatchId, so delivery survives worker/process restarts and a duplicate dispatchId maps to the same workflow id (idempotent admission). Implements the SDK's DispatchQueue; pair with createTemporalDispatchActivities on the worker. When runtime: 'temporal' is configured, this is the default dispatch queue (D4) unless an explicit queue is supplied. |
TemporalDispatchQueueOptions | type | Public export. |
TemporalIntegrationMode | type | Public export. |
TemporalPromptWorkflowMode | type | Public export. |
TemporalRunStatus | type | Public export. |
TemporalRuntimeOptions | type | Public export. |
temporalSessionRuntime | value | Build a DurableSessionRuntimeFactory for init({ sessionRuntime }) that delegates each session's prompt/task/shell/checkpoint calls to a Temporal workflow. The Temporal client connection is opened lazily on the first session and shared across all sessions produced by this factory. Pair with runtime: 'temporal' for production deployments. For tests, pass mode: 'mock' to use the in-process mock runtime. See the package declarations for an example. |
TemporalSessionRuntime | value | Public export. |
TemporalSessionRuntimeActivities | type | Public export. |
TemporalSessionWorkflowInput | type | Public export. |
TemporalSignalClient | type | Public export. |
TemporalTlsConfig | type | Public export. |
TemporalWorkerHandle | type | Public export. |
TemporalWorkerOptions | type | Public export. |
TemporalWorkflowQueryState | type | Public export. |
ToolApprovalRequest | type | Public export. |
@fabric-harness/temporal/agent
| Export | Kind | Summary |
|---|---|---|
defineTemporalAgent | value | Public export. |
DefineTemporalAgentOptions | type | Public export. |
resolveToolRefs | value | Public export. |
temporal | value | Public export. |
temporalAgent | value | Public export. |
TemporalAgentOptions | type | Public export. |
TemporalBundle | type | Public export. |
TemporalBundleConfig | type | Public export. |