@openviking/openclaw-plugin 2026.10.9 → 2026.10.12

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/client.ts CHANGED
@@ -379,7 +379,14 @@ export class OpenVikingClient {
379
379
  signal: controller.signal,
380
380
  });
381
381
 
382
- const payload = (await response.json().catch(() => ({}))) as {
382
+ // Only a body that arrived whole but is not JSON falls back to `{}`. A
383
+ // body cut off by a timeout, reset or early close after the headers
384
+ // rejects, so a write is not reported as stored and a read is not
385
+ // reported as empty.
386
+ const payload = (await response.json().catch((error: unknown) => {
387
+ if (!(error instanceof SyntaxError)) throw error;
388
+ return {};
389
+ })) as {
383
390
  status?: string;
384
391
  result?: T;
385
392
  error?: { code?: string; message?: string; trace_id?: string };
package/dist/client.js CHANGED
@@ -120,7 +120,15 @@ export class OpenVikingClient {
120
120
  headers,
121
121
  signal: controller.signal,
122
122
  });
123
- const payload = (await response.json().catch(() => ({})));
123
+ // Only a body that arrived whole but is not JSON falls back to `{}`. A
124
+ // body cut off by a timeout, reset or early close after the headers
125
+ // rejects, so a write is not reported as stored and a read is not
126
+ // reported as empty.
127
+ const payload = (await response.json().catch((error) => {
128
+ if (!(error instanceof SyntaxError))
129
+ throw error;
130
+ return {};
131
+ }));
124
132
  if (!response.ok || payload.status === "error") {
125
133
  const code = payload.error?.code ? ` [${payload.error.code}]` : "";
126
134
  const message = payload.error?.message ?? `HTTP ${response.status}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openviking/openclaw-plugin",
3
- "version": "2026.10.9",
3
+ "version": "2026.10.12",
4
4
  "displayName": "OpenViking",
5
5
  "description": "OpenClaw context-engine plugin — OpenViking AI memory, long-term memory, knowledge base, semantic search, RAG, context engine. 长期记忆 · 知识库 · 语义检索 · 上下文引擎",
6
6
  "type": "module",