Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

fix(plugins): strip CRLF from doctor command paths (#5567)

LI9d6b1f601b5a
diff --git a/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json b/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
index cced09d7b..7c430ecfc 100644
--- a/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.14",
+ "version": "0.5.15",
"clients": [
"cursor"
],
diff --git a/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json b/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
index 6a3cc83ce..6e307c1b3 100644
--- a/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
+++ b/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.5.14",
+ "version": "0.5.15",
"description": "Long-term semantic memory for Kimi Code CLI, powered by OpenViking.",
"author": {
"name": "OpenViking",
diff --git a/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json b/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
index c43594622..bbd40a94a 100644
--- a/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/kimicode/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.14",
+ "version": "0.5.15",
"clients": [
"kimicode"
],
diff --git a/examples/agent-hook-plugin/hosts/trae/openviking.integration.json b/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
index 2e524a4d0..68c2c52cd 100644
--- a/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/trae/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.14",
+ "version": "0.5.15",
"clients": [
"trae",
"trae-cn"
diff --git a/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json b/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
index 5acd9c8c7..2b4160ebd 100644
--- a/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
+++ b/examples/agent-hook-plugin/hosts/zcode/openviking.integration.json
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "openviking-memory",
- "version": "0.5.14",
+ "version": "0.5.15",
"clients": [
"zcode"
],
diff --git a/examples/agent-hook-plugin/plugin.json b/examples/agent-hook-plugin/plugin.json
index 8e8d7246d..dd085b23f 100644
--- a/examples/agent-hook-plugin/plugin.json
+++ b/examples/agent-hook-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "agent-hook-plugin",
- "version": "0.5.14",
+ "version": "0.5.15",
"description": "Long-term semantic memory for Cursor, TRAE, TRAE CN, ZCode and Kimi Code — powered by OpenViking. Auto-recall relevant memories and capture the conversation as it happens.",
"author": {
"name": "OpenViking",
diff --git a/examples/claude-code-memory-plugin/.claude-plugin/plugin.json b/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
index 47f357f81..ee3f89924 100644
--- a/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
+++ b/examples/claude-code-memory-plugin/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.7.6",
+ "version": "0.7.7",
"description": "Long-term semantic memory for Claude Code, powered by OpenViking. Auto-recall relevant memories at session start and capture important information during conversations.",
"author": {
"name": "OpenViking",
diff --git a/examples/claude-code-memory-plugin/package.json b/examples/claude-code-memory-plugin/package.json
index e61bd34da..a054ef396 100644
--- a/examples/claude-code-memory-plugin/package.json
+++ b/examples/claude-code-memory-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "claude-code-openviking-memory",
- "version": "0.7.6",
+ "version": "0.7.7",
"description": "OpenViking memory plugin for Claude Code — semantic long-term memory",
"type": "module",
"scripts": {
diff --git a/examples/claude-code-memory-plugin/scripts/shared/doctor-core.mjs b/examples/claude-code-memory-plugin/scripts/shared/doctor-core.mjs
index c15a97ead..107ed1db1 100644
--- a/examples/claude-code-memory-plugin/scripts/shared/doctor-core.mjs
+++ b/examples/claude-code-memory-plugin/scripts/shared/doctor-core.mjs
@@ -423,7 +423,7 @@ export function runCommand(command, args = [], { timeoutMs = 10000, env = proces
export function whichCommand(name) {
const result = runCommand(process.platform === "win32" ? "where" : "which", [name], { timeoutMs: 5000 });
- return result.ok ? result.stdout.split("\n")[0] : "";
+ return result.ok ? result.stdout.split(/\r?\n/)[0] : "";
}
export function parseNodeMajor(version) {
diff --git a/examples/codex-memory-plugin/.codex-plugin/plugin.json b/examples/codex-memory-plugin/.codex-plugin/plugin.json
index 91d300b85..b29e6f2bb 100644
--- a/examples/codex-memory-plugin/.codex-plugin/plugin.json
+++ b/examples/codex-memory-plugin/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "openviking-memory",
- "version": "0.11.5",
+ "version": "0.11.6",
"description": "Long-term semantic memory for Codex, powered by OpenViking. Recall on UserPromptSubmit, incremental add_message on Stop (per turn), commit on SessionEnd (Codex >= 0.145) and on PreCompact, with an idle/ended sweep on SessionStart as the fallback for signals, crashes and older Codex builds. Includes a local stdio MCP proxy that reads OpenViking credentials from env/ovcli.conf.",
"author": {
"name": "OpenViking",
diff --git a/examples/codex-memory-plugin/scripts/shared/doctor-core.mjs b/examples/codex-memory-plugin/scripts/shared/doctor-core.mjs
index c15a97ead..107ed1db1 100644
--- a/examples/codex-memory-plugin/scripts/shared/doctor-core.mjs
+++ b/examples/codex-memory-plugin/scripts/shared/doctor-core.mjs
@@ -423,7 +423,7 @@ export function runCommand(command, args = [], { timeoutMs = 10000, env = proces
export function whichCommand(name) {
const result = runCommand(process.platform === "win32" ? "where" : "which", [name], { timeoutMs: 5000 });
- return result.ok ? result.stdout.split("\n")[0] : "";
+ return result.ok ? result.stdout.split(/\r?\n/)[0] : "";
}
export function parseNodeMajor(version) {
diff --git a/examples/dsh-memory-plugin/config.mjs b/examples/dsh-memory-plugin/config.mjs
index 6be8b8e60..4ebdd1d62 100644
--- a/examples/dsh-memory-plugin/config.mjs
+++ b/examples/dsh-memory-plugin/config.mjs
@@ -1,7 +1,7 @@
import { buildPluginConfig } from "./shared/plugin-config.mjs";
import { loadCredentialFiles } from "./shared/credentials.mjs";
-export const PLUGIN_VERSION = "0.5.20";
+export const PLUGIN_VERSION = "0.5.21";
/**
* Namespace for the bridged OpenViking MCP tools. DSH publishes every MCP tool
diff --git a/examples/dsh-memory-plugin/package-lock.json b/examples/dsh-memory-plugin/package-lock.json
index 8b6cd76d3..0883cb17f 100644
--- a/examples/dsh-memory-plugin/package-lock.json
+++ b/examples/dsh-memory-plugin/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.20",
+ "version": "0.5.21",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.20",
+ "version": "0.5.21",
"license": "Apache-2.0",
"devDependencies": {
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
diff --git a/examples/dsh-memory-plugin/package.json b/examples/dsh-memory-plugin/package.json
index 8e826a3ff..7eb4f3ab6 100644
--- a/examples/dsh-memory-plugin/package.json
+++ b/examples/dsh-memory-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@openviking/dsh-memory-plugin",
- "version": "0.5.20",
+ "version": "0.5.21",
"description": "OpenViking memory and context bundle for DeepSeek Harness",
"icon": "./icon.svg",
"type": "module",
diff --git a/examples/memory-plugin-shared/doctor-core.test.mjs b/examples/memory-plugin-shared/doctor-core.test.mjs
index 4dabd600d..8ff2b844c 100644
--- a/examples/memory-plugin-shared/doctor-core.test.mjs
+++ b/examples/memory-plugin-shared/doctor-core.test.mjs
@@ -1,8 +1,8 @@
import assert from "node:assert/strict";
import { spawnSync } from "node:child_process";
-import { mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
+import { existsSync, mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
-import { dirname, join } from "node:path";
+import { delimiter, dirname, join } from "node:path";
import test from "node:test";
import { fileURLToPath } from "node:url";
@@ -21,11 +21,37 @@ import {
readyCheckState,
scanDebugLog,
unknownOvcliKeys,
+ whichCommand,
WORKSPACE_PEER_HINT,
} from "./lib/doctor-core.mjs";
const b64 = (s) => Buffer.from(s).toString("base64url");
+test("whichCommand returns the first executable path without a line terminator", () => {
+ const dir = mkdtempSync(join(tmpdir(), "ov-doctor-path-"));
+ const originalPath = process.env.PATH;
+ const command = `ov-doctor-probe-${process.pid}`;
+ const filename = process.platform === "win32" ? `${command}.exe` : command;
+ const bins = [join(dir, "first bin"), join(dir, "second bin")];
+ try {
+ for (const bin of bins) {
+ mkdirSync(bin);
+ writeFileSync(join(bin, filename), "", { mode: 0o755 });
+ }
+ for (const paths of [bins, bins.slice(0, 1)]) {
+ process.env.PATH = [...paths, originalPath].filter(Boolean).join(delimiter);
+ const resolved = whichCommand(command);
+ assert.equal(resolved, join(bins[0], filename));
+ assert.ok(existsSync(resolved));
+ }
+ assert.equal(whichCommand(`${command}-missing`), "");
+ } finally {
+ if (originalPath === undefined) delete process.env.PATH;
+ else process.env.PATH = originalPath;
+ rmSync(dir, { recursive: true, force: true });
+ }
+});
+
test("describeApiKey decodes identity segments and masks the secret", () => {
const key = `${b64("acme")}.${b64("alice")}.${b64("0123456789abcdef0123456789abcdef")}`;
const info = describeApiKey(key);
diff --git a/examples/memory-plugin-shared/lib/doctor-core.mjs b/examples/memory-plugin-shared/lib/doctor-core.mjs
index 4e39b0781..e9b0d684e 100644
--- a/examples/memory-plugin-shared/lib/doctor-core.mjs
+++ b/examples/memory-plugin-shared/lib/doctor-core.mjs
@@ -422,7 +422,7 @@ export function runCommand(command, args = [], { timeoutMs = 10000, env = proces
export function whichCommand(name) {
const result = runCommand(process.platform === "win32" ? "where" : "which", [name], { timeoutMs: 5000 });
- return result.ok ? result.stdout.split("\n")[0] : "";
+ return result.ok ? result.stdout.split(/\r?\n/)[0] : "";
}
export function parseNodeMajor(version) {
diff --git a/examples/opencode-plugin/package.json b/examples/opencode-plugin/package.json
index 4cb54aa3c..0930fa476 100644
--- a/examples/opencode-plugin/package.json
+++ b/examples/opencode-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@openviking/opencode-plugin",
- "version": "0.5.8",
+ "version": "0.5.9",
"author": "@openviking",
"description": "Unified OpenCode plugin for OpenViking repository retrieval and long-term memory",
"type": "module",
diff --git a/examples/pi-coding-agent-extension/package-lock.json b/examples/pi-coding-agent-extension/package-lock.json
index deedd84a2..7095813a3 100644
--- a/examples/pi-coding-agent-extension/package-lock.json
+++ b/examples/pi-coding-agent-extension/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "openviking-pi-extension",
- "version": "0.4.13",
+ "version": "0.4.14",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openviking-pi-extension",
- "version": "0.4.13",
+ "version": "0.4.14",
"dependencies": {
"@modelcontextprotocol/client": "2.0.0"
},
diff --git a/examples/pi-coding-agent-extension/package.json b/examples/pi-coding-agent-extension/package.json
index 24788abc3..764b3f365 100644
--- a/examples/pi-coding-agent-extension/package.json
+++ b/examples/pi-coding-agent-extension/package.json
@@ -1,6 +1,6 @@
{
"name": "openviking-pi-extension",
- "version": "0.4.13",
+ "version": "0.4.14",
"description": "OpenViking memory and context extension for the pi coding agent",
"private": true,
"type": "module",