@babav/knowledge-core-client 0.53.0 → 0.54.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/dist/index.d.ts +7 -0
- package/dist/index.js +3 -0
- package/package.json +1 -1
- package/src/index.ts +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ export interface QueryResponse {
|
|
|
167
167
|
standalone_query: string | null;
|
|
168
168
|
visuals?: Visual[];
|
|
169
169
|
visuals_meta?: VisualsMeta | null;
|
|
170
|
+
conversation_title?: string | null;
|
|
170
171
|
}
|
|
171
172
|
export interface Citation {
|
|
172
173
|
/** Char span IN THE ANSWER this citation supports (for highlighting). */
|
|
@@ -720,6 +721,12 @@ export interface StreamHandlers {
|
|
|
720
721
|
* (native path). Also present in `final`. May be `{}` if scoring was unavailable. */
|
|
721
722
|
onGroundedness?: (g: Groundedness | Record<string, never>) => void;
|
|
722
723
|
onFinal?: (d: QueryResponse) => void;
|
|
724
|
+
/** Conversation auto-title, refreshed after `final` (conversational turns only). Update the
|
|
725
|
+
* sidebar title live. Fires at most once per turn; absent when locked/one-shot/disabled. */
|
|
726
|
+
onConversationTitle?: (t: {
|
|
727
|
+
conversation_id: UUID;
|
|
728
|
+
title: string;
|
|
729
|
+
}) => void;
|
|
723
730
|
/** First event of the trailing visual stage — visual generation has STARTED (fires after
|
|
724
731
|
* `final`/`groundedness`, before any `visual`). `pending` is how many concepts are about to be
|
|
725
732
|
* rendered (or null when not yet known). Use it to show a "generating visual(s)" state. */
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babav/knowledge-core-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "TypeScript client for the Babav Knowledge Core API (Deno + Node 18+, zero deps). Includes the babav.visual grammar TYPES at the ./visual subpath (types only; all visual rendering is server-side).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/index.ts
CHANGED
|
@@ -199,6 +199,7 @@ export interface QueryResponse {
|
|
|
199
199
|
standalone_query: string | null;
|
|
200
200
|
visuals?: Visual[]; // [] when off/none
|
|
201
201
|
visuals_meta?: VisualsMeta | null;
|
|
202
|
+
conversation_title?: string | null; // auto-title refreshed this turn (null if locked/one-shot/off)
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
export interface Citation {
|
|
@@ -795,6 +796,9 @@ export interface StreamHandlers {
|
|
|
795
796
|
* (native path). Also present in `final`. May be `{}` if scoring was unavailable. */
|
|
796
797
|
onGroundedness?: (g: Groundedness | Record<string, never>) => void;
|
|
797
798
|
onFinal?: (d: QueryResponse) => void;
|
|
799
|
+
/** Conversation auto-title, refreshed after `final` (conversational turns only). Update the
|
|
800
|
+
* sidebar title live. Fires at most once per turn; absent when locked/one-shot/disabled. */
|
|
801
|
+
onConversationTitle?: (t: { conversation_id: UUID; title: string }) => void;
|
|
798
802
|
/** First event of the trailing visual stage — visual generation has STARTED (fires after
|
|
799
803
|
* `final`/`groundedness`, before any `visual`). `pending` is how many concepts are about to be
|
|
800
804
|
* rendered (or null when not yet known). Use it to show a "generating visual(s)" state. */
|
|
@@ -1439,6 +1443,7 @@ function dispatchSse(frame: string, h: StreamHandlers): void {
|
|
|
1439
1443
|
case "citation": h.onCitation?.(data as Citation); break;
|
|
1440
1444
|
case "groundedness": h.onGroundedness?.(data as never); break;
|
|
1441
1445
|
case "final": h.onFinal?.(data as QueryResponse); break;
|
|
1446
|
+
case "conversation_title": h.onConversationTitle?.(data as { conversation_id: UUID; title: string }); break;
|
|
1442
1447
|
case "visuals_pending": h.onVisualsPending?.(data as VisualsPending); break;
|
|
1443
1448
|
case "visual": h.onVisual?.(data as Visual); break;
|
|
1444
1449
|
case "visuals_complete": h.onVisualsComplete?.(data as VisualsMeta); break;
|