@littlebigbrain/client 0.8.0 → 0.8.1
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/README.md +11 -5
- package/dist/client.d.ts +30 -175
- package/dist/client.js +36 -233
- package/dist/index.d.ts +1 -1
- package/dist/namespaces.d.ts +15 -84
- package/dist/namespaces.js +31 -190
- package/dist/schema.d.ts +973 -5668
- package/dist/types.d.ts +2 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @littlebigbrain/client
|
|
2
2
|
|
|
3
|
-
The typed TypeScript client for [Little Big Brain](https://littlebigbrain.com) — write graph facts
|
|
3
|
+
The typed TypeScript client for [Little Big Brain](https://littlebigbrain.com) — write graph facts and query one immutable published snapshot. Request and response types are generated from the API contract, so every call is fully typed. Runs anywhere there's a global `fetch`: Node 18+, browsers, and edge workers.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
npm install @littlebigbrain/client
|
|
@@ -32,13 +32,14 @@ await graph.facts.create(
|
|
|
32
32
|
{ idempotencyKey: "policy-42-v1" },
|
|
33
33
|
);
|
|
34
34
|
|
|
35
|
-
// 2.
|
|
36
|
-
await
|
|
35
|
+
// 2. Publication is automatic. Inspect one coherent watermark when needed.
|
|
36
|
+
const published = await lbb.readSnapshot();
|
|
37
|
+
console.log(published.snapshot.served_at_seq, published.query_lag_commits);
|
|
37
38
|
|
|
38
39
|
// 3. Hybrid search over the snapshot.
|
|
39
40
|
const results = await graph.search.hybrid(
|
|
40
41
|
"How long are customer records retained?",
|
|
41
|
-
{ topK: 10,
|
|
42
|
+
{ topK: 10, consistency: "eventual" },
|
|
42
43
|
);
|
|
43
44
|
```
|
|
44
45
|
|
|
@@ -97,7 +98,12 @@ Methods return parsed JSON and throw `LbbError` (with `status`, `code`, `message
|
|
|
97
98
|
|
|
98
99
|
## More
|
|
99
100
|
|
|
100
|
-
The `graph(...)` scope exposes `facts`, `search`, `entities`, `
|
|
101
|
+
The `graph(...)` scope exposes `facts`, `search`, `entities`, `ontology`,
|
|
102
|
+
`query`, `schema`, and `context` namespaces. `context` includes vocabulary
|
|
103
|
+
suggestion, term resolution, relation decoding, and groundability inspection; `schema`
|
|
104
|
+
reads or atomically publishes the active ontology/shapes bundle. Writes enqueue
|
|
105
|
+
published-generation maintenance automatically. Every generated shape is
|
|
106
|
+
available as `Schemas["TypeName"]`.
|
|
101
107
|
|
|
102
108
|
Full reference and guides: [docs.littlebigbrain.com/sdks/typescript](https://docs.littlebigbrain.com/sdks/typescript/).
|
|
103
109
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ImportLine, LbbClientOptions, ListResponse, RawLbbResponse, ReadConsistencyOptions,
|
|
1
|
+
import type { ImportLine, LbbClientOptions, ListResponse, RawLbbResponse, ReadConsistencyOptions, RdfImportOptions, Schemas, SearchConsistency, SparqlResults } from "./types.js";
|
|
2
2
|
import { type CallOptions, type RequestOptions } from "./transport.js";
|
|
3
|
-
import { ContextNamespace, EntityNamespace, GraphNamespace,
|
|
3
|
+
import { ContextNamespace, EntityNamespace, GraphNamespace, OntologyNamespace, QueryNamespace, SchemaNamespace, SearchNamespace } from "./namespaces.js";
|
|
4
4
|
export { parseSparqlResults } from "./types.js";
|
|
5
|
-
export type { AttributeFilter, AttributeFilterOp, AttributeFilterValue, EntityAttributeFilterOptions, EntityPropertiesLine, FetchLike, FlatProperties, ImportLine, LbbClientOptions, LbbRequestEvent, LbbResponseEvent, LbbRetryEvent, LbbErrorPayload, ListResponse, RawLbbResponse, ReadConsistencyOptions,
|
|
5
|
+
export type { AttributeFilter, AttributeFilterOp, AttributeFilterValue, EntityAttributeFilterOptions, EntityPropertiesLine, FetchLike, FlatProperties, ImportLine, LbbClientOptions, LbbRequestEvent, LbbResponseEvent, LbbRetryEvent, LbbErrorPayload, ListResponse, RawLbbResponse, ReadConsistencyOptions, RdfImportOptions, Schemas, SearchConsistency, SparqlResults, SparqlResultsJson, SparqlTerm, CommitRequest, CommitResponse, Entity, EntitySelector, GraphMetadata, GraphSummary, SchemaView, SearchRequest, SearchResponse, SearchResult, Snapshot, } from "./types.js";
|
|
6
6
|
export { LbbError } from "./transport.js";
|
|
7
7
|
export type { CallOptions, Query, QueryValue, RequestOptions, } from "./transport.js";
|
|
8
|
-
export type {
|
|
9
|
-
export { ContextNamespace, EntityNamespace, FactsNamespace, GraphNamespace,
|
|
8
|
+
export type { HybridSearchOptions } from "./namespaces.js";
|
|
9
|
+
export { ContextNamespace, EntityNamespace, FactsNamespace, GraphNamespace, OntologyNamespace, QueryNamespace, SchemaNamespace, SearchNamespace, } from "./namespaces.js";
|
|
10
10
|
export interface IndexLineageObservation {
|
|
11
11
|
metadata: Schemas["GraphMetadataResponse"];
|
|
12
12
|
lineage: Schemas["IndexLineage"];
|
|
@@ -40,7 +40,6 @@ export declare class LbbClient {
|
|
|
40
40
|
readonly defaultConsistency?: SearchConsistency;
|
|
41
41
|
readonly context: ContextNamespace;
|
|
42
42
|
readonly search: SearchNamespace;
|
|
43
|
-
readonly indexes: IndexNamespace;
|
|
44
43
|
readonly entities: EntityNamespace;
|
|
45
44
|
readonly schema: SchemaNamespace;
|
|
46
45
|
readonly ontology: OntologyNamespace;
|
|
@@ -97,18 +96,15 @@ export declare class LbbClient {
|
|
|
97
96
|
* streamed request without a single oversized commit. Pass `lines` as an array
|
|
98
97
|
* (serialized to NDJSON here) or a pre-built NDJSON string.
|
|
99
98
|
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* the throttle): import the whole dataset, index once. The response's `index`
|
|
105
|
-
* object reports whether the build ran or was skipped.
|
|
99
|
+
* A successful import durably enqueues one complete published-generation
|
|
100
|
+
* build after the final batch. It does not build index families or wait for
|
|
101
|
+
* visibility; the response's `published_generation` object carries the
|
|
102
|
+
* durable job and due sequence to observe.
|
|
106
103
|
*/
|
|
107
104
|
import(lines: ImportLine[] | string, opts?: {
|
|
108
105
|
batch?: number;
|
|
109
106
|
strict?: boolean;
|
|
110
107
|
observedAt?: string;
|
|
111
|
-
index?: boolean;
|
|
112
108
|
idempotencyKey?: string;
|
|
113
109
|
}): Promise<Schemas["GraphImportResponse"] & {
|
|
114
110
|
commitSeq: number | null;
|
|
@@ -119,8 +115,6 @@ export declare class LbbClient {
|
|
|
119
115
|
* properties on the subject Resource.
|
|
120
116
|
*/
|
|
121
117
|
importRdf(rdf: string, opts?: RdfImportOptions): Promise<Schemas["GraphRdfImportResponse"]>;
|
|
122
|
-
/** Export the snapshot-visible RDF projection as Turtle, N-Triples, TriG, or N-Quads. */
|
|
123
|
-
exportRdf(opts?: RdfExportOptions): Promise<string>;
|
|
124
118
|
/**
|
|
125
119
|
* Retract specific edges and/or every edge touching given entities. Appends
|
|
126
120
|
* superseding retract events rather than deleting — history stays visible in an
|
|
@@ -273,19 +267,15 @@ export declare class LbbClient {
|
|
|
273
267
|
kind: string;
|
|
274
268
|
run: number;
|
|
275
269
|
}): Promise<Schemas["ModelSplitAudit"]>;
|
|
276
|
-
/**
|
|
277
|
-
* Champion vs challenger retrieval over one pinned snapshot. Returns
|
|
278
|
-
* promotion evidence (hit-rate@k, latency, overlap); never promotes.
|
|
279
|
-
*/
|
|
280
|
-
shadowEval(body: Schemas["ShadowEvalRequest"]): Promise<Schemas["ShadowEvalResponse"]>;
|
|
281
|
-
/**
|
|
282
|
-
* Execution-verified QA probes generated from the graph's current edges —
|
|
283
|
-
* labels are the executed projections, so they are verified by construction.
|
|
284
|
-
* Feeds `shadowEval` directly.
|
|
285
|
-
*/
|
|
270
|
+
/** Execution-verified QA probes generated from the graph's current edges. */
|
|
286
271
|
syntheticEval(opts?: {
|
|
287
272
|
limit?: number;
|
|
288
273
|
}): Promise<Schemas["SyntheticEvalResponse"]>;
|
|
274
|
+
/**
|
|
275
|
+
* Compare champion and challenger retrieval over one pinned published
|
|
276
|
+
* snapshot. The endpoint returns promotion evidence but never promotes.
|
|
277
|
+
*/
|
|
278
|
+
shadowEval(body: Schemas["ShadowEvalRequest"]): Promise<Schemas["ShadowEvalResponse"]>;
|
|
289
279
|
/** The doubling retrain policy: is a retrain due for this model kind? */
|
|
290
280
|
modelCadence(opts: {
|
|
291
281
|
kind: string;
|
|
@@ -303,15 +293,6 @@ export declare class LbbClient {
|
|
|
303
293
|
trainingConfig(): Promise<Schemas["ModelTrainingConfig"]>;
|
|
304
294
|
/** Set the automatic-training configuration (`auto_train` toggle + kinds). */
|
|
305
295
|
setTrainingConfig(body: Schemas["ModelTrainingConfig"]): Promise<Schemas["ModelTrainingConfig"]>;
|
|
306
|
-
/**
|
|
307
|
-
* Verdict on an ask (`accepted` | `rejected` | `corrected` + the right
|
|
308
|
-
* plan), joined to the ask's trace by `ask_id` — the planner fine-tune's
|
|
309
|
-
* explicit feedback capture. `accepted: false` in the response means
|
|
310
|
-
* signal capture is off on this deployment (the contract is identical).
|
|
311
|
-
*/
|
|
312
|
-
askFeedback(body: Schemas["AskFeedbackRequest"], opts?: {
|
|
313
|
-
idempotencyKey?: string;
|
|
314
|
-
}): Promise<Schemas["AskFeedbackResponse"]>;
|
|
315
296
|
ingestSignals(body: Schemas["SignalIngestRequest"], opts?: {
|
|
316
297
|
idempotencyKey?: string;
|
|
317
298
|
}): Promise<Schemas["SignalIngestResponse"]>;
|
|
@@ -324,36 +305,22 @@ export declare class LbbClient {
|
|
|
324
305
|
externalPlannerTrace(payload: Schemas["ExternalPlannerTraceV1"], opts?: {
|
|
325
306
|
idempotencyKey?: string;
|
|
326
307
|
}): Promise<Schemas["SignalIngestResponse"]>;
|
|
327
|
-
/**
|
|
328
|
-
* The planner fine-tune's training feed: accepted/corrected feedback
|
|
329
|
-
* joined to its traces (signals ≤ the split pin), topped up with
|
|
330
|
-
* execution-verified synthetic plans.
|
|
331
|
-
*/
|
|
308
|
+
/** Planner training examples at or before an optional signal split. */
|
|
332
309
|
plannerDataset(opts?: {
|
|
333
310
|
limit?: number;
|
|
334
311
|
splitSeq?: number;
|
|
335
312
|
}): Promise<Schemas["PlannerDatasetResponse"]>;
|
|
336
|
-
/**
|
|
337
|
-
* The DPO pass's training feed: preference pairs from corrected verdicts,
|
|
338
|
-
* paired rejections, and synthetic corrupted-slot pairs.
|
|
339
|
-
*/
|
|
313
|
+
/** Planner preference pairs at or before an optional signal split. */
|
|
340
314
|
plannerPreferenceDataset(opts?: {
|
|
341
315
|
limit?: number;
|
|
342
316
|
splitSeq?: number;
|
|
343
317
|
}): Promise<Schemas["PlannerPreferenceDatasetResponse"]>;
|
|
344
|
-
/**
|
|
345
|
-
* The suggest-ranker trainer's probe feed: `suggestion_adopted` signals
|
|
346
|
-
* (typed prefix + adopted text) ≤ the split pin, topped up with
|
|
347
|
-
* execution-verified synthetic vocabulary pairs.
|
|
348
|
-
*/
|
|
318
|
+
/** Suggest-ranker examples at or before an optional signal split. */
|
|
349
319
|
suggestDataset(opts?: {
|
|
350
320
|
limit?: number;
|
|
351
321
|
splitSeq?: number;
|
|
352
322
|
}): Promise<Schemas["SuggestDatasetResponse"]>;
|
|
353
|
-
/**
|
|
354
|
-
* The extractor fine-tune's training feed: EPISODE transcripts joined to
|
|
355
|
-
* the facts the observe pipeline committed from them.
|
|
356
|
-
*/
|
|
323
|
+
/** Extractor examples at or before an optional signal split. */
|
|
357
324
|
extractorDataset(opts?: {
|
|
358
325
|
limit?: number;
|
|
359
326
|
splitSeq?: number;
|
|
@@ -369,8 +336,7 @@ export declare class LbbClient {
|
|
|
369
336
|
}): Promise<unknown>;
|
|
370
337
|
/**
|
|
371
338
|
* Promote a finished `planner_lora` training run: gated on held-out slot
|
|
372
|
-
* exactness
|
|
373
|
-
* then serves.
|
|
339
|
+
* exactness and recorded as a `kind=planner` training run.
|
|
374
340
|
*/
|
|
375
341
|
promotePlanner(opts: {
|
|
376
342
|
runId: string;
|
|
@@ -386,28 +352,11 @@ export declare class LbbClient {
|
|
|
386
352
|
* pair that admits a single relation flags `signature_forced`.
|
|
387
353
|
*/
|
|
388
354
|
suggest(body: Schemas["SearchSuggestRequest"]): Promise<Schemas["SearchSuggestResponse"]>;
|
|
389
|
-
/**
|
|
390
|
-
* Snap free text to the nearest real vocabulary item. Embedding cosine
|
|
391
|
-
* on a managed graph, else lexical; never fabricates a term.
|
|
392
|
-
*/
|
|
355
|
+
/** Snap free text to the nearest term in the pinned published vocabulary. */
|
|
393
356
|
resolveTerm(body: Schemas["ResolveTermRequest"]): Promise<Schemas["ResolveTermResponse"]>;
|
|
394
|
-
/**
|
|
395
|
-
* Ground a natural-language question to the graph's real vocabulary, retrieve
|
|
396
|
-
* against the pinned snapshot, and answer with citations (`/v1/ask`).
|
|
397
|
-
*/
|
|
398
|
-
ask(body: Schemas["AskRequest"]): Promise<Schemas["AskResponse"]>;
|
|
399
|
-
/**
|
|
400
|
-
* Name the relation between two entities (`/v1/decode`): the DB narrows the
|
|
401
|
-
* candidates to the type pair's admissible relations, answers alone
|
|
402
|
-
* when the pair forces a single relation, and otherwise decodes it with the
|
|
403
|
-
* graph-native fine-tuned model — the "DB narrows, cheap model decodes" call.
|
|
404
|
-
*/
|
|
357
|
+
/** Decode a relation from the graph's admissible published vocabulary. */
|
|
405
358
|
decode(body: Schemas["DecodeRequest"]): Promise<Schemas["DecodeResponse"]>;
|
|
406
|
-
/**
|
|
407
|
-
* Report which completion mechanisms will carry on this graph:
|
|
408
|
-
* signature sparsity, name semantics, sampled narrowing recall, and a
|
|
409
|
-
* narrow / narrow+finetune / lexical-first recommendation.
|
|
410
|
-
*/
|
|
359
|
+
/** Report completion strategy fitness for the pinned published graph. */
|
|
411
360
|
groundability(opts?: {
|
|
412
361
|
sample?: number;
|
|
413
362
|
}): Promise<Schemas["GroundabilityReport"]>;
|
|
@@ -438,8 +387,6 @@ export declare class LbbClient {
|
|
|
438
387
|
name?: string;
|
|
439
388
|
relations?: string[];
|
|
440
389
|
asOf?: string;
|
|
441
|
-
/** Require the bounded ranged-adjacency path; returns `index_busy` while unavailable. */
|
|
442
|
-
indexed?: boolean;
|
|
443
390
|
}): Promise<Schemas["EntityNeighborhoodResponse"]>;
|
|
444
391
|
/** Exact type cardinality plus a bounded deterministic sample from ranged adjacency. */
|
|
445
392
|
entityTypeSample(opts: {
|
|
@@ -466,37 +413,11 @@ export declare class LbbClient {
|
|
|
466
413
|
asOf?: string;
|
|
467
414
|
asOfCommitSeq?: number;
|
|
468
415
|
}): Promise<Schemas["EntityDetailResponse"]>;
|
|
469
|
-
/**
|
|
470
|
-
* Paged edge listing. Scope to one node with `id` (or `type`+`name`) and a
|
|
471
|
-
* `direction` (`out`/`in`/`both`) to walk **every** edge of a high-degree node
|
|
472
|
-
* — `entityDetail` returns the full set but is awkward to page; this carries
|
|
473
|
-
* `offset`/`limit` and reports `total_count`. Optional `relation`/`q` filters
|
|
474
|
-
* and an `asOf`/`asOfCommitSeq` snapshot pin. Each row carries `valid_time`, so
|
|
475
|
-
* the page is enough to reconstruct a per-edge timeline.
|
|
476
|
-
*/
|
|
477
|
-
graphEdges(opts?: {
|
|
478
|
-
id?: string;
|
|
479
|
-
type?: string;
|
|
480
|
-
name?: string;
|
|
481
|
-
direction?: "out" | "in" | "both";
|
|
482
|
-
relation?: string;
|
|
483
|
-
q?: string;
|
|
484
|
-
limit?: number;
|
|
485
|
-
/** Opaque cursor from a previous page's `next_cursor`. */
|
|
486
|
-
cursor?: string | number;
|
|
487
|
-
/** @deprecated Legacy alias for `cursor` (still accepted by the server). */
|
|
488
|
-
offset?: number;
|
|
489
|
-
asOf?: string;
|
|
490
|
-
asOfCommitSeq?: number;
|
|
491
|
-
}): Promise<ListResponse<Schemas["GraphEdgeRow"]>>;
|
|
492
416
|
/**
|
|
493
417
|
* Page through every row of a list endpoint, following `next_cursor` until
|
|
494
418
|
* exhausted. Pass a fetcher that takes a cursor and returns a
|
|
495
419
|
* {@link ListResponse}:
|
|
496
|
-
*
|
|
497
|
-
* for await (const e of client.listAll((cursor) =>
|
|
498
|
-
* client.entities.list({ cursor, fields: "title" }))) { … }
|
|
499
|
-
* ```
|
|
420
|
+
* The caller supplies a bounded collection endpoint and its cursor.
|
|
500
421
|
*/
|
|
501
422
|
listAll<T>(fetchPage: (cursor?: string) => Promise<ListResponse<T>>): AsyncGenerator<T, void, unknown>;
|
|
502
423
|
/** Current state of an entity's relations, optionally as-of a timestamp. */
|
|
@@ -507,8 +428,6 @@ export declare class LbbClient {
|
|
|
507
428
|
transitions(body: Schemas["EntityTransitionsRequest"]): Promise<Schemas["EntityTransitionsResponse"]>;
|
|
508
429
|
/** Lineage and evidence for a single edge. */
|
|
509
430
|
why(body: Schemas["WhyRequest"]): Promise<Schemas["WhyResponse"]>;
|
|
510
|
-
/** SHACL-style shape/pattern query. */
|
|
511
|
-
shacl(body: Schemas["ShaclQueryRequest"]): Promise<Schemas["ShaclQueryResponse"]>;
|
|
512
431
|
/**
|
|
513
432
|
* SPARQL-subset SELECT/ASK/aggregate query (FILTER, HAVING, ORDER BY, ASK,
|
|
514
433
|
* COUNT/SUM/AVG/MIN/MAX). GROUP BY is not limited to entity identity:
|
|
@@ -538,28 +457,6 @@ export declare class LbbClient {
|
|
|
538
457
|
* optional/union/negated leg rather than a grouped aggregate.
|
|
539
458
|
*/
|
|
540
459
|
analytics(body: Schemas["AnalyticQueryRequest"]): Promise<Schemas["AnalyticQueryResponse"]>;
|
|
541
|
-
/**
|
|
542
|
-
* Run inference rules (SHACL-AF `sh:TripleRule` shape) to a bounded fixpoint
|
|
543
|
-
* and return the derived edges as a **preview** — derived facts are never
|
|
544
|
-
* written to the asserted graph. Each rule is a BGP `body`/`where` plus a
|
|
545
|
-
* `head` triple template instantiated per binding.
|
|
546
|
-
*/
|
|
547
|
-
infer(body: Schemas["InferenceRunRequest"]): Promise<Schemas["InferenceRunResponse"]>;
|
|
548
|
-
/**
|
|
549
|
-
* Define (replace) the versioned rule set stored on the scoped graph branch.
|
|
550
|
-
* The stored set is what SHACL `include_derived` and `infer` use when a
|
|
551
|
-
* request carries no inline rules. Returns the new `rules_version`.
|
|
552
|
-
*/
|
|
553
|
-
defineRules(body: Schemas["RuleSetDefineRequest"]): Promise<Schemas["RuleSetDefineResponse"]>;
|
|
554
|
-
/** The rule set stored on the scoped graph branch (version + rules). */
|
|
555
|
-
graphRules(): Promise<Schemas["RuleSet"]>;
|
|
556
|
-
/**
|
|
557
|
-
* Derive edges from calibrated retrieval matches (preview): each
|
|
558
|
-
* candidate scored `P >= threshold` becomes a derived edge `(anchor, relation,
|
|
559
|
-
* matched)` with a typed `Retrieval` provenance leaf. Pass either explicit
|
|
560
|
-
* `candidates` or a `query` the server runs as BM25 entity retrieval.
|
|
561
|
-
*/
|
|
562
|
-
retrievalPremises(body: Schemas["RetrievalPremiseRequest"]): Promise<Schemas["RetrievalPremiseResponse"]>;
|
|
563
460
|
/**
|
|
564
461
|
* The active ontology (entity types and relations) for the scoped graph.
|
|
565
462
|
* Pass `{ counts: true }` to include a per-relation current-edge count
|
|
@@ -573,11 +470,10 @@ export declare class LbbClient {
|
|
|
573
470
|
* Audit the current snapshot against the ontology's *implied* constraints —
|
|
574
471
|
* capped `cardinality` derived as `sh:maxCount` — returning a SHACL-shaped
|
|
575
472
|
* report. Whole-snapshot and never blocks a write. Unlike
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
* {@link ontologyView} for which decorations are enforced.
|
|
473
|
+
* The report is referenced by the pinned published read root and carries its
|
|
474
|
+
* own validation watermark and ontology/shapes provenance.
|
|
579
475
|
*/
|
|
580
|
-
ontologyConformance(): Promise<Schemas["SchemaAuditReport"]>;
|
|
476
|
+
ontologyConformance(opts?: Pick<ReadConsistencyOptions, "consistency">): Promise<Schemas["SchemaAuditReport"]>;
|
|
581
477
|
/** Discover ontology concepts, terms, and relations. */
|
|
582
478
|
ontologySearch(body: Schemas["OntologySearchRequest"]): Promise<Schemas["OntologySearchResponse"]>;
|
|
583
479
|
/** Resolve mentions to concepts/entities. */
|
|
@@ -593,47 +489,6 @@ export declare class LbbClient {
|
|
|
593
489
|
evolveOntology(body: Schemas["OntologyEvolveRequest"]): Promise<Schemas["OntologyEvolveResponse"]>;
|
|
594
490
|
/** Suggest ontology additions from the current graph without mutating it. */
|
|
595
491
|
induceOntology(body: Schemas["OntologyInduceRequest"]): Promise<Schemas["OntologyInduceResponse"]>;
|
|
596
|
-
/**
|
|
597
|
-
* Build default ANN + BM25 indexes. With `{ background: true }` the build
|
|
598
|
-
* runs detached on the server and the call returns immediately — use it for
|
|
599
|
-
* large corpora whose synchronous build would exceed a fronting gateway's
|
|
600
|
-
* timeout (a 504), then poll `metadata()` for completion.
|
|
601
|
-
*/
|
|
602
|
-
indexBuild(opts?: {
|
|
603
|
-
background?: boolean;
|
|
604
|
-
}): Promise<unknown>;
|
|
605
|
-
/**
|
|
606
|
-
* Build BM25, ANN/vector, and adjacency index families. With
|
|
607
|
-
* `{ background: true }` the build runs detached on the server and the call
|
|
608
|
-
* returns immediately — use it for large corpora whose synchronous build would
|
|
609
|
-
* exceed a fronting gateway's timeout, then poll `metadata()` for completion.
|
|
610
|
-
*/
|
|
611
|
-
indexRun(opts?: {
|
|
612
|
-
background?: boolean;
|
|
613
|
-
}): Promise<unknown>;
|
|
614
|
-
/** Submit a durable full-index build. Requires a reconnect-safe idempotency key. */
|
|
615
|
-
indexSubmit(body: Partial<Schemas["IndexBuildOptions"]> | undefined, opts: {
|
|
616
|
-
idempotencyKey: string;
|
|
617
|
-
}): Promise<Schemas["SearchIndexJobStatusResponse"]>;
|
|
618
|
-
/** Poll a durable full-index build. */
|
|
619
|
-
indexJob(jobId: string): Promise<Schemas["SearchIndexJobStatusResponse"]>;
|
|
620
|
-
/** Cancel a durable full-index build. Repeated cancellation returns its current terminal status. */
|
|
621
|
-
cancelIndexJob(jobId: string): Promise<Schemas["SearchIndexJobStatusResponse"]>;
|
|
622
|
-
/** Append a BM25 delta segment for the unindexed WAL tail. */
|
|
623
|
-
indexDelta(): Promise<Schemas["IndexDeltaResponse"]>;
|
|
624
|
-
/** Preview or delete superseded persisted index runs. */
|
|
625
|
-
indexGc(opts?: {
|
|
626
|
-
keepRuns?: number;
|
|
627
|
-
dryRun?: boolean;
|
|
628
|
-
}): Promise<Schemas["IndexGcResponse"]>;
|
|
629
|
-
/** Submit durable, cancellable index garbage collection. */
|
|
630
|
-
indexGcSubmit(body: Schemas["IndexGcRequest"] | undefined, opts: {
|
|
631
|
-
idempotencyKey: string;
|
|
632
|
-
}): Promise<Schemas["IndexGcJobStatusResponse"]>;
|
|
633
|
-
/** Poll exact planning/deletion progress for durable index garbage collection. */
|
|
634
|
-
indexGcJob(jobId: string): Promise<Schemas["IndexGcJobStatusResponse"]>;
|
|
635
|
-
/** Cancel durable index garbage collection. */
|
|
636
|
-
cancelIndexGcJob(jobId: string): Promise<Schemas["IndexGcJobStatusResponse"]>;
|
|
637
492
|
/** Fold the WAL tail into snapshot segments. */
|
|
638
493
|
compact(opts?: {
|
|
639
494
|
minTailCommits?: number;
|
|
@@ -641,11 +496,9 @@ export declare class LbbClient {
|
|
|
641
496
|
}): Promise<Schemas["WalCompactResponse"]>;
|
|
642
497
|
/** Server, graph, and persisted-index status. */
|
|
643
498
|
status(): Promise<unknown>;
|
|
644
|
-
/** Graph footprint, WAL tail, and index coverage.
|
|
499
|
+
/** Graph footprint, WAL tail, and published-index coverage. */
|
|
645
500
|
metadata(opts?: {
|
|
646
|
-
includeObjects?: boolean;
|
|
647
501
|
includeIndexes?: boolean;
|
|
648
|
-
includeTemporalCoverage?: boolean;
|
|
649
502
|
}): Promise<Schemas["GraphMetadataResponse"]>;
|
|
650
503
|
waitForIndexLineage(targetSeq: number, opts?: {
|
|
651
504
|
timeoutMs?: number;
|
|
@@ -653,6 +506,8 @@ export declare class LbbClient {
|
|
|
653
506
|
}): Promise<IndexLineageObservation>;
|
|
654
507
|
/** Graph counts and type/relation buckets. Carries `consistency`/`min_indexed_seq` on the URL. */
|
|
655
508
|
summary(opts?: ReadConsistencyOptions): Promise<Schemas["GraphSummaryResponse"]>;
|
|
509
|
+
/** Pinned published read root and its query/conformance lag against one coherent head. */
|
|
510
|
+
readSnapshot(): Promise<Schemas["PublishedReadStatusResponse"]>;
|
|
656
511
|
/** List the graphs (and branches) under the scoped tenant. */
|
|
657
512
|
listGraphs(): Promise<Schemas["GraphListResponse"]>;
|
|
658
513
|
}
|