@modelstudio/modelstudio-memory-for-openclaw 1.0.9 → 1.0.10
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/index.ts +8 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -92,10 +92,14 @@ function assertAllowedKeys(
|
|
|
92
92
|
|
|
93
93
|
const modelstudioMemoryConfigSchema = {
|
|
94
94
|
parse(value: unknown): BailianMemoryConfig {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
const raw =
|
|
96
|
+
value && typeof value === "object" && !Array.isArray(value)
|
|
97
|
+
? (value as Record<string, unknown>)
|
|
98
|
+
: {};
|
|
99
|
+
const cfg =
|
|
100
|
+
"config" in raw && raw.config && typeof raw.config === "object" && !Array.isArray(raw.config)
|
|
101
|
+
? (raw.config as Record<string, unknown>)
|
|
102
|
+
: raw;
|
|
99
103
|
assertAllowedKeys(cfg, ALLOWED_KEYS, "modelstudio-memory-for-openclaw config");
|
|
100
104
|
|
|
101
105
|
// apiKey: allow empty at parse time; tools return config prompt when missing
|
package/openclaw.plugin.json
CHANGED