Skip to content

架构地基:显式 Session 归属与 deep modules(GrokBot-on-DSH 对齐) #71

Closed
6 of 6 issues completed

Description

@DoodleBears

Why

对当前代码、ADR-0015~0034、开放 issues 与 DSH 运行模型的交叉审查发现:现有总体方向正确,但缺少一条能让后续 Orchestrator / Channel / Inbox / Work Session 共享的架构地基。

当前具体断裂:

Accepted direction

  1. 保持 Channel ≠ PersonaBot ≠ Session ≠ Agent。
  2. 每个 PersonaBot 最多一个 active Orchestrator root Session;Work 是独立 root Session;DSH subagent 只负责 Work 内 delegation。
  3. Wake Policy 位于 Orchestrator 外;未被唤醒的 Orchestrator 不参与是否唤醒的判断。
  4. Source Event 是 Messaging content authority;Channel 只是 placement。DSH Session execution log 继续由 DSH SessionPersistence 权威管理,二者不互相复制。
  5. live AgentHandle 由 Host-lifetime runtime module 持有,不挂在短命 Orchestrator Agent object 上。
  6. 先在 @botharness/core 内形成 deep modules;不按概念提前拆成十个 npm packages。

Confirmed decisions — grill round 1 (2026-09-19)

  • Session ownership:Bot-mode Session 最多属于一个 PersonaBot;普通 DSH Session 可保持 unowned。归属只能通过显式、可审计的 repair 修改,Binding 继续只表示 surface 绑定。
  • Authority:PersonaBot Registry 在 profile-scoped botharness.db 的 Session Ownership tables 管理 sessionId → botSlug + root role + provenance。不写入 DSH SessionHeader、Soul files、Channel history、browser state,也不通过 cwd 动态反推。
  • Runtime cardinality:每个 PersonaBot 最多一个 active Orchestrator root、零到多个 independent Work roots;Work AgentHandle 由 Host-lifetime runtime owner 持有。
  • Lineage:普通 fork 继承同一 PersonaBot 但默认为 Work;DSH Subagent 继承父链归属但不成为独立 Work;跨 PersonaBot 协作用消息或在接收方新建 Work,不转移 live Session。
  • Migration:当前仍是本地开发测试,没有现有生产 Session,因此不执行迁移。若未来导入 legacy Session,只允许 cwd 唯一匹配时一次性写入 migrated-from-cwd;零/多匹配保持 unowned,正常运行永不 fallback 到 cwd。
  • Removal:默认 archive/tombstone PersonaBot,停止新执行但保留 Session、历史、成本和审计归属;永久 purge 是独立破坏性操作。
  • Missing database:core plugin 仍可进入 recovery mode,但 Bot Session create/resume 与全部 operational writes 以稳定 database-unavailable fail closed;不依赖 DSH storage-domain provider。
  • 决策记录:docs/adr/0035-session-ownership-is-explicit.md;同步修订 ADR-0016、ADR-0024、ADR-0034 与 CONTEXT.md。

Confirmed decisions — grill round 2 (2026-09-20)

  • Trusted Actor:Browser、模型工具、Bridge 分别从 authenticated Human、Session ownership、verified external identity 推导 Actor context;command payload 不接受可伪造 actorId,tool visibility 不等于 authorization。Bridge 是 transport/configuration,不是作者。
  • Membership ≠ subscription:Membership 只表达 Actor participation、owner/member 与 read/send authority;Bot Channel subscription 独立保存 all | mentions | muted。Digest timing 属于 Wake Policy。
  • One command boundary:Browser RPC、模型 tools、Bridge/Webhook/System producers 全部调用 deep Messaging module;固定顺序为 trusted context → authorization → ingress dedupe → server id/time → 单事务写入 Source Event + optional Channel placement + Inbox Admissions + delivery outbox → post-commit notification。
  • Source Event identity:服务端 Event id + stable ingress key;重复 ingress 返回既有事件。Actor/system source、reply/mention、Reply Route 与 causation/correlation/root/hop facts 由服务端派生,不能信任 adapter payload。
  • One social voice:Orchestrator 独占完整 Bot Inbox 与 Channel send;Work Session 只读显式授予的 source Channel context,并通过 report_to_orchestrator 回报。
  • Wake/Delivery split accepted:Wake Policy 位于 Orchestrator 外并输出 wake-now | digest | no-auto-wake;Delivery Policy 映射 DSH boundary。cold/idle 的 wake-now → resume/followup,running → steer/next-step;digest → followup/next-turn;no-auto-wake 不调用 Agent。只有 operator stop / permission revocation / safety termination 可 cancel({ keepInbox: true }) 中断整个 turn,普通 DM/@/urgent 不 cancel。
  • Unified Messaging authority accepted (Q11B):每个 DSH profile 的 BotHarness operational database 由 Host-lifetime database owner 管理;Messaging tables 共享事务。Source Event 正文只存一份;Channel placement 可选;Inbox Admission 只保存 per-Bot attention facts 与引用;direct Bridge/Webhook 不必伪造成 Channel message。Ingress、placement、fan-out 与 delivery outbox 共用一个事务,外部回复通过 idempotent outbox。
  • 决策记录:docs/adr/0036-messaging-commands-own-messaging-writes.md、docs/adr/0037-messaging-facts-share-one-sqlite-transaction.md 与 CONTEXT.md;ADR-0030 被取代,ADR-0005 仅对 Messaging 部分被取代。

Confirmed decisions — grill round 3 (2026-09-20)

  • Attention facts (Q14A):Inbox Admission 保持稳定;observed / deferred / ignored / handled 是可审计的 Attention Decision facts,pending 由事实推导,不复制 pending → delivered → consumed Agent lifecycle。
  • Reply vs Service Action (Q15A):普通回复只调用 reply_to_source(sourceEventId, content),Host 从可信 Reply Route 选择 provider/destination。飞书 Plugin 后续可独立暴露“向选定 channel/thread 主动发布”等 Service Action,但必须重新授权 target,不能伪装成 reply。
  • Explicit Bridge target + Inbox Trigger (Q16A):Bridge 显式指向 Channel 或 PersonaBot Inbox,不自动建 Channel。Inbox Trigger 匹配 Source Event、创建 Admission、给出 reason/priority 并选择 Wake Policy;Trigger 不直接运行 Agent。
  • Immutable revisions (Q17A):原 Source Event 不原地修改;provider edit/retract 在可观测时成为 causally-linked revision/tombstone Source Event。飞书官方有 im.message.recalled_v1,没有文档化的 edit event;GET message 可按需 reconciliation,但需要独立权限。当前 dsh-im / dsh-lark-link / dsh-lark-bridge 均未处理 edit/recall;Admission/coalescing/wake 由 Q20A 定义。
  • Content-addressed attachments (Q18A):附件 bytes 位于 profile-scoped CAS,SQLite 只存 hash/metadata/ref;provider URL 和 SQLite BLOB 都不是权威。只有 Bot 显式 preserve 才形成 Workspace/Memory copy。
  • Messaging recovery mode (Q19A):SQLite 无法 open/migrate/commit 时 core 仍 mount,以便访问 PersonaBot files 与 diagnostics;所有 Messaging reads/writes fail closed,不回退 NDJSON 或内存。
  • 事实依据:docs/research/2026-09-20-feishu-message-edit-recall-events.md。

