@artooi/ag-ui-web-component 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.12.0] — 2026-07-27
11
+
12
+ ### Added
13
+
14
+ - **Resume or fork a run — the checkpoint UI.** With `data-runs-url` pointed at
15
+ django-ag-ui's run index (`RunsView`, 0.23+), a ⭯ button appears in the header
16
+ opening a *Continue a run* panel. Type the next turn, pick a row, and the run
17
+ continues from its last server-side checkpoint — **Resume** to carry on,
18
+ **Fork** to branch without touching the original. The client half of durable
19
+ step persistence, whose server half shipped in django-ag-ui 0.20.0.
20
+ - **Only continuable runs are offered.** The server reports whether a run has
21
+ a snapshot to seed from; one that never reached a provider-valid boundary
22
+ has none, so resuming it would start from nothing. Rows show when the run
23
+ started (id on hover, for correlating with server logs) and mark a branched
24
+ run so a fork doesn't read as a duplicate of its parent.
25
+ - **One URL configures three endpoints.** `resume/<id>/` and `fork/<id>/` are
26
+ siblings of the index — the server mounts all three together — so they are
27
+ derived rather than configured, and a half-configured set isn't expressible.
28
+ - **The client contract is structural, not a rule to remember.** Those
29
+ endpoints require a *fresh run id* and *only the new turn*, because the
30
+ server supplies prior turns from the snapshot and re-sending them would
31
+ duplicate the conversation. A continuation therefore runs on its own
32
+ short-lived agent, pointed at the resume endpoint and seeded with **no**
33
+ history — so the new turn is the only thing it *can* send, the fresh run id
34
+ comes free, and the main agent's history is never touched.
35
+ - A resumed run is otherwise a normal run: frontend tools execute, approval
36
+ interrupts render, and `headers` are re-read per request so a rotated
37
+ token still reaches the endpoint. An unreachable index shows the panel's
38
+ empty state rather than an error.
39
+ - New exports: `RunIndex` / `RunRow`, `CheckpointMenu` / `CheckpointVerb`, and
40
+ five UI strings (`checkpoints`, `noCheckpoints`, `resumeRun`, `forkRun`,
41
+ `forkedRun`) for localization.
42
+
10
43
  ## [0.11.0] — 2026-07-14
11
44
 
12
45
  ### Added
@@ -495,7 +528,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
495
528
  ### Notes
496
529
  - First release — exercising the automated npm OIDC publish pipeline end-to-end.
497
530
 
498
- [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.11.0...HEAD
531
+ [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.12.0...HEAD
532
+ [0.12.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.11.0...v0.12.0
499
533
  [0.11.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.10.0...v0.11.0
500
534
  [0.10.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.9.0...v0.10.0
501
535
  [0.9.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.8.1...v0.9.0
package/README.md CHANGED
@@ -155,6 +155,7 @@ That's the whole integration: an `endpoint` attribute pointing at your AG-UI ser
155
155
  | `data-skills-url` | — | URL of a JSON skill catalog (fetched with `headers`). |
156
156
  | `data-tools-url` | — | URL of a server tool-label catalog (`[{ name, summary, description? }]`), fetched with `headers`; labels tool-call cards for server-side tools. |
157
157
  | `data-threads-url` | — | URL of a server thread index (django-ag-ui's `ThreadsView`); enables durable, cross-device chat history. |
158
+ | `data-runs-url` | — | URL of a server run index (django-ag-ui's `RunsView`); reveals the header's ⭯ *Continue a run* panel. See [Resuming a run](#resuming-a-run). |
158
159
  | `data-attachments-url` | — | URL of the file-upload endpoint (django-ag-ui's `AttachmentsView`); reveals the composer's 📎 picker + drag-and-drop. |
159
160
  | `data-attachment-accept` | — | `<input accept>` list for client-side type filtering (e.g. `image/*,.pdf`). The server stays authoritative. |
160
161
  | `data-attachment-max-bytes` | — | Client-side upload size cap in bytes (default 10 MiB; `0` disables). The server stays authoritative. |
@@ -646,6 +647,56 @@ chat.navigate = (path) => router.push(path); // SPA: in-page, no reload
646
647
 
647
648
  Route map + `navigate()` and the reload model are the same feature seen from two ends.
648
649
 
650
+ ## Resuming a run
651
+
652
+ When the server persists run checkpoints (django-ag-ui's `step_store`), a run
653
+ that stopped part-way can be **continued** rather than restarted. Point the
654
+ component at the run index and a ⭯ button appears in the header:
655
+
656
+ ```html
657
+ <ag-ui-chat endpoint="/agent/" data-runs-url="/agent/runs/"></ag-ui-chat>
658
+ ```
659
+
660
+ The panel lists runs the server marked **continuable** — those with a saved
661
+ snapshot to seed from. A run that never reached a provider-valid boundary has
662
+ none, so it isn't offered: resuming it would start from nothing. Each row shows
663
+ when the run started (the id is on hover, for correlating with server logs) and
664
+ marks a run that branched from another, so a fork doesn't read as a duplicate
665
+ of its parent.
666
+
667
+ Type the next turn in the composer, then pick a row:
668
+
669
+ - **Resume** — continue that run.
670
+ - **Fork** — branch it, leaving the original untouched.
671
+
672
+ Both send to the matching server endpoint and stream into the same transcript.
673
+
674
+ ### One URL, three endpoints
675
+
676
+ `data-runs-url` is the only thing to configure. `resume/<id>/` and `fork/<id>/`
677
+ are siblings of the index — django-ag-ui mounts all three under one prefix
678
+ whenever a step store is set — so they're derived, and there's no way to end up
679
+ with a half-configured set.
680
+
681
+ ### The client contract, handled for you
682
+
683
+ Those endpoints expect a request carrying a **fresh run id** and **only the new
684
+ turn**: the server supplies the prior turns from the snapshot, so re-sending
685
+ them would duplicate the conversation.
686
+
687
+ The component satisfies that structurally rather than by remembering a rule. A
688
+ continuation runs on its own short-lived agent, built pointing at the resume
689
+ endpoint and seeded with **no** history — so "only the new turn" is the only
690
+ thing it *can* send, and the fresh run id comes free because a new agent mints
691
+ one. Your main agent's history is never touched.
692
+
693
+ A resumed run is a normal run in every other respect: frontend tools execute,
694
+ approval interrupts render their card, and `headers` are re-read per request so
695
+ a rotated CSRF token or JWT still reaches the endpoint.
696
+
697
+ If the index can't be reached, the panel shows its empty state rather than an
698
+ error — a history affordance that fails is empty, not broken.
699
+
649
700
  ## File uploads
650
701
 
651
702
  Set **`data-attachments-url`** (django-ag-ui's `AttachmentsView`) to let the user attach files
@@ -760,6 +811,10 @@ re-export point. Internal modules import from leaf paths.
760
811
  | `ClientConversationStore` | type | The persistence seam. |
761
812
  | `ThreadMeta` | type | A thread-drawer row (`{ threadId, title, updatedAt, preview }`). |
762
813
  | `NavigationCheckpoint` | type | The pre-reload checkpoint marker. |
814
+ | `RunIndex` | class | Reads a `data-runs-url` run index and derives its resume / fork endpoints. |
815
+ | `RunRow` | type | One run index row (`{ run_id, thread_id, parent_run_id, started_at, continuable }`). |
816
+ | `CheckpointMenu` | class | The *Continue a run* panel. |
817
+ | `CheckpointVerb` | type | `"resume" | "fork"`. |
763
818
 
764
819
  ### Attachments
765
820