Yolk SDK
API reference

Integration APIs

Public MCP, knowledge, connector, sandbox, code mode, and file extraction APIs.

Portable connector annotations

PortableMetadata is exported from @yolk-sdk/connectors and owns optional integration/binding metadata. Decode/make produce mutable snapshot data (null-prototype objects, dense ordinary arrays, finite JSON primitives); input identity is not preserved and DAG aliases share copied nodes. Exotics, cycles, hidden/symbol keys and accessors fail, without invoking accessors. Omission stays absent. This does not narrow integration config, credential secrets, error causes or host DB columns.

MCP

Yolk tool discovery admits object-root plain JSON inputSchema documents. Boolean roots fail with typed McpError validation; omitted schemas retain the permissive object default. This is not JSON Schema meta-validation.

SubpathMain exports
@yolk-sdk/mcp/clientOfficial Client, Streamable HTTP, full-core client types/helpers, plus Effect/Yolk tool list/call adapters
@yolk-sdk/mcp/client/nodeOfficial StdioClientTransport plus NodeServices wrappers for Yolk local tool helpers
@yolk-sdk/mcp/conformanceExperimental MCP conformance cases, target, seeds, and synthetic fixtures; see MCP conformance
@yolk-sdk/mcp/coreOfficial MCP v2 Zod wire schemas
@yolk-sdk/mcp/protocolYolk JSON-RPC/MCP adapter schemas and helpers
@yolk-sdk/mcp/serverOfficial McpServer, createMcpHandler, resources, prompts, completions, MRTR, subscriptions, plus makeMcpToolServer and runStdioMcpServer
@yolk-sdk/mcp/server/nodeOfficial serveStdio and StdioServerTransport

