@thingd/sdk 0.83.2 → 0.84.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 CHANGED
@@ -40,6 +40,15 @@ configuration; inject them through the deployment environment. Storage
40
40
  encryption does not change object, event, queue, graph, vector, search, REST,
41
41
  or MCP APIs.
42
42
 
43
+ Native persistence uses RocksDB by default. The experimental Rust-native
44
+ ThingDB backend can be selected with `THINGD_STORAGE_BACKEND=thingdb`; it uses
45
+ a separate format and requires logical repack when changing an existing store.
46
+ For disposable Node.js memory mode, `ThingD.open(":memory:")` uses ThingDB RAM
47
+ when the native addon is available; the explicit `memory` subpath remains the
48
+ portable TypeScript/reference implementation. ThingDB RAM is the full
49
+ process-local Thingd database; for a smaller TTL/LRU key/value cache, use the
50
+ separate ThingDB cache API. Both modes lose data when the process exits.
51
+
43
52
  ## Subpath imports
44
53
 
45
54
  ```typescript
package/dist/thingd.js CHANGED
@@ -305,8 +305,9 @@ async function openStore(path, options) {
305
305
  instanceSlug: options.instanceSlug,
306
306
  });
307
307
  }
308
- if (options.driver === "memory" && options.encryption) {
309
- throw new Error("Encryption options are only supported by the native persistent driver");
308
+ const isMemoryPath = path === ":memory:" || path === "";
309
+ if (isMemoryPath && options.encryption) {
310
+ throw new Error("Encryption is not supported for non-durable memory storage");
310
311
  }
311
312
  const hasNative = await NativeThingStore.isAvailable();
312
313
  if (options.encryption?.key !== undefined && !/^[0-9a-fA-F]{64}$/.test(options.encryption.key)) {
@@ -318,6 +319,9 @@ async function openStore(path, options) {
318
319
  }
319
320
  return NativeThingStore.open(path, options.encryption?.key);
320
321
  }
322
+ if (!options.driver && isMemoryPath && hasNative) {
323
+ return NativeThingStore.open(path);
324
+ }
321
325
  // Auto-detect and promote file paths to native store when available, with a warning fallback to memory.
322
326
  if (!options.driver && path !== ":memory:") {
323
327
  if (hasNative) {
package/dist/version.d.ts CHANGED
@@ -2,5 +2,5 @@
2
2
  * The published version of the thingd SDK.
3
3
  * Updated automatically by Release Please during the release PR process.
4
4
  */
5
- export declare const SDK_VERSION = "0.83.2";
5
+ export declare const SDK_VERSION = "0.84.1";
6
6
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * The published version of the thingd SDK.
3
3
  * Updated automatically by Release Please during the release PR process.
4
4
  */
5
- export const SDK_VERSION = "0.83.2"; // x-release-please-version
5
+ export const SDK_VERSION = "0.84.1"; // x-release-please-version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thingd/sdk",
3
- "version": "0.83.2",
3
+ "version": "0.84.1",
4
4
  "description": "A fast object-first data engine for applications and AI agents.",
5
5
  "type": "module",
6
6
  "author": "Sayan Mohsin",
@@ -71,7 +71,7 @@
71
71
  "zod": "^4.4.3"
72
72
  },
73
73
  "optionalDependencies": {
74
- "@thingd/native": "^0.83.2"
74
+ "@thingd/native": "^0.84.1"
75
75
  },
76
76
  "scripts": {
77
77
  "build": "tsc -p tsconfig.json",