Migration and versioning
Canary stability, lockstep package versions, upgrade checks, and migration workflow.
Yolk packages are canary-stage. APIs can change between canary releases.
Version rule
Keep every public package on the same canary version:
pnpm add @yolk-sdk/agent@canary @yolk-sdk/mcp@canary @yolk-sdk/knowledge@canary @yolk-sdk/connectors@canary @yolk-sdk/sandbox@canary @yolk-sdk/vercel-workflows@canary @yolk-sdk/harness@canary @yolk-sdk/codemode@canary @yolk-sdk/extractors@canary @yolk-sdk/files@canary @yolk-sdk/pool@canary
pnpm add -D @yolk-sdk/conformance@canary @yolk-sdk/emulators@canaryAdd only the packages you use. @yolk-sdk/harness is available from 0.1.0-canary.77.
@yolk-sdk/codemode, @yolk-sdk/conformance, and @yolk-sdk/emulators are available from
0.1.0-canary.96. @yolk-sdk/extractors is available from 0.1.0-canary.98,
@yolk-sdk/files from 0.1.0-canary.114, and @yolk-sdk/pool from 0.1.0-canary.116. Keep each
of them on the same lockstep version as the other public packages.
Check installed versions:
pnpm list '@yolk-sdk/*'Do not mix versions unless a release note explicitly says it is safe.
Recent canary migrations
Canary.178: Effect 4.2.0, effect as a peer
Canary.178 targets effect@4.2.0, and effect becomes a peer dependency. Upgrade the Yolk packages
and Effect together, and move effect and the coordinated Effect runtime packages
(@effect/platform-*, @effect/sql-*, @effect/opentelemetry, @effect/vitest) to 4.2.0
together. Yolk APIs are unchanged.
- Every package declares
effectas a peer with the range~4.2.0(tested on 4.2.0) instead of an exact dependency, so the host installseffectand every package shares that one copy. Effect patch releases satisfy the range; a new Effect minor needs a new Yolk canary, because Yolk calls Effect's unstablehttp,process, andsocketmodules. A host still oneffect@4.1.7gets an unmet peer: npm fails the install withERESOLVE, and pnpm only warns (then runs Yolk against 4.1.7, which it does not support), so checkpnpm install's peer warnings. @yolk-sdk/mcpdeclares@effect/platform-nodeas an optional peer (~4.2.0). Only@yolk-sdk/mcp/client/nodeimports it: Node hosts that use it install@effect/platform-nodeat the same version aseffect; other hosts need nothing.@effect/platform-node4.2.0 requiresws^8.23.1. If another dependency keeps an olderws, the package manager can install@workflow/coretwice, and a Workflow build fails with duplicate step ids. Dedupews, for example with a pnpm overridews: ^8.23.1.- Effect 4.2 has breaking changes of its own: a custom
ChildProcessSpawner.makeHandlemust provideexitStatus;Cookies.cookiesis an array (read cookies withCookies.get);HttpClient.withRateLimiteraddsHttpClientErrorto the error type unlessfailsWithis set;FileSystem.globtakes onePathFilter.Input;Yaml.parsereturns aResultand follows YAML 1.2;RpcServer.layerProtocolStdiois a function; a hand-builtPool.Statsneedsacquiring, a hand-builtToolkit.HandlerContextneedsmodelOutput; and exhaustiveSystemErrorTaghandlers needDirectoryNotEmpty. Check the Effect 4.2.0 changelog for the APIs your code uses. @effect/opentelemetry4.2 is built on the OpenTelemetry SDK v3: install@opentelemetry/sdk-trace(itsNodeSdkimports it),@opentelemetry/sdk-logs3.x, and@opentelemetry/api1.10 or later, and pass the exporter as an option:new BatchLogRecordProcessor({ exporter }).
Canary.163: model step execution ids under Workflow 5.8
Workflow 5.8's speculative execution can discard a step body's outcome and run the body again under
the same getStepMetadata() stepId and attempt, possibly beside the first, for steps with
maxRetries > 0. An executionId of ${stepId}:${attempt}, the example earlier docs gave, then
repeats: both executions write the same event ids and clients splice their answers. Generate the
id once at the start of the step body instead, for example
${stepId}:${attempt}:${crypto.randomUUID()}. TestWorkflowWorld's new discardStepExecution
option reproduces this in tests
(Speculative execution).
Canary.158: Fortnox bookkeeping actions
FortnoxConnector grows from 91 to 102 actions: financial years, accounts, voucher series,
vouchers, voucher file connections, and SIE files. Hosts that expose every Fortnox action as agent
tools gain these eleven tools, including the destructive fortnox.create_voucher (Fortnox books
the voucher at once and its API documents no voucher delete or update): keep approval on
destructive tools, or filter the actions you expose. The new bookkeeping scope
(FortnoxBookkeepingOAuthCredentialSlot) stays outside FortnoxCombinedOAuthCredentialSlot;
Fortnox grants a scope added to an app only after the user authorizes again, so existing
connections must reconnect before these actions work. fortnox.get_sie_file also needs the host
ConnectorBinaryHttpClient in the connector layer. See Bookkeeping.
Canary.152: lazy knowledge tokenizer
@yolk-sdk/knowledge/chunking no longer evaluates gpt-tokenizer (about 2 MB) on import: the
default chunker loads it the first time text is chunked or counted. Imports of KnowledgeChunker,
DefaultKnowledgeChunkerLive, makeDefaultKnowledgeChunker, and chunkKnowledgeText are
unchanged and need no migration.
countKnowledgeChunkTokens(text) now returns Effect<number, KnowledgeChunkingError> instead of a
number. Run it in your Effect (const tokens = yield* countKnowledgeChunkTokens(text)), or call
gpt-tokenizer yourself where you need a synchronous count. chunkKnowledgeText and the default
chunker can also fail with KnowledgeChunkingError (Failed to load the default tokenizer) when
the tokenizer module cannot load.
makeDynamicWorkerCodeModeExecutor (@yolk-sdk/codemode/cloudflare) now loads Sucrase when the
first script runs instead of on import; if Sucrase cannot load, the execution fails like a sandbox
that cannot load (Could not load the script sandbox., onInternalError stage load).
Canary.150: pi code mode executor failure messages
makePiCodeModeExecutor (@yolk-sdk/codemode/node) now answers its own failures with fixed
messages, as the Dynamic Worker executor does: a sandbox that cannot be created fails with Could not create the sandbox. (before: Could not create the sandbox: <error>), and a sandbox failure
of pi's worker or QuickJS VM (Failed to load QuickJS: …, Failed to start worker: …, a worker
crash or exit) with The script sandbox failed.. Script errors, timeouts, and aborts are unchanged.
Code matching the old text needs the new messages; to log the original error, pass the new
onInternalError option (both executors).
Canary.149: reasoning effort levels and OpenAI chat effort
AgentReasoningEffort adds none and max (none, minimal, low, medium, high, xhigh,
max). Stored efforts keep decoding. Exhaustive matches or Records keyed by the type need the
two new cases, and code passing an AgentReasoningEffort where a narrower host type is expected
needs a guard. Data written with the new values does not decode on an earlier canary, so roll every
reader forward first. Anthropic Messages (Claude, OpenCode Go messages) sends max and rejects
none with a validation_error LLMError; the other providers pass both through.
makeOpenAiProviderLayer and OpenAiProviderLayer now send reasoningEffort as
reasoning_effort on the native OpenAI endpoint (no chatCompletionsUrl, or
https://api.openai.com/v1/chat/completions). Before, it was dropped unless
reasoningEffortFormat was set. Models without reasoning reject the field: stop sending them an
effort, or set reasoningEffortFormat: 'omit' (new), which never sends it and never fails. Move an
extraBody.reasoning_effort workaround to the request's reasoningEffort (reasoning_effort is
now a canonical key there and is dropped from extraBody). On any other chatCompletionsUrl, and
in toOpenAiRequestBody without a format, a request with an effort now fails with a
validation_error instead of being sent without it: set reasoningEffortFormat ('omit'
included), or stop sending the effort. Vercel AI Gateway and OpenCode Go set their format already;
the Gateway's reasoningEffortFormat also accepts 'omit'.
Canary.149: Dynamic Worker code mode CPU limit
makeDynamicWorkerCodeModeExecutor (@yolk-sdk/codemode/cloudflare) now loads every script with
limits.cpuMs (new option cpuMs, default 500). A script that used more CPU time before now fails
with a timeout (Execution exceeded its CPU limit of <cpuMs> ms): raise cpuMs if your scripts
compute more. A tool or global call the script left pending is rejected when the execution ends,
and calls arriving afterwards are rejected without running. Loader and isolate failures now carry
fixed messages (Could not load the script sandbox., The script sandbox failed.) instead of the
runtime's error text after The script sandbox failed: ; code matching that prefix needs the new
messages. A custom WorkerLoader now receives limits in WorkerLoaderCode.
Canary.145: Cloudflare runtime hook token conflicts
The Cloudflare runtime (@yolk-sdk/vercel-workflows/cloudflare*) now refuses a hook whose token
another live hook holds, in another run or the same one, as Vercel does. Before, the newest hook
took the token and resumeHook reached it instead of the live holder. Now creating it succeeds,
but awaiting it rejects with HookConflictError (token, conflictingRunId, exported from
./cloudflare), and the holder keeps the token. Disposing a hook (using or dispose()) now frees
its token, and so does its run's end; an answered hook keeps its token until then. Give each pause
its own token, or dispose the previous hook before the run waits again (a loop with
using hook = createHook({ token }) per round keeps working). A second resumeHook to a live,
answered hook now succeeds (the payload is dropped) instead of failing with HookNotFoundError.
Hosts that drive WorkflowExecution themselves pass claimHook (returning a HookClaim) instead
of registerHook; custom WorkflowRunStub namespaces implement hookClaim and hookHeld instead
of hookRegister (Cloudflare runtime).
Runs in flight at the upgrade keep what the earlier build left. A run waiting on a token that the
earlier build let a newer run take stays unreachable: the index names the newer run, and its
resumeHook calls reach the newer run. Before upgrading, drain or cancel runs waiting on tokens
that several runs share. Earlier builds also kept the token entry of a hook that was disposed but
never answered. A run that replays after the upgrade (after an eviction, or on its next resumeHook)
repairs both: disposing that hook again deletes its entry, and a hook that still has an entry asks
the index for its token again (it is refused if another live hook holds it). A run that does not
replay keeps that entry until it ends, and the token stays taken until then.
Canary.144: Cloudflare sandbox state
@yolk-sdk/sandbox adds a Cloudflare Containers adapter
(Cloudflare Containers), and with it a second sandbox state:
SandboxStategainsCloudflareSandboxState(_tag: 'Cloudflare', withbootId). Exhaustive matches overSandboxStateneed aCloudflarecase; a host state store that decodes stored state with theSandboxStateschema accepts both.SandboxProviderError.provideris'vercel' | 'cloudflare'.- The
sandboxtool'sSandboxToolOutput.stateis a union of the Vercel and Cloudflare shapes. sandboxStateDecisiontakes an optionalprovider; the Vercel layer passes'Vercel', so a stored Cloudflare state for the same session recreates (reason: 'provider_mismatch').
Canary.143: non-empty harness pause
Driver.pause and Inbox.park from @yolk-sdk/harness take a non-empty request id list
(Array.NonEmptyReadonlyArray<string> from effect). An empty pause was Ready at once, so the
drain kept its claim and nothing woke the run. StepOutcome.AwaitingInput requests and
ParkedState.requestIds are non-empty too. Map a tool batch's requests with Effect's Array.map,
which keeps the list non-empty (the native .map returns string[]). Fragment, inside a drain:
import { Array as Arr } from 'effect'
const requestIds = Arr.map(outcome.requests, request => request.requestId)
const decision = yield * inbox.park(runId, requestIds, context.drainToken)Check a host-built list with Arr.isReadonlyArrayNonEmpty and do not pause when it is empty.
Custom InboxApi / DriverApi implementations take the narrower parameter
(Harness API).
Canary.143: test world hook token conflicts
TestWorkflowWorld now refuses a hook whose token another live hook holds, in another run or the
same one, as Vercel does. Creating it succeeds, but awaiting it rejects with
TestWorkflowHookConflictError (named HookConflictError, with token and conflictingRunId),
and the holder keeps the token. Vercel decides the conflict at the run's next suspension and the
world once the code that created the hook yields, so a disposal made before then frees the token
for the new hook. Before, the world registered both. Update host tests in which two live runs, or
two live hooks of one run, share a token: give each pause its own token, or let the holder dispose
its hook or end its run first. TestWorkflowHookConflictError is no longer deprecated
(Hooks).
Canary.141: idempotent stream close
TestWorkflowWorld now treats closing an already closed stream as Vercel does: the close succeeds
(still counted in inspect(runId).streamCloseCount) instead of throwing the 409
TestWorkflowStreamConflictError. Writes after close still throw that conflict. Update host tests
that expected a second close to throw.
runVercelAgentWorkflow now retries the close step by default: closeStreamRetry defaults to
defaultCloseStreamRetry ({ maxAttempts: 3 }, any rejection, a FatalError too), so a close
applied by an attempt that then failed completes the run when a later attempt succeeds. Keep
closeStream close-only and safe to repeat, or opt out with
closeStreamRetry: noWorkflowStepRetry. Tests that counted one closeStream call for a failing
close now see up to three
(Retry policy).
Canary.131: test world step errors
TestWorkflowWorld.runStep now treats step errors as the platform does: it stores each thrown value
with the installed workflow runtime's serializer and throws only the value read back, never retries a
FatalError, and wraps an exhausted step's error in the platform's FatalError
(Step "<name>" failed after N retries: ..., with the error as cause). Update tests that compared
a step error by identity or class: compare message, name and plain-data cause instead. Tests
that execute steps must run in Vitest's Node environment. A step error the platform cannot store is
listed in inspect(runId).unstorableStepErrors; assert it is empty
(Step errors).
Providers also fail a malformed returned tool call (empty or padded id or name) as a typed
invalid_response LLMError instead of a defect; hosts that caught that defect can drop the
workaround.
Canary.126: typed tool results
A tool's typed output is now the single contract for code mode scripts, files are typed fields of
that output, and script values never contain file labels
(ADR 0013).
makeTool tools that return a ToolResult keep working in this canary (deprecated), except for
files: see the first bullet below before upgrading.
Convert a tool that returns [TextPart(JSON), FilePart]. Fragment: Params and exportInvoice are
host-owned; ToolFile and FileBytes come from @yolk-sdk/agent/protocol.
// Before (deprecated)
makeTool({
name: 'export_invoice',
description: 'Export an invoice as JSON and its PDF.',
parameters: Params,
access: 'read',
execute: ({ call, params }) =>
exportInvoice(params.id).pipe(
Effect.map(invoice =>
ToolResult.make({
toolCallId: call.id,
content: [
TextPart.make({ text: JSON.stringify({ number: invoice.number }) }),
filePartFromBytes({
bytes: invoice.pdf,
mimeType: 'application/pdf',
filename: 'invoice.pdf'
})
]
})
)
)
})
// After
makeTool({
name: 'export_invoice',
description: 'Export an invoice as JSON and its PDF.',
parameters: Params,
output: Schema.Struct({ number: Schema.String, pdf: ToolFile }),
access: 'read',
execute: ({ params }) =>
exportInvoice(params.id).pipe(
Effect.map(invoice => ({
output: {
number: invoice.number,
pdf: new FileBytes({
bytes: invoice.pdf,
name: 'invoice.pdf',
mimeType: 'application/pdf'
})
}
}))
)
})- Files returned as
FilePartby tools withoutoutput(deprecatedToolResulttools included) are no longer reachable from scripts: the model still sees their labels, the script only the text. Before upgrading, give every byte-producing tool whose files scripts move anoutputwith aToolFilefield (as above). - With
output, return{ output }: Yolk encodes it (Schema.toCodecJson), captures file fields intoFileRef({ fileId, name, mimeType, size }) orFileUnavailable({ unavailable, name, mimeType }), and shows the model compact JSON with file labels, orrender(value, files).outputschemas must encode without services and to plain JSON (aFileBytesin aSchema.Anyfield fails the call);Schema.Voidencodes asnull.ToolFilebelongs only inoutput:makeToolthrows whenparametersholds one. resolveToolschecks every successful result of a tool with an output schema against it (excess properties rejected) and passes on the checked value; a value that does not match is dropped (logged without the value), so scripts reject the call while the model still sees the content. This covers deprecatedToolResulttools and raw registrations.- Raw registrations (not
makeTool) whosedef.outputSchemais set needdecodeOutput: toolOutputDecoder(schema)(@yolk-sdk/agent/protocol); MCP registrations built frommcpToolToToolDefdefs needdecodeOutput: mcpToolOutputDecoder(@yolk-sdk/mcp/client). Without itresolveToolsfails withoutput_validation_required. For raw interaction registrations,def.outputSchemaanddecodeOutputdescribe the action's own value (structuredContent.resultof a completed outcome), checked before the receipt is settled (ADR 0013, Result boundary). makeToolwith explicit type arguments andoutputtakes three:makeTool<Context, typeof Params, typeof Output>. Two explicit type arguments no longer accept a typed{ output }(it used to escape its schema); drop them to infer, or add the third.- Without
output, return{ content }; a structured value needsoutput. modelVisibleToolError({ code })gives scriptserror.code.- Scripts: typed tools resolve to their declared value with no merged
files; a typed result without a value rejects (returned an invalid result); untyped tools resolve to their text without file labels; failures reject with the message anderror.code. RemoveJSON.parseof typed results andtypeof r === 'string'guards. - MCP tools declare and resolve to
{ value, files }(valueisstructuredContent, else the text of the text blocks and embedded text resources, parsed once when it is one JSON object or array, else the text;resource_linkblocks never enter it). Readvaluewhere scripts read the result itself (upload.value.url, notupload.url). Local stdio calls now list the tools in the same session and validatestructuredContentagainst the listedoutputSchema, like remote calls. - MCP blobs, images and audio are stored when the call runs: inside
resolveToolsthrough the resolution'sfiles; elsewhere (a HITL route callingresumeRemoteMcpServerToolCall, a directcallLocalMcpServerTool) passfileCapture: makeToolFileCapture({ store })(@yolk-sdk/agent/tools) on the call input, or every file isFileUnavailable(no file store). Results without file blocks keep their previous model content. - Connector
gmail.get_attachment,outlook.get_attachmentandemail.get_attachmentresolve to{ value, files }instead of{ ...metadata, files }. - Labels are
Fileparts now: a captured image, document or audio part is followed by aFilepart with aRefsource instead of a text label, and an unstored file is aFilepart with the newOmitted { reason }source. Providers render the same text. Readers older than this canary cannot decode transcripts holding anOmittedsource. - The tool ledger keeps typed values whole: an oversized value replays as an error result. Stored
copies keep
Fileparts as parts through every reduction (labels are never flattened into the text).
New, opt-in: @yolk-sdk/connectors/kie adds the Kie connector (GPT Image 2 and Wan 2.7 tasks and
their status) with the KieApiKeySlot credential slot. See Kie.
Canary.125: Fortnox invoice Remarks and row inputs
fortnox.create_invoice and fortnox.update_invoice accept Remarks, the invoice text
(Fakturatext) printed on the invoice, and FortnoxInvoice returns it. Comments stays the
internal note; both are limited to 1024 characters. Invoice write rows change shape, a breaking
change for hosts that build them:
- Write rows are
FortnoxInvoiceRowInput, not the read schemaFortnoxInvoiceRow. It is a closed schema with a matching type, not a class: replaceFortnoxInvoiceRow.make(row)with a plain object typedFortnoxInvoiceRowInput. Read-onlyPriceExcludingVAT,Total, andTotalExcludingVATare no longer inputs (Fortnox rejected a writtenPriceExcludingVATwith code 2000321); sendPrice. - Rows are closed: an unknown row key fails instead of being dropped. Connector
execute/invokefail withvalidation_failed, generated agent tools reject the call, andFortnoxCreateInvoiceInput.make/FortnoxUpdateInvoiceInput.makethrow.executeTypeddoes not re-check an existing instance, so an instance changed aftermakeis not re-validated. Invoice-level unknown keys are still dropped onexecute. - Row fields reject
null(generated agent tools still treat a model'snullas omitted),VATis an integer,DiscountTypeisAMOUNTorPERCENT, andDescriptionandUnitfollow Fortnox's 255 and 20 character limits.
Hosts that list these tools over MCP serve changed tool schemas once, so grants keyed on a tool snapshot digest return to their default for both invoice write tools.
Canary.124: Effect 4.1.2
Canary.124 targets effect@4.1.2. Upgrade the Yolk packages and Effect together, and move effect
and the coordinated Effect runtime packages (@effect/platform-*, @effect/sql-*,
@effect/opentelemetry, @effect/vitest) to 4.1.2 together. Three Yolk boundary failures are
now typed (below).
- Effect 4.1 has breaking changes of its own:
effect/Cryptois replaced byeffect/crypto/*services that runtimes no longer provide implicitly;HttpClientRequest.methodis astring(soHttpClientRequest.make(request.method)no longer type-checks); andKeyValueStore,FileSystem.make,ChildProcesstemplates andMcpServerregistrations change. Check the Effect 4.1.0 changelog for the APIs your code uses. - Tool JSON Schemas generated from Effect schemas are flatter: a nested
anyOfis merged into its parent, and a named definition reached from a required and an optional property is emitted once. What each schema admits is unchanged. Hosts that list tools over MCP serve changed tool schemas once, so grants keyed on a tool snapshot digest return to their default for the affected tools. @effect/platform-node4.1 requiresws^8.22.1. If another dependency keeps an olderws, the package manager can install@workflow/coretwice, and a Workflow build fails with duplicate step ids. Dedupews, for example with a pnpm overridews: ^8.22.1.- Typed boundary failures, each keeping the original failure as
causewhen one exists:textFromBlobanddocumentPartFromTextFilefail withBlobTextReadError(wasError);attachmentSourceTextfails withAttachmentTextDecodeError(was the raw decoding error); andwriteDurableAgentEventfails withDurableAgentEventWriteError(was the writer's raw rejection). Code that inspected the raw value readscause.
Canary.122: connector input numbers
Connector action inputs advertise only finite numbers (bare Schema.Number offered models
"NaN"/"Infinity", which argument decoding then rejected). Validation is stricter, for tool calls
and in-process invoke alike: an input outside the following constraints now fails validation
instead of reaching the provider.
- Gmail and Google Calendar
maxResults, LinkedIn searchnumResults: integers of at least 1. - Notion
pageSize: an integer from 1 to 100. Todoistlimit,priorityandduration: integers from 1 to 200, from 1 to 4, and of at least 1. - GitHub issue field
numberinputs and Fortnox nullable amounts: finite numbers.
Hosts that list these tools over MCP serve changed tool schemas once (these inputs, and the declared outputs of Fortnox tools whose results carry nullable amounts), so grants keyed on a tool snapshot digest return to their default for the affected tools.
Canary.116: subscription pools and quota signals
New, opt-in (ADR 0011):
@yolk-sdk/pool serves several accounts of one provider as one LLMProvider. See
Share subscription accounts.
ProviderErrorInfogains optionalquotaResetsAtMs: on arate_limitfailure for a spent account-wide subscription quota, Claude and Responses providers (ChatGPT Codex) attach the reset when they can read a trusted one. Hosts that persist provider errors in a closed schema should allow it.ProviderSubscriptionUsageWindowgains optionalmodels(model-scoped limits), and Claude and OpenCode Go usage now setwindowDurationMinutes. Claude snapshots also report model-scoped weekly windows (seven-day-<model>): hosts that show every window will show them too. The emulators'/anthropicusage route reports one, so tests that count its windows see one more.outlook.get_messagenow returnsinternetMessageHeaders: []for Sent Items and drafts, where Microsoft Graph omits the headers; it used to fail withvalidation_failed.
Canary.116: Effect 4.0.5
Canary.116 targets effect@4.0.5. Upgrade the Yolk packages and Effect together, and move effect and the coordinated Effect runtime packages (@effect/platform-*,
@effect/sql-*, @effect/opentelemetry, @effect/vitest) to 4.0.5 together. Yolk APIs are
unchanged.
- Effect 4.0.5 drops a typed failure when an interruption skipped its recovery handler. If you run
connector conformance cases with
runConformanceand interrupt a run while a case's cleanup fails, a write's outcome is unknown, or a cleanup is refused, the run now ends interrupt-only instead of with the case's error (RestoreFailed,ActionFailed, orCleanupRefused). Read cleanup problems fromConformanceCleanupReporter, which receives them either way. The repository's conformance runners now exit 130 in that case, not 1.
Canary.115: agent status
Breaking for @yolk-sdk/agent/client and @yolk-sdk/agent/react. The string AgentRunStatus
is removed; status is now an AgentStatus from @yolk-sdk/agent/protocol,
and AgentClientState/AgentChatState gain subagents.
| Before | After |
|---|---|
status === 'idle' or 'aborted' | Predicate.isTagged(status, 'Idle') |
status === 'running' | Predicate.isTagged(status, 'Working') (or chat.isRunning) |
status === 'waiting' | Predicate.isTagged(status, 'Blocked') (or chat.isWaiting) |
status === 'done' | Predicate.isTagged(status, 'Done') |
status === 'error', state.error | Failed status: status.message |
state.errorInfo | Failed status: status.error (absent for transport errors) |
state.retryInfo | agentStatusRetry(status) |
useAgentChat().error | Failed status from useAgentChat().status |
markAgentError(state, message, error?) takes an optional AgentError instead of
AgentError | null. A stopped run is Idle, as in OSC 7501; there is no separate aborted
status. AgentError gains an optional abortReason (user, system, max_turns) on aborted
errors: user (or absent) maps to Idle, the others to Failed.
New in @yolk-sdk/agent/protocol: AgentStatus and its variants, AgentActivity,
AgentBlockedKind, nextAgentStatus, agentStatusFromEvents, reconcileAgentStatus,
AgentStatusTree with nextAgentStatusTree, withSubagentStatus, startAgentStatusTree, and
settleAgentStatusTree, plus hitlRequestBlockedKind, agentBlockedKind, agentStatusRetry,
isAgentStatusLive, AgentAbortReason, and the subagent result predicates
isSubagentAcceptedToolResult and isSubagentObservationToolResult.
Canary.114: file claim check
New, opt-in (ADR 0009):
agents move files between tools by fileId. See Move files between tools.
ContentParthas a newFilemember (FilePart): exhaustiveMatches over content parts need a case; render it withfilePartText.resolveToolscaptures file bytes even without the newfilesoption: an inlineFilePartbecomes a "file not captured" label. Passfiles: { store }to store them.- MCP embedded resource blobs reach the model as a file label instead of base64 text.
- As agent tools,
gmail.get_attachment,outlook.get_attachmentandemail.get_attachmentreturn a file instead of base64 (connector.invokeis unchanged), and connector sinks such as Gmail draft attachments do not takefileIds yet: hosts that forwarded attachment base64 through the model need their own file-aware tool. - Custom
VercelSandboxHandleimplementations and fakes needreadFile, andSandboxInputErrorCausegainsinvalid_path,file_not_foundandfile_too_large: exhaustive matches on it need cases. - The code mode description gains one line about
files, which changes the cached prompt prefix once.
Canary.113: Claude thinking summaries and signed thinking replay
- Opus 5 and later think by default but return thinking blocks without text. Set
thinking: { display: 'summarized' }onmakeAnthropicClaudeProviderLayerto stream readable summaries. See Thinking. - The Claude provider now keeps each thinking block's signature (or redacted data) on
AssistantReasoningPart.replayand sends it back unchanged on later requests, with or withoutthinking. Never edit, truncate or reorder a reasoning part that hasreplay; hosts that rewrite history per request can skip parts whosereplay.providerisanthropicClaudeReasoningReplayProvider. LLMReasoningReplayis a newAgentEvent(and loopLLMEvent, tagReasoningReplay) member: exhaustive matches need a case. Live chat projections can ignore it.- Claude turns emit it on almost every thinking block, and older SDKs reject unknown event tags: deploy servers and clients together, reload open tabs, and do not roll back to an older SDK over durable logs that contain it.
- A Claude thinking block that ends without a signature now fails the turn as non-retryable
invalid_response. - Persist
AssistantReasoningPart.replaywith the message. ReacttoAgentMessagesrebuilds reasoning withoutreplay: hosts that resend chat-derived history should resend the protocol messages instead to keep the reasoning.
Canary.108: tool exposure, catalog instructions, Claude Code 2.1.299
New, opt-in (ADR 0007):
loading: 'deferred'keeps a tool out of provider requests until the packagetool_searchtool loads it. See Defer rarely used tools.- A stageable approval tool may be
callableBy: 'codemode'(stage-only); resolution used to reject this. See Stage-only tools. makeCodeModeTool({ catalog: 'instructions' })delivers the code mode catalog as a host instruction (RunConfig.instructions);catalog: 'description'stays the default. Hosts with custom compaction must keeplatestInstructionMessages(...), and durablerunModelTurnhosts appendinstructionMessages(...)themselves. See Deliver the catalog as instructions.ToolDiscoverygainspinned, andToolRegistryErrorgainsdeferred_unsupported_toolandduplicate_instruction: exhaustiveswitches over them need a new case.
The Claude subscription transport identifies as Claude Code 2.1.299 (was 2.1.112), so Anthropic
accepts newer models such as Claude Opus 5.5; no code change is required. Proxies or tests that
assert the user-agent or billing header need updating. Claude errors now report
error.details.error_code (for example claude_code_version_too_old) as providerCode when
present, so hosts that match providerCode: 'invalid_request_error' for those failures should match
the specific code.
Canary.107: provider prompt caching and Fortnox scopes
Prompt caching is always on and changes outbound provider requests; no code change is required.
Anthropic requests carry cache_control markers, Codex and Grok send prompt_cache_key plus their
session headers, Vercel AI Gateway sends providerOptions.gateway.caching: 'auto' and
x-session-affinity, and OpenCode Go sends x-opencode-session. To benefit:
- Set
cacheKey(for example the session id) onrunorrunRuntime. It travels in HTTP headers, so keep it printable ASCII. - Keep the system prompt and tool list stable within a conversation and move per-request facts
(fresh signed URLs, the current time) out of earlier messages into
LLMRequest.turnContext. - Optionally set
promptCacheTtl: '1h'onmakeAnthropicClaudeProviderLayerfor sessions that idle between turns. - Proxies or tests that assert exact request bodies or headers need updating.
See Prompt caching and ADR 0008.
New, opt-in: @yolk-sdk/connectors/fortnox grows from 14 to 91 actions behind nine new opt-in
OAuth slots that stay outside FortnoxCombinedOAuthCredentialSlot, so existing consent is
unchanged. New host-only helpers: downloadFortnoxOfferPreview, downloadFortnoxInboxFile, and
uploadFortnoxInboxFile. The Fortnox emulator serves their reads with unverified synthetic shapes.
See Read and write Fortnox records.
Canary.105: Gmail draft attachments
New, opt-in: gmail.draft_compose, gmail.draft_update, and gmail.draft_reply take an optional
attachments array of { filename, mimeType, contentBase64 }. It is available from
0.1.0-canary.105. New exports from @yolk-sdk/connectors/google: GmailDraftAttachment,
GmailDraftAttachments, GmailDraftAttachmentFilename, GmailDraftAttachmentMimeType,
GmailDraftAttachmentBase64, and the limits gmailDraftAttachmentsMaxItems (10 files),
gmailDraftAttachmentsMaxBytes (25 MiB decoded in total), and gmailDraftMessageMaxBytes (35 MiB
of decoded MIME). See Gmail draft attachments.
- A draft with attachments is written with one never-retried
multipart/relatedupload tohttps://gmail.googleapis.com/upload/gmail/v1/users/me/drafts?uploadType=multipart(an update:PUT .../drafts/{id}?uploadType=multipart). Host HTTP adapters must forward that body exactly as UTF-8 and accept outgoing bodies up to about 35 MiB. - A draft whose decoded MIME exceeds 35 MiB fails with
validation_failedandunderlying: { outcome: 'rejected', retryable: false, reason: 'too_large' }before anything is written. gmail.draft_updatereplaces the whole message: attachments not sent again are removed.- Drafts without attachments (absent or empty) are written exactly as before, through the JSON endpoint.
- The Google emulator does not emulate the draft media upload: a draft with attachments answers its unrecognised 400. See Google emulator.
Canary.104: tool change previews
New, opt-in: approval-gated tools can describe what a call would change with
makeTool({ approval, changePreview }). It is available from 0.1.0-canary.104. Pass
toolSet.approvalPreviews as approvalPreviews to your loop or runtime config and pending
ToolApprovalRequests carry preview (a ToolChangePreview) or previewError; staged plan
reviews use the same hook. See Preview the change.
Breaking changes for staged plan hosts:
staging.previewis removed. Move it to the tool'schangePreviewand return aToolChangePreview({ target, changes, ... }) instead of arbitrary JSON.ToolPlanPreviewokentries carryparamsand eitherpreview: ToolChangePreview,previewError({ cause, message }), or neither (no hook), never both; narrow withentry.status === 'ok' && entry.preview !== undefined. A failing preview no longer turns the entry intostatus: 'error', and oversized previews are truncated with markers instead of becoming error entries.maxToolPlanPreviewBytesis removed. UsedefaultToolChangePreviewMaxBytes(16 KiB) and set the bound withresolveTools(..., { changePreview: { maxBytes } }).
Type changes that may need code updates even if you don't use staged plans:
ToolRegistryErrorhas a new cause,change_preview_unsupported_policy(achangePreviewon a tool withoutapproval). Update exhaustive matches.ResolvedToolSethas a new required field,approvalPreviews: update hand-built tool sets.
Canary.103: staged tool plans
New, opt-in: code mode scripts can stage approval-gated tool calls with stage(name, args), and a
person reviews the plan once through makePlanReviewTool before Yolk applies the selected calls.
It is available from 0.1.0-canary.103 and needs makeTool({ approval, staging }) on the tools,
resolveTools(..., { interactionHost, plans: { store } }), and one plan review tool. Without them,
tool execution and code mode are unchanged. See
Stage approval-gated writes and
Review a staged plan.
Type changes that may need code updates even if you don't use staged plans:
prepareToolBatchnow returnsEffect<PreparedToolBatch, ToolError>. It fails withToolErrorunavailableonly when host storage read by an interaction call validator is unavailable; nothing runs, so fail the step and retry it.- Interaction call validators (
InteractionCallValidator) andvalidateActionmay fail withInteractionHostErrorfor a storage outage, andvalidateInteractionSubmissionthen answers the newInteractionAdmissionErrorcauseunavailable: treat it as retryable, not as invalid input. ToolRegistryErrorhas three new causes:staging_unsupported_policy,staging_validation_required, andplan_review_duplicate. Update exhaustive matches.- Raw interaction registrations' action
validate(InteractionActionHandler.validate) now also receives the interactioncall(makeInteractionToolactionvalidateis unchanged), and interaction registrations accept an optionalunknownOutcomehook. Existing handlers keep working.
If you adopt staged plans with a tool ledger, resolve the review step with the same ledger scope on
every redelivery, keep ledger entries as long as review receipts, and wire your per-call write
authorizer as makePlanReviewTool({ beforeCall }): applied calls bypass beforeNestedCall and
ToolExecutor decorators.
Canary.102: Gmail draft bodies and thread body decoding
gmail.draft_compose, gmail.draft_update, and gmail.draft_reply keep their inputs and outputs,
plus a new optional contentType: 'text' | 'html' (GmailDraftContentType, text when omitted).
The draft MIME they write changes:
- A
textbody is now 7-bitmultipart/alternative(a quoted-printable text/plain part and a derived text/html part) instead of one unencoded text/plain part, so Gmail web no longer hard-wraps it when a person sends the draft. Anhtmlbody is one quoted-printable text/html part. Write each paragraph as one line. See Gmail draft bodies. - Tests, fakes, or recorded fixtures that compare a draft's exact
message.rawneed updating. gmail.get_threadno longer applies a part'sContent-Transfer-Encodingto Gmail's already decodedbody.data: quoted-printable text holding=XX(such as?date=2026) and base64-encoded parts now read back correctly. Remove any host workaround for those bodies.
gmail.send_message is unchanged.
Canary.99: durable tool-call ledger
New, opt-in: resolveTools(modules, context, { ledger: { store } }) runs ledgered tool calls at
most once per ledger key when a step re-executes. It is available from 0.1.0-canary.99; without
ledger, tool execution is unchanged.
- Vercel Workflow tool-batch steps are at-least-once: the queue redelivers them after crashes and
sometimes while a first execution is still running, even with
noWorkflowStepRetry. Hosts that resolve tools inside a step should pass a durable store. See Tool steps run at least once and Ledger writes for re-executed steps. - Custom executor or registration wrappers must forward
idempotencyKey(likenested). - A custom
isLedgeredshould composedefaultToolLedgerPolicy, which also ledgers the built-insubagenttool. - Code mode:
ToolResult.nestedCallsis now sized fromlimits.maxNestedCalls(up to 4096) instead of a fixed 256, andNestedToolCallsgains optional per-statuscounts. Hosts with a higher limit store larger records in step output and audit storage.
Canary.98: extractors package
New package: @yolk-sdk/extractors, bounded text extraction for PDF, DOCX, XLSX, PPTX, CSV, JSON,
Markdown, and plain-text files. Existing packages have no API changes, and @yolk-sdk/knowledge
does not depend on it.
- The root export is runtime-portable (
FileExtractor, formats, limits, errors).@yolk-sdk/extractors/nodeis server-only and parses PDF and Office files in a worker thread per file; text formats are decoded in the calling thread.@yolk-sdk/extractors/knowledgeexportsFileKnowledgeExtractorLayer, which providesKnowledgeExtractorfor knowledge ingestion. - SheetJS is an optional peer needed only for XLSX. Install it from
https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz, not the npmxlsx. - In Next.js, keep the package unbundled:
serverExternalPackages: ['@yolk-sdk/extractors', 'xlsx'].
Canary.97: Effect 4.0.0
Canary.97 targets the stable effect@4.0.0 release; canary.96 and earlier use
effect@4.0.0-rc.115. Upgrade matching Yolk packages and Effect together, and keep effect and the coordinated Effect runtime packages
(@effect/platform-*, @effect/sql-*, @effect/opentelemetry, @effect/vitest) on the same
version. Tooling such as @effect/language-service is versioned independently.
- Effect 4.0.0 removes the
effect/unstable/*entrypoints. Drop theunstablesegment:effect/unstable/httpbecomeseffect/http, likewiseeffect/socket,effect/sql,effect/processand the other areas;effect/unstable/httpapibecomeseffect/http-api. ImportArbitraryfromeffect. - Check Effect-integrated dependencies for removed paths, not just your own code. For example,
drizzle-orm1.0.0-rc.5declarations still importeffect/unstable/sql/SqlError; withskipLibCheckthat type silently becomesanyandcatchTag('SqlError')stops being checked. The Next example pins a declaration-onlypnpm patchuntil drizzle ships a fix. effect/Encodingis split intoeffect/encoding/Base64,Base64Url,HexandEncodingError. For example,Encoding.encodeBase64/decodeBase64becomeBase64.encode/Base64.decode.- Host Effect code must also adopt upstream renames, such as
Schema.isBetweenLength/Schema.isBetweenPropertiesandScope.closeaccepting only aScope.Closeable. Follow Effect's release notes for semantic changes in your own code; for example,Array,Chunk,EffectandRecordpartitionnow return successes before failures. - Tool JSON Schemas: Effect 4.0.0 exports
Schema.isPatternonly when the regex flags areu, optionally withd,gory, and silently omits other patterns (includingv-mode regexes anducombined withi,mors). Yolk's connector schemas now useu, so connector tool parameters keep theirpatternhints with unchanged runtime validation; the Fortnox identifier pattern is advertised as the equivalent BMP-only class^(?!\.{1,2}$)[\u0020-\u007e\u0080-\ud7ff\ue000-\uffff]+$. AddutoSchema.isPatternin your own tool parameter schemas to keep their hints, and check thatudoes not change what your regex accepts (surrogate ranges and bounded quantifiers over astral characters can). - String
Schema.isMinLength(n)and the minimum ofSchema.isBetweenLength(n >= 2) are advertised asminLength: ceil(n / 2)code points. Tool execution still validates against the original Effect Schema (through its JSON codec).
Canary.97: tool arguments accept null for optional fields and reject unknown keys
makeTool, makeInputTool/makeInteractionTool call params, and the question tool now decode
model arguments with Schema.toCodecJson(parameters), the codec that ToolDef.parameters already
advertised. null on Schema.optional(X) now decodes as omitted instead of failing validation;
Schema.optional(Schema.NullOr(X)) still keeps null, and required fields still reject it.
resolveTools also drops null on properties advertised as optional without null
(Schema.optionalKey(X), the subagent model/reasoning_effort, raw MCP schemas) before any
registration sees the call. Advertised schemas are unchanged. Non-finite numbers stay rejected.
Unknown keys are now rejected (onExcessProperty: 'error') instead of silently stripped, matching
the additionalProperties: false that tool schemas already advertised; one error reports every
issue, naming each unknown key with the allowed ones (root Schema.Struct({}) tools included),
including a null on another union member's field. Callers or fixtures that sent extra keys to a tool now get a model-visible validation
error, and app wrappers that only existed to reject unknown keys can be removed.
If you worked around this with Schema.optional(Schema.NullOr(X)) plus null-to-undefined
mapping, Schema.optional(X) is now enough; app wrappers that re-decoded with the JSON codec can
use makeTool directly. Custom invalidParamsMessage callbacks can keep the unknown-key hint with
the new withToolArgumentsErrorHint. omitNullOptionalToolArguments is new on @yolk-sdk/agent/tools for
hosts that dispatch registrations without resolveTools.
Package-generated agent tools follow the same policy: connector tools from
makeConnectorToolModule, knowledge_lookup/knowledge_manage, and the sandbox tool reject
unknown keys instead of stripping them. For example, outlook.list_messages rejects the search-only
query, and Fortnox invoice update tools reject provider-managed fields such as Booked or Sent.
Connector execute/invoke and executeTyped are unchanged.
Canary.97: code mode JSON arguments and structured tool outputs
- Code mode (
@yolk-sdk/codemode, breaking): nested calls that end in an error result, abeforeNestedCallfailure, or themaxNestedCallslimit now reject in the script with<label>: <message>instead of the bare message. The label istools.<identifier>, ortools["<name>"]when an earlier tool already uses the identifier; cancelled and failed-unexpectedly rejections use the same label.ToolResult.nestedCallskeeps the raw message. Update scripts or checks that compare rejection messages. - The pi executor now rejects, inside the script and before the call, arguments that JSON would
silently change:
NaN/Infinity, invalidDates,undefined/function/symbol array items and holes, functions, symbols, bigints, cycles,Map/Set/RegExp/Error/class instances withouttoJSON, and arguments with more than 100000 values or 64 levels of nesting. A validDateis sent as its ISO string. See What scripts see. CodeModeCatalogToolgains a requiredcallLabel; hosts that build catalog entries by hand must set it. Custom executors receive an optionalCodeModeExecutorTool.callLabel(set bymakeCodeModeTool) and should apply the same argument rules.- Connector agent tools (
makeConnectorToolModule) return the JSON encoding of the actionoutputSchemain bothstructuredContentand the text:Chunks become arrays (instead of{"_id":"Chunk","values":[...]}),DateTimes ISO strings, class instances plain objects, and fields the output schema does not declare are dropped. A value that does not encode fails the call with anexecutionToolError. Provider failures keep their text; theirstructuredContentis the JSON-encodedProviderFailure, without a non-JSONunderlying. Update UI or persistence that read the old shapes. Modules now carry the connectordescription(override it with thedescriptionoption). knowledge_lookup/knowledge_managedeclareKnowledgeLookupOutput/KnowledgeManageOutputand thesandboxtool declaresSandboxToolOutput(with boundedstdout/stderr), returned asstructuredContent; code mode scripts now receive these objects instead of the text. Text content is unchanged for the model.- New: the experimental
@yolk-sdk/connectors/afloat/conformancesubpath and theafloatprofile of@yolk-sdk/emulators/mcp; see Afloat MCP conformance.
Canary.96: code mode, classifier models, conformance, and emulators
New packages: @yolk-sdk/codemode (Add code mode) and the
experimental, test-only @yolk-sdk/conformance and @yolk-sdk/emulators
(Test with emulators). @yolk-sdk/agent, @yolk-sdk/connectors,
and @yolk-sdk/mcp now depend on @yolk-sdk/conformance for their conformance subpaths; add it
yourself only if you import its runner or replay client.
The agent tool contract gains optional fields. Existing tools keep working unchanged:
ToolDef.outputSchema(makeTool({ output })),callableBy(defaultall), anddiscovery.nestedToolAccessanddescribeon registrations, andToolResult.nestedCallsandToolResult.usage. Neither reaches the model;toolResultMessageFromResultdrops both and the loop does not addToolResult.usageto run usage.ToolRegistryErrorgains thecodemode_unsupported_toolandinvalid_tool_exposurecauses. If you match itscauseexhaustively, add both.- If you send
ToolDefs to providers yourself (outsiderun/runModelTurn), filter them with protocolproviderToolDefsso codemode-only tools never reach providers.
@yolk-sdk/agent/classification and @yolk-sdk/agent/providers/vercel/ai-gateway-classifier add
classifier models over AI Gateway POST /v1/evaluate; see
Classifier models. Connector and MCP tool adapters accept an
exposure option for code mode.
gmail.draft_delete now succeeds on Gmail's empty 204 response instead of failing to decode it.
Canary.95: Gmail multipart send and Outlook draft attachments
gmail.send_message keeps its { raw, threadId? } input and output and still sends exactly one
request. 7-bit MIME now goes to upload/gmail/v1/users/me/messages/send?uploadType=multipart
carrying the decoded MIME, so messages up to Gmail's 35 MiB cap are accepted; MIME with any byte
>= 0x80 keeps the previous JSON raw request. Decoded MIME larger than 35 MiB now fails before
credentials or network with validation_failed and
underlying: { outcome: 'rejected', retryable: false, reason: 'too_large' }; nothing is sent.
Host HTTP adapters must preserve the multipart/related content type and the string body exactly.
Rejected/unknown HTTP classification is unchanged.
addOutlookAttachment is a new host-only helper (not an action) on @yolk-sdk/connectors/microsoft.
It requires CredentialResolver and ConnectorHttpClient: its Graph JSON POSTs
(fileAttachment under 3 MiB and createUploadSession) use your existing string HTTP adapter,
which must allow those POSTs and a success body of maxMetadataBytes plus the echoed base64 content,
and must not log, trace or persist those bodies (file content and the token-bearing uploadUrl).
Only files of 3 MiB or more need a ConnectorBinaryWriteHttpClient with the new optional
uploadSession method; hosts without that method, or without the port at all, fail those uploads
with upload_session_required before credentials or network. See
Attach a file to an Outlook draft.
Canary.94: Fortnox customer write inputs
This is a breaking change to the Fortnox customer write actions that shipped in canary.90. When
upgrading @yolk-sdk/connectors from canary.93:
FortnoxCreateCustomerInputandFortnoxUpdateCustomerInputno longer acceptCountryorPhone. SetCountryCodeinstead ofCountry, andPhone1/Phone2instead ofPhone.FortnoxCustomerandFortnoxSupplierresponses still include both fields.fortnox.create_customerandfortnox.update_customerreject unknown keys instead of dropping them, before any request is sent. Connectorexecute/invokeandexecuteTypedfail withConnectorErrorcausevalidation_failed; generated agent tools reject the call arguments with a toolvalidationerror. RemoveCountry,Phone, and any other unsupported keys from host-built inputs, and expect model tool calls that include them to fail validation.- The
inputSchemaof both actions is now a closed wrapper, not the input class. Build typed inputs withFortnoxCreateCustomerInput.make/FortnoxUpdateCustomerInput.make. Decoding those classes directly still strips unknown keys.
Invoice write inputs were unchanged in canary.94: execute and generated agent tools still dropped
unknown keys (from canary.97, generated agent tools reject them), and
executeTyped trusts an existing invoice input class instance without rechecking its keys. See
Fortnox write semantics.
Canary.91: OneDrive move/copy and email Sent copy
Upgrading @yolk-sdk/connectors adds three Microsoft tools when hosts pass the complete
MicrosoftConnector to makeConnectorToolModule: onedrive.move_item and onedrive.copy_item
(write), and onedrive.get_copy_status (read). Copy acceptance is not completion. Hosts that
allowlist actions or override access should review the new ids. Copy polling sends no credential to
the monitor URL and requires the host HTTP adapter to honor redirect: 'manual' and
credentials: 'omit'.
email.send_message now returns sentCopy even for legacy hosts: unsupported when saving was
requested but unavailable, or skipped when disabled. Saving is requested by default; set
saveToSentItems: false to skip it. A failed or unverified Sent copy after SMTP acceptance does
not mean the message was not sent; do not resend.
OpenAI-compatible Chat Completions lower tool-result images, readable text documents, and opted-in PDFs to supplementary user content after the complete tool-result block. Other document formats and audio still fail. Canonical history is unchanged.
Canary.90: Fortnox customer and invoice writes
Upgrading @yolk-sdk/connectors adds four generated write tools when hosts pass the complete
FortnoxConnector to makeConnectorToolModule: fortnox.create_customer,
fortnox.update_customer, fortnox.create_invoice, and fortnox.update_invoice. Existing Fortnox
resource scopes already grant read and write access, so this does not require new OAuth consent.
Read-only hosts should restrict enabled actions explicitly and review any host access override:
blanket access: 'read' overrides declared action metadata, including these new write declarations.
Keep authorization and approval policy host-owned. Sending, booking, cancellation, and payment remain
outside the connector. See Fortnox.
Unreleased: reviewed email connector primitives
gmail.send_messageis a new destructive action for complete host-generated base64url MIME. It supports new messages and replies whose headers andthreadIdmeet Google's threading requirements. Keep it out of model allowlists unless the host explicitly intends that exposure; a host-owned reviewed interaction is a separate opt-in. Success means submission, not delivery.- Its
GoogleGmailSendOAuthCredentialSlotuses the existinggoogle.oauthbinding and hintsgmail.send. Existinggmail.compose,gmail.modify, or full-mail grants already permit sending; the action inspects OAuth scope metadata, then re-resolves through the selected operation slot so strict host resolvers enforce an existing sufficient grant without additional consent. Bearer credentials or missing scope metadata fall back to the send slot. Combined consent and existing draft APIs are unchanged. outlook.update_draftis a new write action for edited recipients, subject, and complete body. Omitted fields remain unchanged; empty arrays clear recipients. Unlikecreate_reply_draft, its body replaces the full content and does not prepend quoted history. Update followed by send is not atomic and does not provide compare-and-swap.outlook.replyis a new destructive action that sends the complete reviewed reply in one GraphPOST .../replywith explicitto/cc/bcc, subject, and full body. Required recipient arrays (including empty ones) prevent provider recipient defaults; nocomment,from, quoted history, or draft round-trip is involved. It reuses the existing send-slot mailbox permissions. Only HTTP 202 counts as accepted, meaning submission rather than delivery, with no message ID or exactly-once claim. Prefer it over update-then-send for reviewed replies.- None of these three actions retries automatically. Gmail/Outlook unconfirmed-send metadata and Outlook's existing-draft recovery identity must be handled before another mutation. See connector sending and editing.
Action-backed interaction opt-in
makeInteractionTool introduces distinct interaction request, response, event and client-input
variants. Update exhaustive HITL consumers before advertising these tools; never downgrade
InteractionResponse to data-only input or synthesize a result from InteractionSubmitted.
makeInputTool, questions and ordinary approvals retain their existing behavior.
Opt-in hosts must authenticate and atomically accept immutable submissions, provide the scoped
InteractionHost, load receipt snapshots before durable preflight, and forward the optional
ToolExecutionOptions.interaction reference through executor decorators. Raw HITL responses or
client transcript replay are not execution authority. No live example app opts in implicitly.
See Authorize one action.
Canary.82: typed inputs and Gateway streaming
When upgrading from canary.81:
- Prefer
resolveToolsover hand-built toolsets.ResolvedToolSetnow requiresinputs; custom toolsets without typed input tools must supply an empty record (inputs: {}). Pass the resolved handlers asinputs: toolSet.inputsto loop/runtime configuration andprepareToolBatch; serializable definitions alone return unavailable instead of prompting. - Update exhaustive protocol/client/React consumers for input requests, submitted/cancelled
responses, lifecycle events,
InputResponseInput, andInputRequested/InputSubmitted/InputCancelledtool states. Extend any host-owned closed persistence/wire schemas before storing or transporting these variants. - Keep typed input pending until server acceptance. Invalid response data re-pends the same request for correction; transport failure is not an accepted result. Existing question behavior remains compatible. Input collection is not approval, and voice still supports approvals only.
- Full
runstreams now emit syntheticToolExecutionCompletedevents for rejected calls and resolved HITL, including while siblings remain pending. These do not execute tools; custom event consumers should preserve server results without completing the same call twice. - Gateway keeps JSON completions by default. Factory
streaming: trueenables SSE deltas;reasoningContent: trueindependently preserves compatible reasoning output and assistant replay (spending input tokens). Neither option is enabled automatically.
See typed input wiring and Gateway setup.
Next canary: generic-email labels, flags, moves, and required headers
New @yolk-sdk/connectors actions email.modify_labels, email.set_flag, and email.move
work through optional EmailClient host methods; missing methods fail with a typed validation
error, so existing adapters keep working. email.get_message now requires headers and
runtime-validates host output: hosts that omit headers fail with validation_failed, so update
EmailClient.getMessage adapters to return RFC 5322 headers. Outlook outlook.get_message
returns required internetMessageHeaders; list, draft, and mutation responses are unchanged.
Next canary: chat-stream failure diagnostics
OpenAI-compatible chat streaming now rejects a 2xx response with an explicit non-SSE content type
before reading its body: invalid_response carries providerCode: 'unexpected_content_type'
instead of waiting for an incomplete_stream failure. Missing content-type headers retain lenient
SSE parsing. Update host error-code handling accordingly; both failures are non-retryable.
ProviderErrorInfo also adds optional stream: ProviderStreamDiagnostics, preserved through
LLMError and AgentError. Hosts persisting provider metadata through their own closed schemas
should allow this field; it contains counters/milestones only, not transcript or raw response data.
See stream diagnostics.
Next canary: Outlook mailbox identity and reply-draft recovery
These @yolk-sdk/connectors changes target the next matching canary; they are not in canary.80.
- Explicit delegated
mailboxoperations now resolve the scope-freemicrosoft.oauthidentity slot, then the enforcing operation slot. Hosts must support both resolutions. SetOAuthCredential.accountIdto the same Graph user ID oruserPrincipalNameform passed asmailboxto retain ordinaryMail.*scopes; comparison ignores case only and does not resolve aliases. Other mailboxes still require Shared scopes. Application-mode guards are unchanged. outlook.create_reply_draftnow prepends itsbodyto Graph-generated quoted history instead of replacing it. Pass only the new reply. This is a multi-step write; post-create HTTP failures useoutlook_create_reply_draft_partialwith the HTTPstatusand noretryAfterMs. Both these failures and post-create typedConnectorErrors exposeunderlying: { draftId, retryable: false, recovery: 'read_edit_existing_draft' }when the ID is known. Update retry handlers to read/edit the existing draft, never recreate it. Lost creation responses still require mailbox reconciliation. See reply draft recovery.- Attachment listing selects base properties only: fetch the individual file attachment for
contentId/cid:mapping.lastModifiedDateTimecan now benullas well as absent or a string; update consumers that assume a present value is always a string.
Next canary: chat streaming, Anthropic tool results, union tool schemas
These @yolk-sdk/agent behavior changes target the next matching canary. See Go setup and troubleshooting.
- OpenAI Chat Completions transport stays one JSON body by default.
OpenAiProviderConfig.streaming: truerequests incrementalchat.completion.chunkSSE deltas with usage; unterminated streams failinvalid_responsewithoutDone. OpenCode Go chat always streams. Only enable streaming against endpoints that serve chat SSE. - Anthropic tool-result blocks omit
is_errorwhen the result carries no error flag, keeping follow-up request bodies valid. Explicit boolean flags are still serialized. makeToolmay add roottype: "object"to typeless object-onlyanyOf/oneOfunions for strict OpenAI-compatible upstreams. Call validation still uses the original Effect Schema.- Chat Completions and Responses HTTP failures copy the envelope string
code(falling back totype) intoprovider.providerCode; raw upstream bodies stay out of typed failures.
Next canary: selected branded identities and typed connector actions
These source changes target a future matching canary. Identity wire representations stay strings, but typed host implementations and fixtures must migrate; this is a breaking pre-1.0 minor change.
| Surface | Migration |
|---|---|
@yolk-sdk/knowledge/documents | Use KnowledgeScopeId and KnowledgeDocumentId in models, store adapters, chunking, ingestion, and search scopes. |
@yolk-sdk/harness/inbox | Forward live DrainToken and ParkGeneration values; custom Inbox/Driver adapters must return the corresponding brands. |
@yolk-sdk/sandbox | normalizeWorkspaceCwd now returns NormalizedWorkspaceCwd; raw command cwd remains a string. |
@yolk-sdk/connectors/fortnox | File discovery uses canonical FortnoxGivenNumber; preview downloads require FortnoxDocumentNumber. Archive IDs remain strings. |
Effect-decode external/persisted strings with the exported schema; .make is synchronous and is
appropriate for trusted constants or freshly minted values. Do not cast raw IDs or annotate ORM
columns to bypass decoding. For example, inside an Effect program:
import * as Schema from 'effect/Schema'
import { KnowledgeDocumentId } from '@yolk-sdk/knowledge/documents'
const documentId = yield * Schema.decodeUnknownEffect(KnowledgeDocumentId)(rawDocumentId)This is a fragment; rawDocumentId is host-owned input. Brands do not establish authorization,
ownership, existence, or freshness. Harness token schemas remain nominal-only and accept arbitrary
strings; runtime stale/foreign-token decisions remain authoritative. Do not restore old in-memory
park generations by decoding them after restart.
Fortnox file metadata now rejects nonnumeric givenNumber values through the canonical schema.
Preview identifiers use the same validator as invoice reads and complete-segment URL encoding,
rather than unrelated archive-ID restrictions.
defineAction additionally returns TypedConnectorAction with executeTyped. It accepts decoded
InputSchema.Type, validates using Schema.toType(inputSchema), and retains the output type. It
does not reapply wire transformations: a NumberFromString field is a number at this entrypoint.
Existing dynamic execute/invoke paths remain compatible and decode encoded input as before.
External output validation remains the implementation's responsibility.
Next canary: Effect rc.115
This source upgrade targets effect@4.0.0-rc.115; it is not a claim that an already-published canary uses that version. Upgrade matching Yolk packages and Effect together when the corresponding canary is available.
- Use
Schema.TaggedError,Schema.fromJsonString(Schema.Unknown)and capitalizedConfig.String/Config.Int/Config.RedactedAPIs. - Schema construction now follows schema field order, including
_tagfirst. JSON field values and optional presence are unchanged, but raw serialized bytes can differ. Do not depend on beta.80's property insertion order. Schema.SchemaErroris now a nativeError. Synchronous schema makers throw a native error with aSchemaIssue.Issuecause; Effectful makers fail with the issue. Keep typed owner errors and inspect retained causes rather than matching old diagnostic text.- Tool schemas use Effect's canonical JSON representation. Prefer finite-number schemas for JSON inputs; definition references may acquire an
Encodedsuffix. Empty-struct tools still advertise a closed empty object. Custom JSON Schema output must still pass Yolk's portable-data boundary.
Next canary: renamed public service types
Update type imports from these existing subpaths. The former names have no compatibility aliases; runtime behavior and wire formats are unchanged.
| Subpath | Before | After |
|---|---|---|
@yolk-sdk/agent/loop | LoopConfigShape | LoopConfigSettings |
@yolk-sdk/harness/store | RunStoreShape | RunStoreApi |
@yolk-sdk/harness/inbox | InboxShape | InboxApi |
@yolk-sdk/harness/driver | DriverShape | DriverApi |
Next canary: optional harness and collector recovery
@yolk-sdk/harness is a new optional run-lifecycle package (coordinator, store, inbox, drivers, outcomes). It is not the agent loop and does not add a Workflow driver. It is introduced after 0.1.0-canary.76 and unavailable in 0.1.0-canary.76 and earlier. Choose a newer matching canary once available.
Loop composition now names makeAgentLoopLayer, decorateLLMProvider, collectModelTurn, and collectModelTurnAttempt. Omitted tools use ToolExecutor.unavailable.
Kernel streams that end with zero Done events fail as LLMError invalid_response / retryable: false with responseIssue: 'missing_done'. That is not automatic provider or tool replay. Codex additionally synthesizes Done only for the specific missing-final-output error; see OpenAI Codex.
Overflow compact now refuses to run after published output (overflowCompactionMayRun). Durable persist-then-retry stays host-owned.
attemptModelTurn classifies one runModelTurn after that stream's inner retries. It does not add an outer retry loop. A finalized collector failure (collectModelTurn / collectModelTurnAttempt) is not host-chosen recovery; see Troubleshooting and Harness composition.
Next canary: owned JSON data and voice session resources
ToolDef.parameters now requires ToolJsonSchema: boolean or plain JSON-object representation.
Constructors/raw decode reject nonfinite values, cycles, exotics and accessor fields; accessors are
not executed. Dense ordinary arrays, null-prototype objects and DAG aliases are legal. Admitted
identity is retained, not frozen. Use decodeToolJsonSchema / decodeToolJsonSchemaObject for raw
inputs (Option); JSON Schema semantic/provider validation is separate. Tool arguments/results and
HITL stay opaque. Background envelopes preserve boolean argument schemas. MCP discovery requires
the object arm and retains typed validation errors and the omitted-schema default.
OpenAiProviderConfig.extraBody now takes JSON-object input (OpenAiRequestExtras). Build inert
JSON data, not getter-backed configuration. Lowering snapshots surviving enumerable own fields,
discarding canonical request keys unread. Surviving accessors/exotics/invalid JSON fail with fixed
Invalid … extraBody JSON: expected a JSON object before HTTP. The snapshot preserves JSON values,
own __proto__/constructor and DAG aliases; it does not retain input identity. Root symbols/hidden
fields are omitted; nested symbols/hidden fields and extra array properties fail. Final request
serialization remains independently checked. Proxy reflection traps are not guaranteed inert.
Connector integration/binding metadata now uses PortableMetadata. Convert Dates, Maps, custom
instances and other rich values to explicit JSON first. Decode/make return non-frozen snapshots with
null-prototype objects and dense arrays; aliases share copied nodes, cycles/accessors/exotics fail.
Absent metadata stays absent. Config, credential secrets, error underlying and host DB schemas are
unchanged; this is not a database migration.
makeVoiceController now requires VoiceTransport instead of options.transport. Wrap existing
transport values with Effect.provideService, or use VoiceSession.layer with a transport layer,
codec/tool endpoint and optional eventLog. Browser/WebSocket transport layer constructors are
exported from their existing subpaths. Configured logging runs without an external event consumer;
no eventLog means no ambient outbox capture. Keep provided layers alive through the full session
usage, or use Layer.buildWithScope for an explicit lifetime. Layer.succeed injects externally
owned values; it does not allocate/finalize resources. These are breaking 0.x changes (minor).
Next canary: makeTool SchemaError and workflow CommitError callbacks
makeTool({ invalidParamsMessage }) on @yolk-sdk/agent/tools is now
(error: Schema.SchemaError) => string (was (error: unknown) => string). Only
Schema.decodeUnknownEffect on parameters invokes it (validate and execute). The decode error
is passed through unwrapped. Default remains Invalid ${name} arguments: ${String(error)},
including the SchemaError(...) wrapper. In Effect rc.115, SchemaError extends native Error,
but the wrapper remains part of this tool-message contract; do not switch the default to .message. Existing (error: unknown) => string callbacks remain assignable. No new
export subpath; MakeToolOptions is still not barreled from @yolk-sdk/agent/tools.
commitThenWriteTerminalEvent({ writeCommitError }) on @yolk-sdk/vercel-workflows is now
(error: CommitError) => …, where CommitError is the existing generic on commit. The producer
is Effect.matchEffect onFailure of commit; typed failures—not defects or interruptions—are
passed to the callback. Result tags still carry commitError and error as unknown; those fields are not
tightened. Existing (error: unknown) => … callbacks remain assignable. No generic expansion or
export-map change.
Next canary: voice void addTrack, finite voice argument JSON, MCP protocol owners
WebRtcPeerConnectionLike.addTrack on @yolk-sdk/agent/voice/browser is now a void command (was
unused unknown). Hosts and fakes must not read a sender. Real RTCPeerConnection.addTrack
remains assignable. No export-map change.
Voice raw-argument JSON on @yolk-sdk/agent/voice: protocolToolCallFromVoice and
decideVoiceToolCall admit finite JSON. Actual null / false / 0 still admit as those values.
Raw text 1e999 uses the existing malformed fallbacks instead of publishing Infinity:
projection params are the raw string '1e999'; approval display params are
{ argumentsJson: '1e999' }. Nested overflow such as {"n":1e999} takes the same fallbacks. Do
not demonstrate with JSON.stringify(Infinity) (that is null). protocolToolCallFromVoice still
returns ToolCall. Execution schema validation, approval identifiers, and gates are unchanged.
@yolk-sdk/mcp/client and @yolk-sdk/mcp/protocol add Schema owners InitializeClientInfo,
InitializeParams, InitializedNotification, and ToolsCallParams (same protocol.ts; no new
export subpath). Prefer Schema owners for new construction. Compatibility makeJsonRpcRequest,
makeInitializeParams, and makeInitializedNotification remain and build through those schemas.
makeJsonRpcRequest still omits params when undefined; when params are present, getter access
order stays id, method, params, params.
Next canary: OpenAI JSON admission, Realtime parameters, and Gmail finite JSON
OpenAI Chat Completions and Responses lowering now requires ToolDef.parameters and tool-call
params to decode as Schema.Json. Non-JSON values fail as non-retryable LLMError
provider_error before transport. ToolDef.parameters now has the admission contract above;
ToolCall.params remains Schema.Unknown. Public
Codex wrapper OpenAiCodexTool.parameters is still unknown. Optional body fields are omitted
unless present. After lone-surrogate rewrite, request bodies are decoded as JSON again and fail
rather than skipping. Inbound HTTP JSON admits Schema.Json (invalid_response on failure).
Responses SSE JSON admits Schema.Json: non-object JSON events are ignored; malformed non-JSON
event text fails. First response.completed remains terminal. HTTP error bodies stay raw text.
The former extraBody spread/getter contract is superseded by the portable snapshot migration above. Canonical fields are discarded unread and surviving accessors are rejected without execution. Composed-body admission after lone-surrogate rewriting remains the final serialization defense.
Public Realtime OpenAiRealtimeFunctionTool.parameters and openAiRealtimeToolParameters now take
Schema.Json. Non-JSON advertisement fails VoiceToolBridgeError: sync helpers throw; Effect
helpers fail in the typed channel. Mapper defects stay defects. Union-root lowering uses a Map so
own __proto__ / constructor merge instead of prototype assignment.
Gmail get_thread / list_attachments MIME payload admits Schema.Json after JSON parse.
Best-effort optional size omission (-1, 1.5, null, "12", missing) and sibling preservation
are unchanged. Finite JSON is a deliberate whole-payload reject: raw HTTP 1e999 → Infinity →
ConnectorError validation_failed (Invalid response shape). Public action classes,
GmailUnknownOutput, and gmail.get_attachment are unchanged. Independent raw wire/key goldens were
not migrated.
Next canary: Claude JSON tool payloads and React constructor usage
Claude lowering now requires ToolDef.parameters and ToolCall.params to decode as Schema.Json.
Non-JSON values fail as non-retryable LLMError with cause: 'provider_error'. ToolDef.parameters
now has the admission contract above; ToolCall.params remains opaque. After lone-surrogate
rewrite, the Claude request body is decoded as JSON again and fails rather than skipping.
HTTP error bodies that are not JSON still classify from status.
useAgentChat now dispatches the existing AgentChatAction constructors and returns the existing
hook-result constructors (AgentChatSubmitResult, AgentChatDeleteTurnResult, and siblings).
Those values are Data.taggedEnum plain objects with _tag last, not Equal/Hash classes. Prefer
constructors and $is; omit absent optionals. Duration descriptors still use
Schema.TaggedStruct.make. No new React export paths.
MCP production client/protocol/index are unchanged in this batch. App-owned knowledge-search File
identity, Cloudflare occupancy, and example UI wiring are not @yolk-sdk/* APIs.
Next canary: canonical tagged constructors
Several public ADTs that were type-only, or that callers built as handwritten { _tag } objects,
now have constructors on existing subpaths. No new export paths.
Data.taggedEnum builds plain objects { ...fields, _tag } (_tag last). They are not
Equal/Hash Data classes. Schema.Class / Data.TaggedClass remain class instances.
Schema.TaggedStruct.make constructs validated plain values. Prefer constructors; omit absent optionals.
Existing _tag reads still work.
| Package / subpath | Before | After |
|---|---|---|
@yolk-sdk/agent/protocol | PlainHitlResponse type-only; helpers wrote _tag (often first) | Value PlainHitlResponse.QuestionResponse / .ToolApprovalResponse; helpers omit absent optionals |
@yolk-sdk/agent/runtime | export type { RuntimeRequest } only | export { runRuntime, RuntimeRequest } (value carries the type) |
@yolk-sdk/agent/react | Chat ADTs type-only | Values AgentChatPart, ChatToolState, AgentChatItem, ToolRunState, message mutators, AgentChatAction, hook results; ToolDurationKnown / ToolDurationUnknown |
@yolk-sdk/harness/outcome | StepOutcome / HitlMatch / overflow result type-only or internal | Public StepOutcome, HitlMatch, OverflowCompactionResult |
@yolk-sdk/harness/inbox | Private decision constructors | Public HitlDecision, PauseDecision, RecoveryAttempt, RecoveryAdmission, DrainBegin |
@yolk-sdk/harness/driver | export type StopDecision only | Type + export const StopDecision; recovery uses Inbox RecoveryAttempt |
@yolk-sdk/knowledge/documents | Inline { _tag: 'File' } / { _tag: 'KnowledgeScope' } objects | KnowledgeFileSource / Url / Text and KnowledgeSearchScope / KnowledgeSearchScopes .make |
@yolk-sdk/vercel-workflows | Type-only WorkflowStepResult / VercelAgentWorkflowRunResult | Matching value companions; settleWorkflowStep returns Success / Failure constructors |
JSON key order for Data.taggedEnum values puts _tag last. Do not treat that as Equal/Hash.
The knowledge value KnowledgeSearchScope is the single-id constructor; the type remains the union.
A missing source URL is not a storage object id; do not invent locators to satisfy .make.
Next canary: host-only connector file retrieval and writes
New byte helpers on existing connector subpaths are host-only. They are not connector actions and
makeConnectorToolModule does not serialize them. Provide ConnectorBinaryHttpClient and/or
ConnectorBinaryWriteHttpClient, keep streamed limits and connection-time network policy in the
host, and keep raw bytes out of generic tool JSON. Dropbox create is strict add; Dropbox update
requires a stable id: and expected revision; OneDrive update requires acknowledgeOverwrite: true
and is unconditional, not compare-and-swap; R2 puts stay ETag-conditional. Fortnox connectfile and
archive slots are opt-in and are not on FortnoxCombinedOAuthCredentialSlot. Drive content
defaults to drive.file; contentAccess: 'readonly' is host-only drive.readonly.
Passing whole FortnoxConnector or TodoistConnector into makeConnectorToolModule now also
exposes fortnox.list_supplier_invoice_files and todoist.list_comments. See
Transfer connector files.
Next canary: host-only Dropbox original-byte download
downloadDropboxFile from @yolk-sdk/connectors/dropbox is an optional host helper that reuses
the root ConnectorBinaryHttpClient port. Default Dropbox actions and makeConnectorToolModule
serialization are unchanged. DropboxCombinedOAuthCredentialSlot now also hints
files.content.read; hosts that consent with the combined slot will request that scope on the
next authorization, and hosts that want original bytes should use the new
DropboxContentReadOAuthCredentialSlot. See
Host-only Dropbox original-byte download.
Next canary: host-only OneDrive original-byte download
downloadOneDriveItem from @yolk-sdk/connectors/microsoft is an optional host helper plus the
root ConnectorBinaryHttpClient port. Default Microsoft actions and makeConnectorToolModule
serialization are unchanged. Hosts that want original bytes provide the binary port, keep
connection-time network policy, and own file materialization. See
Host-only OneDrive original-byte download.
Next canary: background tool admission and bounded child observations
Tools with background: true remain unchanged without a BackgroundToolHost. When a host is
supplied to resolveTools, activated tools require { execution, arguments } rather than raw
business parameters. Update exhaustive event/state consumers for ToolExecutionAccepted and
Accepted: admission settles the call but does not complete the work. Preserve the full call and
acceptance receipt through persistence, replay, hydration, and next-turn cleanup.
Store and return activated approval request IDs unchanged as opaque, potentially long values;
they bind the exact tool, execution mode, and arguments. Resolve voice/realtime toolsets without a
background host, even for foreground calls. Custom voice decision consumers must handle Deny;
Effect hosts can use the typed realtime config builders to recover from VoiceToolBridgeError.
See Model-chosen background execution.
Explicitly include the question definition in the loop's enabled tools to allow question HITL.
Omitting it now returns an unavailable-tool result without pausing, even with a replayed answer.
awaitWorkflowChild read/sleep callbacks now receive zero-based attempt indices; existing
zero-argument callbacks remain valid. Hosts can stop observation at their own ceiling without
claiming the child terminated. For a nonterminal subagent result, use the matching
subagent_observation marker and logical child ID to avoid a false SubagentCompleted event.
See Nonterminal child observations and
Bounded child observations.
Next canary: private attachment resolution
Use resolveMessageAttachmentSources or resolveMessagesAttachmentSources from
@yolk-sdk/agent/protocol to resolve media in a request-local transcript copy. These helpers do not
automatically sign refs or add provider media support. Keep authorization/signing inside each
provider attempt, including overflow retry, while persisted messages retain refs. See
Resolve private attachments.
Gmail discovery now omits malformed optional attachment sizes; zero remains valid. Public
GmailThreadAttachment schema decoding requires any present size to be a nonnegative integer.
Update stored-metadata decoders and fixtures that previously supplied negative or fractional sizes;
provider sizes still do not prove actual decoded byte length.
Next canary: opt-in durable subagents
Inline subagent registrations remain compatible. Hosts opting into background: true must
implement durable child launch and choose a completion policy. They may deliver findings
automatically or expose authenticated status/wait observations through host-owned tools. Return
makeSubagentAcceptedToolResult for launch acceptance; it is not final child output and adds no
child usage or SubagentCompleted. Storage, ownership, and Stop policy remain host-owned. See
Background subagents.
Custom Workflow tool-batch hosts can use prepareToolBatch inside a preflight step and
orchestrateWorkflowToolBatch / awaitWorkflowChild in orchestration. Pending HITL fences all
launches. Do not wrap an independent child loop in a parent step, and handle partial results plus
failures before returning the batch result. See
Independent child orchestration.
0.1.0-canary.72: Outlook optional read inputs
outlook.list_messages and outlook.search_messages now normalize null/blank optional strings
and null page sizes to undefined for direct calls and generated agent tools. Existing non-blank
values are unchanged; search still requires query, and application access still requires a
non-blank mailbox. See Optional Outlook read inputs
for the accepted fields and validation rules.
0.1.0-canary.57: remove Codex output-token configuration
ChatGPT subscription Codex rejects max_output_tokens. Stop passing maxOutputTokens to
makeOpenAiCodexProviderLayer and toOpenAiCodexRequestBody; the optional deprecated field remains
accepted but is ignored for compatibility. Keep host-owned input/context budgeting separate from
provider output configuration.
0.1.0-canary.55: rename task delegation to subagent
The model-facing task delegation tool is now named subagent to distinguish isolated child-agent
runs from durable application tasks. Update tool-name checks and replace the public tools helpers:
| Previous | Replacement |
|---|---|
makeTaskToolModule | makeSubagentToolModule |
makeNonRecursiveTaskToolModule | makeNonRecursiveSubagentToolModule |
makeTaskToolDef | makeSubagentToolDef |
makeTaskToolRegistration | makeSubagentToolRegistration |
makeTaskToolResult | makeSubagentToolResult |
formatTaskResult | formatSubagentResult |
taskToolName | subagentToolName |
taskSubagentRunId | subagentToolRunId |
Task* public types | corresponding Subagent* public types |
The old names are removed rather than aliased. Hosts must expose subagent, omit it from child
agent toolsets, and update UI/tool-call matching from task to subagent.
0.1.0-canary.52: Codex omits the unsupported output limit
ChatGPT subscription Codex requests no longer send max_output_tokens because the endpoint rejects
that field. In that historical canary, OpenAiCodexProviderConfig.maxOutputTokens remained required
host configuration but was not serialized. Since 0.1.0-canary.57, it is optional, deprecated,
and ignored; remove it from Codex provider construction.
0.1.0-canary.48: required provider output limits
Provider constructors no longer infer output-token limits or apply hidden fallbacks. Supply the required field for the selected adapter:
| Provider config | Required output-limit field | Previous behavior |
|---|---|---|
OpenAiProviderConfig | maxCompletionTokens | defaulted to 4096 |
OpenAiCodexProviderConfig | maxOutputTokens | historically required but omitted from requests |
AnthropicClaudeProviderConfig | maxTokens | defaulted to 8192 |
In that canary, the public toOpenAiRequestBody, toOpenAiCodexRequestBody, and
toAnthropicClaudeRequestBody lowerers also required their limit configuration. Since
0.1.0-canary.57, the Codex compatibility config is optional; OpenAI API and Anthropic lowerers still require their
host-owned output limits. The env-backed
OpenAiProviderLayer now requires integer OPENAI_MAX_COMPLETION_TOKENS alongside
OPENAI_API_KEY. Keep these values in host-owned model configuration.
0.1.0-canary.47: Claude output limits
Anthropic Claude turns that stop at max_tokens now fail as non-retryable invalid_response
instead of reporting normal completion. Stream consumers may observe partial text, but no normal
Done follows. Increase maxTokens, request shorter output, or adjust host output policy.
0.1.0-canary.46: Anthropic context overflow
Anthropic prompt-too-long responses now classify as non-retryable context_overflow. Generic loop
retry does not retry them. Hosts with compaction can use makeContextOverflowRetryProvider to
compact and retry once.
0.1.0-canary.46: normalized Gmail threads
gmail.get_thread no longer accepts only { threadId } or returns Gmail's raw thread wire payload.
Use this fragment to pass an explicit format:
import { GmailGetThreadInput } from '@yolk-sdk/connectors/google'
const input = GmailGetThreadInput.make({
threadId: hostGmailThreadId,
format: 'full'
})Allowed formats are full, metadata, and minimal; use full when decoded bodies are required.
Read normalized messages[].body, bodyMimeType, headers, and attachments instead of Gmail
payload, MIME parts, or body.data. Thread output contains attachment metadata only. When
attachmentId exists, fetch content through gmail.get_attachment with the parent message id as
messageId. Gmail inline attachments may omit attachmentId; their content is intentionally absent
from normalized thread output and cannot be fetched through that action.
Upgrade checklist
- Update all
@yolk-sdk/*dependencies together. - Run typecheck and tests in your host app.
- Search for changed subpath imports.
- Re-run one agent loop with the fake provider.
- Re-run one real provider smoke test.
- Re-run one tool call, one HITL pause/resume, and one stream reconnect path if your app uses them.
- Re-check connector credentials and OAuth scopes if connector packages changed.
- Re-check sandbox lifecycle and Workflow terminal-event ordering if platform packages changed.
What can break during canary
| Area | Watch for |
|---|---|
| Protocol | event names, message fields, terminal state, tool/HITL payloads |
| Loop/runtime | required Effect services, runtime request shapes, stream semantics |
| Client/React | projection state, transport headers, resume helpers |
| Providers | auth config, model capabilities, output limits, usage/error metadata |
| Tools | registration metadata, access levels, approval semantics |
| MCP | remote/local config, result adaptation, HTTPS policy |
| Knowledge | store contracts, search request shape, agent tool options |
| Connectors | action ids, input/output schemas, credential slots, config keys |
| Sandbox | lifecycle defaults, command result shape, provider adapter options |
| Workflows | callback contracts, terminal status, retry/default behavior |
| Harness | drain/token contracts, claim vs Inbox persistence, recovery budgets |
Safe migration pattern
Create one compatibility boundary in your app for each package area:
| Boundary | Owns |
|---|---|
| Agent runtime adapter | provider layer, loop config, enabled tools, stream format |
| Tool catalog | app-owned tools, connector tools, MCP tools, approvals |
| Persistence adapter | transcript/session event store and replay repair |
| Credential adapter | OAuth/API token resolution and refresh |
| UI adapter | event projection, retry display, HITL controls |
Then most package changes affect one adapter instead of the entire app.
Stable import habit
Use public subpaths only:
import { runRuntime } from '@yolk-sdk/agent/runtime'
import { listRemoteMcpServerTools } from '@yolk-sdk/mcp/client'
import { GoogleConnector } from '@yolk-sdk/connectors/google'Avoid root imports for feature APIs and never import from package src/* internals.
Before filing an issue
Include:
- exact package versions
- Node version
- runtime environment
- relevant public subpath imports
- minimal reproduction using
FauxProviderwhen possible - terminal
AgentErroror typed provider/tool error metadata