Confirmed decisions — grill round 4 (2026-09-20)

  • Revision attention coalescing (Q20A):未 observed 的 revision/retraction 合并为一个 Attention Unit,展示最新内容或撤回,不重复 wake;新增 mention/priority escalation 例外。原 unit 已 observed/handled 后的 revision 形成新 attention。
  • Bounded edit reconciliation (Q21A):无 edit event 的 provider 只在 explicit refresh、准备 reply/use source、unresolved recovery 等有界节点 fetch current;发现变化才追加 Source Revision,不轮询全部 pending/history。
  • Per-account Provider Capabilities (Q22A):adapter 对每个 configured account 声明 receive/recall/fetch/reply/proactive-send/attachment/thread 等能力;Host 只暴露实际存在的 trigger/tool/UI,capability 不等于 authorization。
  • Scoped Service Grants (Q23A):主动 Service Action 需要 Human 对 provider account + action + bounded target scope 的 durable grant;范围内无需逐条审批,越界/未知/高风险进入显式审批或 fail closed。Source Event 中发现 target 不构成授权。
  • Deterministic Trigger merge (Q24A):每个 (PersonaBot, Source Revision) 最多一个 Admission,记录全部 matched triggers/reasons,priority 取最高,wake 取最强;authorization 先于 trigger,规则不能扩大 read authority。
  • Semantic tombstone + explicit purge (Q25A):provider recall 立即从正常 current view 隐藏旧正文,但 retention policy 可保留本地审计内容。只有显式 destructive Content Purge 能删除 body/unshared blobs,并保留最小 envelope、causality 与 purge audit;v1 不隐式 purge。
  • 决策记录:ADR-0025、ADR-0036、ADR-0037、ADR-0038 与 CONTEXT.md。

Confirmed decisions — grill round 5 (2026-09-20)

  • Observation boundary (Q26A):只有 actionable content/faithful summary 实际进入 Orchestrator turn input,或 explicit Inbox read 返回给 Orchestrator,才记录 observed。outbox/Agent Inbox 排队、metadata list、notification 和 Human UI view 均不算。
  • Stale-source rejection (Q27A):reply/Service Action 带上 Orchestrator 观察过的 Source Revision;执行副作用前发现新 head 时,提交新 revision 但以稳定 source-revised 拒绝副作用,下一 safe step 重新决策,不自动 retarget、不 cancel whole turn。
  • PersonaBot-owned Inbox Triggers (Q28A):Trigger 属于 PersonaBot Host policy,可由共享 template 创建;Bridge 只提供 source facts/target,profile safety 只能收紧,不能由 transport 或全局规则替每个 Bot 决定 attention。
  • Grant check at accept + execute (Q29A):outbox intent 入队和 provider side effect 开始前都校验当前 Service Grant。撤销把未开始/待重试 intent 标记 grant-revoked;in-flight request 无法撤回,其最终结果与启动时 grant snapshot 一并审计。
  • Explicit-only v1 purge (Q30A):v1 没有 age-based purge scheduler;撤回正文隐藏但保留到 operator 显式 Content Purge。未来 profile/source retention policy 也必须经过同一 audited purge boundary。
  • 决策记录:ADR-0025、ADR-0036、ADR-0037、ADR-0038 与 CONTEXT.md。

Confirmed decisions — grill round 6 (2026-09-20)

  • Idempotent, not exactly-once outbox (Q31A):每个 external side effect 先提交一个 stable-id Outbox Intent;只有 provider 支持 idempotency 或 reliable outcome lookup 时才自动重试/对账。无法证明结果且可能重复时标记 outcome-unknown / needs-human,不盲目重发;普通 retry 使用 bounded backoff。
  • Prospective Trigger edits (Q32A):Trigger create/change 默认只影响未来事件;历史处理必须 explicit preview + bounded reprocess,并记录 trigger version/source range/operator。历史 replay 默认 no-auto-wake,Human 可显式选择 wake。
  • Stable target refs + explicit wildcard (Q33A refined):Service Grant target 使用 provider-resolved opaque refs,可为 exact targets、Human-maintained group 或显式 wildcard。wildcard 合法但从不默认/隐式扩张,必须展示 provider account、actions、selector 与可匹配范围,并在执行时重新授权 concrete target。
  • Purge dependency report (Q34A):普通 Content Purge 只清 Messaging authority,先报告 Memory/Workspace/managed exports 依赖,不静默级联。另有逐项确认的 Purge Everywhere;BotHarness 只报告、不能召回控制范围外的 Human exports。
  • Out-of-order Source Revisions (Q35A):原消息未到时也保存 Unresolved Revision/tombstone;用 provider version/update/recall time 或 reconciliation 排序,不能用本地 arrival order。无法确定则保留 conflict;已知 tombstone 不因迟到 original 而失效。
  • 决策记录:ADR-0025、ADR-0036、ADR-0037、ADR-0038、ADR-0039 与 CONTEXT.md。

Confirmed decisions — grill round 7 (2026-09-20)

  • Human resolution for Unknown Outcome (Q36A):先自动 provider reconciliation;仍未知时只有 Human 可选择 confirmed success、deliberate retry 或 abandon。Orchestrator 可总结证据/建议,但不能自行标 success 或再次产生 side effect。
  • Casual wildcard, no mandatory expiry (Q37 refined):连接一个 provider account 并选择 actions 时,默认 target scope 可以是 wildcard,不要求 expiry;Human 完成明确的 account/action authorization 后 Grant 才成立。后续新 actions 不自动纳入,scope 可缩小或撤销,执行时仍解析/授权 concrete target。
  • Purge Ledger survives restore into an existing profile (Q38A refined):Content Purge 写入单调治理的 Purge Ledger;restore 到已有 profile 时在 Messaging mount 前合并并重放有效 purge。恢复到空白设备时,standalone backup 只能知道自身 checkpoint;Human 保留的旧文件无法受未来 purge 控制。
  • Unresolved Revision does not wake (Q39A):找不到可信 original/PersonaBot target 时只 durable 保存,不 Admission、不 wake;tombstone 会保守压住迟到 original,关联完成后才走正常 Trigger。
  • Revision Conflict fails closed (Q40A):顺序无法证明时保留所有 revisions 并标 conflict;known tombstone 继续隐藏,current-content-dependent Reply/Service Action 阻止,直到 provider reconciliation 或 Human 明确 resolution。
  • 决策记录:ADR-0036、ADR-0037、ADR-0038、ADR-0039 与 CONTEXT.md。

Confirmed decisions — grill round 8 (2026-09-20)

  • Transactional Messaging Policies (Q41A):不仅 IM facts,凡是必须与 Admission / wake / outbox 决策读取同一确定版本的业务状态,也进入同一个 SQLite transaction:Inbox Triggers、Wake Policy selection、provider account refs、Service Grants 及其 versions。Q46A 后续把其他 BotHarness operational tables 物理共置到同一 botharness.db,但它们仍由各 deep module 独立拥有,不自动进入 Messaging transaction/interface;Soul/Memory、DSH execution、credentials 与 DSH-native settings 仍保留外置权威。
  • Archive stops the whole owned execution tree (Q42A):archive 先原子关闭新 Admission、wake、Session create/resume 与 external-action gate,再停止 active Orchestrator、全部 Work root 与通过 ownership/lineage 归属的 DSH Subagents/descendants。Session/history/cost/audit 保留;已 in-flight 的 provider call 无法撤回,最终 outcome 仍入审计。
  • PersonaBot Export wraps Soul (Q43 refined):不扩张 SoulSnapshot。新增 immutable/versioned PersonaBot Export,始终包含 SoulSnapshot;默认只有 persona + Human-selected Memory。可显式勾选 Source Events/Revisions/Attachments、Channel/Inbox/Attention facts、Triggers/Wake Policies、Messaging Archive、provider account refs 与 Service Grant declarations。credentials 永不导出;account refs 导入为待 rebind,Grant declarations 导入为 disabled/pending reauthorization,不能继承 live authority。
  • Portable Messaging Archive (Q44A):Messaging Archive 是 schema-versioned portable read-only facet;可带由同一 snapshot 派生的 per-Channel NDJSON,人类可读但不成为第二权威,也不包含 credentials。
  • No custom v1 at-rest encryption (Q45A):Messaging SQLite、CAS 与 export files 在 v1 依赖 OS / $DSH_HOME 权限;credentials 继续隔离。敏感 operational facets 导出前必须明确提示,managed backup encryption 可后续作为 envelope 能力加入,不改变 authority。
  • 决策记录:ADR-0020、ADR-0021、ADR-0034、ADR-0035、ADR-0037、ADR-0038、ADR-0040 与 CONTEXT.md。

