Releases: substructureai/substructure
Releases · substructureai/substructure
Release list
v0.1.20
Added
- Message-tree conversation history. History now lives in a tree the engine
owns and sends on each worker decision, not in worker state. The worker returns
the transcript as it should look and the engine reconciles it, forking a branch
where it diverges. This enables edits, regenerations, plan/execute, and prompt
compaction. - The worker decision includes a count of effects still running, so a worker knows
when a step is done without scanning the list. - A language-neutral protocol reference (
docs/07-protocol.md), so workers can be
written in any language. - New
assistant-ui-cloudflare-starterexample: an assistant-ui chat on a
Cloudflare Worker, streaming from AG-UI.
Changed
- Breaking (SDK): the agent API is rebuilt. An agent is now a single decision
function (the built-in tool/sub-agent loop, or your own returning plain action
objects), replacing the middleware/builder API. Models are configured inline for
the server to run, or supplied as an adapter your worker runs. - Breaking (wire): one unified effect protocol. Tool, model, and sub-agent
calls share a single request/settle vocabulary instead of a message type per
kind, and sub-agent results are reported as themselves, not as tool results. The
settle endpoint and its SDK/runtime methods were renamed to match. - Breaking (wire/SDK): parallel model calls. A worker can issue several model
calls from one decision that settle independently; the one-at-a-time restriction
is gone. The engine still paces server-run calls; run them on the worker for real
overlap. - Breaking (SDK): tools. A tool's execute receives the decision it runs under,
not a separate context; async tools are flagged with an option, not a sentinel;
tool state lives in your own store; and client tools may omit execute. - Breaking (SDK): streaming. A worker-run model streams tokens through one
delta shape; the intermediate stream-part type and its wrapper are gone. - Breaking (wire): the decision request's end-user field is renamed from
ownertoidentity, matching the SDK and docs. - Workers no longer send a span with submissions; the engine owns tracing.
- Model-call actions default their retry and streaming options, and must state who
runs the call. - The AG-UI
/runendpoint forwards the client's full transcript, which the engine
reconciles into the tree.
Removed
- Breaking (SDK): the middleware system and the
Substructure.agentfactory;
the AI and OpenAI adapter classes become function equivalents. - The
substructure newcommand and thetemplates/directory (starters moved
intoexamples/). - The
examples/pnpm workspace; each example is now a standalone npm project.
v0.1.19
Added
substructure new [template] [dir]scaffolds a project by copying a starter
template from the monorepo. With no template it shows a picker (or lists
templates when non-interactive).
v0.1.18
Removed
- The CLI no longer prints zero-balance warnings when targeting an app. App
balances are still shown byapps listandapps show.
Changed
- Interrupts and cancels now fully fence the session: pending work is voided,
late results and client actions can't wake a paused session, and decision
requests raised mid-pause queue until resume.
v0.1.17
Added
openaiAgentfactory in the OpenAI adapter: converts an@openai/agents
Agent(orOpenAIAgentSettings) without a secondnew, e.g.
openaiAgent(new Agent({ ... })).- Interrupts record the issuing caller's origin; resuming requires equal or
higher privilege. - Clients can interrupt and resume their own sessions via the client API.
- New
interruptworker action lets an agent pause awaiting external input. - AG-UI interrupt-aware run lifecycle: interrupt outcomes and
resume[].
v0.1.16
Added
- Native AG-UI protocol support: endpoints that stream an agent turn as AG-UI SSE
events, with live token and reasoning streaming. - Reasoning controls on
LlmRequest(reasoning:effortormax_tokens,
plusexcludeandenabled), passed through to providers that support them. llmToolLooptakes agenerator: a worker-side provider generator that runs
the LLM call on your worker, orserverGenerateto let the Substructure
server's configured provider make the call.- Anthropic adapter (
@substructure.ai/sdk/adapters/anthropic): call the
Anthropic Messages API from a worker via theanthropicGenerategenerator. - AI SDK adapter (
@substructure.ai/sdk/adapters/ai): run an existing Vercel AI
SDK agent on Substructure viaToolLoopAgent, or drive the loop directly with
theaiGenerategenerator. - OpenAI adapter (
@substructure.ai/sdk/adapters/openai): run an@openai/agents
Agenton Substructure viaOpenAIAgent, or drive the loop directly with the
openaiGenerategenerator. - The server and embedded runtime can start without an LLM provider configured.
$SUBS_API_TOKENsets the CLI's bearer token without a login — for targeting a
self-hosted server with auth enabled (aserve --devserver needs no token).substructure loginnow stores tokens per server URL, so you can stay logged
in to several servers at once (e.g. cloud and a staging deploy); each command
sends only the token for the server it targets.
Changed
- Breaking (CLI): subcommands are now top-level —
substructure cloud <cmd>
becomessubstructure <cmd>(e.g.substructure sessions list), and
substructure local startbecomessubstructure serve. - Breaking (CLI): the credentials file is now keyed by server URL with no
migration of the old single top-leveltoken; existing logins must re-run
substructure login. - Breaking: session events identify a session's end user as
owner(was
identity); consumers reading raw events should readowner. No alias for the
old key. - Breaking:
Caller::Systemis nowSystem { tenant_id }(was a unit
variant); crate consumers constructing or matching it must supply a tenant. - Breaking: the
llmLoopmiddleware (andagent.llmLoop) is renamed
llmToolLoopto make the llm-and-tool loop it drives explicit. - Breaking (worker protocol): a turn's tool and sub-agent results are
delivered as a single batchedeffects.completetrigger, replacing the
per-effecttool.result,sub_agent.turn.complete, andsub_agent.error
triggers;spawn.sub_agentnow carriestool_call_id. Handled transparently by
SDK workers.
Fixed
- OpenRouter responses no longer drop image outputs from the stream.
- The next LLM call in a turn waits for all of the turn's effects to finish, so
turns with multiple sub-agents or a mix of tools and sub-agents no longer call
the model with partial results. Sub-agents run concurrently.
v0.1.15
Added
- Changelog with automated release notes.
Changed
- Agent state is serialized as JSON automatically; chains no longer need an
explicit.use(agent.jsonState()). Existing chains that still include it
keep working, and the wire format is unchanged.
Fixed
- Tool-result messages (
message.newwithrole: "tool") now carry the tool
nameinstead ofnull, so consumers reading only the message stream (e.g.
reconstructing a transcript from session events) no longer have to correlate
tool_call_idback to the originating tool call to recover the name.