@littlebigbrain/client 0.13.0 → 0.13.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/dist/client.d.ts CHANGED
@@ -361,14 +361,18 @@ export declare class LbbClient {
361
361
  asOf?: string;
362
362
  }): Promise<Schemas["EntityMetadataResponse"]>;
363
363
  /**
364
- * Entity detail: metadata, attributes, current state, edge history, and
365
- * observations. Pass `asOf` / `asOfCommitSeq` to reproduce the node as of a
366
- * past instant / commit (the state, edges, and history are pinned to it).
364
+ * Read projected attributes and current relationships from one RDF snapshot.
365
+ * Inspect `unavailable_sections` before interpreting legacy provenance arrays.
366
+ * Use strong consistency for read-after-write, or a retained commit sequence.
367
367
  */
368
368
  entityDetail(opts: {
369
369
  id?: string;
370
370
  type?: string;
371
371
  name?: string;
372
+ key?: string;
373
+ consistency?: "strong" | "eventual";
374
+ edges?: number;
375
+ /** @deprecated Valid-time reads are unsupported; use asOfCommitSeq. */
372
376
  asOf?: string;
373
377
  asOfCommitSeq?: number;
374
378
  }): Promise<Schemas["EntityDetailResponse"]>;
package/dist/client.js CHANGED
@@ -900,9 +900,9 @@ export class LbbClient {
900
900
  });
901
901
  }
902
902
  /**
903
- * Entity detail: metadata, attributes, current state, edge history, and
904
- * observations. Pass `asOf` / `asOfCommitSeq` to reproduce the node as of a
905
- * past instant / commit (the state, edges, and history are pinned to it).
903
+ * Read projected attributes and current relationships from one RDF snapshot.
904
+ * Inspect `unavailable_sections` before interpreting legacy provenance arrays.
905
+ * Use strong consistency for read-after-write, or a retained commit sequence.
906
906
  */
