@contextableai/openclaw-memory-graphiti 0.2.4 → 0.2.6

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/config.ts CHANGED
@@ -55,10 +55,11 @@ function assertAllowedKeys(value: Record<string, unknown>, allowed: string[], la
55
55
 
56
56
  export const graphitiMemoryConfigSchema = {
57
57
  parse(value: unknown): GraphitiMemoryConfig {
58
- if (!value || typeof value !== "object" || Array.isArray(value)) {
59
- throw new Error("openclaw-memory-graphiti config required");
58
+ if (Array.isArray(value)) {
59
+ throw new Error("openclaw-memory-graphiti config must be an object, not an array");
60
60
  }
61
- const cfg = value as Record<string, unknown>;
61
+ // Accept undefined/null (installer writes no config key) — treat as empty {}
62
+ const cfg = (value && typeof value === "object" ? value : {}) as Record<string, unknown>;
62
63
  assertAllowedKeys(
63
64
  cfg,
64
65
  [
package/index.ts CHANGED
@@ -67,9 +67,9 @@ const memoryGraphitiPlugin = {
67
67
  graphiti.uuidPollMaxAttempts = cfg.graphiti.uuidPollMaxAttempts;
68
68
  if (!cfg.spicedb.token) {
69
69
  throw new Error(
70
- "openclaw-memory-graphiti: spicedb.token is not configured. " +
71
- "Set it in plugins.entries.openclaw-memory-graphiti.config.spicedb.token " +
72
- "in ~/.openclaw/openclaw.json",
70
+ 'openclaw-memory-graphiti: spicedb.token is not configured. Add a "config" block to ' +
71
+ "plugins.entries.openclaw-memory-graphiti in ~/.openclaw/openclaw.json:\n" +
72
+ ' "config": { "spicedb": { "token": "<your-preshared-key>", "insecure": true } }',
73
73
  );
74
74
  }
75
75
  const spicedb = new SpiceDbClient(cfg.spicedb);
@@ -80,8 +80,7 @@
80
80
  "endpoint": { "type": "string" },
81
81
  "token": { "type": "string" },
82
82
  "insecure": { "type": "boolean" }
83
- },
84
- "required": ["token"]
83
+ }
85
84
  },
86
85
  "graphiti": {
87
86
  "type": "object",
@@ -99,7 +98,6 @@
99
98
  "autoRecall": { "type": "boolean" },
100
99
  "customInstructions": { "type": "string" },
101
100
  "maxCaptureMessages": { "type": "integer", "minimum": 1, "maximum": 50 }
102
- },
103
- "required": ["spicedb"]
101
+ }
104
102
  }
105
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextableai/openclaw-memory-graphiti",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "OpenClaw two-layer memory plugin: SpiceDB authorization + Graphiti knowledge graph",
5
5
  "type": "module",
6
6
  "license": "MIT",