Changelog
On this page
Version 0.22.0 Latest
Every @aparte/* package ships at this version (they are released in lockstep).
Minor Changes
-
5aa792c: A TanStack AI route now needs
relaxedRunFraming: true:createAgUiRunner({ endpoint: '/api/chat', relaxedRunFraming: true }). Without it the runner rejects TanStack AI’s streams, as AG-UI 1.0 asks a client to.The runner now follows AG-UI 1.0 and passes the protocol’s own conformance corpus — the 68 streams of
spec/1.0/conformance, vendored with their MIT license and replayed through it on every build. What changes:- It declares
protocolVersion: "1.0"on every request, and warns when an agent declares a newer version or one it cannot read. - It rejects the streams 1.0 tells a client to reject — a run not opened by
RUN_STARTED, an event afterRUN_FINISHED(or afterRUN_ERROR, but a new run), content for a message never opened, a message, tool call, step or sub-agent still open when the run finishes, a chunk stream that loses or changes its identity, a step or a sub-agent finished before it started, a known field missing or of the wrong type. What is open is tracked per owner — the agent, or each sub-agent — as 1.0 requires. The reply ends with an error naming the rule, below what was drawn. TanStack AI, 1.0 included, closes each model step with aRUN_FINISHEDand answers a resume before itsRUN_STARTED:relaxedRunFramingreads that framing and holds every other rule — what was opened must still be closed, by the end of the stream. - It drops what 1.0 does not describe — an unknown event type, an undescribed property, an unknown role or outcome — and reports it to the new
onWarningoption (console.warnby default). - It keeps the agent’s state.
STATE_SNAPSHOTandSTATE_DELTA(a JSON Patch, applied whole or not at all) are kept for the thread and sent back as the next run’sstate; every request used to sendstate: {}. - A
RUN_ERRORno longer cuts the stream: it is read to the end, as 1.0 asks, and the error lands below what was drawn. When the agent runs again in the same stream, the new run decides how the reply ends and the failure goes toonWarning. The error carriesdata: { agUi: 'run-error' }; a rejected stream carriesdata: { agUi: 'malformed' }. - Images go to the agent as AG-UI 1.0 content parts: a base64 data URL as a
datasource, anything else as aurlsource. They used to be left out. - An interrupt the page cannot answer —
input_required, or one naming notoolCallId— ends the reply without an error and is answeredcancelledwhen the thread resumes or runs again. It used to fail the reply. - A tool result in content parts keeps the parts as the row’s structured result; the model reads their text.
- Older agents: the new
peerProtocolVersionoption names an agent older than 1.0. Its stream is read by that version’s rules (the retiredTHINKING_*events are translated in any case; sub-agent events are dropped for 0.0.57 and older, images flattened to text for 0.0.39 and older), and the request leaves outprotocolVersion.@aparte/runner-ag-ui
- It declares
Patch Changes
- @aparte/engine@0.22.0
@aparte/core
Version-only bumps (no changes of their own): @aparte/engine, @aparte/provider-ai-sdk, @aparte/provider-openai-compat, @aparte/provider-scenario, @aparte/provider-transformers, @aparte/plugin-approval, @aparte/plugin-artifacts, @aparte/plugin-ask-user, @aparte/plugin-compaction, @aparte/plugin-marked, @aparte/plugin-model-selector, @aparte/plugin-shiki, @aparte/plugin-streaming-markdown, @aparte/plugin-titler, @aparte/angular, @aparte/react, @aparte/svelte, @aparte/vue, @aparte/locale-fr, @aparte/docs-mcp.