Confirmed decisions — grill round 9 (2026-09-20)

  • Archive completes only when quiescent (Q47A):先 gate 新 Admission/wake/Session/action,再 graceful stop 整个 owned execution tree;超过 bounded deadline 后通过 DSH cancel/interrupt 终止剩余执行,不杀 Host process。archive 只有在 Orchestrator、Work roots 与 owned Subagents 全部停止后才完成;provider call 若已发出则继续记录 outcome。
  • Reactivation never auto-resumes (Q48A):unarchive 只重新开放 gates,Orchestrator 为 cold;旧 Work Sessions 仍 stopped,由 Human 显式选择 resume 并重新校验环境/权限;Subagents 永不自动恢复。
  • Imported live work is inert history (Q49A):可选导出 terminal Outbox / Unknown Outcome audit,但 pending/in-flight/retryable/needs-human 导入后都在 dispatcher executable set 之外;Sessions/AgentHandles 不属于 PersonaBot Export facets,不会恢复旧执行。
  • Clone and Managed Restore are separate (Q50A):PersonaBot Export import/clone 永远创建新 PersonaBot identity 并保留 source provenance;只有独立 profile-level Managed Restore 可保留 local identity,且必须使用 quiesced managed snapshot、拒绝 identity conflict、Messaging mount 前重放 Purge Ledger。
  • One operational database + portable profile backup (Q46A refined):每个 DSH profile 只有一个 BotHarness-owned $DSH_HOME/botharness/botharness.db,承载 registry/archive、bindings/access、roster、Channel/Membership、Session ownership refs、Messaging/Attention/Policy/Grant/Outbox/audit/export metadata。多个 deep modules 保持各自 command/query interface 与 table ownership,Host-lifetime database owner 统一 connection、migration、write ordering、transaction、post-commit notification 与 snapshot。Soul/Memory、attachment CAS、DSH Session logs、credentials、DSH-native settings 继续外置;BotHarness 不再创建 botharness_roster / botharness_sessions storage domains。迁机使用一致 DB snapshot + selected files 的 .botharness-backup,不复制 live WAL database。
  • 决策记录:ADR-0005、ADR-0016、ADR-0027、ADR-0031、ADR-0034、ADR-0035、ADR-0037、ADR-0040、ADR-0041 与 CONTEXT.md。

Confirmed decisions — grill round 10 (2026-09-20)

  • Optional DSH Session facet (Q51A):一个用户可见的 .botharness-backup 可包含由 DSH SessionPersistence interface adapter 生成/恢复的 Session facet;Session logs 不进入 botharness.db,也不复制 provider-private backend files。当前 backend 不支持 portable export/import 时 manifest 必须标记 omitted/unsupported 并在备份完成前提示。
  • Exclusive Profile Writer Lease (Q52A):database owner 在 mount botharness.db 前取得 OS-backed exclusive lease;第二个 Host 返回 profile-in-use,可提供 read-only diagnostics,但不能运行 PersonaBot、迁移或写 operational state。SQLite busy/timeout 不是业务所有权协议,也不能用 TTL 偷走 live lease。
  • One Schema Generation (Q53A):整个 operational database 只有一个 monotonic schema generation。deep modules 贡献 internal migration steps,由 database owner 统一排序/预检,升级前创建 consistent snapshot,再作为一个 compatibility operation 执行;任一步失败则所有 operational modules 都不 mount,进入 recovery mode,不允许半升级。
  • Honest portable Purge Ledger scope (Q54A):backup 携带创建时 ledger checkpoint;restore 到已有 profile 时与 destination monotonic ledger 合并并先重放。恢复到空白新设备只能保证 package 已知 purges;Human 持有的旧 offline backup 无法知道后续 purge,属于 guarantee 之外。更强的“旧 generation 永不复活”只由能保留最新 ledger 并淘汰旧代的 managed catalog/sync 提供。
  • Fresh local ids + Export Origin (Q55A):PersonaBot Export import 为 PersonaBot、Channel placement、Inbox、Trigger、Grant declaration 等全部生成 fresh local ids,并保存 { exportId, sourceInstallationId, sourceId } provenance。provider message/account ids 只作为 namespace-scoped evidence,不直接成为 local authority。
  • 决策记录:ADR-0037、ADR-0040、ADR-0041、ADR-0042 与 CONTEXT.md。

Confirmed decisions — grill round 11 (2026-09-20)

  • Sessions selected by default (Q56A):SessionPersistence adapter 支持 portable stream 时,Profile Backup 默认选择所有被 Session Ownership 引用的 DSH Sessions,并在执行前显示 count/estimated size/privacy warning;Human 可取消。unsupported/omitted 必须写 manifest,不能伪装 full backup。
  • Short point-in-time Backup Barrier (Q57A):不 stop Host、不 archive bots。短暂暂停新 BotHarness mutations,drain DB transactions,flush selected DSH Sessions 并记录 durable cursors,固定 Soul/Memory versions 与 reachable CAS set,启动 consistent SQLite snapshot 后立即解除;barrier 后的新事件属于下一 generation。
  • Staged all-or-nothing Managed Restore (Q58A):先恢复到 isolated staging profile,校验 checksum/schema/Purge Ledger/Soul/CAS/database/selected Session streams,全部成功才 atomic activate;任一 selected facet 失败则不替换当前 profile,不允许后台补成半恢复 identity。
  • Unavailable Session Reference (Q59A):Session facet 被明确 omitted/unsupported 时保留 ownership/audit,但标为 session-unavailable historical reference,禁止 resume,UI 明示内容未迁移;只能 explicit repair/relink。
  • Dependency-closed export with typed redaction (Q60A):选择 Inbox/Channel/Attention/Outbox 自动加入 required Source Events/Revisions/Attachment metadata/provenance。敏感正文可替换为保留 id/hash/dependency/omission reason 的 Redaction Tombstone,不允许 dangling reference。
  • Idempotent import with explicit additional Clone (Q61A):普通 import 以 (destinationProfile, exportId) 的 durable Import Receipt 幂等;retry/double-click 返回既有结果。Human 可显式再建独立 Clone,生成新 receipt 和全套 fresh local ids,同时保留相同 Export Origins。
  • 决策记录:ADR-0040、ADR-0042 与 CONTEXT.md。

