@unofficialbox/box-open-elements 0.21.0 → 0.23.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.
Files changed (115) hide show
  1. package/README.md +13 -12
  2. package/dist/components/actions/menu-item.js +1 -1
  3. package/dist/components/actions/menu.js +1 -1
  4. package/dist/components/collections/carousel.js +1 -1
  5. package/dist/components/collections/draggable-list.js +1 -1
  6. package/dist/components/collections/grid-view.js +1 -1
  7. package/dist/components/collections/pagination.js +1 -1
  8. package/dist/components/collections/result-blocks.d.ts +13 -1
  9. package/dist/components/collections/result-blocks.js +22 -10
  10. package/dist/components/collections/tree-grid.js +1 -1
  11. package/dist/components/feedback/alert.js +1 -1
  12. package/dist/components/feedback/chip.js +1 -1
  13. package/dist/components/feedback/empty-state.js +1 -1
  14. package/dist/components/feedback/nudge.js +1 -1
  15. package/dist/components/feedback/status-icon.d.ts +2 -0
  16. package/dist/components/feedback/status-icon.js +6 -5
  17. package/dist/components/feedback/toast.js +1 -1
  18. package/dist/components/files/drop-zone.js +1 -1
  19. package/dist/components/forms/category-selector.js +1 -1
  20. package/dist/components/forms/checkbox-group.js +1 -1
  21. package/dist/components/forms/checkbox.js +1 -1
  22. package/dist/components/forms/combobox.js +1 -1
  23. package/dist/components/forms/date-field.js +1 -1
  24. package/dist/components/forms/dropdown.js +1 -1
  25. package/dist/components/forms/multi-select.js +1 -1
  26. package/dist/components/forms/number-input.js +1 -1
  27. package/dist/components/forms/radio-group.js +1 -1
  28. package/dist/components/forms/range-slider.js +1 -1
  29. package/dist/components/forms/slider.js +1 -1
  30. package/dist/components/forms/tile-group.js +1 -1
  31. package/dist/components/layout/sidebar-toggle-button.js +1 -1
  32. package/dist/components/navigation/accordion.js +1 -1
  33. package/dist/components/navigation/tabs.js +1 -1
  34. package/dist/components/output/code-block.js +1 -1
  35. package/dist/components/overlays/dialog.js +1 -1
  36. package/dist/components/overlays/drawer.js +1 -1
  37. package/dist/components/overlays/guide-tooltip.js +1 -1
  38. package/dist/components/overlays/popover.js +1 -1
  39. package/dist/components/overlays/tooltip.js +1 -1
  40. package/dist/foundations/motion/scroll-pin.d.ts +10 -2
  41. package/dist/foundations/motion/scroll-pin.js +43 -7
  42. package/dist/foundations/motion/tokens.d.ts +1 -0
  43. package/dist/foundations/motion/tokens.js +1 -0
  44. package/dist/foundations/profiles/built-ins.js +8 -0
  45. package/dist/foundations/profiles/registry.d.ts +1 -0
  46. package/dist/foundations/profiles/registry.js +1 -0
  47. package/dist/foundations/profiles/types.d.ts +1 -0
  48. package/dist/foundations/status/index.d.ts +4 -2
  49. package/dist/foundations/status/index.js +10 -6
  50. package/dist/foundations/theming/controller.js +3 -1
  51. package/dist/foundations/tokens/box-defaults.d.ts +2 -0
  52. package/dist/foundations/tokens/box-defaults.js +32 -5
  53. package/dist/foundations/tokens/index.d.ts +1 -1
  54. package/dist/foundations/tokens/index.js +1 -1
  55. package/dist/index.d.ts +1 -1
  56. package/dist/index.js +1 -1
  57. package/dist/patterns/agent-chat/agent-chat.js +9 -10
  58. package/dist/patterns/agent-chat/controller.js +8 -4
  59. package/dist/patterns/agent-chat/ndjson.d.ts +1 -0
  60. package/dist/patterns/agent-chat/ndjson.js +20 -4
  61. package/dist/patterns/agent-chat/types.d.ts +7 -0
  62. package/dist/patterns/agent-workspace/agent-workspace.d.ts +13 -1
  63. package/dist/patterns/agent-workspace/agent-workspace.js +47 -15
  64. package/dist/patterns/agent-workspace/controller.d.ts +7 -1
  65. package/dist/patterns/agent-workspace/controller.js +41 -3
  66. package/dist/patterns/call-console/call-console.d.ts +10 -0
  67. package/dist/patterns/call-console/call-console.js +23 -8
  68. package/dist/patterns/call-console/controller.d.ts +2 -1
  69. package/dist/patterns/call-console/controller.js +5 -3
  70. package/dist/patterns/call-console/http-transport.js +13 -2
  71. package/dist/patterns/call-console/types.d.ts +1 -1
  72. package/dist/patterns/call-console/types.js +2 -2
  73. package/dist/patterns/comments/comment-thread.js +1 -1
  74. package/dist/patterns/content-explorer/adapters/action-menu.js +1 -1
  75. package/dist/patterns/content-explorer/adapters/list.js +1 -1
  76. package/dist/patterns/content-explorer/adapters/table.js +1 -1
  77. package/dist/patterns/content-explorer/adapters/toolbar.js +1 -1
  78. package/dist/patterns/content-uploader/content-uploader.js +1 -1
  79. package/dist/patterns/file-request/file-request-builder.js +1 -1
  80. package/dist/patterns/flow-builder/flow-builder.d.ts +45 -14
  81. package/dist/patterns/flow-builder/flow-builder.js +54 -11
  82. package/dist/patterns/flow-builder/model.d.ts +57 -9
  83. package/dist/patterns/flow-builder/model.js +20 -8
  84. package/dist/patterns/flow-builder/primitives.d.ts +17 -7
  85. package/dist/patterns/flow-builder/primitives.js +80 -16
  86. package/dist/patterns/governance/governance-panel.js +1 -1
  87. package/dist/patterns/insights/chart-panel.js +1 -1
  88. package/dist/patterns/insights/metric-card.js +1 -1
  89. package/dist/patterns/item/bulk-action-bar.js +1 -1
  90. package/dist/patterns/item/item-details-panel.js +1 -1
  91. package/dist/patterns/item/item-form.js +1 -1
  92. package/dist/patterns/item/preview-header.js +1 -1
  93. package/dist/patterns/metadata/metadata-filter-builder.js +1 -1
  94. package/dist/patterns/metadata/metadata-inspector.js +1 -1
  95. package/dist/patterns/preview/annotation-inspector.js +1 -1
  96. package/dist/patterns/preview/annotation-toolbar.js +1 -1
  97. package/dist/patterns/run/progress.d.ts +1 -1
  98. package/dist/patterns/run/progress.js +1 -1
  99. package/dist/patterns/run/run-summary.js +18 -4
  100. package/dist/patterns/run/run-trace.js +19 -5
  101. package/dist/patterns/search/filter-bar.js +1 -1
  102. package/dist/patterns/search/saved-view-picker.js +1 -1
  103. package/dist/patterns/search/search-results-header.js +1 -1
  104. package/dist/patterns/share/invite-collaborators-modal.js +1 -1
  105. package/dist/patterns/share/permission-matrix.js +1 -1
  106. package/dist/patterns/share/share-panel.js +1 -1
  107. package/dist/patterns/share/unified-share-modal.js +1 -1
  108. package/dist/patterns/task/review-queue-item.js +1 -1
  109. package/dist/patterns/task/task-assignment-panel.js +1 -1
  110. package/dist/patterns/undo/index.js +5 -3
  111. package/docs/api-guidelines.md +284 -0
  112. package/docs/foundations/motion.md +83 -0
  113. package/docs/patterns/agent-ui-guidelines.md +57 -0
  114. package/docs/patterns/agent-ui.md +197 -0
  115. package/package.json +6 -2
