@wazootech/worlds-sdk 0.11.3 → 0.11.5

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.
@@ -1,2 +1,2 @@
1
- import { a as SparqlSelectResults, c as SparqlRequest, i as SparqlResponse, n as SparqlBinding, o as SparqlValue, r as SparqlConstructResults, s as SparqlEngineInterface, t as SparqlAskResults } from "./mod-8Zh1f9vW.js";
1
+ import { a as SparqlSelectResults, c as SparqlRequest, i as SparqlResponse, n as SparqlBinding, o as SparqlValue, r as SparqlConstructResults, s as SparqlEngineInterface, t as SparqlAskResults } from "./mod-C_Is4DOx.js";
2
2
  export type { SparqlAskResults, SparqlBinding, SparqlConstructResults, SparqlEngineInterface, SparqlRequest, SparqlResponse, SparqlSelectResults, SparqlValue };
package/dist/testing.d.ts CHANGED
@@ -13,11 +13,11 @@
13
13
  * `createMemoryWorldsSdk` as the portable reference; `@wazootech/worlds-sqlite` is the
14
14
  * durable source of truth for SQLite-family behavior.
15
15
  */
16
- import { D as SearchRequest, T as SearchIndexOnImport } from "./mod-BuF_B_xU.js";
17
- import { o as SparqlValue } from "./mod-8Zh1f9vW.js";
18
- import { n as WorldsSdkInterface } from "./client-BJ45zmXU.js";
16
+ import { D as SearchRequest, T as SearchIndexOnImport } from "./mod-CfzcRVcL.js";
17
+ import { o as SparqlValue } from "./mod-C_Is4DOx.js";
18
+ import { n as WorldsSdkInterface } from "./client-B1oktOm6.js";
19
19
  import * as rdfjs from "@rdfjs/types";
20
- import { U as TransactionContext, Y as Patch } from "./mod-ClDFMN-C.js";
20
+ import { U as TransactionContext, Y as Patch } from "./mod-CH7Hc3EE.js";
21
21
  import { t as EmbeddingService } from "./embedding-service-DebRMVmn.js";
22
22
  /**
23
23
  * Parity fixtures are the shared corpus every durable backend runs in its
package/dist/testing.js CHANGED
@@ -1,5 +1,5 @@
1
- import { h as hashQuad } from "./quad-store-BGCOUBxK.js";
2
- import { o as materializeImportQuads } from "./rdf-formats-BkGt5RDB.js";
1
+ import { h as hashQuad } from "./quad-store-oBgXOONP.js";
2
+ import { o as materializeImportQuads } from "./rdf-formats-C2znopLM.js";
3
3
  import { DataFactory } from "n3";
4
4
  import { FakeEmbeddingService } from "./embedding-service.js";
5
5
  // src/testing/parity-fixtures.ts
@@ -371,8 +371,8 @@ async function checkGraphSizes(fixtureName, sdk, expected, failures) {
371
371
  }
372
372
  /**
373
373
  * checkRoundTrip verifies that exporting a world and re-importing the
374
- * exported serialization yields byte-identical serializations (idempotent
375
- * round-trip) on the candidate's own engine.
374
+ * exported serialization yields the same serialization on the candidate's own
375
+ * engine. Only blank node labels may differ: every document has its own.
376
376
  */
