@openviking/openclaw-plugin 2026.5.26 → 2026.6.17-dev.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.
Files changed (112) hide show
  1. package/INSTALL-AGENT.md +355 -355
  2. package/INSTALL-ZH.md +405 -345
  3. package/INSTALL.md +366 -362
  4. package/README.md +364 -338
  5. package/adapters/http-transport.ts +3 -0
  6. package/adapters/resource-packager.ts +141 -0
  7. package/auto-recall.ts +518 -257
  8. package/client.ts +963 -939
  9. package/commands/setup.ts +1169 -1002
  10. package/config/feature-gates.json +10 -0
  11. package/config.ts +819 -476
  12. package/context-engine.ts +408 -1737
  13. package/dist/adapters/http-transport.js +1 -0
  14. package/dist/adapters/resource-packager.js +114 -0
  15. package/dist/auto-recall.js +228 -32
  16. package/dist/client.js +125 -161
  17. package/dist/commands/setup.js +170 -32
  18. package/dist/config.js +285 -64
  19. package/dist/context-engine.js +64 -1179
  20. package/dist/index.js +209 -1470
  21. package/dist/memory-ranking.js +35 -12
  22. package/dist/plugin/command-registration.js +5 -0
  23. package/dist/plugin/openviking-archive-tools.js +210 -0
  24. package/dist/plugin/openviking-bypass-runtime.js +8 -0
  25. package/dist/plugin/openviking-client-runtime.js +28 -0
  26. package/dist/plugin/openviking-command-args.js +146 -0
  27. package/dist/plugin/openviking-command-definitions.js +206 -0
  28. package/dist/plugin/openviking-context-engine-ref.js +11 -0
  29. package/dist/plugin/openviking-context-engine-registration.js +23 -0
  30. package/dist/plugin/openviking-feature-gates.js +250 -0
  31. package/dist/plugin/openviking-import-runtime.js +50 -0
  32. package/dist/plugin/openviking-import-tools.js +86 -0
  33. package/dist/plugin/openviking-lifecycle-hooks.js +33 -0
  34. package/dist/plugin/openviking-memory-recall-tools.js +233 -0
  35. package/dist/plugin/openviking-memory-tools.js +199 -0
  36. package/dist/plugin/openviking-query-config-command.js +203 -0
  37. package/dist/plugin/openviking-query-runtime.js +367 -0
  38. package/dist/plugin/openviking-query-tools.js +91 -0
  39. package/dist/plugin/openviking-recall-trace-runtime.js +387 -0
  40. package/dist/plugin/openviking-recall-trace-tools.js +38 -0
  41. package/dist/plugin/openviking-runtime-state.js +26 -0
  42. package/dist/plugin/openviking-runtime-utils.js +62 -0
  43. package/dist/plugin/openviking-services.js +20 -0
  44. package/dist/plugin/openviking-session-routing-runtime.js +61 -0
  45. package/dist/plugin/openviking-tool-result-tools.js +268 -0
  46. package/dist/plugin/recall-trace-routes.js +77 -0
  47. package/dist/plugin/tool-registration.js +23 -0
  48. package/dist/process-manager.js +5 -17
  49. package/dist/query-config.js +336 -0
  50. package/dist/recall-trace.js +309 -0
  51. package/dist/registries/recall-resource-types.js +58 -0
  52. package/dist/routing/identity-routing.js +152 -0
  53. package/dist/routing/memory-uri.js +7 -0
  54. package/dist/services/context-lifecycle-service.js +847 -0
  55. package/dist/services/context-message-adapter.js +340 -0
  56. package/dist/session-transcript-repair.js +0 -1
  57. package/dist/text-utils.js +14 -31
  58. package/dist/token-estimator.js +51 -0
  59. package/index.ts +408 -1985
  60. package/install-manifest.json +57 -47
  61. package/memory-ranking.ts +303 -267
  62. package/openclaw.plugin.json +497 -335
  63. package/package.json +86 -76
  64. package/plugin/command-registration.ts +34 -0
  65. package/plugin/openviking-archive-tools.ts +301 -0
  66. package/plugin/openviking-bypass-runtime.ts +26 -0
  67. package/plugin/openviking-client-runtime.ts +74 -0
  68. package/plugin/openviking-command-args.ts +187 -0
  69. package/plugin/openviking-command-definitions.ts +294 -0
  70. package/plugin/openviking-context-engine-ref.ts +16 -0
  71. package/plugin/openviking-context-engine-registration.ts +97 -0
  72. package/plugin/openviking-feature-gates.ts +335 -0
  73. package/plugin/openviking-import-runtime.ts +105 -0
  74. package/plugin/openviking-import-tools.ts +133 -0
  75. package/plugin/openviking-lifecycle-hooks.ts +65 -0
  76. package/plugin/openviking-memory-recall-tools.ts +368 -0
  77. package/plugin/openviking-memory-tools.ts +299 -0
  78. package/plugin/openviking-query-config-command.ts +230 -0
  79. package/plugin/openviking-query-formatters.ts +108 -0
  80. package/plugin/openviking-query-runtime.ts +476 -0
  81. package/plugin/openviking-query-tools.ts +161 -0
  82. package/plugin/openviking-recall-trace-runtime.ts +482 -0
  83. package/plugin/openviking-recall-trace-tools.ts +99 -0
  84. package/plugin/openviking-runtime-state.ts +52 -0
  85. package/plugin/openviking-runtime-utils.ts +67 -0
  86. package/plugin/openviking-services.ts +49 -0
  87. package/plugin/openviking-session-routing-runtime.ts +105 -0
  88. package/plugin/openviking-tool-result-tools.ts +397 -0
  89. package/plugin/recall-trace-routes.ts +133 -0
  90. package/plugin/tool-registration.ts +51 -0
  91. package/process-manager.ts +41 -45
  92. package/query-config.ts +400 -0
  93. package/recall-trace.ts +442 -0
  94. package/registries/openviking-tools.ts +84 -0
  95. package/registries/recall-resource-types.ts +74 -0
  96. package/routing/identity-routing.ts +210 -0
  97. package/routing/memory-uri.ts +8 -0
  98. package/runtime-utils.ts +5 -5
  99. package/services/context-lifecycle-service.ts +1209 -0
  100. package/services/context-message-adapter.ts +375 -0
  101. package/services/setup/config-writer.ts +125 -0
  102. package/services/setup/exit-utils.ts +5 -0
  103. package/services/setup/package-metadata.ts +56 -0
  104. package/services/setup/probe-service.ts +143 -0
  105. package/services/setup/setup-flow.ts +306 -0
  106. package/services/setup/version-compatibility.ts +41 -0
  107. package/session-transcript-repair.ts +528 -530
  108. package/skills/install-openviking-memory/SKILL.md +752 -665
  109. package/skills/openviking-context-database/SKILL.md +286 -0
  110. package/text-utils.ts +488 -507
  111. package/token-estimator.ts +65 -0
  112. package/tool-call-id.ts +331 -331
@@ -1,335 +1,497 @@
1
- {
2
- "id": "openviking",
3
- "name": "OpenViking",
4
- "kind": "context-engine",
5
- "description": "OpenClaw context-engine plugin for memory management — powered by OpenViking",
6
- "activation": {
7
- "onStartup": true,
8
- "onCapabilities": [
9
- "hook",
10
- "tool"
11
- ]
12
- },
13
- "contracts": {
14
- "tools": [
15
- "add_resource",
16
- "add_skill",
17
- "ov_search",
18
- "memory_recall",
19
- "memory_store",
20
- "memory_forget",
21
- "ov_archive_search",
22
- "ov_archive_expand",
23
- "openviking_tool_result_read",
24
- "openviking_tool_result_search",
25
- "openviking_tool_result_list"
26
- ]
27
- },
28
- "commandAliases": [
29
- {
30
- "name": "setup",
31
- "kind": "runtime-slash",
32
- "cliCommand": "openviking"
33
- },
34
- {
35
- "name": "status",
36
- "kind": "runtime-slash",
37
- "cliCommand": "openviking"
38
- }
39
- ],
40
- "providerAuthEnvVars": {
41
- "openviking": [
42
- "OPENVIKING_API_KEY",
43
- "OPENVIKING_BASE_URL"
44
- ]
45
- },
46
- "skills": [
47
- "./skills/install-openviking-memory"
48
- ],
49
- "setup": {
50
- "providers": [
51
- {
52
- "id": "openviking",
53
- "authMethods": [
54
- "api_key",
55
- "trusted"
56
- ],
57
- "envVars": [
58
- "OPENVIKING_API_KEY",
59
- "OPENVIKING_BASE_URL"
60
- ],
61
- "cliFlags": {
62
- "api_key": [
63
- "--base-url",
64
- "--api-key"
65
- ],
66
- "trusted": [
67
- "--base-url"
68
- ]
69
- }
70
- }
71
- ],
72
- "requiresRuntime": true,
73
- "cliCommand": "openclaw openviking setup"
74
- },
75
- "uiHints": {
76
- "baseUrl": {
77
- "label": "OpenViking Base URL",
78
- "placeholder": "http://127.0.0.1:1933",
79
- "help": "HTTP URL when mode is remote (or ${OPENVIKING_BASE_URL})"
80
- },
81
- "agent_prefix": {
82
- "label": "Agent Prefix",
83
- "placeholder": "optional-prefix",
84
- "help": "Optional OpenViking agent prefix. Empty: follow OpenClaw ctx.agentId directly. Non-empty: use `<prefix>_<OpenClaw ctx.agentId>` (sanitized to letters/digits/_/-). If OpenClaw ctx.agentId is unavailable, use OpenClaw default agent `main`."
85
- },
86
- "apiKey": {
87
- "label": "OpenViking API Key",
88
- "sensitive": true,
89
- "placeholder": "${OPENVIKING_API_KEY}",
90
- "help": "Optional API key for OpenViking server"
91
- },
92
- "accountId": {
93
- "label": "Account ID",
94
- "placeholder": "(derived from API key)",
95
- "help": "Advanced option. Tenant account ID. Only needed when explicitly sending identity headers, such as root-key or trusted deployments. With a user key the server derives identity from the key.",
96
- "advanced": true
97
- },
98
- "userId": {
99
- "label": "User ID",
100
- "placeholder": "(derived from API key)",
101
- "help": "Advanced option. Tenant user ID. Only needed when explicitly sending identity headers.",
102
- "advanced": true
103
- },
104
- "isolateUserScopeByAgent": {
105
- "label": "Isolate User Scope By Agent",
106
- "placeholder": "false",
107
- "help": "Canonical namespace policy. false (default): user alias expands to viking://user/<user_id>/... . true: expands to viking://user/<user_id>/agent/<agent_id>/... . Must match the server-side account namespace policy.",
108
- "advanced": true
109
- },
110
- "isolateAgentScopeByUser": {
111
- "label": "Isolate Agent Scope By User",
112
- "placeholder": "false",
113
- "help": "Canonical namespace policy. false (default): agent alias expands to viking://agent/<agent_id>/... . true: expands to viking://agent/<agent_id>/user/<user_id>/... . Must match the server-side account namespace policy.",
114
- "advanced": true
115
- },
116
- "agentScopeMode": {
117
- "label": "Deprecated Agent Scope Mode",
118
- "placeholder": "agent",
119
- "help": "Deprecated compatibility alias for older routing. Prefer isolateUserScopeByAgent / isolateAgentScopeByUser. Explicit user_agent => false/true, explicit agent => false/false. When fully unset, the plugin defaults to false/false to match the current server-side policy.",
120
- "advanced": true
121
- },
122
- "targetUri": {
123
- "label": "Search Target URI",
124
- "placeholder": "viking://user/memories",
125
- "help": "Default OpenViking target URI for memory search"
126
- },
127
- "timeoutMs": {
128
- "label": "Request Timeout (ms)",
129
- "placeholder": "15000",
130
- "advanced": true
131
- },
132
- "autoCapture": {
133
- "label": "Auto-Capture",
134
- "help": "Extract memories from recent conversation messages via OpenViking sessions"
135
- },
136
- "captureMode": {
137
- "label": "Capture Mode",
138
- "placeholder": "semantic",
139
- "advanced": true,
140
- "help": "semantic captures all eligible user text; keyword uses trigger regex first"
141
- },
142
- "captureMaxLength": {
143
- "label": "Capture Max Length",
144
- "placeholder": "24000",
145
- "advanced": true,
146
- "help": "Maximum sanitized user text length allowed for auto-capture"
147
- },
148
- "autoRecall": {
149
- "label": "Auto-Recall",
150
- "help": "Inject relevant OpenViking memories into agent context"
151
- },
152
- "recallResources": {
153
- "label": "Recall Resources",
154
- "help": "Include resources (viking://resources) in auto-recall and default memory_recall search. Enables account-level shared knowledge retrieval.",
155
- "advanced": true
156
- },
157
- "recallLimit": {
158
- "label": "Recall Limit",
159
- "placeholder": "6",
160
- "advanced": true
161
- },
162
- "recallScoreThreshold": {
163
- "label": "Recall Score Threshold",
164
- "placeholder": "0.15",
165
- "advanced": true
166
- },
167
- "recallMaxInjectedChars": {
168
- "label": "Recall Max Injected Chars",
169
- "placeholder": "4000",
170
- "advanced": true,
171
- "help": "Maximum total characters for auto-recall memory injection. Complete memories that do not fit are skipped, not truncated."
172
- },
173
- "recallMaxContentChars": {
174
- "label": "Deprecated Recall Max Content Chars",
175
- "placeholder": "5000",
176
- "advanced": true,
177
- "help": "Deprecated compatibility option and will be removed in a future release. Auto-recall now keeps individual memories intact and uses recallMaxInjectedChars."
178
- },
179
- "recallPreferAbstract": {
180
- "label": "Recall Prefer Abstract",
181
- "advanced": true,
182
- "help": "Use memory abstract instead of fetching full content when available"
183
- },
184
- "recallTokenBudget": {
185
- "label": "Deprecated Recall Token Budget",
186
- "placeholder": "4000",
187
- "advanced": true,
188
- "help": "Deprecated compatibility alias and will be removed in a future release. Use recallMaxInjectedChars."
189
- },
190
- "bypassSessionPatterns": {
191
- "label": "Bypass Session Patterns",
192
- "placeholder": "agent:*:cron:**",
193
- "help": "Completely bypass OpenViking for matching session keys. Use * within one segment and ** across segments.",
194
- "advanced": true
195
- },
196
- "commitTokenThreshold": {
197
- "label": "Commit Token Threshold",
198
- "placeholder": "20000",
199
- "advanced": true,
200
- "help": "Minimum estimated pending tokens before auto-commit triggers. Set to 0 to commit every turn."
201
- },
202
- "commitKeepRecentCount": {
203
- "label": "Commit Keep Recent Count",
204
- "placeholder": "10",
205
- "advanced": true,
206
- "help": "WM v2: number of most-recent messages kept live after an afterTurn commit. Compact path always uses 0."
207
- },
208
- "emitStandardDiagnostics": {
209
- "label": "Standard diagnostics (diag JSON lines)",
210
- "advanced": true,
211
- "help": "Emit structured openviking: diag {...} for assemble/afterTurn. Set false to disable."
212
- },
213
- "logFindRequests": {
214
- "label": "Log find requests",
215
- "help": "Log tenant routing: /search/find + session messages/commit (X-OpenViking-*; not apiKey). Or set env OPENVIKING_LOG_ROUTING=1 or OPENVIKING_DEBUG=1.",
216
- "advanced": true
217
- }
218
- },
219
- "configSchema": {
220
- "type": "object",
221
- "additionalProperties": false,
222
- "properties": {
223
- "mode": {
224
- "type": "string",
225
- "description": "Legacy field kept for backward compatibility. Only 'remote' is supported."
226
- },
227
- "baseUrl": {
228
- "type": "string"
229
- },
230
- "agent_prefix": {
231
- "type": "string"
232
- },
233
- "agentId": {
234
- "type": "string",
235
- "description": "Deprecated: use agent_prefix instead"
236
- },
237
- "serverAuthMode": {
238
- "type": "string",
239
- "description": "Deprecated and ignored. Tenant identity headers are controlled by explicit accountId/userId."
240
- },
241
- "apiKey": {
242
- "type": "string"
243
- },
244
- "accountId": {
245
- "type": "string"
246
- },
247
- "userId": {
248
- "type": "string"
249
- },
250
- "isolateUserScopeByAgent": {
251
- "type": "boolean"
252
- },
253
- "isolateAgentScopeByUser": {
254
- "type": "boolean"
255
- },
256
- "agentScopeMode": {
257
- "type": "string"
258
- },
259
- "targetUri": {
260
- "type": "string"
261
- },
262
- "timeoutMs": {
263
- "type": "number"
264
- },
265
- "autoCapture": {
266
- "type": "boolean"
267
- },
268
- "captureMode": {
269
- "type": "string"
270
- },
271
- "captureMaxLength": {
272
- "type": "number"
273
- },
274
- "autoRecall": {
275
- "type": "boolean"
276
- },
277
- "recallResources": {
278
- "type": "boolean"
279
- },
280
- "recallLimit": {
281
- "type": "number"
282
- },
283
- "recallScoreThreshold": {
284
- "type": "number"
285
- },
286
- "recallMaxInjectedChars": {
287
- "type": "number"
288
- },
289
- "recallMaxContentChars": {
290
- "type": "number"
291
- },
292
- "recallPreferAbstract": {
293
- "type": "boolean"
294
- },
295
- "recallTokenBudget": {
296
- "type": "number"
297
- },
298
- "commitTokenThreshold": {
299
- "type": "number"
300
- },
301
- "commitKeepRecentCount": {
302
- "type": "number",
303
- "minimum": 0,
304
- "maximum": 1000
305
- },
306
- "bypassSessionPatterns": {
307
- "type": "array",
308
- "items": {
309
- "type": "string"
310
- }
311
- },
312
- "ingestReplyAssist": {
313
- "type": "boolean"
314
- },
315
- "ingestReplyAssistMinSpeakerTurns": {
316
- "type": "number"
317
- },
318
- "ingestReplyAssistMinChars": {
319
- "type": "number"
320
- },
321
- "ingestReplyAssistIgnoreSessionPatterns": {
322
- "type": "array",
323
- "items": {
324
- "type": "string"
325
- }
326
- },
327
- "emitStandardDiagnostics": {
328
- "type": "boolean"
329
- },
330
- "logFindRequests": {
331
- "type": "boolean"
332
- }
333
- }
334
- }
335
- }
1
+ {
2
+ "id": "openviking",
3
+ "name": "OpenViking",
4
+ "kind": "context-engine",
5
+ "description": "OpenClaw context-engine plugin for memory management — powered by OpenViking",
6
+ "activation": {
7
+ "onStartup": true,
8
+ "onCapabilities": [
9
+ "hook",
10
+ "tool"
11
+ ]
12
+ },
13
+ "contracts": {
14
+ "tools": [
15
+ "add_skill",
16
+ "ov_search",
17
+ "ov_read",
18
+ "ov_multi_read",
19
+ "ov_list",
20
+ "memory_recall",
21
+ "ov_recall_trace",
22
+ "memory_store",
23
+ "memory_forget",
24
+ "ov_archive_search",
25
+ "ov_archive_expand",
26
+ "openviking_tool_result_read",
27
+ "openviking_tool_result_search",
28
+ "openviking_tool_result_list"
29
+ ]
30
+ },
31
+ "commandAliases": [
32
+ {
33
+ "name": "setup",
34
+ "kind": "runtime-slash",
35
+ "cliCommand": "openviking"
36
+ },
37
+ {
38
+ "name": "status",
39
+ "kind": "runtime-slash",
40
+ "cliCommand": "openviking"
41
+ }
42
+ ],
43
+ "providerAuthEnvVars": {
44
+ "openviking": [
45
+ "OPENVIKING_API_KEY",
46
+ "OPENVIKING_BASE_URL"
47
+ ]
48
+ },
49
+ "skills": [
50
+ "./skills/install-openviking-memory",
51
+ "./skills/openviking-context-database"
52
+ ],
53
+ "setup": {
54
+ "providers": [
55
+ {
56
+ "id": "openviking",
57
+ "authMethods": [
58
+ "api_key",
59
+ "trusted"
60
+ ],
61
+ "envVars": [
62
+ "OPENVIKING_API_KEY",
63
+ "OPENVIKING_BASE_URL"
64
+ ],
65
+ "cliFlags": {
66
+ "api_key": [
67
+ "--base-url",
68
+ "--api-key"
69
+ ],
70
+ "trusted": [
71
+ "--base-url"
72
+ ]
73
+ }
74
+ }
75
+ ],
76
+ "requiresRuntime": true,
77
+ "cliCommand": "openclaw openviking setup"
78
+ },
79
+ "uiHints": {
80
+ "baseUrl": {
81
+ "label": "OpenViking Base URL",
82
+ "placeholder": "http://127.0.0.1:1933",
83
+ "help": "HTTP URL when mode is remote (or ${OPENVIKING_BASE_URL})"
84
+ },
85
+ "peer_role": {
86
+ "label": "Peer Role",
87
+ "placeholder": "assistant",
88
+ "help": "Controls which messages include peer_id: none, assistant, or person. New installs default to assistant."
89
+ },
90
+ "peer_prefix": {
91
+ "label": "Peer Prefix",
92
+ "placeholder": "optional-prefix",
93
+ "help": "Optional prefix for assistant peer_id values derived from OpenClaw runtime agent IDs."
94
+ },
95
+ "apiKey": {
96
+ "label": "OpenViking API Key",
97
+ "sensitive": true,
98
+ "placeholder": "${OPENVIKING_API_KEY}",
99
+ "help": "Optional API key for OpenViking server"
100
+ },
101
+ "accountId": {
102
+ "label": "Account ID",
103
+ "placeholder": "(derived from API key)",
104
+ "help": "Advanced option. Tenant account ID. Only needed when explicitly sending identity headers, such as root-key or trusted deployments. With a user key the server derives identity from the key.",
105
+ "advanced": true
106
+ },
107
+ "userId": {
108
+ "label": "User ID",
109
+ "placeholder": "(derived from API key)",
110
+ "help": "Advanced option. Tenant user ID. Only needed when explicitly sending identity headers.",
111
+ "advanced": true
112
+ },
113
+ "targetUri": {
114
+ "label": "Search Target URI",
115
+ "placeholder": "viking://user/memories",
116
+ "help": "Default OpenViking target URI for memory search"
117
+ },
118
+ "timeoutMs": {
119
+ "label": "Request Timeout (ms)",
120
+ "placeholder": "15000",
121
+ "advanced": true
122
+ },
123
+ "autoCapture": {
124
+ "label": "Auto-Capture",
125
+ "help": "Extract memories from recent conversation messages via OpenViking sessions"
126
+ },
127
+ "captureMode": {
128
+ "label": "Capture Mode",
129
+ "placeholder": "semantic",
130
+ "advanced": true,
131
+ "help": "semantic captures all eligible user text; keyword uses trigger regex first"
132
+ },
133
+ "captureMaxLength": {
134
+ "label": "Capture Max Length",
135
+ "placeholder": "24000",
136
+ "advanced": true,
137
+ "help": "Maximum sanitized user text length allowed for auto-capture"
138
+ },
139
+ "autoRecall": {
140
+ "label": "Auto-Recall",
141
+ "help": "Inject relevant OpenViking memories into agent context"
142
+ },
143
+ "autoRecallTimeoutMs": {
144
+ "label": "Auto-Recall Timeout (ms)",
145
+ "placeholder": "5000",
146
+ "advanced": true,
147
+ "help": "Outer time budget for the whole auto-recall flow, including search, ranking, and memory reads."
148
+ },
149
+ "recallResources": {
150
+ "label": "Recall Resources",
151
+ "help": "Include resources (viking://resources) in auto-recall and default memory_recall search. Enables account-level shared knowledge retrieval.",
152
+ "advanced": true
153
+ },
154
+ "recallTargetTypes": {
155
+ "label": "Recall Target Types",
156
+ "placeholder": "user,agent",
157
+ "help": "Comma-separated auto-recall and default memory_recall targets: user, agent, resource. Session history is available through ov_archive_search and ov_archive_expand.",
158
+ "advanced": true
159
+ },
160
+ "recallLimit": {
161
+ "label": "Recall Limit",
162
+ "placeholder": "6",
163
+ "advanced": true
164
+ },
165
+ "recallScoreThreshold": {
166
+ "label": "Recall Score Threshold",
167
+ "placeholder": "0.15",
168
+ "advanced": true
169
+ },
170
+ "recallMaxInjectedChars": {
171
+ "label": "Recall Max Injected Chars",
172
+ "placeholder": "4000",
173
+ "advanced": true,
174
+ "help": "Maximum total characters for auto-recall memory injection. Complete memories that do not fit are skipped, not truncated."
175
+ },
176
+ "recallMaxContentChars": {
177
+ "label": "Deprecated Recall Max Content Chars",
178
+ "placeholder": "5000",
179
+ "advanced": true,
180
+ "help": "Deprecated compatibility option and will be removed in a future release. Auto-recall now keeps individual memories intact and uses recallMaxInjectedChars."
181
+ },
182
+ "recallPreferAbstract": {
183
+ "label": "Recall Prefer Abstract",
184
+ "advanced": true,
185
+ "help": "Use memory abstract instead of fetching full content when available"
186
+ },
187
+ "recallTokenBudget": {
188
+ "label": "Deprecated Recall Token Budget",
189
+ "placeholder": "4000",
190
+ "advanced": true,
191
+ "help": "Deprecated compatibility alias and will be removed in a future release. Use recallMaxInjectedChars."
192
+ },
193
+ "bypassSessionPatterns": {
194
+ "label": "Bypass Session Patterns",
195
+ "placeholder": "agent:*:cron:**",
196
+ "help": "Completely bypass OpenViking for matching session keys. Use * within one segment and ** across segments.",
197
+ "advanced": true
198
+ },
199
+ "commitTokenThreshold": {
200
+ "label": "Commit Token Threshold",
201
+ "placeholder": "20000",
202
+ "advanced": true,
203
+ "help": "Minimum estimated pending tokens before auto-commit triggers. Set to 0 to commit every turn."
204
+ },
205
+ "commitKeepRecentCount": {
206
+ "label": "Commit Keep Recent Count",
207
+ "placeholder": "10",
208
+ "advanced": true,
209
+ "help": "WM v2: number of most-recent messages kept live after an afterTurn commit. Compact path always uses 0."
210
+ },
211
+ "emitStandardDiagnostics": {
212
+ "label": "Standard diagnostics (diag JSON lines)",
213
+ "advanced": true,
214
+ "help": "Emit structured openviking: diag {...} for assemble/afterTurn. Set false to disable."
215
+ },
216
+ "logFindRequests": {
217
+ "label": "Log find requests",
218
+ "help": "Log tenant routing: /search/find + session messages/commit (X-OpenViking-*; not apiKey). Or set env OPENVIKING_LOG_ROUTING=1 or OPENVIKING_DEBUG=1.",
219
+ "advanced": true
220
+ },
221
+ "traceRecall": {
222
+ "label": "Trace Recall",
223
+ "placeholder": "false",
224
+ "help": "Enable best-effort recall trace recording for debugging recall and search decisions.",
225
+ "advanced": true
226
+ },
227
+ "traceRecallPersist": {
228
+ "label": "Persist Recall Trace",
229
+ "placeholder": "false",
230
+ "help": "Persist recall traces to local JSONL files. Disabled by default.",
231
+ "advanced": true
232
+ },
233
+ "traceRecallDir": {
234
+ "label": "Recall Trace Directory",
235
+ "placeholder": "~/.openclaw/openviking/recall-traces",
236
+ "help": "Directory for persisted recall trace JSONL files.",
237
+ "advanced": true
238
+ },
239
+ "enableAddResourceTool": {
240
+ "label": "Enable Add Resource Tool",
241
+ "placeholder": "false",
242
+ "help": "Disabled by default so search and read flows cannot call add_resource. Set true only when agents should import resources; manual /add-resource remains available.",
243
+ "advanced": true
244
+ },
245
+ "enabledTools": {
246
+ "label": "Enabled Tools",
247
+ "placeholder": "default",
248
+ "help": "Agent-visible tool allowlist. Accepts tool names or groups: default, all, memory, resource_query, import, recall_trace, archive, tool_result. add_resource also requires enableAddResourceTool=true.",
249
+ "advanced": true
250
+ },
251
+ "disabledTools": {
252
+ "label": "Disabled Tools",
253
+ "placeholder": "memory",
254
+ "help": "Agent-visible tool blocklist applied after enabledTools. Accepts the same tool names or groups.",
255
+ "advanced": true
256
+ }
257
+ },
258
+ "configSchema": {
259
+ "type": "object",
260
+ "additionalProperties": false,
261
+ "properties": {
262
+ "mode": {
263
+ "type": "string",
264
+ "description": "Legacy field kept for backward compatibility. Only 'remote' is supported."
265
+ },
266
+ "baseUrl": {
267
+ "type": "string"
268
+ },
269
+ "peer_role": {
270
+ "type": "string",
271
+ "enum": [
272
+ "none",
273
+ "assistant",
274
+ "person"
275
+ ],
276
+ "default": "assistant",
277
+ "description": "Controls which session messages include peer_id."
278
+ },
279
+ "peer_prefix": {
280
+ "type": "string",
281
+ "description": "Optional prefix for assistant peer_id values."
282
+ },
283
+ "serverAuthMode": {
284
+ "type": "string",
285
+ "description": "Deprecated and ignored. Tenant identity headers are controlled by explicit accountId/userId."
286
+ },
287
+ "apiKey": {
288
+ "type": "string"
289
+ },
290
+ "accountId": {
291
+ "type": "string"
292
+ },
293
+ "userId": {
294
+ "type": "string"
295
+ },
296
+ "targetUri": {
297
+ "type": "string"
298
+ },
299
+ "timeoutMs": {
300
+ "type": "number"
301
+ },
302
+ "autoCapture": {
303
+ "type": "boolean"
304
+ },
305
+ "captureMode": {
306
+ "type": "string"
307
+ },
308
+ "captureMaxLength": {
309
+ "type": "number"
310
+ },
311
+ "autoRecall": {
312
+ "type": "boolean"
313
+ },
314
+ "autoRecallTimeoutMs": {
315
+ "type": "number",
316
+ "minimum": 1000,
317
+ "maximum": 300000
318
+ },
319
+ "recallResources": {
320
+ "type": "boolean"
321
+ },
322
+ "recallTargetTypes": {
323
+ "oneOf": [
324
+ {
325
+ "type": "string"
326
+ },
327
+ {
328
+ "type": "array",
329
+ "items": {
330
+ "type": "string",
331
+ "enum": [
332
+ "resource",
333
+ "user",
334
+ "agent"
335
+ ]
336
+ }
337
+ }
338
+ ]
339
+ },
340
+ "recallLimit": {
341
+ "type": "number"
342
+ },
343
+ "recallScoreThreshold": {
344
+ "type": "number"
345
+ },
346
+ "recallMaxInjectedChars": {
347
+ "type": "number"
348
+ },
349
+ "recallMaxContentChars": {
350
+ "type": "number"
351
+ },
352
+ "recallPreferAbstract": {
353
+ "type": "boolean"
354
+ },
355
+ "recallTokenBudget": {
356
+ "type": "number"
357
+ },
358
+ "commitTokenThreshold": {
359
+ "type": "number"
360
+ },
361
+ "commitKeepRecentCount": {
362
+ "type": "number",
363
+ "minimum": 0,
364
+ "maximum": 1000
365
+ },
366
+ "bypassSessionPatterns": {
367
+ "type": "array",
368
+ "items": {
369
+ "type": "string"
370
+ }
371
+ },
372
+ "ingestReplyAssist": {
373
+ "type": "boolean"
374
+ },
375
+ "ingestReplyAssistMinSpeakerTurns": {
376
+ "type": "number"
377
+ },
378
+ "ingestReplyAssistMinChars": {
379
+ "type": "number"
380
+ },
381
+ "ingestReplyAssistIgnoreSessionPatterns": {
382
+ "type": "array",
383
+ "items": {
384
+ "type": "string"
385
+ }
386
+ },
387
+ "emitStandardDiagnostics": {
388
+ "type": "boolean"
389
+ },
390
+ "logFindRequests": {
391
+ "type": "boolean"
392
+ },
393
+ "traceRecall": {
394
+ "type": "boolean"
395
+ },
396
+ "traceRecallPersist": {
397
+ "type": "boolean"
398
+ },
399
+ "traceRecallDir": {
400
+ "type": "string"
401
+ },
402
+ "traceRecallRetentionDays": {
403
+ "type": "number",
404
+ "minimum": 1,
405
+ "maximum": 3650
406
+ },
407
+ "traceRecallLoadRecentDays": {
408
+ "type": "number",
409
+ "minimum": 0,
410
+ "maximum": 3650
411
+ },
412
+ "traceRecallMaxEntries": {
413
+ "type": "number",
414
+ "minimum": 1,
415
+ "maximum": 1000000
416
+ },
417
+ "traceRecallMaxResultsPerSearch": {
418
+ "type": "number",
419
+ "minimum": 1,
420
+ "maximum": 1000
421
+ },
422
+ "traceRecallPreviewChars": {
423
+ "type": "number",
424
+ "minimum": 20,
425
+ "maximum": 10000
426
+ },
427
+ "traceRecallQueryMaxChars": {
428
+ "type": "number",
429
+ "minimum": 200,
430
+ "maximum": 200000
431
+ },
432
+ "traceRecallQueryMaxDays": {
433
+ "type": "number",
434
+ "minimum": 1,
435
+ "maximum": 3650
436
+ },
437
+ "traceRecallIncludeContentByDefault": {
438
+ "type": "boolean"
439
+ },
440
+ "traceRecallIncludeRawUserPreview": {
441
+ "type": "boolean"
442
+ },
443
+ "enableAddResourceTool": {
444
+ "type": "boolean"
445
+ },
446
+ "enabledTools": {
447
+ "oneOf": [
448
+ {
449
+ "type": "array",
450
+ "items": {
451
+ "type": "string"
452
+ }
453
+ },
454
+ {
455
+ "type": "string"
456
+ }
457
+ ]
458
+ },
459
+ "disabledTools": {
460
+ "oneOf": [
461
+ {
462
+ "type": "array",
463
+ "items": {
464
+ "type": "string"
465
+ }
466
+ },
467
+ {
468
+ "type": "string"
469
+ }
470
+ ]
471
+ },
472
+ "agentExperience": {
473
+ "type": "object",
474
+ "additionalProperties": false,
475
+ "properties": {
476
+ "enabled": {
477
+ "type": "boolean",
478
+ "default": false,
479
+ "description": "Enable agent experience memory recall. Default is false for conservative rollout."
480
+ },
481
+ "recallLimit": {
482
+ "type": "number"
483
+ },
484
+ "scoreThreshold": {
485
+ "type": "number"
486
+ },
487
+ "maxInjectedChars": {
488
+ "type": "number"
489
+ },
490
+ "minQueryChars": {
491
+ "type": "number"
492
+ }
493
+ }
494
+ }
495
+ }
496
+ }
497
+ }