Skip to content

feat(bots): 建立统一 Bot 运行时与会话基座 - #2829

Draft
zqchris wants to merge 57 commits into
makecindy:mainfrom
zqchris:cindy-bot-mode-mvp
Draft

feat(bots): 建立统一 Bot 运行时与会话基座#2829
zqchris wants to merge 57 commits into
makecindy:mainfrom
zqchris:cindy-bot-mode-mvp

Conversation

@zqchris

@zqchris zqchris commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

这次改了什么

摘要

把 Cindy 现有的任务、IM Bot 和自动化能力收敛成统一的 Cindy Bots 产品:Bot 默认是本地长期助手,Telegram、飞书、Slack 等是后挂 Channel;每个 Bot 拥有版本化身份、真实主任务、独立能力与记忆、状态变迁收件匣、Automation、Bot 间委派、项目/worktree、历史与可靠投递。

本 PR 复用 Hermes Bot Mode 的 Profile / SOUL / USER / runtime snapshot 分层,不由 UI 临时拼 system prompt;同时保留 Cindy 各 IM adapter 对引用、卡片、thread/topic、附件、群历史、托管方式和回执的差异。

这是长期累积的主动 Draft。当前 Bot 侧已经具备统一状态模型的消费端口、逻辑订阅、持久收件匣、heartbeat-turn / inbox-only 激活策略,以及零配置 Guardian Heartbeat(健康检查零 token;只在失联、漏事件或无人认领时合成异常并复用同一消费入口),但权威状态类型与 subscribe 出口由会话控制面 Draft #2804 提供。本 PR 不再从 turn 完成、标题 patch 或散落 status 字段自造事实;#2804 必须先合,本 PR 再对齐其最终公共类型与出口。

真实 IM、真实 Automation、真实 Bot 委派、真实旧库迁移、北极星总控闭环和双端视觉尚未验收,因此当前不能合并、不会转 Ready。

2026-08-17 已重新 fetch 并以 merge(非 rebase)合入当时最新的 upstream/main,当前主干已是本分支祖先;应用 migration 集已追平到 0093,解决旧分支构建打不开已升级验收库的问题。另提供固定、无需登录的离线验收沙箱 cindy-bots-offline-demo,由当前 checkout 的完整 migration 链现建数据库,不复制任何正式 userData、登录态或授权。

变更类型

  • feat 新功能
  • fix 缺陷修复
  • refactor / perf 重构或性能优化
  • docs / test / chore 文档、测试或工程维护
  • 其他:

范围

  • 关联 Issue / 需求:Cindy Bots 完整产品重构

