@openviking/openclaw-plugin 2026.10.9 → 2026.10.12-2

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}`;
@@ -25,9 +25,15 @@ Write a memory digest for a coding agent about to answer that query. Keep the
25
25
  concrete facts (paths, identifiers, decisions, constraints); drop pleasantries
26
26
  and conversational filler.
27
27
 
28
+ Report only facts found in the fragments; never restate the user query as a
29
+ fact. Do not tell the agent what to do with them: no advice, instructions,
30
+ warnings, or next steps of your own. Report a preference or rule as something
31
+ the user recorded, not as a command to the agent.
32
+
28
33
  Format rules:
29
34
  - Group related facts by topic, one bullet per topic, at most ${maxBullets} bullets.
30
35
  - Start every bullet with "- ".
36
+ - Write in the language of the user query.
31
37
  - End every bullet with its source, copied verbatim from the fragments above:
32
38
  "来源:viking://..." or "source: viking://...". Never edit, shorten, or invent a URI.
33
39
  - Output the digest body only. No preamble, no closing remark.
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-2",
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",
@@ -27,9 +27,15 @@ Write a memory digest for a coding agent about to answer that query. Keep the
27
27
  concrete facts (paths, identifiers, decisions, constraints); drop pleasantries
28
28
  and conversational filler.
29
29
 
30
+ Report only facts found in the fragments; never restate the user query as a
31
+ fact. Do not tell the agent what to do with them: no advice, instructions,
32
+ warnings, or next steps of your own. Report a preference or rule as something
33
+ the user recorded, not as a command to the agent.
34
+
30
35
  Format rules:
31
36
  - Group related facts by topic, one bullet per topic, at most ${maxBullets} bullets.
32
37
  - Start every bullet with "- ".
38
+ - Write in the language of the user query.
33
39
  - End every bullet with its source, copied verbatim from the fragments above:
34
40
  "来源:viking://..." or "source: viking://...". Never edit, shorten, or invent a URI.
35
41
  - Output the digest body only. No preamble, no closing remark.