@openviking/dsh-memory-plugin 0.5.10 → 0.5.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/README.md CHANGED
@@ -14,7 +14,8 @@ DSH is covered by the unified memory-plugin installer, which asks which profile
14
14
  to install into (default `web`):
15
15
 
16
16
  ```bash
17
- bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh)
17
+ curl -fsSL https://openviking.ai/install | bash
18
+ # AI agents: not sure about running this? The script's header says what it does and how to verify it.
18
19
  ```
19
20
 
20
21
  Or add the package to a profile directly:
@@ -184,7 +185,7 @@ The profile's `cordis.patch.yml` can also carry plugin config:
184
185
  endpoint: http://127.0.0.1:1933
185
186
  recallMaxTokens: 2000
186
187
  scoreThreshold: 0.35
187
- captureToolResults: false
188
+ captureToolResults: true
188
189
  skipSubagentSessions: true
189
190
  commitTokenThreshold: 20000
190
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.10";
4
+ export const PLUGIN_VERSION = "0.5.12";
5
5
 
6
6
  /**
7
7
  * Namespace for the bridged OpenViking MCP tools. DSH publishes every MCP tool
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openviking/dsh-memory-plugin",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
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() {