Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/agent-document-contracts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@agent-bundle/runtime": minor
---

Add the versioned immutable Agent Document, bounded sequence-numbered render
events, the protocol-oriented `Agent.*` vocabulary, and discriminated render
invocation props while retaining the existing synchronous MCP and hook lowerers.
18 changes: 13 additions & 5 deletions packages/rsc-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ const result = lowerMcpResult(
);
```

The package exports `Hook`, `Mcp`, `lowerHookResult`, `lowerMcpResult`,
`createRscRequestContext`, `agent`, `runAgentRequest`, `available`,
`unavailable`, and `AgentRequestError`. It does not own an
RSC renderer, application state, transport, persistence, or host packaging.
React 19 is a peer dependency and Node 22.19 or newer is required.
The package also exports the protocol-oriented `Agent.*` vocabulary and the
versioned `AgentDocument`/`AgentRenderEvent` contracts. `createAgentDocument`
detaches and freezes a v1 document, enforcing finite depth, node-count, and
byte limits. `createAgentRenderEventSequence` assigns monotonic sequence
numbers to `shell | progress | replace | error | complete`, applies event
bounds, and rejects post-completion writes with a typed `handoff-required`
error. These contracts land beside the existing `Hook`/`Mcp` lowerers; those
synchronous compatibility APIs remain operative.

The package exports `Hook`, `Mcp`, `Agent`, both lowerers, the request-store
APIs, and the Agent Document contracts. It does not yet own application state,
transport, persistence, or host packaging. React 19 is a peer dependency and
Node 22.19 or newer is required.

Async server utilities and Server Components read the framework request store
with `const context = await agent()`. The store is a versioned realm singleton
Expand Down
2 changes: 1 addition & 1 deletion packages/rsc-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@agent-bundle/runtime",
"version": "0.0.0",
"description": "React-element result primitives (an MCP result DSL) for Agent Bundle hook and MCP protocol results.",
"description": "Versioned Agent Document contracts and React protocol primitives for Agent Bundle runtimes.",
"license": "MIT",
"keywords": [
"agent-bundle",
Expand Down
Loading
Loading