feat(bootstrap): add shared session bootstrap and machine-alias resolver
This commit is contained in:
14
policies/MACHINE-ALIASES.yaml
Normal file
14
policies/MACHINE-ALIASES.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
version: 1
|
||||
machines:
|
||||
- hostname: mac-5
|
||||
aliases: mac5,control,openclaw-control
|
||||
default_agent_suffix: mac5
|
||||
- hostname: lingyuzeng-X99-TI-D4-PLUS
|
||||
aliases: rtx2080ti,gpu-gateway,group
|
||||
default_agent_suffix: rtx2080ti
|
||||
- hostname: mac-6
|
||||
aliases: mac6,executor,node-exec
|
||||
default_agent_suffix: mac6
|
||||
- hostname: mac-7
|
||||
aliases: mac7,browser,node-browser
|
||||
default_agent_suffix: mac7
|
||||
48
policies/SESSION-BOOTSTRAP.md
Normal file
48
policies/SESSION-BOOTSTRAP.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# SESSION BOOTSTRAP (Shared Memory)
|
||||
|
||||
## 目标
|
||||
- 所有客户端(OpenClaw / Claude / Codex / Cursor)共享同一记忆系统。
|
||||
- Durable memory authority 是 `collective-memory-repo`。
|
||||
- 群体权威召回只认远程 `memory-gateway`。
|
||||
|
||||
## 统一架构
|
||||
- Memory repo: `/Users/lingyuzeng/project/collective-memory-repo`
|
||||
- Gateway URL: `http://100.64.0.45:8787`
|
||||
- Gateway MCP URL: `http://100.64.0.45:8787/mcp`
|
||||
- 记忆层规则:
|
||||
- 共享长期事实:`shared/long-term/`
|
||||
- 每日记录:`daily/`
|
||||
- 任务协作:`tasks/<task-id>/`
|
||||
- Agent 私域:`agents/<agent-id>/`
|
||||
|
||||
## 分支规则
|
||||
- 长期协作默认:`branch=main`
|
||||
- 并发任务协作:`branch=task/<task-id>`
|
||||
- 群体查询必须带:`require_latest=true`
|
||||
|
||||
## 读写规则
|
||||
- Runtime 文件(persona/tools/heartbeat)留在各自本机 runtime 目录。
|
||||
- Durable facts 只能写入 `collective-memory-repo` 的对应 lane。
|
||||
- `vaults/memory/*` 是兼容区,不是长期真相源。
|
||||
|
||||
## 会话初始化必填上下文
|
||||
在新会话第一条消息中提供:
|
||||
- `machine_hostname`
|
||||
- `machine_alias`
|
||||
- `agent_id`
|
||||
- `memory_branch`(默认 `main`)
|
||||
- `task_id`(如有)
|
||||
|
||||
## 示例(首条消息)
|
||||
```text
|
||||
@/Users/lingyuzeng/project/collective-memory-repo/policies/SESSION-BOOTSTRAP.md
|
||||
machine_hostname=mac-5
|
||||
machine_alias=mac5
|
||||
agent_id=codex-mac5
|
||||
memory_branch=main
|
||||
```
|
||||
|
||||
## MCP 接入要求
|
||||
- 先在客户端注册 MCP server(URL 指向 `...:8787/mcp`)。
|
||||
- 再通过 `@SESSION-BOOTSTRAP.md` 注入架构与规则。
|
||||
- 客户端本地检索可保留,但群体结论以 gateway 结果为准。
|
||||
Reference in New Issue
Block a user