Confirmed decisions — grill round 12 (2026-09-20)

  • In-flight-at-cutoff becomes Unknown Outcome (Q62A):Backup Barrier 捕获仍在 provider request 中的 attempt 时保留 cutoff evidence;Managed Restore 将其规范化为 Unknown Outcome / needs-human,先尝试 provider reconciliation,无法证明则绝不 auto retry。backup 不无限等待外部调用。
  • Planned Transfer vs Disaster Restore (Q63A):planned Profile Transfer quiesce source、关闭 provider ingress/action gates、生成 unique Transfer Generation,并把 source durable 标为 Transferred Out;target activation 后 source 不能靠 restart/unarchive 重新运行。source 无法证明停机时允许 Disaster Restore,但 target 的 provider bindings、provider-bound Triggers、Service Grants 全 suspended,Human 解决 split-brain/rebind 前无 external effects。
  • Complete Profile Backup core (Q64A):每份 Profile Backup 必须包含 complete botharness.db、全部 profile Persona/Soul/Memory files、从 DB/Soul transitive reachable 的 CAS objects;不提供 per-Bot/per-table selection,部分迁移走 PersonaBot Export。
  • New profile or whole-profile replace only (Q65A refined):Managed Restore 只能 Restore As New Profile,或在 destination stopped 后明确确认 Replace Existing Profile;import 始终先 staging/validate,失败不触碰 current profile,成功后 atomic swap。v1 不自动创建 rollback backup;Human 如需保留旧 profile,先手动 Export Profile。禁止 record-level merge。
  • Self-contained portable backup (Q66A):每个 .botharness-backup 都必须 materialize 为独立可恢复完整包,不依赖 base backup 或 delta chain。
  • 决策记录:ADR-0039、ADR-0042、ADR-0043 与 CONTEXT.md。

Confirmed decisions — grill round 13 (2026-09-20)

  • Provider rebind uses exact stable identity (Q67A):restore 后 provider authority 保持 suspended。Human 先绑定 target-local credential,adapter 从 provider-issued tenant/org、application/bot、account stable ids 派生非秘密 Provider Account Fingerprint;只有 exact match + 一次明确 Human confirmation 才恢复原 binding、provider-bound Triggers 与既有 Grant scopes。Disaster Restore 还必须确认 split-brain 风险;mismatch 继续 disabled 并走全新授权。
  • Transfer cancellation is pre-activation only (Q68A):target activation 前 source 可 cancel、durably invalidate Transfer Generation 并重开自身 gates;activation 后 source 永久保持 Transferred Out。回迁必须由 active target 发起新的 reverse transfer;active target 丢失时,旧 source 只能按 suspended-provider 的 Disaster Restore/reclaim 流程恢复。
  • Forward-only restore compatibility (Q69A):Managed Restore 接受相同 Schema Generation,或在 staging 内可支持 forward migration 的旧 generation;未知的更新 generation 返回 upgrade-required。不提供 down migration,也不会触碰当前 active profile。
  • Integrity without authenticity claim (Q70A):backup manifest 使用 cryptographic content hashes 验证包内一致性和意外损坏;v1 没有 signature/authenticated root,因此不宣称来源真实性或能抵抗 manifest 与 payload 同时被替换。package signing 留作后续扩展。
  • Manual-only single-file v1 backup (Q71 revised in round 17):不实现任何 automatic backup。Human 通过 Export Profile 显式生成一个 compressed .botharness-backup 文件,并通过 Import Profile 选择一个文件恢复;没有 scheduler、migration/replace hook、catalog、retention、incremental chain 或 automatic pruning。
  • 决策记录:ADR-0041、ADR-0042、ADR-0043 与 CONTEXT.md。

Confirmed decisions — grill round 14 (2026-09-20)

  • Missing Provider Adapter does not invalidate restored data (Q72A):Profile Restore 仍成功,历史与 Source Events 可读;相关 Binding、provider-bound Trigger、Service Grant/Action 标为 dependency-missing 并 suspended。系统提供安装清单但绝不自动安装代码;安装兼容 adapter 后仍必须通过 credential/fingerprint/Human-confirmation authority ceremony。
  • Workspace mapping is explicit target-local configuration (Q73A):backup 保留 source canonical path、logical label 与可获得的 repo/Workspace identity hints,只用于建议。目标 Host 上先成为 Unavailable Workspace Reference;Human 明确选择并验证已有目录、改映射、显式新建或保持 unavailable,映射前相关 Work Session 禁止 resume。绝不自动信任或创建相同绝对路径。
  • No silent model fallback (Q74A):原 model/provider 作为 desired configuration 保留;目标无法解析 model/provider/credential 时返回 model-unavailable,依赖它的 Orchestrator/Work execution fail closed,由 Human 显式 remap。不能静默使用默认模型改变行为、能力、隐私或费用。
  • Capability-scoped readiness (Q75A):依赖声明区分 required/optional 并绑定 capability scope。missing optional 或非核心 integration 使 PersonaBot degraded,只 gate 相关 Binding/Trigger/Action/Session;只有 Orchestrator model 等 required core dependency 缺失才使 PersonaBot 整体 blocked。readiness 是 target-local projection,不是新 lifecycle。
  • Backup carries dependency declarations, not executable code (Q76A):Runtime Dependency Manifest 保存非秘密 dependency identity、compatibility/version、required/optional scope 与配置诊断信息;插件和 Skill 通过目标设备可信安装源重新取得。Profile Backup 不嵌入、也不自动执行插件/Skill bundle。
  • 决策记录:ADR-0042、ADR-0044 与 CONTEXT.md。

Confirmed decisions — grill round 15 (2026-09-20)

  • Explicit PersonaBot Activation after restore (Q77A):Profile data activation、dependency readiness、runtime activation 分离。恢复后的 PersonaBot 全部 cold;Human 审阅 readiness/rebind checklist 后明确 Activate,创建 fresh Orchestrator Session,并只开放 dependency-ready + authorized paths。安装依赖或 readiness 变 ready 都不会自动启动或 resume。
  • Contract compatibility, not exact build lock (Q78A):依赖用 stable contract id + supported interface/persisted-schema version ranges 判定;兼容 target implementation 可与 producer package version 不同。producer version/integrity id 仅作诊断,范围不兼容则 dependency-incompatible 并 fail closed。
  • Runtime dependency drift re-gates affected capabilities (Q79A):依赖被卸载、撤销或升级为 incompatible 时,owning modules 立即 gate 新的 dependent execution/external actions;已发出的 provider/model request 不假装撤回,按 Session/Outbox outcome 协议收敛。依赖恢复后 recompute readiness,但不自动 resume execution 或绕过 authority checks。
  • Portable desired intent + Host-local resolution (Q80A):Desired Dependency Reference 保留原 model/provider/plugin/Skill/tool/Workspace identity 与 provenance;Target Resolution 保存本机 Human-confirmed mapping。remap 不覆盖 portable intent,未来 backup 可把本机值当 hint,但新 Host 必须重新 resolve。
  • Host modules own non-downgradable requirements (Q81A):deep module 定义 interface 背后的 technical/authority/data-integrity required dependencies;PersonaBot/plugin config 只请求 optional capabilities,Human 可禁用 optional feature,但 imported/exporter-controlled data 不能把关键 dependency 降级为 optional。
  • 决策记录:ADR-0044 与 CONTEXT.md。

