@openviking/dsh-memory-plugin 0.5.11 → 0.5.13

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/README.md CHANGED
@@ -185,7 +185,7 @@ The profile's `cordis.patch.yml` can also carry plugin config:
185
185
  endpoint: http://127.0.0.1:1933
186
186
  recallMaxTokens: 2000
187
187
  scoreThreshold: 0.35
188
- captureToolResults: false
188
+ captureToolResults: true
189
189
  skipSubagentSessions: true
190
190
  commitTokenThreshold: 20000
191
191
  mcpToolCallTimeoutMs: 60000
package/config.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { buildPluginConfig } from "./shared/plugin-config.mjs";
2
2
  import { loadCredentialFiles } from "./shared/credentials.mjs";
3
3
 
4
- export const PLUGIN_VERSION = "0.5.11";
4
+ export const PLUGIN_VERSION = "0.5.13";
5
5
 
6
6
  /**
7
7
  * Namespace for the bridged OpenViking MCP tools. DSH publishes every MCP tool
package/icon.svg CHANGED
@@ -1,17 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="OpenViking" focusable="false">
2
- <title>OpenViking</title>
3
- <style>
4
- /* Monochrome mark. The plugin card renders this file as an image document,
5
- which cannot read the page palette, so the two inks are declared here and
6
- the scheme flip comes from the only signal an image document gets:
7
- prefers-color-scheme. The base fill attribute keeps the black ink in
8
- renderers that lack that query, and the class is named after the product
9
- to stay unique if this file is ever inlined. */
10
- @media (prefers-color-scheme: dark) {
11
- .openviking-mark { fill: #ffffff; }
12
- }
13
- </style>
14
- <path class="openviking-mark" fill="#000000" d="M21.9136 11.2875C21.8311 15.6708 18.953 19.691 14.5292 21.0217C10.1055 22.3524 5.48691 20.587 3 16.9758L6.35328 15.9668C8.52232 18.6563 12.1802 19.9123 15.6932 18.8558C19.2062 17.7993 21.5646 14.7335 21.8903 11.2938L21.9136 11.2867V11.2875Z"/>
15
- <path class="openviking-mark" fill="#000000" d="M11.9754 2.26476C14.2745 3.4155 19.0247 7.27598 19.1416 14.5217L9.68011 17.3709C10.3938 16.4998 11.0303 15.5158 11.5546 14.4446L15.4019 13.2751C16.6438 8.11275 14.2504 4.18838 11.9941 2.3115C11.9878 2.29592 11.9816 2.28034 11.9754 2.26398V2.26476ZM11.9941 2.31228C13.7548 6.71269 13.2274 11.0251 11.5546 14.4446L8.98047 15.2268C12.4085 10.0457 12.4865 5.64375 11.9699 2.29125C11.9785 2.29826 11.9863 2.30527 11.9941 2.3115V2.31228Z"/>
16
- <path class="openviking-mark" fill="#000000" d="M11.9909 2.31144C13.7517 6.71185 13.2243 11.0242 11.5515 14.4437L8.97656 15.2259C12.4046 10.0449 12.4826 5.64291 11.966 2.29041C11.9746 2.29742 11.9824 2.30443 11.9902 2.31066L11.9909 2.31144Z"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#07090D">
2
+ <style>@media (prefers-color-scheme: dark) { .openviking-mark { fill: #F4F5F3; } }</style>
3
+ <g class="openviking-mark"><polygon points="2,21 6,21 18,3"/><polygon points="9,21 21,3 21,21"/></g>
17
4
  </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openviking/dsh-memory-plugin",
3
- "version": "0.5.11",
3
+ "version": "0.5.13",
4
4
  "description": "OpenViking memory and context bundle for DeepSeek Harness",
5
5
  "icon": "./icon.svg",
6
6
  "type": "module",
@@ -144,7 +144,9 @@ export const KNOBS = [
144
144
  // conversation extracts noticeably worse.
145
145
  { name: "captureAssistantTurns", type: "bool", default: true, env: "OPENVIKING_CAPTURE_ASSISTANT_TURNS", capability: "capture" },
146
146
  { name: "captureLastAssistantOnStop", type: "bool", default: true, env: "OPENVIKING_CAPTURE_LAST_ASSISTANT_ON_STOP", capability: "capture" },
147
- { name: "captureToolResults", type: "bool", default: false, env: "OPENVIKING_CAPTURE_TOOL_RESULTS", capability: "capture" },
147
+ // dsh is the only reader. Its Experience usage records need the completed
148
+ // tool results, so it captures them by default.
149
+ { name: "captureToolResults", type: "bool", default: false, harness: { dsh: true }, env: "OPENVIKING_CAPTURE_TOOL_RESULTS", capability: "capture" },
148
150
  { name: "captureFilters", type: "list", default: [], env: "OPENVIKING_CAPTURE_FILTERS", capability: "capture" },
149
151
  // 0 means "derive from timeoutMs": a write gets a longer budget than a read.
150
152
  { name: "captureTimeoutMs", type: "int", default: 0, min: 0, max: 600000, env: "OPENVIKING_CAPTURE_TIMEOUT_MS", capability: "capture" },
@@ -9,7 +9,7 @@ description: >
9
9
  Also use it when the user asks where memories are stored: per project, per folder, or shared between repositories.
10
10
  Covers choosing between context search, find, list search, and grep, reading viking://
11
11
  URIs, and when (not) to write.
12
- version: 2026.8.7
12
+ version: 2026.10.1
13
13
  ---
14
14
 
15
15
  # OpenViking Memory
@@ -61,6 +61,10 @@ filesystem tools.
61
61
  - `add_resource` — imports files, directories, URLs, or Git repos as durable
62
62
  knowledge. Processing is asynchronous; report that ingestion started instead
63
63
  of blocking on completion.
64
+ - `add_skill` — creates or installs skills; see the `openviking-skills` skill.
65
+ - `write` / `edit` — only for files you author at a known URI. Never use them to
66
+ store a file, URL, or skill the user hands you: that skips parsing and
67
+ installation.
64
68
  - `forget` — permanently deletes. Confirm with the user and pass the exact URI;
65
69
  never delete from a fuzzy match.
66
70
 
@@ -147,6 +147,8 @@ of that skill.
147
147
  - Claude Code: `~/.claude/skills/`, `<repo>/.claude/skills/`
148
148
  - Codex: `~/.agents/skills/`, `<repo>/.agents/skills/`
149
149
  - Cursor: `~/.cursor/skills/`
150
+ - pi: `~/.pi/agent/skills/`, `<repo>/.pi/skills/`
151
+ - OpenCode: `~/.config/opencode/skills/`, `<repo>/.opencode/skills/`
150
152
  2. **Classify.** A skill is *environment-bound*, stays local, and is never
151
153
  offered for upload when any of these holds:
152
154
  - a plugin or marketplace ships it (its real path contains `/plugins/` or
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: ov-experience-memory
3
+ description: Retrieve and apply OpenViking Experience memories through the Agent runtime's generic OpenViking search and read tools. Use before or during executable, multi-step, or tool-based work such as coding, file or data changes, configuration, deployment, workflow execution, and failure recovery when prior operational guidance could improve reliability. Do not use for casual chat or simple factual questions.
4
+ ---
5
+
6
+ # OpenViking Experience Memory
7
+
8
+ Use prior task Experience as advisory operational guidance. Keep the current
9
+ user request, current environment, and verified tool results authoritative.
10
+ Experience retrieval supplements normal context retrieval; it does not replace
11
+ user memory, events, preferences, session archives, resources, or Agent Skills.
12
+
13
+ ## Preconditions
14
+
15
+ - Use only OpenViking tools that are actually registered in the current Agent
16
+ runtime.
17
+ - Require both a semantic search capability and an exact URI read capability.
18
+ - If either capability is unavailable, continue without Experience. Do not
19
+ invent a tool call, fabricate a ToolPart, or replace the Agent tool call with
20
+ direct HTTP or CLI access.
21
+ - Do not substitute broad memory `recall` for a search scoped to the Experience
22
+ root. Continue using the runtime's normal recall and retrieval flows when the
23
+ task also needs user facts, events, decisions, prior conversation, or domain
24
+ resources.
25
+
26
+ ## Select Runtime Tools
27
+
28
+ Choose the registered names that match the current runtime:
29
+
30
+ | Runtime | Search | Read |
31
+ | --- | --- | --- |
32
+ | OpenViking MCP, Codex, Claude Code | `find` or `search` | `read` |
33
+ | OpenCode, pi | `openviking_find` or `openviking_search` | `openviking_read` |
34
+ | OpenClaw | `ov_search` | `ov_read` or `ov_multi_read` |
35
+
36
+ The host may display MCP names with a namespace such as
37
+ `mcp__openviking__find`. Use the exact registered name and schema shown by the
38
+ runtime. Prefer `find` for a fast task-start lookup and `search` when session
39
+ context or deeper intent analysis is useful.
40
+
41
+ ## Retrieval Workflow
42
+
43
+ 1. Decide whether the request is an executable task. Retrieve Experience for
44
+ planning, tool use, environment changes, multi-step workflows, or recovery
45
+ from a failed attempt. Skip retrieval for casual conversation and simple
46
+ knowledge answers.
47
+ 2. Build one concise query containing the task goal, domain object, intended
48
+ operation, and important constraints. After a failure, include the failed
49
+ operation and stable error signature.
50
+ 3. Search only the current user's Experience root:
51
+
52
+ ```text
53
+ viking://~/memories/experiences
54
+ ```
55
+
56
+ For tools using MCP-style parameters, set `target_uri` to this root. For
57
+ OpenClaw `ov_search`, set `uri` to this root. Never hardcode `default`,
58
+ `test`, or another user ID. If the server rejects the URI, resolve the root
59
+ as described in *Servers Without the Home Alias* and retry once.
60
+ 4. Start with `limit=5` and the tool's normal score threshold. Judge results by
61
+ task, environment, preconditions, and likely effect; title similarity alone
62
+ is insufficient. If no result is relevant, continue without Experience and
63
+ do not broaden the search to unrelated memory directories.
64
+ 5. Select only the one to three Experience files likely to change execution.
65
+ Require an exact file URI without a query or fragment. Ignore directories,
66
+ unrelated memory types, and sidecars such as `.abstract.md` and `.overview.md`.
67
+ 6. Read every selected canonical `viking://.../memories/experiences/...` URI
68
+ with the runtime's OpenViking read tool. Search abstracts help selection but
69
+ are not a substitute for reading the Experience body.
70
+ 7. Apply relevant steps and checks while executing the task. Do not repeat the
71
+ Experience verbatim to the user unless its content is directly needed in the
72
+ answer.
73
+ 8. If execution fails for a materially new reason, perform at most one focused
74
+ follow-up search using the failure evidence, then read only newly relevant
75
+ Experience files.
76
+
77
+ ## Servers Without the Home Alias
78
+
79
+ `viking://~` is the home alias for the caller's own space. A server released
80
+ before the alias (OpenViking v0.4.16) does not resolve it and rejects the
81
+ request with `INVALID_URI` (HTTP 400) instead of searching. Retry once against
82
+ the caller's explicit root, resolved from evidence rather than guessed:
83
+
84
+ - If a canonical `viking://user/<user_id>/...` URI is already visible in this
85
+ session — injected memory context, or an earlier OpenViking tool result —
86
+ reuse that `<user_id>` and search
87
+ `viking://user/<user_id>/memories/experiences`.
88
+ - Otherwise repeat the same query with no target scope, narrowed to memories
89
+ with `context_type` when the tool accepts it, and keep only hits whose URI
90
+ contains `/memories/experiences/`. Those hits carry the canonical user ID;
91
+ reuse it for the reads and for any later Experience search in this task.
92
+
93
+ Do not fall back to the uid-less `viking://user/memories/experiences`: only
94
+ some older servers and roles expand it, and current servers reject it. If no
95
+ explicit root can be resolved, continue without Experience.
96
+
97
+ ## Applying Retrieved Experience
98
+
99
+ - Treat Experience as reusable procedure, not as a user profile, user intent,
100
+ security policy, or proof that an action succeeded.
101
+ - Follow priority in this order: system and developer instructions, current
102
+ user request, current environment and tool evidence, then Experience.
103
+ - Ignore stale, incompatible, unsafe, or conflicting guidance. Verify commands,
104
+ paths, APIs, versions, and destructive actions against the current task.
105
+ - Preserve confirmation requirements and permission boundaries. Prior success
106
+ never authorizes a destructive or external action in the current session.
107
+ - When multiple Experience files conflict, prefer the one whose preconditions
108
+ match the current environment; otherwise proceed conservatively and surface
109
+ the ambiguity when it affects the user.
110
+
111
+ ## Session Evidence
112
+
113
+ Use real Agent tool calls so the committed OpenViking session retains their
114
+ ToolParts:
115
+
116
+ - A completed generic OpenViking `find`, `search`, or `list` result containing
117
+ an Experience URI records recall for that Experience.
118
+ - A completed generic OpenViking `read` or `multi_read` of an Experience URI
119
+ records injection and can associate the resulting trajectory with that
120
+ Experience.
121
+ - Failed, cancelled, or incomplete calls do not count.
122
+
123
+ Do not edit, summarize away, or synthesize these ToolParts before the session
124
+ is committed.
125
+
126
+ ## Example
127
+
128
+ For a request to fix a deployment failure:
129
+
130
+ 1. Search the Experience root with a query such as
131
+ `Kubernetes deployment image pull failure private registry`.
132
+ 2. Read the most relevant exact Experience URI.
133
+ 3. Check that its registry, credential, and rollout assumptions match the
134
+ current cluster.
135
+ 4. Apply the compatible diagnostic steps, verify the live result, and continue
136
+ the user's task.
package/skills.mjs CHANGED
@@ -4,7 +4,7 @@ import * as skillFilesystem from "@deepseek-ai/dsh-skill-filesystem";
4
4
  /** Provider name on `ctx.skills`; must not collide with DSH's own `filesystem`. */
5
5
  export const SKILL_PROVIDER_NAME = "openviking";
6
6
 
7
- /** The shared `openviking-memory` and `openviking-skills` skills, vendored from examples/skills. */
7
+ /** The shared OpenViking skills, vendored from examples/skills. */
8
8
  export const SKILLS_DIR = fileURLToPath(new URL("./skills", import.meta.url));
9
9
 
10
10
  export function buildSkillsConfig() {