You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
line_owner::<T>(line):按 line id 解析到该行的活动实例,返回该实例里分支作用域的服务 T;调用方随后直接调用目标所有者自己的类型化操作(line_owner::<InputQueue>(&line)?.submit(input, cancelled)、line_owner::<ContextUsage>(&line)?.read(None, cancelled))。
Activity
eric8810 commentedon Nov 22, 2026
基线:
origin/main=c347bc34463a178ad3d1e28024a6a1457f8d62ba。对照的 open PR:#2029 headce840afdb6193442229f99b03136108d7981456e(§7 规则来源)。1. 摘要
SessionScope 的公开面是值加运行时操作,边界成立,不需要新的所有者;五个宿主端口以对象形式跨所有者,目标是把每个端口改成一组数据操作或移出。
最重的差距是
prepareContextHost(没有调用意图、只有恒等实现、约束写在消费者侧)与historyRenderer(以函数表交付、只能在 Rust 内调用,context_in还代查分支历史)。其余差距:
sessionLifecycle有两套活动持有接口、observeFault抛框架错误;timelineStore.append宣告为公开方法却拒绝跨语言调用;SessionIdentity在值里夹带取消令牌;agentConfig代查 Agent 的配置且没有读者。2. 职责与维护边界
SessionScope 是运行时在 Session 作用域的插件行,只提供值(
SessionConfig、AgentConfig、SessionIdentity、SessionLifecycle、SessionLoader、TimelineFactory)并把 Agent 的 store 绑定挂到 Session 组;SessionScopePlugin的apply里没有业务状态、没有 Timeline 写入。五个宿主端口的真正所有者不在 Session:prepareModelHost属于请求准备(aimux 的ConfiguredModel或DefaultPrepareModelPlugin),compactionStrategyHost属于 ContextCompaction 的ProductSummaryStrategy,historyRenderer、contextModelHost、prepareContextHost由装配方用session_value提供;生成的 catalog 的 provider 列记录"谁 provide 了这个键",把六行都记成 SessionScope,读不出所有者。SessionScope 属于运行时机制,报告只给目标形态与形状判断,批次由运行时安排。3. 目标形态
调用点按意图归成下面十五类;除标注的两类,每类对应一个所有者的一组操作或一个值。
{sessionId, restored}create(definition) → {instanceId};remove({instanceId})幂等compact(input, cancelled) → completed / skipped / failed,带诊断;describe给名字与计划大小through:renderedContext、renderedStream、snapshot、snapshotFromCheckpoint、streamCheckpoint颗粒度判断:配置记录、身份、阶段、活动持有、失败五类都是 Session 自身状态,作用域与生命周期相同,归一个所有者成立,上层所有者不需要独立;内容实例的生命周期按定义,与 Session 的阶段无关,
SessionLoader是机制且计划退场;分支运行时上下文由运行时构造、由 TimelineTree 持有与结算,共同生命周期写在 lifecycle.md;分支目录与事件页归存储所有者,提交批次不出所有者;请求设置、模型事实、压缩策略、上下文折叠分属四个所有者,四种生命周期互不相干,合成一组"宿主端口"没有依据。上下文折叠归分支:Session 部件不按分支 id 折叠其他分支的历史。十五类意图都落在现有所有者上,本 issue 不产生新的所有者。4. 现状对照
sessionConfig.getsessionIdentity.getSessionIdentity.unloading(Rust 字段,序列化时跳过)sessionLifecycle.activated、closingsessionLifecycle.phase(#[service(skip)])sessionLifecycle.hold、releasesessionLifecycle.take_hold(#[service(skip)])hold是同一操作,hold已覆盖按行释放sessionLifecycle.reportFault、failuresessionLifecycle.observeFaultsessionLoader.create、removetimelineStore的 branches、head、readPage、readSegments、query、trace、batchEnd、batchEndAt、saveSnapshot、latestSnapshot、sessionConfig、commits、closeCommitstimelineStore.appendtimelineStore.createSession、releaseSession、rollbackSessiontimelineFactory.buildtimelineFactory.startup_timeouthistoryRenderer的 rendered_context、rendered_stream、snapshot、snapshot_from_checkpoint、stream_checkpoint&Timelinethrough读取五个操作,现状只有 Rust 能调且要调用方交句柄historyRenderer.context、replay_contextrendered_context内部使用)historyRenderer.context_in&Session与 branch idcontextModelHostOption<Arc<dyn ResolveContextModel>>prepareContextHostArc<dyn PrepareContext>prepareModelHostArc<dyn PrepareModel>compactionStrategyHostOption<Arc<dyn CompactionStrategy>>agentConfig.getskillsConfig.getcollaborationConfig.getsessionConfig、sessionIdentity、sessionLifecycle、sessionLoader、timelineStore的读操作与目标一致。5. 调用点
sessionConfig的cwd与collaboration_role、sessionIdentity的session_idsessionConfig的tools与excluded_toolssessionConfig的cwd、sessionLifecycle的phase、take_hold、closingtake_hold与hold;phase只有 Rust 能调)sessionConfig的interactive与collaboration_role、sessionLifecyclesessionConfig的interactivesessionConfig的cwd、sessionLifecycle的activated与closing、sessionLoader的create与remove、skillsConfigsessionIdentity的session_id、timelineFactory.build、timelineStore的读操作timelineFactory.startup_timeoutsessionIdentity的unloadingclosedsessionConfigModelSettingsprepareModelHost.prepare、historyRenderer.rendered_stream与rendered_context、contextModelHost与compactionStrategyHost(经ContextPolicy::bind)through折叠本分支上下文,判预算与压缩Arc<dyn …>)contextModelHostprepareContextHost.prepare、historyRenderer、contextModelHost与compactionStrategyHostprepareContextHost是调用方专用的钩子)sessionLifecycle.report_native_faultsessionConfig的permission_policy、sessionIdentity的session_idsessionLifecycle.activatedsessionLifecycle.take_holdtake_hold只有 Rust 能调)sessionIdentity的session_idsessionLoader的create与removesessionIdentity、sessionConfig、sessionLifecycle的hold、release、failure、observeFault、reportFault、sessionLoader、timelineStorehold返回 id,测试钉住不是对象)6. 有原因的例外
TimelineFactory::build交出Arc<TimelineContext>:共同生命周期是创建在运行时、持有与结算在 TimelineTree、Session 关闭先关树再卸载 scope、构建失败在工厂内结算,lifecycle.md §1 与 single-tree 关闭 是各方共同引用的设计。TimelineFactory的Weak<SessionAssembly>:断开 SessionAssembly → loaded scope → TimelineTree → TimelineFactory 的所有权环,与TreeCommands同一个原因。hold与observe_fault的ctx参数:调用方行的句柄,用来把返回的 id 绑定到发起行,跨语言绑定由派发方填同一个行;ctx不是调用方要处理的数据。SessionConfig有约 25 个注入点、每个只取 1–3 个成员:值是创建记录,按读者拆成多个值会让同一份记录有多个来源。SessionLifecycle在同一个所有者里放阶段、活动持有、失败:三者都是 Session 自身状态,作用域与生命周期相同。hold与observeFault共用一张表:两者的收尾都由调用方行触发,所有者代为释放。ContextPolicy::bind在消费者侧组合三个 Session 端口与分支 Timeline:组合体不对外提供,是 Loop 与 ContextPreparation 自己的读取流程。DefaultPrepareModelPlugin只把SessionConfig转成ModelSettings:值必须在 Session 装配时按 Session 现算,session_value做不到。ContextModelHost与CompactionStrategyHost用Option表达"这个 profile 不压缩":缺失有业务含义,不是对上游的不确定。SessionLoader另存 instance→FiberView表:按 id 找到要关闭的实例;loader 是否有按实例关闭的公开操作未确认。SessionConfig的interactive与language:interactive的省略是原生存储的 serde 形式,实时语言由sessionLanguage持有。7. 建议与影响面
prepare({turnId, requestId, history, availableTools}) → ModelSettings,同步,无取消与超时;现状是Arc<dyn PrepareModel>,只有 Rust 能调。(b)模型事实:describe、count、contributions、estimate四个读取,纯计算;现状是resolve返回Arc<dyn ContextModel>,调用方各自保留对象。(c)摘要替换:describe与compact(input, cancelled),input 只带模型事实;现状的CompactionInput.model是模型所有者的对象,每次调用把对象交给策略。(d)上下文折叠:分支内五个读取(见第 2 条)。(e)请求变换:没有目标项,见第 3 条。影响面:名字在 catalog 里从internal(hot-path)变成data,npm/branch-services.d.ts新增四组操作,Loop、ContextPreparation、ContextUsage 三个调用方改为调用操作,SummaryStrategy读窗口与计数的签名跟着改;旧接口与全部调用方在同一个改动里删掉,不留兼容期。historyRenderer改成分支内的投影读取,context_in移出。 目标五个操作按调用方分支与through:renderedContext、renderedStream、snapshot、snapshotFromCheckpoint、streamCheckpoint;context_in用&Session按 branch id 折叠别的分支历史,是代查,归 所有者扫描:TimelineTree 与分支线 #2024 的分支读取;context与replay_context没有产品调用方,收回所有者内部。影响面:Loop 两处、ContextPreparation 一处改为分支内读取,示例与测试改为直接用Timeline。prepareContextHost移出,需求先落到所有者。 产品里唯一的实现是 host.rs 的IdentityContext。若确有宿主需求要改请求对象,归 ContextPreparation;若要往上下文加内容,只能走已采用输入或工具结果。影响面:ContextPreparation 少一次调用与一段"保留前缀、只能追加"的校验,五个测试替身转为流程测试的内部实现,session_value的一个绑定点消失。compactionStrategyHost的输入改传模型事实。CompactionInput.model是Arc<dyn ContextModel>,把模型所有者的对象交给策略;目标里策略只收窗口与计数事实。影响面:CompactionInput与replacement_size的签名、SummaryStrategy读窗口与计数的几处。contextModelHost由"拿对象"改成"拿这次的读"。 现在交付的是Option<Arc<dyn ResolveContextModel>>。四个消费点各要一小部分(窗口、阈值、计数、贡献),对象交付把保留与失效的决定推给每个调用方。影响面:Loop、ContextPreparation、ContextUsage 三处。sessionLifecycle收敛成一套接口并统一错误种类。take_hold与hold是同一操作的两套接口,phase是只有 Rust 能调的值读;observeFault的失败是rutis::Error,跨语言抛ErrorThrown(code 是自由字符串),同对象其他方法抛AgentErrorThrown;failure用本地FaultQuery,与port_faces::Empty重复。影响面:SessionLifecycle的 Rust 面 与 TypeScript 声明;ShellInput、BackgroundExec、Report、Collaboration、FileAccess、Goal、MCP 七个调用方在同一个改动里迁移。运行时机制,批次由运行时安排。SessionIdentity不再夹带取消令牌。unloading是SessionIdentity的#[serde(skip)]字段,唯一读者是范围外的 SessionBroadcastEnd;空闲释放在生命周期所有者手里,身份值只需要{sessionId, restored}。影响面:SessionIdentity的构造一处、SessionBroadcastEnd 的判据一处(范围外,不在本扫描提改法)。timelineStore.append从公共方法表移出,createSession、releaseSession、rollbackSession移出 Session 组。append在methods()里宣告为 sync,外部调用一律被拒;后三个操作的调用者是 Agent,放在 Session 组会读成"这个 Session 能建别的 Session"。影响面:catalog、TypeScript 声明、runtime/fixtures/timeline-store.ts,与调用方在同一个改动里迁完。agentConfig.get返回 Agent 的配置,Session 面替 Agent 返回数据且没有读者;skillsConfig.get与collaborationConfig.get的读者是各自插件内部的类型键读取,面本身没有外部读者。影响面:catalog 三行、npm/branch-services.d.ts三个接口、crates/dim-agent-capabilities/tests/legacy_session_faces.rs;第三方插件包若已调用三个get,按 §7 在同一个改动里改完,不留兼容期。SessionInstanceError按调用方下一步分类。 现在Create同时表示"组不在作用域内(调用方改输入)"与"创建失败(可能重试)",三个变体 都只带 message;跨语言只暴露{name, code, data},message 在 Error 上。影响面:Skills 与 MCP 的错误映射、TypeScript 的SessionInstanceErrorThrown。timelineFactory.startup_timeout移出,build保留。 构造方已经用自己的启动超时;TimelineTree 再把同一个值取来自己开等待,是把所有者的内部等待策略推给调用方。影响面:TimelineTree 的三处等待改为调用操作自带期限,timeline_tree.rs 的调用点。sessionLoader不加操作,也不加跨语言依赖。 Draft 设计 thin-instances 与 Proposed 的 ADR 015 把SessionLoader与目录名列为删除项;调用意图由后续机制承接。影响面:无代码改动。eric8810 commentedon Nov 23, 2026
存储板块契约(#2091,head 73c259f)与 SessionScope 对齐
timelineStore归属:SessionStore 拥有 Timeline 操作与timelineStore面;SessionScope 在 Session 实例上绑定该面。timelineStore不承载createSession、releaseSession、rollbackSession、append(属于 Session 仓储的创建与提交流程)。store.query与store.sessionConfig是同一引擎在进程面的读,服务已加载与未加载的 Session,保留一个实现。之前「删除重复名字」的要求按这个归属改写。eric8810 commentedon Nov 23, 2026
目标契约:交付部分。设计部分见 #2093(draft,head
4557d0b85,基线5930539bc)。契约把 Session 板块拆成六个所有者,每个所有者一个数据面:
sessionScope(Session 自己的记录、身份、阶段、租约、失败、内容挂载、分支构造);租约只有一种:hold返回 id,绑调用行、由所有者结算,release只让空闲释放更早发生)、requestSettings(一个值)、contextFacts(四个读取)、contextProjection(分支作用域五个读取)、summaryStrategy(两个操作)、fileAccessFacts(两个读取)。prepareContextHost没有目标:请求变换没有调用意图,投影策略改为安装时选择。删除清单
公开面删除后不得存在:
sessionConfig、sessionIdentity、sessionLifecycle、sessionLoader、timelineFactory(由sessionScope替代);prepareModelHost(由requestSettings替代);contextModelHost(由contextFacts替代);historyRenderer(由contextProjection替代);compactionStrategyHost(由summaryStrategy替代);prepareContextHost(无替代)。agentConfig.get、skillsConfig.get、collaborationConfig.get;对应的#[rutis::service]impl 删除,值仍由各自的安装函数经session_value提供,读取方继续用类型键。SessionConfig、SessionIdentity、SessionLifecycle、SessionLoader、TimelineFactory上原样承载这些名字的类型与实现;SessionLifecycle的take_hold、phase、watch等#[service(skip)]方法改由sessionScope的公开操作承担。TimelineFactory::startup_timeout;等待上限留在openBranch内部。HistoryRenderer的context、replay_context、context_in;折叠留在contextProjection内部,context_in的按分支 id 代查删除。FileAccessFacts对象、ReadFileAccessFactstrait 与其端口类型;由fileAccessFacts.check/workspaceRoots替代。PrepareContexttrait、IdentityContext与PrepareContextHost类型。PrepareModeltrait 与PrepareModelHost类型;DefaultPrepareModelPlugin改为提供requestSettings值。ResolveContextModel、ContextModel、ContextCounter、ContextModelHost的跨插件面;计数器留在contextFacts内部。CompactionStrategytrait、CompactionStrategyHost、CompactionInput的model字段;StrategyOutcome作为回复数据保留。npm/branch-services.d.ts、npm/plugin.d.ts里上述名字的声明,替换为五个新服务。不删除:
SessionConfig、SessionIdentity的字段;SessionPhase、SessionFault、MountDefinition的数据语义;SessionStore构造的timelineStore绑定(SessionScope 安装,操作归 #2018);productSummary的目标规则与摘要提示词(改为summaryStrategy的工厂配置)。调用方迁移
sessionConfig.cwd/collaboration_role、sessionIdentity.session_idsessionScope.config、sessionScope.identitysessionConfig.tools/excluded_toolssessionScope.configsessionConfig.cwd、sessionLifecycle.phase/take_hold/closingsessionScope.config、phase、hold(命令的运行自己的注册表持有租约,取消的调用立即返回、运行继续)、release、closingsessionConfig.interactive/collaboration_role、sessionLifecyclesessionScope.config、activated/closingsessionConfig.interactivesessionScope.configsessionConfig.cwd、sessionLifecycle.activated/closing、sessionLoader.create/remove、skillsConfigsessionScope.config、activated、closing、mount、unmount;工厂文本继续用类型键读取sessionIdentity.session_id、timelineFactory.build/startup_timeout、timelineStore读sessionScope.identity、openBranch、timelineStore的每行读取与完成订阅;query/sessionConfig走进程面store(#2018);等待上限由openBranch持有sessionIdentity.unloadingunloading删除;该部件不在本板块扫描范围,判据与它的所有者对齐后再迁移sessionConfig加prepare(turnId, requestId, history, availableTools)requestSettings.settings;turnId/requestId/history/availableTools回到 LoopprepareModelHost.prepare、historyRenderer.rendered_stream/rendered_context、contextModelHost、compactionStrategyHostrequestSettings.settings、contextProjection.rendered_stream/rendered_context、contextFacts.describe/count、summaryStrategy.describe/compactcontextModelHostcontextFacts.describe、contributions、estimateprepareContextHost.prepare、historyRenderer、contextModelHost、compactionStrategyHostcontextProjection、contextFacts、summaryStrategy同上sessionLifecycle.report_native_faultsessionScope.reportFaultsessionConfig.permission_policy、sessionIdentity.session_id、FileAccessFacts对象sessionScope.config、identity、fileAccessFacts.checkFileAccessFacts::workspace_rootsfileAccessFacts.workspaceRootsBranch门面或直接拿分支实例line_owner::<T>(line)?),调用方直接调目标所有者的类型化操作;SessionScope 不提供转发操作、操作名路由或请求/回复类型sessionLifecycle.activatedsessionScope.activatedsessionLifecycle.take_holdsessionScope.hold;id 绑调用行,行卸载由所有者收尾,任务结束时释放只为让空闲释放更早发生sessionIdentity.session_idsessionScope.identitysessionLoader.create/removesessionScope.mount/unmounttimelineStore.createSession/releaseSession/rollbackSession/appendtimelineStore.query、timelineStore.sessionConfigstore.query、store.sessionConfig(未加载的 Session 也能读);Session 面不再重复这两个名字sessionIdentity、sessionConfig、sessionLifecycle.hold/release/failure/observeFault/reportFault、sessionLoader、timelineStore、historyRenderersessionScope的同名操作、timelineStore、contextProjection.rendered_contexttimeline_acceptance、context_flow)historyRenderer.context/replay_context/context_incontextProjection.rendered_context;其它折叠走所有者内部函数其他契约里的旧名字
#2092(TimelineTree)与 #2103 的依赖表仍写着被删除的名字。改动在对方契约,正确的名字是:
SessionIdentity→sessionScope.identity(值{sessionId, restored});TimelineFactory→sessionScope.openBranch(build的替代,等待上限在操作内部);服务名sessionConfig/sessionIdentity→sessionScope.config/sessionScope.identity;timelineStore的query/sessionConfig→ 进程面store.query/store.sessionConfig。被取代的现有文档
按规则 C,PR 只改描述本所有者的段落,并给每份契约加「Supersedes」一节:
runtime-owner-operations.md的sessionLifecycle、sessionLoader、失败、PrepareModelHost、PrepareContextHost、ContextModelHost、CompactionStrategyHost、HistoryRenderer行与「Calls from a Session to a selected branch」一节(timelineTree.call删除);service-faces.md§3.2 的三个配置面、§3.5 的五个端口、§3.6 的timelineFactory;plugin-contract.md的sessionIdentity、sessionLifecycle、sessionConfig、agentConfig四行;plugins/README.md的 ContextCompaction 行。已接受的 ADR 不改。客户端 wire 与用户可见行为不变(规则 D)。实现任务
按 #2015「第二阶段」的次序做;新的操作、全部调用方迁移与旧公开面的删除在同一个改动里完成,不留新旧并存的兼容期:
pub(crate),编译错误就是迁移清单。#[rutis::service]数据面:sessionScope、requestSettings、contextFacts、contextProjection、summaryStrategy、fileAccessFacts;租约操作取caller: &Ctx;openBranch按「A branch's runtime context: the handover」一节交接给 TimelineTree;withHold的 work 按引用跨,租约 id 绑定调用行并在行卸载时由所有者结算,内容实例 id 归 Session、unmount只是提前退役,分支上下文按第 6 节交接给 TimelineTree。prepareContextHost与historyRenderer不留别名。npm/*.d.ts。验收
sessionScope的hold在行卸载时结算、release对另一行的 id 答invalid、失败优先级、挂载、openBranch的交接与关闭路径(构建失败先结算再回复、树先关、Session 先关、不重载);fileAccessFacts的~/../链接解析、四项事实、discoveryError与unavailable;contextFacts的四个读取与algorithm_mismatch;contextProjection的分页折叠、快照锚点与context_in消失;summaryStrategy的 completed / skipped / failed 与取消。SessionLifecycle、SessionLoader、TimelineFactory、HistoryRenderer、ContextModelHost、PrepareModelHost、CompactionStrategyHost、PrepareContextHost、FileAccessFacts的 Rust trait、agentConfig、skillsConfig、collaborationConfig)。catalog.md里六个新名字是data,且没有lineOwner或任何按操作名转发的条目;本板块的所有者没有internal(reason)条目;删除的旧名字不再出现。cargo run --locked -p xtask -- check、graph、types通过,生成快照已更新。向其他所有者的需求
line_owner::<T>(line)?),由调用方直接调目标所有者的类型化操作;不设转发操作、操作名路由或回复信封。TimelineTree 只给行 id 与行状态,不给地址。Session的end_branch、set_default_branch、branch、branches、directory、default_and_directory、ended_head、sequence、batch_end、query归 TimelineTree,Session 访问面不再转发。query/sessionConfig留在store,createSession/releaseSession/rollbackSession/append不在 Session 面。eric8810 commentedon Nov 23, 2026
扫描报告是第一阶段材料,结论以 #2093 与交付评论为准。
eric8810 commentedon Nov 23, 2026
来自 #2024 的契约(设计 #2092,交付 #2024 comment),两项需求落在 Session 访问面:
按 line id 解析分支组服务,供 Session 部件使用。 横切决定 2 规定 Session 部件访问分支所有者只用两种操作:向该行写输入(该行 input owner 按序消费并决定结果)、读该行所有者发布的值。契约(docs(design): define the line directory owner contract #2092 的
TimelineTree.md)把提供方定在机制这一层,形状是类型化的:line_owner::<T>(line):按 line id 解析到该行的活动实例,返回该实例里分支作用域的服务T;调用方随后直接调用目标所有者自己的类型化操作(line_owner::<InputQueue>(&line)?.submit(input, cancelled)、line_owner::<ContextUsage>(&line)?.read(None, cancelled))。NoInstance;Session 关闭答Closed;操作本身的错误是该所有者的,原样。json!请求的门面;operation不是字符串,请求不是 JSON 值。openBranch)时登记(session, line) → 实例,上下文关闭即失效;解析不经任何业务所有者,TimelineTree不在这条路径上,也不为它增加转发操作。npm声明;调用方迁移表见 所有者扫描:TimelineTree 与分支线 #2024 交付评论。Session 门面不再转发行操作。
Session::end_branch、set_default_branch、branch、branches、directory、default_and_directory、ended_head、sequence、batch_end、query现在是TimelineTreeControl的同一批操作的第二套入口。按 docs(design): define the line directory owner contract #2092,行操作只有timelineTree一套(create、end、set_default、directory、read),TimelineTreeControl这个名字与 trait 删除,装配只保留 crate-private 的生命周期入口。影响面:#2025 的删除清单(
Session的上述方法、TimelineTreeControl的引用)与 Session 访问面对这两个操作的形状;调用方迁移表见 #2024 的交付评论。eric8810 commentedon Nov 23, 2026
#2021 的契约(#2095)向 SessionScope 提出 Report 需要的两项,已登记在
docs/design/plugins/Report.md的Requirements raised to mechanism owners:hold() → holdId、release(holdId),id 绑定调用方行,行卸载或 Session 关闭时结算。现在 Report 用SessionLifecycle::take_hold()取SessionHold守卫并存在草稿里(crates/dim-report/src/draft.rs的Draft._hold)。closing()作为操作。 草稿在 Session 关闭时丢弃并结算;调用方等closing()解析,不持有取消令牌。两项是 Report 契约的依赖;等 SessionScope 的契约定形后按同一组操作对齐。
docs(design): hold work by callback and settle leases at the row
eric8810 commentedon Nov 23, 2026
来自 #2020 的目标契约(#2098):Collaboration 的 Session 部件与分支部件需要按
(session, line)id 到达一行的所有者,请把这条需求写入 Session 访问面。需要的操作(都是数据:id 进,值或已受理的写入出):
(session, line)投递,由该行输入所有者按序受理并决定结果。(session, line)(撤回再带inputId)。(session, line, approvalId, decision)。(session, line)读只读值(例如 InputQueue 的待处理、Collaboration 的委派、采纳配置)。sessionId读只读值(成员 Session 部件读 leader 的collaborationSession.approvalDestination)。调用方:Collaboration 的 Session 部件与分支部件(#2020);Rpc 的 Session 方法路由与 Provider 的采纳配置读(#2020);Scheduler 的待处理与默认行、Workflow 的历史读(#2023/#2033 的同一缺口)。#2092 的 TimelineTree 契约把这一步记为「Session access 面由 #2025 拥有」,而 #2093 目前写「Requirements raised to mechanism owners: None」,两处需要一致。
在访问面落地前,这些调用方保持阻塞,不回落为持有
Branch或Session。契约见 #2098 的Agents.md、CollaborationSession.md、CollaborationTimeline.md。eric8810 commentedon Nov 23, 2026
来自 #2033 的目标契约(#2099,head
42b6186e2):跨契约核对把「按行 id 调分支所有者」的提供方判给 #2024 的契约(横切决定 2 的原文),本评论只记录 SessionScope 侧的事实。SessionScope 的契约没有按行 id 解析分支所有者的操作;Goal 的写入/读取与 Code Mode 的运行都需要它(Goal.md、CodeMode.md)。需求已提到 #2024;若最终归属改为 SessionScope,再按那里的形状补。
eric8810 commentedon Nov 23, 2026
来自 #2028 的目标契约(#2100):分支工具链路有两项落在 Session 宿主端口与 Session 访问机制上。
exec、exec_stop、session.exec.output*与 Collaboration 的成员审批现在用service::<T>(branch)。目标是由 所有者扫描:SessionScope 与 Session 宿主端口 #2025 的机制按 line id 解析所有者实例(docs(design): define the line directory owner contract #2092 的## Session parts reaching a line's owners已把它列为机制需求)。所有者扫描:分支工具链路 #2028 的 FileReads 与 BackgroundExec 契约按这个解析调用,不加转发操作。FileAccessFacts的 Rust 对象与 HostPlatform 的home。按 docs(design): target contracts for the Session scope and its host ports #2093 的fileAccessFacts.check({access, mode, path}, cancelled) → {target, workspace, system, owned, grant, discoveryError?}:服务按 Session 解析,sessionId不是请求字段;错误invalid、unavailable、cancelled、closed,discoveryError是字段不是错误。Permission 不再需要 SessionScope 的identity。契约见 Permission.md。eric8810 commentedon Nov 23, 2026
#2026 的契约需要 Session 部件按
(session, line)id 访问行的所有者:向该行写输入(InputQueue.submit)、读该行所有者发布的值(Wait 的到达、ContextUsage 的 usage、FileReads 的绑定),以及 Prompt 的 adopt。TimelineTree 的契约把这一步交给 #2025 的 Session access surface;#2026 的 WorkspaceTools、Wait、Recall、ShellInput、InputMethods、PromptSuggestion、PromptSources 都写成调用该机制。请确认它在本契约里落成什么操作(谁提供、id 绑定哪一行、行卸载时谁收尾),#2026 的交付清单按它迁移。eric8810 commentedon Nov 23, 2026
来自 #2027 的目标契约(#2102):分支轮次链路的 Session 部件需要按分支 id 的访问面,请纳入 #2025 的 Session access 契约。
TimelineTree 的契约(#2092)把「id-to-instance」这一步交给 #2025 的 Session access surface。分支轮次链路用到它的调用方:
session.turn.getagentLoop.state、modelProvider.progress,并按 #2092 的read读事实session.input.pendinginputQueue.pendingsession.input.withdrawinputQueue.withdrawwait工具waitBranch.waitprompt.configure与prompt.adoptedConfigurationsession.context.*contextPreparation.compact、contextUsage.read契约不定义访问面的签名;#2025 的所有者决定。
service::<T>(branch)的对象路径在迁移后不保留。docs(design): name the line-addressed call provider
171 remaining items
docs: retire the identity and configuration faces from the contract a…
test: drop the last retired-service injections from the fixtures
fix: read describe() in the observer fixture and tidy the pages the r…
test: read ids from BranchLifecycle in the remaining required fixtures
test: read the branch ids from BranchLifecycle in three more fixtures
style: drop the unused TimelineContext imports the lint found
fix(python): read the branch ids through timelineContext.identity()
test: read the restored configuration through describe()
fix(fixtures): read identity() from timelineContext in the branch fix…
fix(app-server): let the target answer while its Session closes
fix: order the publication wait before the failing write, and finish …
docs: make the migrated examples callable, and restore the shipped me…
test: restore the publication test's original ordering
docs: read identity() and describe() in the zh example, and keep the …
docs: keep the shipped store and Lody names, and name the describe() …