@babav/knowledge-core-client 0.27.0 → 0.28.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 +4 -0
- package/package.json +1 -1
- package/src/index.ts +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -468,8 +468,12 @@ declare class HttpBase {
|
|
|
468
468
|
protected pageAll<T>(path: string, query?: RequestOpts["query"]): Promise<T[]>;
|
|
469
469
|
}
|
|
470
470
|
export interface StreamHandlers {
|
|
471
|
+
/** Retrieval milestone. `retrieval_contents` is the reranked top_k (unchanged).
|
|
472
|
+
* `retrieved_count` is the total distinct candidate chunks fetched across ALL corpora
|
|
473
|
+
* (and sub-queries) BEFORE reranking/truncation — i.e. the recall-net size. */
|
|
471
474
|
onSources?: (d: {
|
|
472
475
|
retrieval_contents: RetrievalContent[];
|
|
476
|
+
retrieved_count: number;
|
|
473
477
|
}) => void;
|
|
474
478
|
onToken?: (text: string) => void;
|
|
475
479
|
/** A citation, emitted inline as the answer streams (Claude/native path). Also
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babav/knowledge-core-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.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
|
@@ -551,7 +551,10 @@ const MULTIPART_MAX_BYTES = 30 * 1024 * 1024;
|
|
|
551
551
|
// SSE handlers
|
|
552
552
|
// ---------------------------------------------------------------------------
|
|
553
553
|
export interface StreamHandlers {
|
|
554
|
-
|
|
554
|
+
/** Retrieval milestone. `retrieval_contents` is the reranked top_k (unchanged).
|
|
555
|
+
* `retrieved_count` is the total distinct candidate chunks fetched across ALL corpora
|
|
556
|
+
* (and sub-queries) BEFORE reranking/truncation — i.e. the recall-net size. */
|
|
557
|
+
onSources?: (d: { retrieval_contents: RetrievalContent[]; retrieved_count: number }) => void;
|
|
555
558
|
onToken?: (text: string) => void;
|
|
556
559
|
/** A citation, emitted inline as the answer streams (Claude/native path). Also
|
|
557
560
|
* present aggregated in the `final` event. */
|