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
feat(installer): download the installer and plugins from the docs site (#5477)
t0saki323fe17b9097
diff --git a/.github/scripts/build-plugin-downloads.sh b/.github/scripts/build-plugin-downloads.shnew file mode 100755index 000000000..5d198b845--- /dev/null+++ b/.github/scripts/build-plugin-downloads.sh@@ -0,0 +1,71 @@+#!/usr/bin/env bash+# Build the downloads the docs site serves under /dl: the installer, the plugin+# bundle, the Claude Code URL marketplace, the Codex git marketplace and the+# channel data of the version check, laid out like the TOS release bucket. Each docs host publishes the tree built from+# the commit it deploys, with its own address in the marketplace manifest.++set -euo pipefail++USAGE="usage: build-plugin-downloads.sh <out-dir> <base-url>"+OUT="${1:?${USAGE}}"+BASE="${2:?${USAGE}}"+BASE="${BASE%/}"++ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"+SCRIPTS="${ROOT}/.github/scripts"+SHARED="${ROOT}/examples/memory-plugin-shared"+WORK="$(mktemp -d "${TMPDIR:-/tmp}/ov-downloads.XXXXXX")"+trap 'rm -rf "${WORK}"' EXIT++# The commit the tree was built from, so a published installer can be compared+# with the repository copy at that commit.+VERSION="$(TZ=UTC git -C "${ROOT}" log -1 --abbrev=10 --format=%cd-%h --date=format-local:%Y%m%d)"+# Docs deploy on every change, so a zip must only change when its content does:+# the Claude Code zip keeps its name for as long as the plugin version does.+export ZIP_STAMP=200001010000.00++STAGE="${WORK}/memory-plugin-marketplace"+bash "${SCRIPTS}/stage-memory-plugin-marketplace.sh" "${STAGE}"+PLUGIN_VERSION="$(jq -r .version "${STAGE}/claude-code-memory-plugin/.claude-plugin/plugin.json")"+CLAUDE_ZIP="plugins/claude/openviking-memory-${PLUGIN_VERSION}.zip"++rm -rf "${OUT}"+mkdir -p "${OUT}/memory-plugin-shared" "${OUT}/releases/latest" "${OUT}/plugins/claude"+case "${OUT}" in /*) ;; *) OUT="${PWD}/${OUT}" ;; esac++bash "${SCRIPTS}/stamp-installer-version.sh" "${SHARED}/install.sh" "${VERSION}" "${OUT}/memory-plugin-shared/install.sh"+cp "${SHARED}/bootstrap.sh" "${OUT}/memory-plugin-shared/bootstrap.sh"++# The git marketplace is committed before the zips are built: zipping resets+# the staged files' times.+SRC="${WORK}/memory-plugins-src"+cp -R "${STAGE}" "${SRC}"+git -C "${SRC}" init -q -b main+git -C "${SRC}" add -A+git -C "${SRC}" -c [email protected] -c user.name="OpenViking Release" \+ commit -qm "plugins ${VERSION}"+git clone -q --bare "${SRC}" "${OUT}/plugins/memory-plugins.git"+git -C "${OUT}/plugins/memory-plugins.git" repack -adq+git -C "${OUT}/plugins/memory-plugins.git" update-server-info+# Static hosts serve files only; the sample hooks are of no use to a client.+rm -rf "${OUT}/plugins/memory-plugins.git/hooks"++bash "${SCRIPTS}/reproducible-zip.sh" "${OUT}/releases/latest/memory-plugin-marketplace.zip" "${WORK}" memory-plugin-marketplace+bash "${SCRIPTS}/reproducible-zip.sh" "${OUT}/${CLAUDE_ZIP}" "${STAGE}" claude-code-memory-plugin+bash "${SCRIPTS}/generate-claude-marketplace-json.sh" "${BASE}/${CLAUDE_ZIP}" \+ "${OUT}/${CLAUDE_ZIP}" "${STAGE}" "${OUT}/plugins/claude/marketplace.json"++# What the install site's version check answers with. No checksum: the two+# hosts deploy one after the other and keep no earlier build, so a pinned+# bundle would fail to verify while they differ.+jq -n \+ --arg version "${VERSION}" \+ --arg git_url "${BASE}/plugins/memory-plugins.git" \+ --arg bundle_url "${BASE}/releases/latest/memory-plugin-marketplace.zip" \+ '{schema: 1, harnesses: (+ {codex: {version: $version, git_url: $git_url}}+ + (["claude", "cursor", "trae", "trae-cli", "trae-cn", "zcode", "kimicode",+ "opencode", "pi", "dsh"] | map({key: ., value: {version: $version, bundle_url: $bundle_url}}) | from_entries)+ )}' > "${OUT}/releases/latest/channels.json"++echo "Built plugin downloads ${VERSION} for ${BASE}"diff --git a/.github/scripts/generate-claude-marketplace-json.sh b/.github/scripts/generate-claude-marketplace-json.shindex 176454ee4..c1057d801 100644--- a/.github/scripts/generate-claude-marketplace-json.sh+++ b/.github/scripts/generate-claude-marketplace-json.sh@@ -1,25 +1,25 @@#!/usr/bin/env bash# Write the Claude Code URL marketplace the installer registers: the staged-# directory marketplace's entry, re-pointed at the release's immutable plugin-# zip. Claude Code fetches both over HTTPS without git, and updates an-# installed plugin when the entry's version changes, so the version is the-# plugin manifest's own.+# directory marketplace's entry, re-pointed at the published plugin zip. Claude+# Code fetches both over HTTPS without git, and updates an installed plugin+# when the entry's version changes, so the version is the plugin manifest's+# own.set -euo pipefail-TAG="${1:?usage: generate-claude-marketplace-json.sh <tag> <tos-base> <plugin-zip> <stage-dir> <out>}"-TOS_BASE="${2%/}"-PLUGIN_ZIP="$3"-STAGE="$4"-OUT="$5"+USAGE="usage: generate-claude-marketplace-json.sh <plugin-zip-url> <plugin-zip> <stage-dir> <out>"+ZIP_URL="${1:?${USAGE}}"+PLUGIN_ZIP="${2:?${USAGE}}"+STAGE="${3:?${USAGE}}"+OUT="${4:?${USAGE}}"sha256() { sha256sum "$1" | cut -d' ' -f1; }jq \- --arg url "${TOS_BASE}/releases/${TAG}/openviking-memory-claude.zip" \+ --arg url "${ZIP_URL}" \--arg sha256 "$(sha256 "${PLUGIN_ZIP}")" \--arg version "$(jq -r .version "${STAGE}/claude-code-memory-plugin/.claude-plugin/plugin.json")" \- '.description = "OpenViking plugins for Claude Code (TOS mirror)."+ '.description = "OpenViking plugins for Claude Code."| .plugins |= map(select(.name == "openviking-memory")| .version = $version| .source = {source: "archive", url: $url, sha256: $sha256})diff --git a/.github/scripts/reproducible-zip.sh b/.github/scripts/reproducible-zip.shindex 0a33de365..497a4dc60 100755--- a/.github/scripts/reproducible-zip.sh+++ b/.github/scripts/reproducible-zip.sh@@ -2,8 +2,9 @@# Zip one directory so that every build of the same commit gives the same# bytes. The versioned release keys are meant to be immutable and the# marketplace manifests pin these zips' sha256, so re-running a release must-# not change them. Entries are sorted, stamped with the commit time and carry-# no extra attributes.+# not change them. Entries are sorted, stamped with the commit time, or with+# ZIP_STAMP (touch -t format) when the bytes must not change between commits+# either, and carry no extra attributes.set -euo pipefail@@ -14,7 +15,7 @@ ENTRY="${3:?usage: reproducible-zip.sh <out.zip> <parent-dir> <entry>}"ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"# Zip stores local time, so one fixed zone keeps the stamp the same everywhere.export TZ=UTC-STAMP="$(git -C "${ROOT}" log -1 --format=%cd --date=format-local:%Y%m%d%H%M.%S)"+STAMP="${ZIP_STAMP:-$(git -C "${ROOT}" log -1 --format=%cd --date=format-local:%Y%m%d%H%M.%S)}"case "${OUT}" in /*) ;; *) OUT="${PWD}/${OUT}" ;; esacrm -f "${OUT}"diff --git a/.github/workflows/_docs-deploy.yml b/.github/workflows/_docs-deploy.ymlindex 2eaf6337b..91a53fb90 100644--- a/.github/workflows/_docs-deploy.yml+++ b/.github/workflows/_docs-deploy.yml@@ -36,6 +36,9 @@ jobs:DOCS_BASE: /VITE_COUNTER_URL: ${{ vars.VITE_COUNTER_URL }}+ - name: Build plugin downloads+ run: bash .github/scripts/build-plugin-downloads.sh docs/.vitepress/dist/dl https://docs.openviking.ai/dl+- name: Configure GitHub Pagesuses: actions/configure-pages@v6diff --git a/.github/workflows/docs-tos.yml b/.github/workflows/docs-tos.ymlindex d2f49259d..b8b31c1c0 100644--- a/.github/workflows/docs-tos.yml+++ b/.github/workflows/docs-tos.yml@@ -6,6 +6,16 @@ on:paths:- 'docs/**'- '.github/workflows/docs-tos.yml'+ # The deploy also publishes the plugin downloads under /dl.+ - 'examples/.claude-plugin/**'+ - 'examples/.agents/**'+ - 'examples/claude-code-memory-plugin/**'+ - 'examples/codex-memory-plugin/**'+ - 'examples/agent-hook-plugin/**'+ - 'examples/opencode-plugin/**'+ - 'examples/pi-coding-agent-extension/**'+ - 'examples/memory-plugin-shared/**'+ - '.github/scripts/**'workflow_dispatch:permissions:@@ -39,6 +49,9 @@ jobs:env:VITE_COUNTER_URL: ${{ vars.VITE_COUNTER_URL }}+ - name: Build plugin downloads+ run: bash .github/scripts/build-plugin-downloads.sh docs/.vitepress/dist/dl https://docs.openviking.net/dl+- name: Check TOS configurationid: tos_configenv:@@ -106,6 +119,7 @@ jobs:--recursive \--exclude ".git/*" \--exclude "assets/*" \+ --exclude "dl/*" \--cache-control "${HTML_CACHE_CONTROL}" \--only-show-errors@@ -157,8 +171,52 @@ jobs:done < <(find "${DIST_DIR}/agents" -type f -name "*.md" -print0)fi+ - name: Upload plugin downloads to TOS+ id: upload_downloads+ if: steps.tos_config.outputs.configured == 'true'+ continue-on-error: true+ env:+ AWS_ACCESS_KEY_ID: ${{ secrets.TOS_ACCESS_KEY }}+ AWS_SECRET_ACCESS_KEY: ${{ secrets.TOS_SECRET_KEY }}+ AWS_DEFAULT_REGION: ${{ secrets.TOS_REGION }}+ TOS_BUCKET: ${{ secrets.TOS_BUCKET }}+ TOS_ENDPOINT: ${{ secrets.TOS_ENDPOINT }}+ run: |+ set -euo pipefail++ TOS_ENDPOINT="${TOS_ENDPOINT#https://}"+ TOS_ENDPOINT="${TOS_ENDPOINT#http://}"+ case "${TOS_ENDPOINT}" in+ tos-s3-*) TOS_S3_ENDPOINT="${TOS_ENDPOINT}" ;;+ tos-*) TOS_S3_ENDPOINT="tos-s3-${TOS_ENDPOINT#tos-}" ;;+ *) TOS_S3_ENDPOINT="${TOS_ENDPOINT}" ;;+ esac++ DL_DIR="docs/.vitepress/dist/dl"+ NO_CACHE_CONTROL="no-store, no-cache, must-revalidate, max-age=0"++ upload() {+ aws s3 cp "${DL_DIR}/$1" "s3://${TOS_BUCKET}/dl/$1" \+ --endpoint-url "https://${TOS_S3_ENDPOINT}" \+ --content-type "$2" \+ --cache-control "${NO_CACHE_CONTROL}" \+ --only-show-errors+ }++ upload memory-plugin-shared/install.sh "text/plain; charset=utf-8"+ upload memory-plugin-shared/bootstrap.sh "text/plain; charset=utf-8"+ upload releases/latest/memory-plugin-marketplace.zip application/zip+ # The manifest and the refs go up after the files they point to.+ for zip in "${DL_DIR}"/plugins/claude/*.zip; do+ upload "plugins/claude/$(basename "${zip}")" application/zip+ done+ upload plugins/claude/marketplace.json application/json+ bash .github/scripts/publish-dumb-git-repo.sh "${DL_DIR}/plugins/memory-plugins.git" \+ "s3://${TOS_BUCKET}/dl/plugins/memory-plugins.git" --endpoint-url "https://${TOS_S3_ENDPOINT}"+ upload releases/latest/channels.json application/json+- name: Report TOS deployment failure- if: steps.setup_python.outcome == 'failure' || steps.install_aws_cli.outcome == 'failure' || steps.upload_tos.outcome == 'failure'+ if: steps.setup_python.outcome == 'failure' || steps.install_aws_cli.outcome == 'failure' || steps.upload_tos.outcome == 'failure' || steps.upload_downloads.outcome == 'failure'run: |echo "::warning::Docs were built, but deploying to TOS failed. This deployment is non-blocking."echo "## TOS deployment failed" >> "$GITHUB_STEP_SUMMARY"diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex 0e26265f7..cdd7dfcfc 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -14,6 +14,16 @@ on:- '.github/workflows/_docs.yml'- '.github/workflows/_docs-deploy.yml'- '.github/workflows/docs.yml'+ # The deploy also publishes the plugin downloads under /dl.+ - 'examples/.claude-plugin/**'+ - 'examples/.agents/**'+ - 'examples/claude-code-memory-plugin/**'+ - 'examples/codex-memory-plugin/**'+ - 'examples/agent-hook-plugin/**'+ - 'examples/opencode-plugin/**'+ - 'examples/pi-coding-agent-extension/**'+ - 'examples/memory-plugin-shared/**'+ - '.github/scripts/**'workflow_dispatch:permissions:diff --git a/.github/workflows/release-tos.yml b/.github/workflows/release-tos.ymlindex 80145e9ac..9920596d1 100644--- a/.github/workflows/release-tos.yml+++ b/.github/workflows/release-tos.yml@@ -87,7 +87,8 @@ jobs:# Claude Code (>= 2.1.224) installs and auto-updates from a URL# marketplace whose entry downloads this zip of the plugin alone.bash .github/scripts/reproducible-zip.sh "/tmp/openviking-memory-claude-${RELEASE_TAG}.zip" "${STAGE}" claude-code-memory-plugin- bash .github/scripts/generate-claude-marketplace-json.sh "${RELEASE_TAG}" "https://ovrelease.tos-cn-beijing.volces.com" \+ bash .github/scripts/generate-claude-marketplace-json.sh \+ "https://ovrelease.tos-cn-beijing.volces.com/releases/${RELEASE_TAG}/openviking-memory-claude.zip" \"/tmp/openviking-memory-claude-${RELEASE_TAG}.zip" "${STAGE}" /tmp/claude-marketplace.json- name: Build marketplace git repo (dumb HTTP)diff --git a/RELEASE.md b/RELEASE.mdindex 08a9822c9..db4dae8b9 100644--- a/RELEASE.md+++ b/RELEASE.md@@ -92,11 +92,19 @@ Formal GitHub Releases trigger the TOS upload automatically and overwrite the stIf TOS secrets are not fully configured, the workflow skips uploading and reports it in the step summary without failing the whole workflow.-### Memory Plugin Hotfix and Rollback+### Memory Plugin Downloads on the Docs Site-The memory plugins are installed and updated from the stable paths: `plugins/claude/marketplace.json` (Claude Code), `plugins/memory-plugins.git` (Codex and TraeCode CLI), `releases/latest/memory-plugin-marketplace.zip` (every other host), `releases/latest/channels.json` (install version resolution), and `memory-plugin-shared/install.sh` and `bootstrap.sh`. One run of the workflow builds all of them from the commit of the tag it is given.+The installer and the memory plugins are downloaded from the documentation site, not from the TOS release bucket. Both docs deployments (`17. Docs` to GitHub Pages at `docs.openviking.ai`, `19. Docs TOS Deploy` to `docs.openviking.net`) run `.github/scripts/build-plugin-downloads.sh` and publish its output under `/dl`, with the same layout as the release bucket: `memory-plugin-shared/install.sh` and `bootstrap.sh`, `releases/latest/memory-plugin-marketplace.zip`, `plugins/claude/marketplace.json` with `plugins/claude/openviking-memory-<plugin version>.zip`, `plugins/memory-plugins.git`, and `releases/latest/channels.json`, which the install site's version check reads.-To publish a plugin hotfix without a product release:+They deploy on every push to `main` that changes the docs, a plugin, the installer or `.github/scripts`, so a plugin change is published when it is merged, without a tag or a GitHub Release. The published installer reports `<date>-<commit>` as its version. To publish a plugin fix, merge it with the version bumps that `.github/scripts/check-plugin-version-bumps.sh` requires; to roll back, revert the change on `main` and bump the versions again. Both workflows can also be started by hand from `main`.++The TOS release bucket keeps receiving the same files with each release for installs that still point at it, as described below.++### Memory Plugin Hotfix and Rollback on TOS++Installs that point at the TOS release bucket read its stable paths: `plugins/claude/marketplace.json` (Claude Code), `plugins/memory-plugins.git` (Codex and TraeCode CLI), `releases/latest/memory-plugin-marketplace.zip` (every other host), `releases/latest/channels.json` (install version resolution), and `memory-plugin-shared/install.sh` and `bootstrap.sh`. One run of the workflow builds all of them from the commit of the tag it is given.++To publish a plugin hotfix there without a product release:1. Merge the fix with the plugin version bumps that `.github/scripts/check-plugin-version-bumps.sh` requires. Claude Code only updates an installed plugin when its version string changes.2. Tag a commit that holds the last release plus the fix, for example on a branch cut from the last `vX.Y.Z` tag with the fix cherry-picked. Use a tag that does not start with `v`, such as `memory-plugins-YYYY.M.D`, and do not publish a GitHub Release for it: `v*.*.*` tag pushes trigger the Docker workflow, published Releases trigger the main release workflows, and the main package version is resolved from `v*` tags.diff --git a/RELEASE_CN.md b/RELEASE_CN.mdindex 148e350d0..237177a95 100644--- a/RELEASE_CN.md+++ b/RELEASE_CN.md@@ -88,11 +88,19 @@ TOS 发布流程会生成源码 zip,并上传以下类型资产:如果 TOS 相关 secrets 未配置完整,workflow 会跳过上传并在 step summary 中说明,不会使整个流程失败。-### Memory 插件热修复与回滚+### 文档站上的 Memory 插件下载-Memory 插件的安装和更新都读稳定路径:`plugins/claude/marketplace.json`(Claude Code)、`plugins/memory-plugins.git`(Codex 和 TraeCode CLI)、`releases/latest/memory-plugin-marketplace.zip`(其他所有宿主)、`releases/latest/channels.json`(安装时的版本解析),以及 `memory-plugin-shared/install.sh` 和 `bootstrap.sh`。workflow 每次运行都从所给 tag 对应的 commit 构建这全部内容。+安装器和 Memory 插件从文档站下载,不再从 TOS 发布桶下载。两条文档部署流水线(`17. Docs` 部署到 GitHub Pages 的 `docs.openviking.ai`,`19. Docs TOS Deploy` 部署到 `docs.openviking.net`)都会运行 `.github/scripts/build-plugin-downloads.sh`,把产物发布到 `/dl` 下,目录结构与发布桶一致:`memory-plugin-shared/install.sh` 和 `bootstrap.sh`、`releases/latest/memory-plugin-marketplace.zip`、`plugins/claude/marketplace.json` 和 `plugins/claude/openviking-memory-<插件版本>.zip`、`plugins/memory-plugins.git`,以及安装站点的版本检查读取的 `releases/latest/channels.json`。-不发产品版本、单独发布插件热修复:+只要推送到 `main` 的提交改动了文档、插件、安装器或 `.github/scripts`,两条流水线就会部署,所以插件改动合入即发布,不需要打 tag,也不需要发 GitHub Release。发布出去的安装器以 `<日期>-<commit>` 作为版本号。发布插件修复时,合入修复并按 `.github/scripts/check-plugin-version-bumps.sh` 的要求升级插件版本;回滚时在 `main` 上 revert 该改动并再次升级版本号。两条流水线也可以在 `main` 上手动触发。++TOS 发布桶仍会随每次发版收到同样的文件,供仍指向它的安装使用,见下文。++### TOS 上的 Memory 插件热修复与回滚++指向 TOS 发布桶的安装读它的稳定路径:`plugins/claude/marketplace.json`(Claude Code)、`plugins/memory-plugins.git`(Codex 和 TraeCode CLI)、`releases/latest/memory-plugin-marketplace.zip`(其他所有宿主)、`releases/latest/channels.json`(安装时的版本解析),以及 `memory-plugin-shared/install.sh` 和 `bootstrap.sh`。workflow 每次运行都从所给 tag 对应的 commit 构建这全部内容。++在那里不发产品版本、单独发布插件热修复:1. 合入修复,并按 `.github/scripts/check-plugin-version-bumps.sh` 的要求升级插件版本。Claude Code 只在版本号变化时更新已安装的插件。2. 在“上一个正式版本 + 修复”的 commit 上打 tag,例如从上一个 `vX.Y.Z` tag 拉分支并 cherry-pick 修复。tag 不要以 `v` 开头,例如 `memory-plugins-YYYY.M.D`,也不要为它发布 GitHub Release:推送 `v*.*.*` tag 会触发 Docker workflow,发布 Release 会触发主包发版 workflow,主包版本号也从 `v*` tag 解析。diff --git a/docs/en/agent-integrations/02-claude-code.md b/docs/en/agent-integrations/02-claude-code.mdindex 58dc7e6b0..2e41896d4 100644--- a/docs/en/agent-integrations/02-claude-code.md+++ b/docs/en/agent-integrations/02-claude-code.md@@ -18,7 +18,7 @@ In regions where GitHub is hard to reach, run the same installer from the Volcenbash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh)```-> **TOS and Claude Code updates**: on Claude Code 2.1.224 or later, the TOS channel registers a TOS-hosted marketplace with auto-update turned on, so new plugin versions download in the background and load after a restart. Older Claude Code gets a local directory marketplace, which cannot auto-update — re-run the installer to update. (Codex on TOS installs from a TOS-hosted git repo and keeps remote updates.)+> **Plugin updates**: on Claude Code 2.1.224 or later, the installer registers a marketplace served by the OpenViking documentation site with auto-update turned on, so new plugin versions download in the background and load after a restart. Older Claude Code gets a local directory marketplace, which cannot auto-update — re-run the installer to update. (Codex installs from a git repository on the same site and keeps remote updates.)No shell wrapper is needed anymore: the plugin ships a stdio MCP proxy that reads `~/.openviking/ovcli.conf` (or `OPENVIKING_*` env vars) at runtime, same as the hooks.diff --git a/docs/en/agent-integrations/16-capability-reference.md b/docs/en/agent-integrations/16-capability-reference.mdindex 33a6685cc..cb7a2cbc4 100644--- a/docs/en/agent-integrations/16-capability-reference.md+++ b/docs/en/agent-integrations/16-capability-reference.md@@ -173,7 +173,7 @@ Core modules at a glance (detailed further in the per-dimension sections):| Harness | Integration Form | Install Channel | Session ID Prefix/Format | Config Source | Standalone Setup Wizard ||---|---|---|---|---|---|-| claude-code | CC plugin (marketplace): 9 hooks + MCP proxy + slash + statusline + skill | One-line `install.sh --harness claude` (Claude Code 2.0+) / manual marketplace / TOS mirror | `cc-<CC session_id verbatim>`; subagents use `…__subagent-<agent_id>` | env + ovcli.conf `plugin.claude_code` + ov.conf `claude_code` | ✅ `scripts/setup.mjs` |+| claude-code | CC plugin (marketplace): 9 hooks + MCP proxy + slash + statusline + skill | One-line `install.sh --harness claude` (Claude Code 2.0+) / manual marketplace | `cc-<CC session_id verbatim>`; subagents use `…__subagent-<agent_id>` | env + ovcli.conf `plugin.claude_code` + ov.conf `claude_code` | ✅ `scripts/setup.mjs` || codex | Codex plugin (marketplace): 6 hooks + MCP proxy + skill | One-line `--harness codex` / `codex plugin marketplace add` (the TOS channel uses dumb-HTTP git to ensure remote updates continue working) | `cx-<safeId>` (deterministically derived, without reading state) | env + ovcli.conf `plugin.codex` + ov.conf `codex` | ✅ || trae-cli | **Installed as a codex plugin alias** (TraeCode CLI 2.0, 2.0 only; a Codex-family CLI: uses the `traecli` binary and `~/.trae/traecli.toml` config; its capability surface is identical to codex) | One-line `--harness trae-cli` (reuses the codex install flow; marketplace commands run against the targeted binary, e.g., `traecli plugin marketplace add`) | Same derivation rule as codex | Same as codex (env + ovcli.conf `plugin.codex` + ov.conf) | ✅ (same as codex) || cursor | Config-driven (writes `~/.cursor/hooks.json`+`mcp.json`) + rule + skill | One-line `--harness cursor` | `cu-<conversation_id>` | env + ovcli.conf `plugin.cursor` | ❌ (shares the installer TUI) |@@ -191,7 +191,7 @@ Core modules at a glance (detailed further in the per-dimension sections):The unified install script (`examples/memory-plugin-shared/install.sh`) supports eleven harness IDs: `claude, codex, cursor, trae, trae-cn, trae-cli, zcode, kimicode, opencode, pi, dsh`. (Note that `openclaw` uses its own distribution channel, while `trae-cli` reuses the `codex` install flow, as detailed in [§3.1.1](#_3-1-1-decision-matrix)). Key highlights:-- **Sources and prompts:** Everything is installed from the OpenViking release on Volcengine TOS; run from a repository checkout, the installer uses that checkout instead (`--source archive|dev`). When executed via `bash <(curl …)`, it reads input directly from `/dev/tty` to ensure prompts remain interactive.+- **Sources and prompts:** Everything is installed from the downloads the OpenViking documentation site serves; run from a repository checkout, the installer uses that checkout instead (`--source archive|dev`). When executed via `curl … | bash`, it reads input directly from `/dev/tty` to ensure prompts remain interactive.- **Usage:** In the official documentation, the canonical one-line command omits the `--harness` flag, which launches a TUI multi-select menu. However, the setup-helper forwarding scripts bundled with each plugin append the `--harness` flag automatically.- **Idempotent merging:** Hooks and MCP entries are identified by the `OPENVIKING_INTEGRATION_ID` marker. This ensures stale entries are pruned and new ones are appended without affecting third-party configurations. Writes are atomic: the script creates a `.bak` backup, writes to a temporary file, and then renames it over the target with `0600` permissions.- **Credential wizard:** This writes to `~/.openviking/ovcli.conf`. Users can select from three targets (local `http://127.0.0.1:1933` / Volcengine Cloud `https://api.vikingdb.cn-beijing.volces.com/openviking` / custom). If a configuration already exists, the script displays the current values first and asks whether to keep or reconfigure them, masking the API key for security.diff --git a/docs/zh/agent-integrations/02-claude-code.md b/docs/zh/agent-integrations/02-claude-code.mdindex 68a560638..7fe7cb861 100644--- a/docs/zh/agent-integrations/02-claude-code.md+++ b/docs/zh/agent-integrations/02-claude-code.md@@ -18,7 +18,7 @@ GitHub 访问受限的地区,从火山引擎 TOS 镜像运行同一个安装bash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh)```-> **Claude Code 走 TOS 时的更新**:Claude Code 2.1.224 及以上版本,TOS 渠道注册的是 TOS 托管的 marketplace 并开启自动更新,新版插件在后台下载,重启 Claude Code 后生效。更早的 Claude Code 注册的是本地目录 marketplace,**无法自动更新**——更新请重跑安装脚本。(Codex 走 TOS 时安装自 TOS 托管的 git 仓库,保留远程更新能力。)+> **插件更新**:Claude Code 2.1.224 及以上版本,安装脚本注册的是 OpenViking 文档站托管的 marketplace 并开启自动更新,新版插件在后台下载,重启 Claude Code 后生效。更早的 Claude Code 注册的是本地目录 marketplace,**无法自动更新**——更新请重跑安装脚本。(Codex 安装自同一站点上的 git 仓库,保留远程更新能力。)现在不再需要任何 shell wrapper:插件自带的 stdio MCP 代理会在运行时读取 `~/.openviking/ovcli.conf`(或 `OPENVIKING_*` 环境变量),与 hooks 使用同一套配置链。diff --git a/docs/zh/agent-integrations/16-capability-reference.md b/docs/zh/agent-integrations/16-capability-reference.mdindex bbb4c2e52..73054b6ce 100644--- a/docs/zh/agent-integrations/16-capability-reference.md+++ b/docs/zh/agent-integrations/16-capability-reference.md@@ -175,7 +175,7 @@ per-harness 章节(档案卡)只写差异;所有共享事实均在本章| harness | 集成形态 | 安装通道 | 会话 id 前缀/格式 | 配置来源 | 独立 setup 向导 ||---|---|---|---|---|---|-| claude-code | CC 插件(marketplace):包含 9 hook + MCP 代理 + slash + statusline + skill | 一键 `install.sh --harness claude`(Claude Code 2.0+)/ 手动 marketplace / TOS 镜像 | `cc-<CC session_id 原文>`;subagent 格式为 `…__subagent-<agent_id>` | env + ovcli.conf `plugin.claude_code` + ov.conf `claude_code` | ✅ `scripts/setup.mjs` |+| claude-code | CC 插件(marketplace):包含 9 hook + MCP 代理 + slash + statusline + skill | 一键 `install.sh --harness claude`(Claude Code 2.0+)/ 手动 marketplace | `cc-<CC session_id 原文>`;subagent 格式为 `…__subagent-<agent_id>` | env + ovcli.conf `plugin.claude_code` + ov.conf `claude_code` | ✅ `scripts/setup.mjs` || codex | Codex 插件(marketplace):包含 6 hook + MCP 代理 + skill | 一键 `--harness codex` / `codex plugin marketplace add`(TOS 走 dumb-HTTP git 以保留远程更新能力) | `cx-<safeId>`(确定性推导,不读取 state) | env + ovcli.conf `plugin.codex` + ov.conf `codex` | ✅ || trae-cli | **codex 插件别名安装**(TraeCode CLI 2.0,仅支持 2.0;Codex 系:binary `traecli`、配置 `~/.trae/traecli.toml`;能力面与 codex 一致) | 一键 `--harness trae-cli`(复用 codex 安装流程;marketplace 命令会随指向的 binary 执行,如 `traecli plugin marketplace add`) | 与 codex 的派生规则一致 | 与 codex 一致(env + ovcli.conf `plugin.codex` + ov.conf) | ✅(同 codex) || cursor | 配置驱动(写入 `~/.cursor/hooks.json`+`mcp.json`)+ rule + skill | 一键 `--harness cursor` | `cu-<conversation_id>` | env + ovcli.conf `plugin.cursor` | ❌(共用安装器 TUI) |@@ -193,7 +193,7 @@ per-harness 章节(档案卡)只写差异;所有共享事实均在本章统一安装脚本 `examples/memory-plugin-shared/install.sh` 覆盖 11 个 harness id:`claude, codex, cursor, trae, trae-cn, trae-cli, zcode, kimicode, opencode, pi, dsh`(其中 openclaw 走自有渠道;`trae-cli` 则复用 codex 安装流程,[§3.1.1](#_3-1-1-判定矩阵))。要点如下:-- 安装源与交互:全部从火山引擎 TOS 上的 OpenViking 发布包安装;在仓库 checkout 中运行时改用该 checkout(`--source archive|dev`)。以 `bash <(curl …)` 方式执行时会从 `/dev/tty` 读取输入,从而保留交互。+- 安装源与交互:全部从 OpenViking 文档站提供的下载安装;在仓库 checkout 中运行时改用该 checkout(`--source archive|dev`)。以 `curl … | bash` 方式执行时会从 `/dev/tty` 读取输入,从而保留交互。- 官方 docs 的规范一键命令是不带 `--harness` 的裸命令(执行后进入 TUI 多选);而各插件自带的 setup-helper 转发脚本在调用时会自动补 `--harness`。- 幂等合并:hooks/mcp 条目按 `OPENVIKING_INTEGRATION_ID` 标记识别自有条目,做到剔旧追新的同时不动第三方;写入采用原子操作——先备份 `.bak`,写 tmp 后 rename 覆盖,权限 0600。- 凭据向导写 `~/.openviking/ovcli.conf`:三选一(本地 `http://127.0.0.1:1933` / 火山云 `https://api.vikingdb.cn-beijing.volces.com/openviking` / 自定义),已有配置先展示当前值再问"沿用/重配",API key 掩码。diff --git a/examples/agent-hook-plugin/hosts/cursor/openviking.integration.json b/examples/agent-hook-plugin/hosts/cursor/openviking.integration.jsonindex 8098f8113..f9ac8024b 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.5",+ "version": "0.5.6","clients": ["cursor"],diff --git a/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.json b/examples/agent-hook-plugin/hosts/kimicode/kimi.plugin.jsonindex c5817cdaf..839bb1791 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.5",+ "version": "0.5.6","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.jsonindex 5efe1e563..cf451adf9 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.5",+ "version": "0.5.6","clients": ["kimicode"],diff --git a/examples/agent-hook-plugin/hosts/trae/openviking.integration.json b/examples/agent-hook-plugin/hosts/trae/openviking.integration.jsonindex eedb5be45..c2fb6921a 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.5",+ "version": "0.5.6","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.jsonindex 7c702fbaf..8a1b95342 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.5",+ "version": "0.5.6","clients": ["zcode"],diff --git a/examples/agent-hook-plugin/plugin.json b/examples/agent-hook-plugin/plugin.jsonindex a144e25c3..b50180e1c 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.5",+ "version": "0.5.6","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/agent-hook-plugin/scripts/ov-memory-doctor.mjs b/examples/agent-hook-plugin/scripts/ov-memory-doctor.mjsindex ca75167fd..d7a15f46e 100644--- a/examples/agent-hook-plugin/scripts/ov-memory-doctor.mjs+++ b/examples/agent-hook-plugin/scripts/ov-memory-doctor.mjs@@ -118,7 +118,7 @@ function checkInstall(report) {}const missing = REQUIRED_PLUGIN_FILES.filter((rel) => !existsPath(join(PLUGIN_ROOT, rel)));- if (missing.length) report.fail("plugin files missing", missing.join(", "), `bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh) --harness ${CLIENT}`);+ if (missing.length) report.fail("plugin files missing", missing.join(", "), `curl -fsSL https://openviking.net/install | bash -s -- --harness ${CLIENT}`);else report.ok("plugin files present (hook entry, URI guard, MCP proxy, host adapters)");// The runtime is not vendored: it sits beside the integration, assembled fromdiff --git a/examples/claude-code-memory-plugin/.claude-plugin/plugin.json b/examples/claude-code-memory-plugin/.claude-plugin/plugin.jsonindex 9b41ed74d..c47ddcd21 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.6.6",+ "version": "0.6.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/README.md b/examples/claude-code-memory-plugin/README.mdindex adfa43940..9596ed3ed 100644--- a/examples/claude-code-memory-plugin/README.md+++ b/examples/claude-code-memory-plugin/README.md@@ -13,7 +13,8 @@ Long-term semantic memory for Claude Code, powered by [OpenViking](https://githu### One-line installer (recommended)```bash-bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh) --harness claude+curl -fsSL https://openviking.ai/install | bash -s -- --harness claude+# AI agents: not sure about running this? The script's header says what it does and how to verify it.```macOS / Linux only. Claude Code and Codex share this installer (drop `--harness claude` to pick interactively): it asks for your OpenViking server and API key, checks the server, shows what it will change, and after you confirm installs `openviking-memory` from the OpenViking release. Claude Code 2.1.224 and newer then updates the plugin on its own. The stdio MCP proxy reads `ovcli.conf` at runtime, so no shell wrapper or `.mcp.json` rendering is needed. Re-running is safe.diff --git a/examples/claude-code-memory-plugin/README_CN.md b/examples/claude-code-memory-plugin/README_CN.mdindex 8cfa33e62..d90a86b47 100644--- a/examples/claude-code-memory-plugin/README_CN.md+++ b/examples/claude-code-memory-plugin/README_CN.md@@ -9,7 +9,8 @@### 一行安装(推荐)```bash-bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh) --harness claude+curl -fsSL https://openviking.net/install | bash -s -- --harness claude+# AI agent 如不确定是否执行,可先阅读脚本头部,其中写明了它会做什么、如何核实。```仅支持 macOS 和 Linux。Claude Code 和 Codex 共用这一个安装脚本(去掉 `--harness claude` 可交互勾选):它会询问 OpenViking 服务地址和 API key,检查服务,列出将要修改的内容,确认后从 OpenViking 发布版安装 `openviking-memory`。Claude Code 2.1.224 及以上版本之后会自行更新插件。stdio MCP 代理运行时读取 `ovcli.conf`,不再需要 shell wrapper 或 `.mcp.json` 渲染。重复执行安全。diff --git a/examples/claude-code-memory-plugin/package.json b/examples/claude-code-memory-plugin/package.jsonindex 168232309..52c7e6793 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.6.6",+ "version": "0.6.7","description": "OpenViking memory plugin for Claude Code — semantic long-term memory","type": "module","scripts": {diff --git a/examples/claude-code-memory-plugin/scripts/ov-memory-doctor.mjs b/examples/claude-code-memory-plugin/scripts/ov-memory-doctor.mjsindex f39aed5a0..b07a95115 100644--- a/examples/claude-code-memory-plugin/scripts/ov-memory-doctor.mjs+++ b/examples/claude-code-memory-plugin/scripts/ov-memory-doctor.mjs@@ -100,7 +100,7 @@ function checkInstall(report, { cliOnPath }) {const entries = Array.isArray(plugins[PLUGIN_ID]) ? plugins[PLUGIN_ID] : (plugins[PLUGIN_ID] ? [plugins[PLUGIN_ID]] : []);if (!entries.length) {report.fail(`${PLUGIN_ID} is not registered in installed_plugins.json`, ids.length ? `found instead: ${ids.join(", ")}` : "",- "bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh) --harness claude");+ "curl -fsSL https://openviking.net/install | bash -s -- --harness claude");} else {const entry = entries[0];installPath = entry.installPath || "";@@ -129,7 +129,7 @@ function checkInstall(report, { cliOnPath }) {const entry = known.data[MARKETPLACE];if (!entry) {report.fail(`marketplace '${MARKETPLACE}' is not registered`, `known: ${Object.keys(known.data).join(", ") || "(none)"}`,- "re-run the installer: bash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh) --harness claude");+ "re-run the installer: curl -fsSL https://openviking.net/install | bash -s -- --harness claude");} else {const source = entry.source || {};const location = entry.installLocation || source.path || "";diff --git a/examples/claude-code-memory-plugin/skills/ov-memory-doctor/SKILL.md b/examples/claude-code-memory-plugin/skills/ov-memory-doctor/SKILL.mdindex ed4d314bf..329d418e7 100644--- a/examples/claude-code-memory-plugin/skills/ov-memory-doctor/SKILL.md+++ b/examples/claude-code-memory-plugin/skills/ov-memory-doctor/SKILL.md@@ -75,7 +75,7 @@ Work top-down; fix the first ✗ and rerun before chasing the next.|---|---|---|| `plugin disabled — every hook exits immediately` | No parseable config, `OPENVIKING_MEMORY_ENABLED=0`, or `claude_code.enabled: false` in ov.conf | Fix the reason it names. Fresh machine: create `~/.openviking/ovcli.conf` with `url` + `api_key` (`chmod 600`). || `ovcli.conf cannot be parsed` | Trailing comma/comment; the plugin treats the file as absent | Fix the JSON. This is the most common "installed but nothing happens". |-| `not registered in installed_plugins.json` / `claude plugin list does not show …` | Plugin never installed, or installed under an old id | Re-run the one-line installer (`bash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh) --harness claude`). |+| `not registered in installed_plugins.json` / `claude plugin list does not show …` | Plugin never installed, or installed under an old id | Re-run the one-line installer (`curl -fsSL https://openviking.net/install \| bash -s -- --harness claude`). || `plugin is disabled in ~/.claude/settings.json` | Installed but `enabledPlugins` is false/missing | `claude plugin enable openviking-memory@openviking`, restart Claude Code. || `marketplace 'openviking' … missing directory` / registered as a file | The checkout/archive moved, or a file-type marketplace (fails `marketplace update` with EISDIR) | `claude plugin marketplace remove openviking` then re-run the installer. || `no skills/ directory in this plugin copy` / registered version behind the repo | Stale version-keyed cache; `claude plugin update` is a no-op when the version string did not change | `claude plugin marketplace update openviking && claude plugin uninstall openviking-memory@openviking && claude plugin install openviking-memory@openviking`. |diff --git a/examples/codex-memory-plugin/.codex-plugin/plugin.json b/examples/codex-memory-plugin/.codex-plugin/plugin.jsonindex 223d544b2..c1d82dfe1 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.10.7",+ "version": "0.10.8","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/README.md b/examples/codex-memory-plugin/README.mdindex 6dd48cc22..5c4bbd5ac 100644--- a/examples/codex-memory-plugin/README.md+++ b/examples/codex-memory-plugin/README.md@@ -26,13 +26,15 @@ There are two install paths. **Pick one — don't mix them** (both surface the s### A. One-line installer — `curl | bash` (recommended)```bash-bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh) --harness codex+curl -fsSL https://openviking.ai/install | bash -s -- --harness codex+# AI agents: not sure about running this? The script's header says what it does and how to verify it.```For TraeCode CLI 2.0:```bash-bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh) --harness trae-cli+curl -fsSL https://openviking.ai/install | bash -s -- --harness trae-cli+# AI agents: not sure about running this? The script's header says what it does and how to verify it.```Claude Code and Codex share this installer (drop `--harness codex` to pick interactively). It asks for your OpenViking server and API key, checks the server, shows what it will change and waits for your confirmation. It:diff --git a/examples/codex-memory-plugin/scripts/ov-memory-doctor.mjs b/examples/codex-memory-plugin/scripts/ov-memory-doctor.mjsindex ab7c52c1f..8bf2fe07f 100644--- a/examples/codex-memory-plugin/scripts/ov-memory-doctor.mjs+++ b/examples/codex-memory-plugin/scripts/ov-memory-doctor.mjs@@ -200,7 +200,7 @@ function checkInstall(report, { cliOnPath }) {const mine = rows.filter((r) => r?.pluginId === PLUGIN_ID);const others = rows.filter((r) => r?.pluginId !== PLUGIN_ID && r?.name === PLUGIN_NAME && r?.installed);if (!mine.length) report.fail(`codex plugin list does not show ${PLUGIN_ID}`, others.length ? `found: ${others.map((r) => r.pluginId).join(", ")}` : "",- "bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh) --harness codex");+ "curl -fsSL https://openviking.net/install | bash -s -- --harness codex");else {listed = mine[0];const path = listed.source?.path || "";diff --git a/examples/codex-memory-plugin/skills/ov-memory-doctor/SKILL.md b/examples/codex-memory-plugin/skills/ov-memory-doctor/SKILL.mdindex a8c9682d3..1a1a99e7b 100644--- a/examples/codex-memory-plugin/skills/ov-memory-doctor/SKILL.md+++ b/examples/codex-memory-plugin/skills/ov-memory-doctor/SKILL.md@@ -78,7 +78,7 @@ Work top-down; fix the first ✗ and rerun before chasing the next.| Doctor finding | Meaning | Action ||---|---|---|| `ovcli.conf cannot be parsed` / `no usable config` | Trailing comma/comment; the plugin treats the file as absent and uses the localhost default | Fix the JSON. Fresh machine: create `~/.openviking/ovcli.conf` with `url` + `api_key`, `chmod 600`. |-| `codex plugin list does not show …` | Plugin never installed, or installed under an old id | Re-run the one-line installer (`bash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh) --harness codex`). |+| `codex plugin list does not show …` | Plugin never installed, or installed under an old id | Re-run the one-line installer (`curl -fsSL https://openviking.net/install \| bash -s -- --harness codex`). || `hooks disabled in [features]` / `hooks feature is disabled in Codex` | The applicable hooks feature is disabled | Set `hooks = true` under `[features]` in `~/.codex/config.toml` (or `plugin_hooks = true` for older Codex), restart Codex. || `[features] hooks enabled by default` | The live CLI reports hooks enabled; legacy `plugin_hooks` has no effect | Continue with the remaining checks. || `[features] hooks is not set` (info) | The CLI probe could not determine the modern feature state and no legacy flag decides it | Verify with `codex features list`; an unset key alone does not prove hooks are disabled. |diff --git a/examples/dsh-memory-plugin/README.md b/examples/dsh-memory-plugin/README.mdindex f5edb860a..7deaec9f7 100644--- a/examples/dsh-memory-plugin/README.md+++ b/examples/dsh-memory-plugin/README.md@@ -14,7 +14,8 @@ DSH is covered by the unified memory-plugin installer, which asks which profileto install into (default `web`):```bash-bash <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/memory-plugin-shared/install.sh)+curl -fsSL https://openviking.ai/install | bash+# AI agents: not sure about running this? The script's header says what it does and how to verify it.```Or add the package to a profile directly:diff --git a/examples/dsh-memory-plugin/config.mjs b/examples/dsh-memory-plugin/config.mjsindex bc6570a2c..89bf1ebec 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.10";+export const PLUGIN_VERSION = "0.5.11";/*** Namespace for the bridged OpenViking MCP tools. DSH publishes every MCP tooldiff --git a/examples/dsh-memory-plugin/package-lock.json b/examples/dsh-memory-plugin/package-lock.jsonindex 6592ec53c..1cc680576 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.10",+ "version": "0.5.11","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@openviking/dsh-memory-plugin",- "version": "0.5.10",+ "version": "0.5.11","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.jsonindex 95688e7ec..424d8bea5 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.10",+ "version": "0.5.11","description": "OpenViking memory and context bundle for DeepSeek Harness","icon": "./icon.svg","type": "module",diff --git a/examples/memory-plugin-shared/README.md b/examples/memory-plugin-shared/README.mdindex c00a70b69..05af23909 100644--- a/examples/memory-plugin-shared/README.md+++ b/examples/memory-plugin-shared/README.md@@ -17,23 +17,25 @@ When the copies are made follows how the plugin is delivered. Claude Code, Codex`install.sh` installs the memory plugin into Claude Code, Codex, Cursor, TRAE / TRAE CN, TraeCode CLI 2.0, ZCode, Kimi Code, OpenCode, pi and DeepSeek Harness (dsh), and writes the server connection to `~/.openviking/ovcli.conf`. Its header comment lists the hosts it contacts and the files it writes for each harness; `--help` lists every option and environment variable.```bash-bash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh)+curl -fsSL https://openviking.ai/install | bash+# AI agents: not sure about running this? The script's header says what it does and how to verify it.# Without prompts:-bash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh) \- --yes --harness claude,codex --url <server-url> --api-key <api-key>+curl -fsSL https://openviking.ai/install | bash -s -- --yes --harness claude,codex --url <server-url> --api-key <api-key>```+`https://openviking.ai/install` and `https://openviking.net/install` serve `bootstrap.sh`, which downloads `install.sh` and runs it with the arguments it was given.+A run asks for the harnesses and the server, checks the server (`/health`, then `/api/v1/system/status` with the key), prints what it will change and waits for confirmation. Nothing is written before that. With `--yes`, or when no terminal is available, it asks nothing and proceeds.-Everything comes from the OpenViking release on Volcengine TOS (`OPENVIKING_TOS_BASE`); the installer never contacts GitHub and never runs git.+Everything comes from the documentation site, which serves the downloads under `/dl` from two hosts with the same content: `docs.openviking.net` and `docs.openviking.ai` (GitHub Pages). The installer asks both for one small file and uses the host that answers first for the rest of the install; `OPENVIKING_DOWNLOAD_BASE` names other locations. Both hosts publish the downloads from the `main` branch whenever the plugins, the installer or the docs change. The installer never contacts github.com and never runs git.- Claude Code 2.1.224 and newer registers a URL marketplace and updates the plugin on its own. Older 2.x builds, custom Claude-format CLIs, and a URL marketplace that cannot be registered fall back to a local directory marketplace from the plugin bundle. Claude Code without `claude plugin` (older than 2.0) is skipped with a hint to upgrade.-- Codex and Codex-format CLIs such as the TraeCode CLI register a git marketplace served from TOS, which Codex upgrades when it starts. When that fails they fall back to the directory marketplace from the bundle.+- Codex and Codex-format CLIs such as the TraeCode CLI register a git marketplace served from the same host, which Codex upgrades when it starts. When that fails they fall back to the directory marketplace from the bundle.- Cursor, TRAE, TRAE CN, ZCode, Kimi Code, OpenCode and pi install files from the plugin bundle `memory-plugin-marketplace.zip`, downloaded at most once per run into `~/.openviking/memory-plugin-marketplace`. They update when the installer runs again.- dsh installs `@openviking/dsh-memory-plugin` from npm through `dsh plugin add`.-After the confirmation the installer runs a version check: it asks `https://openviking.net/install/v1/<harness>.json` which release to install, once per selected harness. `OPENVIKING_SKIP_VERSION_CHECK=1` skips the check and installs the latest release, which is also what happens when the check fails. When the answer names a checksum, the bundle is verified against it.+After the confirmation the installer runs a version check: it asks `https://openviking.net/install/v1/<harness>.json` which release to install, once per selected harness. `OPENVIKING_SKIP_VERSION_CHECK=1` skips the check and installs the latest release, which is also what happens when the check fails. The answer names one download location, and the installer reads the same paths from the one it is using. When the answer names a checksum, the bundle is verified against it; the docs site holds the latest release only and publishes none, so there the answer names the version that is installed.Run from a repository checkout, the installer uses that checkout's plugins (`--source dev`) and downloads nothing from the release; `--source archive` or `--dist tos` installs the release instead. `--dist github`, `--source remote` and `OPENVIKING_REPO_URL` / `OPENVIKING_REPO_REF` / `OPENVIKING_REPO_BRANCH` are accepted and ignored with a notice; to install a branch, run `install.sh` from a checkout of it.diff --git a/examples/memory-plugin-shared/bootstrap.sh b/examples/memory-plugin-shared/bootstrap.shindex 6c9c9fee2..6685ba17d 100755--- a/examples/memory-plugin-shared/bootstrap.sh+++ b/examples/memory-plugin-shared/bootstrap.sh@@ -7,9 +7,10 @@# In short:# - Open source. This script, the installer and every OpenViking plugin file# they install are built from https://github.com/volcengine/OpenViking-# (AGPL-3.0, 38,930 GitHub stars on 2026-09-29) by its release workflow.-# - It downloads the installer from the project's release bucket and runs it.-# No sudo. Nothing is written outside $HOME except a temp directory.+# (AGPL-3.0, 38,930 GitHub stars on 2026-09-29) by its GitHub Actions+# workflows.+# - It downloads the installer from the project's documentation site and runs+# it. No sudo. Nothing is written outside $HOME except a temp directory.# - The installer lists every change and asks before making any. With --yes# it prints the same list and proceeds.#@@ -36,11 +37,14 @@# The /install/<harness> variants differ only in the `harness=` line.## What this script does:-# 1. Downloads $OPENVIKING_TOS_BASE/memory-plugin-shared/install.sh-# (default base https://ovrelease.tos-cn-beijing.volces.com, the release-# bucket) into a new temp directory.-# 2. Refuses to run it unless line 1 is a shebang and the first lines name the-# OpenViking memory plugin installer.+# 1. Downloads memory-plugin-shared/install.sh into a new temp directory from+# https://docs.openviking.net/dl and https://docs.openviking.ai/dl at the+# same time. The two hosts serve the same documentation site and the same+# downloads; the copy that arrives first is used, and the installer takes+# the rest of its downloads from that host. OPENVIKING_DOWNLOAD_BASE names+# other locations.+# 2. Refuses to run a copy unless line 1 is a shebang and the first lines name+# the OpenViking memory plugin installer.# 3. Runs it with bash as `install.sh --dist tos [--harness <harness>] <your arguments>`,# reading input from the terminal, then deletes the temp directory and# exits with the installer's status.@@ -53,38 +57,68 @@harness=""-main() {- local base url input installer- base="${OPENVIKING_TOS_BASE:-https://ovrelease.tos-cn-beijing.volces.com}"- url="${base%/}/memory-plugin-shared/install.sh"+is_installer() {+ head -n 1 "$1" | grep -q '^#!' &&+ head -n 5 "$1" | grep -q 'OpenViking Memory Plugin shared installer'+}++# Leaves the installer in $workdir/install.sh and its location in $base.+fetch_installer() {+ local asked=0 seen=0 n+ # OPENVIKING_TOS_BASE is the name earlier installers read.+ # shellcheck disable=SC2086+ set -- ${OPENVIKING_DOWNLOAD_BASE:-${OPENVIKING_TOS_BASE:-https://docs.openviking.net/dl https://docs.openviking.ai/dl}}+ : >"$workdir/up"+ : >"$workdir/down"+ for base in "$@"; do+ asked=$((asked + 1))+ (+ if curl -fsSL --connect-timeout 10 -m 120 -o "$workdir/$asked.sh" "${base%/}/memory-plugin-shared/install.sh"; then+ printf '%s %s\n' "$asked" "${base%/}" >>"$workdir/up"+ else+ echo >>"$workdir/down"+ fi+ ) 2>"$workdir/$asked.err" &+ done+ while :; do+ while [ "$(wc -l <"$workdir/up")" -gt "$seen" ]; do+ seen=$((seen + 1))+ read -r n base <<LINE+$(sed -n "${seen}p" "$workdir/up")+LINE+ if is_installer "$workdir/$n.sh"; then+ mv "$workdir/$n.sh" "$workdir/install.sh"+ return 0+ fi+ echo "openviking: $base/memory-plugin-shared/install.sh is not the OpenViking installer." >&2+ done+ [ "$((seen + $(wc -l <"$workdir/down")))" -lt "$asked" ] || break+ sleep 0.1+ done+ cat "$workdir"/*.err >&2+ echo "openviking: could not download the installer from: $*" >&2+ return 1+}+main() {+ local input# A directory of its own: the installer looks for its helpers next to itself.# Global, not local: the EXIT trap runs after main has returned.workdir="$(mktemp -d "${TMPDIR:-/tmp}/openviking-install.XXXXXX")" || return 1trap 'rm -rf "$workdir"' EXIT- installer="$workdir/install.sh"-- if ! curl -fsSL "$url" -o "$installer"; then- echo "OpenViking: could not download $url" >&2- return 1- fi- if ! head -n 1 "$installer" | grep -q '^#!' ||- ! head -n 5 "$installer" | grep -q 'OpenViking Memory Plugin shared installer'; then- echo "OpenViking: $url did not return the installer script; not running it." >&2- return 1- fi+ fetch_installer || return 1+ export OPENVIKING_DOWNLOAD_BASE="$base"export OPENVIKING_INSTALL_SITE="${OPENVIKING_INSTALL_SITE:-https://openviking.net}"export OPENVIKING_INSTALLER_REEXEC=0if [ -n "$harness" ]; thenset -- --harness "$harness" "$@"fi- # Under `curl ... | bash` stdin is this script, so the installer's prompts need the terminal.input=/dev/nullif { true </dev/tty; } 2>/dev/null; theninput=/dev/ttyfi- bash "$installer" --dist tos "$@" <"$input"+ bash "$workdir/install.sh" --dist tos "$@" <"$input"}main "$@"diff --git a/examples/memory-plugin-shared/bootstrap.test.mjs b/examples/memory-plugin-shared/bootstrap.test.mjsindex 9de80b0f5..7dcbf9d2b 100644--- a/examples/memory-plugin-shared/bootstrap.test.mjs+++ b/examples/memory-plugin-shared/bootstrap.test.mjs@@ -16,12 +16,13 @@ const FAKE_INSTALLER = `#!/usr/bin/env bash# OpenViking Memory Plugin shared installer (test double).for arg in "$@"; do printf 'arg=[%s]\\n' "$arg"; doneecho "site=$OPENVIKING_INSTALL_SITE"+echo "base=$OPENVIKING_DOWNLOAD_BASE"echo "reexec=$OPENVIKING_INSTALLER_REEXEC"if [ -c /dev/stdin ]; then echo "stdin=device"; else echo "stdin=other"; fiexit "\${FAKE_EXIT:-0}"`;-async function withFixture(body, fn) {+async function serve(body) {const server = createServer((req, res) => {if (req.url !== "/memory-plugin-shared/install.sh") {res.writeHead(404).end();@@ -30,6 +31,11 @@ async function withFixture(body, fn) {res.writeHead(200, { "content-type": "text/plain" }).end(body);});await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));+ return server;+}++async function withFixture(body, fn) {+ const server = await serve(body);const root = mkdtempSync(join(tmpdir(), "openviking-bootstrap-"));const tmp = join(root, "tmp");mkdirSync(tmp);@@ -45,7 +51,7 @@ async function withFixture(body, fn) {// and /dev/tty cannot be opened, whatever terminal the test runner has.function run(args, { base, tmp, env = {}, stdin = "" }) {const { OPENVIKING_INSTALL_SITE, OPENVIKING_INSTALLER_REEXEC, ...inherited } = process.env;- const childEnv = { ...inherited, OPENVIKING_TOS_BASE: base, TMPDIR: tmp, ...env };+ const childEnv = { ...inherited, OPENVIKING_DOWNLOAD_BASE: base, TMPDIR: tmp, ...env };return new Promise((resolve, reject) => {const child = spawn("bash", args, { env: childEnv, detached: true });let stdout = "";@@ -105,7 +111,7 @@ test("refuses to run an HTML page served in place of the installer", async () =>const result = await run([bootstrap, "--yes"], fixture);assert.equal(result.status, 1);assert.equal(result.stdout, "");- assert.match(result.stderr, /did not return the installer script/);+ assert.match(result.stderr, /install\.sh is not the OpenViking installer/);assert.deepEqual(readdirSync(fixture.tmp), []);});});@@ -154,3 +160,34 @@ dir="$(cd "$(dirname "\${BASH_SOURCE[0]}")" && pwd -P)"assert.deepEqual(readdirSync(fixture.tmp), ["lib"]);});});++const PAGE = "<!doctype html>\n<html><body>OpenViking Memory Plugin shared installer</body></html>\n";++test("of several download locations, one that works serves the install", async () => {+ await withFixture(FAKE_INSTALLER, async (fixture) => {+ const page = await serve(PAGE);+ try {+ const others = ["http://127.0.0.1:1/dl/", `http://127.0.0.1:${page.address().port}`];+ for (const bases of [[...others, `${fixture.base}/`], [fixture.base, ...others]]) {+ const result = await run([bootstrap, "--yes"], { ...fixture, base: bases.join(" ") });+ assert.equal(result.status, 0, result.stderr);+ assert.deepEqual(argsOf(result.stdout), ["--dist", "tos", "--yes"]);+ assert.match(result.stdout, new RegExp(`^base=${fixture.base}$`, "m"), "the installer keeps downloading from it");+ assert.deepEqual(readdirSync(fixture.tmp), []);+ }+ } finally {+ page.close();+ }+ });+});++test("the download location can be given as OPENVIKING_TOS_BASE", async () => {+ await withFixture(FAKE_INSTALLER, async (fixture) => {+ const result = await run([bootstrap], {+ ...fixture,+ env: { OPENVIKING_DOWNLOAD_BASE: undefined, OPENVIKING_TOS_BASE: fixture.base },+ });+ assert.equal(result.status, 0, result.stderr);+ assert.match(result.stdout, new RegExp(`^base=${fixture.base}$`, "m"));+ });+});diff --git a/examples/memory-plugin-shared/install-agent-hooks.test.mjs b/examples/memory-plugin-shared/install-agent-hooks.test.mjsindex e393af84d..71a37acde 100644--- a/examples/memory-plugin-shared/install-agent-hooks.test.mjs+++ b/examples/memory-plugin-shared/install-agent-hooks.test.mjs@@ -48,6 +48,7 @@ function runInstaller(home, args, extraEnv = {}, script = installer) {HOME: home,OPENVIKING_HOME: join(home, ".openviking"),OPENVIKING_INSTALLER_REEXEC: "0",+ OPENVIKING_DOWNLOAD_BASE: "https://downloads.example.invalid",OPENVIKING_SKIP_VERSION_CHECK: "1",...extraEnv,},@@ -578,7 +579,7 @@ test("uninstall with no installer runtime on disk removes what it can and fetcheforce: true,});const result = runInstaller(home, ["--harness", "cursor", "--uninstall", "--lang", "en", "--yes"], {- OPENVIKING_TOS_BASE: "file:///nonexistent",+ OPENVIKING_DOWNLOAD_BASE: "file:///nonexistent",}, detached);const output = `${result.stdout}\n${result.stderr}`;assert.equal(result.status, 0, output);diff --git a/examples/memory-plugin-shared/install-opencode-jsonc.test.mjs b/examples/memory-plugin-shared/install-opencode-jsonc.test.mjsindex b99296537..92352fac0 100644--- a/examples/memory-plugin-shared/install-opencode-jsonc.test.mjs+++ b/examples/memory-plugin-shared/install-opencode-jsonc.test.mjs@@ -218,6 +218,7 @@ for (const sourceMode of ["dev", "archive"]) {HOME: home,OPENVIKING_HOME: join(home, ".openviking"),OPENVIKING_MARKETPLACE_ARCHIVE_URL: `file://${join(dir, "memory-plugin-marketplace.zip")}`,+ OPENVIKING_DOWNLOAD_BASE: "https://downloads.example.invalid",OPENVIKING_SKIP_VERSION_CHECK: "1",PATH: `${bin}:${process.env.PATH}`,},diff --git a/examples/memory-plugin-shared/install-sources.test.mjs b/examples/memory-plugin-shared/install-sources.test.mjsindex 17846c1c3..95176f36b 100644--- a/examples/memory-plugin-shared/install-sources.test.mjs+++ b/examples/memory-plugin-shared/install-sources.test.mjs@@ -51,7 +51,7 @@ function installEnv(home, bin, extraEnv) {HOME: home,PATH: `${bin}:${process.env.PATH}`,OPENVIKING_HOME: join(home, ".openviking"),- OPENVIKING_TOS_BASE: `file://${tosBase}`,+ OPENVIKING_DOWNLOAD_BASE: `file://${tosBase}`,OPENVIKING_MARKETPLACE_ARCHIVE_URL: "",OPENVIKING_INSTALLER_REEXEC: "0",OPENVIKING_REPO_URL: "",@@ -134,7 +134,7 @@ test("a GitHub-channel Claude install moves to TOS, and its statusline follows tconst result = run(home, bin, ["--harness", "claude", "--lang", "en","--url", "http://127.0.0.1:9", "--api-key", "", "--yes", ...extra,- ], { OPENVIKING_TOS_BASE: "https://tos.example.invalid" });+ ], { OPENVIKING_DOWNLOAD_BASE: "https://tos.example.invalid" });assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`);return result;};@@ -221,7 +221,7 @@ exit 0const result = run(home, bin, ["--harness", "claude", "--lang", "en", "--url", "http://127.0.0.1:9", "--api-key", "", "--yes",- ], { OPENVIKING_TOS_BASE: "https://tos.example.invalid" });+ ], { OPENVIKING_DOWNLOAD_BASE: "https://tos.example.invalid" });assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`);assert.match(result.stdout, /Skipping claude: it has no 'plugin' command\. The plugin needs Claude Code 2\.0 or newer/);// Neither the review nor the next steps offer commands it cannot run.@@ -250,7 +250,7 @@ exit 0}// The fake leaves no plugin cache behind, which validation has to tolerate.-test("Codex moves to the TOS git marketplace, falls back to the bundle, and says how it updates", () => {+test("Codex moves to the git marketplace, falls back to the bundle, and says how it updates", () => {const home = mkdtempSync(join(work, "home-"));const bin = join(home, "bin");const fake = join(home, "fake-codex");@@ -266,7 +266,7 @@ test("Codex moves to the TOS git marketplace, falls back to the bundle, and saysreturn { stdout: result.stdout, calls: readFileSync(join(fake, "calls.log"), "utf8").split("\n") };};- // A marketplace the GitHub channel registered is re-registered from TOS.+ // A marketplace the GitHub channel registered is re-registered from the download location.writeFileSync(join(fake, "marketplaces.json"), JSON.stringify({marketplaces: [{ name: "openviking", marketplaceSource: { source: "https://github.com/volcengine/OpenViking.git" } }],}));@@ -281,11 +281,40 @@ test("Codex moves to the TOS git marketplace, falls back to the bundle, and says// A git marketplace that cannot be added gives way to the bundle's directory.rmSync(join(fake, "marketplaces.json"));const fallback = install({ FAKE_CODEX_GIT_FAILS: "1" });- assert.match(fallback.stdout, /TOS git marketplace unavailable; falling back to the archive directory/);+ assert.match(fallback.stdout, /Git marketplace unavailable; falling back to the archive directory/);assert.ok(fallback.calls.includes(`plugin marketplace add ${join(home, ".openviking", "memory-plugin-marketplace")}`), fallback.calls.join("\n"));assert.match(fallback.stdout, /Codex\n {4}Next: .*\n {4}Updates: re-run this installer\n/);});+test("of several download locations, the first to answer serves the whole install", () => {+ const home = mkdtempSync(join(work, "home-"));+ const bin = join(home, "bin");+ const fake = join(home, "fake-codex");+ mkdirSync(bin);+ mkdirSync(fake);+ writeFakeCodex(bin, fake);+ const base = join(home, "dl");+ mkdirSync(join(base, "plugins", "claude"), { recursive: true });+ writeFileSync(join(base, "plugins", "claude", "marketplace.json"), "{}");+ const args = ["--harness", "codex", "--lang", "en", "--url", "http://127.0.0.1:9", "--api-key", "", "--yes"];++ for (const bases of [`http://127.0.0.1:1/dl file://${base}/`, `file://${base} http://127.0.0.1:1/dl`]) {+ rmSync(join(fake, "calls.log"), { force: true });+ rmSync(join(fake, "marketplaces.json"), { force: true });+ const result = run(home, bin, args, { OPENVIKING_DOWNLOAD_BASE: bases });+ assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`);+ const calls = readFileSync(join(fake, "calls.log"), "utf8").split("\n");+ assert.ok(calls.includes(`plugin marketplace add file://${base}/plugins/memory-plugins.git`), calls.join("\n"));+ }++ // With none answering, the first one is named in what fails.+ const none = run(home, bin, ["--harness", "cursor", "--lang", "en", "--url", "http://127.0.0.1:9", "--api-key", "", "--yes"], {+ OPENVIKING_DOWNLOAD_BASE: "http://127.0.0.1:1/dl http://127.0.0.1:1/other",+ });+ assert.equal(none.status, 1, `${none.stdout}\n${none.stderr}`);+ assert.match(none.stdout + none.stderr, /http:\/\/127\.0\.0\.1:1\/dl\/releases\/latest\/memory-plugin-marketplace\.zip/);+});+// macOS ships bash 3.2 as /bin/bash, which runs the ERR trap for a failing// `command <program>` even where the failure is handled.test("a handled CLI failure neither reports itself nor disarms the error report", () => {@@ -333,7 +362,7 @@ test("Claude Code and Codex files go where CLAUDE_CONFIG_DIR and CODEX_HOME poinconst result = run(home, bin, ["--harness", "claude,codex", "--lang", "en", "--url", "http://127.0.0.1:9", "--api-key", "", "--statusline", "--yes",- ], { OPENVIKING_TOS_BASE: "https://tos.example.invalid", CLAUDE_CONFIG_DIR: claudeDir, CODEX_HOME: codexDir });+ ], { OPENVIKING_DOWNLOAD_BASE: "https://tos.example.invalid", CLAUDE_CONFIG_DIR: claudeDir, CODEX_HOME: codexDir });assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`);const settings = JSON.parse(readFileSync(join(claudeDir, "settings.json"), "utf8"));@@ -400,7 +429,7 @@ test("a copy that is not a release build runs the release installer", () => {// helpers, so the release copy runs alone in a directory it then removes.const tmp = join(home, "tmp");mkdirSync(join(tmp, "lib", "install"), { recursive: true });- const reexec = { OPENVIKING_INSTALLER_REEXEC: "", OPENVIKING_TOS_BASE: `file://${join(home, "tos")}`, TMPDIR: tmp };+ const reexec = { OPENVIKING_INSTALLER_REEXEC: "", OPENVIKING_DOWNLOAD_BASE: `file://${join(home, "tos")}`, TMPDIR: tmp };writeFileSync(release, ["#!/usr/bin/env bash",@@ -504,6 +533,25 @@ exit 0assert.ok(existsSync(join(home, ".openviking", "agent-integrations", "cursor", "scripts", "hook.mjs")));});+test("an answer naming another download location is read from the one in use", async () => {+ const { home, bin, downloads } = resolverHome();+ const other = "http://127.0.0.1:1/dl";+ const env = { ...siteEnv, OPENVIKING_DOWNLOAD_BASE: `file://${tosBase} ${other}/` };++ answers = { cursor: bundleAnswer({ bundle_url: `${other}/releases/v9.9.9/memory-plugin-marketplace.zip`, source_url: `${other}/source.zip` }) };+ const pinned = await runAsync(home, bin, cursorArgs, env);+ assert.equal(pinned.status, 0, `${pinned.stdout}\n${pinned.stderr}`);+ assert.deepEqual(downloads().map((line) => line.split(" ").pop()), [`file://${pinnedZip}`]);++ // The docs site's channel data carries no checksum: its version is shown+ // and the latest bundle is installed.+ answers = { cursor: { status: 200, body: { schema: 1, harness: "cursor", version: "20260929-0123456789", bundle_url: `${other}/releases/latest/memory-plugin-marketplace.zip` } } };+ const latest = await runAsync(home, bin, cursorArgs, env);+ assert.equal(latest.status, 0, `${latest.stdout}\n${latest.stderr}`);+ assert.match(latest.stdout, /Release: 20260929-0123456789/);+ assert.equal(downloads().pop().split(" ").pop(), latestZip);+});+test("an unavailable or untrusted resolver answer falls back to the latest release without a word", async () => {for (const answer of [{ status: 503, body: { error: "unavailable" } },diff --git a/examples/memory-plugin-shared/install-tui.test.mjs b/examples/memory-plugin-shared/install-tui.test.mjsindex be55e3863..39cf8e87a 100644--- a/examples/memory-plugin-shared/install-tui.test.mjs+++ b/examples/memory-plugin-shared/install-tui.test.mjs@@ -464,7 +464,7 @@ function detachedInstaller(t, transform = (source) => source) {HOME: home,PATH: `${bin}:${process.env.PATH}`,OPENVIKING_HOME: join(home, ".openviking"),- OPENVIKING_TOS_BASE: "https://tos.example.invalid",+ OPENVIKING_DOWNLOAD_BASE: "https://tos.example.invalid",OPENVIKING_INSTALLER_REEXEC: "0",OPENVIKING_SKIP_VERSION_CHECK: "1",},@@ -530,7 +530,7 @@ test("a non-interactive run with no server says so and how to re-run", (t) => {assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`);assert.match(result.stdout, notice);assert.ok(result.stdout.indexOf("Review") < result.stdout.search(notice));- assert.match(result.stdout, /install\.sh\) --yes --harness dsh --url <server-url> --api-key <api-key>/);+ assert.match(result.stdout, /curl -fsSL https:\/\/openviking\.net\/install \| bash -s -- --yes --harness dsh --url <server-url> --api-key <api-key>/);assert.match(result.stdout, /\[4\/4\] Validation/);assert.match(result.stdout, /DeepSeek Harness\n {4}Next: .*\n {4}Updates: re-run this installer\n {4}Uninstall: dsh plugin --profile web rm @openviking\/dsh-memory-plugin/);assert.equal(JSON.parse(readFileSync(join(home, ".openviking", "ovcli.conf"), "utf8")).url, "http://127.0.0.1:1933");diff --git a/examples/memory-plugin-shared/install.sh b/examples/memory-plugin-shared/install.shindex ae33c6167..47dbf8b3c 100644--- a/examples/memory-plugin-shared/install.sh+++ b/examples/memory-plugin-shared/install.sh@@ -7,7 +7,7 @@# In short:# - Open source. This script and every OpenViking plugin file it installs are# built from https://github.com/volcengine/OpenViking (AGPL-3.0, 38,930-# GitHub stars on 2026-09-29) by its release workflow.+# GitHub stars on 2026-09-29) by its GitHub Actions workflows.# - It installs the OpenViking memory plugin into the agents you pick and# points it at your OpenViking server.# - It lists every change and asks before making any. With --yes, or without@@ -15,8 +15,9 @@# settings nothing is written outside $HOME except temporary files.## Install without prompts:-# bash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh) \-# --yes --url <server-url> --api-key <api-key>+# curl -fsSL https://openviking.net/install | bash -s -- --yes --url <server-url> --api-key <api-key>+# (https://openviking.net/install is a short script that downloads this one and+# runs it; https://openviking.ai/install serves the same.)# The server URL and API key come from the user; without them it uses an# existing ~/.openviking/ovcli.conf, then http://127.0.0.1:1933 without a key.# It installs into the agents it detects (claude,codex when it detects none);@@ -32,16 +33,20 @@# installs from the plugin bundle.## Hosts it contacts:-# ovrelease.tos-cn-beijing.volces.com The OpenViking release: this script,-# the plugin bundle (memory-plugin-marketplace.zip), the Claude Code URL-# marketplace and the Codex git marketplace. Claude Code and Codex fetch-# their marketplace themselves, at install and on their own update checks.+# docs.openviking.net, docs.openviking.ai The documentation site, which+# serves the downloads under /dl from both hosts: this script, the plugin+# bundle (memory-plugin-marketplace.zip), the Claude Code URL marketplace+# and the Codex git marketplace. It asks both for one small file and+# uses the host that answers first. Claude Code and Codex fetch their+# marketplace from that host themselves, at install and on their own+# update checks.# openviking.net The version check described below.# The OpenViking server given: GET /health, and /api/v1/system/status with# the API key.# The npm registry npm is configured with: pi's dependencies (npm ci) and# the dsh package (dsh plugin add).-# The script itself never contacts GitHub and never runs git.+# docs.openviking.ai is hosted on GitHub Pages. The script itself never+# contacts github.com and never runs git.## What it writes:# every run ~/.openviking/ovcli.conf (the previous one kept as .bak.<time>)@@ -67,40 +72,44 @@# asks https://openviking.net/install/v1/<harness>.json which release to# install, once per selected harness. OPENVIKING_SKIP_VERSION_CHECK=1 skips the# check and installs the latest release, which is also what happens when the-# check fails.+# check fails. The docs site holds the latest release only, so there the answer+# names it.## Run from a repository checkout, it installs that checkout's plugins and skips# the release (--source archive installs the release instead). A copy that is-# neither a release build nor part of a checkout downloads and runs the release-# copy of this script.+# neither a published build nor part of a checkout downloads and runs the+# published copy of this script.## Uninstall: Cursor, TRAE, TRAE CN, ZCode and Kimi Code with-# bash <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh) --uninstall --yes --harness <list>+# curl -fsSL https://openviking.net/install | bash -s -- --uninstall --yes --harness <list># The other harnesses with the commands the install prints at the end, such as# claude plugin uninstall openviking-memory@openviking && claude plugin marketplace remove openviking## Optional check of this script (needs github.com; the install does not): a-# release copy is the file examples/memory-plugin-shared/install.sh of the-# repository at the tag the release was built from, with only the-# INSTALLER_VERSION line changed to that tag without its leading v. For the-# usual tag v<version>:-# diff <(curl -fsSL https://ovrelease.tos-cn-beijing.volces.com/memory-plugin-shared/install.sh) \-# <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/v<version>/examples/memory-plugin-shared/install.sh)+# published copy is the file examples/memory-plugin-shared/install.sh of the+# repository at the commit it was built from, with only the INSTALLER_VERSION+# line changed. The docs site publishes it on every change to the main branch+# as <date>-<commit>, so for the commit at the end of INSTALLER_VERSION:+# diff <(curl -fsSL https://docs.openviking.net/dl/memory-plugin-shared/install.sh) \+# <(curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/<commit>/examples/memory-plugin-shared/install.sh)# Star count today: gh api repos/volcengine/OpenViking --jq .stargazers_count# Documentation: https://docs.openviking.net or https://docs.openviking.aiset -Eeuo pipefail-# Replaced with the release version when the release pipeline publishes this file.+# Replaced with the published version when a pipeline publishes this file.INSTALLER_VERSION="dev"OV_HOME="${OPENVIKING_HOME:-$HOME/.openviking}"MKT_ARCHIVE_URL="${OPENVIKING_MARKETPLACE_ARCHIVE_URL:-}"-TOS_BASE="${OPENVIKING_TOS_BASE:-https://ovrelease.tos-cn-beijing.volces.com}"-TOS_BASE="${TOS_BASE%/}"-CODEX_TOS_GIT_URL="${OPENVIKING_CODEX_TOS_GIT_URL:-$TOS_BASE/plugins/memory-plugins.git}"+# The docs site serves the downloads from two hosts with the same content.+# OPENVIKING_TOS_BASE is the name earlier installers read.+DOWNLOAD_BASES="${OPENVIKING_DOWNLOAD_BASE:-${OPENVIKING_TOS_BASE:-https://docs.openviking.net/dl https://docs.openviking.ai/dl}}"+DOWNLOAD_BASE="" # the one of them in use; set by select_download_base+CODEX_GIT_URL="" # set by select_download_base+CC_MARKETPLACE_URL="" # set by select_download_baseINSTALL_SITE="${OPENVIKING_INSTALL_SITE:-https://openviking.net}"INSTALL_SITE="${INSTALL_SITE%/}"-CC_TOS_MARKETPLACE_URL="${OPENVIKING_CLAUDE_TOS_MARKETPLACE_URL:-$TOS_BASE/plugins/claude/marketplace.json}"+INSTALL_COMMAND="curl -fsSL $INSTALL_SITE/install | bash -s --"# First Claude Code release with the `archive` plugin source.CC_ARCHIVE_SOURCE_MIN_VERSION="2.1.224"ARCHIVE_MARKER='.openviking-archive-source'@@ -228,9 +237,11 @@ Environment:OPENVIKING_CLAUDE_BINS Same as --claude-bin.OPENVIKING_CODEX_BINS Same as --codex-bin.OPENVIKING_DSH_PROFILE Same as --dsh-profile.- OPENVIKING_TOS_BASE Release location (default: https://ovrelease.tos-cn-beijing.volces.com).+ OPENVIKING_DOWNLOAD_BASE Download locations, separated by spaces; the first to answer is used+ (default: https://docs.openviking.net/dl https://docs.openviking.ai/dl).+ OPENVIKING_TOS_BASE is read as well.OPENVIKING_MARKETPLACE_ARCHIVE_URL Plugin bundle to install instead of the release's; not checksum-verified.- OPENVIKING_CLAUDE_TOS_MARKETPLACE_URL Claude Code URL marketplace to register.+ OPENVIKING_CLAUDE_MARKETPLACE_URL Claude Code URL marketplace to register.OPENVIKING_CODEX_TOS_GIT_URL Codex git marketplace to register.OPENVIKING_INSTALL_SITE Site the version check asks which release to install (default: https://openviking.net).OPENVIKING_SKIP_VERSION_CHECK Any value but 0 skips the version check; the latest release is installed.@@ -1482,6 +1493,40 @@ resolve_self_checkout() {fi}+# Sets DOWNLOAD_BASE and the marketplace URLs under it. The download locations+# are asked for the same small file at once and the first to answer serves the+# whole install: it is the one that is near, and Claude Code and Codex keep its+# marketplace URL for their own updates.+select_download_base() {+ [ -z "$DOWNLOAD_BASE" ] || return 0+ local dir base asked=0+ # shellcheck disable=SC2086+ set -- $DOWNLOAD_BASES+ if [ "$#" -gt 1 ] && command -v curl >/dev/null 2>&1 \+ && dir="$(mktemp -d "${TMPDIR:-/tmp}/ov-base.XXXXXX")"; then+ : >"$dir/up"; : >"$dir/down"+ for base in "$@"; do+ asked=$((asked + 1))+ (+ if curl -fsS -m 5 -o /dev/null "${base%/}/plugins/claude/marketplace.json"; then+ printf '%s\n' "$base" >>"$dir/up"+ else+ echo >>"$dir/down"+ fi+ ) >/dev/null 2>&1 &+ done+ while [ ! -s "$dir/up" ] && [ "$(wc -l <"$dir/down")" -lt "$asked" ]; do+ sleep 0.1+ done+ IFS= read -r DOWNLOAD_BASE <"$dir/up" || true+ rm -rf "$dir"+ fi+ [ -n "$DOWNLOAD_BASE" ] || DOWNLOAD_BASE="$1"+ DOWNLOAD_BASE="${DOWNLOAD_BASE%/}"+ CODEX_GIT_URL="${OPENVIKING_CODEX_TOS_GIT_URL:-$DOWNLOAD_BASE/plugins/memory-plugins.git}"+ CC_MARKETPLACE_URL="${OPENVIKING_CLAUDE_MARKETPLACE_URL:-$DOWNLOAD_BASE/plugins/claude/marketplace.json}"+}+# A copy that is neither a release build nor part of a checkout (one fetched# from GitHub, say) would run against helpers and plugins from the release# bundle. Running the release copy instead keeps the script and the bundle on@@ -1490,13 +1535,15 @@ reexec_release_installer() { # reexec_release_installer <original-args...>[ "$INSTALLER_VERSION" = "dev" ] && [ -z "$CHECKOUT_DIR" ] \&& [ "${OPENVIKING_INSTALLER_REEXEC:-}" != "0" ] || return 0local dir status=0+ select_download_base# A directory of its own: install_lib_dir takes a lib/install found beside# the running script.dir="$(mktemp -d "${TMPDIR:-/tmp}/ov-install.XXXXXX")" || return 0- if curl -fsSL --connect-timeout 10 -o "$dir/install.sh" "$TOS_BASE/memory-plugin-shared/install.sh" 2>/dev/null; then+ if curl -fsSL --connect-timeout 10 -o "$dir/install.sh" "$DOWNLOAD_BASE/memory-plugin-shared/install.sh" 2>/dev/null; thencase "$(head -n 5 "$dir/install.sh")" in'#!'*'OpenViking Memory Plugin shared installer'*)- OPENVIKING_INSTALLER_REEXEC=0 bash "$dir/install.sh" --dist tos "$@" || status=$?+ OPENVIKING_INSTALLER_REEXEC=0 OPENVIKING_DOWNLOAD_BASE="$DOWNLOAD_BASE" \+ bash "$dir/install.sh" --dist tos "$@" || status=$?rm -rf "$dir"exit "$status";;@@ -1532,8 +1579,9 @@ EOF}# Asks the install site which release to install, one request per harness in-# parallel. Anything short of a well-formed answer that points into the TOS-# bucket keeps the built-in latest-release URLs, without a word: the answer+# parallel. The answer names one download location; the same paths are read+# from the one in use. Anything short of a well-formed answer that points into+# a download location keeps the built-in latest-release URLs, without a word: the answer# only pins the release and must never slow down or break the install.resolve_release() {[ "$SOURCE_MODE" = "archive" ] || return 0@@ -1555,19 +1603,21 @@ EOFversion) RELEASE_VERSION="$value" ;;bundle_url) BUNDLE_URL="$value" ;;sha256) BUNDLE_SHA256="$value" ;;- git_url) [ -n "${OPENVIKING_CODEX_TOS_GIT_URL:-}" ] || CODEX_TOS_GIT_URL="$value" ;;+ git_url) [ -n "${OPENVIKING_CODEX_TOS_GIT_URL:-}" ] || CODEX_GIT_URL="$value" ;;esacdone <<EOF$(node -e 'const fs = require("node:fs");- const [dir, prefix, names] = process.argv.slice(1);+ const [dir, base, bases, names] = process.argv.slice(1);+ const known = bases.split(/\s+/).filter(Boolean).map((b) => b.replace(/\/+$/, "") + "/");const out = {};for (const name of names.split("\n").filter(Boolean)) {let r;try { r = JSON.parse(fs.readFileSync(dir + "/" + name + ".json", "utf8")); } catch { continue; }if (!r || r.schema !== 1) continue;const urls = Object.keys(r).filter((k) => k.endsWith("_url"));- if (urls.some((k) => typeof r[k] !== "string" || !r[k].startsWith(prefix) || /\s/.test(r[k]))) continue;+ if (urls.some((k) => typeof r[k] !== "string" || /\s/.test(r[k]) || !known.some((b) => r[k].startsWith(b)))) continue;+ for (const k of urls) r[k] = base + "/" + r[k].slice(known.find((b) => r[k].startsWith(b)).length);if (!out.version && typeof r.version === "string" && /^[\w.+-]+$/.test(r.version)) out.version = r.version;if (!out.bundle_url && r.bundle_url && /^[0-9a-f]{64}$/i.test(r.sha256 ?? "")) {out.bundle_url = r.bundle_url;@@ -1576,7 +1626,7 @@ $(node -e 'if (!out.git_url && r.git_url) out.git_url = r.git_url;}for (const [key, value] of Object.entries(out)) process.stdout.write(key + "=" + value + "\n");-' "$dir" "$TOS_BASE/" "$names" 2>/dev/null || true)+' "$dir" "$DOWNLOAD_BASE" "$DOWNLOAD_BASES" "$names" 2>/dev/null || true)EOFrm -rf "$dir"}@@ -1619,7 +1669,7 @@ ensure_bundle() {if [ "$SOURCE_MODE" = "dev" ]; thenMKT_DIR="$CHECKOUT_DIR/examples"else- local url="${BUNDLE_URL:-$TOS_BASE/releases/latest/memory-plugin-marketplace.zip}" sha256="$BUNDLE_SHA256"+ local url="${BUNDLE_URL:-$DOWNLOAD_BASE/releases/latest/memory-plugin-marketplace.zip}" sha256="$BUNDLE_SHA256"if [ -n "$MKT_ARCHIVE_URL" ]; thenurl="$MKT_ARCHIVE_URL"sha256=""@@ -1681,7 +1731,7 @@ require_install_lib_dir() {# ---------------------------------------------------------------------------CLAUDE_BIN="claude"-CLAUDE_URL_BINS="" # Claude-format CLIs registered on the TOS URL marketplace+CLAUDE_URL_BINS="" # Claude-format CLIs registered on the URL marketplaceis_native_claude_bin() {[ "$(bin_basename "$CLAUDE_BIN")" = "claude" ]@@ -1750,15 +1800,20 @@ claude_marketplace_sync() { # claude_marketplace_sync <source>}}-# The TOS URL marketplace lists the plugin as an `archive` source (a zip over+# The URL marketplace lists the plugin as an `archive` source (a zip over# HTTPS). Custom Claude-format CLIs don't share Claude Code's version line, so# only the native command qualifies, and a custom one that already lists the# URL marketplace, such as a wrapper sharing Claude Code's config: replacing it# with the directory marketplace would turn off auto-update for Claude Code too.claude_supports_archive_source() {if ! is_native_claude_bin; then- [ "$(claude_marketplace_current_source)" = "$CC_TOS_MARKETPLACE_URL" ] || return 1- return 0+ local current base+ current="$(claude_marketplace_current_source)"+ [ "$current" != "$CC_MARKETPLACE_URL" ] || return 0+ for base in $DOWNLOAD_BASES; do+ [ "$current" != "${base%/}/plugins/claude/marketplace.json" ] || return 0+ done+ return 1filocal versionversion="$(claude_cmd --version 2>/dev/null || true)"@@ -1893,7 +1948,7 @@ claude_install_plugin() {fi}-# Claude Code's shallow clones can't use the TOS dumb-HTTP git repo, but a URL+# Claude Code's shallow clones can't use the dumb-HTTP git repo, but a URL# marketplace whose entry downloads the plugin zip installs and auto-updates# with no git at all. Registering it already removed any earlier registration# and its plugin, so an install that fails from it falls back as well.@@ -1909,15 +1964,15 @@ install_claude() {filocal url=0if [ "$SOURCE_MODE" = "archive" ] && claude_supports_archive_source; then- if claude_marketplace_sync "$CC_TOS_MARKETPLACE_URL" && claude_install_plugin; then+ if claude_marketplace_sync "$CC_MARKETPLACE_URL" && claude_install_plugin; thenurl=1else- warn "$(t 'TOS marketplace unavailable; falling back to the archive directory.' 'TOS marketplace 不可用,回退到归档目录方式。')"+ warn "$(t 'URL marketplace unavailable; falling back to the archive directory.' 'URL marketplace 不可用,回退到归档目录方式。')"fifiif [ "$url" -eq 1 ]; thenif is_native_claude_bin; then- claude_enable_marketplace_autoupdate "$CC_TOS_MARKETPLACE_URL"+ claude_enable_marketplace_autoupdate "$CC_MARKETPLACE_URL"fiCLAUDE_URL_BINS="$(append_csv_list "$CLAUDE_URL_BINS" "$CLAUDE_BIN")"else@@ -1937,7 +1992,7 @@ install_claude() {# ---------------------------------------------------------------------------CODEX_BIN="codex"-CODEX_GIT_BINS="" # Codex-format CLIs registered on the TOS git marketplace+CODEX_GIT_BINS="" # Codex-format CLIs registered on the git marketplaceis_native_codex_bin() {[ "$(bin_basename "$CODEX_BIN")" = "codex" ]@@ -2066,10 +2121,10 @@ install_codex() {return 0}# Codex clones git marketplaces served over dumb HTTP from static hosting,- # so the TOS release carries a slim marketplace git repo that Codex upgrades.- if [ "$SOURCE_MODE" = "dev" ] || ! codex_marketplace_sync "$CODEX_TOS_GIT_URL" 2>/dev/null; then+ # so the release carries a slim marketplace git repo that Codex upgrades.+ if [ "$SOURCE_MODE" = "dev" ] || ! codex_marketplace_sync "$CODEX_GIT_URL" 2>/dev/null; then[ "$SOURCE_MODE" = "dev" ] \- || warn "$(t 'TOS git marketplace unavailable; falling back to the archive directory.' 'TOS git marketplace 不可用,回退到归档目录方式。')"+ || warn "$(t 'Git marketplace unavailable; falling back to the archive directory.' 'Git marketplace 不可用,回退到归档目录方式。')"ensure_bundlecodex_marketplace_sync "$MKT_DIR" || {err "$CODEX_BIN plugin marketplace add failed"@@ -2861,7 +2916,7 @@ print_plan() {command -v "$CLAUDE_BIN" >/dev/null 2>&1 || continuehas_plugin_subcommand || continueif [ "$SOURCE_MODE" = "archive" ] && claude_supports_archive_source; then- plan_item "$CLAUDE_BIN plugin marketplace add/update $CC_TOS_MARKETPLACE_URL ($fallback)"+ plan_item "$CLAUDE_BIN plugin marketplace add/update $CC_MARKETPLACE_URL ($fallback)"elseplan_item "$CLAUDE_BIN plugin marketplace add/update $bundle"fi@@ -2880,7 +2935,7 @@ EOF[ -n "$CODEX_BIN" ] || continuecommand -v "$CODEX_BIN" >/dev/null 2>&1 || continueif [ "$SOURCE_MODE" = "archive" ]; then- plan_item "$CODEX_BIN plugin marketplace add/upgrade $CODEX_TOS_GIT_URL ($fallback)"+ plan_item "$CODEX_BIN plugin marketplace add/upgrade $CODEX_GIT_URL ($fallback)"elseplan_item "$CODEX_BIN plugin marketplace add/upgrade $bundle"fi@@ -2942,8 +2997,8 @@ warn_default_connection() {printf '\n'warn "${BOLD}$(t 'No server was given: the plugin is configured for http://127.0.0.1:1933 without an API key.' '未指定服务:插件将连接 http://127.0.0.1:1933,且不带 API key。')${RESET}"warn "$(t 'To use another server, re-run with its URL and API key:' '如需连接其他服务,请带上服务地址和 API key 重新运行:')"- printf ' bash <(curl -fsSL %s/memory-plugin-shared/install.sh) --yes --harness %s%s --url <server-url> --api-key <api-key>\n\n' \- "$TOS_BASE" "${PUBLIC_SELECTED_HARNESSES:-$SELECTED_HARNESSES}" "$bins"+ printf ' %s --yes --harness %s%s --url <server-url> --api-key <api-key>\n\n' \+ "$INSTALL_COMMAND" "${PUBLIC_SELECTED_HARNESSES:-$SELECTED_HARNESSES}" "$bins"}confirm_plan() {@@ -2965,7 +3020,7 @@ next_steps() { # next_steps <name> <next> <updates> <verify> <uninstall>print_next_steps() {local label updates rerun uninstall doctor client removererun="$(t 're-run this installer' '重新运行本安装脚本')"- uninstall="bash <(curl -fsSL $TOS_BASE/memory-plugin-shared/install.sh) --uninstall --yes --harness"+ uninstall="$INSTALL_COMMAND --uninstall --yes --harness"heading "$(t 'Done' '完成')"if [ -n "$RELEASE_VERSION" ]; then info "$(t 'Release:' '发布版本:') $RELEASE_VERSION"; fiinfo "$(t 'Credentials:' '凭据:') $OVCLI_CONF"@@ -3058,6 +3113,7 @@ if [ "$UNINSTALL" -eq 1 ]; thenexit 0firesolve_source_mode+if [ "$SOURCE_MODE" = "archive" ]; then select_download_base; ficount_stepsgather_credentialscheck_serverdiff --git a/examples/memory-plugin-shared/release-marketplace.test.mjs b/examples/memory-plugin-shared/release-marketplace.test.mjsindex c66aae2d6..989af6a70 100644--- a/examples/memory-plugin-shared/release-marketplace.test.mjs+++ b/examples/memory-plugin-shared/release-marketplace.test.mjs@@ -17,6 +17,7 @@ const claudeMarketplaceScript = join(ROOT, ".github", "scripts", "generate-claudconst stampScript = join(ROOT, ".github", "scripts", "stamp-installer-version.sh");const publishGitScript = join(ROOT, ".github", "scripts", "publish-dumb-git-repo.sh");const zipScript = join(ROOT, ".github", "scripts", "reproducible-zip.sh");+const downloadsScript = join(ROOT, ".github", "scripts", "build-plugin-downloads.sh");function run(command, args, options = {}) {return spawnSync(command, args, {@@ -55,7 +56,7 @@ exit 0`, { mode: 0o755 });}-test("Claude URL marketplace lists the release's plugin zip as an archive source", () => {+test("Claude URL marketplace lists the published plugin zip as an archive source", () => {const tmp = mkdtempSync(join(tmpdir(), "openviking-claude-marketplace-"));try {const { stage } = stageMarketplaceZip(tmp);@@ -63,7 +64,8 @@ test("Claude URL marketplace lists the release's plugin zip as an archive sourceconst zipped = run("zip", ["-rq", pluginZip, "claude-code-memory-plugin"], { cwd: stage });assert.equal(zipped.status, 0, `${zipped.stdout}\n${zipped.stderr}`);const out = join(tmp, "marketplace.json");- const generated = run("bash", [claudeMarketplaceScript, "v9.9.9", "https://tos.example.invalid/", pluginZip, stage, out]);+ const zipUrl = "https://tos.example.invalid/releases/v9.9.9/openviking-memory-claude.zip";+ const generated = run("bash", [claudeMarketplaceScript, zipUrl, pluginZip, stage, out]);assert.equal(generated.status, 0, `${generated.stdout}\n${generated.stderr}`);const manifest = JSON.parse(readFileSync(out, "utf8"));@@ -76,7 +78,7 @@ test("Claude URL marketplace lists the release's plugin zip as an archive sourceassert.equal(entry.version, pluginJson.version);assert.deepEqual(entry.source, {source: "archive",- url: "https://tos.example.invalid/releases/v9.9.9/openviking-memory-claude.zip",+ url: zipUrl,sha256: createHash("sha256").update(readFileSync(pluginZip)).digest("hex"),});@@ -116,7 +118,7 @@ test("TOS installs register Claude Code's URL marketplace when the CLI supportsHOME: home,PATH: `${bin}:${process.env.PATH}`,OPENVIKING_HOME: join(home, ".openviking"),- OPENVIKING_TOS_BASE: "https://tos.example.invalid",+ OPENVIKING_DOWNLOAD_BASE: "https://tos.example.invalid",OPENVIKING_MARKETPLACE_ARCHIVE_URL: `file://${zip}`,OPENVIKING_SKIP_VERSION_CHECK: "1",FAKE_CLAUDE_DIR: fake,@@ -154,7 +156,7 @@ test("TOS installs register Claude Code's URL marketplace when the CLI supportsassert.equal(readSettings().extraKnownMarketplaces.openviking.autoUpdate, false);// Unreachable URL marketplace: fall back to the unpacked archive.- const failed = install("2.1.284", { FAKE_CLAUDE_URL_FAILS: "1", OPENVIKING_TOS_BASE: "https://other.example.invalid" });+ const failed = install("2.1.284", { FAKE_CLAUDE_URL_FAILS: "1", OPENVIKING_DOWNLOAD_BASE: "https://other.example.invalid" });log = calls();assert.ok(log.includes(`plugin marketplace add ${archiveDir}`), log.join("\n"));assert.match(failed.stdout + failed.stderr, /falling back to the archive directory/);@@ -203,7 +205,7 @@ test("a Claude-format wrapper sharing Claude Code's config keeps the URL marketpHOME: home,PATH: `${bin}:${process.env.PATH}`,OPENVIKING_HOME: join(home, ".openviking"),- OPENVIKING_TOS_BASE: "https://tos.example.invalid",+ OPENVIKING_DOWNLOAD_BASE: "https://tos.example.invalid",OPENVIKING_SKIP_VERSION_CHECK: "1",FAKE_CLAUDE_DIR: fake,FAKE_CLAUDE_VERSION: "2.1.284",@@ -254,6 +256,7 @@ test("release marketplace archive supports ZCode and pi TOS installs", () => {HOME: home,OPENVIKING_HOME: join(home, ".openviking"),OPENVIKING_MARKETPLACE_ARCHIVE_URL: `file://${join(tmp, "memory-plugin-marketplace.zip")}`,+ OPENVIKING_DOWNLOAD_BASE: "https://downloads.example.invalid",OPENVIKING_SKIP_VERSION_CHECK: "1",},});@@ -319,6 +322,7 @@ test("release marketplace archive supports ZCode and pi TOS installs", () => {PATH: `${bin}:${process.env.PATH}`,OPENVIKING_HOME: join(home, ".openviking"),OPENVIKING_MARKETPLACE_ARCHIVE_URL: `file://${join(tmp, "memory-plugin-marketplace.zip")}`,+ OPENVIKING_DOWNLOAD_BASE: "https://downloads.example.invalid",OPENVIKING_SKIP_VERSION_CHECK: "1",},});@@ -333,7 +337,8 @@ test("release marketplace archive supports ZCode and pi TOS installs", () => {"--lang", "en", "--url", "http://127.0.0.1:9", "--api-key", "", "--yes"];const piEnv = { ...process.env, HOME: home, PATH: bin + ":" + process.env.PATH,OPENVIKING_HOME: join(home, ".openviking"),- OPENVIKING_MARKETPLACE_ARCHIVE_URL: "file://" + join(tmp, "memory-plugin-marketplace.zip"), OPENVIKING_SKIP_VERSION_CHECK: "1" };+ OPENVIKING_MARKETPLACE_ARCHIVE_URL: "file://" + join(tmp, "memory-plugin-marketplace.zip"),+ OPENVIKING_DOWNLOAD_BASE: "https://downloads.example.invalid", OPENVIKING_SKIP_VERSION_CHECK: "1" };const piInstalled = run("bash", piArgs, { env: piEnv });assert.equal(piInstalled.status, 0, piInstalled.stdout + piInstalled.stderr);const piRoot = join(home, ".pi", "agent", "extensions", "openviking");@@ -484,6 +489,69 @@ test("rebuilding a release zip from the same commit gives the same bytes", () =>}});+// The docs site deploys on every change to the main branch, so its zips keep+// their bytes until their content changes.+test("the docs download tree holds what the installer fetches, under the address it is built for", () => {+ const tmp = mkdtempSync(join(tmpdir(), "openviking-downloads-"));+ const gitEnv = { ...process.env, GIT_CONFIG_GLOBAL: "/dev/null", GIT_CONFIG_NOSYSTEM: "1" };+ try {+ const out = join(tmp, "dl");+ const built = run("bash", [downloadsScript, out, "https://docs.example.invalid/dl/"]);+ assert.equal(built.status, 0, `${built.stdout}\n${built.stderr}`);+ const sha256 = (file) => createHash("sha256").update(readFileSync(file)).digest("hex");++ const published = readFileSync(join(out, "memory-plugin-shared", "install.sh"), "utf8");+ const version = published.match(/^INSTALLER_VERSION="(\d{8}-[0-9a-f]{10})"$/m)?.[1];+ assert.ok(version, "the installer names the date and commit it was built from");+ assert.equal(published.replace(`"${version}"`, '"dev"'), readFileSync(installer, "utf8"));+ assert.equal(+ readFileSync(join(out, "memory-plugin-shared", "bootstrap.sh"), "utf8"),+ readFileSync(join(dirname(installer), "bootstrap.sh"), "utf8"),+ );++ const manifest = JSON.parse(readFileSync(join(out, "plugins", "claude", "marketplace.json"), "utf8"));+ const [entry] = manifest.plugins;+ const zipName = `openviking-memory-${entry.version}.zip`;+ assert.deepEqual(entry.source, {+ source: "archive",+ url: `https://docs.example.invalid/dl/plugins/claude/${zipName}`,+ sha256: sha256(join(out, "plugins", "claude", zipName)),+ });++ const channels = JSON.parse(readFileSync(join(out, "releases", "latest", "channels.json"), "utf8"));+ assert.equal(channels.schema, 1);+ assert.deepEqual(Object.keys(channels.harnesses).sort(), [+ "claude", "codex", "cursor", "dsh", "kimicode", "opencode", "pi", "trae", "trae-cli", "trae-cn", "zcode",+ ]);+ assert.deepEqual(channels.harnesses.codex, {+ version,+ git_url: "https://docs.example.invalid/dl/plugins/memory-plugins.git",+ });+ assert.deepEqual(channels.harnesses.cursor, {+ version,+ bundle_url: "https://docs.example.invalid/dl/releases/latest/memory-plugin-marketplace.zip",+ });++ const listed = run("unzip", ["-Z1", join(out, "releases", "latest", "memory-plugin-marketplace.zip")]);+ assert.equal(listed.status, 0, listed.stderr);+ assert.ok(listed.stdout.split("\n").includes("memory-plugin-marketplace/.claude-plugin/marketplace.json"));++ const cloned = run("git", ["clone", "-q", join(out, "plugins", "memory-plugins.git"), join(tmp, "clone")], { env: gitEnv });+ assert.equal(cloned.status, 0, cloned.stderr);+ assert.ok(existsSync(join(tmp, "clone", "codex-memory-plugin", ".codex-plugin", "plugin.json")));+ assert.ok(existsSync(join(out, "plugins", "memory-plugins.git", "info", "refs")), "dumb HTTP clients read info/refs");++ const again = join(tmp, "again");+ const rebuilt = run("bash", [downloadsScript, again, "https://docs.example.invalid/dl"]);+ assert.equal(rebuilt.status, 0, `${rebuilt.stdout}\n${rebuilt.stderr}`);+ for (const zip of [join("plugins", "claude", zipName), join("releases", "latest", "memory-plugin-marketplace.zip")]) {+ assert.equal(sha256(join(again, zip)), sha256(join(out, zip)), zip);+ }+ } finally {+ rmSync(tmp, { recursive: true, force: true });+ }+});+// A stand-in for `aws s3 cp|sync` against one directory per bucket. It logs// each call and applies it the way the real command would for these arguments.const FAKE_AWS = `#!/usr/bin/env nodediff --git a/examples/pi-coding-agent-extension/package-lock.json b/examples/pi-coding-agent-extension/package-lock.jsonindex 7f82c5751..3e4f05b7f 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.7",+ "version": "0.4.8","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "openviking-pi-extension",- "version": "0.4.7",+ "version": "0.4.8","dependencies": {"@modelcontextprotocol/client": "2.0.0"},diff --git a/examples/pi-coding-agent-extension/package.json b/examples/pi-coding-agent-extension/package.jsonindex 93adffa9e..5bbd6c7d8 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.7",+ "version": "0.4.8","description": "OpenViking memory and context extension for the pi coding agent","private": true,"type": "module",