feat: split assistant persona from worker persona
This commit is contained in:
@@ -96,7 +96,7 @@ GORI_AGENT_ROOT=/srv/gori-agent gori-agent list
|
||||
|
||||
```text
|
||||
configVersion 固定为 3
|
||||
bot Bot、workspace、persona、agent、skills、permissions
|
||||
bot Bot、workspace、persona、assistantPersona、agent、skills、permissions
|
||||
gateway HTTP server、入站 policy、唯一 platform
|
||||
runtime.acp ACP state、timeout 和 worker pool
|
||||
```
|
||||
@@ -109,6 +109,7 @@ runtime.acp ACP state、timeout 和 worker pool
|
||||
"id": "my-bot",
|
||||
"workspace": "/absolute/workspace",
|
||||
"persona": "Describe responsibilities, boundaries, and confirmation points.",
|
||||
"assistantPersona": "Optional speaking personality for the Assistant; falls back to persona when empty.",
|
||||
"agent": {
|
||||
"id": "kimi",
|
||||
"command": "/home/USER/.kimi-code/bin/kimi",
|
||||
@@ -127,6 +128,7 @@ runtime.acp ACP state、timeout 和 worker pool
|
||||
|
||||
- `bot.id` 只允许小写字母、数字和连字符,最长 63 字符。
|
||||
- `workspace` 与每个 skill `file` 必须是绝对路径。
|
||||
- Worker bootstrap 始终使用 `bot.persona`;Assistant 使用 `bot.assistantPersona`,为空时回退到 `bot.persona`。`assistantPersona` 只决定 Assistant 的讲话人格,可让运维 Bot 的 Assistant 说人话而 Worker 保持严格。
|
||||
- `bot.skills[]` 直接声明 `{ id, file, maxBytes }`;ID 必须唯一。
|
||||
- agent 使用 `shell: false` 在 `bot.workspace` 启动。
|
||||
- agent env 可能包含 secret,不能进入可提交模板、日志或 diff。
|
||||
@@ -210,7 +212,7 @@ Assistant 隔离与旧 side Session 一致且更严格:
|
||||
|
||||
state v3(`acp-sessions.json`)只保存 header(version 3、`botId`、platform)和 Assistant binding:conversation key(chat + user)、agent ID、native session ID、assistant workspace、Bot fingerprint 与时间戳。`proposals.json`(version 1)保存 Proposal 记录:title/goal/steps、owner chat、发起用户、状态、pending(`step | success | failure`)、worker native session ID 与进程组 PGID/token、时间戳;不保存消息正文。两个 store 都做单 writer lock、串行持久化、临时文件 + fsync + 原子 rename;version 或 identity 不匹配(含旧 state v1/v2)一律拒绝启动并保留原文件,不清空、不迁移。
|
||||
|
||||
Bot fingerprint 包含 bootstrap schema version、Bot ID、workspace、persona、agent 定义、permission policy 和 skill 路径/内容 hash;fingerprint 或 agent 不匹配的 binding 会被丢弃并重建 Assistant 会话。失败 prompt 不会自动重放,因为工具操作可能已有副作用。
|
||||
Bot fingerprint 包含 bootstrap schema version、Bot ID、workspace、persona、assistantPersona、agent 定义、permission policy 和 skill 路径/内容 hash;fingerprint 或 agent 不匹配的 binding 会被丢弃并重建 Assistant 会话。失败 prompt 不会自动重放,因为工具操作可能已有副作用。
|
||||
|
||||
## Workspace 独占
|
||||
|
||||
|
||||
Reference in New Issue
Block a user