Compare commits

...

1 Commits

Author SHA1 Message Date
gloryfromca
ce2713e9a5 fix(*): ship the cloud memory plugin with raven, not beside the release
The release builds everos-cloud-memory's wheel and attaches it, but no
installer and no upgrade named it, so the only way in was `uv tool install
--with`, which the next `raven upgrade` undoes: uv replaces the tool's
requirement set with what the command names, and the upgrade names the
release's plugin list alone. A user who picked the cloud backend was told to
install a plugin that had no install path.

The live-service gate that kept it out is met: the six key-gated tests in
tests/integration/test_everos_cloud_real_cloud.py ran against api.evermind.ai
on 2026-10-09. So the distribution joins the list a complete install is made
of -- release.yml, publish_beta.py for the beta channel, both installers'
local-clone lists, and the Docker image's three plugin defaults. Installed is
not selected: memory.backend still decides, doctor and the gateway build only
the backend it names, and the one visible change is that `raven onboard` asks
which memory backend to use rather than taking the only one installed.

The rung that drops the product engines kept only everos-memory. That rung
exists so long-term memory outlives a native build a platform refuses, so on
such a machine every upgrade uninstalled the cloud backend from under a host
configured to use it. install.sh, install.ps1 and the upgrade helper now keep
both memory distributions, and the contract test reads which those are off the
backend/distribution pairing rather than naming one by hand.

Co-authored-by: Claude (claude-opus-5) <noreply@anthropic.com>
2026-10-20 21:54:35 +08:00
12 changed files with 106 additions and 54 deletions

View File

@ -172,20 +172,20 @@ jobs:
# --with-requirements`, so what a complete install is made of is
# written here once, from what this job just built, and nowhere
# else. Direct URLs on purpose: a bare name would be resolved against
# PyPI, where none of these names are ours. The everos line is what
# the helper keeps when the engines cannot build, so its name is a
# contract (tests/test_release_plugin_list.py).
# PyPI, where none of these names are ours. The two everos lines are
# what the helper keeps when the engines cannot build, so their names
# are a contract (tests/test_release_plugin_list.py).
- name: Write the plugin list
run: |
base="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}"
: > dist/raven-plugins.txt
for whl in dist/everos_memory-*.whl dist/design_engine-*.whl dist/ppt_engine-*.whl; do
for whl in dist/everos_memory-*.whl dist/everos_cloud_memory-*.whl dist/design_engine-*.whl dist/ppt_engine-*.whl; do
[ -f "$whl" ] || { echo "no wheel matches $whl"; exit 1; }
name="$(basename "$whl" | cut -d- -f1 | tr _ -)"
echo "$name @ $base/$(basename "$whl")" >> dist/raven-plugins.txt
done
cat dist/raven-plugins.txt
test "$(wc -l < dist/raven-plugins.txt)" -eq 3
test "$(wc -l < dist/raven-plugins.txt)" -eq 4
# 4d) The release installs itself before anything is published: the wheel,
# the constraints, the plugin list and the plugin wheels as one whole,
@ -194,7 +194,7 @@ jobs:
# from a copy of the list rewritten to point at the release directory
# here; the rewrite only matches the exact public prefix, so a list
# that named any other place fails the grep below. Then the installed
# raven has to answer, carry the three plugin packages, and have the
# raven has to answer, carry the four plugin packages, and have the
# `web` the installer ends on.
- name: Install the release from dist with install.sh
env:
@ -214,7 +214,7 @@ jobs:
wheel="$(ls dist/raven-*-py3-none-any.whl)"
RAVEN_WHEEL_URL="file://$gate/$(basename "$wheel")" sh -c 'cat install.sh | sh'
"$UV_TOOL_BIN_DIR/raven" --version
"$UV_TOOL_DIR/raven/bin/python" -c "import raven_everos, raven_design, raven_ppt"
"$UV_TOOL_DIR/raven/bin/python" -c "import raven_everos, raven_everos_cloud, raven_design, raven_ppt"
"$UV_TOOL_BIN_DIR/raven" web --help >/dev/null
- name: Upload artifacts

View File

@ -148,6 +148,17 @@ All notable changes to Raven are documented here.
### Changed
- A complete install now carries the `everos-cloud-memory` plugin, so the
hosted EverOS is a memory backend a user can pick rather than a wheel
attached to the release with no install path: the one-line installer,
`raven upgrade`, the beta channel and the Docker image all name it beside
the local `everos-memory`, and the rung that drops the product engines when
a native build refuses keeps both memory backends rather than only the local
one. Installed is not selected -- `memory.backend` still decides, and an
install that never picks the cloud behaves exactly as before, except that
`raven onboard` now asks which memory backend to use instead of taking the
only one installed.
- Memory runs on EverOS 1.4.2, which fixes what a memory server that stays up
for days ran into: a LanceDB index reader leaked file descriptors until
searches took seconds, an interactive search queued behind the cascade's

View File

@ -113,11 +113,14 @@ RUN --mount=type=cache,target=/root/.cache/uv \
fi
# The distributables beside the host wheel, discovered through the
# `raven.plugins` entry-point group. everos-memory by default: the gateway
# starts the everos memory server on boot, so without it memory is the one
# capability that silently does nothing. ppt-engine and design-engine are
# opt-in -- between them they add matplotlib, pymupdf and cairo.
ARG RAVEN_PLUGINS="everos-memory"
# `raven.plugins` entry-point group. Both memory backends by default: the
# gateway starts the everos memory server on boot, so without everos-memory
# memory is the one capability that silently does nothing, and
# everos-cloud-memory lets a container point at the hosted EverOS instead
# (raven and httpx only, and it costs nothing until memory.backend names it).
# ppt-engine and design-engine are opt-in -- between them they add
# matplotlib, pymupdf and cairo.
ARG RAVEN_PLUGINS="everos-memory,everos-cloud-memory"
RUN --mount=type=cache,target=/root/.cache/uv \
set -eu; \
if [ -n "${RAVEN_PLUGINS}" ]; then \

View File

@ -40,9 +40,11 @@ RAVEN_EXTRAS=channels,tools
# Distributables installed beside the host, comma-separated, from
# plugins-dist/. everos-memory backs the memory store the engine starts on
# boot. Add ppt-engine and design-engine to build decks and visual designs --
# together they pull matplotlib, pymupdf and cairo, so they are not default.
RAVEN_PLUGINS=everos-memory
# boot; everos-cloud-memory is the hosted backend a user can point memory at
# instead, and costs nothing until it is selected. Add ppt-engine and
# design-engine to build decks and visual designs -- together they pull
# matplotlib, pymupdf and cairo, so they are not default.
RAVEN_PLUGINS=everos-memory,everos-cloud-memory
# ---------------------------------------------------------------------------
# First-run provider (optional)

View File

@ -23,7 +23,7 @@ services:
dockerfile: Dockerfile
args:
RAVEN_EXTRAS: ${RAVEN_EXTRAS:-channels,tools}
RAVEN_PLUGINS: ${RAVEN_PLUGINS:-everos-memory}
RAVEN_PLUGINS: ${RAVEN_PLUGINS:-everos-memory,everos-cloud-memory}
# LibreOffice, for previewing office files and rendering decks. Set 0
# for a much smaller image that cannot show either.
RAVEN_OFFICE: ${RAVEN_OFFICE:-1}

View File

@ -643,7 +643,7 @@ Bearer key, depends on `raven` and `httpx` only, and never imports the
| Limits | adds are split at 500 messages / 250 KB; a single message over the ceiling is not stored and is named in the log. |
| Health | `POST /memory/get` with `page_size: 1`; 401, 403, 429, unreachable and "no key" each have their own sentence for `raven doctor`, the wizard and the card. |
| Host surfaces | the wizard asks "Which memory backend?" when more than one memory plugin is installed; the memory page reads whichever backend `memory.backend` names (with the Bearer header, without the OSS `/health` probe); `settings.everos` answers `reason: "other_backend"` for any backend that is not EverOS, which hides the llm / rerank / multimodal slots (embedding stays: knowledge bases embed with that pin); `settings.everosCloud` feeds the card; `settings.set` admits `plugins.config.<id>.<field>` only for a field the plugin's manifest marks `settable = true` (the cloud key; never an endpoint, which decides where that key is sent); a provider save no longer restarts a local EverOS unless EverOS is the backend. |
| Not shipped by default | the release builds the wheel but `raven-plugins.txt` keeps three distributions until the plugin has run against the live service (`tests/integration/test_everos_cloud_real_cloud.py`, key-gated). |
| Shipped with raven | the release builds the wheel and names it in `raven-plugins.txt`, so the one-line installer and `raven upgrade` carry it the way they carry the local plugin -- installed is not selected, and `memory.backend` still decides. It joined the list once the key-gated live-service tests (`tests/integration/test_everos_cloud_real_cloud.py`) had run against `api.evermind.ai`. A plugin left out of that list is uninstalled by the next upgrade, which reinstalls from the list alone. |
| Not done | `delete` answers `False` (the cloud deletes by scope, not by id); no `understand_media` tool (cloud multimodal needs a presigned upload); `app_id` / `project_id` stay at the cloud's defaults. |
Tests: `tests/test_everos_cloud_*.py` over `tests/_everos_cloud_fake.py`, a fake

View File

@ -463,12 +463,14 @@ function Install-Raven([string]$UvPath, [string]$NodePath) {
# Pin to the locked dependency set so an install matches what we test.
$constraints = Join-Path ([IO.Path]::GetTempPath()) ("raven-constraints-" + [guid]::NewGuid().ToString("N") + ".txt")
& $UvPath export --directory "$scriptDir" --frozen --all-extras --no-hashes --no-emit-workspace -o "$constraints"
# The default config names the everos memory backend, which ships as
# its own distribution beside the wheel -- carry it, and degrade
# loudly (the host boots memoryless and `raven doctor` says why) if
# it cannot build.
# The default config names the everos memory backend, and a user can
# point memory at the hosted EverOS instead; each ships as its own
# distribution beside the wheel -- carry both, and degrade loudly (the
# host boots memoryless and `raven doctor` says why) if they cannot
# build.
$memoryPlugin = @(
"--with-editable", (Join-Path $scriptDir "plugins-dist\everos-memory")
"--with-editable", (Join-Path $scriptDir "plugins-dist\everos-memory"),
"--with-editable", (Join-Path $scriptDir "plugins-dist\everos-cloud-memory")
)
# Raven-Design and Raven-PPT keep their harness in their own
# distributions, and the roster gates on them: discovery reads the
@ -484,7 +486,7 @@ function Install-Raven([string]$UvPath, [string]$NodePath) {
# channel SDK cannot block the whole install. Four rungs, dropping one
# capability each: the engines carry native builds (PDF, raster,
# plotting) a platform can refuse on its own, so they fall before the
# memory plugin rather than taking it down with them.
# memory plugins rather than taking them down too.
try {
& $UvPath tool install --force -c "$constraints" @memoryPlugin @enginePlugins -e "$scriptDir[channels]"
if ($LASTEXITCODE -ne 0) { throw "channel extras install failed" }
@ -495,7 +497,7 @@ function Install-Raven([string]$UvPath, [string]$NodePath) {
Write-Warn "A product engine failed to build; Raven-Design and Raven-PPT stay disabled (raven doctor explains)."
& $UvPath tool install --force -c "$constraints" @memoryPlugin -e "$scriptDir"
if ($LASTEXITCODE -ne 0) {
Write-Warn "EverOS memory plugin failed to install; long-term memory stays off (raven doctor explains)."
Write-Warn "The EverOS memory plugins failed to install; long-term memory stays off (raven doctor explains)."
& $UvPath tool install --force -c "$constraints" -e "$scriptDir"
if ($LASTEXITCODE -ne 0) { Fail "Raven install failed." }
}
@ -518,7 +520,7 @@ function Install-Raven([string]$UvPath, [string]$NodePath) {
Get-Content $plugins | ForEach-Object { Write-Info " $_" }
$pArgs = @("--with-requirements", $plugins)
$allLines = @(Get-Content $plugins | Where-Object { $_.Trim() })
$memoryLines = @($allLines | Where-Object { $_ -match "^everos-memory " })
$memoryLines = @($allLines | Where-Object { $_ -match "^(everos-memory|everos-cloud-memory) " })
if ($memoryLines.Count -gt 0 -and $memoryLines.Count -lt $allLines.Count) {
$memoryOnly = Join-Path ([IO.Path]::GetTempPath()) ("raven-plugins-memory-" + [guid]::NewGuid().ToString("N") + ".txt")
Set-Content -Path $memoryOnly -Value $memoryLines -Encoding ascii

View File

@ -337,10 +337,12 @@ install_raven() {
# Install all channel adapters by default. If the umbrella extra fails to
# resolve/build on this platform, fall back to base raven so one broken
# channel SDK cannot block the whole install.
# The default config names the everos memory backend, which ships as its
# own distribution beside the wheel -- carry it, and degrade loudly (the
# host boots memoryless and `raven doctor` says why) if it cannot build.
# The default config names the everos memory backend, and a user can point
# memory at the hosted EverOS instead; each ships as its own distribution
# beside the wheel -- carry both, and degrade loudly (the host boots
# memoryless and `raven doctor` says why) if they cannot build.
memory_dir="$script_dir/plugins-dist/everos-memory"
cloud_dir="$script_dir/plugins-dist/everos-cloud-memory"
# Raven-Design and Raven-PPT keep their harness in a distribution too, and
# the roster gates on it: discovery reads the `engine` block in each
# agents/<product>/subagent.json and disables the row when that package is
@ -369,13 +371,13 @@ install_raven() {
}
# Four rungs, dropping one capability each: the engines carry native
# builds (PDF, raster, plotting) that a platform can refuse on its own, so
# they fall before the memory plugin rather than taking it down with them.
if ! tool_install "$script_dir[channels]" "$memory_dir" "$design_dir" "$ppt_dir"; then
# they fall before the memory plugins rather than taking them down too.
if ! tool_install "$script_dir[channels]" "$memory_dir" "$cloud_dir" "$design_dir" "$ppt_dir"; then
warn "Channel dependencies failed to install; retrying with base raven. Some channels stay unavailable (see: raven channels list)."
if ! tool_install "$script_dir" "$memory_dir" "$design_dir" "$ppt_dir"; then
if ! tool_install "$script_dir" "$memory_dir" "$cloud_dir" "$design_dir" "$ppt_dir"; then
warn "A product engine failed to build; Raven-Design and Raven-PPT stay disabled (raven doctor explains)."
if ! tool_install "$script_dir" "$memory_dir"; then
warn "EverOS memory plugin failed to install; long-term memory stays off (raven doctor explains)."
if ! tool_install "$script_dir" "$memory_dir" "$cloud_dir"; then
warn "The EverOS memory plugins failed to install; long-term memory stays off (raven doctor explains)."
tool_install "$script_dir"
fi
fi
@ -451,7 +453,7 @@ install_raven() {
# Both option pairs expand unquoted below and must stay two words each;
# mktemp paths carry no spaces.
p_args="--with-requirements $plugins"
grep '^everos-memory ' "$plugins" > "$memory_only" || true
grep -E '^(everos-memory|everos-cloud-memory) ' "$plugins" > "$memory_only" || true
if [ -s "$memory_only" ] && ! cmp -s "$plugins" "$memory_only"; then
m_args="--with-requirements $memory_only"
fi

View File

@ -709,16 +709,17 @@ def run(argv=None):
return f"{name.strip()} @ {local[url.strip()]}" if sep and url.strip() in local else line
plugin_lines = [relocate(line) for line in plugin_lines]
memory_lines = [line for line in plugin_lines if line.partition(" @ ")[0].strip() == "everos-memory"]
memory = ("everos-memory", "everos-cloud-memory")
memory_lines = [line for line in plugin_lines if line.partition(" @ ")[0].strip() in memory]
# Two independent things can fail: the channel extras, and the plugins
# (the engines' native builds first, the memory plugin after). A failed
# (the engines' native builds first, the memory plugins after). A failed
# attempt does not say which, so the rungs walk both axes and stop at the
# first that lands -- the largest install this machine can build -- and
# report exactly what that rung lacks:
# 1 channels + all plugins 4 base + memory plugin
# 1 channels + all plugins 4 base + memory plugins
# 2 base + all plugins 5 channels, no plugins
# 3 channels + memory plugin 6 base, no plugins
# 3 channels + memory plugins 6 base, no plugins
lost_channels = "Channel dependencies failed to install; some channels stay unavailable (see: raven channels list)."
lost_engines = "A product engine failed to install; Raven-Design and Raven-PPT stay disabled (raven doctor explains)."
lost_plugins = (

View File

@ -122,11 +122,11 @@ def _next_version(base_version: str, published: str | None) -> str:
# The plugin distributions a complete install carries beside raven. The release
# workflow builds the same three (tests/test_release_plugin_list.py holds the
# workflow builds the same four (tests/test_release_plugin_list.py holds the
# two lists equal); the beta channel has to ship them too, or the upgrade
# helper, which refuses to install raven without its version's plugin list,
# would have nothing to read.
PLUGIN_DISTRIBUTIONS = ("everos-memory", "design-engine", "ppt-engine")
PLUGIN_DISTRIBUTIONS = ("everos-memory", "everos-cloud-memory", "design-engine", "ppt-engine")
PLUGIN_LIST_NAME = "raven-plugins.txt"

View File

@ -13,11 +13,19 @@ from __future__ import annotations
import re
from pathlib import Path
from raven.config.raven import MEMORY_BACKEND_DISTRIBUTIONS
from raven.updates import upgrade
from scripts.publish_beta import PLUGIN_DISTRIBUTIONS, PLUGIN_LIST_NAME
ROOT = Path(__file__).resolve().parents[1]
RELEASE_YML = (ROOT / ".github" / "workflows" / "release.yml").read_text(encoding="utf-8")
#: The shipped distributions that carry a memory backend, in list order. The
#: rung that drops the engines keeps exactly these, so that a host whose
#: `memory.backend` names any of them keeps its memory when a native build
#: refuses on the user's platform.
MEMORY_DISTRIBUTIONS = tuple(
name for name in PLUGIN_DISTRIBUTIONS if name in set(MEMORY_BACKEND_DISTRIBUTIONS.values())
)
def _step(text: str, name: str) -> str:
@ -43,20 +51,22 @@ def test_the_release_uploads_the_list_beside_the_wheel_and_the_constraints() ->
assert f"dist/{PLUGIN_LIST_NAME}" in _step(RELEASE_YML, "Write the plugin list")
def test_the_installers_keep_the_same_distribution_on_their_memory_rung() -> None:
"""install.sh, install.ps1 and the upgrade helper each filter the list by
the memory plugin's name for the rung that drops the engines; one rename
must turn all three red."""
def test_the_installers_keep_the_memory_distributions_on_their_memory_rung() -> None:
"""install.sh, install.ps1 and the upgrade helper each filter the list down
to the memory backends for the rung that drops the engines; a rename, or a
second memory backend the release ships, must turn all three red rather
than leave one rung quietly installing a subset."""
sh = (ROOT / "install.sh").read_text(encoding="utf-8")
ps1 = (ROOT / "install.ps1").read_text(encoding="utf-8")
memory = next(name for name in PLUGIN_DISTRIBUTIONS if "memory" in name)
assert f"grep '^{memory} ' \"$plugins\"" in sh
assert f'-match "^{memory} "' in ps1
assert len(MEMORY_DISTRIBUTIONS) > 1, MEMORY_DISTRIBUTIONS
alternation = "|".join(MEMORY_DISTRIBUTIONS)
assert f"grep -E '^({alternation}) ' \"$plugins\"" in sh
assert f'-match "^({alternation}) "' in ps1
for script in (sh, ps1):
assert f"/{PLUGIN_LIST_NAME}" in script
def test_the_local_clone_mode_installs_the_same_three_distributions() -> None:
def test_the_local_clone_mode_installs_the_same_distributions() -> None:
"""Run from a checkout, the installers install the workspace members
editable instead of reading a release list; the members they name must be
the ones a release ships, or a clone and a release would disagree about
@ -75,15 +85,16 @@ def test_the_release_installs_itself_before_it_is_published() -> None:
step = _step(RELEASE_YML, "Install the release from dist with install.sh")
assert "sh -c 'cat install.sh | sh'" in step
assert 'RAVEN_NO_LAUNCH: "1"' in step
assert "import raven_everos, raven_design, raven_ppt" in step
assert "import raven_everos, raven_everos_cloud, raven_design, raven_ppt" in step
assert "web --help" in step
assert RELEASE_YML.index("Install the release from dist") < RELEASE_YML.index("Create draft GitHub Release")
def test_the_helper_keeps_a_distribution_the_release_actually_ships() -> None:
"""The memory-only rung filters the list by one name; a rename on either
side would leave that rung installing nothing and reporting nothing."""
match = re.search(r'\.partition\(" @ "\)\[0\]\.strip\(\) == "([a-z-]+)"', upgrade._UPGRADE_HELPER_SOURCE)
def test_the_helper_keeps_the_distributions_the_release_actually_ships() -> None:
"""The memory-only rung filters the list by name; a rename on either side,
or a memory backend the release ships and the helper does not name, would
leave that rung installing the wrong set and reporting nothing."""
match = re.search(r"\n memory = \(([^)]*)\)\n", upgrade._UPGRADE_HELPER_SOURCE)
assert match is not None
assert match.group(1) in PLUGIN_DISTRIBUTIONS
assert tuple(re.findall(r'"([a-z-]+)"', match.group(1))) == MEMORY_DISTRIBUTIONS
assert upgrade._UPGRADE_HELPER_SOURCE.count(f"/{PLUGIN_LIST_NAME}") == 1

View File

@ -1231,6 +1231,26 @@ def test_upgrade_helper_keeps_the_channel_extras_when_only_an_engine_fails(
assert LOST_CHANNELS not in err and LOST_PLUGINS not in err
def test_upgrade_helper_keeps_both_memory_backends_when_the_engines_fail(
monkeypatch: pytest.MonkeyPatch,
release_directory: _ReleaseDirectory,
) -> None:
"""A release ships a local and a hosted memory backend, and the rung that
drops the engines exists so long-term memory outlives them. Keeping only
the local distribution uninstalls the cloud one from under a host whose
`memory.backend` names it -- a native build refusing on this platform would
take that user's memory with it."""
cloud = f"everos-cloud-memory @ {RELEASE_DIR}/everos_cloud_memory-0.1.0-py3-none-any.whl\n"
lines = PLUGIN_LIST.splitlines(keepends=True)
release_directory.files["raven-plugins.txt"] = "".join([lines[0], cloud, *lines[1:]]).encode("utf-8")
run = Mock(side_effect=[Mock(returncode=9)] * 4 + [Mock(returncode=0)])
monkeypatch.setattr(subprocess, "run", run)
helper_main = _load_upgrade_helper()
assert helper_main(["/usr/bin/uv", WHEEL_URL, "0.1.3", "0.1.4"]) == 0
assert _uv_calls(run)[-1]["plugins"] == lines[0] + cloud
def test_upgrade_helper_walks_both_axes_and_lands_on_the_largest_install(
monkeypatch: pytest.MonkeyPatch,
capsys: pytest.CaptureFixture[str],