Confirmed decisions — grill round 16 (superseded in part, 2026-09-20)

  • No periodic automatic backup in v1 (Q71 interim):取消 default-on scheduled backup、Managed Backup Catalog、7 daily + 4 weekly retention、incremental/dedupe chain 与 automatic pruning;round 17 进一步取消了 operation-coupled Recovery Backup。
  • Mandatory Recovery Backup (Q82A, superseded):曾接受 migration/replace 前强制备份,但 round 17 明确撤回;v1 不自动创建任何 retained backup。
  • Scheduled-backup failure state removed (Q83 superseded):因为没有后台 scheduler,不引入 backup-degraded lifecycle 或 retry loop;手动失败直接返回,Human 可重试。
  • Disk preflight without automatic retention (Q84 simplified):manual Export Profile 创建前估算空间;v1 无固定默认 byte cap,也不自动删除旧文件。空间不足只会使本次 export 失败。
  • Crash-safe staged publication (Q85A):backup 先写 destination-adjacent staging file,完成验证后 atomic publish;发布成功前不删除/覆盖任何 previous verified backup,启动时可清理 abandoned staging。
  • Structural verification on every backup (Q86A):每份 backup 验证 manifest/content hashes、SQLite integrity、Soul/CAS closure 与 selected Session adapter structural compatibility;不要求每次创建都完整执行 isolated Restore rehearsal,后者留作后续 manual/periodic deep verification。
  • 决策记录:ADR-0041、ADR-0042 与 CONTEXT.md。

Confirmed decisions — grill round 17 clarification (2026-09-20)

  • No automatic backup means no operation-coupled backup:migration、schema upgrade 和 Replace Existing Profile 都不会创建 retained Recovery Backup。Schema migration 在 isolated temporary database copy 上完成并验证后 atomic replace;import 在 isolated profile staging 完成,失败不触碰 current profile。这些临时副本是 transaction staging,成功/失败后清理,不是备份产品。
  • One explicit export, one compressed file:用户只需要理解两个动作:Export Profile 生成一个 self-contained compressed .botharness-backup 文件,Import Profile 选择一个文件。没有目录/multipart、base+delta、generation catalog 或自动生命周期。
  • Destructive replace is explicit:Replace Existing Profile 明确提示将删除当前 profile,并建议先手动 Export;确认后可继续,不自动生成 rollback file。成功替换后是否有旧版本完全取决于 Human 是否事先导出。
  • Internal safety does not expand the UX:Backup Barrier、staging file、hash/SQLite/Soul/CAS/Session structural validation 和 atomic publish 仍是单次 Export 内部实现,不暴露 scheduler、retention、catalog 或额外 workflow。
  • Q87–Q91 withdrawn:这些问题建立在 operation-coupled backup/recovery lifecycle 上,前提已被取消;不进入当前设计树。
  • 决策记录:ADR-0041、ADR-0042 与 CONTEXT.md。

Confirmed decisions — grill round 18 (2026-09-20)

  • Host-enforced Bot-loop guard (Q92A):Messaging 按 (causation chain, recipient PersonaBot) 去重,并由 Host 递增 trusted Bot-hop;默认上限 8。超过上限的 Source Event 保留 history/audit,但不自动 Admission、wake 或 reply;Human 可显式开始新的 causation root,不能靠 Persona prompt 防循环。
  • Provider echo enriches existing outbound facts (Q93A):用 provider-account scope + external message id/outbound identity/idempotency evidence 将 echo 关联到既有 outbound Source Event、Channel placement 与 Outbox receipt,不创建新 attention。无法匹配的 own-sender echo 保留为 unresolved evidence,不 wake,等待 bounded reconciliation。
  • Work Report is a durable Session-origin Source Event (Q94A):report_to_orchestrator 写入 summary/result/artifact refs、causation/correlation,并 Admission 到 owning PersonaBot Inbox;完整 reasoning/tool/execution history 仍只在 DSH SessionPersistence,不要求 Channel placement。
  • Explicit Work reuse (Q95A refined):Orchestrator 通过 durable Work Session Directory 知道自己管理的 Work roots,可按 exact owned sessionId 发消息,或使用唯一 Continuity Key 且 ownership/Workspace/model/dependencies 全匹配时复用。绝不通过 cwd、recent activity、title/prompt similarity 猜测。
  • Autonomous Work creation within local constraints (Q96A):Orchestrator 可在已授权 Workspace/model/tool/dependency/resource constraints 内自主创建 independent Work root,记录 source/admission causation、dispatch reason 与 ownership。local Work creation 不授予任何 provider Service Action。
  • Orchestrator manages in-progress Work:对于“X 资料怎么样了”,Orchestrator 先读 Directory 的 DSH-derived facts;需要语义进度时向 exact X Work Session 发送 correlated Work Request,由其 durable report 回到 Bot Inbox。BotWork Runtime 隐藏 DSH create/resume/followup/steer/inject/cancel/whenIdle 与 live AgentHandles。
  • 决策记录:ADR-0024、ADR-0036、ADR-0039、ADR-0045 与 CONTEXT.md。

Confirmed decisions — grill round 19 (2026-09-20)

  • Semantic Work Request delivery (Q97A):BotWork 不把 raw DSH methods 暴露给模型。context-update → durable inject without wake;progress/current-work adjustment → steer at next safe step;post-turn continuation → followup。普通 request 不 cancel 正在执行的 tool/model step。
  • Orchestrator decides how to answer progress questions (Q98A refined):Host 提供 truthful Directory facts、correlated async progress request 与 bounded optional wait;Orchestrator 根据已知信息决定直接回答、短暂等待,或告诉 Human“仍在进行,已请求更新”。Host 不无限阻塞,也不虚构语义进度;late report 继续进入 Bot Inbox。
  • Ownership-scoped Work stop authority (Q99A):Human 要求、dispatch 被替代/重复、预算耗尽、权限撤销或 safety policy 时,Orchestrator 可停止 own Work。先关闭新 Work Request admission 并 graceful stop,bounded deadline 后才 DSH cancel;保留 Session/history/artifacts,不等于 purge,external in-flight outcome 仍审计。
  • Proactive meaningful Work Reports (Q100A):milestone、可用中间结果、blocked/waiting-human 与 terminal outcome 主动 report;Host coalesce/rate-limit 细粒度重复,不发送 tool-step/heartbeat 噪音。
  • No direct Work-to-Work messaging in v1 (Q101A):Work 先向 Orchestrator 报告 coordination need;Orchestrator 从 Directory 解析 exact target 并发送新的 correlated Work Request。统一 ownership/routing/loop/audit,取消 ADR-0024 早期的 peer-direct allowance。
  • 决策记录:ADR-0024、ADR-0045 与 CONTEXT.md。

Confirmed decisions — grill round 20 (2026-09-20)

  • Minimal crash consistency for Work Requests (Q102A, refined):SQLite 与 DSH SessionPersistence 无法原子提交,因此 BotWork 在跨边界前只写一个带 stable request id 的 durable Work Delivery Intent,DSH 侧幂等接收;重启时做一次有界 facts reconciliation。无法消除的歧义标记 needs-repair,不实现 distributed exactly-once、通用 workflow engine、后台重试调度器或复杂 quarantine lifecycle。
  • Minimal crash consistency for Work creation (Q103A):先写 stable dispatch id intent,再把 id 放入 initial DSH Session content,创建成功后绑定 explicit ownership。重启时 unique evidence → bind,proven absence → create/deliver,ambiguous → needs-repair,防止 silently lost/unowned duplicate root,同时不为罕见 edge case 堆状态机。
  • Immutable reports, coalesced attention (Q104A):每个 Work Report 都是 immutable Source Event;同一 Work/correlation 在 Orchestrator observed 前可合并进一个 Attention Unit,展示 latest summary + repeat count。Observed 后的新 milestone、blocked/waiting 或 terminal result 形成新 attention。
  • Stop fence before DSH cancellation (Q105A):一个 BotHarness transaction 内先关闭新 Work Request admission、supersede undelivered intents 并记录原因,再 graceful stop,bounded deadline 后才 cancel。late already-delivered request/report 仅作 audit,不得 reopen/wake stopped Work。
  • One global Work concurrency setting (Q106A, refined by round 21):v1 只有 profile-wide global limit,放在 BotHarness 的全局 DSH Settings modal;不做 per-Bot/per-Workspace override。达到上限后的行为以 round 21 为准。
  • 决策记录:ADR-0045 与 CONTEXT.md。