McpClientOptions.exposure (McpToolExposureResolver) sets code mode exposure on listed tool definitions. Adapted tools are typed (ADR 0013): mcpToolToToolDef declares ToolDef.outputSchema { value, files } (mcpToolOutputSchema, with a plain-object MCP outputSchema as value), and calls return mcpToolResult (value the server's structuredContent or text, files its blobs, images and audio). @yolk-sdk/mcp/client also exports McpToolOutput (that envelope as a Schema), mcpToolOutputDecoder (the decodeOutput registrations built from these defs must set), mcpTextValue, and the fileCapture call option. See Add MCP tools and Connector and MCP tools.

Both @yolk-sdk/mcp/client and @yolk-sdk/mcp/protocol export these Effect Schema owners:

SchemaFields
InitializeClientInfoname, version
InitializeParamsprotocolVersion, capabilities, clientInfo
InitializedNotificationjsonrpc: '2.0', method: 'notifications/initialized'
ToolsCallParamsname, optional opaque arguments

Use their .make constructors for typed values and Effect Schema decoders for raw input. Compatibility helpers makeJsonRpcRequest, makeInitializeParams, and makeInitializedNotification remain available. Requests omit params when it is undefined.

Knowledge

SubpathMain exports
@yolk-sdk/knowledgebuildKnowledgeContext, KnowledgeStore, SearchIndexStore, KnowledgeFileBlobStore, shared errors
@yolk-sdk/knowledge/documentsdocument, file, chunk, scope, status, availability schemas
@yolk-sdk/knowledge/filesKnowledgeFileBlobStore
@yolk-sdk/knowledge/contextpinned context assembly helpers
@yolk-sdk/knowledge/storedocument store and search-index store contracts
@yolk-sdk/knowledge/errorsshared knowledge error types
@yolk-sdk/knowledge/ingestioningestKnowledgeDocument, makeIngestionPipeline
@yolk-sdk/knowledge/searchsearchKnowledge, packKnowledgeSearchContext
@yolk-sdk/knowledge/chunkingKnowledgeChunker, DefaultKnowledgeChunkerLive, chunkKnowledgeText, countKnowledgeChunkTokens
@yolk-sdk/knowledge/embeddingsKnowledgeEmbedder
@yolk-sdk/knowledge/extractionKnowledgeExtractor and source types
@yolk-sdk/knowledge/summarizationKnowledgeSummarizer, NoopKnowledgeSummarizerLive
@yolk-sdk/knowledge/agentmakeKnowledgeLookupTool, makeKnowledgeManageTool, KnowledgeLookupOutput, KnowledgeManageOutput

@yolk-sdk/knowledge/documents exposes validated source/scope constructors:

ConstructorVariant / fields
KnowledgeFileSource.makeFile: ref, optional name / mediaType
KnowledgeUrlSource.makeUrl: url
KnowledgeTextSource.makeText: optional label
KnowledgeSearchScope.makeKnowledgeScope: id
KnowledgeSearchScopes.makeKnowledgeScopes: non-empty ids

The type KnowledgeSearchScope remains the union of both scope variants; its value constructor creates only the single-id variant. KnowledgeScopeId and KnowledgeDocumentId are exported schema/type companions from @yolk-sdk/knowledge/documents; scope/document references throughout stores, chunking, ingestion, and search use them. Decode external IDs, use .make for trusted constants, and keep host access checks. Encoded identities remain strings.

Connectors

defineAction accepts optional access: 'read' | 'write' | 'destructive' metadata, exported as ConnectorActionAccess. makeConnectorToolModule uses it unless the host supplies an access override.

defineAction returns TypedConnectorAction<InputSchema, Output, Env, Error> (type exported from @yolk-sdk/connectors). Its additive executeTyped method accepts decoded InputSchema.Type and retains ActionResult<Output>. It validates the type-side schema without replaying wire transforms. Existing execute and connector invoke remain dynamic decoding boundaries; implementations still validate external outputs themselves.

SubpathMain exports
@yolk-sdk/connectorsdefineConnector, defineAction, makeIntegration, makeCredentialBinding, CredentialResolver, ConnectorHttpClient, ConnectorBinaryHttpClient, ConnectorBinaryHttpStreamResponse, ConnectorBinaryWriteHttpClient, ConnectorBinaryHttpError, ConnectorFileTransferError, ConnectorFileTransferBudget, ConnectorFileStream
@yolk-sdk/connectors/agentmakeConnectorToolModule, makeConnectorToolRegistration, ConnectorToolExposureResolver, ConnectorToolActionInfo; the exposure option sets code mode exposure per tool, action outputSchema passes through to ToolDef.outputSchema, results are its JSON encoding, and description overrides the module description (default: the connector's)
@yolk-sdk/connectors/conformanceExperimental, conformance/testing only: connectorHttpClientFromEffectHttpClientLayer, connectorBinaryHttpClientFromEffectHttpClientLayer, connectorBinaryWriteHttpClientFromEffectHttpClientLayer, connectorHttpClientsFromEffectHttpClientLayer, staticCredentialResolverLayer, ConformanceCleanupReporter
@yolk-sdk/connectors/afloatAfloatConnector, AfloatApiKeyCredentialSlot, MCP endpoint and protocol constants
@yolk-sdk/connectors/afloat/conformanceExperimental: makeAfloatMcpConformanceTarget, afloatMcpConformanceLiveSeeds, afloatMcpConformanceFixtureSeeds, afloatMcpConformanceFixtures, afloatMcpConformanceTools for the @yolk-sdk/mcp/conformance cases (Afloat MCP conformance)
@yolk-sdk/connectors/dropboxDropboxConnector, Dropbox OAuth slots, metadata schemas, file actions, host-only downloadDropboxFile, streamDropboxFile, getDropboxTemporaryLink, createDropboxFile, updateDropboxFile
@yolk-sdk/connectors/dropbox/conformanceExperimental: dropboxConformanceCases, DropboxConformanceConfig, dropboxConformanceFixtures, dropboxConformanceFixtureSeeds (Conformance APIs)
@yolk-sdk/connectors/emailEmailConnector, EmailClient, connection/message schemas, incoming and SMTP credential slots
@yolk-sdk/connectors/email/conformanceExperimental: emailConformanceCases, EmailConformanceConfig, emailConformanceFixtures (PortFixtures), emailConformanceFixtureSeeds, emailClientLayerFromBackend, emailClientFromBackend, makeEmailReplayBackend, emailMessageNotFoundCode; helpers emailPortRequestJson, emailBackendMethods, emailPortName (Conformance APIs)
@yolk-sdk/connectors/fortnoxFortnoxConnector, shared/resource-scoped OAuth slots, read/write/destructive actions, resource/input/output schemas, host-only preview/archive/inbox byte helpers
@yolk-sdk/connectors/fortnox/conformanceExperimental: fortnoxConformanceCases, fortnoxReadConformanceCases, FortnoxConformanceConfig, fortnoxConformanceFixtures, fortnoxConformanceFixtureSeeds (Conformance APIs)
@yolk-sdk/connectors/githubGithubConnector, githubActions, GithubTokenSlot, GithubUploadTokenSlot, issue/PR/repository actions and schemas, host-only createGithubAppInstallationToken and uploadGithubAttachment
@yolk-sdk/connectors/github/conformanceExperimental: githubConformanceCases, GithubConformanceConfig, githubConformanceFixtures, githubConformanceFixtureSeeds, findGithubConformanceLeftovers (Conformance APIs)
@yolk-sdk/connectors/googleGoogleConnector, shared Google OAuth slots, Gmail/Calendar/Drive actions and schemas, host-only Drive/Gmail byte helpers
@yolk-sdk/connectors/google/conformanceExperimental: googleConformanceCases, GoogleConformanceConfig, googleConformanceFixtures, googleConformanceFixtureSeeds, findGoogleConformanceLeftovers (Conformance APIs)
@yolk-sdk/connectors/notionNotionConnector, NotionApiTokenSlot
@yolk-sdk/connectors/notion/conformanceExperimental: notionConformanceCases, NotionConformanceConfig, notionConformanceFixtures, notionConformanceFixtureSeeds (Conformance APIs)
@yolk-sdk/connectors/todoistTodoistConnector, TodoistApiTokenSlot
@yolk-sdk/connectors/todoist/conformanceExperimental: todoistConformanceCases, TodoistConformanceConfig, todoistConformanceFixtures, todoistConformanceFixtureSeeds (Conformance APIs)
@yolk-sdk/connectors/telegramTelegramConnector, TelegramBotTokenSlot
@yolk-sdk/connectors/telegram/conformanceExperimental: telegramConformanceCases, TelegramConformanceConfig, telegramConformanceFixtures, telegramConformanceFixtureSeeds (Conformance APIs)
@yolk-sdk/connectors/figmaFigmaConnector, FigmaOAuthCredentialSlot
@yolk-sdk/connectors/figma/conformanceExperimental: makeFigmaMcpConformanceTarget, figmaMcpConformanceFixtures, figmaMcpConformanceLiveSeeds, figmaMcpConformanceFixtureSeeds, figmaMcpConformanceTools (Figma MCP conformance)
@yolk-sdk/connectors/kieKieConnector, kieActions (kieCreateImageTaskAction, kieCreateVideoTaskAction, kieGetTaskAction), KieApiKeySlot (kie.api_key), schemas KieCreateImageTaskInput, KieCreateVideoTaskInput, KieCreateTaskOutput, KieGetTaskInput, KieGetTaskOutput, KieHttpUrl, KieAspectRatio, KieImageResolution, KieVideoResolution, KieTaskState, and the id, base URL and model constants
@yolk-sdk/connectors/kie/conformanceExperimental: kieConformanceCases, KieConformanceConfig, kieConformanceFixtures, kieConformanceFixtureSeeds (Conformance APIs)
@yolk-sdk/connectors/linkedin-searchLinkedIn search/profile/email connector and API key slots
@yolk-sdk/connectors/linkedin-search/conformanceExperimental: linkedInSearchConformanceCases, LinkedInSearchConformanceConfig, linkedInSearchConformanceFixtures, linkedInSearchConformanceFixtureSeeds, linkedInSearchConformanceCredentials (Conformance APIs)
@yolk-sdk/connectors/microsoftMicrosoftConnector, shared OAuth slots, Outlook mail and OneDrive actions/schemas, host-only OneDrive download/create/update, Outlook attachment bytes and draft uploads
@yolk-sdk/connectors/microsoft/conformanceExperimental: microsoftConformanceCases, MicrosoftConformanceConfig, microsoftConformanceFixtures, microsoftConformanceFixtureSeeds (Conformance APIs)
@yolk-sdk/connectors/r2-storageR2StorageConnector, R2Presigner, R2 credential slots, host-only R2ObjectClient get/create/update
@yolk-sdk/connectors/r2-storage/conformanceExperimental: r2ConformanceCases, R2ConformanceConfig, r2ConformanceFixtures, r2ConformanceFixtureSeeds, r2ConformanceIntegration, r2PortsFromBackend, r2PortsLayerFromBackend, makeR2ReplayBackend, r2PresignRequestJson / r2GetRequestJson / r2PutRequestJson, r2PresignerPortName / r2ObjectClientPortName, r2BytesToBase64, findR2PortFixtureSecrets, scrubR2PortFixture, scrubR2PresignedUrl, r2ConformanceSyntheticSignature, r2ConformanceSyntheticCredential, r2ConformanceSyntheticAccessKeyId (Conformance APIs)

Fortnox exports FortnoxCompanyInformation, FortnoxCustomer, FortnoxInvoice, FortnoxSupplier, FortnoxSupplierInvoice, row schemas, FortnoxPagination, and matching FortnoxGet*Input / FortnoxList*Input / FortnoxList*Output classes, plus FortnoxCreateCustomerInput, FortnoxUpdateCustomerInput, FortnoxCreateInvoiceInput, FortnoxUpdateInvoiceInput, and the invoice write row FortnoxInvoiceRowInput. Branded identifier schemas are FortnoxCustomerNumber, FortnoxDocumentNumber, FortnoxSupplierNumber, and FortnoxGivenNumber. Individual actions are exported as fortnoxGetCompanyInformationAction, fortnoxListCustomersAction, fortnoxGetCustomerAction, fortnoxListInvoicesAction, fortnoxGetInvoiceAction, fortnoxListSuppliersAction, fortnoxGetSupplierAction, fortnoxListSupplierInvoicesAction, fortnoxGetSupplierInvoiceAction, fortnoxCreateCustomerAction, fortnoxUpdateCustomerAction, fortnoxCreateInvoiceAction, fortnoxUpdateInvoiceAction, and fortnoxListSupplierInvoiceFilesAction. Matching file schemas are FortnoxListSupplierInvoiceFilesInput, FortnoxListSupplierInvoiceFilesOutput, and FortnoxSupplierInvoiceFile; both discovery input/output use FortnoxGivenNumber. downloadFortnoxInvoicePreview requires FortnoxDocumentNumber; archive file IDs stay strings. Customer/invoice create and update actions declare write access; customer-invoice sending or booking is not exposed and remains host approval policy. Opt-in file slots are FortnoxConnectFileOAuthCredentialSlot and FortnoxArchiveOAuthCredentialSlot; they are not on the combined slot.

Resource modules add, each with a Fortnox* read model and, where the resource supports them, a branded identifier, list/get/create/update/delete input and output classes, fortnox*Action exports, and an action array: articles (FortnoxArticle, FortnoxArticleNumber, fortnoxArticleActions), prices (FortnoxPriceList, FortnoxPrice, FortnoxPriceListCode, FortnoxPriceFromQuantity, fortnoxPriceActions), cost centers (FortnoxCostCenter, FortnoxCostCenterCode, fortnoxCostCenterActions), payments (FortnoxInvoicePayment, FortnoxSupplierInvoicePayment, FortnoxInvoicePaymentNumber, FortnoxSupplierInvoicePaymentNumber, fortnoxPaymentActions), offers (FortnoxOffer, FortnoxOfferRow, fortnoxOfferActions, host-only downloadFortnoxOfferPreview, streamFortnoxOfferPreview), print templates (FortnoxPrintTemplate, fortnoxPrintActions), inbox (FortnoxInboxFolder, FortnoxInboxFile, FortnoxInboxId, fortnoxInboxActions, host-only downloadFortnoxInboxFile, streamFortnoxInboxFile, FortnoxInboxFileStream, uploadFortnoxInboxFile, fortnoxInboxUploadMaxBytes), settings (FortnoxCompanySettings, FortnoxLockedPeriod, FortnoxPredefinedAccount, FortnoxLabel, fortnoxSettingsActions), settings registers (FortnoxModeOfPayment, FortnoxTermsOfPayment, FortnoxTermsOfDelivery, FortnoxWayOfDelivery, FortnoxUnit, fortnoxSettingsRegisterActions), profile (FortnoxProfile, fortnoxProfileActions), and bookkeeping (FortnoxFinancialYear, FortnoxFinancialYearId, FortnoxAccount, FortnoxVoucherSeries, FortnoxVoucherSeriesCode, FortnoxVoucher, FortnoxVoucherRow, FortnoxVoucherNumber, FortnoxCreateVoucherInput, FortnoxVoucherRowInput, fortnoxBookkeepingActions; voucher file connections FortnoxVoucherFileConnection, fortnoxVoucherFileActions; SIE files FortnoxGetSieFileOutput, FortnoxSieFile, FortnoxSieType, fortnoxSieFileMaxBytes, fortnoxSieActions; host-only archive upload uploadFortnoxArchiveFile, FortnoxArchiveFile, FortnoxArchiveFileId, fortnoxArchiveUploadMaxBytes). Their opt-in slots (FortnoxArticleOAuthCredentialSlot, FortnoxPriceOAuthCredentialSlot, FortnoxCostCenterOAuthCredentialSlot, FortnoxPaymentOAuthCredentialSlot, FortnoxOfferOAuthCredentialSlot, FortnoxPrintOAuthCredentialSlot, FortnoxInboxOAuthCredentialSlot, FortnoxSettingsOAuthCredentialSlot, FortnoxProfileOAuthCredentialSlot, FortnoxBookkeepingOAuthCredentialSlot) are not on the combined slot. Read actions declare read; create/update actions declare write; deletes, bookkeeping, creating a voucher, and offer lifecycle actions declare destructive. See Read and write Fortnox records for OAuth constants, consent limitations, pagination, selected fields, and monetary wire types.

Gmail submission exports gmailSendMessageAction (gmail.send_message, destructive), GmailRawMessage, GmailSendMessageInput ({ raw, threadId? }), GmailSendMessageOutput ({ accepted: true, id, threadId? }), gmailSendMessageMaxBytes (35 MiB of decoded MIME), GoogleGmailSendOAuthCredentialSlot, and googleGmailSendScopes. Sending uses exactly one request: 7-bit MIME uses upload/gmail/v1/users/me/messages/send?uploadType=multipart; MIME with bytes >= 0x80 uses the JSON raw request to /gmail/v1/users/me/messages/send. The host constructs and reviews complete base64url MIME; no MIME parsing or sender validation is performed by this action. Existing broader Gmail grants can authorize sending without new consent. Submission is not delivery, and unconfirmed sends must not be retried automatically. See Submit a reviewed Gmail message for threading, authorization, and recovery responsibilities.

Generic email's principal contracts are EmailIncomingConnection, EmailImapConnection, EmailSmtpConnection, EmailAddress, EmailBody, EmailAttachmentMetadata, EmailAttachmentBase64, EmailAttachmentContent, EmailMessageSummary, EmailMessage (both with optional isRead / isFlagged), EmailListMessagesInput, EmailListMessagesRequest (both with optional state filters), EmailListMessagesOutput, EmailGetMessageInput, EmailGetMessageOutput, EmailGetAttachmentInput, EmailGetAttachmentRequest, EmailGetAttachmentOutput, EmailMessageHeader (required headers on EmailMessage from email.get_message; hosts fetch via BODY.PEEK[HEADER]), EmailComposeMessage, EmailFolderName, EmailDraftId, EmailCreateDraftInput, EmailCreateDraftOutput, EmailSendMessageInput, EmailSendMessageOutput, EmailSentCopyStatus, EmailSentCopyRequest, and EmailSentCopyOutput. EmailSendMessageInput accepts optional saveToSentItems and sentFolder. EmailSendMessageOutput may include sentCopy and a fixed unverified-receipt warning. EmailClient receives typed list/get/get-attachment/IMAP-draft/SMTP-send requests plus a runtime UsernamePasswordCredential; hosts opt into attachment retrieval through its optional getAttachment method. Filtered list calls use optional listMessagesFiltered; unfiltered calls retain listMessages. Successful list and attachment output is schema-validated before exposure. The connector exports separate EmailIncomingCredentialSlot and EmailSmtpCredentialSlot bindings and does not bundle transport or MIME libraries.

IMAP mailbox mutations export emailSetReadAction, emailTrashAction, and emailUntrashAction, with EmailSetReadInput, EmailTrashInput, EmailUntrashInput, matching *Request classes, EmailSetReadOutput, and EmailMoveMessageOutput. Optional EmailClient.setRead, trash, and untrash methods receive IMAP connections and incoming credentials. Successful output is validated; POP3 is rejected. Move output includes the destination folder and an optional new message ID. See the catalog for adapter safety and trash-discovery requirements. Flag mutations export emailSetFlagAction with EmailSetFlagInput, EmailSetFlagRequest, EmailSetFlagOutput, and optional EmailClient.setFlag host support for the \Flagged system flag. Label mutations export emailModifyLabelsAction with EmailModifyLabelsInput, EmailModifyLabelsRequest, EmailModifyLabelsOutput (an Effect Chunk of EmailImapKeyword atoms), and optional EmailClient.modifyLabels host support. Relocation exports emailMoveAction with EmailMoveInput, EmailMoveRequest, and optional EmailClient.move host support, returning EmailMoveMessageOutput with destination UIDVALIDITY/UID mapping when known.

Batch exports are emailBatchSetReadAction, emailBatchSetFlagAction, emailBatchMoveAction, emailBatchTrashAction, emailBatchUntrashAction, and emailBatchModifyLabelsAction, with matching EmailBatch*Input / EmailBatch*Request contracts and optional EmailClient.batch* methods. EmailBatchMessageIds enforces 1-100 unique nonempty IDs. EmailBatchOperationOutput and EmailBatchMoveOutput contain one per-ID EmailBatchOperationStatus in messageIds order plus EmailBatchSummary; every succeeded move-shaped result requires destination folder, while movedMessageId is optional and only supplied when the destination UIDVALIDITY/UID mapping is known. emailDeletePermanentlyAction uses EmailDeletePermanentlyInput / EmailDeletePermanentlyRequest and optional EmailClient.deletePermanently. It is UID-scoped and destructive; hosts never blanket-expunge, and backup/retention erasure is outside the contract. The shared batch outcome shapes (EmailBatchMessageIds, EmailBatchOperationStatus, EmailBatchResultCode, EmailBatchResultItem, EmailBatchSummary, EmailBatchOperationOutput) live in the internal email-batch module and are re-exported from the /email, /google, and /microsoft entrypoints.

Gmail batch exports are gmailSetReadAction (gmail.set_read, write, returns the normalized GmailMessageOutput with isRead/isFlagged derived from labelIds), gmailBatchSetReadAction, gmailBatchSetStarredAction, gmailBatchModifyLabelsAction (with GmailBatchModifyLabelsInput; removals win, each delta capped at 100), gmailBatchTrashAction, gmailBatchUntrashAction, and gmailDeletePermanentlyAction, all returning shared EmailBatchOperationOutput with sanitized codes only. GoogleGmailFullMailOAuthCredentialSlot requests only https://mail.google.com/ for permanent deletion and is never added to combined/default consent.

The package root also exports the pure parseUnsubscribeMethods helper (RFC 2369/8058 List-Unsubscribe parser returning UnsubscribeMethods with mailto/http methods; execution stays host-owned). See Unsubscribe from mailing lists and report spam.

Microsoft Outlook's principal contracts are OutlookMessage, OutlookMessageWithHeaders (required internetMessageHeaders on outlook.get_message only; list/draft/mutation responses stay on the base message), OutlookInternetMessageHeader, OutlookMessageIdInput, OutlookListMessagesInput, OutlookSearchMessagesInput, OutlookListMessagesOutput, OutlookAttachmentKind, OutlookAttachmentMetadata, OutlookAttachment, OutlookListAttachmentsInput, OutlookListAttachmentsOutput, OutlookGetAttachmentInput, OutlookGetAttachmentOutput, OutlookComposeInput, OutlookCreateReplyDraftInput, OutlookUpdateDraftInput (used by outlookUpdateDraftAction / outlook.update_draft), OutlookSendMailInput, OutlookReplyInput (used by outlookReplyAction / outlook.reply), OutlookSendOutput, OutlookSetReadInput, OutlookTrashInput, and OutlookUntrashInput. outlookSetReadAction, outlookTrashAction, and outlookUntrashAction return the updated OutlookMessage, select mailbox-aware write permissions, and request immutable IDs. Restore targets Deleted Items as its source and defaults the destination to inbox. outlookUpdateDraftAction edits recipients, subject, or complete body on an existing draft; empty arrays clear recipients and omitted fields remain unchanged. It is a write, not a send, and preserves existing mailbox permission selection. See Edit a draft for replacement-body and non-atomic update/send semantics. outlookReplyAction sends the complete reviewed reply in one Graph POST .../reply with explicit recipients, subject, and full body; only HTTP 202 counts as accepted, which means submission, not delivery. See Send a reviewed reply for single-request dispatch and recovery semantics. File attachment retrieval requires Graph's file discriminator and valid base64 content, then exposes it as required contentBase64; item and reference attachments are available only as list metadata. OutlookListAttachmentsOutput.attachments decodes to an Effect Chunk. outlookMoveMessageAction with OutlookMoveMessageInput moves a message to a required destinationFolderId via Graph /move; outlookSetFlagAction with OutlookSetFlagInput PATCHes follow-up flagStatus. OutlookMessage carries optional isFlagged normalized from Graph flag.flagStatus, and OutlookListMessagesInput accepts optional isRead/isFlagged filters composed into $filter. Outlook batch exports are outlookBatchSetReadAction, outlookBatchSetFlagAction, outlookBatchMoveAction, outlookBatchTrashAction, outlookBatchUntrashAction (returning OutlookBatchMoveOutput with provider-returned movedMessageId/destinationFolderId), outlookBatchModifyCategoriesAction, and outlookDeletePermanentlyAction (returning shared EmailBatchOperationOutput), with matching OutlookBatch*Input contracts, Graph JSON batching (at most 20 subrequests per envelope), and sanitized codes only. Category exports are OutlookCategory, OutlookCategoryColor, OutlookListCategoriesInput/Output, OutlookCreateCategoryInput, OutlookDeleteCategoryInput/Output, OutlookSetCategoriesInput, OutlookModifyCategoriesInput, OutlookGetCategoryInput, OutlookUpdateCategoryInput, plus MicrosoftOutlookCategoryRead/WriteOAuthCredentialSlot opt-in slots (excluded from the combined slot). OAuth exports include generic, signed-in-mailbox, shared-mailbox, and combined slots that share microsoft.oauth. Action inputs use /me by default and accept optional mailbox for /users/{id|userPrincipalName} Exchange Online targets. Set integration config key microsoftMailboxAccessModeConfigKey (mailboxAccessMode) to application for application-token mailbox targeting; delegated is the default.

OutlookListMessagesInput and OutlookSearchMessagesInput decode null/blank optional strings and null page sizes to undefined without rewriting real cursors. See Optional Outlook read inputs for the accepted fields, page-size range, and application-mailbox requirement.

OneDrive's principal contracts are OneDriveItem, OneDriveItemIdInput, OneDriveListItemsInput, OneDriveSearchItemsInput, OneDriveListItemsOutput, OneDriveCreateFolderInput, OneDriveDeleteItemInput, OneDriveDeleteItemOutput, OneDriveMoveItemInput, OneDriveCopyItemInput, OneDriveCopyAcceptedOutput, OneDriveCopyMonitorUrl, OneDriveCopyStatus, OneDriveCopyStatusInput, OneDriveCopyStatusOutput, and OneDriveCopyStatusError. Action exports include oneDriveMoveItemAction, oneDriveCopyItemAction, and oneDriveGetCopyStatusAction. Inputs default to /me/drive; explicit driveId targets /drives/{driveId}. Set microsoftOneDriveAccessModeConfigKey (oneDriveAccessMode) to delegated_all for broad delegated slots or application for application-token access; application mode requires driveId. Microsoft actions use Graph v1.0 with outlook.* and onedrive.* ids, and all scoped slots share microsoft.oauth.

Host-only original-byte download is downloadOneDriveItem, with OneDriveDownloadError, OneDriveDownloadErrorCode, OneDriveDownloadSource, OneDriveDownloadBudget, OneDriveDownloadInput, and OneDriveDownloadResult. It is not an action output. Bytes are untouched Uint8Array. Errors expose only code. source metadata is observed before download and is not a verified snapshot. Provide ConnectorBinaryHttpClient in addition to the existing CredentialResolver; the optional GET-only port is independent of ConnectorHttpClient and must not auto-follow redirects, attach cookies, or add ambient auth. Hosts enforce streamed limits and connection-time public DNS/IP policy. Root types include ConnectorBinaryHttpRequest, ConnectorBinaryHttpResponse, and ConnectorBinaryHttpClientApi, whose optional stream method answers ConnectorBinaryHttpStreamResponse (Stream for HTTP 200, else bounded Bytes; types ConnectorBinaryHttpBodyStream and ConnectorBinaryHttpBufferedResponse) inside a Scope. streamOneDriveItem answers OneDriveDownloadStream (the same source plus body and contentLength), and getOneDriveDownloadUrl answers OneDriveDownloadUrl (Graph's @microsoft.graph.downloadUrl as a Redacted url, a conservative expiresAt from oneDriveDownloadUrlLifetimeMs minus the root connectorLinkExpiryMarginMs, source, requested). See Stream, or skip the download.

The Dropbox equivalent is downloadDropboxFile, with DropboxDownloadError, DropboxDownloadErrorCode, DropboxDownloadSource, DropboxDownloadBudget (maxBytes, maxErrorBodyBytes), DropboxDownloadInput (path), and DropboxDownloadResult. It uses the same ConnectorBinaryHttpClient port and CredentialResolver, requests the DropboxContentReadOAuthCredentialSlot (files.content.read), issues one GET, never follows redirects, and returns source metadata taken from the Dropbox-API-Result header of the served response. The content hash is not verified. streamDropboxFile answers DropboxDownloadStream (the same source plus body and contentLength), and getDropboxTemporaryLink(integration, { path }) answers DropboxTemporaryLink (a Redacted url, a conservative expiresAt from dropboxTemporaryLinkLifetimeMs minus connectorLinkExpiryMarginMs, source, requested) over ConnectorHttpClient. Dropbox scope exports now include dropboxFilesContentReadScope, dropboxContentReadScopes, and dropboxContentApiBaseUrl.

GoogleCalendarEventDateTime is the exclusive union { date, timeZone? } | { dateTime, timeZone? }. Create/update boundaries require exactly one non-empty date or dateTime and reject null, missing, empty, and dual-field values before provider execution.

GoogleCalendarSendUpdates is the 'all' | 'externalOnly' | 'none' literal union for the optional sendUpdates field of GoogleCalendarCreateEventInput, GoogleCalendarUpdateEventInput, and GoogleCalendarDeleteEventInput; it is sent only as Google's sendUpdates query parameter. googleCalendarDeleteEventAction validates a struct over GoogleCalendarDeleteEventInput's fields, so executeTyped accepts both GoogleCalendarDeleteEventInput and existing GoogleCalendarEventIdInput values. googleCalendarGetEventAction keeps GoogleCalendarEventIdInput.

Google Drive's principal contracts are GoogleDriveFile, GoogleDriveUser, GoogleDriveCapabilities, GoogleDriveListFilesInput, GoogleDriveSearchFilesInput, GoogleDriveListFilesOutput, GoogleDriveFileIdInput, GoogleDriveCreateFolderInput, and GoogleDriveDeleteFileOutput. Public actions are googleDriveListFilesAction, googleDriveSearchFilesAction, googleDriveGetFileAction, googleDriveCreateFolderAction, googleDriveTrashFileAction, and googleDriveDeleteFileAction; googleDriveActions composes them into GoogleConnector.

GoogleDriveListFilesOutput.files and repeated GoogleDriveFile metadata fields decode to Effect Chunk values for structural equality. GoogleDriveFileIdInput accepts optional resourceKey; parent-scoped list, search, and create inputs accept optional parentResourceKey. These values produce X-Goog-Drive-Resource-Keys for protected link-shared files.

GoogleDriveMetadataReadonlyOAuthCredentialSlot requests googleDriveMetadataReadonlyScope for list/search/get. GoogleDriveFileOAuthCredentialSlot requests googleDriveFileScope for folder create, trash, and permanent delete. Both use googleOAuthSlotId (google.oauth), and GoogleCombinedOAuthCredentialSlot includes both Drive scopes alongside Gmail and Calendar scopes. Constants also include googleDriveApiBaseUrl, googleDriveFolderMimeType, and googleDriveFileFields.

Google's normalized attachment and thread contracts are GmailListAttachmentsInput, GmailListAttachmentsOutput, GmailGetAttachmentInput, GmailGetAttachmentOutput, GmailAttachmentBase64Url, GmailAttachmentBase64, GmailGetThreadInput, GmailGetMessageInput, GmailMetadataHeaders, GmailMetadataHeaderName, gmailMetadataHeadersMaxItems, GmailListThreadsInput, GmailListThreadsOutput, GmailThreadRef, GmailThreadAttachment, GmailThreadMessage, and GmailThreadOutput.

  • GmailGetThreadInput: required threadId and format: 'full' | 'metadata' | 'minimal'; optional metadataHeaders (GmailMetadataHeaders), only with format: 'metadata'.
  • GmailGetMessageInput: required id; optional format: 'minimal' | 'full' | 'raw' | 'metadata' and metadataHeaders, only with format: 'metadata'. Another combination fails decoding, and make throws on it.
  • GmailMetadataHeaders: 1 to gmailMetadataHeadersMaxItems (50) GmailMetadataHeaderName values (RFC 5322 field names: 1 to 128 printable ASCII characters without :), sent as repeated metadataHeaders query parameters. On gmail.get_thread, each message keeps exactly the selected headers (case-insensitive) instead of the default allowlist.
  • GmailListThreadsInput (gmail.list_threads): the GmailListInput fields (query, labelId, maxResults, pageToken, isRead, isFlagged).
  • GmailListThreadsOutput: optional threads (GmailThreadRef: required id; optional snippet and historyId), nextPageToken, and resultSizeEstimate.
  • GmailThreadOutput: required id and messages; optional historyId.
  • GmailThreadMessage: required id, headers, and attachments; optional threadId, labelIds, snippet, internalDate, body, and bodyMimeType.
  • GmailThreadAttachment: optional partId, filename, mimeType, size, attachmentId, inline, and contentId.
  • GmailListAttachmentsInput / GmailListAttachmentsOutput: one messageId to a metadata-only attachment Chunk.
  • GmailGetAttachmentInput: required messageId and attachmentId.
  • GmailGetAttachmentOutput: required input IDs, non-negative integer size, Gmail base64url data, and standard-base64 contentBase64.

Non-success provider responses return ActionResult.failure; authorization failures use google_unauthorized, while action-specific failures use gmail_get_thread_failed, gmail_list_threads_failed, gmail_list_attachments_failed, or gmail_get_attachment_failed. Invalid JSON or response shape fails with ConnectorError { cause: 'validation_failed' }.

Gmail label contracts are GmailLabel (with GmailLabelMessageListVisibility, GmailLabelListVisibility, and GmailLabelType), GmailCreateLabelInput, GmailLabelIdInput, GmailUpdateLabelInput (PATCH rename, at least one updatable field), and GmailDeleteLabelOutput ({ id, deleted: true } without decoding the empty 204 body). gmailSetStarredAction with GmailSetStarredInput stars through the STARRED system label. Label mutations reuse the existing gmail.modify slot; reads use the readonly slot.

Gmail draft contracts are GmailDraftComposeInput (to, subject, body, optional contentType, cc, bcc, from, attachments), GmailDraftUpdateInput (the same fields plus draftId), GmailDraftReplyInput (messageId, body, optional contentType, from, attachments), GmailDraftIdInput (draftId), and GmailDraftContentType ('text' | 'html'; text when omitted). A text body is sent as multipart/alternative with a derived HTML part; see Gmail draft bodies.

Gmail draft attachment contracts are GmailDraftAttachment ({ filename, mimeType, contentBase64 }), GmailDraftAttachments, the field schemas GmailDraftAttachmentFilename, GmailDraftAttachmentMimeType, and GmailDraftAttachmentBase64, and the limits gmailDraftAttachmentsMaxItems (10), gmailDraftAttachmentsMaxBytes (25 MiB decoded in total), and gmailDraftMessageMaxBytes (35 MiB of decoded MIME). A draft with attachments is written through the draft media upload; see Gmail draft attachments.

See Connectors catalog for action ids.

Sandbox

SubpathMain exports
@yolk-sdk/sandboxSandbox, SandboxStateStore, makeSandboxName, CloudflareSandboxState, normalizeWorkspaceCwd, NormalizedWorkspaceCwd, normalizeWorkspacePath, NormalizedWorkspacePath, SandboxReadFileInput, SandboxWriteFileInput, command/result/lifecycle/source schemas
@yolk-sdk/sandbox/agentmakeSandboxToolModule, makeSandboxToolModuleFromApi, sandboxToolName, SandboxToolOutput
@yolk-sdk/sandbox/vercelmakeVercelSandboxLayer, makeVercelSandboxLayerWithClient, VercelSandboxEnvironment, VercelSandboxFileTooLargeError
@yolk-sdk/sandbox/cloudflareCloudflareSandbox (Durable Object class), makeCloudflareSandboxLayer, CloudflareSandboxLayerConfig, CloudflareSandboxInitialSource, CloudflareSandboxNamespace, CloudflareSandboxStub, CloudflareSandboxSourceSpec, CloudflareSandboxReadFileOutput, RPC protocol types, defaultCloudflareSandboxWorkspaceRoot, defaultCloudflareSandboxDiskMb, defaultCloudflareSandboxMaxOutputBytes
@yolk-sdk/sandbox/testingmakeFakeSandboxLayer, makeFakeSandboxFiles, makeInMemorySandboxStateStoreLayer

Code mode

SubpathMain exports
@yolk-sdk/codemodemakeCodeModeTool, runCodeModeScript, RunCodeModeScriptOptions, CodeModeScriptResult, CodeModeScriptCall, CodeModeScriptStaged, readOnlyNestedCallGate, ReadOnlyNestedCallGateOptions, ReadOnlyNestedCallRefusalCode, CodeModeNestedCallRefused, CodeModeNestedCallRefusal, CodeModeBeforeNestedCall, CodeModeBeforeNestedCallInput, CodeModeToolBeforeNestedCallInput, CodeModeNestedCallSettledInput, CodeModeExecutor, CodeModeInternalError, CodeModeInternalErrorStage, CodeModeInternalErrorObserver, CodeModeLimits, CodeModeAfterNestedCallInput, CodeModeNestedCallOutcome, CodeModeStructuredContent, CodeModeInterruptedCalls, CodeModeInterruptedCall, CodeModeInterruptedCallStatus, CodeModeStagedPlan, CodeModeStagingOptions, CodeModeStagingDescription, defaultCodeModeLimits, codeModeStoreFromToolResults, renderCodeModeDescription, renderCodeModeInstructedDescription, codeModeCatalogInstruction, codeModeCatalogInstructionKey, CodeModeCatalogSummary, summarizeCodeModeCatalog, renderCodeModeCatalog, codeModeStageOnlyCatalog, selectCodeModeListing, searchCodeModeTools, codeModeToolSignature, maxCodeModeSearchSignatureChars, boundCodeModeSegments, makeClassifierTool, ClassifierToolParams
@yolk-sdk/codemode/nodemakePiCodeModeExecutor, defaultMaxConcurrentExecutions
@yolk-sdk/codemode/cloudflaremakeDynamicWorkerCodeModeExecutor, WorkerLoader, WorkerLoaderCode, DynamicWorkerCodeModeExecutorOptions, defaultDynamicWorkerCompatibilityDate, defaultDynamicWorkerCpuMs, maxDynamicWorkerHostCallFailureReports

See Add code mode; makeCodeModeTool({ catalog: 'instructions' }) delivers the catalog as a host instruction (Deliver the catalog as instructions). readOnlyNestedCallGate({ admit?, admitModelCall? }) takes two predicates over the CodeModeBeforeNestedCallInput ({ call, tool, access }): admit relaxes the access check and admitModelCall the invokesModel check (Allow only reads).

File extraction

SubpathMain exports
@yolk-sdk/extractorsFileExtractor, FileExtractorApi, FileInput, ExtractedFile, ExtractedFileMetadata, ExtractedFileFormat, OfficeFileFormat, extractedFileFormats, fileFormatFor, isOfficeFileFormat, FileExtractorLimits, defaultFileExtractorLimits, sanitizeExtractedText, FileExtractorError, FileExtractionError, FileExtractionFailureReason, UnsupportedFileFormatError, OfficeArchiveError, SheetJsUnavailableError, minimumSheetJsVersion, sheetJsInstallCommand
@yolk-sdk/extractors/nodeFileExtractorLayer, makeFileExtractorLayer, FileExtractorOptions, FileExtractorIsolation, WorkerIsolationOptions, defaultWorkerIsolation, normalizeOfficeArchive, OfficeArchiveLimits, SheetJsLoader; re-exports FileExtractor, FileExtractorApi
@yolk-sdk/extractors/knowledgeFileKnowledgeExtractorLayer, makeFileKnowledgeExtractor

@yolk-sdk/extractors/node/extraction-worker is the worker entry the Node layer starts; do not import it directly. See Extract file text.

Files

SubpathMain exports
@yolk-sdk/filesmakeObjectStorageFileStore, ObjectStorageApi, ObjectStorageHead, ObjectStorageError, ObjectStorageFileStoreOptions, deleteScopeFiles, fileIdFor, isValidFileScope, makeFileToolModule, FileToolModuleOptions, FileUploadTransportApi, FileUploadTransportError, FileSandboxApi, FileSandboxError, fileUploadToolName, fileUrlToolName, fileToSandboxToolName, fileFromSandboxToolName, defaultMaxFileTransferBytes

Capture itself (FilePart, FileStoreApi, resolveTools({ files })) is in @yolk-sdk/agent. See Move files between tools.

Subscription pools

SubpathMain exports
@yolk-sdk/poolmakePool, Pool, PoolOptions, PoolAccount, PoolAccountState, PoolState, poolFailureCooldown, defaultPoolMaxAgeMs, poolQuotaRetryAfterFloorMs, poolMaxCooldownMs, poolAuthCooldownMs, rankPool, staleQuotaCooldowns, isCooldownActive, poolReadingFromSnapshot, poolRoute, PoolDecision, PoolCandidate, PoolRankInput, PoolReading, PoolWindow, PoolAccountId, PoolPin, PoolCooldown, PoolQuotaCooldown, PoolAuthCooldown, PoolConfigError, PoolStoreError, PoolUnknownAccountError
@yolk-sdk/pool/storePoolStoreApi, PoolStoreSnapshot, PoolStoreState, PoolStoredReading, PoolStoreError, makeMemoryPoolStore, poolStoreContract, PoolStoreContractCase, PoolStoreContractViolation

See Share subscription accounts.

Connector file APIs

The root also exports connectorActionFile, sniffBase64MimeType and the action fileOutput types (ConnectorActionFile, ConnectorActionFileOutput, UnknownConnectorActionFileOutput): actions whose output carries bytes return them to agent tools as files. The root additionally exports ConnectorBinaryWriteHttpClient, ConnectorBinaryWriteHttpClientApi (with optional uploadSession), ConnectorBinaryWriteHttpRequest, ConnectorBinaryUploadSessionRequest, ConnectorFileTransferError, ConnectorFileTransferBudget and ConnectorFileBytes. Existing GET-only binary ports remain unchanged.

See Transfer connector files for all helper signatures and the complete provider matrix, including R2ObjectClient/R2ObjectClientApi, Drive's GoogleDriveReadonlyOAuthCredentialSlot and GoogleDriveDownloadBudget, Notion's NotionFileDownloadPolicy, and optional EmailClient.getAttachmentBytes returning EmailAttachmentBytesResult. Provider input/result types are exported from their existing subpaths; new helpers return host-only bytes or allowlisted write metadata and code-only transfer errors. New metadata actions are fortnoxListSupplierInvoiceFilesAction and todoistListCommentsAction, with their provider-named input/output schemas. No new package subpaths or generic agent file actions.

On this page