377
377
  async function checkRoundTrip(fixtureName, candidateFactory, nquads, failures) {
378
378
  const sdk1 = await candidateFactory();
@@ -381,7 +381,16 @@ async function checkRoundTrip(fixtureName, candidateFactory, nquads, failures) {
381
381
  const sdk2 = await candidateFactory();
382
382
  await importNquads(sdk2, out1.data);
383
383
  const out2 = await exportSerialized(sdk2);
384
- if (out1.data !== out2.data) failures.push(`[${fixtureName}] candidate serialized export is not round-trip idempotent`);
384
+ if (numberBlankNodes(out1.data) !== numberBlankNodes(out2.data)) failures.push(`[${fixtureName}] candidate serialized export is not round-trip idempotent`);
385
+ }
386
+ /** numberBlankNodes renames labels in N-Quads by the order they first appear. */
387
+ function numberBlankNodes(nquads) {
388
+ const names = /* @__PURE__ */ new Map();
389
+ return nquads.replace(/_:\S+/g, (label) => {
390
+ const name = names.get(label) ?? `_:${names.size}`;
391
+ names.set(label, name);
392
+ return name;
393
+ });
385
394
  }
386
395
  async function checkSearchCase(fixtureName, options, nquads, searchCase, strictOrder, failures) {
387
396
  const ref = await options.reference();
package/dist/wazoo.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { n as WorldsSdkInterface } from "./client-BJ45zmXU.js";
1
+ import { n as WorldsSdkInterface } from "./client-B1oktOm6.js";
2
2
  import { Client } from "@wazootech/worlds-client";
3
- import { $ as ImportRequest, X as ExportRequest, Z as ExportResponse, tt as QuadStoreInterface } from "./mod-ClDFMN-C.js";
4
- import { C as ReindexResponse, D as SearchRequest, O as SearchResponse, S as ReindexRequest, w as SearchIndexInterface } from "./mod-BuF_B_xU.js";
5
- import { c as SparqlRequest, i as SparqlResponse, s as SparqlEngineInterface } from "./mod-8Zh1f9vW.js";
3
+ import { $ as ImportRequest, X as ExportRequest, Z as ExportResponse, tt as QuadStoreInterface } from "./mod-CH7Hc3EE.js";
4
+ import { C as ReindexResponse, D as SearchRequest, O as SearchResponse, S as ReindexRequest, w as SearchIndexInterface } from "./mod-CfzcRVcL.js";
5
+ import { c as SparqlRequest, i as SparqlResponse, s as SparqlEngineInterface } from "./mod-C_Is4DOx.js";
6
6
  /**
7
7
  * CreateWazooSdkOptions configures the remote Worlds SDK client.
8
8
  */
package/dist/wazoo.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createClient, exportWorld, importWorld, reindexWorld, searchWorld, sparqlWorld } from "@wazootech/worlds-client";
2
2
  import { t as WorldsSdk } from "./client-BWh0UAM0.js";
3
3
  import { serializeTurtle } from "@wazootech/sparql-engine";
4
- import { o as materializeImportQuads } from "./rdf-formats-BkGt5RDB.js";
4
+ import { o as materializeImportQuads } from "./rdf-formats-C2znopLM.js";
5
5
  // src/wazoo/term-parser.ts
6
6
  const XSD_STRING = "http://www.w3.org/2001/XMLSchema#string";
7
7
  const LITERAL_RE = /^"(.*)"(?:\^\^(<.*>))?(@.*)?$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wazootech/worlds-sdk",
3
- "version": "0.11.3",
3
+ "version": "0.11.5",
4
4
  "description": "Give an agent a knowledge graph it can search and query with SPARQL: in memory, on a Worlds storage package such as SQLite or Postgres, or on the hosted Worlds API.",
5
5
  "keywords": [
6
6
  "wazoo",
@@ -60,6 +60,10 @@
60
60
  "types": "./dist/rdfjs.d.ts",
61
61
  "default": "./dist/rdfjs.js"
62
62
  },
63
+ "./shacl": {
64
+ "types": "./dist/shacl.d.ts",
65
+ "default": "./dist/shacl.js"
66
+ },
63
67
  "./memory": {
64
68
  "types": "./dist/memory.d.ts",
65
69
  "default": "./dist/memory.js"
@@ -94,6 +98,7 @@
94
98
  "test": "bun test",
95
99
  "build": "tsdown",
96
100
  "check:package": "bun scripts/check-package.ts",
101
+ "mutation": "stryker run",
97
102
  "ci": "bun run fmt:check && bun run lint && bun run check && bun run test"
98
103
  },
99
104
  "dependencies": {
@@ -105,6 +110,8 @@
105
110
  "@wazootech/worlds-client": "^0.8.2",
106
111
  "ai": "^6.0.195",
107
112
  "n3": "^2.0.3",
113
+ "rdf-validate-shacl": "0.6.5",
114
+ "re2js": "2.10.0",
108
115
  "zod": "^3.25.76 || ^4.1.8"
109
116
  },
110
117
  "devDependencies": {
@@ -112,6 +119,7 @@
112
119
  "@langchain/core": "^1.1.48",
113
120
  "@langchain/textsplitters": "^1.0.1",
114
121
  "@std/encoding": "npm:@jsr/std__encoding@^1.0.10",
122
+ "@stryker-mutator/core": "10.1.1",
115
123
  "@types/bun": "1.4.5",
116
124
  "@types/n3": "1.26.1",
117
125
  "oxlint": "1.95.0",