Skip to content

Agent-operable controls: change details, agent bridge, marks, validator, benchmark, docs - #611

Merged
lorant-one merged 16 commits into
previewfrom
feat/agent-docs
Nov 28, 2026
Merged

lorant-one merged 16 commits into
previewfrom
feat/agent-docs

Conversation

@lorant-one

@lorant-one lorant-one commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

This PR carries the whole agent-operable stack into preview in one merge. Each piece was reviewed in its own PR:

Lorant gave the go to ship it with the next core release.

Latest preview is merged in. Conflicts were resolved in the CHANGELOG, the docs mdx imports, ColorInput (the new picker paths report change details too) and bundle sizes. Locally, after the merge:

  • core tests pass (4989).
  • The lint gate is at 109, below the baseline of 112.
  • The docs tsc and next build pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w

Every onXChange on the shared value contract, and the controls that keep
their own state (Input, Textarea, NumberInput, OTPInput, ColorInput, Tabs,
DatePicker, RangeSlider), now pass ChangeDetails after the value: source
(pointer, keyboard, agent, programmatic), the DOM event when there is one,
and cancel(), which keeps an uncontrolled component as it was.
withChangeSource("agent", fn) marks an assistant's changes. SegmentedControl
keeps its event second and passes details third.

First step toward an agent bridge in core (snapshot, act, query).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
useControllableState now reads changeDetails, so it moves to core's
internal/ and fx copies both, held to core's by the parity test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
createAgent() gives snapshot, act and query over every mounted control and
page section. Steps run through each control's own change path inside
withChangeSource("agent"), so onXChange callbacks hear the source and can
cancel; a canceled or ignored set is reported as declined. An allow callback
decides each step. agentTools describes the tools as JSON Schema and
registerTools() offers them over WebMCP with a required allow.

Input, Textarea, Select, Checkbox, Switch, RadioGroup, Slider,
SegmentedControl, Tabs, Button and ThemeProvider register themselves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
hidden keeps a control or region out of the bridge; secret redacts its
values, choices and changes while still letting an agent write it; confirm
puts the mark's text on the entry and on the allow request, and refuses the
step when the app gave no allow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
…bundle

once-ui-validate-ai-code reports controls with no accessible name, which a
screen reader announces by role alone and an agent cannot find. The gold
examples and blocks name every control; the settings bundle asks for
agent-operable settings, and a test changes every setting of its example
through @once-ui-system/core/agent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
Runs a model on the settings gold example through core's agent bridge or
through Playwright-MCP-style browser tools, checks the page afterwards, and
records pass, tool calls, turns, tokens, cost and seconds per run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
Bridge and browser both pass the settings task; the bridge uses a third
fewer calls and a quarter of the tokens. On the danger task the
data-agent-confirm mark stopped the delete 3 of 3 times, while the browser
arm pressed Delete workspace 3 of 3 times without asking.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
A page for @once-ui-system/core/agent: createAgent, change details, the
data-agent marks, connecting a model through agentTools or WebMCP, and the
a11y.name validator rule, with a live settings demo that runs scripted
steps through the bridge and shows each change's source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
The sidebar showed each page's title, so SEO titles such as "Design
system for AI coding agents" were cut off. It now shows navLabel, which
every page already sets; component pages keep their code names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
Conflicts: CHANGELOG (both entries kept), docs mdx imports, ColorInput
(the new picker paths report change details too), bundle sizes
re-recorded. Formatted four files preview left unformatted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w
@lorant-one lorant-one changed the title docs: Let an agent use your app Agent-operable controls: change details, agent bridge, marks, validator, benchmark, docs Nov 28, 2026
@lorant-one
lorant-one changed the base branch from feat/agent-operate-bench to preview November 28, 2026 21:55
Organizing its imports merged the Scrubber exports into one line, which
package-exports.test.ts reads as text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtyAjxtXFsms7HWCd1w

Copy link
Copy Markdown
Member Author

The visual check flagged two tiles on /blocks/features (tile08 and tile09 at 1280). They are Features6 and Features5, and both are built from large photos with Background, Mask and Media. This PR changes none of those components. Neither block contains a control the stack touches apart from one Button, whose rendering is unchanged.

I tried to reproduce it locally, but my base build there differs in unrelated ways, so it settles nothing. I've re-run the visual workflow once. If the same two tiles fail again, I'll compare the diff images before going further.


Generated by Claude Code

@lorant-one
lorant-one merged commit b873adc into preview Nov 28, 2026
9 checks passed
@lorant-one
lorant-one deleted the feat/agent-docs branch November 29, 2026 13:44
@lorant-one lorant-one added the approved label Nov 29, 2026 — with Claude
@lorant-one lorant-one mentioned this pull request Nov 29, 2026
12 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants