能力 seam 对照表

dsh 用 ctx.<key> 字符串键注册服务,Tether 用 Type 键(通常是 Service Definition 程序集里的接口)。 本页是两侧服务面的逐行对照——dsh 侧来自固定基线的 能力 seam 目录, 状态以 issue #1 对齐矩阵为准(本页是导读快照)。

一条 seam 的三个角色

Service Definition 程序集 只有接口与数据类型(如 IToolRegistry) 引用 引用 Provider 实现包 ctx.Provide<IToolRegistry>(this) Consumer 插件 [Inject(typeof(IToolRegistry))] 运行时经激活图绑定,编译期互不知晓
seam 决定是否拆程序集:接口独立成包后,组合预设时只换 Provider 行,Consumer 的引用一字不改——这就是下表每一行的结构。

内核与会话

dsh 键(角色)dsh 包Tether seam状态Tether 文档
ctx.sessions(core)core/sessionISession 等(Tether.Core.Contracts / .Session)✅会话与事件溯源
ctx.systemPrompt(core)core/system-promptISystemPromptService(Tether.Core.SystemPrompt)✅系统提示词组装
ctx.tools(core)core/toolsIToolRegistry(Tether.Core.Tools)🟡 AdditionalContexts/ConcludesTurn 见 #66工具管线
ctx.agents(core)core/agentIAgentRegistry(Tether.Core.Agent)✅Agent 生命周期
ctx.agentLoop(bundle)core/agent-loopAgentLoopPlugin(Tether.Core.AgentLoop)✅ durable chunk + assembled source refs同上
ctx.invariants(core)runtime-diagnostics/invariantsIInvariantRegistry(Tether.Invariants)✅运行期不变量
ctx.sessionPersistence(seam)session/session-persistenceISessionPersistence / ISessionEventStore(.Persistence + .Coordinator + .Jsonl / .Sqlite)✅会话持久化
ctx.sessionProjections(core)session/session-projectionISessionProjectionRegistry(Tether.Session.Projection 定义 + .Runtime 驱动)✅ state/view 分离、StateOf、validated checkpoint 见 #78投影注册表与缓存
ctx.sessionProjectionCache(core)session/session-projection-cacheISessionProjectionCache(.Runtime + LocalStorage checkpoint store)✅ 六字段 header identity;cache 非 authority同上
ctx.sessionTitle(seam)session/session-titleISessionTitle(Tether.Session.Title)✅ fixed prompt + durable title request会话可观测性
ctx.sessionTelemetry(seam)session/session-telemetryITelemetry(Tether.Session.Telemetry)✅ bounded fail-closed capture + OTLP/JSON exporter同上
ctx.sessionQuery / ctx.fileReferences / ctx.sessionReferenceResolversession-query、context/file-reference*—⬜ v0.6(#39)—
ctx.tokenMeter、ctx.toolResultPruner(core)llm/token-meter、compaction-*—⬜ v0.5(#30、#33)—

模型与上下文

dsh 键(角色)dsh 包Tether seam状态Tether 文档
ctx.llm(seam)llm/llm + llm-deepseek / llm-pi-aiILlmClient + ILlmRequestPreparation(Tether.Llm + .DeepSeek / .Providers)✅ exact-client prepared route/capability/retryLLM 抽象与适配器
—(seam)—ILlmVirtualRouteRegistry(Tether.Llm + .Providers)✅ 虚拟 route 注册与委托派发LLM 抽象与适配器
ctx.agentDefaultModel(core)core/agent-default-modelIAgentDefaultModel(Tether.Presets)✅预设与运行时 Bundle
ctx.agentPresets(core)preset/*AgentPresetRegistry / PresetGenerationPool(Tether.Presets)✅ leased standing generations + durable hash binding同上
ctx.compaction(seam)compaction/*—⬜ v0.5(#33)—
ctx.skills(seam)skill/*—⬜ v0.5(#32)—

执行与工具

dsh 键(角色)dsh 包Tether seam状态Tether 文档
ctx.subprocess(seam)subprocess/*ISubprocessRuntime(Tether.Subprocess + .Local)✅子进程
ctx.shell(seam)shell/*IShellService(Tether.Shell + .Local + .Tools)✅Shell 能力
ctx.shellEnv(core)shell/shell-envIShellEnvRegistry(Tether.Shell 定义 + Tether.ShellEnv 行 shell-env)✅ #353同上
ctx.fs(seam)fs/*IFsService(Tether.Fs + .Local + .Tools + .Search)✅文件系统与搜索
ctx.terminals(seam)terminal/*ITerminalService(Tether.Terminal + .Local + .Tools)✅ exact Agent owner、HMR/awaited drain 已实现作业与持久终端
ctx.jobs(seam)jobs/*IJobService(Tether.Jobs + .Local + .Tools)✅ model-tool owner、phase-aware completion 与 bounded wake 已实现同上
ctx.sandbox + ctx.sandboxPolicysandbox/*、e2b/*ISandboxState 等(Tether.Sandbox + .Local;.E2b 已按 #271 退役)🔶 seatbelt 同世界 + 其余平台 fail closed沙箱与执行世界
ctx.lsp(seam)lsp/*ILspService(Tether.Lsp + .Stdio + .Tools)✅(手写 framing 为记录在案偏离)LSP 只读导航
ctx.web(seam)web/*IWebService(Tether.Web + .Http + .Tools)🟢 DeepSeek native wire、durable request 与 bounded multi-query 已实现Web 搜索与抓取
ctx.attachments(seam)attachment/*IAttachmentStore(Tether.Attachment + .Local)✅ refs-only message + exact combined block order附件与溢写
ctx.spillStore(seam)spill/*ISpillStore + SpillPolicyPlugin(Tether.Spill + .Local)✅同上
ctx.ptcRuntime(seam)ptc-runtime/*—⬜ v0.5(#37)—
ctx.subagents(seam)subagent/*—⬜ v0.5(#34)—
ctx.agentTeams(core)experimental/agent-team—⬜ v0.5(#60)—
ctx.workflowEngine(seam)workflow/*—⬜ v0.5(#35)—

策略与交互

dsh 键(角色)dsh 包Tether seam状态Tether 文档
ctx.approval(seam)interaction/user-approval审批 seam(Tether.Interaction)✅审批与用户交互
ctx.userQuestions(seam)interaction/user-questions提问 seam(Tether.Interaction)✅同上
ctx.commands(core)interaction/commandsICommandRegistry:direct invoke + 原子图片准入✅同上
ctx.permissionPresets(core)interaction/permission-presetsIPermissionPresets:durable origin + 空白 Session refresh✅同上
ctx.authorization(seam)authorization/*IAuthorization(Tether.Authorization)+ adapter-owned flow✅ typed prompt + exact attempt settlement;Web UI 仍归 #80设置、凭据与身份
ctx.planMode、ctx.goals(core)plan/*、goal/*—⬜ v0.5(#31)—

配置与身份

dsh 键(角色)dsh 包Tether seam状态Tether 文档
ctx.settings(seam)settings/*ISettings(Tether.Settings + .Profile)✅设置、凭据与身份
ctx.credentials(seam)credentials/*ICredentials(Tether.Credentials + .Local)✅ strict records + adapter-owned API-key commit同上
(anonymous-user-id)identity/anonymous-user-idIAnonymousIdentity(Tether.Identity)✅同上
ctx.storage、ctx.workspaceRegistrystorage/*、workspace/*—⬜ v0.6(#38)—

平台与接入(全部 v0.6+,未开始)

ctx.typert / ctx.typertGateway(#40、#41)、ctx.apiProxy(#41)、ctx.webServer / ctx.clientModules(#46、#47)、ctx.messageFeedback(#43)、ctx.directoryPicker(#49)、ctx.dynamicCordisRunner / ctx.cordisInspect(#36、#54)等——这些属于 Automation/remote API 与 Web parity 里程碑,尚无 Tether 对应物。rc.1 新增的 structured Web index injection(webserver/index-inject)由 #79 拥有;Authorization 的 core/provider seam 已落地,Models/Web 交互面仍由 #80 拥有。

读法

  • ✅ implemented:语义对齐且有回归测试;
  • 🟡 partial:主体落地,剩余义务以矩阵 issue 为准;
  • 🔶 intentional deviation:有意不同,差异与验收证据记录在对齐矩阵;
  • ⬜ deferred:未开始,括号里是 owning issue。

键的映射不是一对一:Tether 用 Type 键代替字符串键,且允许把 dsh 的多个小服务合并为一个 .NET seam(如 shellEnv 并入 shell provider)——合并必须能在 架构总览 的三角色公式下说清归属。

在 GitHub 上编辑此页