@@ -0,0 +1,83 @@
1
+ # Motion
2
+
3
+ Motion guidance is backed by a small shared vocabulary in `@unofficialbox/box-open-elements/foundations/motion`. Prefer that module over hard-coded `120ms` / `ease` literals in new or touched shadow styles.
4
+
5
+ Duration and easing constants resolve through `--boe-profile-*` properties,
6
+ allowing a [design profile](./design-profiles.md) to change the catalog's motion
7
+ character while preserving reduced-motion behavior.
8
+
9
+ ## Vocabulary
10
+
11
+ Agent surfaces use `arrival` (200ms), `panel` (320ms), `stagger` (50ms), and `fast` (120ms).
12
+ Existing duration keys remain compatible. `boeEntranceKeyframes` supplies
13
+ `rise`, `pop`, `fade-in`, status spin and check-stroke animations.
14
+ `boeEntrance(name)` uses the enter easing; `boeStaggerStyles` uses `--i` times
15
+ `--boe-profile-motion-stagger` (50ms).
16
+
17
+ `boeDisclosureStyles(selector)` animates grid rows from 0fr to 1fr. Toggle
18
+ `data-open` and set `inert` while closed. The direct child has no vertical
19
+ padding; place spacing one level deeper so the panel fully collapses.
20
+
21
+ Include `boeReducedMotionPolicy` in both document and shadow styles. Under
22
+ reduced motion it sets animation/transition durations to 1ms, iterations to
23
+ one, and delays to zero. Continuous indicators hold at their settled frame.
24
+ Keep `boeReducedMotionStyles` for additional component-specific overrides.
25
+ Motion is eased out and never bouncy; it communicates arrival or state change.
26
+
27
+ ```ts
28
+ import {
29
+ boeMotionDuration,
30
+ boeMotionEasing,
31
+ boeReducedMotionStyles,
32
+ boeTransition,
33
+ } from "@unofficialbox/box-open-elements/foundations/motion";
34
+ ```
35
+
36
+ | Export | Role |
37
+ | --- | --- |
38
+ | `boeMotionDuration` | `fast` (120ms), `interactive` (140ms), `medium` (160ms), `slow` (240ms), `spin`, `shimmer` |
39
+ | `boeMotionEasing` | `standard`, `enter`, `exit`, `inOut`, `linear` |
40
+ | `boeTransition(property, duration?, easing?)` | CSS transition shorthand |
41
+ | `boeReducedMotionStyles(selector, declarations)` | `prefers-reduced-motion: reduce` block |
42
+
43
+ Use `interactive` for catalog control paint transitions (background / border / color / box-shadow). Use `fast` for quicker accent feedback; `medium` / `slow` for layout and panel motion.
44
+
45
+ ## Policy
46
+
47
+ - **Purposeful only** — motion signals state (loading, expand/collapse, hover feedback), not decoration.
48
+ - **Short by default** — control paint transitions use `interactive` (or `fast` for accents); layout/panel motion uses `medium` / `slow`; longer cycles are for continuous indicators (spinner, skeleton).
49
+ - **Honor reduced motion** — continuous animations must degrade under `prefers-reduced-motion: reduce` (disable shimmer; slow or pause spin). Use `boeReducedMotionStyles` so the media query is consistent.
50
+
51
+ ## Example (shadow styles)
52
+
53
+ ```ts
54
+ import {
55
+ boeMotionDuration,
56
+ boeMotionEasing,
57
+ boeReducedMotionStyles,
58
+ boeTransition,
59
+ } from "@unofficialbox/box-open-elements/foundations/motion";
60
+
61
+ const styles = `
62
+ [part="panel"] {
63
+ transition: ${boeTransition("opacity", boeMotionDuration.medium)};
64
+ }
65
+
66
+ [part="indicator"] {
67
+ animation: boe-spinner-rotate ${boeMotionDuration.spin} ${boeMotionEasing.linear} infinite;
68
+ }
69
+
70
+ ${boeReducedMotionStyles('[part="indicator"]', "animation-duration: 1.6s;")}
71
+ `;
72
+ ```
73
+
74
+ `box-spinner` and `box-skeleton` already consume this vocabulary.
75
+
76
+ ## Migration
77
+
78
+ Catalog shadow styles should consume `boeMotionDuration` / `boeMotionEasing` (or `boeTransition`) instead of hard-coded `120ms` / `140ms` / `160ms` literals. A maintainer sweep lives in `tools/migrate-motion-literals.ts`; re-run only when introducing new literal timings.
79
+
80
+ ## Related
81
+
82
+ - [Accessibility](./accessibility.md) — reduced-motion is part of the a11y contract
83
+ - [Theming](./theming.md) — theme switches should not rely on long decorative transitions
@@ -0,0 +1,57 @@
1
+ # Agent UI guidelines
2
+
3
+ The answer is the content. Agent replies are plain text on the page; user
4
+ messages use a soft bubble. Keep the reading measure near 75 characters.
5
+
6
+ ## Principles
7
+
8
+ - Use one accent for the primary action, links and the brand mark. Amber means
9
+ waiting on the user, green means done, red means failed. Always pair colour
10
+ with words or a labelled status glyph.
11
+ - Use one button system, status family, type scale and motion vocabulary.
12
+ For compact agent surfaces, use 13px semibold pill buttons at 32px or 28px.
13
+ - Return structured facts, checks, tables and documents with a short prose
14
+ introduction. Do not encode lists or verdicts with bullet/check characters
15
+ embedded in reply strings.
16
+ - State what is happening and how long it took. Approval and successful
17
+ execution are separate facts. Show an incomplete-stream notice when needed.
18
+ - Require visible approval for governed writes. A pending approval should be
19
+ the most prominent card in the thread.
20
+ - Keep plans and trace steps one click away under the collapsed run summary.
21
+ - Keep developer tools on a separate route, outside the product interface.
22
+
23
+ ## Avoid
24
+
25
+ - Coloured accent bars along the edge of rounded cards.
26
+ - Sparkle branding and pink-to-blue gradients by default.
27
+ - Text characters pretending to be structured bullets or status icons.
28
+ - Centred two-by-two prompt-card grids as an empty state.
29
+ - Boxes around every content fragment; uppercase eyebrows everywhere.
30
+ - Pills around plain metadata.
31
+ - Reaching into another component's shadow DOM to restyle it. Use public parts,
32
+ tokens, or compose a headless controller.
33
+
34
+ ## Craft
35
+
36
+ Use tabular numerals for amounts, IDs and durations. Keep any serif type to the
37
+ brand voice (wordmark or greeting). Scope IDs to each mounted conversation.
38
+ Use `overflow: clip` on shell containers: unlike `hidden`, it cannot become a
39
+ scroll target when a descendant calls `scrollIntoView`. Make closed panels
40
+ `inert`, and restore focus with `preventScroll`.
41
+
42
+ Motion marks arrival or state changes; it is quick, eased out and never bouncy.
43
+ Use the [shared motion helpers](../foundations/motion.md) and honour reduced motion.
44
+
45
+ ## Pre-ship checklist
46
+
47
+ - Tests, typechecks and build pass.
48
+ - Walk the full flow at 1440px and 390px in light and dark.
49
+ - Repeat keyboard-only and with reduced motion enabled.
50
+ - Check for horizontal overflow and console errors.
51
+ - Check pending, failed, approved-but-failed and incomplete states.
52
+ - Compare screenshots against the anti-patterns above.
53
+
54
+ See [agent UI APIs](./agent-ui.md) for reusable building blocks. These guidelines
55
+ generalize the Loan Copilot review findings recorded in issues #242–#251.
56
+
57
+ For workflow builders and editors, also use [builder and editor guidelines](./builder-editor-guidelines.md).
@@ -0,0 +1,197 @@
1
+ # Agent UI building blocks
2
+
3
+ All new surfaces use the existing import contract: concise root exports or
4
+ individual entrypoints such as `@unofficialbox/box-open-elements/run-summary`.
5
+ The four framework packages remain thin optional adapters; the new elements
6
+ can be used directly or composed from their headless contracts.
7
+
8
+ ## Status and results
9
+
10
+ `foundations/status` exports `toStatusKind`, `statusLabel`, `boeStatusGlyph` and
11
+ `boeStatusStyles` and `boeStatusDocumentStyles`. `StatusIcon` renders a decorative
12
+ 16px circle plus a hidden label; set `label` to override its spoken name.
13
+ Use the same vocabulary for trace, todo, verdict and approval states.
14
+
15
+ `approved` and `rejected` retain their own labels and neutral, outlined glyphs;
16
+ they never map to `done` or `skipped`. An approved action can still fail during
17
+ execution. Keep the decision and execution outcome separate.
18
+
19
+ Error Toasts remain visible until explicitly dismissed or replaced, even when
20
+ the caller supplies a timeout. Non-error Toasts can expire; `duration="0"` and
21
+ `mode="sticky"` prevent expiry. Recovery guidance belongs inline as well, not
22
+ only in a dismissible notification.
23
+
24
+ `ResultBlock` is a serializable union of `facts`, `checks`, `table` and
25
+ `documents`. `ResultBlocks.blocks` renders any sequence, using an optional
26
+ block `id` for stream updates. Set `ResultBlocks.labels` for host verdict
27
+ language and `title-style="eyebrow"` for quieter headings. `FactList.rows`,
28
+ `CheckList.rows`, and `DocumentList.items` offer standalone forms. Tables
29
+ scroll within a focusable region. Unlinked documents are static unless
30
+ `selectable-documents` is set; safe URLs open in a new tab with an external
31
+ marker and spoken suffix (customizable with `link-suffix`). Selectable rows
32
+ emit `document-selected` with `{ id }`.
33
+ `resultDocumentIds(blocks)` and `ResultBlocks.documentIds` support citation
34
+ deduplication. Never place tokens or private URLs in a public demo.
35
+
36
+ ## Run summary
37
+
38
+ ```ts
39
+ import { RunSummary } from "@unofficialbox/box-open-elements/run-summary";
40
+ const summary = new RunSummary();
41
+ summary.turn = {
42
+ startedAt: Date.now(), steps: [],
43
+ todos: [{ id: "extract", content: "Extract terms with Box AI", status: "in_progress" }],
44
+ };
45
+ document.body.append(summary);
46
+ ```
47
+
48
+ `turn` contains `steps`, `todos`, `startedAt` and optional `endedAt`/`incomplete`.
49
+ `incomplete` may be a reason string. With no steps or todos, the settled line
50
+ is static rather than a disclosure. Nested traces use `variant="plain"`, with
51
+ their parts re-exported as `trace-*`; step sources have their own part and
52
+ step durations use the same formatter as the summary.
53
+ Set `failed` for a failed turn. `open` defaults to false; `elapsed-threshold`
54
+ defaults to 2000ms. The live status label excludes the ticking clock.
55
+ `progress`, `formatElapsed` and `splitStepTitle` are pure helpers exported from
56
+ `patterns/run`. Timers stop on completion and disconnect.
57
+
58
+ ## Chat stream contract
59
+
60
+ `AgentSendRequest.messageId` identifies the reply receiving callbacks. IDs are
61
+ unique within a controller; use a conversation ID as well across controllers.
62
+ `AgentStreamEvent` retains `delta`, `citation`, and `proposal`, and adds:
63
+
64
+ | kind | Payload | Message field |
65
+ | --- | --- | --- |
66
+ | `block` | `block: ResultBlock` | `blocks` (same optional ID replaces) |
67
+ | `trace` | `step: RunStep` | `trace` (same ID replaces) |
68
+ | `todos` | `todos: AgentTodo[]` | `todos` (snapshot) |
69
+ | `options` | `options: {label, prompt}[]` | `options` (snapshot) |
70
+ | `context` | `context: Record<string, unknown>` | `context` |
71
+ | `done` | `status: complete / needs_input / error` | `completeness` |
72
+
73
+ Optional `seq` starts at 1. Duplicate sequence numbers are ignored. Missing
74
+ numbers, invalid sequence values, or a missing `done` produce `completeness.status = "incomplete"` and
75
+ `missing[]`. Old transports still finish normally but now show an honest
76
+ incompleteness notice until they emit `done`. Messages also carry numeric
77
+ `startedAt`/`endedAt` timestamps in milliseconds. `readNdjson(stream)` handles
78
+ chunked UTF-8 and CRLF. An `onInvalidLine(line, error)` callback can return
79
+ `"skip"` for malformed JSON; without it, malformed JSON throws. Oversized
80
+ lines and invalid UTF-8 still throw. The reader releases on completion, error,
81
+ cancellation, or early iterator return.
82
+
83
+ `AgentActionProposal.outcome` is `done` or `failed`, separate from `decision`.
84
+ `details` can show result IDs or links below a decided action. Safe links open
85
+ in a new tab; unsafe URLs remain text. Set `hide-modify` if the host does not
86
+ offer an editor. A failed `resolveAction` rejects and puts `resolveError` on
87
+ the affected proposal for an inline alert.
88
+ The controller exposes `resolving` while awaiting a decision and suppresses
89
+ duplicate submissions. Failed approved actions render an alert and a retry of
90
+ the originating request; success suggestions are suppressed. Supply
91
+ `resolveAction(id, decision, note?, messageId?)` when proposal IDs repeat across
92
+ turns. `AgentChat.focusProposal(messageId, proposalId)` provides a scoped
93
+ anchor; `focusComposer()` uses `preventScroll`.
94
+
95
+ `ScrollPinController` is reusable for live lists. Call `connect(content)` with
96
+ an inner content element for resize observation, `contentChanged(true)` for a
97
+ new message, and `disconnect()` on teardown. Upward wheel/touch/keyboard or
98
+ scrollbar-gutter drag unpins; passive scroll events do not. `behind` becomes
99
+ true only when content grows while unpinned; `jump()` re-pins and
100
+ honours reduced motion.
101
+
102
+ ## Workspace
103
+
104
+ `AgentWorkspaceController(createSession)` owns independent chat controllers.
105
+ The factory receives `(id, seed?)`. `newChat()` reuses an untouched chat,
106
+ `restore(id, seed?)` adds a persisted conversation, `remove(id)` can be undone
107
+ with `restore(id)`, `select(id)` keeps other sessions alive, and `destroy()`
108
+ tears down owned controllers. `summaries` exposes word-cut
109
+ titles and waiting/working status. `details` exposes context, approvals with
110
+ message IDs, and deduplicated sources in first-seen order.
111
+
112
+ Assign it to `AgentWorkspace.workspaceController`. `header`, `chats`,
113
+ `conversation`, and `details` slots allow host compositions. `hide-toggles`
114
+ suppresses the default controls; `open(pane, boolean)` and `toggle(pane)` let
115
+ hosts control panes. `pane-change`, `chats-change`, and
116
+ `conversation-selected` events report state. Default conversations remain
117
+ mounted while hidden, preserving their controllers and scroll positions, but
118
+ are not created when the `conversation` slot is filled.
119
+ At widths below 900px, side panes become mutually exclusive drawers. At wide
120
+ widths, `viewer-key` scopes persisted pane preferences; details starts open at
121
+ 1200px. Storage failures fall back to in-memory defaults.
122
+
123
+ The docs and workshop share five simulated scenarios: Overview, Streaming,
124
+ Approval, Failure and Empty. Run scenario streams a delayed response; switching
125
+ conversations does not interrupt it. Approval deliberately demonstrates an
126
+ approved action that fails execution, while rejection makes no change. Sources
127
+ have no live file links. No provider requests or writes occur.
128
+
129
+ Use **Expand workspace** for the full three-pane layout (at least 1200px wide);
130
+ the normal docs column demonstrates drawers. Escape or Exit expanded view
131
+ returns to the page. Fullscreen availability depends on the browser. The demo
132
+ returns a teardown callback that detaches the host, aborts pending streams and
133
+ destroys every owned session on navigation or variant changes. The Code tab
134
+ shows the same ownership pattern for a host-supplied transport and token.
135
+
136
+ ## Developer call console
137
+
138
+ Place `CallConsole` on a separate developer page. Assign a
139
+ `CallConsoleController(transport)` and call `connect()`. The optional
140
+ `createCallConsoleTransport("/calls")` adapter uses:
141
+
142
+ - `GET /calls`: `CallEntry[]` snapshot.
143
+ - `GET /calls/stream`: SSE named `snapshot`, `call`, `clear`; each data payload
144
+ is a matching `CallEvent` object. Bare event payloads are also accepted.
145
+ Same IDs replace pending entries.
146
+ - `DELETE /calls`: clear, returning 204.
147
+
148
+ The console filters by service/errors, distinguishes `rpcError` from HTTP
149
+ success, provides a keyboard-resizable split view, and copies HTTP text with a
150
+ textarea fallback. Hosts own controller connection lifetimes.
151
+ Use `heading`, `hide-heading`, and `serviceLabels` for host language;
152
+ `isFailed(entry)` overrides failure classification. `CallConsoleController`
153
+ keeps the newest 300 entries by default; pass `maxEntries` to change the cap.
154
+
155
+ Search matches method, URL, summary and service. Arrow Up/Down and Home/End
156
+ select requests while focus is in the list; Tab reaches filters and copy
157
+ controls. The panes stack at container widths below 640px. Empty, filtered-empty,
158
+ connecting, reconnecting and unavailable states are explicit; Reconnect retries
159
+ the controller. Failed clear requests retain the existing calls and report an
160
+ error. Copy controls are unavailable without a selected request.
161
+
162
+ Events: `call-selected` carries only `{ id }`; `filters-changed` carries
163
+ `{ service, errorsOnly, query }`; `calls-cleared` follows a successful clear.
164
+ Section copies emit the shared `code-copied` event. Selection events deliberately
165
+ exclude headers and bodies. Requests must already be redacted by the server;
166
+ this inspector is not an authorization boundary.
167
+
168
+ The docs/workshop demo is labeled simulated. It includes successful Box calls,
169
+ a failed tool under HTTP 200, an HTTP 403, an expected MCP 405 and a pending
170
+ request. Simulate request inserts and settles a request; Reset demo restores
171
+ the fixtures. Variants cover empty and connection states. No demo requests go
172
+ to a real provider, and teardown cancels the simulated stream.
173
+
174
+ The private server package exports `CallLog`, `loggedFetch`, redaction helpers
175
+ and `createCallLogHandler(log, authorize)`. Mount only behind developer access
176
+ control. Authorization and cookies, token/secret JSON fields, OAuth codes and
177
+ URL credentials are redacted before log emission. Unknown text bodies are
178
+ omitted; capture is bounded to 1MiB. GET event streams are not consumed.
179
+ Pass `{mcp: true}` as the fourth `loggedFetch` argument to classify GET/DELETE
180
+ 405 responses as expected. Generic HTTP 405 responses remain failures.
181
+ JSON-RPC errors and `isError: true` tool results count as failures even on 2xx.
182
+
183
+ ```mermaid
184
+ sequenceDiagram
185
+ participant Host
186
+ participant Session as AgentChatController
187
+ participant Transport
188
+ participant UI as AgentChat
189
+ Host->>Session: send(body)
190
+ Session->>Transport: sendMessage(messageId, onEvent, signal)
191
+ Transport-->>Session: delta / block / trace / proposal / done
192
+ Session-->>UI: messagesChanged
193
+ UI->>Session: resolveAction(proposalId, decision, messageId)
194
+ Session->>Transport: resolveAction
195
+ Transport-->>Session: decision and outcome
196
+ Session-->>UI: actionResolved
197
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unofficialbox/box-open-elements",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Box Open Elements: an open, framework-agnostic design system and web component library for Box-style experiences",
5
5
  "license": "MIT",
6
6
  "homepage": "https://unofficialbox.github.io/box-open-elements",
@@ -178,7 +178,11 @@
178
178
  }
179
179
  },
180
180
  "files": [
181
- "dist"
181
+ "dist",
182
+ "docs/patterns/agent-ui-guidelines.md",
183
+ "docs/patterns/agent-ui.md",
184
+ "docs/foundations/motion.md",
185
+ "docs/api-guidelines.md"
182
186
  ],
183
187
  "scripts": {
184
188
  "bundles:check": "bun tools/adapters/bundle-check.ts",