Skip to content

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

Rename search tool to ov_search to avoid conflict with existing OpenClaw tool name (#2235)

AutoCoder1d631cd38df1
diff --git a/docs/design/openclaw-plugin-design.md b/docs/design/openclaw-plugin-design.md
index 864e3b110..b325dcfce 100644
--- a/docs/design/openclaw-plugin-design.md
+++ b/docs/design/openclaw-plugin-design.md
@@ -223,7 +223,7 @@ runtimeContext.agentId
| `memory_forget` | 按 URI 删除,或 query 搜索后高置信度自动删除 |
| `add_resource` | 导入文档 / URL / Git 仓库到 viking://resources |
| `add_skill` | 导入 SKILL.md 到 viking://agent/skills |
-| `memory_search` | 搜索 resources + agent/skills |
+| `ov_search` | 搜索 resources + agent/skills |
| `ov_archive_search` | 关键词 grep 当前 session 所有归档原始消息 |
| `ov_archive_expand` | 按 archive_id 展开归档原始消息列表 |
@@ -255,4 +255,3 @@ runtimeContext.agentId
| `recallMaxInjectedChars` | `4000` | 自动召回注入的最大总字符数 |
| `recallPreferAbstract` | `false` | 优先使用摘要而非读取全文 |
| `bypassSessionPatterns` | `[]` | 完全跳过 OV 的 session key 模式 |
-
diff --git a/docs/plans/agent-tool-name-convergence.md b/docs/plans/agent-tool-name-convergence.md
index 4fb35c397..a2eaba0b0 100644
--- a/docs/plans/agent-tool-name-convergence.md
+++ b/docs/plans/agent-tool-name-convergence.md
@@ -36,7 +36,7 @@ Search 是显式搜索:用户或模型主动发起 query,目标是查找 mem
|---|---|---|---|---|
| OV server `/mcp` | `find` / `search` | 直接调用 `service.search.find()` / `service.search.search()` | 已收敛 | 本 PR 新增 `find`,并让 `search` 保持 deep/session-aware 语义。 |
| Codex MCP | `find` | REST `/api/v1/search/find`,默认 `target_uri=viking://user/memories` | 已收敛到工具名 | 工具名已统一为 `find`;默认 memory-only scope 是 Codex 插件自己的安全约束。 |
-| OpenClaw | `memory_search` | REST `/api/v1/search/find`;默认查 resources + agent skills | 否 | `memory_search` 已同步到 `openclaw.plugin.json`;它不等价于通用 `find`。 |
+| OpenClaw | `ov_search` | REST `/api/v1/search/find`;默认查 resources + agent skills | 否 | OpenViking 插件使用 `ov_search`;它不等价于通用 `find`。 |
| Claude Code hooks / MCP | 无显式 search 工具;MCP 可直接用 OV `/mcp` 的 `find` / `search` | hooks 底层用 REST;MCP 直连 OV `/mcp` | 不改 | Claude Code 的显式搜索由通用 MCP 承担;hook search 行为归入 Recall。 |
| opencode-memory-plugin | `memsearch` | REST `/api/v1/search/find` 或 `/api/v1/search/search` | 否 | 它有 `auto` / `fast` / `deep` 模式,并会按 OpenCode session 自动选择接口和注入 `session_id`。 |
| opencode skill plugin | `ov search` / `ov find` 等 CLI 命令 | OV CLI | 已下沉,不改名 | 这是 shell skill,不是 native tool;`ov` 是 CLI 命令名前缀。 |
@@ -122,7 +122,7 @@ Resource 和 skill 导入不再合并成 `import`。二者落点命名空间、
- OV server `/mcp`:提供 `find` 和 `search` 两层显式搜索;`find` 是轻量检索,`search` 是 session-aware deep search。
- Codex MCP:当前暴露 `find`、`remember`、`forget`、`health`,全部不带 `viking_` 前缀。
-- OpenClaw:当前暴露 `memory_search` 并同步 `openclaw.plugin.json`;`memory_recall` 继续作为召回语义保留,不和 search 混成一个通用工具;原 Agent 可见 `ov_import` 已拆成 `add_resource` / `add_skill`。
+- OpenClaw:OpenViking 插件当前暴露 `ov_search` 并同步 `openclaw.plugin.json`;`memory_recall` 继续作为召回语义保留,不和 search 混成一个通用工具;原 Agent 可见 `ov_import` 已拆成 `add_resource` / `add_skill`。
- 不引入新的 ToolCatalog / agent tools 抽象,不迁移 Claude Code、opencode、Hermes 的既有工具名和执行语义。
## 后续下沉原则
diff --git a/examples/openclaw-plugin/README.md b/examples/openclaw-plugin/README.md
index 9ab31ea4a..6a581afe9 100644
--- a/examples/openclaw-plugin/README.md
+++ b/examples/openclaw-plugin/README.md
@@ -40,7 +40,7 @@ Once installed, the plugin provides these agent tools:
| `ov_archive_expand` | Expand an archive back to raw messages |
| `add_resource` | Import documents, URLs, or Git repos |
| `add_skill` | Import agent skills |
-| `memory_search` | Search imported resources and skills |
+| `ov_search` | Search imported resources and skills |
## Data Flow & Privacy
@@ -224,7 +224,7 @@ Beyond automatic behavior, the plugin exposes seven tools directly:
- `ov_archive_expand`: expand a concrete archive back into raw messages
- `add_resource`: import a document, directory, URL, or Git repository as an OpenViking resource
- `add_skill`: import or register an OpenViking agent skill
-- `memory_search`: search OpenViking resources and skills, especially after importing them
+- `ov_search`: search OpenViking resources and skills, especially after importing them
They serve different roles:
@@ -234,7 +234,7 @@ They serve different roles:
- `ov_archive_expand` is the "go back to archive detail" escape hatch when summaries are not enough
- `add_resource` lets the agent save explicit document or repository import requests without asking the user to remember slash commands
- `add_skill` imports skills into OpenViking, while `add_resource` imports resources
-- `memory_search` closes the loop after import by letting the user or agent confirm and consume resources and skills
+- `ov_search` closes the loop after import by letting the user or agent confirm and consume resources and skills
`ov_archive_expand` is especially important because `assemble()` normally returns archive summaries and indexes, not the full raw transcript.
@@ -250,8 +250,8 @@ The plugin also registers explicit slash commands for manual imports:
```text
/add-resource ./README.md --to viking://resources/openviking-readme --wait
/add-skill ./skills/install-openviking-memory --wait
-/memory-search "OpenViking install" --uri viking://resources/openviking-readme
-/memory-search "memory install skill" --uri viking://agent/skills
+/ov-search "OpenViking install" --uri viking://resources/openviking-readme
+/ov-search "memory install skill" --uri viking://agent/skills
```
Resource import supports remote URLs, Git URLs, local files, local directories, and uploaded zip files. OpenViking's built-in parsers cover common documents and media such as Markdown, text, PDF, HTML, Word, PowerPoint, Excel, EPUB, images, audio, and video. Directory imports also accept common code, documentation, and config file extensions such as `.py`, `.js`, `.ts`, `.go`, `.rs`, `.java`, `.cpp`, `.json`, `.yaml`, `.toml`, `.csv`, `.rst`, `.proto`, `.tf`, and `.vue`.
diff --git a/examples/openclaw-plugin/README_CN.md b/examples/openclaw-plugin/README_CN.md
index af94d6393..76f4842d9 100644
--- a/examples/openclaw-plugin/README_CN.md
+++ b/examples/openclaw-plugin/README_CN.md
@@ -40,7 +40,7 @@ Agent 会自动完成安装 → 配置 → 重启 → 验证。详见 [INSTALL-A
| `ov_archive_expand` | 展开某个 archive 的原始消息 |
| `add_resource` | 导入文档、URL 或 Git 仓库 |
| `add_skill` | 导入 agent 技能 |
-| `memory_search` | 检索已导入的 resources 和 skills |
+| `ov_search` | 检索已导入的 resources 和 skills |
## 数据流与隐私
@@ -224,7 +224,7 @@ preflight 阶段的 `assemble()` 并不是简单地把旧聊天记录塞回来
- `ov_archive_expand`:展开某个 archive 的原始消息
- `add_resource`:把文档、目录、URL 或 Git 仓库导入为 OpenViking resource
- `add_skill`:导入或注册 OpenViking agent skill
-- `memory_search`:检索 OpenViking resources 和 skills,尤其用于导入后的确认和消费
+- `ov_search`:检索 OpenViking resources 和 skills,尤其用于导入后的确认和消费
它们各自的作用不同:
@@ -234,7 +234,7 @@ preflight 阶段的 `assemble()` 并不是简单地把旧聊天记录塞回来
- `ov_archive_expand` 负责在 summary 不够细时回到 archive 级原文。
- `add_resource` 让 agent 在用户明确提出文档或仓库导入需求时直接完成操作,不要求用户记住 slash command。
- `add_skill` 把 skill 导入 OpenViking,`add_resource` 把文档、目录、URL 或 Git 仓库导入为 resource。
-- `memory_search` 补齐导入后的使用闭环,让用户或 agent 可以确认并消费 resources 和 skills。
+- `ov_search` 补齐导入后的使用闭环,让用户或 agent 可以确认并消费 resources 和 skills。
其中 `ov_archive_expand` 是 `assemble()` 的重要补充,因为 `assemble()` 默认给的是压缩后的索引和摘要,而不是完整历史正文。
@@ -250,8 +250,8 @@ Resource 和 skill 保持两个入口,因为它们落在不同 OpenViking 命
```text
/add-resource ./README.md --to viking://resources/openviking-readme --wait
/add-skill ./skills/install-openviking-memory --wait
-/memory-search "OpenViking install" --uri viking://resources/openviking-readme
-/memory-search "memory install skill" --uri viking://agent/skills
+/ov-search "OpenViking install" --uri viking://resources/openviking-readme
+/ov-search "memory install skill" --uri viking://agent/skills
```
Resource 导入支持远程 URL、Git URL、本地文件、本地目录和 zip。OpenViking 内置 parser 覆盖常见文档和媒体类型,例如 Markdown、纯文本、PDF、HTML、Word、PowerPoint、Excel、EPUB、图片、音频和视频。目录导入还支持常见代码、文档和配置扩展名,例如 `.py`、`.js`、`.ts`、`.go`、`.rs`、`.java`、`.cpp`、`.json`、`.yaml`、`.toml`、`.csv`、`.rst`、`.proto`、`.tf`、`.vue`。
diff --git a/examples/openclaw-plugin/docs/oc-resource-skill-import-design.md b/examples/openclaw-plugin/docs/oc-resource-skill-import-design.md
index bf1c2e4e3..e469e7e89 100644
--- a/examples/openclaw-plugin/docs/oc-resource-skill-import-design.md
+++ b/examples/openclaw-plugin/docs/oc-resource-skill-import-design.md
@@ -270,16 +270,16 @@ raw SKILL.md or MCP dict
- zip 使用纯 JavaScript 实现,避免依赖系统 `zip` 命令。
- resource 的 `to` 与 `parent` 保持互斥,沿用服务端约束。
-### 8. 导入后的检索入口:memory_search
+### 8. 导入后的检索入口:ov_search
只提供导入工具会让体验不闭环:用户可以把 resource 或 skill 导入 OpenViking,但在 OpenClaw 内不一定知道如何检索、读取或验证导入结果。
因此建议同时讨论一个轻量检索入口:
-- LLM tool:`memory_search`
-- slash command:`/memory-search`
+- LLM tool:`ov_search`
+- slash command:`/ov-search`
-`memory_search` 的目标不是替代 OpenViking CLI 的全部能力,而是提供最小闭环:
+`ov_search` 的目标不是替代 OpenViking CLI 的全部能力,而是提供最小闭环:
1. 导入 resource 或 skill。
2. 返回 resource 的 `root_uri` 或 skill 的 `uri`。
@@ -300,7 +300,7 @@ raw SKILL.md or MCP dict
```text
Imported OpenViking resource: viking://resources/openviking-readme
Processing: completed
-Try: /memory-search "OpenViking install" --uri viking://resources/openviking-readme
+Try: /ov-search "OpenViking install" --uri viking://resources/openviking-readme
```
`add_skill` 导入 skill 后也应返回 skill URI,并给出 skill 检索建议:
@@ -308,10 +308,10 @@ Try: /memory-search "OpenViking install" --uri viking://resources/openviking-rea
```text
Imported OpenViking skill: viking://agent/skills/install-openviking-memory
Processing: completed
-Try: /memory-search "<query>" --uri viking://agent/skills
+Try: /ov-search "<query>" --uri viking://agent/skills
```
-#### memory_search 参数设计
+#### ov_search 参数设计
v1 建议保持简洁:
@@ -326,9 +326,9 @@ v1 建议保持简洁:
示例命令:
```text
-/memory-search "OpenViking install" --uri viking://resources/openviking-readme
-/memory-search "API usage" --uri viking://resources
-/memory-search "<query>" --uri viking://agent/skills
+/ov-search "OpenViking install" --uri viking://resources/openviking-readme
+/ov-search "API usage" --uri viking://resources
+/ov-search "<query>" --uri viking://agent/skills
```
对应 LLM tool 示例:
@@ -341,9 +341,9 @@ v1 建议保持简洁:
}
```
-#### memory_search 返回结果
+#### ov_search 返回结果
-`memory_search` 应尽量贴近 OpenViking 当前 `/api/v1/search/find` 的返回结构。OpenViking find 的 raw HTTP 返回外层是:
+`ov_search` 应尽量贴近 OpenViking 当前 `/api/v1/search/find` 的返回结构。OpenViking find 的 raw HTTP 返回外层是:
```ts
{
@@ -378,7 +378,7 @@ v1 建议保持简洁:
}
```
-因此 `memory_search` 建议也返回两层结果:
+因此 `ov_search` 建议也返回两层结果:
1. 用户可读的 `content.text`
2. 保留 OpenViking 分桶结构的 `details`
@@ -475,11 +475,11 @@ v1 建议只返回检索结果摘要和 URI,不直接返回完整文件内容
- 避免把大文档直接塞进上下文。
- 用户或 LLM 可以基于 URI 再决定是否需要后续 `/ov-read` 或未来的 `ov_read`。
-- 保持 `memory_search` 作为导入后的最小消费闭环,而不是完整文件浏览器。
+- 保持 `ov_search` 作为导入后的最小消费闭环,而不是完整文件浏览器。
#### 是否同时检索 memory/resource/skill
-`memory_recall` 当前偏向长期记忆,不适合作为 resource/skill 导入后的默认消费入口。`memory_search` v1 应检索:
+`memory_recall` 当前偏向长期记忆,不适合作为 resource/skill 导入后的默认消费入口。`ov_search` v1 应检索:
```ts
uris = ["viking://resources", "viking://agent/skills"]
@@ -495,7 +495,7 @@ targetTypes?: Array<"memory" | "resource" | "skill">;
#### 读取与树形查看
-`memory_search` 只解决“查到相关上下文”的问题。若用户需要更明确的文件浏览能力,后续可以再讨论:
+`ov_search` 只解决“查到相关上下文”的问题。若用户需要更明确的文件浏览能力,后续可以再讨论:
- `/ov-read <uri>`
- `/ov-tree <uri>`
@@ -531,10 +531,10 @@ v1 暂不加入,避免把导入 RFC 扩展成完整 OpenViking CLI replica。
- `--to` 与 `--parent` 冲突
- `/add-skill` 拒绝 `to`、`parent`、`reason`、`instruction`
-覆盖 `memory_search`:
+覆盖 `ov_search`:
-- 注册单个 tool:`memory_search`
-- 注册单个 command:`/memory-search`
+- 注册单个 tool:`ov_search`
+- 注册单个 command:`/ov-search`
- 未指定 `uri` 时默认检索 `viking://resources` 和 `viking://agent/skills`
- 指定 `--uri` 时只检索该范围
- OpenViking error response 透传为可读错误
@@ -544,9 +544,9 @@ v1 暂不加入,避免把导入 RFC 扩展成完整 OpenViking CLI replica。
```text
/add-resource ./README.md --to viking://resources/openviking-readme --wait
-/memory-search "OpenViking install" --uri viking://resources/openviking-readme
+/ov-search "OpenViking install" --uri viking://resources/openviking-readme
/add-skill ./skills/install-openviking-memory --wait
-/memory-search "install OpenViking memory" --uri viking://agent/skills
+/ov-search "install OpenViking memory" --uri viking://agent/skills
```
以及自然语言触发:
@@ -570,7 +570,7 @@ v1 暂不加入,避免把导入 RFC 扩展成完整 OpenViking CLI replica。
- 当前建议先使用显式 `/add-skill`,避免在 `/add-resource` 中自动猜测并改变用户意图。
4. 导入本地大目录前是否需要确认机制?
- 当前方案先不加确认;后续可基于文件数量/zip 大小增加保护。
-5. `memory_search` v1 是否默认检索 `viking://resources` 和 `viking://agent/skills`?
+5. `ov_search` v1 是否默认检索 `viking://resources` 和 `viking://agent/skills`?
- 当前建议是。memory 仍交给既有 `memory_recall`,避免职责重叠。
6. 是否需要在 v1 同时提供 `/ov-read` 或 `/ov-tree`?
- - 当前建议不加,先用 `memory_search` 完成导入后的最小消费闭环。
+ - 当前建议不加,先用 `ov_search` 完成导入后的最小消费闭环。
diff --git a/examples/openclaw-plugin/index.ts b/examples/openclaw-plugin/index.ts
index 3c2f4bf2d..ba85c37e0 100644
--- a/examples/openclaw-plugin/index.ts
+++ b/examples/openclaw-plugin/index.ts
@@ -144,7 +144,7 @@ type AddSkillToolInput = {
timeout?: number;
};
-type MemorySearchInput = {
+type OVSearchInput = {
query: string;
uri?: string;
limit?: number;
@@ -405,13 +405,13 @@ export function parseAddSkillCommandArgs(args: string): AddSkillToolInput {
};
}
-export function parseMemorySearchCommandArgs(args: string): MemorySearchInput {
+export function parseOVSearchCommandArgs(args: string): OVSearchInput {
const parsed = parseFlagArgs(args);
- // `/memory-search` only accepts a single query string, so positional segments are
+ // `/ov-search` only accepts a single query string, so positional segments are
// always re-joined to preserve unquoted multi-word searches.
const query = parsed.positionals.join(" ").trim();
if (!query) {
- throw new Error('Usage: /memory-search "<query>" [--uri URI] [--limit N]');
+ throw new Error('Usage: /ov-search "<query>" [--uri URI] [--limit N]');
}
return {
query,
@@ -761,7 +761,7 @@ const contextEnginePlugin = {
};
};
- const formatMemorySearchRows = (result: FindResult): string[] => {
+ const formatOVSearchRows = (result: FindResult): string[] => {
const truncateSummary = (value: string, maxChars = 220): string => {
const collapsed = value.replace(/\s+/g, " ").trim();
if (collapsed.length <= maxChars) {
@@ -802,7 +802,7 @@ const contextEnginePlugin = {
];
};
- const formatMemorySearchText = (query: string, uri: string | undefined, result: FindResult): string => {
+ const formatOVSearchText = (query: string, uri: string | undefined, result: FindResult): string => {
if ((result.total ?? 0) <= 0) {
const scope = uri ? ` under ${uri}` : "";
return `No OpenViking resource or skill results found for "${query}"${scope}.`;
@@ -811,12 +811,12 @@ const contextEnginePlugin = {
const lines = [
`Found ${result.total ?? 0} OpenViking results for "${query}"${scope}`,
"",
- ...formatMemorySearchRows(result),
+ ...formatOVSearchRows(result),
].filter((line, index, all) => line || (all[index - 1] && all[index + 1]));
return lines.join("\n");
};
- const memorySearchOpenViking = async (input: MemorySearchInput, agentId?: string) => {
+ const searchOpenViking = async (input: OVSearchInput, agentId?: string) => {
const query = input.query.trim();
if (!query) {
throw new Error("query is required");
@@ -856,7 +856,7 @@ const contextEnginePlugin = {
result = mergeFindResults(successful);
}
return {
- content: [{ type: "text" as const, text: formatMemorySearchText(query, input.uri, result) }],
+ content: [{ type: "text" as const, text: formatOVSearchText(query, input.uri, result) }],
details: {
action: "searched",
query,
@@ -935,8 +935,8 @@ const contextEnginePlugin = {
api.registerTool(
(ctx: ToolContext) => ({
- name: "memory_search",
- label: "Memory Search (OpenViking)",
+ name: "ov_search",
+ label: "Search (OpenViking)",
description:
"Search OpenViking resources and skills. Use after importing, or when the user asks to search OpenViking resources or skills.",
parameters: Type.Object({
@@ -946,17 +946,17 @@ const contextEnginePlugin = {
}),
async execute(_toolCallId: string, params: Record<string, unknown>) {
if (isBypassedSession(ctx)) {
- return makeBypassedToolResult("memory_search");
+ return makeBypassedToolResult("ov_search");
}
const session = resolvePluginSessionRouting(ctx);
- return memorySearchOpenViking({
+ return searchOpenViking({
query: String((params as { query?: unknown }).query ?? ""),
uri: typeof params.uri === "string" ? params.uri : undefined,
limit: typeof params.limit === "number" ? params.limit : undefined,
}, session.agentId);
},
}),
- { name: "memory_search" },
+ { name: "ov_search" },
);
api.registerCommand?.({
@@ -1000,21 +1000,21 @@ const contextEnginePlugin = {
});
api.registerCommand?.({
- name: "memory-search",
+ name: "ov-search",
description: "Search OpenViking resources and skills.",
acceptsArgs: true,
handler: async (ctx: PluginCommandContext) => {
try {
if (isBypassedSession(ctx)) {
- const bypassed = makeBypassedToolResult("memory_search");
+ const bypassed = makeBypassedToolResult("ov_search");
return { text: bypassed.content[0]!.text, details: bypassed.details };
}
const session = resolvePluginSessionRouting(ctx);
- const input = parseMemorySearchCommandArgs(ctx.args ?? "");
- const result = await memorySearchOpenViking(input, session.agentId);
+ const input = parseOVSearchCommandArgs(ctx.args ?? "");
+ const result = await searchOpenViking(input, session.agentId);
return { text: result.content[0]!.text, details: result.details };
} catch (err) {
- return { text: `OpenViking memory search failed: ${err instanceof Error ? err.message : String(err)}` };
+ return { text: `OpenViking search failed: ${err instanceof Error ? err.message : String(err)}` };
}
},
});
diff --git a/examples/openclaw-plugin/openclaw.plugin.json b/examples/openclaw-plugin/openclaw.plugin.json
index 874cfaac5..3fd35789e 100644
--- a/examples/openclaw-plugin/openclaw.plugin.json
+++ b/examples/openclaw-plugin/openclaw.plugin.json
@@ -14,7 +14,7 @@
"tools": [
"add_resource",
"add_skill",
- "memory_search",
+ "ov_search",
"memory_recall",
"memory_store",
"memory_forget",
diff --git a/examples/openclaw-plugin/tests/ut/tools.test.ts b/examples/openclaw-plugin/tests/ut/tools.test.ts
index 18dfaf978..a275b7ae6 100644
--- a/examples/openclaw-plugin/tests/ut/tools.test.ts
+++ b/examples/openclaw-plugin/tests/ut/tools.test.ts
@@ -6,7 +6,7 @@ import { join } from "node:path";
import contextEnginePlugin, {
parseAddResourceCommandArgs,
parseAddSkillCommandArgs,
- parseMemorySearchCommandArgs,
+ parseOVSearchCommandArgs,
tokenizeCommandArgs,
} from "../../index.js";
import type { FindResultItem } from "../../client.js";
@@ -621,7 +621,7 @@ describe("Tool: OpenViking tool result access", () => {
});
});
-describe("Tool: add_resource, add_skill, and memory_search (registration)", () => {
+describe("Tool: add_resource, add_skill, and ov_search (registration)", () => {
it("registers add_resource tool with expected parameters", () => {
const { tools, api } = setupPlugin();
contextEnginePlugin.register(api as any);
@@ -658,11 +658,13 @@ describe("Tool: add_resource, add_skill, and memory_search (registration)", () =
expect(props).not.toHaveProperty("parent");
});
- it("registers memory_search tool with natural-language trigger guidance", () => {
+ it("registers ov_search tool with natural-language trigger guidance", () => {
const { tools, api } = setupPlugin();
contextEnginePlugin.register(api as any);
- const tool = tools.get("memory_search");
+ const tool = tools.get("ov_search");
expect(tool).toBeDefined();
+ // Avoid colliding with OpenClaw's built-in memory_search tool.
+ expect(tools.get("memory_search")).toBeUndefined();
expect(tool!.description).toContain("Search OpenViking resources and skills");
expect(tool!.description).toContain("Use after importing");
const props = (tool!.parameters as any).properties;
@@ -672,7 +674,7 @@ describe("Tool: add_resource, add_skill, and memory_search (registration)", () =
});
});
-describe("Tool: memory_search (behavioral)", () => {
+describe("Tool: ov_search (behavioral)", () => {
it("searches resources and skills by default when no uri is provided", async () => {
const fetchMock = vi.fn(async (url: string, init?: RequestInit) => {
if (url.endsWith("/api/v1/system/status")) {
@@ -728,7 +730,7 @@ describe("Tool: memory_search (behavioral)", () => {
const { tools, api } = setupPlugin();
contextEnginePlugin.register(api as any);
- const search = tools.get("memory_search")!;
+ const search = tools.get("ov_search")!;
const result = await search.execute("tc1", { query: "OpenViking install" }) as ToolResult;
expect(result.content[0]!.text).toContain("no");
@@ -783,7 +785,7 @@ describe("Tool: memory_search (behavioral)", () => {
const { tools, api } = setupPlugin();
contextEnginePlugin.register(api as any);
- const search = tools.get("memory_search")!;
+ const search = tools.get("ov_search")!;
const result = await search.execute("tc1", { query: "OpenViking install" }) as ToolResult;
expect(result.details.resources).toHaveLength(1);
@@ -819,7 +821,7 @@ describe("Tool: memory_search (behavioral)", () => {
const { tools, api } = setupPlugin();
contextEnginePlugin.register(api as any);
- const search = tools.get("memory_search")!;
+ const search = tools.get("ov_search")!;
const result = await search.execute("tc1", {
query: "theme",
uri: "viking://user/default/memories",
@@ -896,9 +898,9 @@ describe("OpenViking import command parsing", () => {
});
});
-describe("OpenViking memory_search command parsing", () => {
- it("parses memory_search query and flags", () => {
- expect(parseMemorySearchCommandArgs(`"OpenViking install" --uri viking://resources --limit=3`)).toMatchObject({
+describe("OpenViking ov_search command parsing", () => {
+ it("parses ov_search query and flags", () => {
+ expect(parseOVSearchCommandArgs(`"OpenViking install" --uri viking://resources --limit=3`)).toMatchObject({
query: "OpenViking install",
uri: "viking://resources",
limit: 3,
@@ -906,7 +908,7 @@ describe("OpenViking memory_search command parsing", () => {
});
it("keeps multi-word unquoted slash-command queries intact", () => {
- expect(parseMemorySearchCommandArgs(`OpenViking install --uri viking://resources`)).toMatchObject({
+ expect(parseOVSearchCommandArgs(`OpenViking install --uri viking://resources`)).toMatchObject({
query: "OpenViking install",
uri: "viking://resources",
});
@@ -931,7 +933,7 @@ describe("Plugin registration", () => {
acceptsArgs: true,
description: "Add a skill into OpenViking.",
});
- expect(commands.get("memory-search")).toMatchObject({
+ expect(commands.get("ov-search")).toMatchObject({
acceptsArgs: true,
description: "Search OpenViking resources and skills.",
});
@@ -948,13 +950,13 @@ describe("Plugin registration", () => {
args: "",
commandBody: "/add-skill",
});
- const search = await commands.get("memory-search")!.handler({
+ const search = await commands.get("ov-search")!.handler({
args: "",
- commandBody: "/memory-search",
+ commandBody: "/ov-search",
});
expect(resource.text).toContain("Usage: /add-resource");
expect(skill.text).toContain("Usage: /add-skill");
- expect(search.text).toContain("Usage: /memory-search");
+ expect(search.text).toContain("Usage: /ov-search");
});
it("search command propagates agent identity when command ctx includes it", async () => {
@@ -969,9 +971,9 @@ describe("Plugin registration", () => {
const { commands, api } = setupPlugin();
contextEnginePlugin.register(api as any);
- await commands.get("memory-search")!.handler({
+ await commands.get("ov-search")!.handler({
args: "test query --uri viking://resources",
- commandBody: "/memory-search",
+ commandBody: "/ov-search",
agentId: "worker",
sessionId: "session-1",
sessionKey: "agent:worker:session-1",
@@ -999,9 +1001,9 @@ describe("Plugin registration", () => {
};
contextEnginePlugin.register(api as any);
- await commands.get("memory-search")!.handler({
+ await commands.get("ov-search")!.handler({
args: "test query --uri viking://resources",
- commandBody: "/memory-search",
+ commandBody: "/ov-search",
agentId: "worker",
sessionId: "session-1",
sessionKey: "agent:worker:session-1",
@@ -1113,9 +1115,9 @@ describe("Plugin registration", () => {
};
contextEnginePlugin.register(api as any);
- const search = await commands.get("memory-search")!.handler({
+ const search = await commands.get("ov-search")!.handler({
args: "test query --uri viking://resources",
- commandBody: "/memory-search",
+ commandBody: "/ov-search",
sessionKey: "agent:bypass:session-1",
});