@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 +4 -3
- package/index.ts +3 -3
- package/openclaw.plugin.json +2 -4
- package/package.json +1 -1
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 (
|
|
59
|
-
throw new Error("openclaw-memory-graphiti config
|
|
58
|
+
if (Array.isArray(value)) {
|
|
59
|
+
throw new Error("openclaw-memory-graphiti config must be an object, not an array");
|
|
60
60
|
}
|
|
61
|
-
|
|
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
|
-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
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);
|
package/openclaw.plugin.json
CHANGED
|
@@ -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