已包含

  • Hermes 风格 Bot Profile/ProfileVersion、SOUL、USER context、三 Harness runtime snapshot;Skills、MCP、Toolset、Memory 和权限进入结构化运行时,不靠名称猜测或 UI 拼接。
  • Bot 主任务、每条 IM Route 任务、只读历史、Renew/恢复、归档/删除和独立于普通任务池的 Bots 目录;点击 Bot 直接进入标准 Cindy 任务对话与 ChatInput。
  • Bot 状态变迁消费端口、按逻辑关系与开放 facet 的订阅、消费 ledger、持久收件匣、去重、防自触发、事件时间线,以及 heartbeat-turn / inbox-only 激活策略。
  • 内置零配置 Guardian Heartbeat:活跃委派、逻辑订阅和未来关注列表自动形成监管集合;5—15 分钟自适应低频检查,单 Bot 每 tick 最多轮转 256 个目标;健康时不写事件、不起 turn、不烧 token;只对 stale-running / expected-event-missing / unclaimed-decision 合成事件并持久指纹去重。
  • 删除此前从 maker turn 结束、数据库标题/status patch 推导 Bot 事件的平行生产体系;架构门禁防止重新引入。
  • 旧 Draft 订阅规则自动升级;旧 Draft 已持久化收件匣保持可读、可恢复,但只标作旧通知,不重新解释为权威状态。
  • none / observe / coordinate 会话控制权限声明,以及控制 Bot 在处理通知前先查当前事实和队列的运行时规则。
  • 两步创建向导和三个开箱模板:总控、PR 总管、普通助理;模板一次写入身份、头像、能力、权限和推荐订阅。新 Bot 始终先创建为本地 Bot,不默认绑 Telegram。
  • Telegram、飞书等本地 adapter 与官方 Telegram/Slack relay 的挂载、账号归属、Route 和能力三态;本地 Telegram 精确匹配挂载账号,relay 保持 deliveryKey + opId,不可寻址时失败关闭,不串到本地账号。
  • Bot roster、Bot-to-Bot 委派、持久 lineage、预算/深度/并发/取消/恢复、完整子任务与产物回传;项目绑定、本地/远程 worktree lease、写入边界、引用保护和崩溃恢复。
  • Bot 会话自动注入能力级自知:明确自身是 Bot、可发现其它 Bot、委派并接收回传、查询或取消委派;回答“能不能”前先通过 list_tools 核对当前工具面,不在 prompt 中穷举具体工具名。目标 Bot 尚无主任务时,委派链会先创建真实主任务;委派请求和成功/失败/取消/超时终态同步投影到委派时冻结的目标主任务,完整执行仍保留在独立子任务,Renew 不会把请求与结果拆到新旧两个任务,恢复和重复终态按稳定 client ID 去重。
  • 标准 ChatInput 支持结构化 @Bot:候选只显示当前 Bot 之外的活跃 Bot,发送后持久保留 Bot ID/名称与委派或接力语义;旧客户端仍能读取消息正文中的 cindy://bot/<id> 链接并安全忽略未知引用元数据。
  • 发起方任务视图新增「Bot 委派进行中」状态条:存在 queued/waiting/running 出向委派时显示目标 Bot 名与已进行时长(每秒刷新),点击直达右栏 Bot 协同 tab(单个委派直接定位详情);全部落终态自动消失。纯 renderer,复用既有 listBotDelegationsonBotDelegationChanged 推送,不新增 IPC,带 dataOwnerGeneration 守卫。
  • Bots 界面标准化重设计(聊天优先):侧栏 Bot 行改为 IM 式——圆形彩色头像 + 名字 + 最近一条消息预览(消息落库实时刷新,800ms 去抖)+ 相对时间,悬停齿轮进设置,正常态不再显示健康图标;头像改为注册进主题表的 9 色相平色 token 家族(Light/Dark 双档,DESIGN.md §2/§10 已登记窄作用域例外),按名字自动分配色相与 emoji,旧 avatarColor 数据免迁移映射;创建向导合并为单屏(模板卡含「自定义」、内联头像编辑器、角色文案折叠可选,术语侧栏删除);设置页从单长滚动页重组为 7 组分栏导航(基本信息/通道/能力/自动化/通知/项目/高级,?settings=1&tab=<id> 可深链),身份提前、Renew 与生命周期/可移植性沉入「高级」。主进程仅扩展 bots 列表只读投影(canonical 会话最新可见消息预览,复用普通任务侧栏同一套可见性规则与索引)。
  • 官方 Cindy 头像与标准 Cindy 助手(commit 04a1113):保留 cindy://avatar/ 命名空间,桌面端渲染官方人物形象(账号头像同款资产,圆裁),头像选择器可选;「助理」模板升级为标准 Cindy 助手(品牌名 Cindy + 官方头像,零必填配置);移动端只读列表遇到该命名空间优雅回退为通用 emoji。
  • 角色预置头像(commit 2c2887c):用用户的图像模型以官方 Cindy 头像为风格参考生成 8 个同系列角色(柴犬/白猫/小机器人/小恐龙/耳机少女/星星少女/眼镜小熊/猫头鹰,256px 随包资产),进入 cindy://avatar/preset/<id> 命名空间;选择器新增「角色」区(官方 Cindy 第一格);新建 Bot 默认按名字 hash 分配角色而非 emoji;未知哨兵值回退首字母兜底,不出破图不漏原始字符串;头像艺术表面已按 DESIGN.md 既有登记模式补登记(含官方头像)。附带修复:主进程 IPC 的 avatar 16 字符上限会拒绝全部哨兵值(标准 Cindy 模板此前实际无法创建),放宽到 64 并保持拒绝 URL/大块数据。
  • 自动化与通知人话化(commit 33a50d6):自动化 tab 反转为类 cron 的 Routine 列表(人话时间表标签、逐行启用开关与「立即运行」、点行展开运行历史),新建只问「做什么 + 什么时候」,名称自动生成,项目/结果投递/运行笔记空间/运行上限/时区全部带默认值折入「高级」,空态给三个可点示例;通知 tab 文案全部去工程腔(不再出现持久收件箱/合成事件等),计数卡在无事件时不渲染。IPC 参数形态与运行历史/投递重试逻辑不变。
  • 设置页自动保存(commit 8ebe690):删除底部 取消/保存 条,设置改动自动落库——文本防抖 1.2s + blur 冲刷,离散选择即时合并提交,脏检查避免空写,在途提交串行化,离开/卸载/切 Bot 冲刷未落改动;header 显示短暂的「正在保存…/已保存」态与失败重试;「应用到当前对话」的版本提示改为离开设置页时弹出(不再打断编辑);表单按 bot.id 灌注避免在途保存回写覆盖正在输入的内容;归档 Bot 保持只读。updateBotProfile 载荷与主进程零改动。
  • IM 式未读(commit b6d167f):侧栏 Bot 行未读时名字/预览加粗并显示计数药丸(99+ 截断),收件箱待办降级为圆点;读位按数据主人隔离存本机,打开对话即清零、观看期间持续已读;既有 list IPC 接受可选读位表并按索引返回 assistant 未读计数,device-link 远端投影不含未读。
  • 用户侧名词改名为「伙伴」(commit 29084e5,参照 cumora.ai 的 AI teammates 定位):桌面 + 移动共 647 条文案 zh-CN 伙伴 / zh-TW 夥伴 / en teammate(s) / ja 仲間 / ko 동료,韩语助词、日语语感逐条处理;Telegram/飞书/Discord 等消息平台 bot、@Botfather、GitHub App 官方 bot 属另一概念逐条保留原词;术语表新增 proposed 条目记录适用范围与平台 bot 判据;key/路由/标识符/wire 格式全部不变。
  • 能力芯片墙与「动手做事」默认开(commit c3fff40,能力模型重策划批次 1+2,策划文档见 ChrisData/Project/Cindy-伙伴能力模型重策划-2026-08-18.md):能力 tab 重构为人话芯片(动手做事=信任权限、定时干活=automation、每个可连渠道一枚芯片复用挂载逻辑,未连账号置灰给指引);harness/模型/skills/toolsets/MCP 明细/其它任务权限整体沉入「高级」专家区;记忆开关从一级 UI 移除(恒开,仅存量关闭者在高级见恢复入口);「叫伙伴帮忙」有意不做芯片——引擎侧委派本就搭在信任权限上。新建伙伴默认信任(单一常量层,存量伙伴不静默升权),信任伙伴在侧栏与设置头部显示 icon-only ⚠ 徽标,点击直达芯片。附带修复:渠道迁移/回滚确认弹窗此前只在通道 tab 分支渲染,其它入口挂载会静默无响应。
  • 合入最新 upstream/main(commit 3f564f7,此前落后 74 个 commit):migration 撞号按规则处理——上游占用 0092,本分支 schema 意图基于最新链重新生成为 0093_bots_runtime_foundation(幂等 DDL;right_sidebar_tabs 单例索引保留在带守卫的 companion,因老世系回放到此处该表尚不存在);并剔除一条上游 0092 快照回退导致会被重复回放的 sessions.codex_plan_json ALTER。db:validate 与全部 migration 回放测试通过。⚠ 已知上游问题待上报:upstream 0092_fixed_zeigeist 的快照丢失了 0091 companion 加的 codex_plan_json 列,任何人在 main 上生成下一条 migration 都会复踩。
  • 定稿设计缝合批次 α(commit 7f0fa26,定稿依据:Chris 逐屏验收的交互原型 + 实施地图):创建对话框改为阵容式——六个人格伙伴(Cindy/小柴/Melody/本本/星星/阿枢)第一人称自我介绍卡,选卡即建,自定义卡保留最小流程,导入下沉为页脚文字链;新伙伴入伙即打招呼(纯 renderer 幂等欢迎消息:固定 clientId + 仅注入可证明为空的主任务);伙伴对话 assistant 气泡带头像、composer 隐藏权限 chip 与模型选择器(配置仍生效,入口在高级);侧栏行删除 hover 齿轮与 ⚠ 徽标(设计裁决收回),设置入口改为顶栏伙伴名/头像与齿轮;全局设置新增「伙伴」小节(通知偏好、逐伙伴导出、导入)。
  • 定稿设计缝合批次 β(commit d917669):设置页从 7-tab 收敛为定稿的一页四区块(TA 是谁/会的/懂的/日程)+「高级」收纳全部引擎控制面,旧深链 tab 值映射锚点;「调整性格」三步引导编译为 identitySource 内稳定标记包裹的人格段(真提示词材料,roundtrip 反解、不碰手写内容);「TA 记得的」接真数据——bot 记忆本就在 makerMemory 引擎按 bot 分域,新增 list/delete/clear 三个最小 IPC 复用现成 store(可看可删可清空,全局记忆开关关闭时仍可管理自己的数据);能力池改陈列式 +「可以连上」单 IM 互斥(UI 门,存量多连如实显示);建 Routine 不再要求先启用自动化。
  • 定稿设计缝合批次 γ(commit 173e93e,群聊级协作):委派在父任务里渲染为实时协作卡(加入头、呼吸状态、逐秒时长、终态收拢战报),锚点走镜像消息的结构化 agent_meta(严格解析、旧数据照旧文本渲染);结果渲染为客座气泡(头像 + 中性「客座」标签),卡与气泡双向可打开对方任务;新增插话通道(IPC + interject_bot_delegation MCP 工具)——对 queued/waiting/running 委派催促/补充,归属双校验、终态拒绝、子任务忙时按会话既有语义排队、父任务留痕;连环接力(策划→设计读取前棒结论 + 运行中插话)有集成测试钉住。附带修复:嵌套委派下重启恢复会把锚点/插话误当结果;协作锚点行不再污染列表预览与标题。另:合入最新 upstream/main(8d77b8f62,ChatInput 双方新增共存/readOnly 门保留/新图标提示契约补齐);本机全量跑主进程个别套件红为上游基线问题(orcaTeamStore 等 no such column: sessions.codex_plan_json,已在 pristine upstream/main 逐字复现,与本分支无关)。
  • 定稿设计缝合批次 δ(commit 977de57,交付物):伙伴对话内文件产出渲染为四型交付物卡(文档/表格/图片真缩略/演示/其它,打开动作复用既有 Lightbox/系统打开链路),协作卡上的委派产物同卡呈现;新增只读投影 bots:artifacts 按伙伴聚合三路来源(委派 outputArtifacts、tool_use 新建文件、消息附件),跨源去重 + 存在性校验 + 上限与如实截断标记,协议引用不解析磁盘路径;新增右栏「交付物」tab(数量/类型过滤/两列网格/空态与远程降级),伙伴会话右栏默认落交付物、协同 tab 共存;术语「交付物」入术语表 proposed。
  • 定稿设计缝合批次 ε(commit cfdbe77,成长时刻):伙伴回合内写过记忆时,收尾气泡末尾出现极淡成长注脚(✦ 记住了:<标题>,同回合合并,仅收尾正文),点击跳该伙伴设置并短暂高亮对应列表——纯 renderer 从既有 memory_write 的 tool_use 行判定,零引擎改动零新 IPC;「TA 学会的」以 learned- slug 约定复用同一记忆分域,与「TA 记得的」并列、同步删除。system prompt 改动声明(maker-core 规则要求显式评审):bot 能力上下文提示新增一句常量文本教伙伴用 learned- 前缀记录可复用做法——仅 bot 会话、无会话变量、不影响普通任务;删除该句则「TA 学会的」永为空(有测试锁定该联动)。
  • 终态出厂批次(commits dcc0231 + a7b4dcd,Chris 终态交付令):对稿差距矩阵 P0 3 项全修(阵容改 /bots/roster 主区页面并删除卖点推销页与创建弹窗、协作卡终态补结论全文、首次进入流);P1 14 项全修(未读徽标登记 #417CDD 蓝 token、约 22 句文案回定稿、侧栏 40px 头像去 health 列、设置 header 加入时长、历史会话气泡头像等);静态渲染 harness(真组件+真主题+真 i18n)双主题×双宽度×多语言 52 张截图机审+目检,额外修复 7 项——含 4 个从未注册的幽灵 token(--text-danger/--status-success/--status-info/--danger-bg-soft,本分支历史缺陷,注册+防回归断言+分模式对比度取值);「调整性格」保存后回对话并由伙伴以新口气确认(幂等注入);侧栏「正在输入…」(复用 island 活动镜像,无新 IPC);interject 幂等键全链贯通;再合最新 upstream/main。最终验收指引(含对稿自验结果表):~/Documents/ChrisData/Project/Cindy-伙伴-最终验收指引-2026-08-19.md。
  • 终验打回单整批回应(commits a8c82f0…cdb403079,六个):①委派全链根因修复——子任务继承目标伙伴执行配置(providerId/档位),不可自愈失败立即终态并把原因作为结果回传发起方对话,真链路测试只桩模型进程;②诚实控制面——恢复伙伴输入框模型/权限选择器并接通 Profile 回写、侧栏间距数值基线测试、删「其它任务权限」与「定时干活」假开关(顺带修掉存量伙伴 Routine 必抛错的死门)、七个 IM 渠道原地拉起真实连接流程;③记忆同源——修复 PI 伙伴两张皮(写进项目库)与远端 Claude Code 同缝、全局开关关闭时不再假承诺、全链进程内证据套件;④人格暴露与 AI 角色生成——背景设定一等可编辑、模板种子记忆真实入库、一句话生成完整角色草稿(skill/MCP 自动配置调研后不落地,方案在案);⑤空头支票清查——约 120 项逐项对照,删 9 假摆(含无人消费的通知三行)、接通 6、状态修正 3、文案改真话 7×5 语言、分离侧栏必崩与 SSH 远端通告宽于执行已修;⑥合最新 upstream/main。二轮终验指引与审计台账:~/Documents/ChrisData/Project/Cindy-伙伴-二轮终验指引-2026-08-19.md、Cindy-伙伴-空头支票审计台账-2026-08-19.md。
  • Bot Automation 的定时/立即触发、冻结执行计划、运行历史、持久 note namespace、委派策略和执行/投递分离。
  • delivery outbox、ACK/retry/unknown/dead-letter、附件生命周期、Route generation 和显式重复风险确认。
  • 0092/0093 只增量 schema、旧 IM 主动迁移/rollback、0000—0093 连续 migration 回放,以及新旧数据 × 新旧代码四格兼容契约。
  • Desktop Bots UI;Mobile 经 device-link 只读列出 Bot 并打开真实主任务;完成矩阵、兼容契约、Telegram 双 Bot 能力台账和静态设计契约。
  • Bot 主任务加载失败改为可恢复错误态,提供诊断、重试和返回入口,不再静默跳回首页;收件匣、Automation 与投递错误支持查看完整长文本,截断名称保留 tooltip。行为证据表已覆盖默认人格、三个模板、结构化 @Bot、旧客户端兼容和错误恢复路径。

不包含 / 明确依赖

  • 合并依赖顺序:会话控制面 Draft feat: 让 cindy_helper 可查看会话排队消息 #2804 先合,本 PR 后合。

  • feat: 让 cindy_helper 可查看会话排队消息 #2804 尚未提供最终统一状态类型和 subscribe 出口,因此当前没有权威状态 source 接入;不能声称“任意任务状态变迁 → Bot 收件匣”的真实闭环已完成。

  • feat: 让 cindy_helper 可查看会话排队消息 #2804 落地后,本 PR 必须把临时 BotObservedSessionState / BotSessionStateTransitionSource adapter 到其最终导出类型,并绑定真实 subscribe 出口。

  • 真正的查状态、查队列、派活、插话和停止由 feat: 让 cindy_helper 可查看会话排队消息 #2804cindy_helper 工具逐次鉴权;本 PR 已完成 Bot 侧权限声明与预留接线,不把依赖冒充为真实控制 E2E。

  • 不修改独立服务端仓库;服务端 relay 的真实组合行为留给现场验收。

  • 不把不同 IM adapter 强行改成同一种消息实现;无法同源的能力按明确 degraded/unsupported 行为和用户可见说明处理。

  • 不新增 Mobile 原生依赖、原生配置或 runtime fingerprint。

  • 不宣称五项真实环境验收已经完成。

  • 用户可见变化:左侧新增 Bots 固定目录;Bot 是有长期身份、状态收件匣、Automation、委派和可挂 IM 的长期助手,而不是换皮任务。创建默认本地 Bot,IM Channel 后续按需挂载;能力受限时显示具体原因。

  • 是否存在 breaking change:无静默 breaking。0092/0093 只新增表和索引,不改写旧 IM 表;旧代码遇到新 schema 必须按现有兼容守卫失败关闭。要退回旧安装版时,使用迁移前数据库备份,详见 docs/product-rules/cindy-bots-compatibility.md

北极星上手体验剧本

  1. 创建“总控”模板 Bot,并挂载 Telegram。
  2. 通过统一状态模型,让任意其它任务进入正常结束、出错、等拍板、待验收或待总控状态。
  3. 权威变迁命中“全部本机 / 我委派的 / 关注列表”等逻辑订阅,持久进入总控 Bot 收件匣,并按 heartbeat-turn 策略激活 Bot。
  4. 总控 Bot 通过会话控制面重新查询任务事实与队列,再派活、插话或请求停止;收件匣通知不被当作当前真相。
  5. Bot 把自己的处理结果投递到 Telegram。任务内部状态变迁不直接越过 Bot 发到 IM。
  6. 让被监管任务保持 running 且超过阈值无活动,或进入待决策但无人认领;确认 Guardian 仅唤醒一次,同一异常不重复投递,监管集合清空后 timer 自动停止。
  7. 给 PR 总管模板挂一个 Automation,确认它按同一产品模型定时运行,而不是另一套特殊系统。
  8. 让一个 Bot 真实委派另一个 Bot,确认子任务正文、产物和回传在父任务侧栏长期可查。

今天实踩的“任务停在待总控几小时但没人知道”必须在第 2—4 步被消灭;若状态变迁未进入收件匣、Bot 未激活或无法重新查询事实,本 PR 不得转 Ready。该剧本当前等待 #2804 接入和 Chris 在场实测。

UI 变化

  • 引用的设计规范:
    • docs/design-rules/DESIGN.md:语义 token、零阴影、标准圆角和间距、主题遮罩、标准任务对话、Light/Dark 双模式。
    • docs/product-rules/task-and-conversation-naming.md:面向用户使用“任务 / 对话 / 消息”的既有边界。
  • Desktop Bot 主区域复用真实任务消息流和 ChatInput;管理能力放在设置入口;创建向导、空态、模板、头像、健康状态和待处理事件数使用同一 Bots 产品壳。
  • 对话输入直接复用标准 ChatInput 的 @ 面板:选择其它 Bot 后形成原生 mention chip,并沿消息队列、历史和重试链持久保留目标身份;Bot 任务加载失败留在原页面显示可操作错误态。
  • Mobile 使用现有主题 token 与同一组件树适配 Light/Dark。真实 Desktop/Mobile 截图和视觉目检尚未执行。

离线验收沙箱

固定沙箱名:cindy-bots-offline-demo。当前分支根目录执行:

pnpm demo:bots-offline -- --replace

默认生成到:

~/Library/Application Support/CindyGlobal-dev2-cindy-bots-offline-demo

后续仅由 Chris 或总控在明确授权后启动;本批没有启动:

pnpm restart:desktop:remote -- --isolated=cindy-bots-offline-demo --region=global

无需登录即可离线查看:

  • 三个不同状态的 Bot:正常总控、可恢复异常 PR 总管、暂停的普通助理。
  • 直接读取产品 control 模板的总控身份、头像、职责与能力。
  • 已处理、失败、待处理三种事件收件匣状态。
  • 已送达、终态失败、可重试三种投递历史。
  • 一个已归档历史任务及消息、标准任务输入框、空态和错误态。
  • Desktop Light / Dark UI;不需要账号,也不会自动唤起 Agent turn(演示订阅固定为 inbox-only)。

种库脚本默认拒绝覆盖现有目录;--replace 也只接受带本脚本所有权标记的演示目录,避免误删其它 userData。

怎么验证的

已验证

pnpm test:unit:related
结果:通过;runner 409 passed / 1 skipped,Desktop、Mobile、device-link、lizi-im、lizi-mcps、maker-cc-manager、maker-core、maker-scheduler、orca-workflow 等全部通过。

pnpm --filter desktop run --if-present typecheck
结果:通过。

pnpm --dir apps/desktop exec vitest run --pool=threads --maxWorkers=1   src/shared/__tests__/botSessionEvents.test.ts   src/main/maker-ipc/__tests__/botSessionEventService.test.ts   src/main/maker-ipc/__tests__/botSessionStateSourceContract.test.ts   src/main/localDb/__tests__/botMigrationReplay.test.ts   src/main/localDb/__tests__/botImMigrationService.test.ts
结果:5 个文件、23 项通过;覆盖逻辑订阅、自激活、去重、自循环阻断、control-plane source 绑定、旧 Draft 收件匣兼容、migration 回放与旧 IM migration。

pnpm --dir apps/desktop exec vitest run --pool=threads --maxWorkers=1   src/shared/__tests__/botSessionEvents.test.ts   src/main/maker-ipc/__tests__/botSessionEventService.test.ts   src/main/maker-ipc/__tests__/botGuardianHeartbeat.test.ts
结果:3 个文件、26 项通过;覆盖健康检查零 token、三类异常、持久去重、256 目标轮转、监管清空、并发 refresh、暂停后不迟到唤醒、隐藏订阅 owner 冲突和 `inbox-only` 不阻塞。

pnpm check:dco
git diff --check
结果:通过。

本批 merge 最新主干后又完成:

pnpm --filter desktop run --if-present typecheck
pnpm --filter mobile run --if-present typecheck
pnpm --filter @cindy/responses-chat-bridge run --if-present typecheck
结果:全部通过。

pnpm --filter desktop db:validate
结果:通过;94 个 SQL migration,序号 0000—0093 连续,journal / snapshot / runtime script / 历史冻结全部一致。

pnpm --filter desktop test:migration-replay
结果:6/6 通过。

pnpm demo:bots-offline -- --json
结果:生成固定沙箱;3 Bots / 7 tasks / 3 inbox / 3 deliveries;schema_version=93,integrity=ok,foreign key violations=0,activationMode=inbox-only,无 safe-storage。

此前本 Draft 的 pnpm check:i18n-glossary 结果仍保持通过;本批没有修改词汇表。

本轮 P0/P1 收口(合入 2026-08-17 最新 upstream/main 后)再次验证:

pnpm test:unit:related
结果:通过;Desktop、Mobile、maker-core、maker-shared、lizi-mcps 等相关 workspace 全部通过。

pnpm --filter desktop run --if-present typecheck
结果:通过。

pnpm --filter @cindy/maker-shared run --if-present typecheck
结果:该 package 无 typecheck script,按门禁安全跳过。

pnpm check:i18n-glossary
结果:通过;无新增违规,只有既有 proposed 术语告警。

pnpm check:dco
git diff --check
结果:通过;当前提交范围 DCO 通过,最新主干是当前 head 的祖先。

回归覆盖包括:添加向导不会被任务路由自动关闭;默认人格与三个预置人格都会获得同一 Bot 能力自知;能力说明要求先发现工具面再回答;委派目标无主任务时自动创建主任务,目标主任务可直接看到请求与终态结果,完整子任务仍独立归档;成功、失败、取消、超时、执行中 Renew、重复 settle 与重启恢复均有回归;标准 ChatInput 的结构化 @Bot 引用可序列化、投影、排队、历史展示和旧客户端降级;Bot 任务加载失败可重试且不静默跳转;长错误与投递内容可完整查看。

本轮 Bots 标准化重设计验证(commit 72cee3b):

pnpm --filter desktop exec vitest run src/renderer/features/bots src/main/localDb/ipc/__tests__/botCanonicalSession.test.ts
结果:12 个测试文件 147 项全部通过(含头像分配稳定性/旧数据映射、创建对话框单屏与必填校验、侧栏预览回退链与时间格式、设置分组导航与深链回落、bots 投影预览 SQL、botDesignContract 设计契约扫描)。

pnpm test:unit:related / desktop typecheck / pnpm check:i18n / pnpm check:i18n-glossary / pnpm check:dco / git diff --check
结果:全部通过。i18n 五语言 key 对齐。
Light/Dark 未实机目检(按约束不启动客户端);全部颜色走语义 token,头像色 9 token 双模式各一档已登记进 DESIGN.md。

上一轮「Bot 委派进行中」状态条验证:

pnpm --filter desktop exec vitest run src/renderer/features/bots/__tests__/BotDelegationActivityIndicator.test.tsx
结果:8/8 通过(单/多委派文案、终态隐藏、推送刷新、跨会话推送忽略、点击定位、列表读取失败隐藏、卸载解绑)。

pnpm --filter desktop run typecheck
pnpm test:unit:related
pnpm check:i18n
pnpm check:i18n-glossary
pnpm check:dco
git diff --check
结果:全部通过。i18n 覆盖 en/zh-CN/zh-TW/ja/ko 五语言。
Light/Dark 未实机目检(按约束不启动客户端);颜色全部走语义 token。已知现状:Bot 面板沿用的 `--status-info` 系 token 尚未进主题注册表,本组件用 `var(--status-info, var(--info-700))` 兜底保证双模式可见,`--status-*` 家族注册与否留待后续裁决。

上一轮委派记录可见性修复验证:

pnpm --filter desktop exec vitest run src/main/localDb/ipc/__tests__/botCanonicalSession.test.ts
结果:83/83 通过。

pnpm --filter desktop run --if-present typecheck
pnpm test:unit:related
pnpm check:i18n-glossary
pnpm check:dco
git diff --check
node scripts/pr-drift-check.mjs 2829
结果:全部通过。

手工验证

本批只实际运行了离线种库与数据库完整性检查,没有打开客户端。按约束没有启动 Dev、Electron、Vite、CDP 或任何客户端进程,也没有读取或修改模型授权、登录态或正式 userData。固定演示沙箱已用当前 migration 0093 重建;旧的本任务生成沙箱副本已移入废纸篓。

离线 UI 验收(无需登录)

Chris 或总控使用上面的固定命令启动后,可直接完成 Bot 目录、三种 Bot 状态、模板身份、主任务、事件时间线、历史任务、投递成功/失败/恢复、空态和错误态的 Desktop Light / Dark 目检。所有演示项都来自隔离 profile,不需要登录,不会碰正式版授权。

需活账号待验

  1. Telegram 与飞书各真实收发一轮,检查引用、卡片、附件、thread/topic、群历史和降级说明。
  2. 总控 Bot 挂 Telegram 后完成北极星闭环:任意任务状态变迁 → Bot 收件并激活 → 控制面查事实/推进 → Telegram 汇报。

需 Chris 真实环境待验(不强制要求登录)

  1. 创建一个短延时 Bot Automation,确认真实触发一次,并分别查看执行状态与投递状态。
  2. 让一个 Bot 真实委派另一个 Bot:打开目标 Bot 主任务能直接看到委派请求与最终回答;独立子任务正文、产物和返回结果仍可长期回查;执行中 Renew 后结果仍留在原委派记录所在任务。委派执行期间,发起方任务视图应出现「正在委派 <Bot 名> 处理…」状态条并实时计时,点击可打开右栏委派详情;委派落终态后状态条消失。
  3. Bots 重设计目检:侧栏 Bot 行显示圆形彩色头像与最近一条消息(发消息后约 1 秒内刷新);新建 Bot 单屏完成且头像默认即好看、可点开更换;设置页 7 组导航可切换、可深链、Renew 在「高级」组;Light/Dark 双模式对比。另验:创建对话框选「助理」模板显示官方 Cindy 头像与名字 Cindy;头像选择器「角色」区官方 Cindy + 8 角色齐全且 Light/Dark 下清晰;新建自定义 Bot 默认分到角色头像且能成功创建(IPC 上限修复的回归点)。
  4. 自动化与通知目检:自动化 tab 只填一句指令即可创建 Routine(默认每天 09:00)并出现在列表;时间表四档切换正常;「高级」默认收起;启用开关与「立即运行」可用;通知 tab 文案为人话且无事件时不显示 0/0/0 计数卡。
  5. 自动保存目检:改名字/描述/能力勾选后不点任何按钮,等约 2 秒见「已保存」轻提示,切走再回来改动仍在;正在输入时不弹「应用到当前对话」,离开设置页时才提示;断言底部不再有 取消/保存 条。
  6. 二轮终验(当前唯一入口):按 ~/Documents/ChrisData/Project/Cindy-伙伴-二轮终验指引-2026-08-19.md——打回单逐条回应 + 真机验收清单七步(委派零催促全链/退出登录失败态/催促停止互看/真模型记忆/AI 生成/SSH 白名单/双模式观感)。
  7. 一轮验收入口(历史):按 ~/Documents/ChrisData/Project/Cindy-伙伴-最终验收指引-2026-08-19.md 的九步产品旅程走一遍;下方 11-16 项为历史批次明细,已并入指引,无需逐项重走。
  8. 缝合批次 ε 目检:让伙伴记住一件事(如「记住我周三下午不排会」)——回合结束的气泡末尾出现「✦ 记住了:…」淡注脚,点击跳设置并高亮「TA 记得的」;伙伴主动沉淀 learned- 条目后「TA 学会的」出现本事行且可删;普通任务无任何注脚。
  9. 缝合批次 δ 目检:让伙伴产出一个文件(写个 md/生成图片)——对话内出现交付物卡且能打开;右栏开关默认打开「交付物」面板,计数与类型过滤正确,点卡能开文件;委派回传的产物在协作卡上也是卡形态;另一伙伴的仓库互不串。
  10. 缝合批次 γ 目检:让 Cindy 委派另一伙伴——父任务出现协作卡(状态与秒数实时走),点「催一下」输入一句后对方队列收到且父任务留痕,「停止」立即中止,「看 TA 的对话」打开子任务且目标主任务能跳回;完成后结果为带头像与「客座」标签的气泡;连环两棒(先策划再设计)顺序正确;旧委派历史(升级前的镜像消息)仍为普通文本不报错。
  11. 缝合批次 β 目检:设置页为一页四区块+高级;「调整性格」三步选完摘要生效且伙伴身份文本含人格段、再开引导回显选择、手写内容不丢;「TA 记得的」显示真实记忆条目且可删可清空;IM 已连一个后其余 IM 置灰;不启用任何东西直接建 Routine 能成功。
  12. 缝合批次 α 目检:添加伙伴是六张角色卡且选卡即建、入伙先打招呼(重开任务不重复打招呼);伙伴气泡带头像而普通任务不带;伙伴 composer 无权限/模型行而普通任务保持原样;侧栏行无齿轮无 ⚠;顶栏点名字/齿轮进设置;全局设置有「伙伴」小节。
  13. 能力芯片目检:能力 tab 只见人话芯片(动手做事/定时干活/各渠道),技术明细在「高级」;新建伙伴默认带 ⚠ 徽标(信任),点徽标跳到动手做事芯片;关掉芯片徽标消失;未连账号的渠道芯片置灰有指引。⚠ 沙箱注意:本分支 migration 已重编号(旧 0092_motionless/0093_bot_session_event_inbox → 新 0093_bots_runtime_foundation),旧沙箱库建议重建(幂等 DDL 下原地升级也应安全,但重建最干净)。
  14. 未读与改名目检:让某个伙伴产生新回复后不打开它——侧栏该行名字加粗 + 计数药丸;点开后角标清零,停留期间新消息不再标未读;全界面用户可见文案已是「伙伴/teammate」,而 Telegram/飞书等平台 bot 相关设置仍叫 Bot(有意保留);日/韩语言切过去抽查语感。
  15. 对真实旧 IM 数据副本执行预检、迁移和 rollback,确认原任务、消息、群历史、附件及旧入口可恢复。
  16. Mobile 实机打开同一 Bot 主任务并检查布局;固定沙箱只覆盖 Desktop 离线 UI。
  17. feat: 让 cindy_helper 可查看会话排队消息 #2804 合入并完成接线后,验证统一状态 source 与控制面真实接线。
  18. Guardian 兜底:让一个被监管任务超时无活动,再让一个任务进入待决策但无人认领;两类异常都只提醒一次,清空监管关系后不再排程。

风险

风险分类

  • 无已知风险
  • SQLite / migration
  • system prompt
  • 协议兼容
  • 权限 / 安全 / 用户数据
  • 存量插件兼容(批准状态 / 指纹 / manifest 校验 / 安装布局 / 包格式)
  • 原生层 / fingerprint / OTA
  • 跨平台差异
  • 其他:统一状态模型依赖、Automation、Bot 间委派、IM 可靠投递、远程 workspace 与回滚

影响与回滚

  • 影响范围:Desktop/Mobile Bots UI、本地数据库、Maker IPC、三 Harness runtime、Scheduler、个人 IM、官方 Bot 共享层、device-link、远程 workspace 和消息投递。
  • 回滚 / 降级方式:当前保持 Draft,不进入合并队列。0092/0093 只新增表和索引,不改写旧 IM 表;单个 Channel 不可用时保留本地 Bot 与主任务并显示明确 degraded/unsupported 状态,不静默改绑其它账号。要运行不理解 schema 93 的旧安装版时,必须恢复迁移前数据库备份,不能让旧代码强开新库。
  • 统一状态模型依赖:feat: 让 cindy_helper 可查看会话排队消息 #2804 必须先合;其最终状态类型或 subscribe 出口变化时,本 PR 转 Ready 前必须完成 adapter、真实绑定和北极星 E2E。Guardian 当前也只消费 BotSessionStateTransitionSource.readSnapshot 合同,未绑定真实 source;此前没有 fallback producer,避免两套任务事实再次分叉。
  • 会话控制权限依赖:coordinate 只代表 Bot 的授权上限,不代表绕过 cindy_helper 的逐次鉴权。
  • 存量插件影响:无预期行为改变。关联修正不改变 receipt schema、批准状态、指纹、manifest、安装布局或包格式,不要求重装或重新授权。
  • 当前不能合并的原因:feat: 让 cindy_helper 可查看会话排队消息 #2804 尚未提供权威状态 source;五项真实环境验收和北极星总控闭环均未执行。只有完成依赖接线、Chris 在场验收并处理发现的问题后,才可考虑转 Ready。

提交前检查

  • 已 review 完整 diff
  • 每个 commit 都带 DCO 签名(git commit -s,见 DCO
  • UI 改动已在“UI 变化”注明引用的设计规范章节
  • 未提交凭证、令牌或授权文件
  • 已补充必要文档
  • 已确认测试结果或说明未执行原因

zqchris added 30 commits August 16, 2026 18:31
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

# Conflicts:
#	apps/desktop/drizzle/meta/_journal.json
#	apps/desktop/src/main/im/shared/__tests__/stopCommandRouting.test.ts
#	apps/desktop/src/main/im/shared/messageHandler.ts
#	apps/desktop/src/main/im/shared/slashCommands.ts
#	packages/lizi-im/src/channelIM.ts
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

# Conflicts:
#	apps/desktop/src/main/bootstrap-electron.ts
#	docs/product-rules/telegram-bot-parity.md
#	packages/maker-core/src/agents/base-agent.ts
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Round flat-tint avatars from a registered 9-hue token family (light/dark),
  auto-assigned per bot name; legacy avatarColor values map without migration
- One-screen create dialog: template cards incl. custom, inline avatar picker,
  role text optional behind a collapsed section; jargon aside removed
- IM-style sidebar rows: latest-message preview with live refresh, relative
  time, hover gear entry; healthy state no longer draws an icon
- Settings reorganized into 7 grouped tabs with deep links; identity first,
  renew/lifecycle/portability demoted to Advanced

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Reserved cindy://avatar/ namespace renders the official character art;
  picker offers it first, auto-assignment still yields emoji only
- Assistant template becomes the standard Cindy bot: brand name + official
  avatar on the neutral fill, zero required configuration
- Mobile read-only roster degrades the sentinel to the generic bot emoji

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Eight bundled character portraits (generated with the user's image model
  against the official Cindy artwork as style reference) join the reserved
  cindy://avatar/ namespace; picker gains a Characters section
- New bots default to a hash-assigned character instead of an emoji
- Fix main IPC 16-char avatar cap that rejected every sentinel value,
  including the standard Cindy assistant template
- Register the Bot avatar artwork surface in DESIGN.md; unknown sentinels
  degrade to the initial fallback

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Automation tab is list-first: routines read like a scheduled-task list
  with human schedule labels, run-now, and an enable switch per row
- Creating a routine asks only what to do and when; name auto-derives,
  engine knobs (project, delivery, notes space, limits) move behind a
  collapsed Advanced section with working defaults
- Empty state offers three clickable routine examples
- Notifications tab copy rewritten in plain language; counts hidden until
  events exist; toggle uses the shared Switch

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Settings persist automatically: text debounced 1.2s with blur flush,
  discrete picks coalesce instantly; dirty-check against the last committed
  baseline, serialized in-flight commits, flush on leave/unmount/bot switch
- Bottom cancel/save bar removed; header shows transient saving/saved state
  and an inline retry on failure
- Profile-apply prompt now surfaces when leaving settings instead of
  mid-edit; form hydrates per bot id so in-flight saves cannot clobber edits
- Archived bots stay read-only (autosave disabled entirely)

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Owner-scoped local read positions; existing list IPC accepts an optional
  lastReadAtByBotId map and returns per-bot assistant-message unread counts
  via the indexed canonical-chat query (same visibility rules as previews)
- Sidebar rows bold name and preview when unread and show a count pill
  (99+ cap); inbox attention demotes to a dot while unread counts lead
- Opening a bot's chat marks it read and keeps it read while watching;
  device-link remote projections stay unread-free

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- 647 locale strings across desktop and mobile: zh-CN 伙伴 / zh-TW 夥伴 /
  en teammate(s) / ja 仲間 / ko 동료, with per-language particle and
  naturalness handling
- IM-platform bots (Telegram/Feishu/Discord tokens, @Botfather, GitHub App)
  keep the word Bot - different concept, excluded case by case
- New proposed glossary entry records the scope and the platform-bot
  distinction; keys, routes, identifiers and wire formats unchanged

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
zqchris added 20 commits August 18, 2026 15:38
- Capabilities tab becomes a plain-language chip wall: act (trust), work on
  a schedule, and one chip per connectable channel (greyed with a connect
  hint when no account); harness/model/skills/toolsets/MCP/other-task
  access move verbatim under an Advanced expert section
- Memory switch removed from primary UI (recovery row only for bots stored
  off); teammate delegation intentionally not chipped - the engine gates it
  on trust already
- New teammates default to trusted via one shared leaf constant (renderer
  is the authoritative layer); stored bots keep their setting
- Trusted teammates show an icon-only warning badge in the sidebar and
  settings header; clicking it jumps to the act chip
- Fix: channel migration/rollback dialogs rendered only inside the
  channels tab branch; mounting from elsewhere silently no-oped

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Regenerate the bots migration on the latest chain per the collision rule:
upstream took 0092, so our schema intent is re-emitted as
0093_bots_runtime_foundation (idempotent DDL; the right_sidebar_tabs
singleton index stays in the guarded companion because legacy lineages
lack that table). Dropped the duplicate sessions.codex_plan_json ALTER
that upstream's 0092 snapshot regression would have replayed twice.

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Create dialog becomes the approved roster: six persona teammates
  (Cindy, Xiaochai, Melody, Benben, Xingxing, Ashu) with first-person
  intros; picking a card creates immediately, custom card keeps the
  minimal name+avatar flow, import sinks to a quiet footer link
- New teammates greet you: idempotent renderer-side welcome message
  (fixed clientId, only into a provably empty canonical chat)
- Teammate chats show the avatar beside assistant bubbles and hide the
  permission chip and model selector in the composer (config lives on)
- Sidebar rows drop the hover gear and the trusted badge; settings entry
  moves to the header lockup and gear; global Settings gains a 伙伴
  section (notification prefs, import/export)

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Settings collapse from seven tabs to the approved four blocks (who they
  are / what they can do / what they know / their schedule) plus a quiet
  Advanced expander holding every engine-facing control; old tab deep
  links map to anchors
- Guided three-step persona wizard compiles into a fenced persona block
  inside identitySource (real prompt material in template voice) and
  round-trips its own selections without touching hand-written text
- Memories list reads the bot's real maker-memory scope via three minimal
  read/delete IPC handlers on the existing engine store; learned-skills
  block ships as an empty state for the growth batch
- Ability wall states built-ins as facts; channel connect list enforces
  one IM per teammate (UI gate; legacy multi-connections stay honest)
- Creating a routine no longer requires enabling automation first

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Keep both sides in ChatInput (bot mentions + unified model draft select),
keep the bot-session guard alongside upstream's optimistic title preview
in sessionsStore, retain the branch readOnly gating over upstream's
reflowed conditions, and adopt upstream's broadened skill-projection
refresh. Wrap the delegation back button in the managed Tip to satisfy
upstream's new icon-tooltip contract.

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Delegations render as live inline collaboration cards (joined header,
  breathing status, ticking elapsed, collapse to a summary line) anchored
  by structured agent_meta on the existing mirror messages; unmarked
  legacy mirrors keep rendering as plain text
- Completed results render as guest bubbles with the teammate's avatar
  and a neutral guest tag; both card and bubble open the other task, and
  the target-side mirror links back to the requesting task
- New interject channel: nudge or amend a queued/waiting/running
  delegation from the parent (ownership double-checked, terminal states
  refused, busy child queues per existing session semantics, the nudge
  leaves a trace in the parent); exposed as an IPC handler and an
  interject_bot_delegation MCP tool for chained orchestration
- Chained hand-off covered by an integration test (plan -> design relay
  reading the previous result, interjecting mid-run)
- Fix nested-delegation recovery picking an anchor or nudge as the
  result; keep collaboration anchors out of list previews and titles

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- File outputs in teammate chats render as typed deliverable cards
  (document/sheet/image/deck/other; images get real thumbnails) with
  open and view-in-library actions reusing the existing open paths;
  delegation artifacts on collaboration cards use the same card
- New read-only bots:artifacts projection aggregates three sources per
  teammate - delegation output artifacts, tool_use created files, and
  message attachments - deduped across sources with existence checks,
  caps, and honest truncation; protocol refs never resolve disk paths
- New bot-artifacts right-sidebar tab: counts, type filter chips,
  two-column grid, empty/remote/truncated states; teammate sessions
  land on it by default while the delegations tab coexists
- deliverable registered as a proposed glossary term (交付物/成果物/산출물)

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Teammate replies whose turn wrote memory end with a faint growth note
  (sparkle + '记住了:<title>', merged per turn, final-bubble only);
  clicking opens the teammate's settings with the matching list briefly
  highlighted; derived purely from the existing memory_write tool_use
  rows - no engine change, no new IPC
- Learned skills ride the same memory scope via a learned- slug
  convention: entries split into a 'TA 学会的' list beside memories,
  one fetch feeding both lists with synchronized deletes
- One constant line added to the bot capability context prompt teaching
  the learned- convention (bot sessions only; declared as a system-prompt
  change for review per maker-core rules)

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
…rsona ack, typing hint

- Roster becomes a main-area page at /bots/roster (sidebar stays); the
  benefit-card pitch page and the modal dialog are gone; first run lands
  straight on the roster; ?add=1 deep links redirect
- Register the missing status token family the bot surfaces referenced
  (error/success/info + soft danger, per-mode contrast-checked) with
  regression guards; blue unread badge token registered per DESIGN §10
- Screenshot-audited fixes: settings header aligned to its content
  column, roster CTA follows the first joinable card, IM-blocked hint
  only where actionable, persona wizard selected state no longer
  collides with the focus ring, growth list separator joins cleanly
- Persona wizard now returns to the conversation and the teammate
  acknowledges its new voice (idempotent injection per persona
  fingerprint, 9 copies x 5 locales); collaboration card exposes the
  result summary; interject carries an idempotency key end to end
- Sidebar rows show a typing hint while the teammate's turn runs (island
  activity mirror, no new IPC), 40px avatars, no health column; history
  view gets bubble avatars; deliverable cards show real sizes

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Keep both sides where each added fields or tests at the same anchor
(dispatcher route flags, list_sessions deps, xdt-helper history deps with
session context plus upstream's session queue, bot delegation test
alongside the new queue test reconstructed from both stages); adopt
upstream's isDbClientNotReadyError handling and the reworked steer CAS
flow with our bot-input gate retained ahead of it. Related gate: 2068
test files pass; exit 1 stems solely from upstream's known updateService
process.exit unhandled rejection (reproduced on clean baseline).

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Child sessions inherit the target teammate's execution config
  (providerId/effort/fastMode); missing providerId made children fall to
  the implicit default route and die AGENT_NOT_READY whenever the target
  used a custom or subscription source - the delegation then hung in
  waiting retries forever, which is exactly the field-observed 'target
  never runs, result never returns'
- Dispatch failures are classified: non-self-healing causes (signed out,
  provider not ready) terminate the delegation immediately, abort the
  child, and deliver the human-readable reason back to the requester's
  conversation instead of spinning; restart-resume follows the same rule
  instead of hanging until the 30-minute timeout
- delegate_to_bot may now return status 'failed' synchronously so the
  requesting model knows the job was not placed
- New end-to-end runtime suite stubs only the model process: dispatch,
  DB rows, outbox, and events are real; the old state-machine suites are
  annotated for what they do not cover

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
…itches

- Model/permission selectors return to teammate composers (per-teammate
  model choice is a real need); all five controls now write back to the
  bot Profile so Renew no longer reverts composer changes
- Sidebar rows drop the ghost trailing column; spacing now matches the
  approved prototype numerically, locked by a static baseline test
- Other-task access dropdown removed (delegation never consulted it);
  automation is standard - the capability flag normalizes to true at
  every read site, and the runner's hard throw for legacy false rows is
  gone; the schedule tab no longer toggles anything behind your back
- Channel rows connect in place: real deep links into each channel's
  existing settings section (all seven have UIs), no more go-elsewhere
  hints; the duplicate advanced chip wall is deleted along with the dead
  trusted badge and its helper
- The automation trust gate stays (it is real: three enforcement points,
  reachable control in the composer) with copy that points at the actual
  permission selector wording

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- PI teammates wrote memories into the project store while their prompt
  and the settings list read the bot store - memoryScopeKey now travels
  through the PI spawn config and environment ctx (regression sentinel:
  dropping the key writes into project memory and the test goes red);
  remote Claude Code sessions get the same key through the remote MCP ctx
- The bot memory capability only narrows: when the global maker-memory
  engine is off, the prompt stops promising a memory the tools cannot
  reach, and the runtime no longer reads an index that would throw
- Read-only project index entries are labeled as excerpts the teammate
  cannot open, and the bot memory section states it is the teammate's own
- End-to-end chain suite (real manager, real sqlite, real MCP server over
  in-memory transport): form/store/isolate/recall/search/list-parity/
  delete/clear plus signed-out fail-closed behavior

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- Background text becomes a first-class editable section: the persona
  wizard owns only its marker block, the backstory body has its own
  read/edit surface through autosave (the hidden overwrite-everything
  escape hatch is gone)
- Templates ship seed memories - the role's own opening work notes, not
  invented user facts - written idempotently by slug into the real bot
  memory store, visible and deletable; the footnote only claims built-in
  notes when they exist, with an idempotent backfill link when a
  template's seeds are missing
- Custom creation gains an AI role generator: one-line role description
  drives a one-shot structured draft (name, backstory, tone, seed notes,
  avatar, greeting) over the existing title-one-shot channel, presented
  as an editable preview; four failure classes each speak up, manual
  path always remains; skill/MCP auto-config deliberately not shipped
  (machine-specific catalogs + silent capability narrowing - plan on file)
- Every creation path now honors the roster promise that a new teammate
  greets you: generated teammates use their drafted greeting (only while
  the name is unchanged), hand-made ones a generic line

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
~120 visible affordances audited against their actual wiring:
- Deleted 9 fakes, incl. the notification banner/sound/DND rows nothing
  ever read, a zero-callsite summary component with its 22 dead strings,
  and budget/depth inputs that persisted values no code path consumed
  (now gated behind the collaboration setting that makes them real)
- Wired 6, incl. deliverable-card open failures now surfacing a toast,
  the interpolation-less greeting that said literally {{name}}, the one
  routine entry point that skipped automation normalization, and the
  destructive delete dialog pre-selecting workspace recycling
- Detached sidebar window gets the six bot channels its preload never
  projected (guarded parity test both ways: projection equal, no write
  channels leaked); SSH-remote tool advertisement now uses the same
  allowlist predicate the executor always enforced - the defect was
  advertising wider than execution, not a dead allowlist
- 3 state displays stopped lying (unfindable delegation rows, cross-
  session status bleed, timeouts reported as failures); 7 copy promises
  rewritten to what the engine actually does, in five locales

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Keep both fanout groups in the preload; reinstate the teammates section
in settings at upstream's new nesting next to the notifications section
(our duplicated app-behavior copy dropped - upstream reindented it);
PI launch args merge the managed-package resources with our bot skill
policy filter replacing launchSkillPaths as the --skill source at its
original position, and listAgentSkills keeps our remote-host branch in
front of upstream's managed-package-aware body. PI suite 541 green;
related gate: 2098 files pass, exit 1 is the known updateService
unhandled-rejection baseline.

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>

# Conflicts:
#	apps/desktop/src/main/localDb/__tests__/conversationSearch.test.ts
#	apps/desktop/src/main/localDb/conversationSearch.ts
#	apps/desktop/src/renderer/features/cc-agent/SessionContentHeader.tsx
- 伙伴会话里工程 diff 卡整张让位:checkpoint 新建文件并入交付物卡候选,
  编辑/删除仍排除;普通任务行为逐字节不变
- 命令产物识别补盲:--print-to-pdf= / --screenshot= / soffice --convert-to /
  wkhtmltopdf / weasyprint / 输出选项后的相对路径,均带读入不误报反例
- 会话头部新增可见「交付物」入口,直达右栏仓库 tab
- csv/tsv 交付物卡渲染真实数据迷你表(peekFileHeader 64KB 上限,失败回退图标)
- 仓库聚合与对话内卡改用同一套识别实现(shared/commandOutputPaths),
  补齐命令产物与 checkpoint 新建两路来源

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- per-bot 技能存储(userData/bot-skills,slug 净化+防穿越+64KiB/100 条上限)
- cindy_helper 新增 save_bot_skill / list_bot_skills,归属由 callerSessionId
  反查,不收 botId 夹带
- 会话挂载:pi 走 --skill(排在 explicitSkillPaths 最前,四组顺序不变),
  claude-code 走 local plugin 根;remote 会话不注入本机路径;自有技能恒挂载、
  不进 allowlist 冻结口径(刚学会仍能 resume)
- bot 会话 prompt 新增沉淀约定:先查重再保存,记步骤不记结论
- 「TA 学会的」改列真技能(展开正文/确认删除),learned- 笔记保留为独立分组;
  「✦ 学会了」尾注复用记忆尾注通路,点击跳设置高亮
- 已知缺口如实标注:codex harness 无 per-session 技能路径注入通道,暂不挂载

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
- 回传断裂根因四件套:回程 lazy-resume 补 providerId;空 result 回读子任务
  最后一条 assistant;子委派继承上级 max_depth;deliverCompletion 早退打 warn
- 目标侧渲染同源实时协作卡(呼吸点/秒数/看工作过程),侧栏显示工作中
- 完成镜像瘦身:结论+结构化交付物,不复读任务全文
- 委派模板不再传递发起方目录,产物走 BotOutputArtifact
- 右栏修复:ensure-singleton 白名单补 bot-artifacts + 0094 单例索引,
  注册并行化,头部按钮失败可见提示
- 伙伴任务空态改交付物/协同语义,工程面板收起

Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant