@babav/knowledge-core-client 0.52.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 +9 -0
- package/dist/index.js +3 -0
- package/package.json +1 -1
- package/src/index.ts +7 -0
package/dist/index.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export interface VisualOverrides {
|
|
|
77
77
|
max_revisions?: number;
|
|
78
78
|
claims_check_model?: string;
|
|
79
79
|
vision_judge_model?: string;
|
|
80
|
+
image_gen_model?: string;
|
|
80
81
|
}
|
|
81
82
|
/** Per-request visual control. Absent => mode resolves from the profile default. All visual
|
|
82
83
|
* PROCESSING is server-side; the client only displays the result. */
|
|
@@ -166,6 +167,7 @@ export interface QueryResponse {
|
|
|
166
167
|
standalone_query: string | null;
|
|
167
168
|
visuals?: Visual[];
|
|
168
169
|
visuals_meta?: VisualsMeta | null;
|
|
170
|
+
conversation_title?: string | null;
|
|
169
171
|
}
|
|
170
172
|
export interface Citation {
|
|
171
173
|
/** Char span IN THE ANSWER this citation supports (for highlighting). */
|
|
@@ -537,6 +539,7 @@ export interface QueryProfile {
|
|
|
537
539
|
visual_proposer_model: string | null;
|
|
538
540
|
visual_claims_check_model: string | null;
|
|
539
541
|
visual_vision_judge_model: string | null;
|
|
542
|
+
visual_image_gen_model: string | null;
|
|
540
543
|
visual_max_revisions: number | null;
|
|
541
544
|
visual_combine_generation_and_concept: boolean | null;
|
|
542
545
|
concept_model_mode: string | null;
|
|
@@ -718,6 +721,12 @@ export interface StreamHandlers {
|
|
|
718
721
|
* (native path). Also present in `final`. May be `{}` if scoring was unavailable. */
|
|
719
722
|
onGroundedness?: (g: Groundedness | Record<string, never>) => void;
|
|
720
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;
|
|
721
730
|
/** First event of the trailing visual stage — visual generation has STARTED (fires after
|
|
722
731
|
* `final`/`groundedness`, before any `visual`). `pending` is how many concepts are about to be
|
|
723
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
|
@@ -99,6 +99,7 @@ export interface VisualOverrides {
|
|
|
99
99
|
max_revisions?: number;
|
|
100
100
|
claims_check_model?: string;
|
|
101
101
|
vision_judge_model?: string;
|
|
102
|
+
image_gen_model?: string; // scenic image generator (profile field: visual_image_gen_model)
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
/** Per-request visual control. Absent => mode resolves from the profile default. All visual
|
|
@@ -198,6 +199,7 @@ export interface QueryResponse {
|
|
|
198
199
|
standalone_query: string | null;
|
|
199
200
|
visuals?: Visual[]; // [] when off/none
|
|
200
201
|
visuals_meta?: VisualsMeta | null;
|
|
202
|
+
conversation_title?: string | null; // auto-title refreshed this turn (null if locked/one-shot/off)
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
export interface Citation {
|
|
@@ -504,6 +506,7 @@ export interface QueryProfile {
|
|
|
504
506
|
visual_proposer_model: string | null; // authors the HTML figure + chart/structural/scene specs
|
|
505
507
|
visual_claims_check_model: string | null;
|
|
506
508
|
visual_vision_judge_model: string | null; // Vertex Gemini model
|
|
509
|
+
visual_image_gen_model: string | null; // Vertex Gemini image-gen model (scenic register)
|
|
507
510
|
visual_max_revisions: number | null;
|
|
508
511
|
visual_combine_generation_and_concept: boolean | null;
|
|
509
512
|
concept_model_mode: string | null; // "reasoning" | "standard"; overrules gen mode when combining
|
|
@@ -793,6 +796,9 @@ export interface StreamHandlers {
|
|
|
793
796
|
* (native path). Also present in `final`. May be `{}` if scoring was unavailable. */
|
|
794
797
|
onGroundedness?: (g: Groundedness | Record<string, never>) => void;
|
|
795
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;
|
|
796
802
|
/** First event of the trailing visual stage — visual generation has STARTED (fires after
|
|
797
803
|
* `final`/`groundedness`, before any `visual`). `pending` is how many concepts are about to be
|
|
798
804
|
* rendered (or null when not yet known). Use it to show a "generating visual(s)" state. */
|
|
@@ -1437,6 +1443,7 @@ function dispatchSse(frame: string, h: StreamHandlers): void {
|
|
|
1437
1443
|
case "citation": h.onCitation?.(data as Citation); break;
|
|
1438
1444
|
case "groundedness": h.onGroundedness?.(data as never); break;
|
|
1439
1445
|
case "final": h.onFinal?.(data as QueryResponse); break;
|
|
1446
|
+
case "conversation_title": h.onConversationTitle?.(data as { conversation_id: UUID; title: string }); break;
|
|
1440
1447
|
case "visuals_pending": h.onVisualsPending?.(data as VisualsPending); break;
|
|
1441
1448
|
case "visual": h.onVisual?.(data as Visual); break;
|
|
1442
1449
|
case "visuals_complete": h.onVisualsComplete?.(data as VisualsMeta); break;
|