@athenaintel/react 0.42.1 → 0.43.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 (147) hide show
  1. package/README.md +46 -7
  2. package/dist/agent-runtime/src/conversation-list-groups.d.ts +74 -0
  3. package/dist/agent-runtime/src/index.d.ts +3 -2
  4. package/dist/agent-runtime/src/messages.cjs +38 -7
  5. package/dist/agent-runtime/src/messages.cjs.map +1 -1
  6. package/dist/agent-runtime/src/messages.d.ts +26 -8
  7. package/dist/agent-runtime/src/messages.js +38 -7
  8. package/dist/agent-runtime/src/messages.js.map +1 -1
  9. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +10 -0
  10. package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
  11. package/dist/agent-runtime/src/quota-safe-local-storage-session.d.ts +7 -0
  12. package/dist/agent-runtime/src/quota-safe-local-storage-session.js +10 -0
  13. package/dist/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
  14. package/dist/agent-runtime/src/session-lane-scope.cjs +25 -0
  15. package/dist/agent-runtime/src/session-lane-scope.cjs.map +1 -0
  16. package/dist/agent-runtime/src/session-lane-scope.d.ts +59 -0
  17. package/dist/agent-runtime/src/session-lane-scope.js +25 -0
  18. package/dist/agent-runtime/src/session-lane-scope.js.map +1 -0
  19. package/dist/agent-runtime/src/subagent-transcripts.cjs +2 -2
  20. package/dist/agent-runtime/src/subagent-transcripts.cjs.map +1 -1
  21. package/dist/agent-runtime/src/subagent-transcripts.d.ts +2 -2
  22. package/dist/agent-runtime/src/subagent-transcripts.js +3 -3
  23. package/dist/agent-runtime/src/subagent-transcripts.js.map +1 -1
  24. package/dist/agent-runtime/src/tool-metadata.cjs +0 -8
  25. package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
  26. package/dist/agent-runtime/src/tool-metadata.js +0 -8
  27. package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
  28. package/dist/agent-runtime/src/tool-names.cjs +4 -0
  29. package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
  30. package/dist/agent-runtime/src/tool-names.d.ts +7 -0
  31. package/dist/agent-runtime/src/tool-names.js +4 -0
  32. package/dist/agent-runtime/src/tool-names.js.map +1 -1
  33. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +18 -1
  34. package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
  35. package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +19 -10
  36. package/dist/agent-runtime/src/use-deep-agent-runtime.js +19 -2
  37. package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
  38. package/dist/agent-runtime/src/use-deep-agent-thread.cjs +28 -10
  39. package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  40. package/dist/agent-runtime/src/use-deep-agent-thread.d.ts +35 -3
  41. package/dist/agent-runtime/src/use-deep-agent-thread.js +28 -10
  42. package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
  43. package/dist/agent-runtime/src/use-deep-agent-voice.cjs +50 -15
  44. package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -1
  45. package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +8 -0
  46. package/dist/agent-runtime/src/use-deep-agent-voice.js +50 -15
  47. package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -1
  48. package/dist/agent-runtime/src/voice-presentation.cjs +2 -0
  49. package/dist/agent-runtime/src/voice-presentation.cjs.map +1 -1
  50. package/dist/agent-runtime/src/voice-presentation.js +2 -0
  51. package/dist/agent-runtime/src/voice-presentation.js.map +1 -1
  52. package/dist/catalog/runtime-catalog.js +1 -1
  53. package/dist/chat/AthenaChat.cjs +125 -103
  54. package/dist/chat/AthenaChat.cjs.map +1 -1
  55. package/dist/chat/AthenaChat.d.ts +9 -0
  56. package/dist/chat/AthenaChat.js +126 -104
  57. package/dist/chat/AthenaChat.js.map +1 -1
  58. package/dist/chat/chat-voice-controls.cjs +128 -0
  59. package/dist/chat/chat-voice-controls.cjs.map +1 -0
  60. package/dist/chat/chat-voice-controls.d.ts +19 -0
  61. package/dist/chat/chat-voice-controls.js +128 -0
  62. package/dist/chat/chat-voice-controls.js.map +1 -0
  63. package/dist/chat/super-grouping/SuperGroupingCard.cjs +8 -2
  64. package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
  65. package/dist/chat/super-grouping/SuperGroupingCard.d.ts +6 -1
  66. package/dist/chat/super-grouping/SuperGroupingCard.js +8 -2
  67. package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
  68. package/dist/chat/super-grouping/ToolTimeline.cjs +27 -0
  69. package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
  70. package/dist/chat/super-grouping/ToolTimeline.d.ts +5 -1
  71. package/dist/chat/super-grouping/ToolTimeline.js +27 -0
  72. package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
  73. package/dist/chat/super-grouping/index.d.ts +1 -0
  74. package/dist/chat/super-grouping/timeline-step.cjs +61 -2
  75. package/dist/chat/super-grouping/timeline-step.cjs.map +1 -1
  76. package/dist/chat/super-grouping/timeline-step.d.ts +13 -1
  77. package/dist/chat/super-grouping/timeline-step.js +61 -2
  78. package/dist/chat/super-grouping/timeline-step.js.map +1 -1
  79. package/dist/chat/use-statewire-approval-request.js +1 -1
  80. package/dist/chat-ui/composer/tiptap-composer.cjs +42 -22
  81. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  82. package/dist/chat-ui/composer/tiptap-composer.d.ts +1 -0
  83. package/dist/chat-ui/composer/tiptap-composer.js +43 -23
  84. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  85. package/dist/chat-ui/mentions/mention-chip.cjs +144 -35
  86. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
  87. package/dist/chat-ui/mentions/mention-chip.d.ts +17 -1
  88. package/dist/chat-ui/mentions/mention-chip.js +146 -37
  89. package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
  90. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +2 -1
  91. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
  92. package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +3 -1
  93. package/dist/chat-ui/mentions/suggestions/data/api-client.js +2 -1
  94. package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -1
  95. package/dist/chat-ui/mentions/use-account-workspace-id.cjs +29 -51
  96. package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -1
  97. package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +2 -2
  98. package/dist/chat-ui/mentions/use-account-workspace-id.js +30 -52
  99. package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -1
  100. package/dist/chat-ui/mentions/use-mention-asset.cjs +140 -0
  101. package/dist/chat-ui/mentions/use-mention-asset.cjs.map +1 -0
  102. package/dist/chat-ui/mentions/use-mention-asset.d.ts +16 -0
  103. package/dist/chat-ui/mentions/use-mention-asset.js +140 -0
  104. package/dist/chat-ui/mentions/use-mention-asset.js.map +1 -0
  105. package/dist/chat-ui/rich-text/chat-link.cjs +5 -4
  106. package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -1
  107. package/dist/chat-ui/rich-text/chat-link.d.ts +2 -3
  108. package/dist/chat-ui/rich-text/chat-link.js +6 -5
  109. package/dist/chat-ui/rich-text/chat-link.js.map +1 -1
  110. package/dist/chat-ui/rich-text/chat-node-views.cjs +1 -0
  111. package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
  112. package/dist/chat-ui/rich-text/chat-node-views.js +1 -0
  113. package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -1
  114. package/dist/chat-ui/thread/composer-send-or-stop.cjs +2 -1
  115. package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -1
  116. package/dist/chat-ui/thread/composer-send-or-stop.d.ts +2 -0
  117. package/dist/chat-ui/thread/composer-send-or-stop.js +2 -1
  118. package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -1
  119. package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
  120. package/dist/diagnostics/athena-diagnostics.d.ts +1 -1
  121. package/dist/diagnostics/athena-diagnostics.js.map +1 -1
  122. package/dist/index.d.ts +1 -1
  123. package/dist/react/package.json.cjs +1 -1
  124. package/dist/react/package.json.js +1 -1
  125. package/dist/references/src/tool-option-schemas.d.ts +0 -34
  126. package/dist/runtime/statewire-session-key.cjs.map +1 -1
  127. package/dist/runtime/statewire-session-key.d.ts +8 -5
  128. package/dist/runtime/statewire-session-key.js.map +1 -1
  129. package/dist/runtime/useAthenaStatewireRuntime.cjs +5 -2
  130. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  131. package/dist/runtime/useAthenaStatewireRuntime.js +5 -2
  132. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  133. package/dist/styles.css +1 -1
  134. package/dist/threads/statewire-thread-list.cjs +6 -2
  135. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  136. package/dist/threads/statewire-thread-list.js +6 -2
  137. package/dist/threads/statewire-thread-list.js.map +1 -1
  138. package/dist/tools/tool-summary.cjs +0 -2
  139. package/dist/tools/tool-summary.cjs.map +1 -1
  140. package/dist/tools/tool-summary.js +0 -2
  141. package/dist/tools/tool-summary.js.map +1 -1
  142. package/dist/voice/use-chat-voice-enabled.cjs +43 -0
  143. package/dist/voice/use-chat-voice-enabled.cjs.map +1 -0
  144. package/dist/voice/use-chat-voice-enabled.d.ts +9 -0
  145. package/dist/voice/use-chat-voice-enabled.js +43 -0
  146. package/dist/voice/use-chat-voice-enabled.js.map +1 -0
  147. package/package.json +4 -8
