Membox Cloud Sync
Use this skill for private, zero-knowledge, encrypted cross-device Membox-backed memory sync, backup, and recovery flows.
Load Only What You Need
- - Read references/workflows.md first for the end-to-end operating model.
- Read references/distribution.md when the task is about installing the plugin, installing the skill, ClawHub distribution, or the "user says one sentence and the agent does the rest" flow.
- Read references/api-surface.md when you need exact HTTP endpoints, payloads, or response fields.
- Read references/scheduling.md when the user wants daily checks, periodic uploads, or local restore orchestration.
- When the user needs the plugin + skill installed together:
- preferred published path: run
openclaw plugins install @membox-cloud/membox and then INLINECODE1
Non-Negotiable Rules
- 1. Install the plugin before using Membox tools. If
membox_* tools are unavailable, install @membox-cloud/membox first. - If the plugin or skill was installed during the current OpenClaw conversation and the
membox_* tools still do not exist, start a new OpenClaw session or next run before continuing. - Log in first. Do not start sync, polling, upload, restore, revoke, or scheduling work until the agent has a valid Membox session or device grant flow in progress.
- Prefer the plugin tool path over raw HTTP when the plugin is installed:
-
membox_status
-
membox_sync
-
membox_setup_start
-
membox_setup_poll
-
membox_setup_finish
-
membox_unlock
-
membox_unlock_secret_enable
-
membox_unlock_secret_disable
-
membox_pull
-
membox_restore
-
membox_grants_approve_pending
- 5. Treat local memory files as the source of truth. By default, only sync
MEMORY.md and memory/YYYY-MM-DD.md. - Never send plaintext memory, passphrases,
URK, AMK, recovery codes, or decrypted recovery bundles to the server or the model. - On each memory change, sync only the changed file object instead of re-uploading the whole workspace.
- Restore is a two-step operation: recover decryption capability first, then pull encrypted object changes and write the resulting files back locally.
- For tool-driven setup, keep passphrases and recovery codes in local private files and use the OpenClaw plugin tools to read them from disk instead of pasting them inline.
- Browser identity confirmation is required for third-party login, but it is not the only user-controlled boundary. The agent must not invent a vault passphrase, silently store recovery material, or enable managed unlock without explicit user consent.
- INLINECODE20 ,
membox_pull, and membox_grants_approve_pending require the vault to already be unlocked or explicitly opted into managed unlock. Browser authorization alone is not enough for unattended memory operations. - On Unix-like systems, keep the secret directory private (for example
chmod 700 .membox-secrets) and secret-bearing files private (for example chmod 600 .membox-secrets/*), because the plugin rejects group- or world-readable secret files. - Distinguish clearly between inferred state, planned actions, executed actions, and verified state. Do not claim the plugin or skill is installed, the environment is ready, the account is paired, or the latest version is present unless the current run actually checked and confirmed it.
- Never ask the user to paste a vault passphrase, recovery code, or recovery bundle into the chat transcript. If a secret must exist locally, instruct the user to place it in a private local file, or create that file locally only if the current runtime has file-write capability and the user explicitly opted in.
Default Service Target
- - Default web origin: INLINECODE25
- Default API base: INLINECODE26
- Advanced users may override the service base explicitly for self-hosted deployments.
Core Behavior
1. Login and Pairing
- - Prefer the plugin Device Code flow for agent-driven setup:
- call
membox_setup_start
- send
verification_uri_complete back to IM as a clickable link
- user opens the link on phone or another trusted browser
- if the browser already has a valid Membox session, device authorization may complete automatically
- otherwise the user completes GitHub, Google, or email login there
- poll
membox_setup_poll until it returns
authorized
- finish locally with
membox_setup_finish
- - If the plugin is not yet installed, install it first and only fall back to raw HTTP for debugging or low-level verification.
- Before telling the user that installation, readiness, or pairing is complete, verify it with actual command or tool results in the current run.
- If the plugin or skill was just installed and the tool registry still does not show
membox_* tools, continue in a fresh OpenClaw session or next run. - If the user is already in a browser login flow, continue from the existing web session and confirm the pending device instead of starting a second login.
- On headless or VPS machines, do not pretend the login can be completed locally. Tell the user to open the full verification URL on any trusted browser.
- For first-device setup, require a local
passphrase_file and recovery_code_output_file. Keep both machine-local and out of the model transcript. - Prefer a private local directory such as
.membox-secrets/ for those paths. - If the user wants help generating a passphrase, generate it into a local private file only after explicit consent, or ask the user to create the file themselves. Do not reveal the generated passphrase in chat unless the user explicitly asks to see it.
2. Change-Triggered Sync
Whenever local memory changes:
- - detect which core memory file changed
- encrypt and package only that file locally
- call the Membox sync commit API for that object
- update the local sync cursor or state after a successful commit
If the local file was deleted intentionally, write a tombstone through the delete API instead of silently ignoring the missing file.
If the vault is locked:
- - use
membox_unlock with a local INLINECODE37 - or require prior explicit opt-in to managed unlock
- do not claim that browser login already unlocked the vault
3. Daily Scheduled Check
If the user wants unattended protection, the skill may install a local scheduled task that:
- - runs once per day
- checks whether new local memory changes exist
- refreshes the access token if needed
- uploads pending file changes
- optionally checks remote cursor drift and reports if a pull preview is needed
Do not install an unattended schedule by default unless the machine already has an explicit non-interactive unlock path, such as managed unlock.
4. Restore
If the user wants to restore memory to a machine:
- - log in first
- recover access to encrypted key material through either device grant approval or recovery bundle download
- query remote sync status and changes
- download, decrypt, and materialize the corresponding memory files locally
- never overwrite
MEMORY.md silently; use preview and conflict-safe writes
If restore relies on a trusted-device grant, the already trusted device must be unlocked before it can approve the new device.
What This Skill Does Not Do
- - It does not replace OpenClaw's local memory backend.
- It does not use the web app to handle plaintext memory.
- It does not assume that login alone is enough to recover data in a zero-knowledge setup.
- It does not assume that browser authorization automatically unlocks future sync, pull, or grant operations.
- It does not sync derived SQLite, QMD caches, or session-memory indexes by default.
- It does not treat an unverified guess as an installed, ready, or up-to-date environment.
Membox 云同步
使用此技能进行私有、零知识、加密的跨设备 Membox 支持的内存同步、备份和恢复流程。
仅加载所需内容
- 首选发布路径:运行 openclaw plugins install @membox-cloud/membox,然后运行 clawhub install membox-cloud-sync
不可协商规则
- 1. 在使用 Membox 工具之前先安装插件。如果 membox 工具不可用,请先安装 @membox-cloud/membox。
- 如果插件或技能在当前 OpenClaw 对话期间安装,但 membox 工具仍然不存在,请在继续之前启动新的 OpenClaw 会话或下一次运行。
- 先登录。在代理拥有有效的 Membox 会话或设备授权流程正在进行之前,不要开始同步、轮询、上传、恢复、撤销或调度工作。
- 当插件已安装时,优先使用插件工具路径而非原始 HTTP:
- membox_status
- membox_sync
- membox
setupstart
- membox
setuppoll
- membox
setupfinish
- membox_unlock
- membox
unlocksecret_enable
- membox
unlocksecret_disable
- membox_pull
- membox_restore
- membox
grantsapprove_pending
- 5. 将本地内存文件视为事实来源。默认情况下,仅同步 MEMORY.md 和 memory/YYYY-MM-DD.md。
- 切勿将明文内存、密码短语、URK、AMK、恢复代码或解密后的恢复包发送到服务器或模型。
- 每次内存变更时,仅同步变更的文件对象,而不是重新上传整个工作空间。
- 恢复是一个两步操作:首先恢复解密能力,然后拉取加密对象变更并将结果文件写回本地。
- 对于工具驱动的设置,将密码短语和恢复代码保存在本地私有文件中,并使用 OpenClaw 插件工具从磁盘读取它们,而不是内联粘贴。
- 第三方登录需要浏览器身份确认,但这并非唯一的用户控制边界。代理不得在未经用户明确同意的情况下创建保险库密码短语、静默存储恢复材料或启用托管解锁。
- memboxsync、memboxpull 和 memboxgrantsapprove_pending 要求保险库已解锁或明确选择托管解锁。仅浏览器授权不足以进行无人值守的内存操作。
- 在类 Unix 系统上,保持秘密目录私有(例如 chmod 700 .membox-secrets)和包含秘密的文件私有(例如 chmod 600 .membox-secrets/*),因为插件会拒绝组或全局可读的秘密文件。
- 清晰区分推断状态、计划操作、已执行操作和已验证状态。除非当前运行实际检查并确认,否则不要声称插件或技能已安装、环境已就绪、账户已配对或最新版本已存在。
- 切勿要求用户将保险库密码短语、恢复代码或恢复包粘贴到聊天记录中。如果秘密必须存在于本地,指示用户将其放置在本地私有文件中,或者仅当当前运行时具有文件写入能力且用户明确选择时才在本地创建该文件。
默认服务目标
- - 默认 Web 源:https://membox.cloud
- 默认 API 基础:https://membox.cloud/api/v1
- 高级用户可以明确覆盖服务基础以用于自托管部署。
核心行为
1. 登录和配对
- - 对于代理驱动的设置,优先使用插件设备代码流程:
- 调用 membox
setupstart
- 将 verification
uricomplete 作为可点击链接发送回 IM
- 用户在手机或其他受信任的浏览器上打开该链接
- 如果浏览器已有有效的 Membox 会话,设备授权可能自动完成
- 否则用户在此完成 GitHub、Google 或电子邮件登录
- 轮询 membox
setuppoll 直到返回 authorized
- 使用 membox
setupfinish 在本地完成
- - 如果插件尚未安装,先安装它,仅在进行调试或低级验证时回退到原始 HTTP。
- 在告知用户安装、就绪或配对完成之前,使用当前运行中的实际命令或工具结果进行验证。
- 如果插件或技能刚刚安装,但工具注册表仍未显示 membox* 工具,请在新的 OpenClaw 会话或下一次运行中继续。
- 如果用户已处于浏览器登录流程中,从现有 Web 会话继续并确认待处理设备,而不是启动第二次登录。
- 在无头或 VPS 机器上,不要假装登录可以在本地完成。告知用户在任意受信任的浏览器上打开完整的验证 URL。
- 对于首次设备设置,需要本地的 passphrasefile 和 recoverycodeoutput_file。将两者保留在机器本地且不在模型记录中。
- 优先使用私有本地目录(如 .membox-secrets/)存放这些路径。
- 如果用户希望帮助生成密码短语,仅在获得明确同意后将其生成本地私有文件,或要求用户自行创建文件。除非用户明确要求查看,否则不要在聊天中透露生成的密码短语。
2. 变更触发的同步
每当本地内存发生变更时:
- - 检测哪个核心内存文件发生了变更
- 仅加密和打包该文件到本地
- 调用该对象的 Membox 同步提交 API
- 成功提交后更新本地同步游标或状态
如果本地文件被有意删除,通过删除 API 写入墓碑标记,而不是静默忽略缺失文件。
如果保险库已锁定:
- - 使用带有本地 passphrasefile 的 memboxunlock
- 或要求事先明确选择托管解锁
- 不要声称浏览器登录已解锁保险库
3. 每日计划检查
如果用户希望无人值守保护,技能可以安装一个本地计划任务,该任务:
- - 每天运行一次
- 检查是否存在新的本地内存变更
- 如果需要则刷新访问令牌
- 上传待处理的文件变更
- 可选地检查远程游标偏移,并在需要拉取预览时报告
除非机器已有明确的非交互式解锁路径(如托管解锁),否则默认不要安装无人值守计划。
4. 恢复
如果用户希望将内存恢复到某台机器:
- - 先登录
- 通过设备授权批准或恢复包下载恢复对加密密钥材料的访问
- 查询远程同步状态和变更
- 下载、解密并在本地实现相应的内存文件
- 切勿静默覆盖 MEMORY.md;使用预览和冲突安全的写入
如果恢复依赖于受信任设备授权,则必须先解锁已受信任的设备,然后才能批准新设备。
此技能不执行的操作
- - 它不替换 OpenClaw 的本地内存后端。
- 它不使用 Web 应用处理明文内存。
- 它不假设仅登录就足以在零知识设置中恢复数据。
- 它不假设浏览器授权会自动解锁未来的同步、拉取或授权操作。
- 它默认不同步派生的 SQLite、QMD 缓存或会话内存索引。
- 它不将未经验证的猜测视为已安装、就绪或最新的环境。