@athenaintel/react 0.17.0 → 0.18.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 (55) hide show
  1. package/README.md +73 -39
  2. package/dist/AthenaContext-B1QMhIP-.cjs.map +1 -1
  3. package/dist/AthenaContext-MOslgOmE.js.map +1 -1
  4. package/dist/chat/statewire-banners.d.ts +5 -9
  5. package/dist/chat-ui/index.d.ts +3 -0
  6. package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +24 -0
  7. package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +5 -0
  8. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +1 -1
  9. package/dist/chat-ui/messages/continue-pill.d.ts +13 -0
  10. package/dist/chat-ui/messages/message-components.d.ts +7 -2
  11. package/dist/chat-ui/messages/runtime-message.d.ts +22 -0
  12. package/dist/chat-ui/messages/statewire-continue-run.d.ts +41 -0
  13. package/dist/chat-ui/thread/chat-composer-dock.d.ts +1 -1
  14. package/dist/chat-ui.cjs +279 -56
  15. package/dist/chat-ui.cjs.map +1 -1
  16. package/dist/chat-ui.js +312 -89
  17. package/dist/chat-ui.js.map +1 -1
  18. package/dist/diagnostics/athena-diagnostics.d.ts +1 -1
  19. package/dist/diagnostics/errors.d.ts +0 -4
  20. package/dist/index.cjs +18834 -21869
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.ts +4 -8
  23. package/dist/index.js +18849 -21884
  24. package/dist/index.js.map +1 -1
  25. package/dist/lib/athena-urls.d.ts +0 -2
  26. package/dist/lib/posthog/wrap-posthog-client.d.ts +3 -1
  27. package/dist/provider/AthenaContext.d.ts +0 -7
  28. package/dist/provider/AthenaProvider.d.ts +25 -51
  29. package/dist/provider/config.d.ts +11 -14
  30. package/dist/provider/statewire-lifecycle-context.d.ts +3 -4
  31. package/dist/provider/types.d.ts +0 -1
  32. package/dist/runtime/statewire-lifecycle.d.ts +0 -1
  33. package/dist/runtime/statewire-run-config.d.ts +18 -5
  34. package/dist/runtime/useAthenaStatewireRuntime.d.ts +6 -11
  35. package/dist/styles.css +1 -1
  36. package/dist/threads/ThreadList.d.ts +6 -1
  37. package/dist/threads/statewire-thread-list.d.ts +6 -5
  38. package/dist/threads/thread-id-context.d.ts +9 -0
  39. package/dist/threads/use-statewire-conversation-history.d.ts +2 -0
  40. package/dist/threads/useAthenaThreadManager.d.ts +24 -12
  41. package/dist/{use-rest-conversation-history-DpEswBqQ.js → use-rest-conversation-history-Bs5qn5G3.js} +7500 -6959
  42. package/dist/use-rest-conversation-history-Bs5qn5G3.js.map +1 -0
  43. package/dist/{use-rest-conversation-history-BdnG8jEP.cjs → use-rest-conversation-history-Dm0rdQgT.cjs} +7311 -6770
  44. package/dist/use-rest-conversation-history-Dm0rdQgT.cjs.map +1 -0
  45. package/package.json +3 -3
  46. package/dist/runtime/converter.d.ts +0 -5
  47. package/dist/runtime/external-message-converter.d.ts +0 -21
  48. package/dist/runtime/schemas.d.ts +0 -24
  49. package/dist/runtime/transport.d.ts +0 -39
  50. package/dist/runtime/useAthenaRuntime.d.ts +0 -47
  51. package/dist/threads/adapter.d.ts +0 -42
  52. package/dist/threads/useActiveThreadStateHydration.d.ts +0 -12
  53. package/dist/threads/useThreadTitlePolling.d.ts +0 -14
  54. package/dist/use-rest-conversation-history-BdnG8jEP.cjs.map +0 -1
  55. package/dist/use-rest-conversation-history-DpEswBqQ.js.map +0 -1