package/README.md CHANGED
@@ -245,11 +245,14 @@ A `getToken` resolver is called with `{ force: true }` right after the sync
245
245
  host refuses a credential, so a caching getter must mint a fresh token then;
246
246
  the persisted command lane is scoped to the signed-in user as well as the
247
247
  host, so a shared browser never resends one user's pending sends under the
248
- next user's token. While a sign-in provider above the chat is still loading
249
- who is signed in (`AthenaAuthContext` with `isLoading: true` and no `user`
250
- yet), the chat does not connect and stores nothing: it connects once, under
251
- the signed-in user, when they are known, and sends made meanwhile wait for
252
- that.
248
+ next user's token. That holds while the chat stays mounted too: when the
249
+ signed-in user changes under it, the chat reconnects on the new user's lane as
250
+ a new client, and what the previous user had not yet delivered waits under
251
+ their name for their next sign-in. While a sign-in provider above the chat is
252
+ still loading who is signed in (`AthenaAuthContext` with `isLoading: true` and
253
+ no `user` yet), the chat does not connect and stores nothing: it connects
254
+ once, under the signed-in user, when they are known, and sends made meanwhile
255
+ wait for that.
253
256
 
254
257
  What the statewire transport wires up in `AthenaChat`:
255
258
 
@@ -737,12 +740,32 @@ registry entries (`SESSION_WORKBENCH_TASKS_PANE`, …), the data hooks
737
740
  (`deriveShellRows`, `filterShellRows`, `deriveTaskSteps`, `taskProgress`,
738
741
  `workspaceComputers`) are exported for hosts composing their own.
739
742
 
743
+ ## Chat voice in AthenaChat
744
+
745
+ `AthenaChat` includes realtime voice alongside dictation where the deployment
746
+ and workspace enable it. Start with the headphones button; during a call it
747
+ mutes or unmutes the microphone, and the voice strip ends the call. Plain typed
748
+ messages join the live conversation. Attachments and quotes keep their normal
749
+ run queue, and a refused voice text send falls back to that queue.
750
+
751
+ The composer owns one shared voice controller and lazy LiveKit adapter. A
752
+ pending connection can be cancelled, and unmount, a changed account/environment,
753
+ or revoked voice access releases the microphone. Dictation and realtime voice
754
+ cannot capture together. Model, agent, mode and toolkit changes sync through the
755
+ same model context for the next delegated task.
756
+
757
+ Use `<AthenaChat voice={false} />` to omit realtime voice in a host that cannot
758
+ support it, or `voice={{ model: 'gemini-3.8-live' }}` to request a host-offered
759
+ voice model. A custom `livekit` adapter and `onDiagnostic` observer are accepted
760
+ in the same options. `readOnly` chats expose no voice controls. This UI uses the
761
+ server's voice access decision; it cannot override workspace or deployment policy.
762
+
740
763
  ## Chat voice media (`@athenaintel/react/voice/livekit`)
741
764
 
742
765
  Hosts using the shared agent runtime can use the SDK's browser LiveKit adapter
743
766
  for chat voice. The runtime owns the voice commands and transcript; the adapter
744
767
  joins the authorized room, publishes the microphone and plays the agent audio.
745
- Install the optional `livekit-client` peer before starting a session.
768
+ The SDK includes `livekit-client` at the shared runtime version; its media code loads only when a session starts.
746
769
 
747
770
  ```tsx
748
771
  import { useMemo, useRef } from 'react';
@@ -784,7 +807,7 @@ agent audio, live/interim transcript turns, reconnects, StrictMode-safe
784
807
  teardown — so an app is a `start()` button and a transcript list.
785
808
 
786
809
  ```bash
787
- bun add @athenaintel/react livekit-client # optional peer dep, only needed for voice
810
+ bun add @athenaintel/react
788
811
  ```
789
812
 
790
813
  ```tsx
@@ -860,6 +883,22 @@ Both use the same bearer / API key as session creation. The full recipe
860
883
  template skill `voice-session-guide.md`. `createAthenaVoiceSession` is also
861
884
  exported if you hold the bridge state yourself.
862
885
 
