@filigran/chatbot 3.16.1 → 3.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.
package/CHANGELOG.md CHANGED
@@ -8,7 +8,42 @@ the versions follow [semantic versioning](https://semver.org/spec/v2.0.0.html).
8
8
  This file starts at 3.10.0; earlier releases are on the
9
9
  [releases page](https://github.com/FiligranHQ/filigran-ui/releases).
10
10
 
11
- ## 3.16.1 — unreleased
11
+ ## 3.18.0 — unreleased
12
+
13
+ ### Added
14
+
15
+ - The status line follows a consult: `consult_progress` frames are read
16
+ through every consult level, as an agent consulted may consult its own
17
+ peers. It names the agent consulted and what the agent doing the work does
18
+ (`Consulting {agent}: {tool}…`, `Consulting {agent}: {tool} (+{count}
19
+ more)…`, `Consulting {agent}: writing the answer…`), or `Consulting {count}
20
+ agents…` while several run (`Consulting {agent}: {count} questions…` when
21
+ they ask one agent), and the consult's elapsed time runs on. Each consult is
22
+ told apart by the frame's `consult_id`, else by the agent consulted. The
23
+ consults end when the agent's own loop moves on, whether they answered or
24
+ not, and a consult frame arriving after that is not shown. Only the agent
25
+ consulted's own answer reads `writing the answer`, and a consult of a peer
26
+ in turn shows as that peer's frames, not as `consult_agent`. It said
27
+ `Thinking...` for the whole consult. A host's `statusLabel` reads the
28
+ consult as `AgentStatusState.consult` (`ConsultStatus`); a host translating
29
+ the panel's keys translates the new ones too.
30
+
31
+ ## 3.17.0 — unreleased
32
+
33
+ ### Added
34
+
35
+ - `reloadConversation()` on the handle reads the conversation on screen back
36
+ from the server again, for a change the host made to it outside the panel (a
37
+ message it stored, another agent taking it over). The messages it added are
38
+ merged into the thread on screen, which keeps the composer's draft and what
39
+ only the panel holds; one it edited or deleted shows as it was until the
40
+ conversation is opened again. The conversation's agent replaces one a turn
41
+ transferred it to, and the context gauge takes the newest reading. Nothing
42
+ is read before the conversation is, nor while a turn runs in it; a read-back
43
+ that fails, retried or not, leaves the thread as it is. `selectConversation`
44
+ with the id on screen still does nothing.
45
+
46
+ ## 3.16.1 — 2026-10-29
12
47
 
13
48
  ### Fixed
14
49
 
package/README.md CHANGED
@@ -163,12 +163,13 @@ chat.current?.send('Summarize this report', { extras: { mode: 'deep_investigatio
163
163
  | --- | --- |
164
164
  | `send(text, { extras, displayText })` | Sends *text* as the user, leaving the composer's draft alone; `extras` join that one message's body, and the user's bubble shows `displayText` in place of *text* (as `onBeforeSend`'s `displayText`, which wins when it gives one). Resolves to `'sent'` (once the backend takes it), `'steered'` (joined the running turn), `'held'` (sent when the turn ends - also, with or without `holdSendsDuringTurn`, while a turn ended provisionally winds down, after `onTurnRunningChange(false)`), `'dropped'` (empty, taken over by `onBeforeSend`, `readOnly`, or the panel unmounted first) or `'failed'` (the backend refused it) |
165
165
  | `newConversation({ workspaceId, agent })` | Starts a new chat, in a workspace and with an agent (id or slug) if given |
166
- | `selectConversation(id)` | Opens a conversation |
166
+ | `selectConversation(id)` | Opens a conversation; the one on screen is left as it is |
167
167
  | `setDraft(text)` / `focusComposer()` | Fills / focuses the composer |
168
168
  | `getDraft()` | The composer's text as it stands (typed by the user, or set by `setDraft`), e.g. for `onBeforeSend` taking over a held message (`draft.held`) to tell whether the composer still holds what was typed for it |
169
169
  | `stop()` | Same as the Stop button; during a voice call it also drops the question awaited and stops speaking |
170
170
  | `startVoiceCall()` | Starts a [voice call](#voice-call) over the panel; `false` when this browser has no speech recognition or the panel is `readOnly` |
171
171
  | `reloadAgents()` | Reads the agent list again, keeping the agent picked unless it is gone |
172
+ | `reloadConversation()` | Reads the conversation on screen back from the server again, for a change the host made to it outside the panel (a message it stored, another agent taking it over). The messages it added are merged into the thread on screen, which keeps what only the panel holds (earlier pages, a stopped answer, a send that failed) and the composer's draft; one it edited or deleted shows as it was until the conversation is opened again. The conversation's agent replaces one a turn transferred it to, and the context gauge takes the newest reading. Nothing is read before the conversation is, nor while a turn runs in it; a read-back retried after the backend was down or the credentials were refused is the host's too, one that fails leaves the thread as it is, and one answered with a re-created conversation opens that one instead. Does nothing without a conversation, or without the REST sessions route (`legacy`, `ag-ui`, `singleEndpoint`, `sessions: null`) |
172
173
  | `scrollToMessage(id)` | Scrolls to a message by its server id and highlights it; `false` when it is not on screen |
173
174
 
174
175
  #### Host extensions
@@ -747,6 +748,7 @@ Download failures (403/404/5xx/network) are reported through the optional `onDow
747
748
  - `tool_start` — Agent is using tools (with `tools` array)
748
749
  - `tool_heartbeat` — Liveness signal during a long tool execution (with `tools` and `elapsed_s`). The widget keeps the current status label and renders a live elapsed-time indicator next to it once the execution exceeds ~15 s, so long operations (background tasks, agent consults) never look stuck
749
750
  - `wait_start` — The agent pauses (with `seconds` and `reason`): the reason and a countdown show, with `Continue now` when the host names `skipWait`. The pause stays on screen through `wait_status` (what it watches changed state), `tool_heartbeat`, `tool_progress` and `consult_progress`; streamed text or any other status ends it
751
+ - `consult_progress` — A frame of an agent the agent consulted (with `agent_id`, `agent_name`, `consult_id` and the frame under `inner`); a consulted agent may consult its own peers, each level wrapping the frame once more. The status line names the agent consulted and what the agent doing the work does (its first tool and how many more, or writing the answer), or how many agents are consulted at once (several questions to one agent: how many), and keeps the consult's elapsed time. A consult ends when the agent consulted streams or composes its own answer, and every consult ends when the agent's own loop moves on (a new step, other tools, its answer) or its turn is replayed. Each consult is told apart by its `consult_id`; frames without one (an older backend) by the agent consulted, so two consults of one agent at once show as one
750
752
  - `analyzing` — Agent is analyzing tool results
751
753
  - `composing` — Agent is composing the response
752
754
  - `streaming` — Content is being streamed
package/dist/index.d.ts CHANGED
@@ -829,6 +829,11 @@ interface ChatPanelHandle {
829
829
  startVoiceCall: () => boolean;
830
830
  /** Read the agent list again, keeping the agent picked unless it is gone. */
831
831
  reloadAgents: () => void;
832
+ /**
833
+ * Read the conversation on screen back again, for a change the host made to it. Not `selectConversation`,
834
+ * which does nothing for the id on screen, so a host's sync with its own state never resets it.
835
+ */
836
+ reloadConversation: () => void;
832
837
  /** Scroll to a message on screen (by its server id) and highlight it; false when it is not there. */
833
838
  scrollToMessage: (messageId: string) => boolean;
834
839
  }
@@ -1098,6 +1103,26 @@ interface AgentStatusState {
1098
1103
  waitSeconds?: number;
1099
1104
  waitReason?: string;
1100
1105
  waitStartMs?: number;
1106
+ /** `consulting`: the consult the agent is waiting on. */
1107
+ consult?: ConsultStatus;
1108
+ }
1109
+ /**
1110
+ * A consult the agent is waiting on, as the status line shows it. A consulted
1111
+ * agent may consult its own peers: the name is the agent the conversation's
1112
+ * agent consulted, the status and tools those of the agent doing the work.
1113
+ */
1114
+ interface ConsultStatus {
1115
+ agentName: string;
1116
+ /** The working agent's status: `thinking`, `tool_start`, `streaming`... */
1117
+ status: string;
1118
+ /** Its tools, on `tool_start`. */
1119
+ tools?: string[];
1120
+ /** The agent consulted writes its own answer (not a peer it consulted in turn). */
1121
+ answering?: boolean;
1122
+ /** The consults running at once, this one included. */
1123
+ count: number;
1124
+ /** The agents they consult: one when every consult running asks the same agent. */
1125
+ agents: number;
1101
1126
  }
1102
1127
  interface ChatFile {
1103
1128
  name: string;
@@ -1195,4 +1220,4 @@ interface TransferredAgent {
1195
1220
  declare const voiceCallSupported: () => boolean;
1196
1221
 
1197
1222
  export { ChatPanel, ChatToggleButton, voiceCallSupported };
1198
- export type { AgentStatusState, ApiEndpoints, BackendType, ChatAnsweredBy, ChatArtifact, ChatArtifactKind, ChatAttachment, ChatCodeBlockContext, ChatCodeBlockRenderer, ChatContextBreakdown, ChatContextUsage, ChatConversationRef, ChatConversationReferenceCandidate, ChatConversationSummary, ChatFile, ChatHeldOutcome, ChatMarkerContext, ChatMarkerRenderer, ChatMessage, ChatMessagePersistedFeedback, ChatMessageSlotContext, ChatMode, ChatPanelHandle, ChatPanelMode, ChatPanelProps, ChatPanelTheme, ChatPromptTemplate, ChatQuotaStatus, ChatSendDecision, ChatSendDraft, ChatSendOptions, ChatSendOutcome, ChatStreamEventInfo, ChatToggleButtonProps, ChatTurnEnd, ChatTurnOutcome, ChatWorkspace, MessageFeedback, ToolApprovalDecision, ToolApprovalProposal, ToolApprovalVerdict, TransferredAgent, Translate, XtmAgent };
1223
+ export type { AgentStatusState, ApiEndpoints, BackendType, ChatAnsweredBy, ChatArtifact, ChatArtifactKind, ChatAttachment, ChatCodeBlockContext, ChatCodeBlockRenderer, ChatContextBreakdown, ChatContextUsage, ChatConversationRef, ChatConversationReferenceCandidate, ChatConversationSummary, ChatFile, ChatHeldOutcome, ChatMarkerContext, ChatMarkerRenderer, ChatMessage, ChatMessagePersistedFeedback, ChatMessageSlotContext, ChatMode, ChatPanelHandle, ChatPanelMode, ChatPanelProps, ChatPanelTheme, ChatPromptTemplate, ChatQuotaStatus, ChatSendDecision, ChatSendDraft, ChatSendOptions, ChatSendOutcome, ChatStreamEventInfo, ChatToggleButtonProps, ChatTurnEnd, ChatTurnOutcome, ChatWorkspace, ConsultStatus, MessageFeedback, ToolApprovalDecision, ToolApprovalProposal, ToolApprovalVerdict, TransferredAgent, Translate, XtmAgent };