@babav/knowledge-core-client 0.50.0 → 0.52.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 -3
- package/package.json +1 -1
- package/src/index.ts +10 -3
package/dist/index.d.ts
CHANGED
|
@@ -540,7 +540,7 @@ export interface QueryProfile {
|
|
|
540
540
|
visual_max_revisions: number | null;
|
|
541
541
|
visual_combine_generation_and_concept: boolean | null;
|
|
542
542
|
concept_model_mode: string | null;
|
|
543
|
-
scoring_status: "
|
|
543
|
+
scoring_status: "no_score" | "queued" | "running" | "scored" | null;
|
|
544
544
|
scoring_progress_done: number | null;
|
|
545
545
|
scoring_progress_total: number | null;
|
|
546
546
|
scoring_updated_at: string | null;
|
|
@@ -555,7 +555,8 @@ export type QueryProfileWrite = Partial<Omit<QueryProfile, "id" | "tenant_id" |
|
|
|
555
555
|
/** Model catalog for the query-profile-config UI (GET /v1/query-profiles/model-options). `models` maps id → its
|
|
556
556
|
* capabilities; `fields` gives each profile model-field its supported ids + default (+ usage metadata);
|
|
557
557
|
* `modes` says which model field governs each mode (reasoning is valid only if that model's
|
|
558
|
-
* supports_reasoning is true)
|
|
558
|
+
* supports_reasoning is true); `rerankers` gives the supported values for a profile's `reranker_provider`
|
|
559
|
+
* field + the system default. KC provides the data; the UI decides presentation. */
|
|
559
560
|
export interface ModelOptions {
|
|
560
561
|
models: Record<string, {
|
|
561
562
|
label: string;
|
|
@@ -574,6 +575,11 @@ export interface ModelOptions {
|
|
|
574
575
|
depends_on: string;
|
|
575
576
|
values: string[];
|
|
576
577
|
}>;
|
|
578
|
+
/** Supported `reranker_provider` values (null on a profile => system default). */
|
|
579
|
+
rerankers: {
|
|
580
|
+
supported: string[];
|
|
581
|
+
default: string;
|
|
582
|
+
};
|
|
577
583
|
}
|
|
578
584
|
export type BenchmarkTier = "client_quick" | "screening" | "full";
|
|
579
585
|
export type BenchmarkCategory = "quality" | "quality_cost" | "quality_latency";
|
|
@@ -583,7 +589,7 @@ export interface BenchmarkScore {
|
|
|
583
589
|
cache_hit: boolean;
|
|
584
590
|
config_hash: string;
|
|
585
591
|
eval_version: string | null;
|
|
586
|
-
scoring_status: "
|
|
592
|
+
scoring_status: "no_score" | "queued" | "running" | "scored";
|
|
587
593
|
composite_q: number | null;
|
|
588
594
|
sub_scores: Record<string, unknown>;
|
|
589
595
|
per_language: Record<string, number>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babav/knowledge-core-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.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
|
@@ -510,7 +510,11 @@ export interface QueryProfile {
|
|
|
510
510
|
// --- score-my-profile status/progress (READ-only; not settable) ---------------------------------
|
|
511
511
|
// Durable on the profile so a client can kick scoring, leave, and see the status/result on any later
|
|
512
512
|
// read. score_composite_q/score_scored_at are the cached score for the CURRENT eval version.
|
|
513
|
-
|
|
513
|
+
// Authoritative, derived from reality on every read: "scored" (a score exists), "running"/"queued"
|
|
514
|
+
// (a run is actively in progress, see scoring_progress_*), or "no_score" (no score and nothing
|
|
515
|
+
// running — covers never-scored, a failed/interrupted attempt, or a config change). Never a lingering
|
|
516
|
+
// "failed". null only transiently before the first read enriches it — treat null as "no_score".
|
|
517
|
+
scoring_status: "no_score" | "queued" | "running" | "scored" | null;
|
|
514
518
|
scoring_progress_done: number | null;
|
|
515
519
|
scoring_progress_total: number | null;
|
|
516
520
|
scoring_updated_at: string | null; // ISO timestamp; heartbeat while running
|
|
@@ -529,11 +533,14 @@ export type QueryProfileWrite = Partial<Omit<QueryProfile,
|
|
|
529
533
|
/** Model catalog for the query-profile-config UI (GET /v1/query-profiles/model-options). `models` maps id → its
|
|
530
534
|
* capabilities; `fields` gives each profile model-field its supported ids + default (+ usage metadata);
|
|
531
535
|
* `modes` says which model field governs each mode (reasoning is valid only if that model's
|
|
532
|
-
* supports_reasoning is true)
|
|
536
|
+
* supports_reasoning is true); `rerankers` gives the supported values for a profile's `reranker_provider`
|
|
537
|
+
* field + the system default. KC provides the data; the UI decides presentation. */
|
|
533
538
|
export interface ModelOptions {
|
|
534
539
|
models: Record<string, { label: string; provider: "anthropic" | "vertex" | "moonshot"; kind: "text" | "vision"; supports_reasoning: boolean }>;
|
|
535
540
|
fields: Record<string, { supported: string[]; default: string; applies_when?: string; applies_to?: string[]; note?: string }>;
|
|
536
541
|
modes: Record<string, { depends_on: string; values: string[] }>;
|
|
542
|
+
/** Supported `reranker_provider` values (null on a profile => system default). */
|
|
543
|
+
rerankers: { supported: string[]; default: string };
|
|
537
544
|
}
|
|
538
545
|
|
|
539
546
|
// ---- benchmark (score-my-profile + leaderboards) --------------------------
|
|
@@ -546,7 +553,7 @@ export interface BenchmarkScore {
|
|
|
546
553
|
cache_hit: boolean;
|
|
547
554
|
config_hash: string;
|
|
548
555
|
eval_version: string | null;
|
|
549
|
-
scoring_status: "
|
|
556
|
+
scoring_status: "no_score" | "queued" | "running" | "scored";
|
|
550
557
|
composite_q: number | null;
|
|
551
558
|
sub_scores: Record<string, unknown>;
|
|
552
559
|
per_language: Record<string, number>;
|