907
907
  entityDetail(opts) {
908
908
  return this.request("GET", "/v1/graph/entity", {
@@ -910,6 +910,9 @@ export class LbbClient {
910
910
  id: opts.id,
911
911
  type: opts.type,
912
912
  name: opts.name,
913
+ key: opts.key,
914
+ consistency: opts.consistency,
915
+ edges: opts.edges,
913
916
  as_of: opts.asOf,
914
917
  as_of_commit_seq: opts.asOfCommitSeq,
915
918
  },
@@ -77,11 +77,7 @@ export declare class EntityNamespace {
77
77
  name?: string;
78
78
  asOf?: string;
79
79
  }): Promise<Schemas["EntityMetadataResponse"]>;
80
- detail(opts: {
81
- id?: string;
82
- type?: string;
83
- name?: string;
84
- }): Promise<Schemas["EntityDetailResponse"]>;
80
+ detail(opts: Parameters<LbbClient["entityDetail"]>[0]): Promise<Schemas["EntityDetailResponse"]>;
85
81
  /**
86
82
  * Filter entities already bound by relation patterns using typed attributes,
87
83
  * without writing RDF property IRIs by hand. This is a convenience wrapper over
@@ -97,7 +93,9 @@ export declare class SchemaNamespace {
97
93
  /** Read active metadata without running request-time validation. */
98
94
  view(opts?: CallOptions): Promise<Schemas["SchemaBundleView"]>;
99
95
  /** Atomically publish a bundle; conformance is produced asynchronously. */
100
- publish(body: Schemas["SchemaPublishRequest"], opts?: CallOptions): Promise<Schemas["SchemaPublishResponse"]>;
96
+ publish(body: Schemas["SchemaPublishRequest"], opts?: CallOptions & {
97
+ dryRun?: boolean;
98
+ }): Promise<Schemas["SchemaPublishResponse"]>;
101
99
  }
102
100
  /** Ontology discovery and lifecycle operations. */
103
101
  export declare class OntologyNamespace {
@@ -114,7 +112,9 @@ export declare class OntologyNamespace {
114
112
  * does not exist yet. Safe to repeat. See {@link LbbClient.ontologyDefine}.
115
113
  */
116
114
  define(body: Schemas["OntologyDefineRequest"], opts?: CallOptions): Promise<Schemas["OntologyDefineResponse"]>;
117
- evolve(body: Schemas["OntologyEvolveRequest"], opts?: CallOptions): Promise<Schemas["OntologyEvolveResponse"]>;
115
+ evolve(body: Schemas["OntologyEvolveRequest"], opts?: CallOptions & {
116
+ dryRun?: boolean;
117
+ }): Promise<Schemas["OntologyEvolveResponse"]>;
118
118
  induce(body: Schemas["OntologyInduceRequest"], opts?: CallOptions): Promise<Schemas["OntologyInduceResponse"]>;
119
119
  }
120
120
  /** Structured and SPARQL-text query operations. */
@@ -213,6 +213,7 @@ export class SchemaNamespace {
213
213
  publish(body, opts = {}) {
214
214
  return this.client.request("POST", "/v1/schema/publish", {
215
215
  ...opts,
216
+ query: { dry_run: opts.dryRun },
216
217
  idempotencyKey: opts.idempotencyKey ?? this.client.idempotencyKey("schema-publish"),
217
218
  body,
218
219
  });
@@ -266,6 +267,7 @@ export class OntologyNamespace {
266
267
  evolve(body, opts = {}) {
267
268
  return this.client.request("POST", "/v1/ontology/evolve", {
268
269
  ...opts,
270
+ query: { dry_run: opts.dryRun },
269
271
  body,
270
272
  });
271
273
  }
package/dist/schema.d.ts CHANGED
@@ -232,7 +232,7 @@ export interface paths {
232
232
  path?: never;
233
233
  cookie?: never;
234
234
  };
235
- /** Entity detail */
235
+ /** Native entity attributes and relationships from the branch-owned RDF view; unavailable provenance sections are explicitly listed */
236
236
  get: operations["get_v1_graph_entity"];
237
237
  put?: never;
238
238
  post?: never;
@@ -1141,7 +1141,7 @@ export interface paths {
1141
1141
  };
1142
1142
  get?: never;
1143
1143
  put?: never;
1144
- /** Atomically activate a SHACL shapes bundle and enqueue durable conformance validation */
1144
+ /** Atomically activate a SHACL shapes bundle, or preview compatibility without writes or validation jobs */
1145
1145
  post: operations["post_v1_schema_publish"];
1146
1146
  delete?: never;
1147
1147
  options?: never;
@@ -1973,12 +1973,9 @@ export interface components {
1973
1973
  };
1974
1974
  EntityDetailResponse: {
1975
1975
  /**
1976
- * @description The entity's typed scalar properties as native JSON — the flat read-back
1977
- * of what a commit's `entity_properties` wrote, so round-trip verification
1978
- * is a one-hop lookup. A numeric property reads back as a JSON number, a
1979
- * bool as a bool, a datetime as an RFC3339 string; empty when the entity
1980
- * carries no scalar attributes. The `/entities` list returns the same
1981
- * `attributes` shape under `?fields=`.
1976
+ * @description The entity's RDF-projected properties as typed JSON: numbers, booleans,
1977
+ * RFC3339 datetime strings, strings and sets. Nulls, bytes, vectors,
1978
+ * non-finite numbers and empty sets have no RDF projection and are omitted.
1982
1979
  */
1983
1980
  attributes?: {
1984
1981
  [key: string]: unknown;
@@ -1990,8 +1987,14 @@ export interface components {
1990
1987
  metadata: components["schemas"]["EntityMetadataResponse"];
1991
1988
  observations: components["schemas"]["ObservationRow"][];
1992
1989
  outgoing: components["schemas"]["GraphEdgeRow"][];
1990
+ rdf_relations?: null | components["schemas"]["EntityRdfRelations"];
1993
1991
  snapshot: components["schemas"]["SnapshotView"];
1994
1992
  truncation?: null | components["schemas"]["EntityDetailTruncation"];
1993
+ /**
1994
+ * @description Legacy sections unavailable in this read model. An empty listed section
1995
+ * means unavailable, not that the entity has no history or relationships.
1996
+ */
1997
+ unavailable_sections?: string[];
1995
1998
  };
1996
1999
  /**
1997
2000
  * @description Which of an entity read's degree-proportional collections were cut, and by
@@ -2198,6 +2201,12 @@ export interface components {
2198
2201
  remove_fields?: string[];
2199
2202
  type: string;
2200
2203
  };
2204
+ EntityRdfRelations: {
2205
+ incoming: components["schemas"]["RdfEntityRelation"][];
2206
+ incoming_truncation?: null | components["schemas"]["TruncatedCollection"];
2207
+ outgoing: components["schemas"]["RdfEntityRelation"][];
2208
+ outgoing_truncation?: null | components["schemas"]["TruncatedCollection"];
2209
+ };
2201
2210
  EntitySelector: {
2202
2211
  entity_id?: null | components["schemas"]["EntityId"];
2203
2212
  entity_type?: string | null;
@@ -3294,7 +3303,7 @@ export interface components {
3294
3303
  valid_time: components["schemas"]["ValidTime"];
3295
3304
  };
3296
3305
  /** @enum {string} */
3297
- HistoryObjectKind: "wal" | "segment" | "pending";
3306
+ HistoryObjectKind: "wal" | "segment" | "unavailable" | "pending";
3298
3307
  HybridMultiSearchExplain: {
3299
3308
  fused_candidates: number;
3300
3309
  rrf_k: string;
@@ -4572,6 +4581,10 @@ export interface components {
4572
4581
  */
4573
4582
  rerank_raw_bytes_fetched?: number;
4574
4583
  };
4584
+ RdfEntityRelation: {
4585
+ entity: components["schemas"]["EntityView"];
4586
+ relation: components["schemas"]["RelationView"];
4587
+ };
4575
4588
  /**
4576
4589
  * @description The RDF node kind of a bounded observed-schema statement object.
4577
4590
  * @enum {string}
@@ -4979,6 +4992,7 @@ export interface components {
4979
4992
  ontology_version: number;
4980
4993
  /** Format: int64 */
4981
4994
  shapes_version?: number | null;
4995
+ write_enforcement?: null | components["schemas"]["SchemaWriteEnforcement"];
4982
4996
  };
4983
4997
  SchemaRelationView: {
4984
4998
  dst_types: string[];
@@ -4990,6 +5004,12 @@ export interface components {
4990
5004
  src_types: string[];
4991
5005
  stable_id: string;
4992
5006
  };
5007
+ SchemaShapeWriteEnforcement: {
5008
+ blockers?: components["schemas"]["SchemaWriteEnforcementBlocker"][];
5009
+ /** @description An active root shape: one that selects focus nodes. */
5010
+ shape: string;
5011
+ write_enforceable: boolean;
5012
+ };
4993
5013
  SchemaSource: {
4994
5014
  /**
4995
5015
  * @description Format hint for this source. Ontology sources use the ontology importer
@@ -5001,6 +5021,36 @@ export interface components {
5001
5021
  /** @description RDF or ontology document text. */
5002
5022
  source: string;
5003
5023
  };
5024
+ /** @description How the published shape set is enforced on this branch. */
5025
+ SchemaWriteEnforcement: {
5026
+ shapes: components["schemas"]["SchemaShapeWriteEnforcement"][];
5027
+ timing: components["schemas"]["SchemaWriteEnforcementTiming"];
5028
+ /**
5029
+ * @description True when no root shape has a blocker. An RDF-native branch accepts
5030
+ * `reject` mode only for such a shape set.
5031
+ */
5032
+ write_enforceable: boolean;
5033
+ };
5034
+ /**
5035
+ * @description A constraint with no bounded affected set: the engine cannot tell which
5036
+ * focus nodes a write changes its verdict for.
5037
+ */
5038
+ SchemaWriteEnforcementBlocker: {
5039
+ /**
5040
+ * @description The SHACL parameter: `sh:sparql`, or the shape reference that closes a
5041
+ * cycle (`sh:node`, `sh:property`, `sh:or`, ...).
5042
+ */
5043
+ constraint: string;
5044
+ /** @description `sparql_constraint` or `recursive_shape`. */
5045
+ reason: string;
5046
+ /** @description The shape that carries the constraint. */
5047
+ shape: string;
5048
+ };
5049
+ /**
5050
+ * @description When the engine checks the published shapes against a write.
5051
+ * @enum {string}
5052
+ */
5053
+ SchemaWriteEnforcementTiming: "write_time" | "write_time_full_scan" | "after_publication";
5004
5054
  /**
5005
5055
  * @description One scored retrieval candidate on the wire: which entity matched and its raw
5006
5056
  * (pre-calibration) score from whatever channel produced it. The entity is
@@ -6068,6 +6118,7 @@ export interface components {
6068
6118
  * the query into grouped/aggregated mode.
6069
6119
  */
6070
6120
  aggregates?: components["schemas"]["SparqlAggregate"][];
6121
+ as_of_commit_seq?: null | components["schemas"]["CommitSeq"];
6071
6122
  /**
6072
6123
  * @description `ASK` form: return only `boolean` (whether the pattern has any solution).
6073
6124
  * Projection, DISTINCT, and limit/offset are ignored.
@@ -8778,6 +8829,14 @@ export interface operations {
8778
8829
  type?: string;
8779
8830
  /** @description Entity canonical name for name-addressed lookup */
8780
8831
  name?: string;
8832
+ /** @description External entity key; takes precedence over name */
8833
+ key?: string;
8834
+ /** @description strong or eventual (default); strong includes the exact durable delta suffix */
8835
+ consistency?: string;
8836
+ /** @description Retained commit sequence; valid-time as_of is unsupported */
8837
+ as_of_commit_seq?: string;
8838
+ /** @description Maximum RDF relationships per direction (default 1000, ceiling 10000) */
8839
+ edges?: string;
8781
8840
  };
8782
8841
  header?: {
8783
8842
  /** @description API contract version to pin. Use `2026-07-23` for this beta-breaking shape. */
@@ -17108,6 +17167,8 @@ export interface operations {
17108
17167
  graph?: string;
17109
17168
  /** @description Branch name (default `main`) */
17110
17169
  branch?: string;
17170
+ /** @description Parse and check compatibility without activation; returns activated=false and predicted schema versions. Does not run whole-graph conformance */
17171
+ dry_run?: string;
17111
17172
  };
17112
17173
  header?: {
17113
17174
  /** @description API contract version to pin. Use `2026-07-23` for this beta-breaking shape. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@littlebigbrain/client",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "TypeScript client for the little big brain graph + hybrid search HTTP API",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {