Skip to content

Latest commit

 

History

History
435 lines (359 loc) · 23.1 KB

README.md

File metadata and controls

435 lines (359 loc) · 23.1 KB

Ceviz — Installation and safe updates

A fresh installation and an update to a working installation are different operations. Run these commands on the OpenClaw machine as the user who runs Ceviz. Do not run the updater with sudo.

This guide targets ceviz-helper-v2026.10.24-beta.1, matching the existing TestFlight app 2026.6.5 (1791334823). See the helper release notes for validation coverage and limitations.

Fresh installation

You need Python 3.11+, venv, Git and OpenClaw. If Ceviz is already installed, skip this section and use the existing-installation update guide.

Use an ordinary Linux home-directory path, such as $HOME/ceviz, without spaces, percent signs or other special characters. The fresh installer's generated service paths do not yet support arbitrary directory names. This is separate from spaces in the shell's PATH, which the installer quotes when passing it to the service.

git clone --branch ceviz-helper-v2026.10.24-beta.1 --single-branch https://github.com/MertBasar0/ceviz.git
cd ceviz
bash deploy/install.sh

Before installing, you can see what this machine can run well. The plan reads the hardware, OpenClaw, Ollama and network reachability, changes nothing, and needs only the system Python:

python3 deploy/plan.py            # readable report
python3 deploy/plan.py --json     # the same as data, without credentials

It says whether Whisper large-v3 can run here or the iPhone should transcribe, whether the optional Pusula router can run, how the phone will reach the helper, and what to fix first. On a machine with Ceviz installed it reads the helper's own OpenClaw agent and reports where the installed setup differs from the recommendation.

Speech recognition

The installer shows the same plan first and follows it for speech recognition. Only Whisper large-v3 is used: in daily use the smaller models misheard too many commands to be worth running.

  • Whisper large-v3 on this machine when it fits the GPU (about 5 GB free after the desktop's share) or, without one, on a CPU with 16 threads and 16 GB of memory. The installer times it on an 11-second sample; it is kept only if it hears the sample within 3 seconds. The model is downloaded once (about 3 GB) and the service uses it from the cache; a download that turned out too slow is removed again.
  • Transcription on the iPhone otherwise. The Ceviz iPhone app turns each command into text with Apple's on-device speech recognition and sends the text with the audio; nothing is downloaded on this machine.

To switch an installed helper, set WATCH_CEVIZ_STT_ENGINE=phone (or auto with WATCH_CEVIZ_WHISPER_MODEL=large-v3) in a drop-in under ~/.config/systemd/user/watch-ceviz-backend.service.d/ and restart the service.

Using the computer from the Watch

On macOS and Linux, OpenClaw runs on the computer itself and its exec tool acts on it directly. Under WSL the computer is Windows, which OpenClaw in WSL does not reach, so the installer connects Windows to OpenClaw as a node by default (deploy/pc-node.sh):

  • The Gateway mints a single-use, limited setup code (no admin access). Windows pairs with it over localhost and from then on uses its own device token; the Gateway token never leaves WSL.
  • Ceviz keeps its own copy of OpenClaw on Windows, at the Gateway's version, in %LOCALAPPDATA%\Ceviz\pc-node, and the node's identity in the OpenClaw profile ceviz-pc (%USERPROFILE%\.openclaw-ceviz-pc), apart from any OpenClaw you use on Windows. Node.js is needed on Windows; the installer tries winget when it is missing.
  • Its own scheduled task, Ceviz PC Node, starts the node hidden at logon. An OpenClaw Node task you set up yourself is left alone: OpenClaw allows only one of those per Windows user, and 2026.9.6 will not install it for a separate profile.
  • The helper tells the agent that the PC is the node Ceviz PC, so a command such as "open my notes on the desktop" runs in PowerShell on Windows (exec host=node). Commands run there without asking for approval, as OpenClaw's exec does inside WSL.

The script can be run again at any time, also on an existing installation; it replaces only Ceviz's own task. WATCH_CEVIZ_PC_NODE_SETUP=0 skips it during installation. To remove the node: Unregister-ScheduledTask 'Ceviz PC Node' on Windows, openclaw devices remove <device id> on the Gateway, and the two folders above.

The other parts of the plan (OpenClaw, Pusula, the connection) are still shown as advice only.

The installer creates a Python environment and installs dependencies, including CUDA libraries when the plan finds a usable GPU. It generates a pairing token, creates a service, configures the selected connection method and displays a pairing QR. Linux/WSL uses a systemd user service when available. The installer's nohup fallback, macOS and other non-systemd installations are outside the automatic updater's supported scope.

On iPhone, open Ceviz → Settings → Scan pairing QR → Test connection → Save. The QR contains the backend address and bearer token; do not share it. Updating an existing installation does not require pairing again.

Update an existing installation

Automatic updating supports only Linux/WSL installations using the same user's persistent watch-ceviz-backend.service systemd user service. macOS, nohup, custom launch commands, local backend modifications or different Python dependencies require assisted updating. Re-running the installer is not a safe alternative.

First set the actual installation directory; /absolute/path/to/ceviz below is a placeholder. Download the new updater into a separate temporary directory and run its read-only check:

CEVIZ_INSTALL_DIR="/absolute/path/to/ceviz"
CEVIZ_UPDATE_DIR="$(mktemp -d)"
curl --fail --location --proto '=https' --tlsv1.2 \
  'https://raw.githubusercontent.com/MertBasar0/ceviz/ceviz-helper-v2026.10.24-beta.1/deploy/update.py' \
  --output "$CEVIZ_UPDATE_DIR/update.py" &&
python3 "$CEVIZ_UPDATE_DIR/update.py" --install-dir "$CEVIZ_INSTALL_DIR" --check

--check does not stop the service, download a source release or change files and settings. Do not continue if a job is running or conversation delivery is unconfirmed. Review the result in Ceviz and contact support if it remains unresolved; never delete tracking records to bypass this check. READY means the installation was idle when checked, not that every later update check has passed or that new requests have been prevented.

After a successful check, close Ceviz on both iPhone and Watch and stop requests from Shortcuts or any other Ceviz client. Keep this maintenance window until the updater reports UPDATED, UP TO DATE, or successful RECOVERED. In the same terminal, explicitly confirm that no requests will be sent:

read -r -p 'All Ceviz clients are closed and no commands will be sent until maintenance finishes. Type UPDATE to confirm: ' CEVIZ_CONFIRM
if [ "$CEVIZ_CONFIRM" = "UPDATE" ]; then
  python3 "$CEVIZ_UPDATE_DIR/update.py" \
    --install-dir "$CEVIZ_INSTALL_DIR" \
    --revision ceviz-helper-v2026.10.24-beta.1 \
    --yes-maintenance
fi

The updater resolves the full Git commit identity and verifies a complete snapshot of the backend and contracts. It replaces only backend/main.py with a launcher for that snapshot, rather than overwriting runtime modules one at a time. Only the Ceviz service is briefly stopped and started. Authentication, capabilities, the session list and, when a suitable session exists, history are checked read-only; no real command is sent.

Pairing, existing service/environment settings, the Python environment, Tailscale/relay/network settings, job history and conversation delivery records are preserved. OpenClaw's Gateway, model and permissions are not changed. If a release changes Python dependencies, automatic updating stops without installing packages and asks for assisted updating.

Use this tool for later updates too. Do not use git pull, git reset, old file copies or install.sh to update a managed installation. Keep .ceviz-updates: it contains running source snapshots, code backups and update receipts. These are not backups of conversation text or tokens, but they contain local paths and job identifiers; do not publish them as support logs.

The original checkout's deployment scripts and Git revision stay unchanged; the running helper version is recorded by the updater, not by git log in that checkout. Download the updater from the published guide for each release. An older checkout's Doctor may lack the new capability check or suggest an installer rerun: do not follow that suggestion. Use the downloaded updater's --check and its verified update result for the current maintenance flow.

Recover an interrupted update

If activation fails, the updater attempts to restore the previous code. If the process was interrupted or reports RECOVERY REQUIRED, keep all clients idle. Use the same downloaded updater and the same installation:

python3 "$CEVIZ_UPDATE_DIR/update.py" \
  --install-dir "$CEVIZ_INSTALL_DIR" --recover --yes-maintenance

--recover restores only the verified previous code of a pending update. It does not rewind job/conversation state, delete delivery guards or resend commands. Recovery may refuse if settings or state changed; contact support before sending new commands. Without a pending update, this is not a general downgrade command.

If the temporary directory or terminal is gone, download the same published updater again from the HTTPS URL above and set the real installation directory again. Leave the records in .ceviz-updates intact. The previous code restored by recovery may not include the newer Conversations features.

Trusted local source for maintainers

For a reviewed offline/staged update, a maintainer can add --source /path/to/trusted/ceviz and set --revision to an exact 40-character commit or published helper release tag. The selected Git commit is used, not uncommitted files in that checkout. This does not bypass maintenance approval, idle checks or settings/state protection. Normal users should omit --source; the updater fetches only the official Ceviz GitHub repository into a temporary directory.

Ceviz Doctor

After installation, or when pairing or delivery fails, run this from the installation directory:

bash deploy/doctor.sh

Doctor checks OpenClaw and Python availability, virtual-environment dependencies, token existence/permissions, service status, authenticated local access, helper capabilities and Tailscale. It is read-only and does not print token values, APNs tokens or command contents. Follow its repair guidance; do not reinstall over a working installation.

Connection mode for a fresh installation

  • WATCH_CEVIZ_NETWORK_MODE=tailscale: recommended private tailnet access across different networks.
  • WATCH_CEVIZ_NETWORK_MODE=relay: WSL2 + Windows same-LAN relay; requires Windows UAC approval.
  • WATCH_CEVIZ_NETWORK_MODE=manual: your existing VPN/tunnel/reverse-proxy URL.
  • auto (default): asks in an interactive terminal; detects an available method during non-interactive installation.

Optional fresh-installation environment variables

Variable Default Purpose
WATCH_CEVIZ_PORT 8080 Backend port
WATCH_CEVIZ_NETWORK_MODE auto tailscale, relay, manual, or automatic selection
WATCH_CEVIZ_WHISPER_MODEL large-v3 if the plan and a timing allow it, otherwise none (the iPhone transcribes) Speech-to-text model; setting it skips the plan and the timing
WATCH_CEVIZ_STT_MEASURE 1 0 trusts the plan's large-v3 choice without timing it
WATCH_CEVIZ_WHISPER_LANGUAGE tr Default speech-to-text language
WATCH_CEVIZ_PC_NODE_SETUP 1 WSL: 0 skips connecting Windows as an OpenClaw node
WATCH_CEVIZ_PC_NODE_NAME Ceviz PC Name of that node
OPENCLAW_WATCH_AGENT main OpenClaw agent used for Watch commands

The updater does not reselect these values or write them into your existing service.

Model choice stays with OpenClaw. An optional router plugin can be installed separately and enabled with WATCH_CEVIZ_ROUTER; neither the installer nor the updater sets it.

WSL2 + Windows connection note

The Windows lifecycle scripts described below (deploy/windows/) ship with this helper since 2026.10.1 Beta 1, but they remain a repair candidate: automatic backend access after a Windows restart, without opening a terminal, is not proven yet. To repair an existing setup, use the scripts from this release's deploy/windows/ folder; do not rerun the installer over a working installation.

When Tailscale runs on Windows, the repaired fresh installer verifies the authenticated Ceviz backend at Windows 127.0.0.1:<port> before publishing that address. It does not create a LAN listener or firewall rule for Tailscale. For an assisted/manual setup with a Windows-reachable backend on port 8080, the corresponding Windows-side command is:

tailscale serve --bg --set-path=/ceviz http://127.0.0.1:8080

Only use that address after verifying Windows can reach the backend there. If localhost forwarding is unavailable in a custom WSL configuration, stop and request assistance; do not silently substitute a LAN address or open the firewall. The separate LAN relay remains an explicit relay connection mode. Its legacy recovery is limited: a LAN address change does not update its firewall binding, and extended loss of a default route can exhaust its three retries. Those conditions need operator assistance; the independent lifetime task and Windows Tailscale localhost route do not rely on that relay. Pair iPhone with https://<machine-name>.<tailnet>.ts.net/ceviz and its private token. These are initial networking instructions, not part of the code-only update.

Windows lifetime repair for an existing WSL installation

An enabled systemd service does not keep WSL alive. The repaired setup uses an independent Ceviz WSL Lifetime Windows scheduled task. It holds one foreground WSL client for the selected distribution, starts at Windows logon, and checks once per minute whether another instance can start. Its action runs System32\wsl.exe --distribution YOUR_DISTRO --exec /bin/sleep infinity directly, so the tracked process is the foreground client, not a PowerShell wrapper with a separately owned child. IgnoreNew prevents overlapping task instances; there is no task execution time limit or network/idle/battery prerequisite. The default Interactive mode requires the Windows user to be logged in and opens a visible console window. The explicit S4U option below uses a non-interactive desktop. Neither mode can keep the computer awake or repair a disconnected VPN; task state alone is not backend health or command-delivery proof.

The task's raw argument string must not wrap the distribution name in quotes: WSL treats those quotes as part of the name and reports WSL_E_DISTRO_NOT_FOUND. Distribution names cannot contain whitespace; the installer rejects such input before addressing WSL or Task Scheduler. This differs from quoting a PowerShell string such as -Distro 'YOUR_DISTRO' below. See the WSL maintainer's argument-parsing explanation.

First inspect from Windows PowerShell, before opening a Linux terminal:

wsl.exe --list --verbose
Get-ScheduledTask -TaskName 'Ceviz WSL Lifetime' -ErrorAction SilentlyContinue
Get-ScheduledTaskInfo -TaskName 'Ceviz WSL Lifetime' -ErrorAction SilentlyContinue

These checks do not start a stopped distro. Running a command inside WSL, including Linux Doctor, can start it and its enabled services; that temporary availability is not evidence that the outage was repaired.

After an explicit maintenance approval, close Ceviz clients and use the reviewed repair source folder in Windows PowerShell. Replace YOUR_DISTRO with the exact registered name shown above:

powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File .\deploy\windows\install-wsl-lifetime.ps1 -Distro 'YOUR_DISTRO'

That command selects the default Interactive task: PowerShell's own -NonInteractive flag before -File only disables prompts. For an explicitly approved, host-validated windowless task, pass the installer's switch after -File instead:

powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File .\deploy\windows\install-wsl-lifetime.ps1 -Distro 'YOUR_DISTRO' -NonInteractive

This selects S4U for the current Windows account, always at Limited run level, and stores no password. S4U requires the account's existing batch-logon right; its Windows token cannot access network resources or EFS-encrypted files. The direct /bin/sleep action needs neither, but each host's WSL installation and file locations still need validation. No credential, right or policy is changed, no launcher is copied, and a failed registration never falls back to Interactive mode. The installer does not elevate itself. If elevated registration has been explicitly approved for that host, open Windows PowerShell as administrator under the same account and run the selected command there; do not supply another administrator's account. Windows remains the authority for registration permissions, rather than an installer rule that all S4U hosts require administrator rights.

This registers and starts only the independent lifetime task. It does not rewrite the Ceviz service, pairing token, jobs, conversation records, Python environment, Gateway settings or Tailscale target. Starting WSL can naturally start its already-enabled Linux services. The old LAN relay is not required for Tailscale and is not restarted by this command. Its retirement, if needed, is a separate reviewed Windows maintenance action.

An existing task is replaced only when its exact component, Windows user, logon mode, run level and distro match; its previous XML definition remains available under %LOCALAPPDATA%\Ceviz\wsl-lifetime. No custom lifetime runtime is copied. Unknown, modified, running or disabled-for-maintenance tasks require operator review before replacement. Changing between Interactive and S4U is a separate explicitly approved migration, not an automatic replacement or a force option. A registration/start/readback error is a failure, not a successful repair: retain the backups and inspect Task Scheduler before continuing. The code-only helper updater deliberately does not install or update Windows tasks and does not overwrite deployment scripts in old checkouts.

For an intentional WSL shutdown or lifetime-task upgrade, first pause clients and disable the lifetime task, then stop that exact task; otherwise its one-minute trigger will bring WSL back. Do not kill arbitrary WSL processes. Re-enable/start the reviewed task when maintenance ends. Confirm from Windows that it stays Running, that the selected distro remains running after all Linux terminals close, and that Ceviz's existing authenticated connection still works. Do not re-pair, clear pending requests or resend an unconfirmed command to test host availability.

Real-host validation must also check the task's stop/restart behavior and that S4U creates no window in the interactive session. Verify disappearance of both the exact Windows client and its Linux sleep process when the task stops; Windows task state alone does not establish Linux child cleanup. Isolated tests do not prove these Task Scheduler/WSL behaviors. The approved maintainer-host probe verified warm-distro S4U execution, natural exit and stop cleanup without changing the existing helper or Gateway processes. This is not cold-start, reboot, logoff or general WSL-version compatibility proof. Validate those boundaries separately before relying on unattended availability.

If a fresh installation stops during its network or task step, a service/token may already have been created. Do not rerun install.sh, delete that token or re-pair as recovery: the existing-install guard intentionally stops another fresh installation. Keep the output and request assisted repair of the failed boundary. The older native-Linux Tailscale branch still needs separate serve/DNS failure handling. Doctor's .auth-token check also does not cover legacy service-environment-only token storage; a missing token-file warning alone is not proof that such a recovered installation lost its token.

Microsoft documents the relevant boundaries: systemd and WSL lifetime, Windows localhost access to WSL, and Task Scheduler settings. Also see S4U's non-interactive logon and access restrictions and task registration security requirements.

Voice delivery recovery (unreleased repair candidate)

The repaired phone/Watch pair requires the helper's versioned Watch command recovery endpoints. Update all three components together after native/device validation; the currently published helper tag does not contain this candidate. An older peer is an explicit update requirement, not permission to fall back to an untracked audio POST. Captures made before this protocol are checked for an existing receipt only; they are not silently upgraded and resent.

The helper adds metadata tables to its existing conversations.sqlite. Keep this file together with the existing job history during updates and recovery. It contains command IDs, capture digests/timestamps, target IDs and admission state, not audio, transcripts or access tokens. The phone uses its existing local delivery database for equivalent metadata. Recording retention on Watch is still 15 minutes; these databases are not another recording archive.

If an upload response is lost, Check delivery asks about the same identity. An accepted identity resumes result lookup. Only a verified, still-current not_submitted identity can use its original capture again. Missing/replaced tracking data or an interrupted admission remains unknown; checking Jobs is required before deliberately recording another request. Do not delete tracking files, reinstall, rotate pairing or run an older endpoint to force a retry. New requests are not blocked behind an older uncertain capture on Watch.

The updater now refuses maintenance while a Watch reservation is unresolved, even if no job appears in jobs.json; contact support to review the reservation instead of deleting it. Run one helper against a state directory. Cross-process tests cover two versioned submissions, not a mixture of legacy/new endpoints in separate helper processes. Tests use private fixtures, not physical power-loss or paired-device proof. No live task or service is installed by this source change; the maintenance checks above still require separate approval.