Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
ci(opencode-plugin): publish scoped npm package (#2807)
Zayn Jarvise43a4c5e6e32
diff --git a/.github/workflows/opencode-plugin-release.yml b/.github/workflows/opencode-plugin-release.ymlnew file mode 100644index 000000000..e81ed18ce--- /dev/null+++ b/.github/workflows/opencode-plugin-release.yml@@ -0,0 +1,79 @@+name: OpenCode Plugin Release++on:+ push:+ branches: [main]+ paths:+ - "examples/opencode-plugin/**"+ - ".github/workflows/opencode-plugin-release.yml"+ workflow_dispatch:++permissions:+ contents: read+ id-token: write++concurrency:+ group: opencode-plugin-release+ cancel-in-progress: false++jobs:+ publish:+ name: Publish @openviking/opencode-plugin+ runs-on: ubuntu-24.04+ defaults:+ run:+ working-directory: examples/opencode-plugin+ steps:+ - name: Checkout repository+ uses: actions/checkout@v6++ - name: Setup Node.js+ uses: actions/setup-node@v6+ with:+ node-version: "24"+ registry-url: "https://registry.npmjs.org"++ - name: Install dependencies+ run: npm install++ - name: Validate package+ run: |+ npm run check+ npm test+ npm pack --dry-run++ - name: Resolve package version+ id: package+ run: |+ node -e "+ const pkg = require('./package.json')+ if (pkg.name !== '@openviking/opencode-plugin') {+ throw new Error('Unexpected package name: ' + pkg.name)+ }+ console.log('name=' + pkg.name)+ console.log('version=' + pkg.version)+ " >> "$GITHUB_OUTPUT"++ - name: Check whether version already exists+ id: published+ env:+ PACKAGE_NAME: ${{ steps.package.outputs.name }}+ PACKAGE_VERSION: ${{ steps.package.outputs.version }}+ run: |+ if npm view "$PACKAGE_NAME@$PACKAGE_VERSION" version --registry=https://registry.npmjs.org >/dev/null 2>&1; then+ echo "exists=true" >> "$GITHUB_OUTPUT"+ echo "::notice::$PACKAGE_NAME@$PACKAGE_VERSION is already published; skipping."+ else+ echo "exists=false" >> "$GITHUB_OUTPUT"+ fi++ - name: Publish package+ if: steps.published.outputs.exists == 'false'+ env:+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}+ run: |+ if [ -z "$NODE_AUTH_TOKEN" ]; then+ echo "::error::Missing NPM_TOKEN secret for npm publish."+ exit 1+ fi+ npm publish --access public --provenancediff --git a/docs/en/agent-integrations/08-community-plugins.md b/docs/en/agent-integrations/08-community-plugins.mdindex 2d5e90053..8af5c492c 100644--- a/docs/en/agent-integrations/08-community-plugins.md+++ b/docs/en/agent-integrations/08-community-plugins.md@@ -48,11 +48,11 @@ curl http://localhost:1933/health### Install-If you are using the published package, add the plugin to `~/.config/opencode/opencode.json`. If package installation is not available in your environment yet, use the source install path below.+The published npm package is `@openviking/opencode-plugin`; verify availability with `npm view @openviking/opencode-plugin version`. For package installs, add the plugin to `~/.config/opencode/opencode.json`. If package installation is not available in your environment yet, use the source install path below.```json{- "plugin": ["openviking-opencode-plugin"]+ "plugin": ["@openviking/opencode-plugin"]}```@@ -62,7 +62,7 @@ For development, debugging, or PR testing, install the plugin from this repositogit clone https://github.com/volcengine/OpenViking.gitcd OpenVikingmkdir -p ~/.config/opencode/plugins/openviking-cp examples/opencode-plugin/wrappers/openviking.mjs ~/.config/opencode/plugins/openviking.mjs+cp examples/opencode-plugin/wrappers/openviking.js ~/.config/opencode/plugins/openviking.jscp examples/opencode-plugin/index.mjs examples/opencode-plugin/package.json ~/.config/opencode/plugins/openviking/cp -r examples/opencode-plugin/lib ~/.config/opencode/plugins/openviking/cd ~/.config/opencode/plugins/openviking@@ -73,7 +73,7 @@ This source install creates the layout OpenCode can discover:```text~/.config/opencode/plugins/-├── openviking.mjs+├── openviking.js└── openviking/├── index.mjs├── package.json@@ -81,7 +81,8 @@ This source install creates the layout OpenCode can discover:└── node_modules/```-The top-level `openviking.mjs` is only a wrapper that forwards OpenCode's first-level plugin entry to the installed package directory.+The top-level `openviking.js` is only a wrapper that forwards OpenCode's first-level plugin entry to the installed package directory.+Use the `.js` wrapper for source installs; OpenCode's local plugin scanner discovers JavaScript/TypeScript plugin files.### Configure@@ -125,8 +126,9 @@ Restart OpenCode after installation. In an OpenCode session, the plugin should e- `memsearch`, `memread`, `membrowse`- `memgrep`, `memglob`-- `memadd`, `memremove`, `memqueue`+- `memadd`, `memwrite`, `memremove`, `memqueue`- `memcommit`+- `codesearch`, `codeoutline`, `codeexpand`Ask OpenCode to search or browse OpenViking memory, or request a manual session commit. Runtime state and errors are written to:@@ -139,7 +141,7 @@ Ask OpenCode to search or browse OpenViking memory, or request a manual session| Issue | What to check ||-------|---------------|-| Plugin does not load | Confirm `~/.config/opencode/opencode.json` references `openviking-opencode-plugin`, or that `~/.config/opencode/plugins/openviking.mjs` exists for source installs |+| Plugin does not load | Confirm `~/.config/opencode/opencode.json` references `@openviking/opencode-plugin`, or that `~/.config/opencode/plugins/openviking.js` exists for source installs || Tools call the wrong server | Check `endpoint` in `~/.config/opencode/openviking-config.json`, or set `OPENVIKING_PLUGIN_CONFIG` to the intended config path || 401 / 403 from OpenViking | Verify `OPENVIKING_API_KEY`; for trusted-mode deployments, also verify `OPENVIKING_ACCOUNT` and `OPENVIKING_USER` || Recall is empty | Confirm the OpenViking server has indexed memories/resources and that `autoRecall.enabled` is `true` |diff --git a/docs/images/agents/en/opencode.md b/docs/images/agents/en/opencode.mdindex 15f640422..d4622fb82 100644--- a/docs/images/agents/en/opencode.md+++ b/docs/images/agents/en/opencode.md@@ -24,11 +24,11 @@ For remote or multi-tenant deployments, prepare an OpenViking API key.## Step 2: Install the plugin-For a published package install, add the plugin to `~/.config/opencode/opencode.json`. If package installation is not available in your environment yet, use the source install path below.+The published npm package is `@openviking/opencode-plugin`; verify availability with `npm view @openviking/opencode-plugin version`. For package installs, add the plugin to `~/.config/opencode/opencode.json`. If package installation is not available in your environment yet, use the source install path below.```json{- "plugin": ["openviking-opencode-plugin"]+ "plugin": ["@openviking/opencode-plugin"]}```@@ -38,7 +38,7 @@ For development, debugging, or PR testing, copy the plugin from the OpenViking rgit clone https://github.com/volcengine/OpenViking.gitcd OpenVikingmkdir -p ~/.config/opencode/plugins/openviking-cp examples/opencode-plugin/wrappers/openviking.mjs ~/.config/opencode/plugins/openviking.mjs+cp examples/opencode-plugin/wrappers/openviking.js ~/.config/opencode/plugins/openviking.jscp examples/opencode-plugin/index.mjs examples/opencode-plugin/package.json ~/.config/opencode/plugins/openviking/cp -r examples/opencode-plugin/lib ~/.config/opencode/plugins/openviking/cd ~/.config/opencode/plugins/openviking@@ -49,7 +49,7 @@ The source install creates:```text~/.config/opencode/plugins/-├── openviking.mjs+├── openviking.js└── openviking/├── index.mjs├── package.json@@ -95,7 +95,7 @@ Environment variables override the config file.## Step 4: Verify-Restart OpenCode. The plugin should expose `memsearch`, `memread`, `membrowse`, `memgrep`, `memglob`, `memadd`, `memremove`, `memqueue`, and `memcommit`.+Restart OpenCode. The plugin should expose memory tools `memsearch`, `memread`, `membrowse`, `memgrep`, `memglob`, `memadd`, `memwrite`, `memremove`, `memqueue`, `memcommit`, and code tools `codesearch`, `codeoutline`, `codeexpand`.Ask OpenCode to browse OpenViking or commit the current session. Check runtime logs if anything looks wrong:@@ -108,7 +108,7 @@ Ask OpenCode to browse OpenViking or commit the current session. Check runtime l| Symptom | Fix ||---------|-----|-| Plugin is not loaded | Check `~/.config/opencode/opencode.json` for package installs, or `~/.config/opencode/plugins/openviking.mjs` for source installs |+| Plugin is not loaded | Check `~/.config/opencode/opencode.json` for package installs, or `~/.config/opencode/plugins/openviking.js` for source installs || Tools call the wrong server | Check `endpoint`, or set `OPENVIKING_PLUGIN_CONFIG` to the intended config path || 401 / 403 from OpenViking | Verify `OPENVIKING_API_KEY`; trusted-mode deployments also need `OPENVIKING_ACCOUNT` and `OPENVIKING_USER` || Recall is empty | Confirm OpenViking has memories/resources and `autoRecall.enabled` is `true` |diff --git a/docs/images/agents/zh/opencode.md b/docs/images/agents/zh/opencode.mdindex 8c525cc26..884a0279d 100644--- a/docs/images/agents/zh/opencode.md+++ b/docs/images/agents/zh/opencode.md@@ -25,11 +25,11 @@ curl http://localhost:1933/health## 步骤 2:安装插件-如果使用已发布的包,把插件加入 `~/.config/opencode/opencode.json`。如果当前环境还不能通过 package 安装,请使用下面的源码安装路径。+已发布的 npm 包是 `@openviking/opencode-plugin`,可以用 `npm view @openviking/opencode-plugin version` 验证当前可用版本。使用 package 安装时,把插件加入 `~/.config/opencode/opencode.json`。如果当前环境还不能通过 package 安装,请使用下面的源码安装路径。```json{- "plugin": ["openviking-opencode-plugin"]+ "plugin": ["@openviking/opencode-plugin"]}```@@ -39,7 +39,7 @@ curl http://localhost:1933/healthgit clone https://github.com/volcengine/OpenViking.gitcd OpenVikingmkdir -p ~/.config/opencode/plugins/openviking-cp examples/opencode-plugin/wrappers/openviking.mjs ~/.config/opencode/plugins/openviking.mjs+cp examples/opencode-plugin/wrappers/openviking.js ~/.config/opencode/plugins/openviking.jscp examples/opencode-plugin/index.mjs examples/opencode-plugin/package.json ~/.config/opencode/plugins/openviking/cp -r examples/opencode-plugin/lib ~/.config/opencode/plugins/openviking/cd ~/.config/opencode/plugins/openviking@@ -50,7 +50,7 @@ npm install```text~/.config/opencode/plugins/-├── openviking.mjs+├── openviking.js└── openviking/├── index.mjs├── package.json@@ -96,7 +96,7 @@ export OPENVIKING_PEER_ID="opencode" # 可选,peer 维度记忆路由需要## 步骤 4:验证-重启 OpenCode。插件应暴露 `memsearch`、`memread`、`membrowse`、`memgrep`、`memglob`、`memadd`、`memremove`、`memqueue` 和 `memcommit`。+重启 OpenCode。插件应暴露 memory tools:`memsearch`、`memread`、`membrowse`、`memgrep`、`memglob`、`memadd`、`memwrite`、`memremove`、`memqueue`、`memcommit`,以及 code tools:`codesearch`、`codeoutline`、`codeexpand`。可以让 OpenCode 浏览 OpenViking 或 commit 当前 session。异常时查看运行时日志:@@ -109,7 +109,7 @@ export OPENVIKING_PEER_ID="opencode" # 可选,peer 维度记忆路由需要| 现象 | 修复 ||------|------|-| 插件没有加载 | package 安装检查 `~/.config/opencode/opencode.json`;源码安装检查 `~/.config/opencode/plugins/openviking.mjs` |+| 插件没有加载 | package 安装检查 `~/.config/opencode/opencode.json`;源码安装检查 `~/.config/opencode/plugins/openviking.js` || Tools 连到了错误的 server | 检查 `endpoint`,或用 `OPENVIKING_PLUGIN_CONFIG` 指向正确配置文件 || OpenViking 返回 401 / 403 | 检查 `OPENVIKING_API_KEY`;trusted-mode 部署还需要 `OPENVIKING_ACCOUNT` 和 `OPENVIKING_USER` || recall 为空 | 确认 OpenViking 中已有 memories/resources,并且 `autoRecall.enabled` 为 `true` |diff --git a/docs/zh/agent-integrations/08-community-plugins.md b/docs/zh/agent-integrations/08-community-plugins.mdindex 4db30d53a..9c4a5108d 100644--- a/docs/zh/agent-integrations/08-community-plugins.md+++ b/docs/zh/agent-integrations/08-community-plugins.md@@ -48,11 +48,11 @@ curl http://localhost:1933/health### 安装-如果使用已发布的包,把插件加入 `~/.config/opencode/opencode.json`。如果当前环境还不能通过 package 安装,请使用下面的源码安装路径。+已发布的 npm 包是 `@openviking/opencode-plugin`,可以用 `npm view @openviking/opencode-plugin version` 验证当前可用版本。使用 package 安装时,把插件加入 `~/.config/opencode/opencode.json`。如果当前环境还不能通过 package 安装,请使用下面的源码安装路径。```json{- "plugin": ["openviking-opencode-plugin"]+ "plugin": ["@openviking/opencode-plugin"]}```@@ -62,7 +62,7 @@ curl http://localhost:1933/healthgit clone https://github.com/volcengine/OpenViking.gitcd OpenVikingmkdir -p ~/.config/opencode/plugins/openviking-cp examples/opencode-plugin/wrappers/openviking.mjs ~/.config/opencode/plugins/openviking.mjs+cp examples/opencode-plugin/wrappers/openviking.js ~/.config/opencode/plugins/openviking.jscp examples/opencode-plugin/index.mjs examples/opencode-plugin/package.json ~/.config/opencode/plugins/openviking/cp -r examples/opencode-plugin/lib ~/.config/opencode/plugins/openviking/cd ~/.config/opencode/plugins/openviking@@ -73,7 +73,7 @@ npm install```text~/.config/opencode/plugins/-├── openviking.mjs+├── openviking.js└── openviking/├── index.mjs├── package.json@@ -81,7 +81,8 @@ npm install└── node_modules/```-顶层 `openviking.mjs` 只是一个 wrapper,用来把 OpenCode 可发现的一级插件入口转发到实际安装目录。+顶层 `openviking.js` 只是一个 wrapper,用来把 OpenCode 可发现的一级插件入口转发到实际安装目录。+源码安装请使用 `.js` wrapper;OpenCode 的本地插件扫描器会发现 JavaScript/TypeScript 插件文件。### 配置@@ -125,8 +126,9 @@ export OPENVIKING_PEER_ID="opencode" # 可选,peer 维度记忆路由需要- `memsearch`、`memread`、`membrowse`- `memgrep`、`memglob`-- `memadd`、`memremove`、`memqueue`+- `memadd`、`memwrite`、`memremove`、`memqueue`- `memcommit`+- `codesearch`、`codeoutline`、`codeexpand`可以让 OpenCode 搜索或浏览 OpenViking memory,也可以要求它手动 commit 当前 session。运行时状态和错误日志会写入:@@ -139,7 +141,7 @@ export OPENVIKING_PEER_ID="opencode" # 可选,peer 维度记忆路由需要| 问题 | 排查方向 ||------|----------|-| 插件没有加载 | 确认 `~/.config/opencode/opencode.json` 引用了 `openviking-opencode-plugin`;源码安装时确认 `~/.config/opencode/plugins/openviking.mjs` 存在 |+| 插件没有加载 | 确认 `~/.config/opencode/opencode.json` 引用了 `@openviking/opencode-plugin`;源码安装时确认 `~/.config/opencode/plugins/openviking.js` 存在 || Tools 连到了错误的 server | 检查 `~/.config/opencode/openviking-config.json` 里的 `endpoint`,或用 `OPENVIKING_PLUGIN_CONFIG` 指向正确配置文件 || OpenViking 返回 401 / 403 | 检查 `OPENVIKING_API_KEY`;trusted-mode 部署还要检查 `OPENVIKING_ACCOUNT` 和 `OPENVIKING_USER` || recall 为空 | 确认 OpenViking server 中已有 memories/resources,并且 `autoRecall.enabled` 为 `true` |diff --git a/examples/opencode-plugin/INSTALL-ZH.md b/examples/opencode-plugin/INSTALL-ZH.mdindex a760d2799..264262aaf 100644--- a/examples/opencode-plugin/INSTALL-ZH.md+++ b/examples/opencode-plugin/INSTALL-ZH.md@@ -34,7 +34,7 @@ curl http://localhost:1933/health```json{- "plugin": ["openviking-opencode-plugin"]+ "plugin": ["@openviking/opencode-plugin"]}```@@ -50,7 +50,7 @@ curl http://localhost:1933/health```bashmkdir -p ~/.config/opencode/plugins/openviking-cp examples/opencode-plugin/wrappers/openviking.mjs ~/.config/opencode/plugins/openviking.mjs+cp examples/opencode-plugin/wrappers/openviking.js ~/.config/opencode/plugins/openviking.jscp examples/opencode-plugin/index.mjs examples/opencode-plugin/package.json ~/.config/opencode/plugins/openviking/cp -r examples/opencode-plugin/lib ~/.config/opencode/plugins/openviking/cd ~/.config/opencode/plugins/openviking@@ -61,7 +61,7 @@ npm install```text~/.config/opencode/plugins/-├── openviking.mjs+├── openviking.js└── openviking/├── index.mjs├── package.json@@ -69,13 +69,14 @@ npm install└── node_modules/```-顶层 `openviking.mjs` 只负责把 OpenCode 能发现的一级 `.mjs` 入口转发到插件目录:+顶层 `openviking.js` 只负责把 OpenCode 能发现的一级 `.js` 入口转发到插件目录:```jsexport { OpenVikingPlugin, default } from "./openviking/index.mjs"```这个 wrapper 只用于上面这种源码安装目录结构。npm 包安装会通过 `package.json` 直接加载 `index.mjs`。+源码安装请使用 `.js` wrapper;OpenCode 的本地插件扫描器会发现 JavaScript/TypeScript 插件文件。如果你使用 npm 包方式安装,也可以将 `examples/opencode-plugin` 作为一个普通 OpenCode 插件包使用。@@ -137,6 +138,7 @@ user/admin API key 的 API_KEY mode 时应留空。- `memgrep`、`memglob`- `memadd`、`memwrite`、`memremove`、`memqueue`- `memcommit`+- `codesearch`、`codeoutline`、`codeexpand`如果行为异常,先查看运行时文件:@@ -216,7 +218,7 @@ memadd path="file:///home/alice/project/notes.md" reason="project notes"| 问题 | 排查方向 ||------|----------|-| 插件没有加载 | package 安装检查 `~/.config/opencode/opencode.json` 是否包含 `openviking-opencode-plugin`;源码安装检查 `~/.config/opencode/plugins/openviking.mjs` 是否存在 |+| 插件没有加载 | package 安装检查 `~/.config/opencode/opencode.json` 是否包含 `@openviking/opencode-plugin`;源码安装检查 `~/.config/opencode/plugins/openviking.js` 是否存在 || Tools 连到了错误的 server | 检查 `~/.config/opencode/openviking-config.json` 里的 `endpoint`,或用 `OPENVIKING_PLUGIN_CONFIG` 指向正确配置文件 || OpenViking 返回 401 / 403 | 检查 `OPENVIKING_API_KEY`;trusted-mode 部署还要检查 `OPENVIKING_ACCOUNT` 和 `OPENVIKING_USER` || recall 为空 | 确认 OpenViking 中已有 memories/resources,并且 `autoRecall.enabled` 为 `true` |diff --git a/examples/opencode-plugin/INSTALL.md b/examples/opencode-plugin/INSTALL.mdindex d8e11c566..4cee0c3ce 100644--- a/examples/opencode-plugin/INSTALL.md+++ b/examples/opencode-plugin/INSTALL.md@@ -34,7 +34,7 @@ Normal users are recommended to enable it through OpenCode's package plugin mech```json{- "plugin": ["openviking-opencode-plugin"]+ "plugin": ["@openviking/opencode-plugin"]}```@@ -50,7 +50,7 @@ Run the following commands from the repository root:```bashmkdir -p ~/.config/opencode/plugins/openviking-cp examples/opencode-plugin/wrappers/openviking.mjs ~/.config/opencode/plugins/openviking.mjs+cp examples/opencode-plugin/wrappers/openviking.js ~/.config/opencode/plugins/openviking.jscp examples/opencode-plugin/index.mjs examples/opencode-plugin/package.json ~/.config/opencode/plugins/openviking/cp -r examples/opencode-plugin/lib ~/.config/opencode/plugins/openviking/cd ~/.config/opencode/plugins/openviking@@ -61,7 +61,7 @@ After installation, the layout should look like this:```text~/.config/opencode/plugins/-├── openviking.mjs+├── openviking.js└── openviking/├── index.mjs├── package.json@@ -69,13 +69,14 @@ After installation, the layout should look like this:└── node_modules/```-The top-level `openviking.mjs` forwards the first-level `.mjs` entry that OpenCode can discover to the actual plugin directory:+The top-level `openviking.js` forwards the first-level `.js` entry that OpenCode can discover to the actual plugin directory:```jsexport { OpenVikingPlugin, default } from "./openviking/index.mjs"```This wrapper is only for source installs with the directory layout shown above. npm package installs load `index.mjs` directly through `package.json`.+Use the `.js` wrapper for source installs; OpenCode's local plugin scanner discovers JavaScript/TypeScript plugin files.If you install through an npm package, you can also use `examples/opencode-plugin` as a normal OpenCode plugin package.@@ -132,6 +133,7 @@ In a new OpenCode session, ask the agent to browse OpenViking memory or search f- `memgrep`, `memglob`- `memadd`, `memwrite`, `memremove`, `memqueue`- `memcommit`+- `codesearch`, `codeoutline`, `codeexpand`If anything looks wrong, check the runtime files:@@ -211,7 +213,7 @@ These are local runtime files and should not be committed to the repository.| Issue | What to check ||-------|---------------|-| Plugin does not load | For package installs, confirm `~/.config/opencode/opencode.json` contains `openviking-opencode-plugin`; for source installs, confirm `~/.config/opencode/plugins/openviking.mjs` exists |+| Plugin does not load | For package installs, confirm `~/.config/opencode/opencode.json` contains `@openviking/opencode-plugin`; for source installs, confirm `~/.config/opencode/plugins/openviking.js` exists || Tools call the wrong server | Check `endpoint` in `~/.config/opencode/openviking-config.json`, or set `OPENVIKING_PLUGIN_CONFIG` to the intended config path || 401 / 403 from OpenViking | Verify `OPENVIKING_API_KEY`; for trusted-mode deployments, also verify `OPENVIKING_ACCOUNT` and `OPENVIKING_USER` || Recall is empty | Confirm OpenViking has indexed memories/resources and `autoRecall.enabled` is `true` |diff --git a/examples/opencode-plugin/README.md b/examples/opencode-plugin/README.mdindex d593408a2..0371d6178 100644--- a/examples/opencode-plugin/README.md+++ b/examples/opencode-plugin/README.md@@ -35,7 +35,7 @@ examples/opencode-plugin/│ └── utils.mjs├── tests/└── wrappers/- └── openviking.mjs+ └── openviking.js```There is intentionally no `skills/openviking/SKILL.md`. The former skill behavior is implemented as tools.@@ -59,9 +59,15 @@ openviking-server --config ~/.openviking/ov.confNormal users should enable it through OpenCode's package plugin mechanism:+The published npm package is `@openviking/opencode-plugin`; verify availability with:++```bash+npm view @openviking/opencode-plugin version+```+```json{- "plugin": ["openviking-opencode-plugin"]+ "plugin": ["@openviking/opencode-plugin"]}```@@ -71,7 +77,7 @@ For development or PR testing, copy the package into OpenCode's plugin directory```bashmkdir -p ~/.config/opencode/plugins/openviking-cp examples/opencode-plugin/wrappers/openviking.mjs ~/.config/opencode/plugins/openviking.mjs+cp examples/opencode-plugin/wrappers/openviking.js ~/.config/opencode/plugins/openviking.jscp examples/opencode-plugin/index.mjs examples/opencode-plugin/package.json ~/.config/opencode/plugins/openviking/cp -r examples/opencode-plugin/lib ~/.config/opencode/plugins/openviking/cd ~/.config/opencode/plugins/openviking@@ -82,7 +88,7 @@ This creates a stable OpenCode plugin layout:```text~/.config/opencode/plugins/-├── openviking.mjs+├── openviking.js└── openviking/├── index.mjs├── package.json@@ -90,13 +96,14 @@ This creates a stable OpenCode plugin layout:└── node_modules/```-The top-level `openviking.mjs` is only a wrapper:+The top-level `openviking.js` is only a wrapper:```jsexport { OpenVikingPlugin, default } from "./openviking/index.mjs"```This wrapper is only for source installs with the directory layout shown above. npm package installs load `index.mjs` directly through `package.json`.+Use the `.js` wrapper for source installs; OpenCode's local plugin scanner discovers JavaScript/TypeScript plugin files.## Configuration@@ -226,6 +233,24 @@ This tool requires `confirm: true`. The user must explicitly confirm deletion beReturn OpenViking observer queue status for embedding and semantic processing.+### `codesearch`++Search AST-supported symbol names across a confirmed ingested code repository or source subtree.++Use this after you have evidence that a `viking://` URI contains supported source files.++### `codeoutline`++Show symbol structure for a confirmed `viking://` source file.++Use this after `memglob`, `membrowse`, or `codesearch` finds an exact source file URI.++### `codeexpand`++Return the full source for one named symbol from a confirmed `viking://` source file.++Use this after `codeoutline` or other evidence shows the symbol exists in that file.+## Runtime FilesThe plugin writes runtime files to `~/.config/opencode/openviking/` by default:diff --git a/examples/opencode-plugin/package.json b/examples/opencode-plugin/package.jsonindex fc99d92aa..b1dba7669 100644--- a/examples/opencode-plugin/package.json+++ b/examples/opencode-plugin/package.json@@ -1,6 +1,6 @@{- "name": "openviking-opencode-plugin",- "version": "0.1.0",+ "name": "@openviking/opencode-plugin",+ "version": "0.1.5","author": "tanyouqing","description": "Unified OpenCode plugin for OpenViking repository retrieval and long-term memory","type": "module",@@ -22,9 +22,13 @@"dependencies": {"@opencode-ai/plugin": "^1.14.37"},+ "publishConfig": {+ "access": "public"+ },"repository": {- "type": "git",- "url": "https://github.com/volcengine/OpenViking"+ "type": "git",+ "url": "git+https://github.com/volcengine/OpenViking.git",+ "directory": "examples/opencode-plugin"},"keywords": ["opencode",diff --git a/examples/opencode-plugin/wrappers/openviking.mjs b/examples/opencode-plugin/wrappers/openviking.jssimilarity index 100%rename from examples/opencode-plugin/wrappers/openviking.mjsrename to examples/opencode-plugin/wrappers/openviking.js