Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3fbde24
Add <ag-ui-connectors> and the chat's connectors panel
Artui Dec 2, 2026
77cbbf1
Fill a summary template's enumerated arguments with their choice labels
Artui Dec 2, 2026
f748419
Merge remote-tracking branch 'origin/lane/template-labels' into relea…
Artui Dec 2, 2026
b8104c5
Follow a running answer through answers/<skill>/events/ and hide a re…
Artui Dec 2, 2026
1576ce0
Name a connector's tool calls on their cards, and leave its MCP App v…
Artui Dec 2, 2026
576f264
Document connector provenance, put it in the demo, and name connector…
Artui Dec 2, 2026
2cba158
Pin a refused Regenerate off the page in Chromium, and a pre-0.95.0 m…
Artui Dec 2, 2026
f7e6d77
Add an approval form for a gated call's arguments under approveWithEdits
Artui Dec 2, 2026
c24dfdd
Merge lane/answer-shared: follow answers through answers/<skill>/even…
Artui Dec 2, 2026
74cac44
Pin the connector provenance reader's every refusal
Artui Dec 2, 2026
4481a73
Send an untouched approval field as it came, and say the actions row …
Artui Dec 2, 2026
37fa198
Say in the changelog what a host's string table owes, and where a rel…
Artui Dec 2, 2026
9526c8c
Merge lane/approval: edit an approval's arguments as fields
Artui Dec 2, 2026
bf21b11
Merge lane/provenance: name a connector on its tool-call card, withho…
Artui Dec 2, 2026
915d22c
Name a connector on its approval card and offer Always allow
Artui Dec 2, 2026
2caf3f4
Approve before the Always allow write, and fail a write that throws
Artui Dec 2, 2026
154c0b9
Seed the tools screen from the listed entry, pin the parked tool's wr…
Artui Dec 2, 2026
6f8e4cf
Keep the write queue alive after a rejection, read a 403 as policy on…
Artui Dec 2, 2026
dc0d50d
Record the connector stamped run through RunConnectors, with a read-o…
Artui Dec 2, 2026
2b1161b
Pin the tools screen's on and Always allow seeds from the listed entry
Artui Dec 2, 2026
14dcbc8
Draw selects with an inset chevron, wrap panel-view footers, and open…
Artui Dec 2, 2026
a125078
Release 0.21.0
Artui Dec 2, 2026
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
104 changes: 103 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,107 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.21.0] — 2026-12-02

### Added

- **`<ag-ui-connectors>`, and a connectors panel in the chat.** A new entry,
`./connectors` (and `./connectors/bundle`), draws django-ag-ui 0.93.0's connectors editor:
the user's remote MCP servers with their status, an add form with host presets
(`data-connector-presets`), sign-in in a popup that completes only on a message from the
connectors URL's origin and from that popup (or, when the popup closes without one, as a
provider page sending COOP forces, on the list reading the connector signed in), and each
connector's tools with Turn all on and a per-tool Ask or Always allow that the server's policy
can lock. Changed tools wait for approval; Off keeps the sign-in, Remove signs out.
`<ag-ui-chat>` gains `openConnectors()` and `closeConnectors()` and a Connectors row in the
header's More menu (a header button instead with `data-connectors-button`), and an open list
reloads on `ag_ui.connectors_changed`. Under `data-editors="external"` the row asks the page
with `ag-ui-open-editor`, `editor: "connectors"`, which a bound `<ag-ui-connectors>` answers.
Opt-in: setting `data-connectors-url` on the chat makes the More row appear, and with it the
More button, so a row that fitted without More now keeps at most four controls beside it; on
`<ag-ui-connectors>` it is the element's URL. Without the attribute nothing changes.
A connector's tool call (its `TOOL_CALL_START` carries `metadata.connector`) shows the
connector's name, its host and "your connector" on its card, live, and read back when the
store kept the call's `metadata`. An MCP App view from a connector (`serverId`
`connector-<id>`) is drawn as one line saying it is not shown, live and read back, whoever
registered `mcp-apps`. Neither needs an opt-in, but a host with its own `data-strings` table
should translate the two new keys, `connectorProvenance` (`{name}`, `{host}`) and
`connectorViewWithheld`, or those lines read in English. A chat removed or moved while its
connectors panel is open drops a sign-in wait and comes back on the conversation.
A connector call's approval card (its interrupt carries the same `metadata.connector`) shows
that line under its prompt, and, when the chat has `data-connectors-url`, an "Always allow
<tool>" box, named by the server's tool name (the run's `<prefix>__<tool>` after the first
`__`) and absent for a connector whose `editable` is `false`. Approving with it ticked
approves the call at once and, alongside, reads the connectors list and puts that entry back
whole with the tool always allowed, so a later run skips the question; a policy's refusal
(a `403` with a JSON `error`; any other `403`, such as a CSRF page, is a failure) shows the server's rule in the box's place, and any other failure a line saying it
was not saved, neither holding the approval. Unticked, or denied, nothing is written. Writes
from one batch go one after another; an open connectors list in the chat reloads once one is
saved. `requestApproval` takes `metadata` and `alwaysAllow` options; a host's own
`approvalRenderer` gets neither the line nor the box. Opt-in: the box needs
`data-connectors-url`; the line needs nothing. A host with its own `data-strings` table
should translate `approvalAlwaysAllow` and `approvalAlwaysAllowFailed` (`{tool}`), and
`connectorAlwaysForbidden`, the notice on a connector's tools screen when the server's policy
locks Always allow.
- **An approval form for a gated call's arguments.** Under `approveWithEdits`, a call whose
tool has an argument projection (the catalog's `arguments`, or a client tool's
`parameters.properties`) and no nested argument reads on the approval card as a labelled
list, with Edit and Edit as JSON. Edit opens a field per argument, labelled by its title: a
checkbox for a boolean, a number field for a number, a select over the choices' titles that
sends the choice's constant, a date field for a `format: date` day, text otherwise. A hidden
argument gets no field and is sent unchanged, an emptied text field sends an empty string
(a null one stays null), and an emptied number or date field refuses on the card, naming it,
as unparseable JSON does. Edit as JSON is the JSON field as before, and a nested call or a
tool with no projection gets it at once. `requestApproval` takes a `display` option for
the projection, and a field left alone sends its value as it came. Opt-in: only a host that
sets `approveWithEdits` sees the form, and one that already sets it sees it wherever its
server ships argument projections. For every host, the approval card's actions row now
wraps: where Deny and Approve do not fit side by side (a narrow panel, the card inside a
tool card), Approve drops under Deny instead of Deny overflowing the card; that is the only
change without `approveWithEdits`.
A host with its own `data-strings` table should translate the form's three new keys,
`approvalEditFields`, `approvalEditJson` and `approvalFieldInvalid`, or its buttons and
refusal read in English.

- **Hosts restyle the connectors view and the form fields like the rest of the panel.** New
parts `connector-action`, `connector-notice`, `connector-tag` and `connector-seg` join the
connectors view's parts, and `new-connector-button` and `connectors-button` are now listed. The
key `connectorUrlPlaceholder` holds the server URL's placeholder. `--ag-ui-select-chevron`
colours every select's chevron. The approval form's fields read `--ag-ui-input-bg` and focus in
`--ag-ui-ring`, as the editors' fields do, and the connectors spinner turns at
`--ag-ui-tool-spin-duration`. Unset, each draws as before.

### Changed

- **A summary template fills an enumerated argument with its label.** A `{status}` placeholder
whose value strictly equals a choice's `const` in the call's argument display (a client tool's
`parameters.properties`, else the catalog's `arguments`) now reads that choice's `title`, as
the readable arguments list already did: "Search orders for acme in Running late", not "in
late". A value no choice matches, a blank title and a tool with no choices fill with the raw
value as before. No opt-in: a template over an argument that declares labelled choices
changes its wording, nothing else.

- **`<ag-ui-answer>` follows a running answer through `answers/<skill>/events/`, and hides
Regenerate when the server says the reader may not.** A running answer (`status:
"running"`, or a POST's `409`) is now followed at
`answers/<skill>/events/?subject=<id>&after=0`, never `threads/<id>/events/`, so a shared
answer (django-ag-ui `AnswerSkill(shared_subject=...)`) can be followed as a per-principal
one is. Every JSON body's `can_regenerate` is read: `false` hides Regenerate, `true` or
absent shows it; a `403` on Regenerate shows the failed state. `degraded` is not drawn.
No opt-in: nothing changes in the element's attributes, properties or events. The server
floor rises to django-ag-ui 0.95.0, the release with the new route: on an older mount a
running answer shows the failed state, while a stored or new one still draws.

### Fixed

- **A select draws its chevron inside the field, its text aligned with an input's.** Every select
in the chat and the editor elements drops the browser's chevron, which sat on the border with
the text indented past an input's, for one inset from the border in the field's ink. No opt-in.

- **A full-panel view's footer wraps rather than overflowing.** At the default 380px panel, the
connectors screen's Test again and Approve changes ran past the panel's edge; a footer's buttons
now wrap onto a second line, in the connectors, skills and routines views alike.

## [0.20.0] — 2026-12-02

### Added
Expand Down Expand Up @@ -1127,7 +1228,8 @@ move page walks a host over. Each entry below says whether a host opts in.
kept offering the moon under `theme="dark"`. Only the toggle's own click redrew it before. A host
opts in to nothing.

[Unreleased]: https://github.com/Artui/agents-web-components/compare/v0.20.0...HEAD
[Unreleased]: https://github.com/Artui/agents-web-components/compare/v0.21.0...HEAD
[0.21.0]: https://github.com/Artui/agents-web-components/compare/v0.20.0...v0.21.0
[0.20.0]: https://github.com/Artui/agents-web-components/compare/v0.19.0...v0.20.0
[0.19.0]: https://github.com/Artui/agents-web-components/compare/v0.18.0...v0.19.0
[0.18.0]: https://github.com/Artui/agents-web-components/compare/v0.17.0...v0.18.0
Expand Down
12 changes: 8 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,15 @@ slugs (`pymdownx.slugs`), so links keep working across a move between pages.
(`./fill_field.ts`), never from an entry file. A new entry is a line in `LIBRARY` in
`esbuild.config.mjs`, an `exports` key in `package.json`, a re-export in `src/bundle.ts`,
and a row in `tests/entries.test.ts`. The exceptions are `src/a2ui/`, `src/mcp_apps/`,
`src/threads/`, `src/inbox/`, `src/answer/`, and the editor elements (`src/routines.ts`,
`src/skills.ts`):
`src/threads/`, `src/inbox/`, `src/answer/`, `src/connectors/`, and the editor elements
(`src/routines.ts`, `src/skills.ts`):
each its own entry (`./a2ui` and `./a2ui/bundle`, `./mcp-apps` and `./mcp-apps/bundle`,
`./threads` and `./threads/bundle`, `./inbox` and `./inbox/bundle`, `./routines` and
`./routines/bundle`, `./skills` and `./skills/bundle`, `./answer` and `./answer/bundle`),
`./routines/bundle`, `./skills` and `./skills/bundle`, `./answer` and `./answer/bundle`, `./connectors` and
`./connectors/bundle`),
deliberately absent from
`src/bundle.ts` so the main bundle carries none of them, reaching the element only through
the `chat` it is handed or bound to; `tests/entries.test.ts` enforces all seven.
the `chat` it is handed or bound to; `tests/entries.test.ts` enforces all eight.
7. **Use `.js` extensions in import specifiers** (`import { x } from "./x.js"`) even though the
source file is `x.ts` — NodeNext convention. tsc, esbuild, and Vitest all resolve `.js` →
`.ts`/`.d.ts` correctly, and the emitted `.d.ts` keeps `./x.js`, so consumers resolve
Expand All @@ -131,6 +132,9 @@ slugs (`pymdownx.slugs`), so links keep working across a move between pages.
`ui/skill_editor/`), which take narrowed strings so the editor bundles stay free of
`ui_strings.ts`. `src/answer/` is a twelfth, `<ag-ui-answer>`, its own entry the same way;
it needs no chat and reads a django-ag-ui answers mount over `fetch` alone.
`src/connectors/` is a thirteenth, `<ag-ui-connectors>`, its own entry the same way; it
extends `EditorElement`, and the chat draws its `ConnectorsView` in the panel, so the view
and its strings sit there rather than under `ui/`.

Every rule above this one governs a *file*, so a package can obey all eight and still
put everything it owns in one flat directory — which is what `src/ui/` was at 37
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ The full walkthrough, with headers, attributes and sending from your own UI, is
- **`<ag-ui-skills>`** (`./skills`): the stored-skill editor as an element of its own.
[The editors](https://artui.github.io/agents-web-components/editors/#the-skills-element). `data-editors="external"` on the chat
hands its editor buttons to these two elements.
- **`<ag-ui-connectors>`** (`./connectors`): the user's MCP connectors, with sign-in and each
tool's Ask or Always allow; the chat opens the same panel. [Connectors](https://artui.github.io/agents-web-components/connectors/).
- **`<ag-ui-answer>`** (`./answer`): a one-click answer about one subject, from a django-ag-ui
answers mount. [One-click answers](https://artui.github.io/agents-web-components/answer/).

Expand Down
21 changes: 12 additions & 9 deletions demo/answer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
// /answers/, replaying the bodies recorded from the released server in
// tests/fixtures/answers.json, so the page shows what a real mount sends.
//
// - GET /answers/answers/explain-event/?subject=<id> the stored answer, or 404
// - POST /answers/answers/explain-event/ the run's stream, word by word
// - GET /answers/threads/<id>/events/?after=0 a running answer's run log
// - GET /answers/answers/explain-event/?subject=<id> the stored answer, or 404
// - POST /answers/answers/explain-event/ the run's stream, word by word
// - GET /answers/answers/explain-event/events/?subject=<id> a running answer's run log
//
// Subject "42" has no answer until the first open writes one; "running" is an
// answer another tab is writing, which the element follows through events/.
// Subject "42" has no answer until the first open writes one; "running" is a
// shared answer another reader is writing, which the element follows through
// events/ and then shows without Regenerate, since its bodies say
// can_regenerate: false.
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
Expand All @@ -17,7 +19,7 @@ const RECORDED = JSON.parse(
readFileSync(join(HERE, "..", "tests", "fixtures", "answers.json"), "utf8"),
);
const ANSWER = "/answers/answers/explain-event/";
const EVENTS = /^\/answers\/threads\/[^/]+\/events\/$/;
const EVENTS = `${ANSWER}events/`;
const STEP_MS = 120;
const GENERATED = JSON.parse(RECORDED.getDone.body).text;
const stored = new Map();
Expand Down Expand Up @@ -69,7 +71,7 @@ export function answerRoute(req, res, path) {
send(
res,
subject === "running"
? RECORDED.getRunning
? RECORDED.sharedGetRunning
: stored.has(subject)
? withText(RECORDED.getDone, stored.get(subject))
: RECORDED.get404,
Expand All @@ -91,8 +93,9 @@ export function answerRoute(req, res, path) {
});
return true;
}
if (EVENTS.test(path) && req.method === "GET") {
void trickle(res, RECORDED.eventsReplay);
if (path === EVENTS && req.method === "GET") {
const subject = new URL(req.url, "http://demo").searchParams.get("subject");
void trickle(res, subject === "running" ? RECORDED.sharedEventsReplay : RECORDED.eventsReplay);
return true;
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions demo/answer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<main>
<p class="try">
Each Explain asks the mock answers mount at <code>/answers/</code>, which replays the
bodies recorded from django-ag-ui 0.93.0. Hover sends nothing; Bump version discards the
bodies recorded from django-ag-ui 0.95.0. Hover sends nothing; Bump version discards the
answer shown, and the next open asks again. <a href="/scenarios/answer/">Back to the demo</a>
</p>
<section class="event">
Expand All @@ -55,7 +55,7 @@ <h2>Event 42: imported</h2>
<button type="button" id="bump">Bump version</button>
</section>
<section class="event">
<h2>Event 43: being explained in another tab</h2>
<h2>Event 43: an answer already being written</h2>
<ag-ui-answer src="/answers/" skill="explain-event" subject="running" version="1">
Follow the answer
</ag-ui-answer>
Expand Down
28 changes: 26 additions & 2 deletions demo/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,24 @@ function mount(pathname, restart) {
chat.setAttribute("data-strings", JSON.stringify(DE));
$("cfg-i18n").checked = true;
}
// The connectors entry and URL are read once while connecting, so both checkboxes remount.
for (const [id, key, apply] of [
["cn-button", "demo:connectors-button", () => chat.setAttribute("data-connectors-button", "")],
["cn-coop", "demo:connectors-coop", () => chat.setAttribute("data-connectors-url", "/connectors-coop/")],
]) {
if (on("connectors") && sessionStorage.getItem(key) === "1") {
apply();
$(id).checked = true;
}
$(id).addEventListener(
"change",
(event) => {
sessionStorage.setItem(key, event.target.checked ? "1" : "0");
show(pathname);
},
{ signal },
);
}
$("cfg-i18n").addEventListener(
"change",
(event) => {
Expand Down Expand Up @@ -906,10 +924,13 @@ function mount(pathname, restart) {

// ── MCP Apps ─────────────────────────────────────────────────────────────────

// Registered on its own scenario only, so every other page shows the
// Registered on its own scenario, and on Connectors, which shows a connector's
// view left out whoever registered the type; every other page shows the
// element's built-in notice: in 0.5.0 the two draw the same thing.
if (on("mcp-apps")) {
if (on("mcp-apps", "connectors")) {
registerMcpApps(chat, { url: "/mcp-apps/" });
}
if (on("mcp-apps")) {
$("mcp-out").textContent = 'registerMcpApps(chat, { url: "/mcp-apps/" }) from /mcp-apps.bundle.js';
}

Expand Down Expand Up @@ -1026,6 +1047,9 @@ function mount(pathname, restart) {
chat.getHeaders = () => ($("skills-csrf").checked ? { "X-CSRFToken": "demo-token" } : {});
$("skills-open").addEventListener("click", () => chat.openSkillEditor(), { signal });
}
if (on("connectors")) {
$("cn-open").addEventListener("click", () => chat.openConnectors(), { signal });
}
if (on("requests")) {
chat.headers = { "X-Demo-Static": "from chat.headers" };
let staleNext = false;
Expand Down
45 changes: 45 additions & 0 deletions demo/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,51 @@ <h2>What to look at</h2>
</div>
</section>

<section data-scenario="connectors" hidden>
<div class="panel">
<h2>Connectors</h2>
<div class="controls">
<div class="ctl wide">
<span>Open it</span>
<button type="button" id="cn-open">chat.openConnectors()</button>
</div>
<label class="ctl check" title="data-connectors-button, read at connect: the chat remounts"
><span>A header button instead of the More row</span> <input type="checkbox" id="cn-button"
/></label>
<label class="ctl check" title="The consent page sends Cross-Origin-Opener-Policy: same-origin"
><span>The provider page sends COOP</span> <input type="checkbox" id="cn-coop"
/></label>
</div>
</div>
<div class="notes">
<h2>What to look at</h2>
<ul>
<li>
<strong>The entry.</strong> More holds a Connectors row, last; narrow the panel to 240px
and it stays there. With the header button ticked, the button sits in the row and moves
into More like the other optional controls.
</li>
<li>
<strong>Adding and signing in.</strong> Add a connector from the Linear preset; the
popup shows a stand-in consent page. Allow lands on the tools screen with every tool
off; Deny keeps the panel waiting with a retry line. <em>Wiki (token)</em> asks for a
token instead of a popup. A URL on <code>http://</code> or a private address is refused
on the URL field.
</li>
<li>
<strong>The tools.</strong> Turn all on, then set Always allow on a tool; delete_issue
and merge_pull_request are locked at <em>Asks every time</em>. GitHub reads
<em>Tools changed</em>: one tool changed and one was removed since they were approved.
</li>
<li>
<strong>A provider page that sends COOP.</strong> Tick it and connect: the popup is cut
off, so its callback cannot post. Allow, close the popup if it stays open, and come back: the panel
reads the list again and lands on the tools screen.
</li>
</ul>
</div>
</section>

<section data-scenario="subagents" hidden>
<div class="notes">
<h2>What to look at</h2>
Expand Down
Loading