feat(memory): migrate openclawd vaults into collective layout

This commit is contained in:
hotwa
2026-03-10 15:58:32 +08:00
parent b5edc14629
commit 4a6d51147f
70 changed files with 4156 additions and 158 deletions

View File

@@ -0,0 +1,46 @@
# OpenClaw Infra Baseline (Imported)
- imported_from: `/Users/lingyuzeng/openclawd/vaults/memory/infra.md`
- imported_at_utc: `2026-03-10T07:53:38Z`
- note: migrated from openclawd/vaults to collective-memory-repo.
---
# memory/infra.md
## OpenClaw Cluster Baseline (2026-03-10)
- Control Plane / Gateway: **mac-5** (唯一 Gateway)
- Node Hosts: **mac-6**, **mac-7**
- **mac-8 已下线**,不再参与当前集群调度
- Node Roles:
- mac-6: Executor / Build
- mac-7: Browser / Web Verify
## Access & Ingress
- Unified ingress via Caddy HTTPS/WSS.
- Known endpoints in docs/notes:
- `https://mac5.hs.jmsu.top:8443`
- `wss://mac5.hs.jmsu.top:8443`
- runtime summary may use `bot.jmsu.top:443` (confirm active deployment before operations)
## Node Lifecycle
`openclaw node run/install -> Pending -> openclaw devices approve <request-id> -> Online -> openclaw nodes run ...`
## Operating Rules
1. Never run Gateway on mac-6/mac-7.
2. Remote commands must go through `openclaw nodes run`.
3. Keep node allowlist/approvals least-privileged by role.
4. For failures, check: unauthorized / pairing required / origin not allowed / trusted proxy / approval required.
## Memory Gateway Design (qmd-memory-gateway)
- Consistency model: query-time sync (`fetch -> workspace sync -> qmd update/embed -> query`).
- Workspace isolation by branch/profile, with per-workspace lock.
- Keep a **single gateway on mac-5** as default topology to avoid multi-writer index drift.
- Consider per-machine gateway only if:
- cross-machine latency becomes a bottleneck, and
- each machine can own an isolated branch/workspace and independent qmd cache/index.

View File

@@ -0,0 +1,18 @@
# OpenClaw Ops Lessons (Imported)
- imported_from: `/Users/lingyuzeng/openclawd/vaults/memory/lessons.md`
- imported_at_utc: `2026-03-10T07:53:38Z`
- note: migrated from openclawd/vaults to collective-memory-repo.
---
# memory/lessons.md
## [HIGH] 多机架构唯一 Gateway 约束
- **结论**: Gateway 只能在 mac-5其他节点一律 Node Host。
- **风险**: 在 mac-6/7/8 启动 Gateway 会导致控制面冲突和排障复杂化。
- **应对**: 统一通过 mac-5 控制面 + `openclaw nodes run` 调度。
## [MEDIUM] 节点接入失败排查顺序
- **结论**: 先看 token再看 pairing再看 allowlist。
- **错误关键词**: unauthorized / pairing required / approval required。

View File

@@ -0,0 +1,54 @@
# OpenClaw MEMORY Index (Imported)
- imported_from: `/Users/lingyuzeng/openclawd/vaults/MEMORY.md`
- imported_at_utc: `2026-03-10T07:53:38Z`
- note: migrated from openclawd/vaults to collective-memory-repo.
---
# MEMORY.md - Long-Term Memory
## OpenClaw 集群架构2026-03-10 更新)
- 控制面唯一 Gateway 在 **mac-5**
- 执行节点为 **mac-6 / mac-7**,均为 Node Host不运行 Gateway
- **mac-8 已下线**,已从当前调度与记忆基线中移除。
- 对外统一入口通过 Caddy 的 HTTPS/WSS 反代(当前说明含 `mac5.hs.jmsu.top:8443`,运行态摘要也提到 `bot.jmsu.top:443`,以实际部署配置为准)。
- 节点生命周期:`node run/install -> Pending -> devices approve -> Online -> nodes run 调度`
- 角色建议:
- mac-6: Executor / Build
- mac-7: Browser / Web Verify
- 原则:除 mac-5 外,其他机器禁止启动 Gateway。
## 协作与权限原则
- 远程执行统一走 `openclaw nodes run`
- 节点执行受本地 allowlist / approvals 控制,按角色最小权限配置。
- 常见故障定位关键词:`unauthorized``pairing required``origin not allowed``trusted proxies``approval required`
## 记忆索引
- 集群基础设施细节:`memory/infra.md`
- 项目状态:`memory/projects.md`
- 经验教训:`memory/lessons.md`
- 每日记录:`memory/YYYY-MM-DD.md`
## 记忆网关策略QMD Gateway
- 采用 `qmd-memory-gateway` 的一致性模型:**查询前同步fetch -> workspace sync -> qmd update/embed -> query**。
- 当前建议仍为 **mac-5 单 Gateway控制面唯一入口**mac-6/7 不启动 Gateway。
- 仅在出现跨机网络瓶颈或单点容量瓶颈时,再评估分机独立 Gateway。
## 身份与运行角色
- 身份文件:`IDENTITY.md`
- 当前运行定位:驻守 `mac-5` 控制面,调度 `mac-6/7` 执行节点完成任务。
## 当前集群调用经验2026-03-10
- `wss://bot.jmsu.top` 这条远端入口链路可正常控制 `mac-6 / mac-7`
-`mac-5` 本机 CLI 默认落到 `ws://127.0.0.1:18789`,可能出现 `1006 abnormal closure` / `ECONNREFUSED`,这不等于远端 WSS 链路坏掉。
- 排障时要先区分两层:
- 网关路径选择问题(本地默认 vs 显式 `--url wss://bot.jmsu.top`
- 节点版本兼容问题(旧版 node host 可能因 `system.run.prepare` 不支持而无法执行)
- 当前确认:将 `mac-6 / mac-7` 升级到 `v2026.3.8` 后,显式走 `wss://bot.jmsu.top` 的节点执行恢复正常。

View File

@@ -0,0 +1,20 @@
# OpenClaw Project Status (Imported)
- imported_from: `/Users/lingyuzeng/openclawd/vaults/memory/projects.md`
- imported_at_utc: `2026-03-10T07:53:38Z`
- note: migrated from openclawd/vaults to collective-memory-repo.
---
# memory/projects.md
## OpenClaw Multi-Node Cluster
- **状态**: Running baseline established
- **控制面**: mac-5 Gateway
- **执行面**: mac-6/mac-7 Node Hostsmac-8 retired
- **下一步**:
- 完成身份文件初始化IDENTITY.md / USER.md
- 持续把集群变更写入 `memory/infra.md`
- 按角色细化 allowlist 策略
-`~/project/qmd-memory-gateway` 的一致性同步链路接入当前记忆系统