Confirmed decisions — grill round 21 (2026-09-20)

  • Global Work concurrency defaults to 3 (Q107A, refined):设置值为 1–32 的整数,默认 3;不提供 unlimited,也不增加 per-Bot/per-Workspace override。
  • Count active execution only (Q108A):只有正在执行 turn/model/tool call 的 Work Session 占用 slot;idle、waiting-human、blocked、completed 不占用。这里约束 concurrent execution,不是限制历史 Session 数量。
  • Lowering the limit is non-destructive (Q109A):如果 Human 把 limit 降到当前 active 数量以下,不 cancel 已有 Work;新 create tool call 失败,直到 active 数量自然降到新上限以下。
  • No concurrency queue (Q110 clarified):达到上限时 create Work tool call 立即返回 structured capacity failure(reason、active count、configured limit)。由 Orchestrator 解释或根据后续信息再次调用;Host 不保存、排序、自动重试或恢复 rejected dispatch。
  • No restart queue (Q111 withdrawn):因为没有 waiting queue,重启时也没有 queued dispatch 可以自动启动。达到上限的失败调用不创建 Work Delivery Intent 或 DSH Session;只有成功原子保留 capacity 的创建流程才写 intent 并立即跨入 DSH。
  • 决策记录:ADR-0045 与 CONTEXT.md。

Confirmed decisions — grill round 22 (2026-09-20)

  • Idle Work wake also requires capacity (Q112A):next-step / next-turn 如果会唤醒 idle Work,必须通过同一个 global admission;达到上限即失败。context-update 不 wake,所以不占 slot;已经 active 的 Work 收到新 request 也不重复占 slot。
  • Machine-readable and LLM-readable capacity failure (Q113A, refined):结果至少包含 stable error code、activeCount、limit、retryable: true 和简洁 message。文字必须明确“已达到全局上限、本次没有创建/唤醒 Work、可等待 active Work 完成后重试或请 Human 调整设置”;不提供虚构的 queue position/ETA。
  • Human-owned concurrency setting (Q114A):只有 Human 能在全局 Settings modal 修改;Orchestrator 可读取但没有提高/降低上限的 tool。
  • Atomic first-committer admission (Q115A):create 与 idle-wake 经过同一个 serialized BotWork admission point;并发争夺最后一个 slot 时先提交者成功,其他调用立即得到 capacity failure,不等待、不做公平调度或自动重试。
  • Count independent Work roots only (Q116A):这个上限不计算 Orchestrator Session 或 Work 内部 DSH Subagent;它们由 DSH 自身的 Agent/Subagent resource controls 约束,避免 Work 获得 slot 后反而无法运行自己的 Subagent。
  • 决策记录:ADR-0045 与 CONTEXT.md。

Confirmed decisions — grill round 23 (2026-09-20)

  • Explicit reuse of completed-but-resumable Work (Q117A):latest run 已完成但 Session 仍 idle/resumable 时,可通过 exact Session id 或唯一 Continuity Key 发起新 turn,并重新通过 concurrency admission;cancelled、Archived、needs-repair 不自动恢复。
  • Unique Continuity Key (Q118A):一个 PersonaBot 内,一个 Continuity Key 最多指向一个 resumable Work root;转移给 replacement 时显式 supersede 旧 mapping,不按 recency 猜测。
  • Subagent-like communication shape without DSH child identity (Q119B, refined):不把 Work Directory 摘要注入每个 Orchestrator turn。创建 tool result、Work Request/Report、Host-origin Work Lifecycle Notice 与按需 Directory query 共同提供当前 Work 信息,行为参考 DSH continuable subagent 的 addressed parent/child message + distinct settlement notice。Work 仍是 independent root,不使用 ctx.subagents.sendMessage()、不伪造 parentSession;Work-authored report 与 Host runtime notice 保持不同 provenance。
  • Retain inactive Work until explicit purge (Q120A):completed/cancelled Work 继续可查询;默认 UI/query 可折叠 inactive history,但不按 retention timer 自动删除。
  • Shared Wake Policy for Work facts (Q121A):correlated response、blocked、waiting-human、error/cancel/terminal 默认 immediate,普通 milestone 默认 digest;Human 可通过 Trigger/Wake Policy 调整。不建立 Work-only scheduler,匹配的 report/notice 可共用 attention 但 Source Event/provenance 不合并。
  • 决策记录:ADR-0045 与 CONTEXT.md。

Confirmed decisions — grill round 24 (2026-09-20)

  • DSH Session id is the canonical Work identity (Q122A):不创建第二个 BotHarness workId;Directory、ownership 和 tools 都以 sessionId 寻址,Continuity Key 只是 PersonaBot-local 可选别名。
  • Separate execution facts from semantic outcome (Q123A):Directory 分开暴露 DSH-derived activity / lastRun 与 latestReport,不合成第二套 BotHarness WorkStatus 生命周期。
  • Lifecycle notices only at meaningful boundaries (Q124A):只在 settled、error、cancel 等边界写 Host-origin notice,携带 runtime fact、简短安全摘要与 report/artifact refs;不为 running/idle 波动发通知。
  • PersonaBot-scoped Work authority (Q125A):Work 不绑定创建它的某个 Orchestrator Session incarnation。Orchestrator 重建后,当前 Orchestrator 通过 PersonaBot ownership 接管 list/query/message/resume/stop;report/notice 在 delivery 时解析 owning PersonaBot 的 current Inbox,不指向 stale Orchestrator Session。
  • No active Continuity Key transfer (Q126A):旧 holder active 时不能直接转移 Key;必须等待 idle/completed,或先 explicit stop + supersede,避免同一持续工作线出现两个执行者。
  • 决策记录:ADR-0045 与 CONTEXT.md。

Confirmed decisions — grill round 25 (2026-09-20)

  • Five narrow Orchestrator Work tools (Q127A):model-facing surface 固定为 list_work、inspect_work、create_work、send_work_request、stop_work。idle Work 的 resume 由 waking send_work_request 完成,不另设 resume_work,也不暴露 action-based manage_work 或 raw DSH lifecycle methods。
  • Cursor-paginated current-attention listing (Q128A, refined):list_work 默认返回 active、blocked、waiting-human 与尚未 observed 的 terminal result,按 Directory-visible updatedAt DESC + canonical sessionId tie-break 排序。支持 filter、sort/order、bounded page size 与 opaque cursor;inactive/history 需显式 filter,cursor 绑定产生它的 query shape。
  • Orchestrator-only top-level Work control (Q129A):只有当前 Orchestrator 可 list/inspect/create/request/stop Work。Work Agent 只有 report_to_orchestrator;其 DSH Subagent 默认没有该工具,通过 native subagent messaging 回到直接 Work parent。
  • Distinct terminal facts, one attention/wake (Q130A):terminal Work Report 与 Host Lifecycle Notice 都保留为不同 provenance 的 Source Event,但共享一个 Attention Unit、最多 wake 一次;缺少 terminal report 时 notice 仍独立保证 terminal attention。
  • Subagents remain internal to Work (Q131A):Directory 不把 DSH Subagent 展开成顶层 Work,Orchestrator 不能直接寻址。inspect_work 最多给出 hasActiveDescendants、activeDescendantCount 等聚合诊断,供理解和 stop/archive convergence。
  • 决策记录:ADR-0045 与 CONTEXT.md。