886
+ ## What's new in 0.43.0
887
+
888
+ **Asset and citation chips look and read like Olympus's.** A chip is now Olympus's mention pill in your theme's colours (grey on the default theme, still legible on a dark one): the asset's icon, its name, then the cited place in brackets (`Q4 report [p.5]`). Like Olympus's chips, it looks the asset up and shows the asset's own title and its type's icon instead of the link's label and `type=`. The lookup is agora's `getAssetsByIds` with the chat's credentials, which returns only the assets the viewer may read. Chips that render together ask in one request. Each answer is cached for a minute per backend and per signed-in person or API key (TanStack Query, on the host's `QueryClient` when there is one); a credential that names neither shares nothing beyond its own chat. Until the answer arrives, and for an asset the viewer may not read, the chip keeps the link's label and `type=`. A chip asks only where the answer changes it: never for a repository file's catalog (the chip reads as the file either way) or for a session (agora would read its whole row, transcript ledgers included). A chip with no credential to send (no token, API key or session cookie) asks for nothing.
889
+
890
+ **A repository file citation reads as the file and its lines, with GitHub's mark.** A citation of a GitHub repository's lines (`type=catalog&anchor=file_line_range`) now reads `route.ts:18-24` whatever label the model wrote: the repository's name, a long path, or a label in backticks. A long file name shortens before its lines do. The tooltip carries what the chip leaves out: the model's label when it says something else, the repository, the whole path and the cited passage.
891
+
892
+ **A place is drawn once.** A label that already ends with its place (`Q4 report p.5`, `olympus/…/route.ts:18-24`) is no longer followed by the place again. Nothing to change in your app.
893
+
894
+ Also first on npm in 0.43.0 (0.42.3 was tagged, not published): an asset link whose text markdown split shows its text, not `[object Object]` (#48739); a new chat's title poll waits for a session-list read already in flight (#48730); shared voice commands are scoped to their call (#48761).
895
+
896
+ ## What's new in 0.42.2
897
+
898
+ **A message one signed-in user queued is never sent as the next user who signs in to the same chat.** The chat keeps each conversation's unconfirmed commands in this browser under the signed-in user, so a reload can resend them. When the signed-in user changed while the chat stayed mounted (a sign-in provider of your own that signs a signed-out person in, or `AthenaSSOProvider` with `revalidateOnWindowFocus` picking up another account), the conversation moved to the new user's key and took the previous user's client id, command numbers and unsent commands with it. A message the previous user sent while offline, or that had not yet reached Athena, could then go out on the new user's connection, as the new user. With the chat connected at the time, the reverse happened: the new user's messages went out on the connection the previous user had opened, and Athena ran them as the previous user.
899
+
900
+ The chat now treats a change of signed-in user as a new conversation session. It reconnects on the new user's own key as a new client, and loads the conversation again as that user instead of showing the previous user's copy of it. Nothing the previous user queued goes with it. What they had not yet delivered stays under their key in this browser: it goes out, as them, when they sign in to the chat again, and the usual 7-day retention removes it otherwise. A token refresh for the same user changes nothing. 0.42.1 and earlier carry the previous user's pending commands over to the next user. Nothing to change in your app.
901
+
863
902
  ## What's new in 0.42.1
864
903
 
865
904
  **A chat that mounts before your sign-in provider knows who is signed in no longer resends old commands, and no longer loses what was sent meanwhile.** The chat keeps each conversation's unconfirmed commands in this browser under the signed-in user, so a reload can resend them. A sign-in provider of your own that renders the chat while it is still loading (`AthenaAuthContext` with `isLoading: true`) put the conversation under an anonymous key first. When the user loaded, the conversation moved to their key and took the anonymous record's client id and command numbers with it, and the anonymous record stayed behind with the same id. Every later page load read that record first and resent its commands below the numbers Athena had already taken, so Athena refused them as expired. A message sent before the user loaded went into a conversation that could not keep it.
@@ -0,0 +1,74 @@
1
+ import { type ConversationAttention } from "./conversation-list";
2
+ /**
3
+ * Pure rules behind the session-list rows' attention affordances: Olympus's
4
+ * Sessions pane and Recent Conversations dropdown and Midas's sessions sidebar
5
+ * render the same indicator, next-action line and group placement from these,
6
+ * so the render tests stay thin and the surfaces cannot disagree
7
+ * (`docs/SESSIONS_LIST_GUIDE.md`, "Session attention").
8
+ */
9
+ /** The fields a row needs to answer every rule here; a subset of `ConversationItem`. */
10
+ export interface ConversationAttentionInput {
11
+ attention?: ConversationAttention | null;
12
+ runStatus: string | null;
13
+ sessionStatus: string | null;
14
+ state?: string | null;
15
+ nextAction?: string | null;
16
+ isFavorited?: boolean;
17
+ isUnread: boolean;
18
+ updatedAt: string;
19
+ }
20
+ /**
21
+ * The server-derived attention when the transport reports one Olympus knows,
22
+ * else the shared client fallback from the status planes — so a row from an
23
+ * older backend still reads `needs_you` on a human gate and `error` on a
24
+ * failed run.
25
+ */
26
+ export declare function resolveConversationAttention(conversation: Pick<ConversationAttentionInput, "attention" | "runStatus" | "sessionStatus" | "state">): ConversationAttention | null;
27
+ /**
28
+ * The one indicator a row shows, in precedence order: a pending action for
29
+ * the viewer beats a live run, which beats the unread dot, which beats
30
+ * "waiting on someone else", which beats a terminal error. `running` is the
31
+ * caller's resolved running state (the live stream signal wins for the open
32
+ * thread), not the attention field, so the spinner keeps today's behaviour.
33
+ */
34
+ export type ConversationAttentionIndicator = "needs_you" | "running" | "unread" | "watching" | "error" | null;
35
+ export declare function conversationAttentionIndicator({ attention, isRunning, isUnread, }: {
36
+ attention: ConversationAttention | null;
37
+ isRunning: boolean;
38
+ isUnread: boolean;
39
+ }): ConversationAttentionIndicator;
40
+ /** Tone of the next-action line, named after the design tokens that paint it. */
41
+ export type ConversationNextActionTone = "warning" | "success" | "muted" | "destructive";
42
+ export interface ConversationNextAction {
43
+ text: string;
44
+ tone: ConversationNextActionTone;
45
+ }
46
+ /**
47
+ * The row's second line when the server derived a next step: the text as
48
+ * sent (already ≤ 80 characters), toned by what the session asks — orange
49
+ * for `needs_you`, green for `ready`, red for `error`, muted otherwise.
50
+ * `null` when there is nothing to do, so the row shows its timestamp.
51
+ */
52
+ export declare function conversationNextAction({ attention, nextAction, }: {
53
+ attention: ConversationAttention | null;
54
+ nextAction?: string | null;
55
+ }): ConversationNextAction | null;
56
+ export type ConversationTimeGroup = "Today" | "Yesterday" | "This Week" | "This Month" | "Older";
57
+ /**
58
+ * Where a row lands in the Sessions pane: sessions that need the viewer
59
+ * first, then the viewer's pinned sessions, then everything else by when it
60
+ * last changed. A row appears once, in the FIRST group that applies.
61
+ */
62
+ export type ConversationListGroup = "Needs you" | "Pinned" | ConversationTimeGroup;
63
+ export declare const CONVERSATION_LIST_GROUP_ORDER: readonly ConversationListGroup[];
64
+ export declare function conversationTimeGroup(dateStr: string, now?: Date): ConversationTimeGroup;
65
+ export declare function conversationListGroupOf(conversation: ConversationAttentionInput, now?: Date): ConversationListGroup;
66
+ export interface ConversationListSection<T extends ConversationAttentionInput> {
67
+ group: ConversationListGroup;
68
+ items: T[];
69
+ }
70
+ /**
71
+ * Sections in display order; empty groups are omitted and the list's own
72
+ * newest-first order is kept within each group.
73
+ */
74
+ export declare function groupConversationsForList<T extends ConversationAttentionInput>(conversations: readonly T[], now?: Date): ConversationListSection<T>[];
@@ -4,6 +4,7 @@ export { CLIENT_TOOL_INTERRUPT_SOURCE, clientToolCallArgs, type ClientToolCached
4
4
  export { CLIENT_TOOL_WRITE_DECLINED_MESSAGE, type ClientToolBridgeTool, type ClientToolCallSettledEvent, clientToolClaimKey, type ClientToolWriteConsentDecision, defaultMissingClientToolMessage, executeClientToolBatch, type ExecuteClientToolBatchOptions, isPendingClientToolRequest, jsonSafeClientToolResult, useStatewireClientToolBridge, type UseStatewireClientToolBridgeOptions, } from "./client-tool-bridge";
5
5
  export { conversationIndexFingerprint, conversationIndexId, conversationIndexUrlFromStatewireUrl, type ConversationIndexEntry, type ConversationWatchActivity, useConversationIndex, type UseConversationIndexOptions, type UseConversationIndexResult, watchActivityFingerprint, } from "./conversation-index";
6
6
  export { cancelConversationListCaches, CONVERSATION_ATTENTIONS, CONVERSATION_LIST_DEFAULT_SCOPE_KEY, CONVERSATION_LIST_QUERY_KEY_ROOT, type ConversationAttention, type ConversationAttentionSource, type ConversationListFetcher, type ConversationListFetchParams, type ConversationListFilter, type ConversationListPage, conversationListFilterKey, conversationListQueryKeys, type ConversationPullRequest, type ConversationSummary, type ConversationWake, deriveConversationAttention, invalidateConversationListCaches, isConversationRunning, mergeConversationIndexIntoPage, mergeConversationPages, normalizeConversationListFilter, patchConversationListCaches, patchConversationsInPage, prependConversationToPage, removeConversationFromListCaches, removeConversationFromPage, summaryFromConversationIndexEntry, } from "./conversation-list";
7
+ export { CONVERSATION_LIST_GROUP_ORDER, type ConversationAttentionIndicator, type ConversationAttentionInput, type ConversationListGroup, type ConversationListSection, type ConversationNextAction, type ConversationNextActionTone, type ConversationTimeGroup, conversationAttentionIndicator, conversationListGroupOf, conversationNextAction, conversationTimeGroup, groupConversationsForList, resolveConversationAttention, } from "./conversation-list-groups";
7
8
  export { CATEGORY_EMOJI, defaultToolDisplayMeta, describeDelegation, describeNamed, describePackage, describePath, describeQuery, describeRange, describeSql, describeTable, describeToolArgs, describeUrl, formatToolName, getCategoryEmoji, getToolDisplayMeta, hasToolDisplayMeta, isInlineTool, knownToolNames, TOOL_DISPLAY_META, type ToolArgsDescriber, type ToolCategory, toolActiveLabel, toolCompletedLabel, type ToolDisplayMeta, type ToolDisplayMetaEntry, type ToolIconKey, toolStatusLabel, type ToolStatusLabelState, truncateLine, } from "./tool-metadata";
8
9
  export { classifyToolResult, isRecord, isRejectedToolResult, isToolResultSuccess, parseJsonRecord, readRejectedToolResult, type RejectedToolResult, resultMessage, resultRecord, stringField, type ToolCallStatusLike, toolFailure, type ToolFailure, type ToolResultClassification, type ToolResultState, } from "./tool-result";
9
10
  export { type ConversationListController, useConversationList, type UseConversationListOptions, } from "./use-conversation-list";
@@ -14,7 +15,7 @@ export { type AbandonedInputRequest, type ApprovalResumeLock, asHitlApproval, ca
14
15
  export { buildQueueEditCommand, buildStatewireQueueRows, describeQueueSendFailure, isFailedSendEntryRace, isQueueEntryUnsettled, QUEUE_AUTO_CONTINUE_DELAY_MS, type QueueEditCommand, queueEntryText, queueLaneFlags, type QueueLaneFlags, readPrioritizedQueueIds, showQueueRowSendNow, showQueueRowSteer, type StatewireQueueRow, userStopBlocksQueueAutoContinue, } from "./queue";
15
16
  export { createDeepAgentSendRecovery, type DeepAgentSendRecovery, type DeepAgentSendRecoveryOptions, shouldAutoRetryFailedSend, } from "./send-recovery";
16
17
  export { hasStatewireThreadExtras, readStatewireFailedSendLane, requireStatewireFailedActions, type StatewireFailedActions, type StatewireFailedSendEntry, type StatewireFailedSendLane, } from "./thread-extras";
17
- export { applyRunErrorStatus, ATHENA_ERRORS_KEY, ATHENA_HANDOFF_KEY, ATHENA_QUEUED_LANE_KEY, ATHENA_RUN_MARKER_CANCELLED, ATHENA_RUN_MARKER_FAILED, ATHENA_RUN_MARKER_KEY, ATHENA_RUN_MARKER_SOURCE_KEY, ATHENA_STOP_SOURCE_INSTANCE_CLOSED, ATHENA_STOP_SOURCE_POD_DRAIN, ATHENA_STOP_SOURCE_SEND_NOW, ATHENA_STOP_SOURCE_VOICE_STEER, ATHENA_TERMINATION_REASON_KEY, convertDeepAgentLangChainMessage, convertDeepAgentState, type ConvertDeepAgentStateOptions, createDeepAgentMaterialize, createDeepAgentMessageConversionCache, type DeepAgentConversionMemory, deepAgentMaterialize, type DeepAgentMaterializeOptions, DeepAgentMessageConversionCache, deepAgentRowKey, isConvertibleChatMessage, isDrainRunMarker, isLangGraphState, isMessageHiddenFromFrontend, isQueuedLaneMessage, isServerUpdateStopSource, isSilentRunMarker, laneTailMessages, liftBranchIntoMetadata, liftCompactionBoundaryIntoMetadata, liftConversationStatsIntoMetadata, liftErrorsIntoMetadata, liftHandoffSummaryIntoMetadata, liftModelIntoMetadata, liftRunMarkerIntoMetadata, liftTerminationIntoMetadata, liftToolMessageMetadataIntoArtifact, liftTruncatedToolOutputIntoArtifact, markPreliminaryToolResults, messageConverter, nativeStepUsage, PENDING_ASSISTANT_MESSAGE_ID, readMessageErrorsFromSourceMessages, readRunMarkerFromSourceMessages, readSoleRunMarker, type RunMarkerInfo, sanitizeLangChainMessages, substituteToolOutput, withPendingAssistantMessage, } from "./messages";
18
+ export { applyRunErrorStatus, ATHENA_ERRORS_KEY, ATHENA_HANDOFF_KEY, ATHENA_QUEUED_LANE_KEY, ATHENA_RUN_MARKER_CANCELLED, ATHENA_RUN_MARKER_FAILED, ATHENA_RUN_MARKER_KEY, ATHENA_RUN_MARKER_SOURCE_KEY, ATHENA_STOP_SOURCE_INSTANCE_CLOSED, ATHENA_STOP_SOURCE_POD_DRAIN, ATHENA_STOP_SOURCE_SEND_NOW, ATHENA_STOP_SOURCE_VOICE_STEER, ATHENA_TERMINATION_REASON_KEY, convertDeepAgentLangChainMessage, convertDeepAgentState, type ConvertDeepAgentStateOptions, type DeepAgentMessageConversionOptions, createDeepAgentMaterialize, createDeepAgentMessageConversionCache, type DeepAgentConversionMemory, deepAgentMaterialize, type DeepAgentMaterializeOptions, DeepAgentMessageConversionCache, deepAgentRowKey, isConvertibleChatMessage, isDrainRunMarker, isLangGraphState, isMessageHiddenFromFrontend, isQueuedLaneMessage, isServerUpdateStopSource, isSilentRunMarker, laneTailMessages, liftBranchIntoMetadata, liftCompactionBoundaryIntoMetadata, liftConversationStatsIntoMetadata, liftErrorsIntoMetadata, liftHandoffSummaryIntoMetadata, liftModelIntoMetadata, liftRunMarkerIntoMetadata, liftTerminationIntoMetadata, liftToolMessageMetadataIntoArtifact, liftTruncatedToolOutputIntoArtifact, convertDeepAgentMessage, markPreliminaryToolResults, messageConverter, nativeStepUsage, PENDING_ASSISTANT_MESSAGE_ID, readMessageErrorsFromSourceMessages, readRunMarkerFromSourceMessages, readSoleRunMarker, type RunMarkerInfo, sanitizeLangChainMessages, substituteToolOutput, withPendingAssistantMessage, } from "./messages";
18
19
  export { ATHENA_TRUNCATED_TOOL_OUTPUT_ARTIFACT_KEY, buildHistoryMessageCommand, buildToolOutputCommand, clampMessageWindowSize, type DeepAgentInterestChainEntry, type DeepAgentInterestRequest, type DeepAgentInterestResolution, type DeepAgentMessageWindow, type DeepAgentMessageWindowDeclaration, headInterestRequest, type HistoryMessageCommand, type HistoryMessageResult, interestsCovered, pageInterestRequest, pageInterestRequests, readDeepAgentInterestDocument, readDeepAgentInterestResolution, readDeepAgentMessageWindow, readHistoryMessageResult, readToolOutputResult, readTruncatedToolContent, readTruncatedToolOutputArtifact, type ToolOutputCommand, type ToolOutputResult, type TruncatedToolContent, type TruncatedToolOutputArtifact, withDeclaredMessageWindow, } from "./message-window";
19
20
  export { buildHistoryLaneCommand, type DeepAgentLaneHistoryState, type DeepAgentLaneTarget, deepAgentLaneHistoryQueryKey, type HistoryLaneCommand, type HistoryLanePage, isWholeCardRefusal, mergeLaneHistory, readHistoryLanePage, useDeepAgentLaneHistory, } from "./lane-history";
20
21
  export { buildHistoryLaneImageCommand, type DeepAgentLaneImagesState, deepAgentLaneImageQueryKey, type HistoryLaneImageChunk, type HistoryLaneImageCommand, type InlineImage, type InlineImageChunk, type LaneImageRef, laneImageKey, omittedLaneImages, readChunkedInlineImage, readHistoryLaneImageChunk, readInlineImageChunk, readLaneImage, readLaneImageTile, showLaneImages, useDeepAgentLaneImages, } from "./lane-images";
@@ -34,7 +35,7 @@ export { type CompletedPtcParent, extractCompletedPtcParents, type PtcSubcall, p
34
35
  export { isRunningToolPlaceholder, isRunningToolPlaceholderArtifact, } from "./running-tool-placeholder";
35
36
  export { convertSubagentTranscript, createSubagentLaneConversion, createSubagentTranscriptConversionCache, type SubagentLaneConversion, withLaneReport, withRepeatedResult, } from "./subagent-transcripts";
36
37
  export { countSubagentStatuses, deriveEvalSubagents, finalizeOrphanedSubagents, isTerminalSubagentStatus, nestedMessagesFromArtifact, nestedTodosFromArtifact, ORPHANED_SUBAGENT_OUTPUT, ptcSubagentsFromArtifact, readLaneUsage, readTruncatedLane, type SubagentDiscoverySnapshot, type SubagentLaneSource, type SubagentStatus, type SubagentStatusCounts, type SubagentTokenUsage, subagentAwaitingApproval, subagentToolCallAwaitingApproval, type TaskSiblingGroup, type TokenCounts, type TruncatedLane, taskSiblingGroup, taskSubagentsOfThread, taskSubagentsOfTurn, transcriptStepUsage, turnToolCallsAwaitingApproval, useTurnToolCallsAwaitingApproval, } from "./subagents";
37
- export { ASYNC_TASK_TOOL_NAMES, CANCEL_ASYNC_TASK_TOOL_NAME, CHECK_ASYNC_TASK_TOOL_NAME, EDIT_FILE_TOOL_NAME, EVAL_TOOL_NAME, EXECUTE_PRESENTATION_CODE_TOOL_NAME, EXECUTE_SPREADSHEET_CODE_TOOL_NAME, EXECUTE_TOOL_NAME, EXECUTE_WORD_DOCUMENT_CODE_TOOL_NAME, type FileToolArgs, LIST_ASYNC_TASKS_TOOL_NAME, PTC_PARENT_TOOL_NAMES, RUN_PYTHON_CODE_TOOL_NAME, salientToolCallDetail, START_ASYNC_TASK_TOOL_NAME, TASK_TOOL_NAME, UPDATE_ASYNC_TASK_TOOL_NAME, WRITE_FILE_TOOL_NAME, } from "./tool-names";
38
+ export { ASYNC_TASK_TOOL_NAMES, CANCEL_ASYNC_TASK_TOOL_NAME, CHECK_ASYNC_TASK_TOOL_NAME, EDIT_FILE_TOOL_NAME, EVAL_TOOL_NAME, EXECUTE_PRESENTATION_CODE_TOOL_NAME, EXECUTE_SPREADSHEET_CODE_TOOL_NAME, EXECUTE_TOOL_NAME, EXECUTE_WORD_DOCUMENT_CODE_TOOL_NAME, type FileToolArgs, LIST_ASYNC_TASKS_TOOL_NAME, PTC_PARENT_TOOL_NAMES, QUIET_TOOL_NAMES, RUN_PYTHON_CODE_TOOL_NAME, salientToolCallDetail, START_ASYNC_TASK_TOOL_NAME, SUBMIT_FEEDBACK_TOOL_NAME, TASK_TOOL_NAME, UPDATE_ASYNC_TASK_TOOL_NAME, WRITE_FILE_TOOL_NAME, } from "./tool-names";
38
39
  export { buildOptimisticHumanContent, type OptimisticContentPart, } from "./optimistic-content";
39
40
  export { DEEP_AGENT_DEFAULT_CLIENT_PROTOCOL_VERSION, type DeepAgentProtocolDeclaration, type DeepAgentProtocolStatus, type DeepAgentWireProtocol, declaredDeepAgentProtocolVersion, isDeepAgentHostState, projectDeepAgentProtocol, readDeepAgentProtocol, withDeclaredProtocolVersion, } from "./protocol";
40
41
  export { AUTH_DENIAL_PARK_THRESHOLD, type AuthDenialTrackerState, initialAuthDenialTrackerState, observeAuthDenial, } from "./auth-denial";
@@ -14,6 +14,7 @@ const messageWindow = require("./message-window.cjs");
14
14
  const optimisticContent = require("./optimistic-content.cjs");
15
15
  const runningToolPlaceholder = require("./running-tool-placeholder.cjs");
16
16
  const statewireState = require("./statewire-state.cjs");
17
+ const toolNames = require("./tool-names.cjs");
17
18
  const voiceTurnGrouping = require("./voice-turn-grouping.cjs");
18
19
  const CACHE_EXCLUSIVE_ADAPTERS = /* @__PURE__ */ new Set([
19
20
  "amazon_bedrock",
@@ -79,7 +80,33 @@ const convertDeepAgentLangChainMessage = (message, metadata) => {
79
80
  }
80
81
  };
81
82
  };
82
- const messageConverter = react.createMessageConverter(convertDeepAgentLangChainMessage);
83
+ function withoutQuietToolCalls(message) {
84
+ const calls = message.tool_calls ?? [];
85
+ const quietIds = new Set(
86
+ calls.filter((call) => toolNames.QUIET_TOOL_NAMES.has(call.name)).map((call) => call.id)
87
+ );
88
+ const chunks = message.tool_call_chunks ?? [];
89
+ const quietChunk = (chunk) => toolNames.QUIET_TOOL_NAMES.has(chunk.name) || quietIds.has(chunk.id);
90
+ if (quietIds.size === 0 && !chunks.some(quietChunk)) return message;
91
+ return {
92
+ ...message,
93
+ ...message.tool_calls && {
94
+ tool_calls: calls.filter((call) => !quietIds.has(call.id))
95
+ },
96
+ ...message.tool_call_chunks && {
97
+ tool_call_chunks: chunks.filter((chunk) => !quietChunk(chunk))
98
+ }
99
+ };
100
+ }
101
+ const convertDeepAgentMessage = (message, metadata) => {
102
+ if (message.type === "tool" && toolNames.QUIET_TOOL_NAMES.has(message.name)) return [];
103
+ if (message.type === "ai") {
104
+ return convertDeepAgentLangChainMessage(withoutQuietToolCalls(message), metadata);
105
+ }
106
+ return convertDeepAgentLangChainMessage(message, metadata);
107
+ };
108
+ const messageConverter = react.createMessageConverter(convertDeepAgentMessage);
109
+ const messageConverterShowingQuietTools = react.createMessageConverter(convertDeepAgentLangChainMessage);
83
110
  const preliminaryMarkedTurns = /* @__PURE__ */ new WeakMap();
84
111
  function markPreliminaryToolResults(message) {
85
112
  if (message.role !== "assistant") return message;
@@ -97,7 +124,7 @@ function markPreliminaryToolResults(message) {
97
124
  return marked;
98
125
  }
99
126
  class DeepAgentMessageConversionCache {
100
- constructor() {
127
+ constructor({ showQuietTools = false } = {}) {
101
128
  __publicField(this, "cache", react.createExternalMessageConversionCache());
102
129
  /**
103
130
  * Every cached entry is rebuilt when the metadata object changes identity,
@@ -110,6 +137,8 @@ class DeepAgentMessageConversionCache {
110
137
  __publicField(this, "previous", null);
111
138
  /** `convertExternalMessages`' own rows for the previous pass, before parts were kept. */
112
139
  __publicField(this, "previousConverted", null);
140
+ __publicField(this, "callback");
141
+ this.callback = showQuietTools ? convertDeepAgentLangChainMessage : convertDeepAgentMessage;
113
142
  }
114
143
  /**
115
144
  * Convert one pass's LangChain messages. Returns the previous pass's array
@@ -122,7 +151,7 @@ class DeepAgentMessageConversionCache {
122
151
  convert(messages, isRunning) {
123
152
  const converted = react.convertExternalMessages(
124
153
  messages,
125
- convertDeepAgentLangChainMessage,
154
+ this.callback,
126
155
  isRunning,
127
156
  this.metadata,
128
157
  this.cache
@@ -241,8 +270,8 @@ function withUnchangedParts({
241
270
  });
242
271
  return kept === 0 ? message : { ...message, content };
243
272
  }
244
- function createDeepAgentMessageConversionCache() {
245
- return new DeepAgentMessageConversionCache();
273
+ function createDeepAgentMessageConversionCache(options = {}) {
274
+ return new DeepAgentMessageConversionCache(options);
246
275
  }
247
276
  function isSameMessageList(a, b) {
248
277
  return a.length === b.length && a.every((message, index) => message === b[index]);
@@ -694,7 +723,8 @@ function convertDeepAgentState(state, {
694
723
  selfAuthor = null,
695
724
  toolOutputs,
696
725
  withdrawnTurns,
697
- conversionCache
726
+ conversionCache,
727
+ showQuietTools = false
698
728
  } = {}) {
699
729
  var _a, _b;
700
730
  const values = statewireState.readDeepAgentStreamValues(state);
@@ -714,7 +744,7 @@ function convertDeepAgentState(state, {
714
744
  ...laneTail
715
745
  ];
716
746
  return {
717
- messages: conversionCache ? conversionCache.convert(sources, isRunning) : messageConverter.toThreadMessages(sources, isRunning).map(markPreliminaryToolResults),
747
+ messages: conversionCache ? conversionCache.convert(sources, isRunning) : (showQuietTools ? messageConverterShowingQuietTools : messageConverter).toThreadMessages(sources, isRunning).map(markPreliminaryToolResults),
718
748
  isRunning
719
749
  };
720
750
  }
@@ -732,6 +762,7 @@ exports.ATHENA_TERMINATION_REASON_KEY = ATHENA_TERMINATION_REASON_KEY;
732
762
  exports.DeepAgentMessageConversionCache = DeepAgentMessageConversionCache;
733
763
  exports.PENDING_ASSISTANT_MESSAGE_ID = PENDING_ASSISTANT_MESSAGE_ID;
734
764
  exports.convertDeepAgentLangChainMessage = convertDeepAgentLangChainMessage;
765
+ exports.convertDeepAgentMessage = convertDeepAgentMessage;
735
766
  exports.convertDeepAgentState = convertDeepAgentState;
736
767
  exports.createDeepAgentMaterialize = createDeepAgentMaterialize;
737
768
  exports.createDeepAgentMessageConversionCache = createDeepAgentMessageConversionCache;