@openviking/openclaw-plugin 2026.10.26 → 2026.10.27-1
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/dist/memory-ranking.js +1 -1
- package/dist/plugin/openviking-archive-tools.js +1 -1
- package/dist/plugin/openviking-recall-trace-runtime.js +1 -1
- package/dist/plugin/openviking-tool-result-tools.js +7 -7
- package/memory-ranking.ts +1 -1
- package/package.json +1 -1
- package/plugin/openviking-archive-tools.ts +1 -1
- package/plugin/openviking-recall-trace-runtime.ts +1 -1
- package/plugin/openviking-tool-result-tools.ts +7 -7
- package/skills/install-openviking-memory/SKILL.md +1 -1
- package/skills/openviking-context-database/SKILL.md +1 -1
package/dist/memory-ranking.js
CHANGED
|
@@ -179,7 +179,7 @@ function lexicalOverlapBoost(tokens, text, maxBoost = DEFAULT_RANKING_WEIGHTS.le
|
|
|
179
179
|
function inferResourceType(item) {
|
|
180
180
|
if (item.uri.startsWith("viking://resources"))
|
|
181
181
|
return "resource";
|
|
182
|
-
if (item.uri
|
|
182
|
+
if (/^viking:\/\/(?:user\/[^/]+|~)\/sessions(?:\/|$)/.test(item.uri))
|
|
183
183
|
return "session";
|
|
184
184
|
if (item.uri.startsWith("viking://user/skills") || item.uri.startsWith("viking://~/skills") || item.uri.startsWith("viking://skills"))
|
|
185
185
|
return "agent";
|
|
@@ -77,7 +77,7 @@ export function registerOpenVikingArchiveTools(deps) {
|
|
|
77
77
|
trigger: { query, derivedKeywords: [query] },
|
|
78
78
|
searches: [{
|
|
79
79
|
resourceType: "archive",
|
|
80
|
-
targetUriResolved: archiveId ? `viking
|
|
80
|
+
targetUriResolved: archiveId ? `viking://~/sessions/${ovSessionId}/history/${archiveId}` : `viking://~/sessions/${ovSessionId}/history`,
|
|
81
81
|
limit: deps.traceRecallMaxResultsPerSearch,
|
|
82
82
|
durationMs: Date.now() - started,
|
|
83
83
|
total: result.matches?.length ?? result.count ?? 0,
|
|
@@ -55,7 +55,7 @@ function toLimitedInteger(value, fallback, min, max) {
|
|
|
55
55
|
function inferUriType(uri) {
|
|
56
56
|
if (uri.startsWith("viking://resources") || uri.startsWith("viking://resource"))
|
|
57
57
|
return "resource";
|
|
58
|
-
if (
|
|
58
|
+
if (/^viking:\/\/(?:user\/[^/]+|~)\/sessions(?:\/|$)/.test(uri))
|
|
59
59
|
return "session";
|
|
60
60
|
if (uri.startsWith("viking://user/skills") || uri.startsWith("viking://~/skills") || uri.startsWith("viking://skills"))
|
|
61
61
|
return "skill";
|
|
@@ -4,7 +4,7 @@ export function parseToolResultRef(value) {
|
|
|
4
4
|
if (!raw) {
|
|
5
5
|
return null;
|
|
6
6
|
}
|
|
7
|
-
const match = raw.match(/^viking:\/\/
|
|
7
|
+
const match = raw.match(/^viking:\/\/(?:user\/[^/]+|~)\/sessions\/([^/]+)\/tool-results\/([^/?#]+)(?:[?#].*)?$/);
|
|
8
8
|
if (!match) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
@@ -16,7 +16,7 @@ export function parseToolResultRef(value) {
|
|
|
16
16
|
return {
|
|
17
17
|
sessionId,
|
|
18
18
|
toolResultId,
|
|
19
|
-
ref:
|
|
19
|
+
ref: raw.split(/[?#]/, 1)[0],
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
function getOptionalInteger(value, fallback) {
|
|
@@ -34,13 +34,13 @@ export function registerOpenVikingToolResultTools({ registerTool, getClient, res
|
|
|
34
34
|
label: "Tool Result Read (OpenViking)",
|
|
35
35
|
description: "Restore the full original content of a tool result that was externalized by OpenViking. " +
|
|
36
36
|
"Use when a previous tool result was externalized and only a preview is visible — " +
|
|
37
|
-
"the preview contains a [tool-result-ref] or viking://
|
|
37
|
+
"the preview contains a [tool-result-ref] or viking://user/.../sessions/.../tool-results/... URI. " +
|
|
38
38
|
"\"Read\" tool returns the same truncated preview; this tool returns the complete content. " +
|
|
39
39
|
"To read all content: pass offset=0 and a limit large enough to cover the whole result " +
|
|
40
40
|
"(e.g. limit=100000). Use offset/limit for paging only when you need a specific section.",
|
|
41
41
|
parameters: Type.Object({
|
|
42
42
|
tool_output_ref: Type.String({
|
|
43
|
-
description: "Exact OV URI from the preview, e.g. viking://
|
|
43
|
+
description: "Exact OV URI from the preview, e.g. viking://user/<user_id>/sessions/<session_id>/tool-results/<tool_result_id>",
|
|
44
44
|
}),
|
|
45
45
|
offset: Type.Optional(Type.Number({ description: "Unicode character offset. Default: 0" })),
|
|
46
46
|
limit: Type.Optional(Type.Number({ description: "Maximum Unicode characters to read. Default: 20000" })),
|
|
@@ -59,7 +59,7 @@ export function registerOpenVikingToolResultTools({ registerTool, getClient, res
|
|
|
59
59
|
const parsed = parseToolResultRef(params.tool_output_ref ?? params.ref ?? params.uri);
|
|
60
60
|
if (!parsed) {
|
|
61
61
|
return {
|
|
62
|
-
content: [{ type: "text", text: "Error: tool_output_ref must be a viking://
|
|
62
|
+
content: [{ type: "text", text: "Error: tool_output_ref must be a viking://user/.../sessions/.../tool-results/... URI." }],
|
|
63
63
|
details: { error: "invalid_tool_output_ref" },
|
|
64
64
|
};
|
|
65
65
|
}
|
|
@@ -122,7 +122,7 @@ export function registerOpenVikingToolResultTools({ registerTool, getClient, res
|
|
|
122
122
|
"Returns matching snippets with their character offsets.",
|
|
123
123
|
parameters: Type.Object({
|
|
124
124
|
tool_output_ref: Type.String({
|
|
125
|
-
description: "Exact OV URI from the preview, e.g. viking://
|
|
125
|
+
description: "Exact OV URI from the preview, e.g. viking://user/<user_id>/sessions/<session_id>/tool-results/<tool_result_id>",
|
|
126
126
|
}),
|
|
127
127
|
query: Type.String({ description: "Keyword or exact text to search for" }),
|
|
128
128
|
limit: Type.Optional(Type.Number({ description: "Maximum matches. Default: 20" })),
|
|
@@ -142,7 +142,7 @@ export function registerOpenVikingToolResultTools({ registerTool, getClient, res
|
|
|
142
142
|
const parsed = parseToolResultRef(params.tool_output_ref ?? params.ref ?? params.uri);
|
|
143
143
|
if (!parsed) {
|
|
144
144
|
return {
|
|
145
|
-
content: [{ type: "text", text: "Error: tool_output_ref must be a viking://
|
|
145
|
+
content: [{ type: "text", text: "Error: tool_output_ref must be a viking://user/.../sessions/.../tool-results/... URI." }],
|
|
146
146
|
details: { error: "invalid_tool_output_ref" },
|
|
147
147
|
};
|
|
148
148
|
}
|
package/memory-ranking.ts
CHANGED
|
@@ -231,7 +231,7 @@ function lexicalOverlapBoost(tokens: string[], text: string, maxBoost = DEFAULT_
|
|
|
231
231
|
|
|
232
232
|
function inferResourceType(item: FindResultItem): string | undefined {
|
|
233
233
|
if (item.uri.startsWith("viking://resources")) return "resource";
|
|
234
|
-
if (item.uri
|
|
234
|
+
if (/^viking:\/\/(?:user\/[^/]+|~)\/sessions(?:\/|$)/.test(item.uri)) return "session";
|
|
235
235
|
if (item.uri.startsWith("viking://user/skills") || item.uri.startsWith("viking://~/skills") || item.uri.startsWith("viking://skills")) return "agent";
|
|
236
236
|
if (item.uri.startsWith("viking://user/") || item.uri.startsWith("viking://~/")) return "user";
|
|
237
237
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openviking/openclaw-plugin",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.27-1",
|
|
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",
|
|
@@ -150,7 +150,7 @@ export function registerOpenVikingArchiveTools(deps: OpenVikingArchiveToolsDeps)
|
|
|
150
150
|
trigger: { query, derivedKeywords: [query] },
|
|
151
151
|
searches: [{
|
|
152
152
|
resourceType: "archive",
|
|
153
|
-
targetUriResolved: archiveId ? `viking
|
|
153
|
+
targetUriResolved: archiveId ? `viking://~/sessions/${ovSessionId}/history/${archiveId}` : `viking://~/sessions/${ovSessionId}/history`,
|
|
154
154
|
limit: deps.traceRecallMaxResultsPerSearch,
|
|
155
155
|
durationMs: Date.now() - started,
|
|
156
156
|
total: result.matches?.length ?? result.count ?? 0,
|
|
@@ -119,7 +119,7 @@ function toLimitedInteger(value: unknown, fallback: number, min: number, max: nu
|
|
|
119
119
|
|
|
120
120
|
function inferUriType(uri: string): string {
|
|
121
121
|
if (uri.startsWith("viking://resources") || uri.startsWith("viking://resource")) return "resource";
|
|
122
|
-
if (
|
|
122
|
+
if (/^viking:\/\/(?:user\/[^/]+|~)\/sessions(?:\/|$)/.test(uri)) return "session";
|
|
123
123
|
if (uri.startsWith("viking://user/skills") || uri.startsWith("viking://~/skills") || uri.startsWith("viking://skills")) return "skill";
|
|
124
124
|
if (uri.startsWith("viking://user/") || uri.startsWith("viking://~/")) return "user_memory";
|
|
125
125
|
if (uri.includes("/archive") || uri.includes("/history/")) return "archive";
|
|
@@ -78,7 +78,7 @@ export function parseToolResultRef(value: unknown): ToolResultRef | null {
|
|
|
78
78
|
if (!raw) {
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
81
|
-
const match = raw.match(/^viking:\/\/
|
|
81
|
+
const match = raw.match(/^viking:\/\/(?:user\/[^/]+|~)\/sessions\/([^/]+)\/tool-results\/([^/?#]+)(?:[?#].*)?$/);
|
|
82
82
|
if (!match) {
|
|
83
83
|
return null;
|
|
84
84
|
}
|
|
@@ -90,7 +90,7 @@ export function parseToolResultRef(value: unknown): ToolResultRef | null {
|
|
|
90
90
|
return {
|
|
91
91
|
sessionId,
|
|
92
92
|
toolResultId,
|
|
93
|
-
ref:
|
|
93
|
+
ref: raw.split(/[?#]/, 1)[0]!,
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -120,14 +120,14 @@ export function registerOpenVikingToolResultTools({
|
|
|
120
120
|
description:
|
|
121
121
|
"Restore the full original content of a tool result that was externalized by OpenViking. " +
|
|
122
122
|
"Use when a previous tool result was externalized and only a preview is visible — " +
|
|
123
|
-
"the preview contains a [tool-result-ref] or viking://
|
|
123
|
+
"the preview contains a [tool-result-ref] or viking://user/.../sessions/.../tool-results/... URI. " +
|
|
124
124
|
"\"Read\" tool returns the same truncated preview; this tool returns the complete content. " +
|
|
125
125
|
"To read all content: pass offset=0 and a limit large enough to cover the whole result " +
|
|
126
126
|
"(e.g. limit=100000). Use offset/limit for paging only when you need a specific section.",
|
|
127
127
|
parameters: Type.Object({
|
|
128
128
|
tool_output_ref: Type.String({
|
|
129
129
|
description:
|
|
130
|
-
"Exact OV URI from the preview, e.g. viking://
|
|
130
|
+
"Exact OV URI from the preview, e.g. viking://user/<user_id>/sessions/<session_id>/tool-results/<tool_result_id>",
|
|
131
131
|
}),
|
|
132
132
|
offset: Type.Optional(Type.Number({ description: "Unicode character offset. Default: 0" })),
|
|
133
133
|
limit: Type.Optional(Type.Number({ description: "Maximum Unicode characters to read. Default: 20000" })),
|
|
@@ -147,7 +147,7 @@ export function registerOpenVikingToolResultTools({
|
|
|
147
147
|
const parsed = parseToolResultRef(params.tool_output_ref ?? params.ref ?? params.uri);
|
|
148
148
|
if (!parsed) {
|
|
149
149
|
return {
|
|
150
|
-
content: [{ type: "text", text: "Error: tool_output_ref must be a viking://
|
|
150
|
+
content: [{ type: "text", text: "Error: tool_output_ref must be a viking://user/.../sessions/.../tool-results/... URI." }],
|
|
151
151
|
details: { error: "invalid_tool_output_ref" },
|
|
152
152
|
};
|
|
153
153
|
}
|
|
@@ -221,7 +221,7 @@ export function registerOpenVikingToolResultTools({
|
|
|
221
221
|
parameters: Type.Object({
|
|
222
222
|
tool_output_ref: Type.String({
|
|
223
223
|
description:
|
|
224
|
-
"Exact OV URI from the preview, e.g. viking://
|
|
224
|
+
"Exact OV URI from the preview, e.g. viking://user/<user_id>/sessions/<session_id>/tool-results/<tool_result_id>",
|
|
225
225
|
}),
|
|
226
226
|
query: Type.String({ description: "Keyword or exact text to search for" }),
|
|
227
227
|
limit: Type.Optional(Type.Number({ description: "Maximum matches. Default: 20" })),
|
|
@@ -242,7 +242,7 @@ export function registerOpenVikingToolResultTools({
|
|
|
242
242
|
const parsed = parseToolResultRef(params.tool_output_ref ?? params.ref ?? params.uri);
|
|
243
243
|
if (!parsed) {
|
|
244
244
|
return {
|
|
245
|
-
content: [{ type: "text", text: "Error: tool_output_ref must be a viking://
|
|
245
|
+
content: [{ type: "text", text: "Error: tool_output_ref must be a viking://user/.../sessions/.../tool-results/... URI." }],
|
|
246
246
|
details: { error: "invalid_tool_output_ref" },
|
|
247
247
|
};
|
|
248
248
|
}
|
|
@@ -587,7 +587,7 @@ Requires `traceRecall=true`; persisted lookup also requires `traceRecallPersist=
|
|
|
587
587
|
|
|
588
588
|
### Externalized Tool Result Tools
|
|
589
589
|
|
|
590
|
-
Use these when a preview contains a `viking://
|
|
590
|
+
Use these when a preview contains a `viking://user/{user_id}/sessions/<session_id>/tool-results/<tool_result_id>` ref.
|
|
591
591
|
|
|
592
592
|
| Tool | Parameters |
|
|
593
593
|
|---|---|
|
|
@@ -242,7 +242,7 @@ Trace records exist only when `traceRecall=true`; persisted lookup requires `tra
|
|
|
242
242
|
|
|
243
243
|
### Externalized tool-result tools
|
|
244
244
|
|
|
245
|
-
Use when a preview contains `viking://
|
|
245
|
+
Use when a preview contains `viking://user/{user_id}/sessions/<session_id>/tool-results/<tool_result_id>`.
|
|
246
246
|
|
|
247
247
|
| Tool | Parameters |
|
|
248
248
|
|---|---|
|