package/README.md CHANGED
@@ -50,37 +50,23 @@ function App() {
50
50
  </AthenaProvider>
51
51
  ```
52
52
 
53
- `config` accepts `apiKey`, `token`, `apiUrl`, `backendUrl`, `appUrl`, `trustedParentOrigins`, `environment`, `transport`, and `statewireSyncUrl`. Top-level `apiKey`, `token`, `apiUrl`, `backendUrl`, `appUrl`, and `environment` props remain supported as compatibility aliases, but `config` is now the preferred API.
53
+ `config` accepts `apiKey`, `token`, `getToken`, `apiUrl`, `backendUrl`, `appUrl`, `statewireSyncUrl`, `trustedParentOrigins`, `environment`, `extraRunConfig`, and `posthog`. Top-level `apiKey`, `token`, `apiUrl`, `backendUrl`, `appUrl`, and `environment` props remain supported as compatibility aliases, but `config` is now the preferred API.
54
54
 
55
55
  If `config.appUrl` is omitted, the provider resolves it from the parent bridge or from the matching Athena environment defaults. Known Athena staging and production `apiUrl` and `backendUrl` values automatically fall back to the corresponding frontend origin.
56
56
 
57
57
  Use `trustedParentOrigins` when the SDK runs inside an iframe on a private-cloud or custom parent domain and you want to explicitly allow postMessage auth/config from that parent.
58
58
 
59
- ## Statewire Transport (default as of 0.12.0)
59
+ ## Transport (statewire only, as of 0.18.0)
60
60
 
61
- Statewire is the default chat transport: the SDK attaches to the deep-agent
62
- statewire sync host, so the thread is hosted server-side and replicated live —
63
- history, reconnect, run scheduling, mid-run queueing, HITL approvals, and
64
- client tools (for recognized SDK hosts, e.g. computer-asset `app_id`s) all
65
- come from the server snapshot. Pass `transport: 'legacy'` to opt a deployment
66
- back onto the legacy Iris `/api/chat` stream:
61
+ The SDK speaks one chat transport: **statewire**. The provider attaches to the
62
+ deep-agent statewire sync host at `<statewireSyncUrl>/<threadId>`, so the
63
+ thread is hosted server-side and replicated live — history, reconnect, run
64
+ scheduling, mid-run queueing, HITL approvals, and client tools (for recognized
65
+ SDK hosts, e.g. computer-asset `app_id`s) all come from the server snapshot.
67
66
 
68
- ```tsx
69
- <AthenaProvider config={{ environment: 'staging', transport: 'legacy' }}>
70
- <AthenaChat />
71
- </AthenaProvider>
72
- ```
73
-
74
- **Migrating from ≤0.11.x (legacy default):**
75
-
76
- - Threads are transport-scoped: conversations created on the legacy transport
77
- are read-only from statewire (and vice versa). Users keep their history but
78
- continue in new threads.
79
- - The statewire runtime applies the deep-agent model default when no `model`
80
- prop is set; pin `model` explicitly if you depended on the legacy default.
81
- - The `agent` prop's legacy agent names are not honored on statewire; use
82
- `collab_agent:<id>` refs (with `transport: 'statewire'` semantics) or the
83
- default agent.
67
+ The legacy Iris `/api/chat` assistant-transport leg was deleted in 0.18.0
68
+ along with the `transport` prop — there is nothing to opt back onto. See
69
+ [Migrating from 0.17](#migrating-from-017).
84
70
 
85
71
  The sync endpoint resolves in this order: an explicit `statewireSyncUrl`; the
86
72
  `statewireSyncUrl` the host environment supplies (a Marathon-served computer
@@ -113,17 +99,64 @@ What the statewire transport wires up in `AthenaChat`:
113
99
  run's steer lane.
114
100
  - **Errors and connection state:** transport errors (send rejections,
115
101
  paywall refusals) render as a dismissible banner; a degraded connection
116
- shows a reconnect strip; a read-only pre-cutover thread shows a read-only
117
- notice. Custom hosts can read all of it via `useAthenaStatewireLifecycle`.
118
- - **Thread list:** `enableThreadList` works with statewire. The list is the
119
- same persisted Agora session list; switching threads re-attaches the
120
- statewire session to the selected thread. `ThreadList` and
121
- `useAthenaThreadManager` work in both modes.
122
-
123
- Remaining limitations: on statewire the `agent` prop only accepts
124
- `collab_agent:<asset_id>` refs (see below) — any other value is ignored,
125
- because the statewire host always runs the Athena deep agent. `model`
126
- defaults to the deep-agent default model unless a collab agent supplies one.
102
+ shows a reconnect strip; a send into a thread created by the retired legacy
103
+ runtime is refused with a dismissible read-only notice (start a new chat).
104
+ Custom hosts can read all of it via `useAthenaStatewireLifecycle`.
105
+ - **Thread list:** `enableThreadList` provides the persisted Agora session
106
+ list; switching threads re-attaches the statewire session to the selected
107
+ thread. `ThreadList`, `useAthenaThreadManager`, and `useRefreshThreadList`
108
+ read that state (and render nothing / return `null` without it).
109
+
110
+ The `agent` prop only accepts `collab_agent:<asset_id>` refs (see below),
111
+ because the statewire host always runs the Athena deep agent. **Any other
112
+ non-blank value throws at first render** it is a misconfiguration, and a
113
+ silently ignored selector would let a deployment answer as the wrong agent.
114
+ `model` defaults to the deep-agent default model (`DEFAULT_STATEWIRE_MODEL`)
115
+ unless a collab agent supplies one.
116
+
117
+ ## Migrating from 0.17
118
+
119
+ 0.18.0 deletes the legacy assistant-transport leg. Every Athena chat client
120
+ now speaks the native statewire wire, and the `TAG:JSON` transport over Iris
121
+ `/api/chat` is being removed server-side, so the SDK no longer offers it.
122
+
123
+ Removed from `<AthenaProvider>`:
124
+
125
+ - `transport` prop and `config.transport` — statewire is the only lane.
126
+ - `customToolConfigs` — it only ever reached the legacy leg (the deep-agent
127
+ runtime has no `custom_tool_configs` reader; MCP configuration is the parsed
128
+ `mcp_server_configs` key).
129
+ - `agent` no longer accepts named agents (`athena_assist_agent`, …). The only
130
+ accepted shape is `collab_agent:<asset_id>`; anything else throws with a
131
+ message naming the prop and the accepted shape. Omit the prop to run the
132
+ Athena deep agent. Validate ahead of time with `resolveAgentProp({ agent })`.
133
+
134
+ Removed exports:
135
+
136
+ - `useAthenaRuntime`, `AthenaRuntimeConfig`, `DEFAULT_API_URL`,
137
+ `DEFAULT_BACKEND_URL` — use `useAthenaStatewireRuntime` /
138
+ `buildStatewireRunConfig` for a custom chat surface.
139
+ - `ATHENA_TRANSPORTS`, `DEFAULT_ATHENA_TRANSPORT`, `resolveAthenaTransport`,
140
+ `allowsMidRunSend`, `AthenaTransport`, `ResolvedAthenaTransport`, and the
141
+ `transport` field on `AthenaConfig` (`useAthenaConfig()`).
142
+ - `convertLangChainToThreadMessages`, `autoCloseInFlightSubgraphMessages`,
143
+ `PTC_SUBCALL_DID_NOT_COMPLETE_MESSAGE` — the LangChain message converter
144
+ existed only for the legacy wire.
145
+ - `StatewireLegacyReadOnlyBanner` (rendered nothing since 0.17) and the
146
+ no-op `onLegacyReadOnly` option of `useAthenaStatewireRuntime`. The
147
+ residual `legacy_thread_read_only` 409 still surfaces through
148
+ `StatewireErrorBanner` / `useAthenaStatewireLifecycle`.
149
+ - `useAthenaThreadListAdapter` (the assistant-ui remote-thread-list adapter).
150
+ `useRefreshThreadList`, `useAthenaThreadId`, and `AthenaThreadIdContext`
151
+ remain and read the statewire thread-list state.
152
+ - Error codes `stream_failed` and `config_ignored`; diagnostics events
153
+ `stream.connected` and `stream.error`. `sdk.transport` still fires (always
154
+ `statewire`).
155
+
156
+ Unchanged: `apiUrl`/`backendUrl` (explicit, host-minted, or from
157
+ `environment`) — `apiUrl`'s origin still derives the statewire sync mount when
158
+ `statewireSyncUrl` is not set, and `backendUrl` is still the Agora REST base
159
+ for thread lists, uploads, and asset embeds.
127
160
 
128
161
  ## Collab Agents
129
162
 
@@ -133,7 +166,6 @@ the provider at one and the chat runs **as** that agent:
133
166
 
134
167
  ```tsx
135
168
  <AthenaProvider
136
- transport="statewire"
137
169
  agent="collab_agent:asset_432af46f-293d-480b-a518-30b1f42a9ef7"
138
170
  channel="askbob_web"
139
171
  >
@@ -150,7 +182,10 @@ run the agent's base configuration.
150
182
 
151
183
  ### Requirements
152
184
 
153
- - **`transport="statewire"`.** The legacy transport ignores `collab_agent:` refs.
185
+ - **The ref is the only accepted `agent` shape.** `collab_agent:<asset_id>`
186
+ selects the agent; omitting `agent` (or a blank string) runs the Athena deep
187
+ agent; any other value throws at render (`resolveAgentProp` is the same check,
188
+ exported for hosts that validate configuration up front).
154
189
  - **Publish the agent.** Resolution reads the *published* snapshot, not the
155
190
  live draft, so a channel that exists only in the editor is rejected with
156
191
  `collab_agent_channel_unknown`.
@@ -167,7 +202,6 @@ returns a plausible answer using your config instead of theirs.
167
202
  ```tsx
168
203
  // ❌ the agent's prompt, model, and tools are all discarded
169
204
  <AthenaProvider
170
- transport="statewire"
171
205
  agent="collab_agent:asset_1234"
172
206
  model="claude-opus-4-6"
173
207
  systemPrompt="You are a helpful assistant."
@@ -175,7 +209,7 @@ returns a plausible answer using your config instead of theirs.
175
209
  />
176
210
 
177
211
  // ✅ the agent's own configuration wins
178
- <AthenaProvider transport="statewire" agent="collab_agent:asset_1234" />
212
+ <AthenaProvider agent="collab_agent:asset_1234" />
179
213
  ```
180
214
 
181
215
  Pass them only when you deliberately want to override the agent — an explicit
@@ -1 +1 @@
1
- {"version":3,"file":"AthenaContext-B1QMhIP-.cjs","sources":["../src/provider/AthenaContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { AthenaTransport } from '../runtime/transport';\nimport type { AthenaProviderConfig } from './config';\nimport type { AthenaCitationLinkOptions, AthenaLinkClickOptions } from './citation-links';\n\nexport interface AthenaConfig extends Pick<AthenaProviderConfig, 'apiKey' | 'token'> {\n backendUrl: string;\n appUrl: string;\n enabledToolkits: string[];\n /** Effective chat transport — the lane the provider actually mounted (the\n * SDK defaults to 'statewire'; see `DEFAULT_ATHENA_TRANSPORT`). Optional\n * only so hand-built `AthenaConfig` literals keep compiling; capability\n * gates treat an absent value as the conservative legacy lane (e.g.\n * `allowsMidRunSend(undefined)` is false). */\n transport?: AthenaTransport;\n linkClicks?: AthenaLinkClickOptions;\n citationLinks?: AthenaCitationLinkOptions;\n}\n\nexport const AthenaContext = createContext<AthenaConfig | null>(null);\n\nexport function useAthenaConfig(): AthenaConfig {\n const ctx = useContext(AthenaContext);\n if (!ctx) {\n throw new Error('[AthenaSDK] useAthenaConfig must be used within <AthenaProvider>');\n }\n return ctx;\n}\n"],"names":["createContext","useContext"],"mappings":";;AAmBO,MAAM,gBAAgBA,MAAAA,cAAmC,IAAI;AAE7D,SAAS,kBAAgC;AAC9C,QAAM,MAAMC,MAAAA,WAAW,aAAa;AACpC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,kEAAkE;AAAA,EACpF;AACA,SAAO;AACT;;;"}
1
+ {"version":3,"file":"AthenaContext-B1QMhIP-.cjs","sources":["../src/provider/AthenaContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { AthenaProviderConfig } from './config';\nimport type { AthenaCitationLinkOptions, AthenaLinkClickOptions } from './citation-links';\n\nexport interface AthenaConfig extends Pick<AthenaProviderConfig, 'apiKey' | 'token'> {\n backendUrl: string;\n appUrl: string;\n enabledToolkits: string[];\n linkClicks?: AthenaLinkClickOptions;\n citationLinks?: AthenaCitationLinkOptions;\n}\n\nexport const AthenaContext = createContext<AthenaConfig | null>(null);\n\nexport function useAthenaConfig(): AthenaConfig {\n const ctx = useContext(AthenaContext);\n if (!ctx) {\n throw new Error('[AthenaSDK] useAthenaConfig must be used within <AthenaProvider>');\n }\n return ctx;\n}\n"],"names":["createContext","useContext"],"mappings":";;AAYO,MAAM,gBAAgBA,MAAAA,cAAmC,IAAI;AAE7D,SAAS,kBAAgC;AAC9C,QAAM,MAAMC,MAAAA,WAAW,aAAa;AACpC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,kEAAkE;AAAA,EACpF;AACA,SAAO;AACT;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AthenaContext-MOslgOmE.js","sources":["../src/provider/AthenaContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { AthenaTransport } from '../runtime/transport';\nimport type { AthenaProviderConfig } from './config';\nimport type { AthenaCitationLinkOptions, AthenaLinkClickOptions } from './citation-links';\n\nexport interface AthenaConfig extends Pick<AthenaProviderConfig, 'apiKey' | 'token'> {\n backendUrl: string;\n appUrl: string;\n enabledToolkits: string[];\n /** Effective chat transport — the lane the provider actually mounted (the\n * SDK defaults to 'statewire'; see `DEFAULT_ATHENA_TRANSPORT`). Optional\n * only so hand-built `AthenaConfig` literals keep compiling; capability\n * gates treat an absent value as the conservative legacy lane (e.g.\n * `allowsMidRunSend(undefined)` is false). */\n transport?: AthenaTransport;\n linkClicks?: AthenaLinkClickOptions;\n citationLinks?: AthenaCitationLinkOptions;\n}\n\nexport const AthenaContext = createContext<AthenaConfig | null>(null);\n\nexport function useAthenaConfig(): AthenaConfig {\n const ctx = useContext(AthenaContext);\n if (!ctx) {\n throw new Error('[AthenaSDK] useAthenaConfig must be used within <AthenaProvider>');\n }\n return ctx;\n}\n"],"names":[],"mappings":";AAmBO,MAAM,gBAAgB,cAAmC,IAAI;AAE7D,SAAS,kBAAgC;AAC9C,QAAM,MAAM,WAAW,aAAa;AACpC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,kEAAkE;AAAA,EACpF;AACA,SAAO;AACT;"}
1
+ {"version":3,"file":"AthenaContext-MOslgOmE.js","sources":["../src/provider/AthenaContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { AthenaProviderConfig } from './config';\nimport type { AthenaCitationLinkOptions, AthenaLinkClickOptions } from './citation-links';\n\nexport interface AthenaConfig extends Pick<AthenaProviderConfig, 'apiKey' | 'token'> {\n backendUrl: string;\n appUrl: string;\n enabledToolkits: string[];\n linkClicks?: AthenaLinkClickOptions;\n citationLinks?: AthenaCitationLinkOptions;\n}\n\nexport const AthenaContext = createContext<AthenaConfig | null>(null);\n\nexport function useAthenaConfig(): AthenaConfig {\n const ctx = useContext(AthenaContext);\n if (!ctx) {\n throw new Error('[AthenaSDK] useAthenaConfig must be used within <AthenaProvider>');\n }\n return ctx;\n}\n"],"names":[],"mappings":";AAYO,MAAM,gBAAgB,cAAmC,IAAI;AAE7D,SAAS,kBAAgC;AAC9C,QAAM,MAAM,WAAW,aAAa;AACpC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,kEAAkE;AAAA,EACpF;AACA,SAAO;AACT;"}
@@ -1,17 +1,13 @@
1
1
  import type { FC } from 'react';
2
2
  /**
3
- * Dismissible transport-error banner for statewire mode: send rejections,
4
- * paywall refusals, and command failures that would otherwise vanish into
5
- * the console after the composer already cleared. Renders nothing on the
6
- * legacy transport.
3
+ * Dismissible transport-error banner: send rejections (including the
4
+ * pre-cutover-thread dispatch fence's 409), paywall refusals, and command
5
+ * failures that would otherwise vanish into the console after the composer
6
+ * already cleared. Renders nothing outside `AthenaProvider`.
7
7
  */
8
8
  export declare const StatewireErrorBanner: FC;
9
9
  /**
10
10
  * Degraded-connection strip: shown only while the statewire channel is
11
- * reconnecting or gone, with a manual reconnect affordance when the
12
- * transport exposes one. Healthy states render nothing.
11
+ * degraded, with a manual reconnect affordance when the transport exposes one.
13
12
  */
14
13
  export declare const StatewireConnectionBanner: FC;
15
- /** Read-only notice for pre-cutover threads whose history lives under the
16
- * legacy runtime; the server fences dispatch into them. */
17
- export declare const StatewireLegacyReadOnlyBanner: FC;
@@ -36,3 +36,6 @@ export { UserEditComposer } from "./messages/user-edit-composer";
36
36
  export { MessageActionsReadOnlyProvider, useMessageActionsReadOnly, } from "./messages/message-actions-config";
37
37
  export { TextShimmerLoader, ThreadRunningIndicator, } from "./messages/running-indicator";
38
38
  export { SignInCard, SignInConsent, SignInFallbackSection, SignInSecondaryButton, SignInSelect, SignInTextField, } from "./auth/sign-in-card";
39
+ export { RuntimeMessageCard, type RuntimeMessageCardProps } from "./messages/runtime-message";
40
+ export { ContinuePill } from "./messages/continue-pill";
41
+ export { StatewireContinueRunAffordance, StatewireContinueRunButton, type StatewireContinueRunButtonProps, StatewireRunEndedFooter, type StatewireRunEndedFooterProps, } from "./messages/statewire-continue-run";
@@ -20,6 +20,30 @@ export declare function fetchGraphQL<T = any>(auth: MentionAuthContext, query: s
20
20
  export declare const SIMPLE_SEARCH_QUERY = "\n query SimpleSearch($input: SimpleSearchRequestInput!) {\n simpleSearch(input: $input) {\n assets {\n \n id\n title\n athenaOriginalType\n athenaConvertedType\n parentFolderId\n updatedAt\n isFavorited\n isArchived\n isHidden\n\n }\n totalCount\n }\n }\n";
21
21
  export declare const PAGINATED_ASSETS_QUERY = "\n query GetPaginatedAssetsForWorkspace(\n $limit: Int!\n $offset: Int!\n $parentFolderId: String\n $filterTypes: [String!]\n $filterColumns: ColumnFilter\n ) {\n getPaginatedAssetsForWorkspace(\n limit: $limit\n offset: $offset\n parentFolderId: $parentFolderId\n filterTypes: $filterTypes\n filterColumns: $filterColumns\n ) {\n \n id\n title\n athenaOriginalType\n athenaConvertedType\n parentFolderId\n updatedAt\n isFavorited\n isArchived\n isHidden\n\n }\n }\n";
22
22
  export declare const WORKSPACE_MEMBERS_QUERY = "\n query GetUsersInWorkspace($workspaceId: String!) {\n getUsersInWorkspace(workspaceId: $workspaceId) {\n id\n email\n firstName\n lastName\n isAdmin\n avatarUrl\n }\n }\n";
23
+ export declare const TOOL_CATALOG_QUERY = "\n query MentionToolCatalog {\n getToolkitToToolsMapping {\n tools {\n id\n name\n description\n icon\n adminOnly\n isMentionable\n }\n toolkits {\n name\n displayName\n description\n icon\n onlyAdmin\n hideFromMenu\n isMentionable\n }\n }\n }\n";
24
+ export interface ToolCatalogTool {
25
+ id: string;
26
+ name: string;
27
+ description: string | null;
28
+ icon: string;
29
+ adminOnly: boolean;
30
+ isMentionable: boolean;
31
+ }
32
+ export interface ToolCatalogToolkit {
33
+ name: string;
34
+ displayName: string;
35
+ description: string;
36
+ icon: string;
37
+ onlyAdmin: boolean;
38
+ hideFromMenu: boolean;
39
+ isMentionable: boolean;
40
+ }
41
+ export interface ToolCatalogResult {
42
+ getToolkitToToolsMapping: {
43
+ tools: ToolCatalogTool[];
44
+ toolkits: ToolCatalogToolkit[];
45
+ };
46
+ }
23
47
  export interface AssetResult {
24
48
  id: string;
25
49
  title: string | null;
@@ -49,6 +49,11 @@ export interface TeamConfig {
49
49
  auth: MentionAuthContext;
50
50
  }
51
51
  export declare const fetchTeam: SourceFn<TeamConfig>;
52
+ export interface ToolCatalogConfig {
53
+ auth: MentionAuthContext;
54
+ }
55
+ export declare const fetchTools: SourceFn<ToolCatalogConfig>;
56
+ export declare const fetchToolkits: SourceFn<ToolCatalogConfig>;
52
57
  export interface DrivesConfig {
53
58
  auth: MentionAuthContext;
54
59
  }
@@ -21,7 +21,7 @@ export type MentionSuggestionsStore = Store<MentionSuggestionsStoreState>;
21
21
  /**
22
22
  * All mention menu categories, in display order.
23
23
  */
24
- export declare const ROOT_MENTION_CATEGORIES: readonly ["favorites", "assets", "projects", "browse_profiles", "folders", "team", "drives"];
24
+ export declare const ROOT_MENTION_CATEGORIES: readonly ["favorites", "assets", "projects", "browse_profiles", "folders", "tools", "toolkits", "team", "drives"];
25
25
  export type MentionRootCategory = (typeof ROOT_MENTION_CATEGORIES)[number];
26
26
  /**
27
27
  * Creates a stable MentionSuggestionsStore.
@@ -0,0 +1,13 @@
1
+ import { type FC } from "react";
2
+ /**
3
+ * Shared Continue action for recoverable chat states.
4
+ *
5
+ * The dispatch waits for the exit animation to paint. If the owning runtime
6
+ * does not leave the recoverable state (for example, the command is rejected),
7
+ * the control resets so the user can try again.
8
+ */
9
+ export declare const ContinuePill: FC<{
10
+ onClick: () => void;
11
+ ariaLabel: string;
12
+ dataTestId?: string;
13
+ }>;
@@ -1,6 +1,6 @@
1
1
  import { type ToolCallMessagePartComponent } from "@assistant-ui/react";
2
2
  import "@assistant-ui/react-markdown/styles/dot.css";
3
- import type { ButtonHTMLAttributes, FC, ReactNode } from "react";
3
+ import { type ButtonHTMLAttributes, type FC, type ReactNode } from "react";
4
4
  import type { ComposerAction } from "../composer/composer-action";
5
5
  export declare function IconButton({ children, tooltip, className, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
6
6
  tooltip: string;
@@ -22,12 +22,17 @@ export interface CreateAssistantMessageOptions {
22
22
  * timelines supply their own; the default renders markdown and tool cards.
23
23
  */
24
24
  content?: FC;
25
+ /**
26
+ * Inline affordance rendered inside a runtime-ending card (e.g. a Continue
27
+ * button). Hosts without one leave it unset.
28
+ */
29
+ runtimeMessageAction?: ReactNode;
25
30
  }
26
31
  /**
27
32
  * Builds the assistant bubble. Call this once per host (memoized on its
28
33
  * inputs) so the returned component identity stays stable across renders.
29
34
  */
30
- export declare function createAssistantMessage({ toolFallback, extraActions, content: Content, }: CreateAssistantMessageOptions): FC;
35
+ export declare function createAssistantMessage({ toolFallback, extraActions, content: Content, runtimeMessageAction, }: CreateAssistantMessageOptions): FC;
31
36
  /** Panel chrome: the thread card and the header row that sits inside it. */
32
37
  export declare const THREAD_PANEL_CLASS = "m-1 flex min-h-0 flex-1 flex-col overflow-hidden rounded-[18px] border border-dashed border-amber-500 bg-background shadow-[0_1px_10px_rgba(54,45,33,0.08)]";
33
38
  export declare const THREAD_HEADER_CLASS = "flex items-center justify-between gap-2 px-3 py-2";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared DOM rendering for a runtime ending (see
3
+ * `@athenaintel/agent-runtime`'s `runtime-messages.ts`): the status row for a
4
+ * stop / pause / failure, and the banner that frames a handoff summary. Hosts
5
+ * that build their assistant row with `createAssistantMessage` get these for
6
+ * free; hosts with their own row (Olympus, mobile) render their own presenter
7
+ * from the same {@link AthenaRuntimeMessage} so the taxonomy cannot drift.
8
+ */
9
+ import { type AthenaRuntimeMessage } from "@athenaintel/agent-runtime";
10
+ import type { FC, ReactNode } from "react";
11
+ export interface RuntimeMessageCardProps {
12
+ message: AthenaRuntimeMessage;
13
+ /** An inline affordance (e.g. a Continue button) rendered inside the card. */
14
+ action?: ReactNode;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * The status row for a runtime ending. For `stopped` / `paused` / `failed` it
19
+ * replaces the assistant bubble; for `handoff` it sits above the closing
20
+ * summary, which keeps rendering as ordinary prose.
21
+ */
22
+ export declare const RuntimeMessageCard: FC<RuntimeMessageCardProps>;
@@ -0,0 +1,41 @@
1
+ import type { ReactElement } from "react";
2
+ export interface StatewireContinueRunButtonProps {
3
+ /**
4
+ * Also offer Continue while the thread projects `ready`. An old snapshot
5
+ * can report a resting thread whose last persisted ending is still
6
+ * continuable; the marker row that mounts this button knows that.
7
+ */
8
+ allowReadyFallback?: boolean;
9
+ }
10
+ /**
11
+ * Dispatches the bare `run/continue` for the live Statewire thread — the
12
+ * heal-then-continue recovery for stopped, errored, and pod-drained runs. The
13
+ * command is exactly what the library's `onResume` emits, so it inherits the
14
+ * optimistic running-flip (the pill unmounts once the dispatch is accepted)
15
+ * and routes rejections to the runtime's shared `onError` policy.
16
+ *
17
+ * Requires `capabilities.continue` on the host thread and a statewire aui
18
+ * scope (throws outside one, like every `useStatewire*` hook).
19
+ */
20
+ export declare function StatewireContinueRunButton({ allowReadyFallback, }?: StatewireContinueRunButtonProps): ReactElement | null;
21
+ /**
22
+ * Recovery affordance for the latest persisted stopped/failed run marker,
23
+ * for the `runtimeMessageAction` slot of `createAssistantMessage`.
24
+ *
25
+ * Marker messages remain in history forever, so only the current last message
26
+ * may continue. The extras guard keeps Statewire hooks out of read-only or
27
+ * legacy runtimes where they would throw.
28
+ */
29
+ export declare function StatewireContinueRunAffordance(): ReactElement | null;
30
+ export interface StatewireRunEndedFooterProps {
31
+ /** Merged onto the recovery card's default classes. */
32
+ className?: string;
33
+ }
34
+ /**
35
+ * Recovery row for a settled run whose persisted ending is no longer the
36
+ * transcript tail — rendered after the messages (`renderMessages`). Rewinds,
37
+ * compaction, and older snapshots can all leave the durable run state
38
+ * recoverable without a marker row that owns the action. Renders nothing on
39
+ * legacy (non-statewire) threads.
40
+ */
41
+ export declare function StatewireRunEndedFooter({ className, }?: StatewireRunEndedFooterProps): ReactElement | null;
@@ -23,7 +23,7 @@ export interface ChatComposerDockProps {
23
23
  editor: ReactNode;
24
24
  /** Toolbar contents before the spacer (attach buttons, pickers). */
25
25
  toolbarStart?: ReactNode;
26
- /** Toolbar contents after the spacer (voice, capture, send/stop). */
26
+ /** Toolbar contents after the spacer (voice and send/stop controls). */
27
27
  toolbarEnd: ReactNode;
28
28
  }
29
29
  /**