Grill frontier status

Work plan

Phase 0 — grill + domain docs

Phase 1 — minimum runtime foundation(M3.5 / M4 前)

  • 一个 Session ownership module:显式 sessionId → PersonaBot + role + provenance;cwd 只作迁移/兼容 hint。
  • DSH Session facts → PersonaBot activity projection;重启可重建,未知归属不污染任何 PersonaBot。
  • 最小 Work runtime:创建/恢复 independent root Session、Workspace attach、Host 持有 AgentHandle、report/interrupt 生命周期。
  • Memory 与 Session read model 统一通过 ownership interface 解析。

Phase 2 — Messaging facts / Channel conversation / admission

  • 每个 profile 使用一个 BotHarness-owned operational SQLite database;DSH storage domains 不承载 BotHarness state,也不承担跨表事务。
  • Registry、roster、Session ownership references、Messaging、Attention、Policy/Grant/Outbox/audit 各由 deep module owning tables,但共享 database owner、migration/backup discipline;需要共同提交的命令使用同一 SQLite transaction。
  • Soul/Memory、attachment CAS、DSH Session execution、credentials 与有意使用 DSH native UI 的 settings 保持外置权威。
  • Messaging module 统一 Actor/system source、Membership、authorization、durable Source Event、external echo dedupe、Reply Route 与 Bot-loop provenance。
  • 同一条 Source Event 在一个事务内可选择性 placement 到 Channel、admission 到零到多个 Bot Inbox,并写入 delivery outbox;Bridge/Webhook 不必伪造成 Channel message。
  • 外部 target 由 Bridge 显式配置;普通 reply 由 Host 解析 Reply Route,主动 provider action 是独立授权 capability。
  • Source Event revision/tombstone 保持原事实不可变;附件使用 content-addressed files,数据库保存引用。
  • provider adapter 按 account 声明 capabilities;proactive Service Action 通过 scoped Service Grant 授权。
  • browser RPC、模型 tools、外部 Bridge 都只做 adapters。

Phase 3 — Bot attention

  • Bot Inbox 保持 Source Event + Inbox Admission + Attention Decision facts 的 projection,不创建第二份 mailbox truth 或 Agent delivery lifecycle。
  • revision/tombstone 按 observed boundary coalesce 或形成新 attention;多个 triggers 合并为一条 Admission。
  • observed 只在内容进入 Orchestrator context/read 时成立;stale-source external side effect fail closed。
  • outbox 区分 retryable 与 Unknown Outcome,自动 retry 依赖 provider idempotency/reconciliation;明确 cursor、dedupe key 与 restart replay。
  • deterministic Wake Policy 统一 immediate / digest / silent,再交给 PersonaBot runtime delivery。
  • Host 用 causation recipient dedupe + default 8 Bot hops 阻止 Bot loop;Provider Echo 关联既有 outbound facts,unresolved own echo 不 wake。

Phase 4 — context + package shape

  • 在显式 ownership 上深化 Memory context delivery:Agent Scope、persona 静态前缀、memory tree per-turn replace/dedupe。
  • 保持 SoulSnapshot 为 registry/identity package;在外层增加 default-Soul-only 的 PersonaBot Export 和可选、dependency-closed operational facets。
  • Messaging Archive 使用 versioned portable schema,可提供 derived Channel NDJSON;account refs / Grant declarations 只能 inactive import,credentials 永不进入 package。
  • PersonaBot Export import 永远生成新 identity;identity-preserving recovery 走独立 Managed Restore,pending external effects 与 Sessions 不从普通 export 恢复。
  • Profile Backup 可通过 DSH SessionPersistence adapter 携带 optional Session facet;database/file/session backend 各自保持 authority,manifest 明确 required/included/omitted/unsupported。
  • database owner 负责 OS-backed writer lease、single Schema Generation、staged-copy migration 与 fail-closed recovery;clone records 使用 fresh local ids + Export Origin。
  • standalone backup 的 Purge Ledger 只保证截至自身 checkpoint;Human retained older files 不受未来 purge 控制。
  • supported DSH Sessions 默认纳入 Profile Backup;Backup Barrier 固定 DB/Session cursor/Soul/CAS cutoff,Managed Restore 在 staging 全部校验后 atomic activate。
  • omitted Session 变成不可 resume 的 Unavailable Session Reference;PersonaBot Export 自动 dependency closure,允许 typed redaction,不允许 dangling refs。
  • ordinary import 通过 Import Receipt 默认幂等;只有 explicit additional Clone 才再次生成一套 local ids。
  • backup cutoff 时 in-flight provider attempt 恢复为 Unknown Outcome;planned Profile Transfer 使用 Transfer Generation + Transferred-out source,Disaster Restore suspends all provider-bound execution。
  • Profile Backup core 永远完整且 portable file self-contained;Managed Restore 只 new-profile 或 verified pre-backup 后 whole-profile replace,不做 record merge。
  • restore 只在 staging 做 supported forward migration;provider authority 通过 exact Provider Account Fingerprint + Human confirmation 恢复,不能靠 credential ref/label 继承。
  • v1 只有 explicit Export Profile → one compressed file 与 Import Profile ← one file;不实现任何 automatic/operation-coupled backup、scheduler/catalog/retention/automatic pruning。
  • manual export 内部使用 disk preflight、staging、structural verification 和 atomic publish;失败不触碰已有文件,Human 可重试。
  • Runtime Dependency Manifest 只携带声明/版本/compatibility,不携带 executable plugin/Skill code;restore 成功与 target-local Activation Readiness 分开报告。
  • provider adapter、Workspace mapping、model/provider 与 required/optional dependencies 按最小 capability scope fail closed;只有 required core execution dependency 缺失才整体 blocked。
  • dependency compatibility 使用 Host-owned contract id + interface/schema range;portable desired intent 与 target-local resolution 分层,imported package 不能降级核心 required dependency。
  • restored PersonaBots 默认 cold,只有 Human PersonaBot Activation 才创建 fresh Orchestrator;runtime drift 立即 gate 新工作,恢复后也不 auto-resume。
  • BotWork Runtime 提供 durable Work Session Directory、explicit create/reuse/addressed Work Request 与 Source Event Work Report;Orchestrator 可管理/询问进行中的 Work,而不持有 AgentHandle。
  • Work Request 以 context-update/next-step/next-turn 语义映射 DSH inject/steer/followup;进度回答由 Orchestrator 基于 truthful facts 自主决定,报告主动但合并限流。
  • Orchestrator 对 owned Work 有 graceful-first、audited、history-preserving stop authority;v1 所有 Work 间协作都由 Orchestrator 中介。
  • Work create/request 跨 SQLite/DSH 时只用 stable-id intent + idempotent acceptance + bounded restart reconciliation;歧义显式 needs-repair,不建设通用 workflow/retry engine。
  • Work Report 保持 immutable,只有 unobserved attention 合并;stop 先 transactionally fence request gate,再 graceful/cancel。
  • v1 通过全局 DSH Settings modal 的 Human-owned Work concurrency limit 控制 active independent Work roots,默认 3;create 和 idle-wake 共用原子 admission。达到上限时返回 machine-readable fields + LLM-readable message,不排队、不创建 intent/Session、不自动重试。
  • Work 不做 per-turn Directory 注入;像 continuable subagent 一样通过 addressed report 与 distinct runtime settlement notice 回到 Orchestrator,但保持 independent root identity。inactive history 保留到 explicit purge,compatible completed Work 可显式复用。
  • Directory 分离 DSH activity/lastRun 与 semantic report;Lifecycle Notice 只覆盖重要边界。Work authority 跟随 PersonaBot 当前 Orchestrator,active Continuity Key 不可静默转移。
  • Work 直接以 DSH sessionId 作为规范身份,不维护第二套 workId ↔ sessionId 映射。
  • list_work 采用 current-attention default、updatedAt DESC 与 opaque cursor pagination;顶层 Work tools 仅属于 Orchestrator。terminal report/notice 共用 attention,内部 Subagent 只暴露 aggregate diagnostics。
  • Orchestrator 的 model-facing Work surface 固定为五个窄 semantic tools;resume 是 waking Work Request,不增加第六个工具或 action-based manage_work。
  • 保持 core / client / im / deepseekbot package shape;只有出现第二个真实 adapter / deployment consumer 时再移动 package seam。

