Skip to content

feat(openclaw): sync OpenViking plugin docs and runtime#2386

Open
superops-team wants to merge 1 commit into
volcengine:mainfrom
superops-team:main
Open

feat(openclaw): sync OpenViking plugin docs and runtime#2386
superops-team wants to merge 1 commit into
volcengine:mainfrom
superops-team:main

Conversation

@superops-team
Copy link
Copy Markdown

Description

同步并合并 `arkclaw-openviking-plugin` 中 OpenClaw 插件的运行时代码、文档与测试到当前项目的 `examples/openclaw-plugin`,同时按要求排除了 TOS release 上传/下载相关逻辑。

本 PR 主要增强 OpenViking OpenClaw 插件的 resource / skill 检索、recall trace 调试能力、工具注册配置与文档说明,并补充对应测试,确保插件在当前项目中可独立 typecheck、测试和构建通过。

## Related Issue

N/A

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] Performance improvement
- [x] Test update

## Changes Made

- 合并 OpenClaw 插件运行时代码更新,包括 recall trace、resource/session/user/agent recall target、工具选择器、`ov_recall_trace`、`ov_read` 等能力。
- 新增 `recall-trace.ts` 及相关测试,支持内存与 JSONL 持久化 trace 查询、过滤和降级读取。
- 更新 `openclaw.plugin.json`、`package.json`、`install-manifest.json` 等插件元信息,确保 OpenClaw 运行入口指向编译后的 `dist` 产物。
- 合并并更新 README、安装文档、插件参考文档、recall trace API 文档和 OpenViking context database skill。
- 补充/更新 config、tools、context-engine、manifest contracts、recall trace 等单元测试。
- 明确排除 TOS release 上传/下载相关逻辑,包括 TOS scripts、release contract tests、`@volcengine/tos-sdk` 依赖以及相关文档说明。

## Testing

- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I have tested this on the following platforms:
  - [ ] Linux
  - [x] macOS
  - [ ] Windows

验证命令:

```bash
npm --prefix /Users/bytedance/workspace/bytedance/OpenViking/examples/openclaw-plugin run typecheck
npm --prefix /Users/bytedance/workspace/bytedance/OpenViking/examples/openclaw-plugin test
npm --prefix /Users/bytedance/workspace/bytedance/OpenViking/examples/openclaw-plugin run build

验证结果:

• TypeScript typecheck 通过
• Vitest 全量测试通过:25 个 test files,521 个 tests
• 插件 build 通过
• 已额外 grep 确认未保留 TOS release 上传/下载相关实现与依赖关键词

Checklist

[✓] My code follows the project's coding style
[✓] I have performed a self-review of my code
[✓] I have commented my code, particularly in hard-to-understand areas
[✓] I have made corresponding changes to the documentation
[✓] My changes generate no new warnings
[ ] Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Notes

TOS release 上传/下载相关逻辑已按要求排除,未合入以下内容:

• scripts/
• build.sh
• output/
• TOS release / volcengine install contract tests
• @volcengine/tos-sdk
• TOS release 安装、上传、下载、灰度和回滚相关文档流程

本次提交已推送到远端:

56ab9b7 feat(openclaw): sync OpenViking plugin docs and runtime

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

@wlff123
Copy link
Copy Markdown
Contributor

wlff123 commented Jun 2, 2026

Important

  1. examples/openclaw-plugin/install-manifest.json:3pluginVersion 仍是 2026.5.8,但 examples/openclaw-plugin/package.json:3 / lockfile 已是 2026.6.2

    安装脚本会用 manifest 的 pluginVersion 作为 resolvedPluginReleaseIdexamples/openclaw-plugin/setup-helper/install.js:989),并写入 install state(setup-helper/install.js:1435)。安装/升级状态可能记录旧版本。建议同步版本,并补 contract test 断言 manifest version 等于 package version。

  2. 新增的 examples/openclaw-plugin/skills/openviking-context-database/SKILL.md 未声明到 examples/openclaw-plugin/openclaw.plugin.jsonskills 列表,source install manifest 也只包含 skills/install-openviking-memory/SKILL.md

    npm 包因为 package.json 包含 skills/ 会带上新 skill,但插件发现/source install 路径不会暴露或下载它。建议补 ./skills/openviking-context-database 和对应 optional file,并加 bundled skill 声明测试。

  3. runtime/docs 已支持 enabledTools / disabledTools,但 examples/openclaw-plugin/openclaw.plugin.jsonconfigSchema.properties 没有这两个字段,且 additionalProperties=false

    若 OpenClaw 按 manifest schema 校验插件配置,文档推荐的工具裁剪配置(如 enabledTools: ["resource_query"]disabledTools: ["memory"])会被拒绝。建议补 schema 字段并扩展 manifest contract test。

Question / Contract Semantics

  • examples/openclaw-plugin/openclaw.plugin.jsoncontracts.tools 不包含 add_resource,但 runtime 在 enableAddResourceTool=true 时会注册它(examples/openclaw-plugin/index.ts:1227)。

    如果 contracts.tools 表示“插件可能暴露的工具集合”,这里应包含 opt-in 的 add_resource;如果它只表示“默认注册工具集合”,当前写法是合理的。建议明确这个 contract 语义,并在测试里区分 default tools 和 possible tools,避免后续误用。

Minor

  • recall trace 的 injected 标记在预算跳过场景下可能不准:buildMemoryLinesWithBudget 会跳过超预算候选继续尝试后续候选,但 examples/openclaw-plugin/auto-recall.ts:411examples/openclaw-plugin/index.ts:1629memories.slice(0, memoryLines.length) 推断 injected URI。

    如果第一个候选过大、第二个候选可注入,trace 会标错实际注入的 memory。建议让 buildMemoryLinesWithBudget 返回实际选中的 item/URI,并补预算跳过的 trace 测试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants