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
11 changes: 0 additions & 11 deletions .changeset/agui-activity-feed.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/agui-custom-event-channel.md

This file was deleted.

21 changes: 0 additions & 21 deletions .changeset/agui-interrupt-resume.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/agui-shared-state.md

This file was deleted.

10 changes: 10 additions & 0 deletions demo-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @mobile-reality/mdma-demo-native

## 0.0.4

### Patch Changes

- Updated dependencies [16fe1f2]
- Updated dependencies [16fe1f2]
- Updated dependencies [16fe1f2]
- Updated dependencies [16fe1f2]
- @mobile-reality/mdma-agui@0.3.0

## 0.0.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion demo-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mobile-reality/mdma-demo-native",
"private": true,
"version": "0.0.3",
"version": "0.0.4",
"main": "index.ts",
"scripts": {
"start": "expo start",
Expand Down
11 changes: 11 additions & 0 deletions examples/integrations/ag-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# mdma-example-agui

## 0.0.1

### Patch Changes

- Updated dependencies [16fe1f2]
- Updated dependencies [16fe1f2]
- Updated dependencies [16fe1f2]
- Updated dependencies [16fe1f2]
- @mobile-reality/mdma-agui@0.3.0
2 changes: 1 addition & 1 deletion examples/integrations/ag-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mdma-example-agui",
"private": true,
"version": "0.0.0",
"version": "0.0.1",
"type": "module",
"description": "End-to-end AG-UI integration example: OpenRouter backend + AG-UI protocol + MDMA + React frontend.",
"scripts": {
Expand Down
47 changes: 47 additions & 0 deletions packages/agui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# @mobile-reality/mdma-agui

## 0.3.0

### Minor Changes

- 16fe1f2: Surface agentic activity — tool calls, run steps, and reasoning streams — as an ordered feed via the
`onActivity` option and `bridge.activity` (also returned from `useMdmaAgentStream`). Activity is
deliberately kept **out** of the MDMA document store, so agent chatter and rendered components stay
decoupled: render it as a timeline beside the documents, or ignore it entirely. Each `MdmaActivity`
carries a stable `id` (tool-call id / step handle / reasoning message id), a `kind`
(`'tool' | 'step' | 'reasoning'`), a `label`, a `status` (`'running' | 'done'`), and streamed
`detail` — accumulating tool args, the tool result, or the reasoning text.
- 16fe1f2: Accept MDMA on a dedicated `CUSTOM` event channel alongside inline assistant text. A backend that
would rather not interleave documents into visible prose can emit
`{ type: 'CUSTOM', name: 'mdma', value }` (the name is exported as `MDMA_CUSTOM_EVENT_NAME`), where
`value` is either the markdown string or `{ messageId?, markdown }`. Both channels feed the same
parse/store/render pipeline — out-of-band text is parsed immediately rather than throttled, since it
arrives complete — and each message reports where it came from via `message.source`
(`'text' | 'custom'`). Keeping documents off the prose channel means no markup leaks into the chat,
which is what a tool-calling agent wants when the document lives in a tool argument.
- 16fe1f2: Resume parked runs through AG-UI's native `interrupt` primitive. When a run finishes with an
`interrupt` outcome the bridge exposes the pending set as `bridge.interrupts` and fires
`onInterrupt`; answering the component an interrupt refers to now resolves **that** interrupt with
`runAgent({ resume })`, so the parked run continues with its state intact instead of starting a
fresh turn.

The new `resumeMode` option selects the strategy:

- `'auto'` (default) — resolve a matching interrupt if the run is parked on one, otherwise fall back
to a fresh user turn.
- `'interrupt'` — only ever resolve a matching interrupt; if none matches, do nothing.
- `'user-turn'` — always open a fresh user turn (`addMessage` + `runAgent`).

**Behavior change:** a user decision previously always opened a fresh user turn. Under the new
`'auto'` default it will resolve a matching interrupt when the run is parked on one. Pass
`resumeMode: 'user-turn'` to keep the previous behavior. Returning `false` from `onAction`, or
supplying `resume`, still overrides resumption entirely.

- 16fe1f2: Track the agent's shared state (`STATE_SNAPSHOT` / `STATE_DELTA`, including JSON-patch deltas) as a
`componentId → values` map, exposed via the `onState` option and `bridge.state`, and use it to
hydrate MDMA stores. MDMA components are headless — a document describes intent and takes its values
from state — so this is what lets a form the agent renders come up **pre-filled** from what it
already knows.

Hydration is **reactive**: state arriving _after_ a component is already on screen is dispatched into
that live store too, so the agent can set a field the user is currently looking at without
re-rendering the component.

## 0.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/agui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobile-reality/mdma-agui",
"version": "0.2.0",
"version": "0.3.0",
"description": "Bridge that renders MDMA interactive documents streamed over the AG-UI protocol and routes user actions back into the agent run.",
"keywords": [
"mdma",
Expand Down