Explicit non-goals

  • 不引入 Task entity。
  • 不复制一套 BotWorkSession.status 生命周期;状态从 DSH facts 派生。
  • 不让 Bot Inbox 保存第二份消息正文;每个 Source Event 只有一个正文权威,Inbox Admission 只保存 per-Bot attention facts。
  • 不让模型为普通 reply 自行选择 provider/destination/credential;provider-specific Service Action 必须是独立授权 capability。
  • 不把 Messaging attachment 存成 SQLite BLOB,也不把 provider URL 当成 durable content。
  • SQLite 故障时不接受 NDJSON/内存 fallback writes。
  • 不把 plugin installation、Provider Capability 或已发现 target 当成 proactive action authorization。
  • 不轮询全部外部消息模拟 edit event;reconciliation 必须有界。
  • 不把 delivery enqueue 或 Human UI read 当成 PersonaBot observed。
  • 不在 stale Source Revision 上发送 external side effect,也不在 Grant 撤销后执行 queued retry。
  • v1 不运行自动 Content Purge scheduler。
  • 不声称 external API exactly-once,不对 Unknown Outcome 盲目重发。
  • 不允许 Orchestrator 自行裁决 Unknown Outcome。
  • archive 不只停 Orchestrator;必须 gate 新执行并停止 owned Work/Subagent tree。
  • unarchive 不自动恢复旧 Orchestrator、Work 或 Subagent execution。
  • Trigger 变更不自动 replay/wake 全历史。
  • Content Purge 不静默改写 Memory/Workspace,也不声称删除控制范围外的 exports。
  • 受管 restore 不得复活已 purge 内容;Unresolved Revision 不猜 target、不 wake;Revision Conflict 不猜 current head。
  • 不把 caller 传入的 actorId 当 authorization;actor identity 必须由可信 adapter context 推导。
  • 不把“一个物理 SQLite”做成一个浅层 generic repository;调用方只能通过 owning deep module interface 操作。
  • 不把 Soul/Memory、attachment bytes、DSH Session logs、credentials 或 DSH-native settings 塞进 botharness.db。
  • 不依赖 SQLite busy 或 TTL lock 允许多个 Host 并发写同一 profile;不允许 per-module migration 形成半升级 database。
  • 不复制 DSH Session backend 私有文件,不把 credential values 放入 Profile Backup,不声称 offline old backup 知道未来 purges。
  • 不要求 backup 停 Host/archive bots,不允许 fuzzy multi-authority copy 或 partial restore activation。
  • 不因 Session content omitted 就删除 ownership;不允许 Export Facet dangling references 或重复提交静默创建重复 Bot。
  • 不让 restore 自动 retry cutoff 时的 in-flight provider call,不让旧/新 Host 同时声称 active identity,不把 Profile Backup 当多主同步。
  • 不允许 partial core backup、record-level profile merge 或依赖增量链的 portable export。
  • 不 down-migrate 新版 backup,不把未签名 content-hash manifest 宣称为来源认证,也不自动删除 Human 管理的 backup 文件。
  • 不用 credential reference、display name 或模糊匹配恢复 provider authority;target activation 后不能通过清除 Transferred Out 回滚 source。
  • 不因目标设备缺 adapter/model/Workspace 就丢弃已恢复数据;不自动安装或从 backup 执行插件/Skill,不自动信任/创建 source absolute path,不静默 fallback model。
  • 不让一个非核心 integration 的缺失阻塞整只 PersonaBot,也不从历史 tool calls 猜测当前 dependency requirements。
  • 不精确锁死 producer plugin build,不让 imported package 降级 Host-owned required dependency,也不让 target-local remap 覆盖 portable desired intent。
  • 不因依赖安装/恢复而自动 Activate PersonaBot 或 resume Session;dependency drift 后不继续接受新的相关执行。
  • v1 不实现任何 automatic/operation-coupled backup、scheduler、Managed Backup Catalog、retention buckets、directory/multipart format、incremental chain、fixed byte cap 或 automatic pruning。
  • 不依赖 Prompt 阻止 Bot loop,不把 Provider Echo 当新 attention,不让 Orchestrator 用 cwd/recency/text similarity 猜 Work Session,也不让 Work 直接作为 PersonaBot 对 Channel 发言。
  • 不把 raw AgentHandle/DSH delivery primitive 暴露给模型,不为普通 Work Request 中断当前 step,不强制等待 progress reply,也不建立 direct Work-to-Work peer bus。
  • 不为 Work create/request 实现 distributed exactly-once、通用 workflow engine、后台 retry scheduler、复杂 quarantine lifecycle、多层 concurrency override 或 concurrency waiting queue。
  • 不把 credentials、active Grants、live provider bindings 或可执行 pending work 放进 PersonaBot Export。
  • 不让 PersonaBot Export import 保留 source identity;不把普通 clone 当 Managed Restore。
  • 不把 Messaging Archive / Channel NDJSON 当 runtime authority;v1 不自造 field/database-level at-rest encryption。
  • 不在本票修改 sidebar 排序 UI;M3: 排序模式(auto / manual / inherit + 全局菜单 + 拖拽解锁) #55 / M3: Channel 移动(原生拖拽跨 section + 右键「移动到」子菜单) #56 / M3: roster 排布迁移到 ctx.storage(sections / pins / sectionOrder,宿主生成 id) #66 可并发。

Dependencies

GitHub native blockers 已收窄到真正的 prerequisite:

Acceptance criteria

Activity

  1. self-assigned this
    on Sep 19, 2026
  2. added this to the v1.0 milestone on Sep 19, 2026
  3. 1 remaining item

  4. moved this from Todo to Done in Roadmapon Sep 19, 2026
  5. DoodleBears commented on Sep 20, 2026

    @DoodleBears
    ContributorAuthor

    ⚠️ Memory/Workspace update — #114/#115/#116 (2026-09-21)

    This closed architecture record remains useful for explicit Session ownership, Messaging and durable-authority principles. Its optional-Memory, model Memory Tool, Work naming and cwd details are historical. Current V1 uses default Git Memory; Orchestrator cwd = Memory Repository; persistent revocable PersonaBot Workspace Grants; Assignment terminology; one Assignment = one cwd; Composite Execution World deferred. Future implementation should follow #114 and the updated #80/#81 tickets.

  6. added
    V1.0Milestone v1.0; mirrors the GitHub milestone
    on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

V1.0Milestone v1.0; mirrors the GitHub milestonewayfinder:mapWayfinder map

Type

No type

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions