@littlebigbrain/client 0.4.1 → 0.4.3

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 CHANGED
@@ -1,169 +1,101 @@
1
1
  # @littlebigbrain/client
2
2
 
3
- TypeScript client for the [little big brain](https://littlebigbrain.com) graph + hybrid search HTTP
4
- API. Request and response types are generated from the committed
5
- [`contracts/openapi.json`](https://github.com/littlebigbrains/lbb-typescript/blob/main/contracts/openapi.json) (the single source of
6
- truth, derived from the Rust `lbb-api` types); the client itself is a thin,
7
- dependency-free wrapper over the platform `fetch`.
3
+ Typed TypeScript client for little big brain: ingest, BM25/vector/graph index,
4
+ authorized hybrid search, traversal, ontology, feedback, and training jobs.
5
+ Runs on Node 18+, browsers, and edge workers using the platform `fetch`.
8
6
 
9
7
  ```sh
10
8
  npm install @littlebigbrain/client
11
9
  ```
12
10
 
13
- ## Usage
11
+ ## Five-minute start
14
12
 
15
13
  ```ts
16
- import { LbbClient, LbbError } from "@littlebigbrain/client";
14
+ import { LbbClient } from "@littlebigbrain/client";
17
15
 
18
16
  const lbb = new LbbClient({
19
17
  baseUrl: "https://db.eu.littlebigbrain.com",
20
- apiKey: process.env.LBB_API_KEY, // lbb_sk_test_… or lbb_sk_live_…
18
+ apiKey: process.env.LBB_API_KEY,
21
19
  });
22
-
23
20
  const graph = lbb.graph("main");
24
21
 
25
22
  await graph.facts.create({
26
- triplets: [
27
- {
28
- source: { type: "SERVICE", name: "auth-service" },
29
- relation: "WRITES_TO",
30
- target: { type: "DATABASE", name: "user-db" },
31
- confidence: 0.93,
32
- evidence: "auth-service writes identity records to user-db",
33
- },
34
- ],
35
- }, {
36
- idempotencyKey: "import-2026-06-13",
37
- });
23
+ triplets: [{
24
+ source: { type: "CONCEPT", name: "policy-42" },
25
+ relation: "RELATED_TO",
26
+ target: { type: "CONCEPT", name: "seven-year retention" },
27
+ evidence: "Customer records are retained for seven years.",
28
+ }],
29
+ }, { idempotencyKey: "policy-42-v1" });
38
30
 
39
31
  await graph.indexes.run({ wait: true });
40
32
 
41
- const results = await graph.search.hybrid("which systems store customer identity data", {
42
- topK: 5,
43
- source: "persisted",
44
- consistency: "strong",
45
- targets: ["entities", "assertions"],
46
- });
47
- for (const assertion of results.assertions ?? []) {
48
- console.log(assertion.relation?.name, assertion.score);
49
- }
33
+ const results = await graph.search.hybrid(
34
+ "How long are customer records retained?",
35
+ { topK: 10, source: "persisted", consistency: "strong" },
36
+ );
50
37
  ```
51
38
 
52
- Use `client.graph("name")` to scope graph writes and `client.rawRequest(...)`
53
- when you need response metadata (`requestId`, `version`, headers). Every method
54
- returns parsed JSON and throws `LbbError` with `status`, `type`, `code`,
55
- `message`, `param`, `requestId`, and `docUrl` on a non-2xx response.
39
+ Methods return parsed JSON and throw `LbbError` on non-2xx responses. Safe
40
+ reads and idempotency-keyed writes retry transient failures and honor
41
+ `Retry-After`. Keep live stack keys on the server, never in browser bundles.
56
42
 
57
- Requests have a 120-second per-attempt timeout by default (`timeoutMs: 0`
58
- disables it). Safe reads and idempotency-keyed writes retry `429`/`5xx` and
59
- network failures up to twice, honoring `Retry-After` with a one-minute cap.
60
- Bulk NDJSON and RDF imports receive an idempotency key automatically unless you
61
- provide one explicitly. The preferred namespaced surface accepts the same final
62
- request options everywhere: `timeoutMs`, `maxRetries`, `signal`, `headers`, and
63
- `idempotencyKey` for mutations.
43
+ ## Enterprise search integrations
64
44
 
65
- ## Preferred surface
45
+ Keep the host product's users, connectors, tasks, and cursors in its existing
46
+ database. Put searchable documents, passages, facts, embeddings, indexes,
47
+ feedback, and model runs in little big brain:
66
48
 
67
- Scope once with `client.graph("name", { branch })`; its `facts`, `search`,
68
- `entities`, `indexes`, `schema`, `ontology`, `query`, and `context` namespaces
69
- all carry that graph and branch. The original flat methods remain available for
70
- compatibility.
49
+ 1. Give every document/chunk/passage a stable external key.
50
+ 2. Bulk-import content, provenance, and native ACL/tag/project sets.
51
+ 3. Configure managed embeddings; build ANN, BM25, and adjacency once per batch.
52
+ 4. Filter by ACL inside the search request before ranking and return projected
53
+ fields on the ranked hits.
54
+ 5. Grade cited results, reconnect to durable trainer jobs, and require a
55
+ held-out quality plus latency gate before promotion.
71
56
 
72
- ```ts
73
- const graph = lbb.graph("main", { branch: "review" });
57
+ The [enterprise-search integration guide](https://docs.littlebigbrain.com/guides/enterprise-search/)
58
+ contains the graph model, migration sequence, and acceptance tests.
74
59
 
75
- const answer = await graph.context.ask({ question: "what stores identity data?" });
76
- const ontology = await graph.ontology.view({ counts: true });
77
- const rows = await graph.query.sparql({ query: "SELECT ?s WHERE { ?s ?p ?o }" });
60
+ ## Main surface
78
61
 
79
- for await (const entity of graph.entities.iterate({ fields: ["owner", "status"] })) {
80
- console.log(entity.name, entity.attributes);
81
- }
62
+ ```ts
63
+ graph.facts.create(...)
64
+ graph.facts.import(...)
65
+ graph.search.hybrid(...)
66
+ graph.entities.iterate(...)
67
+ graph.context.ask(...)
68
+ graph.ontology.view(...)
69
+ graph.query.sparql(...)
70
+ graph.schema.audit(...)
82
71
  ```
83
72
 
84
- Use `entities.pages(...)` when page metadata matters, or `entities.iterate(...)`
85
- to yield rows directly. Both follow the server cursor and fail if a cursor
86
- repeats instead of looping forever.
87
-
88
- For instrumentation, `onRequest` fires before each attempt and `onResponse`
89
- fires once for the final response; neither event contains bodies or
90
- credentials. `rawRequest(...)` additionally reports `attempts`, `retryCount`,
91
- and `elapsedMs`.
92
-
93
- ## Methods
94
-
95
- | Area | Methods |
96
- | --- | --- |
97
- | Write | `graph("main").facts.create` |
98
- | Managed embeddings | `graph("main").embeddingConfig`, `graph("main").setEmbeddingConfig`, `graph("main").backfillEmbeddings`, `graph("main").promoteEmbedding` |
99
- | Search | `search.hybrid`, `search.multi`, `search.fullText`, `search.vector` |
100
- | Context substrate | `context.ask`, `context.suggest`, `context.resolve`, `context.decode`, `context.groundability` |
101
- | Search feedback (training data) | `search.feedback`, `search.feedbackExport` |
102
- | Traversal | `traverse`, `semanticTraverse` |
103
- | Temporal / lineage / shapes | `currentState`, `history`, `why`, `shacl` |
104
- | Query | `query.sparql`, `query.structured`, `query.analytics`, `query.shacl`, `query.infer`, `query.premises` |
105
- | Ontology | `ontology.view`, `ontology.conformance`, `ontology.search`, `ontology.resolve`, `ontology.define`, `ontology.evolve`, `ontology.induce` |
106
- | Index lifecycle | `indexes.run`, `indexes.build`, `indexes.delta`, `indexes.gc`, `compact` |
107
- | Inspection | `entities.list`, `entities.filterByAttributes`, `status`, `metadata`, `summary` |
108
- | Schema activation | `schema.view`, `schema.preview`, `schema.publish`, `schema.audit` |
109
-
110
- Common request/response shapes have direct imports such as `SearchRequest`,
111
- `SearchResponse`, `Entity`, `GraphSummary`, `CommitRequest`, `AskResponse`, and
112
- `SchemaView`. Every generated shape remains available as `Schemas["TypeName"]`;
113
- the raw `components`, `paths`, and `operations` are exported too.
114
-
115
- ## SPARQL
73
+ Other focused methods cover managed embeddings, full-text/vector search,
74
+ multi-query fusion, traversal, temporal state/history, SHACL, ontology
75
+ evolution, feedback, indexing, and graph inspection. Request/response types are
76
+ generated from `contracts/openapi.json`; common aliases and the complete
77
+ `Schemas` map are exported from the package.
116
78
 
117
- `client.sparqlRows(...)` runs a SPARQL 1.1 text query (SELECT or ASK) and
118
- returns parsed results, so you never have to `JSON.parse` the results string or
119
- zip `head.vars` with binding values yourself:
79
+ Use `rawRequest()` when you need response headers, request ID, retry count, or
80
+ elapsed time. `onRequest` and `onResponse` provide body-free instrumentation.
120
81
 
121
- ```ts
122
- const { vars, rows } = await client.sparqlRows({
123
- query: `SELECT ?service ?db WHERE {
124
- ?service <https://littlebigbrain.com/r/writes_to> ?db
125
- } LIMIT 10`,
126
- reason: true, // optional: fold in rule-derived edges
127
- });
128
- for (const row of rows) console.log(row.service, "->", row.db);
129
-
130
- const exists = (await client.sparqlRows({ query: "ASK { ?s ?p ?o }" })).boolean;
131
- ```
132
-
133
- For app code that already has relation patterns but just needs typed attribute
134
- predicates, `client.entities.filterByAttributes(...)` builds the structured
135
- SPARQL filter body without exposing RDF property IRIs:
82
+ ## SPARQL
136
83
 
137
84
  ```ts
138
- await client.entities.filterByAttributes({
139
- patterns: [{ subject: { var: "service" }, predicate: "WRITES_TO", object: { var: "db" } }],
140
- where: [{ field: "slo", op: "ge", value: 0.99 }, { var: "db", field: "tier", value: "prod" }],
141
- select: ["service"],
85
+ const { rows } = await lbb.sparqlRows({
86
+ query: `SELECT ?doc WHERE { ?doc ?p ?o } LIMIT 10`,
142
87
  });
143
88
  ```
144
89
 
145
- `sparqlRows` returns `{ vars, boolean, bindings, rows }`: `rows` is the bindings
146
- flattened to `{ variable: lexicalValue }`, `bindings` keeps the raw typed term
147
- objects, and `boolean` is the ASK answer (or `null` for a SELECT). `client.sparqlText(...)`
148
- returns the unparsed envelope, and the standalone `parseSparqlResults(response)`
149
- helper (also exported) parses it. For the structured BGP form use
150
- `client.sparql(body)` (`SparqlSelectRequest`).
151
-
152
- A standalone stack also serves the **native SPARQL 1.1 Protocol** at `/sparql`
153
- (`GET ?query=`, `POST` form or `application/sparql-query` body,
154
- `Accept`-negotiated JSON/XML/CSV/TSV) for off-the-shelf SPARQL clients (YASGUI,
155
- Protégé); `sparqlRows` returns parsed JSON rows for in-process use.
90
+ `sparqlRows` parses SELECT/ASK results. The native SPARQL 1.1 Protocol is also
91
+ available at `/sparql` for standard RDF clients.
156
92
 
157
93
  ## Develop
158
94
 
159
95
  ```sh
160
96
  npm install
161
- npm run generate # regenerate src/schema.ts from ../../contracts/openapi.json
162
- npm run build # tsc -> dist/
163
- npm test # build + node:test (mocked fetch)
164
- npm run test:coverage
165
- npm run pack:check # exact tarball: publint + ATTW
97
+ npm run generate
98
+ npm run typecheck
99
+ npm test
100
+ npm run pack:check
166
101
  ```
167
-
168
- `runtime`: any environment with a global `fetch` (Node 18+, browsers, edge
169
- workers), or pass your own via the `fetch` option.
@@ -77,6 +77,7 @@ export declare class SearchNamespace {
77
77
  multi(body: Schemas["HybridMultiSearchRequest"], opts?: CallOptions): Promise<Schemas["HybridMultiSearchResponse"]>;
78
78
  feedback(body: Schemas["SearchFeedbackRequest"], opts?: CallOptions): Promise<Schemas["SearchFeedbackResponse"]>;
79
79
  feedbackExport(opts?: CallOptions): Promise<Schemas["SearchFeedbackExportResponse"]>;
80
+ feedbackSummary(opts?: CallOptions): Promise<Schemas["SearchFeedbackSummaryResponse"]>;
80
81
  fullText(body: Schemas["FullTextSearchRequest"], opts?: CallOptions): Promise<Schemas["FullTextSearchResponse"]>;
81
82
  vector(body: Schemas["EmbeddingSearchRequest"], opts?: CallOptions): Promise<Schemas["EmbeddingSearchResponse"]>;
82
83
  }
@@ -184,6 +184,9 @@ export class SearchNamespace {
184
184
  feedbackExport(opts = {}) {
185
185
  return this.client.request("GET", "/v1/search/feedback/export", opts);
186
186
  }
187
+ feedbackSummary(opts = {}) {
188
+ return this.client.request("GET", "/v1/search/feedback/summary", opts);
189
+ }
187
190
  fullText(body, opts = {}) {
188
191
  return this.client.request("POST", "/v1/search/full-text", {
189
192
  ...opts,
package/dist/schema.d.ts CHANGED
@@ -429,6 +429,41 @@ export interface paths {
429
429
  patch?: never;
430
430
  trace?: never;
431
431
  };
432
+ "/v1/graph/export": {
433
+ parameters: {
434
+ query?: never;
435
+ header?: never;
436
+ path?: never;
437
+ cookie?: never;
438
+ };
439
+ /** Stream a full-fidelity NDJSON export (inverse of /v1/graph/import): a kind-tagged meta header (with the source ontology), then entity and edge lines that reconstruct an equivalent graph on re-import. Paginated via meta.next_cursor echoed as ?cursor= */
440
+ get: operations["get_v1_graph_export"];
441
+ put?: never;
442
+ post?: never;
443
+ delete?: never;
444
+ options?: never;
445
+ head?: never;
446
+ patch?: never;
447
+ trace?: never;
448
+ };
449
+ "/v1/graph/export/job": {
450
+ parameters: {
451
+ query?: never;
452
+ header?: never;
453
+ path?: never;
454
+ cookie?: never;
455
+ };
456
+ /** Poll an enqueued background export job by ?job_id= (scoped to the requesting tenant) */
457
+ get: operations["get_v1_graph_export_job"];
458
+ put?: never;
459
+ /** Enqueue a background full-fidelity export for a large tenant; writes zstd NDJSON parts + a manifest under tenants/<tenant>/exports/<id>/. Returns the job id; poll with GET /v1/graph/export/job?job_id= */
460
+ post: operations["post_v1_graph_export_job"];
461
+ delete?: never;
462
+ options?: never;
463
+ head?: never;
464
+ patch?: never;
465
+ trace?: never;
466
+ };
432
467
  "/v1/graph/export/rdf": {
433
468
  parameters: {
434
469
  query?: never;
@@ -5869,6 +5904,10 @@ export interface components {
5869
5904
  * idempotent replays do not advance it and retractions do.
5870
5905
  */
5871
5906
  latest_label_sequence: number;
5907
+ /**
5908
+ * @description Label objects fetched for this request. Zero on a materialized-cache hit;
5909
+ * a rebuild reports the bounded source objects it read.
5910
+ */
5872
5911
  objects_scanned: number;
5873
5912
  promoted_models: components["schemas"]["SearchFeedbackPromotedModel"][];
5874
5913
  raw_events: number;
@@ -6722,7 +6761,28 @@ export interface components {
6722
6761
  */
6723
6762
  hit_rate_at_k: number;
6724
6763
  /** Format: double */
6764
+ latency_p50_ms?: number;
6765
+ /** Format: double */
6766
+ latency_p95_ms?: number;
6767
+ /** Format: double */
6768
+ latency_p99_ms?: number;
6769
+ /** Format: double */
6725
6770
  mean_latency_ms: number;
6771
+ /**
6772
+ * Format: float
6773
+ * @description Mean reciprocal rank of the first expected target in top-k.
6774
+ */
6775
+ mrr_at_k?: number;
6776
+ /**
6777
+ * Format: float
6778
+ * @description Mean binary-relevance nDCG over top-k.
6779
+ */
6780
+ ndcg_at_k?: number;
6781
+ /**
6782
+ * Format: float
6783
+ * @description Mean fraction of each query's expected targets recovered in top-k.
6784
+ */
6785
+ recall_at_k?: number;
6726
6786
  };
6727
6787
  /**
6728
6788
  * @description `POST /v1/models/shadow-eval` — champion vs challenger retrieval over the
@@ -6876,6 +6936,19 @@ export interface components {
6876
6936
  * `GET /v1/graph/metadata` and on the entity read's metadata.
6877
6937
  */
6878
6938
  compacted_seq: components["schemas"]["CommitSeq"];
6939
+ /**
6940
+ * @description F2 (roadmap 18.3): true when this snapshot was served from the in-memory
6941
+ * cache while storage was degraded and the latest head could not be
6942
+ * verified — so `commit_seq` may not be the current head. Absent (false) on
6943
+ * every normal read; writes never serve stale. Omitted from the wire form
6944
+ * when false so healthy responses are byte-identical to before.
6945
+ */
6946
+ stale?: boolean;
6947
+ /**
6948
+ * @description The reason a read is `stale` (F2). `"storage_degraded"` today; omitted
6949
+ * when not stale.
6950
+ */
6951
+ stale_reason?: string | null;
6879
6952
  };
6880
6953
  /**
6881
6954
  * @description One aggregate projection: `func(operand) AS as_var`. `operand` is absent for
@@ -7448,6 +7521,32 @@ export interface components {
7448
7521
  /** @description Human-readable one-liner for the console status surface. */
7449
7522
  reason: string;
7450
7523
  };
7524
+ /** @description Bounded in-flight work counters for a durable trainer job. */
7525
+ TrainModelJobProgress: {
7526
+ completed_candidates: number;
7527
+ /** @description Completed expensive probe replays, not merely distinct input probes. */
7528
+ completed_probes: number;
7529
+ /**
7530
+ * Format: int64
7531
+ * @description Linear estimate from work completed so far. Absent before the first
7532
+ * measured probe or for trainers without fine-grained progress.
7533
+ */
7534
+ estimated_duration_ms?: number | null;
7535
+ /**
7536
+ * Format: int64
7537
+ * @description Worker heartbeat attached to this progress snapshot.
7538
+ */
7539
+ heartbeat_micros: number;
7540
+ /**
7541
+ * Format: float
7542
+ * @description Monotonic completion percentage in `[0, 100]`.
7543
+ */
7544
+ percentage: number;
7545
+ /** @description `preparing` | `candidate_search` | `held_out_gate` | kind-specific stage. */
7546
+ phase: string;
7547
+ total_candidates: number;
7548
+ total_probes: number;
7549
+ };
7451
7550
  /**
7452
7551
  * @description Durable background trainer status. The terminal `result` carries the full
7453
7552
  * snapshot lineage, held-out gate evidence, and recorded run number.
@@ -7460,6 +7559,7 @@ export interface components {
7460
7559
  graph: components["schemas"]["GraphKey"];
7461
7560
  job_id: string;
7462
7561
  kind: string;
7562
+ progress?: null | components["schemas"]["TrainModelJobProgress"];
7463
7563
  result?: null | components["schemas"]["TrainModelResponse"];
7464
7564
  stage?: string | null;
7465
7565
  /** @description `pending` | `running` | `succeeded` | `failed`. */
@@ -11453,6 +11553,426 @@ export interface operations {
11453
11553
  };
11454
11554
  };
11455
11555
  };
11556
+ get_v1_graph_export: {
11557
+ parameters: {
11558
+ query?: {
11559
+ /** @description Graph name (default `main`) */
11560
+ graph?: string;
11561
+ /** @description Branch name (default `main`) */
11562
+ branch?: string;
11563
+ /** @description Records (entity+edge lines) per page (default 1000, clamped 1-50000) */
11564
+ limit?: string;
11565
+ /** @description Opaque page cursor from a prior page's meta.next_cursor; pins the snapshot across pages */
11566
+ cursor?: string;
11567
+ /** @description Pin the export to a past snapshot commit_seq (first page only) */
11568
+ as_of_commit_seq?: string;
11569
+ };
11570
+ header?: {
11571
+ /** @description API contract version to pin. Use `2026-06-22` for this beta-breaking shape. */
11572
+ "Lbb-Version"?: string;
11573
+ };
11574
+ path?: never;
11575
+ cookie?: never;
11576
+ };
11577
+ requestBody?: never;
11578
+ responses: {
11579
+ /** @description OK */
11580
+ 200: {
11581
+ headers: {
11582
+ /** @description API contract version used for the response */
11583
+ "Lbb-Version"?: string;
11584
+ /** @description Request correlation id */
11585
+ "X-Request-Id"?: string;
11586
+ [name: string]: unknown;
11587
+ };
11588
+ content: {
11589
+ "application/json": Record<string, never>;
11590
+ };
11591
+ };
11592
+ /** @description Bad request */
11593
+ 400: {
11594
+ headers: {
11595
+ /** @description API contract version used for the response */
11596
+ "Lbb-Version"?: string;
11597
+ /** @description Request correlation id */
11598
+ "X-Request-Id"?: string;
11599
+ [name: string]: unknown;
11600
+ };
11601
+ content: {
11602
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11603
+ };
11604
+ };
11605
+ /** @description Unauthorized */
11606
+ 401: {
11607
+ headers: {
11608
+ /** @description API contract version used for the response */
11609
+ "Lbb-Version"?: string;
11610
+ /** @description Request correlation id */
11611
+ "X-Request-Id"?: string;
11612
+ [name: string]: unknown;
11613
+ };
11614
+ content: {
11615
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11616
+ };
11617
+ };
11618
+ /** @description Forbidden */
11619
+ 403: {
11620
+ headers: {
11621
+ /** @description API contract version used for the response */
11622
+ "Lbb-Version"?: string;
11623
+ /** @description Request correlation id */
11624
+ "X-Request-Id"?: string;
11625
+ [name: string]: unknown;
11626
+ };
11627
+ content: {
11628
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11629
+ };
11630
+ };
11631
+ /** @description Not found */
11632
+ 404: {
11633
+ headers: {
11634
+ /** @description API contract version used for the response */
11635
+ "Lbb-Version"?: string;
11636
+ /** @description Request correlation id */
11637
+ "X-Request-Id"?: string;
11638
+ [name: string]: unknown;
11639
+ };
11640
+ content: {
11641
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11642
+ };
11643
+ };
11644
+ /** @description Conflict */
11645
+ 409: {
11646
+ headers: {
11647
+ /** @description API contract version used for the response */
11648
+ "Lbb-Version"?: string;
11649
+ /** @description Request correlation id */
11650
+ "X-Request-Id"?: string;
11651
+ [name: string]: unknown;
11652
+ };
11653
+ content: {
11654
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11655
+ };
11656
+ };
11657
+ /** @description Rate limit exceeded */
11658
+ 429: {
11659
+ headers: {
11660
+ /** @description API contract version used for the response */
11661
+ "Lbb-Version"?: string;
11662
+ /** @description Request correlation id */
11663
+ "X-Request-Id"?: string;
11664
+ [name: string]: unknown;
11665
+ };
11666
+ content: {
11667
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11668
+ };
11669
+ };
11670
+ /** @description Internal server error */
11671
+ 500: {
11672
+ headers: {
11673
+ /** @description API contract version used for the response */
11674
+ "Lbb-Version"?: string;
11675
+ /** @description Request correlation id */
11676
+ "X-Request-Id"?: string;
11677
+ [name: string]: unknown;
11678
+ };
11679
+ content: {
11680
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11681
+ };
11682
+ };
11683
+ /** @description Service unavailable */
11684
+ 503: {
11685
+ headers: {
11686
+ /** @description API contract version used for the response */
11687
+ "Lbb-Version"?: string;
11688
+ /** @description Request correlation id */
11689
+ "X-Request-Id"?: string;
11690
+ [name: string]: unknown;
11691
+ };
11692
+ content: {
11693
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11694
+ };
11695
+ };
11696
+ };
11697
+ };
11698
+ get_v1_graph_export_job: {
11699
+ parameters: {
11700
+ query?: {
11701
+ /** @description Graph name (default `main`) */
11702
+ graph?: string;
11703
+ /** @description Branch name (default `main`) */
11704
+ branch?: string;
11705
+ /** @description The export job id returned by the enqueue call */
11706
+ job_id?: string;
11707
+ };
11708
+ header?: {
11709
+ /** @description API contract version to pin. Use `2026-06-22` for this beta-breaking shape. */
11710
+ "Lbb-Version"?: string;
11711
+ };
11712
+ path?: never;
11713
+ cookie?: never;
11714
+ };
11715
+ requestBody?: never;
11716
+ responses: {
11717
+ /** @description OK */
11718
+ 200: {
11719
+ headers: {
11720
+ /** @description API contract version used for the response */
11721
+ "Lbb-Version"?: string;
11722
+ /** @description Request correlation id */
11723
+ "X-Request-Id"?: string;
11724
+ [name: string]: unknown;
11725
+ };
11726
+ content: {
11727
+ "application/json": Record<string, never>;
11728
+ };
11729
+ };
11730
+ /** @description Bad request */
11731
+ 400: {
11732
+ headers: {
11733
+ /** @description API contract version used for the response */
11734
+ "Lbb-Version"?: string;
11735
+ /** @description Request correlation id */
11736
+ "X-Request-Id"?: string;
11737
+ [name: string]: unknown;
11738
+ };
11739
+ content: {
11740
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11741
+ };
11742
+ };
11743
+ /** @description Unauthorized */
11744
+ 401: {
11745
+ headers: {
11746
+ /** @description API contract version used for the response */
11747
+ "Lbb-Version"?: string;
11748
+ /** @description Request correlation id */
11749
+ "X-Request-Id"?: string;
11750
+ [name: string]: unknown;
11751
+ };
11752
+ content: {
11753
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11754
+ };
11755
+ };
11756
+ /** @description Forbidden */
11757
+ 403: {
11758
+ headers: {
11759
+ /** @description API contract version used for the response */
11760
+ "Lbb-Version"?: string;
11761
+ /** @description Request correlation id */
11762
+ "X-Request-Id"?: string;
11763
+ [name: string]: unknown;
11764
+ };
11765
+ content: {
11766
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11767
+ };
11768
+ };
11769
+ /** @description Not found */
11770
+ 404: {
11771
+ headers: {
11772
+ /** @description API contract version used for the response */
11773
+ "Lbb-Version"?: string;
11774
+ /** @description Request correlation id */
11775
+ "X-Request-Id"?: string;
11776
+ [name: string]: unknown;
11777
+ };
11778
+ content: {
11779
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11780
+ };
11781
+ };
11782
+ /** @description Conflict */
11783
+ 409: {
11784
+ headers: {
11785
+ /** @description API contract version used for the response */
11786
+ "Lbb-Version"?: string;
11787
+ /** @description Request correlation id */
11788
+ "X-Request-Id"?: string;
11789
+ [name: string]: unknown;
11790
+ };
11791
+ content: {
11792
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11793
+ };
11794
+ };
11795
+ /** @description Rate limit exceeded */
11796
+ 429: {
11797
+ headers: {
11798
+ /** @description API contract version used for the response */
11799
+ "Lbb-Version"?: string;
11800
+ /** @description Request correlation id */
11801
+ "X-Request-Id"?: string;
11802
+ [name: string]: unknown;
11803
+ };
11804
+ content: {
11805
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11806
+ };
11807
+ };
11808
+ /** @description Internal server error */
11809
+ 500: {
11810
+ headers: {
11811
+ /** @description API contract version used for the response */
11812
+ "Lbb-Version"?: string;
11813
+ /** @description Request correlation id */
11814
+ "X-Request-Id"?: string;
11815
+ [name: string]: unknown;
11816
+ };
11817
+ content: {
11818
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11819
+ };
11820
+ };
11821
+ /** @description Service unavailable */
11822
+ 503: {
11823
+ headers: {
11824
+ /** @description API contract version used for the response */
11825
+ "Lbb-Version"?: string;
11826
+ /** @description Request correlation id */
11827
+ "X-Request-Id"?: string;
11828
+ [name: string]: unknown;
11829
+ };
11830
+ content: {
11831
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11832
+ };
11833
+ };
11834
+ };
11835
+ };
11836
+ post_v1_graph_export_job: {
11837
+ parameters: {
11838
+ query?: {
11839
+ /** @description Graph name (default `main`) */
11840
+ graph?: string;
11841
+ /** @description Branch name (default `main`) */
11842
+ branch?: string;
11843
+ /** @description Pin the export to a past snapshot commit_seq */
11844
+ as_of_commit_seq?: string;
11845
+ };
11846
+ header?: {
11847
+ /** @description API contract version to pin. Use `2026-06-22` for this beta-breaking shape. */
11848
+ "Lbb-Version"?: string;
11849
+ /** @description Stable client-generated key for safely retrying mutations. Required for fact commits. */
11850
+ "Idempotency-Key"?: string;
11851
+ };
11852
+ path?: never;
11853
+ cookie?: never;
11854
+ };
11855
+ requestBody?: never;
11856
+ responses: {
11857
+ /** @description OK */
11858
+ 200: {
11859
+ headers: {
11860
+ /** @description API contract version used for the response */
11861
+ "Lbb-Version"?: string;
11862
+ /** @description Request correlation id */
11863
+ "X-Request-Id"?: string;
11864
+ [name: string]: unknown;
11865
+ };
11866
+ content: {
11867
+ "application/json": Record<string, never>;
11868
+ };
11869
+ };
11870
+ /** @description Bad request */
11871
+ 400: {
11872
+ headers: {
11873
+ /** @description API contract version used for the response */
11874
+ "Lbb-Version"?: string;
11875
+ /** @description Request correlation id */
11876
+ "X-Request-Id"?: string;
11877
+ [name: string]: unknown;
11878
+ };
11879
+ content: {
11880
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11881
+ };
11882
+ };
11883
+ /** @description Unauthorized */
11884
+ 401: {
11885
+ headers: {
11886
+ /** @description API contract version used for the response */
11887
+ "Lbb-Version"?: string;
11888
+ /** @description Request correlation id */
11889
+ "X-Request-Id"?: string;
11890
+ [name: string]: unknown;
11891
+ };
11892
+ content: {
11893
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11894
+ };
11895
+ };
11896
+ /** @description Forbidden */
11897
+ 403: {
11898
+ headers: {
11899
+ /** @description API contract version used for the response */
11900
+ "Lbb-Version"?: string;
11901
+ /** @description Request correlation id */
11902
+ "X-Request-Id"?: string;
11903
+ [name: string]: unknown;
11904
+ };
11905
+ content: {
11906
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11907
+ };
11908
+ };
11909
+ /** @description Not found */
11910
+ 404: {
11911
+ headers: {
11912
+ /** @description API contract version used for the response */
11913
+ "Lbb-Version"?: string;
11914
+ /** @description Request correlation id */
11915
+ "X-Request-Id"?: string;
11916
+ [name: string]: unknown;
11917
+ };
11918
+ content: {
11919
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11920
+ };
11921
+ };
11922
+ /** @description Conflict */
11923
+ 409: {
11924
+ headers: {
11925
+ /** @description API contract version used for the response */
11926
+ "Lbb-Version"?: string;
11927
+ /** @description Request correlation id */
11928
+ "X-Request-Id"?: string;
11929
+ [name: string]: unknown;
11930
+ };
11931
+ content: {
11932
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11933
+ };
11934
+ };
11935
+ /** @description Rate limit exceeded */
11936
+ 429: {
11937
+ headers: {
11938
+ /** @description API contract version used for the response */
11939
+ "Lbb-Version"?: string;
11940
+ /** @description Request correlation id */
11941
+ "X-Request-Id"?: string;
11942
+ [name: string]: unknown;
11943
+ };
11944
+ content: {
11945
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11946
+ };
11947
+ };
11948
+ /** @description Internal server error */
11949
+ 500: {
11950
+ headers: {
11951
+ /** @description API contract version used for the response */
11952
+ "Lbb-Version"?: string;
11953
+ /** @description Request correlation id */
11954
+ "X-Request-Id"?: string;
11955
+ [name: string]: unknown;
11956
+ };
11957
+ content: {
11958
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11959
+ };
11960
+ };
11961
+ /** @description Service unavailable */
11962
+ 503: {
11963
+ headers: {
11964
+ /** @description API contract version used for the response */
11965
+ "Lbb-Version"?: string;
11966
+ /** @description Request correlation id */
11967
+ "X-Request-Id"?: string;
11968
+ [name: string]: unknown;
11969
+ };
11970
+ content: {
11971
+ "application/json": components["schemas"]["LbbErrorEnvelope"];
11972
+ };
11973
+ };
11974
+ };
11975
+ };
11456
11976
  get_v1_graph_export_rdf: {
11457
11977
  parameters: {
11458
11978
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@littlebigbrain/client",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "TypeScript client for the little big brain graph + hybrid search HTTP API",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {