@athenaintel/react 0.18.0 → 0.19.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/README.md +106 -4
- package/dist/SuperGroupingCard-BsWbHyV_.js +795 -0
- package/dist/SuperGroupingCard-BsWbHyV_.js.map +1 -0
- package/dist/SuperGroupingCard-CRRFUgjN.cjs +794 -0
- package/dist/SuperGroupingCard-CRRFUgjN.cjs.map +1 -0
- package/dist/chat/StatewireApprovalCard.d.ts +59 -2
- package/dist/chat/StatewireClientToolBridge.d.ts +3 -3
- package/dist/chat/StatewireQueuedMessages.d.ts +105 -6
- package/dist/chat/statewire-approval.d.ts +1 -1
- package/dist/chat/statewire-client-tools.d.ts +15 -21
- package/dist/chat/super-grouping/CollapsibleGroup.d.ts +52 -11
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +78 -21
- package/dist/chat/super-grouping/activity-timeline.d.ts +91 -0
- package/dist/chat/super-grouping/grouping-function.d.ts +13 -10
- package/dist/chat/super-grouping/index.d.ts +12 -0
- package/dist/chat/super-grouping/toolkit-map.d.ts +8 -1
- package/dist/chat/use-statewire-approval-request.d.ts +44 -0
- package/dist/chat-ui/header/conversation-history-panel.d.ts +11 -1
- package/dist/chat-ui/index.d.ts +7 -1
- package/dist/chat-ui/mentions/suggestions/shims.d.ts +0 -4
- package/dist/chat-ui/messages/runtime-message.d.ts +2 -3
- package/dist/chat-ui/messages/statewire-continue-run.d.ts +48 -7
- package/dist/chat-ui/messages/user-edit-composer.d.ts +5 -2
- package/dist/chat-ui/statewire.d.ts +19 -0
- package/dist/chat-ui/thread/chat-thread-shell.d.ts +7 -1
- package/dist/chat-ui/thread/statewire-history-edge.d.ts +52 -0
- package/dist/chat-ui-statewire.cjs +25 -0
- package/dist/chat-ui-statewire.cjs.map +1 -0
- package/dist/chat-ui-statewire.js +25 -0
- package/dist/chat-ui-statewire.js.map +1 -0
- package/dist/chat-ui.cjs +174 -357
- package/dist/chat-ui.cjs.map +1 -1
- package/dist/chat-ui.js +173 -355
- package/dist/chat-ui.js.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +1 -1
- package/dist/diagnostics/errors.d.ts +4 -0
- package/dist/index.cjs +2222 -5183
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -6
- package/dist/index.js +4193 -7151
- package/dist/index.js.map +1 -1
- package/dist/misc-tool-uis-B2e0Okkn.cjs +43 -0
- package/dist/misc-tool-uis-B2e0Okkn.cjs.map +1 -0
- package/dist/misc-tool-uis-gAiQw0Yl.js +44 -0
- package/dist/misc-tool-uis-gAiQw0Yl.js.map +1 -0
- package/dist/provider/AthenaProvider.d.ts +4 -2
- package/dist/provider/config.d.ts +9 -2
- package/dist/provider/statewire-window-context.d.ts +12 -0
- package/dist/runtime/statewire-auth-headers.d.ts +38 -0
- package/dist/runtime/statewire-lifecycle.d.ts +25 -0
- package/dist/runtime/statewire-session-key.d.ts +13 -0
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +36 -5
- package/dist/statewire-continue-run-D34gS7_1.js +132 -0
- package/dist/statewire-continue-run-D34gS7_1.js.map +1 -0
- package/dist/statewire-continue-run-nE9VCKUh.cjs +131 -0
- package/dist/statewire-continue-run-nE9VCKUh.cjs.map +1 -0
- package/dist/statewire-history-edge-C8uyTEjX.cjs +1711 -0
- package/dist/statewire-history-edge-C8uyTEjX.cjs.map +1 -0
- package/dist/statewire-history-edge-CPohUKMt.js +1712 -0
- package/dist/statewire-history-edge-CPohUKMt.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/super-grouping.cjs +22 -0
- package/dist/super-grouping.cjs.map +1 -0
- package/dist/super-grouping.js +22 -0
- package/dist/super-grouping.js.map +1 -0
- package/dist/threads/mint-thread-id.d.ts +8 -0
- package/dist/threads/statewire-thread-list.d.ts +20 -4
- package/dist/tool-fallback-DkQ3DLkn.js +4281 -0
- package/dist/tool-fallback-DkQ3DLkn.js.map +1 -0
- package/dist/tool-fallback-kfhpJQZa.cjs +4297 -0
- package/dist/tool-fallback-kfhpJQZa.cjs.map +1 -0
- package/dist/tools/index.d.ts +14 -0
- package/dist/tools/misc-tool-uis.d.ts +2 -0
- package/dist/tools/primitives.d.ts +41 -0
- package/dist/tools/tool-fallback.d.ts +78 -6
- package/dist/tools/tool-icons.d.ts +10 -0
- package/dist/tools/tool-uis.d.ts +1 -23
- package/dist/tools.cjs +41 -0
- package/dist/tools.cjs.map +1 -0
- package/dist/tools.js +41 -0
- package/dist/tools.js.map +1 -0
- package/dist/trash-2-B5OaNAL7.cjs +5096 -0
- package/dist/trash-2-B5OaNAL7.cjs.map +1 -0
- package/dist/trash-2-CCwSURL-.js +5081 -0
- package/dist/trash-2-CCwSURL-.js.map +1 -0
- package/dist/{use-rest-conversation-history-Dm0rdQgT.cjs → use-rest-conversation-history-Cm8qMRxp.cjs} +445 -5406
- package/dist/use-rest-conversation-history-Cm8qMRxp.cjs.map +1 -0
- package/dist/{use-rest-conversation-history-Bs5qn5G3.js → use-rest-conversation-history-veDZS-oL.js} +491 -5452
- package/dist/use-rest-conversation-history-veDZS-oL.js.map +1 -0
- package/dist/wrench-BEf72cyP.cjs +417 -0
- package/dist/wrench-BEf72cyP.cjs.map +1 -0
- package/dist/wrench-CbrOlVYm.js +418 -0
- package/dist/wrench-CbrOlVYm.js.map +1 -0
- package/dist/x-Dfd2NzK0.cjs +42 -0
- package/dist/x-Dfd2NzK0.cjs.map +1 -0
- package/dist/x-_DntAa_a.js +43 -0
- package/dist/x-_DntAa_a.js.map +1 -0
- package/package.json +29 -11
- package/dist/chat/super-grouping/tool-status-labels.d.ts +0 -1
- package/dist/use-rest-conversation-history-Bs5qn5G3.js.map +0 -1
- package/dist/use-rest-conversation-history-Dm0rdQgT.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -81,6 +81,11 @@ back to an Athena default — credentials are never sent to a host you didn't
|
|
|
81
81
|
configure. Hosts that predate the minted statewire fields keep working through
|
|
82
82
|
the `apiUrl` derivation. Auth reuses the provider's existing credential
|
|
83
83
|
plumbing: tokens ride `Authorization: Bearer` and API keys ride `X-API-KEY`.
|
|
84
|
+
A `getToken` resolver is called with `{ force: true }` right after the sync
|
|
85
|
+
host refuses a credential, so a caching getter must mint a fresh token then;
|
|
86
|
+
the persisted command lane is scoped to the signed-in user as well as the
|
|
87
|
+
host, so a shared browser never resends one user's pending sends under the
|
|
88
|
+
next user's token.
|
|
84
89
|
|
|
85
90
|
What the statewire transport wires up in `AthenaChat`:
|
|
86
91
|
|
|
@@ -89,14 +94,47 @@ What the statewire transport wires up in `AthenaChat`:
|
|
|
89
94
|
(or Continue for a generic pause) and resumes the run through the statewire
|
|
90
95
|
`run/input` command. Hosts that build their own thread UI should mount the
|
|
91
96
|
exported `StatewireApprovalCard` themselves — without it an approval-gated
|
|
92
|
-
run stays parked with no way to answer it.
|
|
97
|
+
run stays parked with no way to answer it. Its `renderDetails`,
|
|
98
|
+
`isHandledElsewhere`, and `readOnly` seams take host-specific review UIs,
|
|
99
|
+
requests another surface answers, and viewers without edit rights; the
|
|
100
|
+
headless `useStatewireApprovalRequest` behind it is exported for hosts with
|
|
101
|
+
their own decision UI.
|
|
93
102
|
- **Frontend tools:** tools in `frontendTools` with a local `execute` are
|
|
94
103
|
declared to the backend as `client_tools` and executed by the mounted
|
|
95
104
|
client-tool bridge, which resumes the run with each tool's result.
|
|
96
105
|
- **Mid-run sends and the queue:** a message sent while a run is active
|
|
97
|
-
queues on the server. The queue panel above the composer
|
|
98
|
-
entries with remove
|
|
99
|
-
run
|
|
106
|
+
queues on the server. The queue panel above the composer
|
|
107
|
+
(`StatewireQueuedMessages`) lists queued entries with remove, "Send now"
|
|
108
|
+
(steer), Prioritize (`run/prioritize`), inline edit, and failed sends with
|
|
109
|
+
Retry/Discard, plus Continue for a stopped run's queue head; hosts can opt
|
|
110
|
+
into `autoContinue` for stranded queues and slot their own row renderer and
|
|
111
|
+
editor.
|
|
112
|
+
- **Lean entries for hosts with their own composer:** `@athenaintel/react/chat-ui/statewire`
|
|
113
|
+
exports just the approval card, the queue tray, and the continue/run-ended
|
|
114
|
+
affordances (plus the runtime-message card and Continue pill they render),
|
|
115
|
+
and `@athenaintel/react/tools` exports the generic `ToolFallback` card with
|
|
116
|
+
its primitives (`ToolCard`, `ExpandableSection`, `NestedPtcMessages`) — so a
|
|
117
|
+
host that already ships its own composer and mention stack (Olympus) never
|
|
118
|
+
pulls the SDK's Tiptap graph into its build. Tool names, icons, categories,
|
|
119
|
+
and running copy come from the shared registry in
|
|
120
|
+
`@athenaintel/agent-runtime` (`getToolDisplayMeta`), and success/failure from
|
|
121
|
+
its `classifyToolResult`; the fallback takes host seams (`displayName`,
|
|
122
|
+
`icon`, `extraAction`, `notice`, `renderResult`, `onOpenAsset`,
|
|
123
|
+
`hideInternalIdArgs`) instead of being copied. `@athenaintel/react/super-grouping`
|
|
124
|
+
exports the grouped ("conversational") view of an assistant turn —
|
|
125
|
+
`SuperGroupingCard`, `SuperGroupingFinalText`, `CollapsibleGroup`, the
|
|
126
|
+
activity-timeline derivation, and the tool-based grouping function — with
|
|
127
|
+
slots for the host's text/tool renderers and controls (`renderHeaderActions`,
|
|
128
|
+
`renderRunningMeta`, `summaryDetails`, `waitingTools`, `expansionKey`), so
|
|
129
|
+
Olympus and the Chrome extension mount one card instead of copies.
|
|
130
|
+
- **Olympus consumes the package, not the source.** `@athenaintel/react` is a
|
|
131
|
+
workspace dependency of Olympus, resolved through this package's `exports`
|
|
132
|
+
to the built `dist/` (the guarded `prepare` script builds it on a cold
|
|
133
|
+
`bun install`; `olympus/scripts/prepare-react-sdk.ts` rebuilds it before
|
|
134
|
+
`bun run ts` when sources changed; `scripts/typecheck-all.ts` emits the
|
|
135
|
+
declarations before the repo typecheck). While editing the SDK against a
|
|
136
|
+
running Olympus, run `bun run dev` here so the dist follows your edits. The
|
|
137
|
+
Chrome extension and Office add-in still alias the entries to source.
|
|
100
138
|
- **Errors and connection state:** transport errors (send rejections,
|
|
101
139
|
paywall refusals) render as a dismissible banner; a degraded connection
|
|
102
140
|
shows a reconnect strip; a send into a thread created by the retired legacy
|
|
@@ -114,6 +152,70 @@ silently ignored selector would let a deployment answer as the wrong agent.
|
|
|
114
152
|
`model` defaults to the deep-agent default model (`DEFAULT_STATEWIRE_MODEL`)
|
|
115
153
|
unless a collab agent supplies one.
|
|
116
154
|
|
|
155
|
+
## What's new in 0.19.0
|
|
156
|
+
|
|
157
|
+
0.19.0 is a minor release with **no breaking changes**: every export that
|
|
158
|
+
shipped in 0.18.0 is still exported under the same name from the same entry,
|
|
159
|
+
and `<AthenaProvider>` / `<AthenaChat>` accept the same props. Bump the pin
|
|
160
|
+
and re-install; there is nothing to migrate.
|
|
161
|
+
|
|
162
|
+
- **Windowed history on every surface.** Each attach now declares a message
|
|
163
|
+
window (`ATHENA_SDK_MESSAGE_WINDOW`, 40 messages, sent as the
|
|
164
|
+
`x-athena-deep-agent-window` hello), so a long thread's first snapshot
|
|
165
|
+
carries the transcript's tail instead of every message. `<AthenaChat>`
|
|
166
|
+
mounts the new `StatewireHistoryEdge` row above the messages — "N earlier
|
|
167
|
+
messages", paged in as you scroll near the top (or on click) while the
|
|
168
|
+
reading position is kept — and cut tool outputs are fetched back for the
|
|
169
|
+
cards that show them. Hosts composing their own thread mount
|
|
170
|
+
`StatewireHistoryEdge` in `ChatThreadShell`'s `beforeMessages` slot (also
|
|
171
|
+
exported from `@athenaintel/react/chat-ui` and `/chat-ui/statewire`) and
|
|
172
|
+
read the tool-output store through `useStatewireToolOutputs`. Editing a
|
|
173
|
+
message below the loaded window resubmits with an anchored `run/edit`.
|
|
174
|
+
- **One approval card, queue tray, and continue affordance.**
|
|
175
|
+
`StatewireApprovalCard` (`renderDetails`, `isHandledElsewhere`, `readOnly`),
|
|
176
|
+
`StatewireQueuedMessages` (`renderContent`, `renderEditor`, `autoContinue`,
|
|
177
|
+
`onEvent`), and the continue / run-ended affordances are the single
|
|
178
|
+
implementations Olympus, the Chrome extension, and the Office add-in mount;
|
|
179
|
+
the headless `useStatewireApprovalRequest` and `HITL_PENDING_RESUME_GRACE_MS`
|
|
180
|
+
are exported for hosts with their own decision UI. New lean entry:
|
|
181
|
+
`@athenaintel/react/chat-ui/statewire`.
|
|
182
|
+
- **One tool display registry, result classifier, and fallback.**
|
|
183
|
+
`getToolDisplayMeta`, `classifyToolResult`, `isToolResultSuccess`,
|
|
184
|
+
`describeToolArgs`, `resultMessage`, `toolActiveLabel`, `toolCompletedLabel`
|
|
185
|
+
(re-exported from `@athenaintel/agent-runtime`), `TOOL_ICONS` / `toolIcon`,
|
|
186
|
+
the `ToolFallback` host seams (`ToolFallbackNotice`, `ToolFallbackOptions`,
|
|
187
|
+
`ToolFallbackContext`, …), `CopyToolSpecButton`, `InstallPackageToolUI`,
|
|
188
|
+
and `NestedPtcComponentsProvider` / `useNestedPtcComponents`. New lean
|
|
189
|
+
entry: `@athenaintel/react/tools`.
|
|
190
|
+
- **Grouped activity card and timeline.** `SuperGroupingCard`,
|
|
191
|
+
`SuperGroupingFinalText`, `SuperGroupingProvider`, `CollapsibleGroup`,
|
|
192
|
+
`buildActivityTimeline`, `useActivityExpansion`,
|
|
193
|
+
`createToolBasedGroupingFunction`, `TOOLKIT_THEMES`, and their types are
|
|
194
|
+
exported; `<AthenaChat groupToolCalls>` renders through them. New lean
|
|
195
|
+
entry: `@athenaintel/react/super-grouping`.
|
|
196
|
+
- **`rejected` is a first-class tool-result state.** A gated tool call the
|
|
197
|
+
user refused classifies as `{ state: 'rejected' }` (`ToolResultClassification`)
|
|
198
|
+
instead of an error, and reads as rejected on the tool card and in the
|
|
199
|
+
grouped timeline.
|
|
200
|
+
- **Diagnostics instead of console noise.** Composer, tool-UI, and mention
|
|
201
|
+
failures now emit `composer.attachment.error`, `composer.cancel.error`,
|
|
202
|
+
`tools.schema.warning`, `tools.debug`, and `mentions.fetch.error` on the
|
|
203
|
+
diagnostics bus (`onDiagnostic` / `onError`, `__ATHENA_SDK__.diagnostics`)
|
|
204
|
+
rather than through `console.*`.
|
|
205
|
+
- **`config.getToken` may be called with `{ force: true }`**
|
|
206
|
+
(`AthenaStatewireTokenGetter`) right after the statewire host refused the
|
|
207
|
+
previous credential; a getter that caches should mint a fresh token then.
|
|
208
|
+
Existing zero-argument getters keep working unchanged.
|
|
209
|
+
- **Dependencies.** The assistant-ui family is pinned exactly on one release
|
|
210
|
+
train (`@assistant-ui/react` 0.15.17, `@assistant-ui/react-statewire`
|
|
211
|
+
0.24.0, `assistant-stream` 0.3.41, `statewire` 0.14.0); the SDK's internal
|
|
212
|
+
`zod` moved to v4 (it is not part of the public types).
|
|
213
|
+
|
|
214
|
+
Moved, not renamed: `ToolCard`, `ExpandableSection`, `normalizeResult`,
|
|
215
|
+
`truncate`, `formatToolName`, and `ToolStatus` now live in the tool
|
|
216
|
+
primitives module and are exported from both `@athenaintel/react` (as before)
|
|
217
|
+
and `@athenaintel/react/tools`.
|
|
218
|
+
|
|
117
219
|
## Migrating from 0.17
|
|
118
220
|
|
|
119
221
|
0.18.0 deletes the legacy assistant-transport leg. Every Athena chat client
|