@littlebigbrain/client 0.5.0 → 0.5.2
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/schema.d.ts +157 -3
- package/dist/transport.d.ts +2 -0
- package/dist/transport.js +4 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -2213,7 +2213,18 @@ export interface components {
|
|
|
2213
2213
|
};
|
|
2214
2214
|
/** @enum {string} */
|
|
2215
2215
|
AskPlanExecutionModeV2: "entity_search" | "path_search" | "hybrid";
|
|
2216
|
+
AskPlanFailure: {
|
|
2217
|
+
code: components["schemas"]["AskPlanFailureCode"];
|
|
2218
|
+
/** @description True when retrying after the planner recovers can produce a plan. */
|
|
2219
|
+
retryable: boolean;
|
|
2220
|
+
stage: components["schemas"]["AskPlanFailureStage"];
|
|
2221
|
+
};
|
|
2222
|
+
/** @enum {string} */
|
|
2223
|
+
AskPlanFailureCode: "planner_disabled" | "planner_unavailable" | "no_class_candidates" | "generation_failed" | "validation_failed";
|
|
2224
|
+
/** @enum {string} */
|
|
2225
|
+
AskPlanFailureStage: "configuration" | "target_type" | "relation" | "anchor";
|
|
2216
2226
|
AskQuery: {
|
|
2227
|
+
plan_failure?: null | components["schemas"]["AskPlanFailure"];
|
|
2217
2228
|
/** @description The retrieval query text that was executed. */
|
|
2218
2229
|
query: string;
|
|
2219
2230
|
structured?: null | components["schemas"]["AskStructuredQuery"];
|
|
@@ -2828,9 +2839,24 @@ export interface components {
|
|
|
2828
2839
|
reranked_candidates?: number;
|
|
2829
2840
|
source: components["schemas"]["EmbeddingIndexSource"];
|
|
2830
2841
|
spaces_searched: number;
|
|
2842
|
+
temporal_coverage?: null | components["schemas"]["SearchTemporalCoverage"];
|
|
2831
2843
|
unindexed_tail_commits: number;
|
|
2832
2844
|
};
|
|
2833
2845
|
EmbeddingSearchRequest: {
|
|
2846
|
+
/**
|
|
2847
|
+
* Format: int64
|
|
2848
|
+
* @description Snapshot pin (transaction-time ceiling): results hide every event
|
|
2849
|
+
* committed after this sequence, reproducing that past snapshot. The ANN
|
|
2850
|
+
* run is selected as the newest run at or below the pin and the pin bounds
|
|
2851
|
+
* the forward overlay; candidate generation is never the correctness layer.
|
|
2852
|
+
* Omitted means the current head.
|
|
2853
|
+
*/
|
|
2854
|
+
as_of_commit_seq?: number | null;
|
|
2855
|
+
/**
|
|
2856
|
+
* @description Valid-time cursor (RFC 3339): results reflect facts true at this
|
|
2857
|
+
* instant. Omitted means the latest valid time.
|
|
2858
|
+
*/
|
|
2859
|
+
as_of_valid_time?: string | null;
|
|
2834
2860
|
consistency?: null | components["schemas"]["SearchConsistency"];
|
|
2835
2861
|
/** Format: int32 */
|
|
2836
2862
|
dim?: number | null;
|
|
@@ -3121,6 +3147,12 @@ export interface components {
|
|
|
3121
3147
|
type: string;
|
|
3122
3148
|
};
|
|
3123
3149
|
EvidenceInput: string | {
|
|
3150
|
+
/**
|
|
3151
|
+
* @description Stable observation id used by full-fidelity export/import. Ordinary
|
|
3152
|
+
* callers omit it and receive the existing deterministic request id.
|
|
3153
|
+
*/
|
|
3154
|
+
observation_id?: string | null;
|
|
3155
|
+
region?: null | components["schemas"]["RegionAnchorInput"];
|
|
3124
3156
|
source_id?: string | null;
|
|
3125
3157
|
text?: string | null;
|
|
3126
3158
|
};
|
|
@@ -3291,10 +3323,25 @@ export interface components {
|
|
|
3291
3323
|
overlay_candidates: number;
|
|
3292
3324
|
ranged?: null | components["schemas"]["RangedReadStats"];
|
|
3293
3325
|
source: components["schemas"]["FullTextIndexSource"];
|
|
3326
|
+
temporal_coverage?: null | components["schemas"]["SearchTemporalCoverage"];
|
|
3294
3327
|
term_count: number;
|
|
3295
3328
|
unindexed_tail_commits: number;
|
|
3296
3329
|
};
|
|
3297
3330
|
FullTextSearchRequest: {
|
|
3331
|
+
/**
|
|
3332
|
+
* Format: int64
|
|
3333
|
+
* @description Snapshot pin (transaction-time ceiling): results hide every event
|
|
3334
|
+
* committed after this sequence, reproducing that past snapshot. The BM25
|
|
3335
|
+
* run is selected as the newest run at or below the pin and the pin bounds
|
|
3336
|
+
* the forward overlay; candidate generation is never the correctness layer.
|
|
3337
|
+
* Omitted means the current head.
|
|
3338
|
+
*/
|
|
3339
|
+
as_of_commit_seq?: number | null;
|
|
3340
|
+
/**
|
|
3341
|
+
* @description Valid-time cursor (RFC 3339): results reflect facts true at this
|
|
3342
|
+
* instant. Omitted means the latest valid time.
|
|
3343
|
+
*/
|
|
3344
|
+
as_of_valid_time?: string | null;
|
|
3298
3345
|
consistency?: null | components["schemas"]["SearchConsistency"];
|
|
3299
3346
|
explain: boolean;
|
|
3300
3347
|
facets?: components["schemas"]["FacetRequest"][] | null;
|
|
@@ -3705,6 +3752,8 @@ export interface components {
|
|
|
3705
3752
|
* exact receipt and the original terminal commit sequence.
|
|
3706
3753
|
*/
|
|
3707
3754
|
mutation_receipt_id: string;
|
|
3755
|
+
/** @description Exact observation records imported from a full-fidelity export. */
|
|
3756
|
+
observations?: number;
|
|
3708
3757
|
properties: number;
|
|
3709
3758
|
triplets: number;
|
|
3710
3759
|
};
|
|
@@ -4198,6 +4247,8 @@ export interface components {
|
|
|
4198
4247
|
message: string;
|
|
4199
4248
|
param?: string | null;
|
|
4200
4249
|
request_id: string | null;
|
|
4250
|
+
retry_after_seconds?: number;
|
|
4251
|
+
retryable?: boolean;
|
|
4201
4252
|
/** @example invalid_request_error */
|
|
4202
4253
|
type: string;
|
|
4203
4254
|
};
|
|
@@ -5430,6 +5481,32 @@ export interface components {
|
|
|
5430
5481
|
total_triples: number;
|
|
5431
5482
|
truncated: boolean;
|
|
5432
5483
|
};
|
|
5484
|
+
/**
|
|
5485
|
+
* @description A page-region provenance anchor on a fact's evidence (region provenance
|
|
5486
|
+
* §4.1/§6.4(b) BYO import): where the evidence appears in the source
|
|
5487
|
+
* document. Coordinates are **normalized to the page box** (`[0, 1]`, origin
|
|
5488
|
+
* top-left, y down) with `x0 <= x1` and `y0 <= y1`; `confidence` is the
|
|
5489
|
+
* extraction confidence in `[0, 1]`. The commit path validates and quantizes
|
|
5490
|
+
* (`round(v * 65535)` coords, `round(c * 255)` confidence) into the canonical
|
|
5491
|
+
* stored anchor; out-of-range, non-finite, or inverted boxes are rejected.
|
|
5492
|
+
*/
|
|
5493
|
+
RegionAnchorInput: {
|
|
5494
|
+
/** Format: double */
|
|
5495
|
+
confidence: number;
|
|
5496
|
+
/**
|
|
5497
|
+
* Format: int32
|
|
5498
|
+
* @description 0-based page index within the source document.
|
|
5499
|
+
*/
|
|
5500
|
+
page: number;
|
|
5501
|
+
/** Format: double */
|
|
5502
|
+
x0: number;
|
|
5503
|
+
/** Format: double */
|
|
5504
|
+
x1: number;
|
|
5505
|
+
/** Format: double */
|
|
5506
|
+
y0: number;
|
|
5507
|
+
/** Format: double */
|
|
5508
|
+
y1: number;
|
|
5509
|
+
};
|
|
5433
5510
|
RelationSearchResult: {
|
|
5434
5511
|
name: string;
|
|
5435
5512
|
relation_id: components["schemas"]["RelationTypeId"];
|
|
@@ -5584,6 +5661,12 @@ export interface components {
|
|
|
5584
5661
|
terms: components["schemas"]["ResolutionResult"][];
|
|
5585
5662
|
};
|
|
5586
5663
|
ResolvedTerm: {
|
|
5664
|
+
/**
|
|
5665
|
+
* @description Ontology description/definition when the resolved schema term carries
|
|
5666
|
+
* one. Candidate-free class resolution preserves tenant-authored class
|
|
5667
|
+
* documentation instead of returning only a bare label.
|
|
5668
|
+
*/
|
|
5669
|
+
description?: string | null;
|
|
5587
5670
|
kind: components["schemas"]["SuggestKind"];
|
|
5588
5671
|
provenance?: null | components["schemas"]["VocabularyProvenance"];
|
|
5589
5672
|
/**
|
|
@@ -5592,6 +5675,7 @@ export interface components {
|
|
|
5592
5675
|
*/
|
|
5593
5676
|
score: number;
|
|
5594
5677
|
text: string;
|
|
5678
|
+
type_signature?: null | components["schemas"]["VocabularyTypeSignature"];
|
|
5595
5679
|
};
|
|
5596
5680
|
/** @description One edge to retract, identified the same way it was asserted. */
|
|
5597
5681
|
RetractEdgeInput: {
|
|
@@ -6518,6 +6602,25 @@ export interface components {
|
|
|
6518
6602
|
signature_forced?: boolean;
|
|
6519
6603
|
text: string;
|
|
6520
6604
|
};
|
|
6605
|
+
/**
|
|
6606
|
+
* @description How a temporally-pinned (or head) search resolved run selection: the
|
|
6607
|
+
* effective `as_of` ceiling, the base snapshot of the selected persisted
|
|
6608
|
+
* run(s), and the highest commit each leg's run+segments actually covered
|
|
6609
|
+
* (the forward WAL overlay covers `(covered_through, ceiling]`). Distinct from
|
|
6610
|
+
* the ontology-inspect `TemporalCoverage` type. Per-leg fields are `None` when
|
|
6611
|
+
* that leg served from an ephemeral rebuild (no persisted run at the ceiling).
|
|
6612
|
+
*/
|
|
6613
|
+
SearchTemporalCoverage: {
|
|
6614
|
+
bm25_covered_through?: null | components["schemas"]["CommitSeq"];
|
|
6615
|
+
bm25_run_snapshot_commit_seq?: null | components["schemas"]["CommitSeq"];
|
|
6616
|
+
/**
|
|
6617
|
+
* @description Resolved transaction-time ceiling: the `as_of_commit_seq` pin, or the
|
|
6618
|
+
* head commit_seq when the query was unpinned.
|
|
6619
|
+
*/
|
|
6620
|
+
ceiling_commit_seq: components["schemas"]["CommitSeq"];
|
|
6621
|
+
vector_covered_through?: null | components["schemas"]["CommitSeq"];
|
|
6622
|
+
vector_run_snapshot_commit_seq?: null | components["schemas"]["CommitSeq"];
|
|
6623
|
+
};
|
|
6521
6624
|
SemanticGraphSearchRequest: {
|
|
6522
6625
|
/**
|
|
6523
6626
|
* Format: int64
|
|
@@ -6637,6 +6740,7 @@ export interface components {
|
|
|
6637
6740
|
* candidate generation.
|
|
6638
6741
|
*/
|
|
6639
6742
|
target_prep_ms?: number;
|
|
6743
|
+
temporal_coverage?: null | components["schemas"]["SearchTemporalCoverage"];
|
|
6640
6744
|
/** Format: int64 */
|
|
6641
6745
|
total_ms?: number;
|
|
6642
6746
|
/**
|
|
@@ -6692,6 +6796,13 @@ export interface components {
|
|
|
6692
6796
|
as_of_valid_time?: string | null;
|
|
6693
6797
|
direction: components["schemas"]["ExpansionDirection"];
|
|
6694
6798
|
explain: boolean;
|
|
6799
|
+
/**
|
|
6800
|
+
* @description Entity properties to project for every returned seed and path node.
|
|
6801
|
+
* Projections are reduced from the same snapshot used for authorization
|
|
6802
|
+
* and traversal. Requesting fields routes the operation through the exact
|
|
6803
|
+
* snapshot path rather than ranged adjacency.
|
|
6804
|
+
*/
|
|
6805
|
+
fields?: string[];
|
|
6695
6806
|
/**
|
|
6696
6807
|
* Format: int64
|
|
6697
6808
|
* @description Decoded adjacency-block working-set byte budget for persisted-vector
|
|
@@ -6717,6 +6828,15 @@ export interface components {
|
|
|
6717
6828
|
SemanticTraverseResponse: {
|
|
6718
6829
|
explain?: null | components["schemas"]["SemanticTraverseExplain"];
|
|
6719
6830
|
paths: components["schemas"]["PathResult"][];
|
|
6831
|
+
/**
|
|
6832
|
+
* @description Requested properties keyed by entity id for every returned seed and
|
|
6833
|
+
* path node. Empty when `fields` was omitted.
|
|
6834
|
+
*/
|
|
6835
|
+
projected_nodes?: {
|
|
6836
|
+
[key: string]: {
|
|
6837
|
+
[key: string]: unknown;
|
|
6838
|
+
};
|
|
6839
|
+
};
|
|
6720
6840
|
ranged?: null | components["schemas"]["RangedTraverseStats"];
|
|
6721
6841
|
seeds: components["schemas"]["ScoredEntityView"][];
|
|
6722
6842
|
snapshot: components["schemas"]["SnapshotView"];
|
|
@@ -7062,6 +7182,13 @@ export interface components {
|
|
|
7062
7182
|
ShadowEvalResponse: {
|
|
7063
7183
|
challenger: components["schemas"]["ShadowArmResult"];
|
|
7064
7184
|
champion: components["schemas"]["ShadowArmResult"];
|
|
7185
|
+
/**
|
|
7186
|
+
* @description Fail-closed promotion verdict over the same labeled queries and pinned
|
|
7187
|
+
* snapshot. Requires quality non-regression plus p50/p95/p99 latency
|
|
7188
|
+
* ratios within the configured ceiling; this endpoint still never
|
|
7189
|
+
* performs the promotion itself.
|
|
7190
|
+
*/
|
|
7191
|
+
gate: components["schemas"]["TrainGateReport"];
|
|
7065
7192
|
/** @description Labeled queries (those with `expected`) the hit rates are over. */
|
|
7066
7193
|
labeled: number;
|
|
7067
7194
|
/** Format: float */
|
|
@@ -7778,7 +7905,8 @@ export interface components {
|
|
|
7778
7905
|
TrainGateReport: {
|
|
7779
7906
|
/**
|
|
7780
7907
|
* Format: float
|
|
7781
|
-
* @description Challenger − champion
|
|
7908
|
+
* @description Challenger − champion primary quality metric on the held-out eval
|
|
7909
|
+
* slice (nDCG for fusion and retrieval-profile comparisons).
|
|
7782
7910
|
*/
|
|
7783
7911
|
effect: number;
|
|
7784
7912
|
/** Format: float */
|
|
@@ -7787,7 +7915,18 @@ export interface components {
|
|
|
7787
7915
|
labeled: number;
|
|
7788
7916
|
/**
|
|
7789
7917
|
* Format: double
|
|
7790
|
-
* @description Challenger / champion
|
|
7918
|
+
* @description Challenger / champion latency ratios at each reported percentile.
|
|
7919
|
+
*/
|
|
7920
|
+
latency_p50_ratio?: number | null;
|
|
7921
|
+
/** Format: double */
|
|
7922
|
+
latency_p95_ratio?: number | null;
|
|
7923
|
+
/** Format: double */
|
|
7924
|
+
latency_p99_ratio?: number | null;
|
|
7925
|
+
/**
|
|
7926
|
+
* Format: double
|
|
7927
|
+
* @description Legacy decision latency ratio. For configuration shadow evaluation this
|
|
7928
|
+
* is the worst of p50/p95/p99; older trainer kinds may use their primary
|
|
7929
|
+
* latency statistic.
|
|
7791
7930
|
*/
|
|
7792
7931
|
latency_ratio: number;
|
|
7793
7932
|
/**
|
|
@@ -7820,7 +7959,8 @@ export interface components {
|
|
|
7820
7959
|
reason: string;
|
|
7821
7960
|
/**
|
|
7822
7961
|
* Format: float
|
|
7823
|
-
* @description
|
|
7962
|
+
* @description Paired held-out retrieval deltas. When present, all must be
|
|
7963
|
+
* non-negative.
|
|
7824
7964
|
*/
|
|
7825
7965
|
recall_delta?: number | null;
|
|
7826
7966
|
};
|
|
@@ -8125,6 +8265,11 @@ export interface components {
|
|
|
8125
8265
|
};
|
|
8126
8266
|
/** @enum {string} */
|
|
8127
8267
|
VocabularyOrigin: "builtin" | "tenant" | "imported";
|
|
8268
|
+
VocabularyPropertySignature: {
|
|
8269
|
+
name: string;
|
|
8270
|
+
required: boolean;
|
|
8271
|
+
value_type: string;
|
|
8272
|
+
};
|
|
8128
8273
|
VocabularyProvenance: {
|
|
8129
8274
|
candidate_id: string;
|
|
8130
8275
|
namespace: string;
|
|
@@ -8133,6 +8278,15 @@ export interface components {
|
|
|
8133
8278
|
origin: components["schemas"]["VocabularyOrigin"];
|
|
8134
8279
|
source_reference: string;
|
|
8135
8280
|
};
|
|
8281
|
+
VocabularyTypeSignature: {
|
|
8282
|
+
properties?: components["schemas"]["VocabularyPropertySignature"][];
|
|
8283
|
+
source_types?: string[];
|
|
8284
|
+
/** @description Frozen normalized schema identity. */
|
|
8285
|
+
stable_id: string;
|
|
8286
|
+
super_types?: string[];
|
|
8287
|
+
target_types?: string[];
|
|
8288
|
+
value_type?: string | null;
|
|
8289
|
+
};
|
|
8136
8290
|
WalCompactRequest: {
|
|
8137
8291
|
/**
|
|
8138
8292
|
* @description When appending the new segment would leave the manifest with more
|
package/dist/transport.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare class LbbError extends Error {
|
|
|
30
30
|
readonly param?: string | null;
|
|
31
31
|
readonly requestId?: string | null;
|
|
32
32
|
readonly docUrl?: string | null;
|
|
33
|
+
readonly retryable?: boolean;
|
|
34
|
+
readonly retryAfterSeconds?: number;
|
|
33
35
|
constructor(status: number, body: string, error?: LbbErrorPayload | undefined);
|
|
34
36
|
}
|
|
35
37
|
export type QueryValue = string | number | boolean | undefined;
|
package/dist/transport.js
CHANGED
|
@@ -8,6 +8,8 @@ export class LbbError extends Error {
|
|
|
8
8
|
param;
|
|
9
9
|
requestId;
|
|
10
10
|
docUrl;
|
|
11
|
+
retryable;
|
|
12
|
+
retryAfterSeconds;
|
|
11
13
|
constructor(status, body, error) {
|
|
12
14
|
super(error?.message ?? `Little Big Brain ${status}: ${body}`);
|
|
13
15
|
this.status = status;
|
|
@@ -19,6 +21,8 @@ export class LbbError extends Error {
|
|
|
19
21
|
this.param = error?.param;
|
|
20
22
|
this.requestId = error?.request_id;
|
|
21
23
|
this.docUrl = error?.doc_url;
|
|
24
|
+
this.retryable = error?.retryable;
|
|
25
|
+
this.retryAfterSeconds = error?.retry_after_seconds;
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
export function sleep(ms) {
|
package/dist/types.d.ts
CHANGED