能力 seam 对照表
dsh 用 ctx.<key> 字符串键注册服务,Longe 用 Type 键(通常是 Service Definition 程序集里的接口)。
本页是两侧服务面的逐行对照——dsh 侧来自固定基线的
能力 seam 目录,
状态以 issue #1 对齐矩阵为准(本页是导读快照)。
一条 seam 的三个角色
内核与会话
| dsh 键(角色) | dsh 包 | Longe seam | 状态 | Longe 文档 |
|---|---|---|---|---|
ctx.sessions(core) | core/session | ISession 等(Longe.Core.Contracts / .Session) | ✅ | 会话与事件溯源 |
ctx.systemPrompt(core) | core/system-prompt | ISystemPromptService(Longe.Core.SystemPrompt) | ✅ | 系统提示词组装 |
ctx.tools(core) | core/tools | IToolRegistry(Longe.Core.Tools) | 🟡 AdditionalContexts/ConcludesTurn 见 #66 | 工具管线 |
ctx.agents(core) | core/agent | IAgentRegistry(Longe.Core.Agent) | ✅ | Agent 生命周期 |
ctx.agentLoop(bundle) | core/agent-loop | AgentLoopPlugin(Longe.Core.AgentLoop) | ✅ durable chunk + assembled source refs | 同上 |
ctx.sessionPersistence(seam) | session/session-persistence | ISessionPersistence / ISessionEventStore(.Persistence + .Coordinator + .Jsonl / .Sqlite) | ✅ | 会话持久化 |
ctx.sessionProjections(core) | session/session-projection | ISessionProjectionRegistry(Longe.Session.Projection 定义 + .Runtime 驱动) | ✅ state/view 分离、StateOf、validated checkpoint 见 #78 | 投影注册表与缓存 |
ctx.sessionProjectionCache(core) | session/session-projection-cache | ISessionProjectionCache(.Runtime + LocalStorage checkpoint store) | ✅ 六字段 header identity;cache 非 authority | 同上 |
ctx.sessionTitle(seam) | session/session-title | ISessionTitle(Longe.Session.Title) | ✅ fixed prompt + durable title request | 会话可观测性 |
ctx.sessionTelemetry(seam) | session/session-telemetry | ITelemetry(Longe.Session.Telemetry) | ✅ bounded fail-closed capture + OTLP/JSON exporter | 同上 |
ctx.sessionQuery / ctx.fileReferences / ctx.sessionReferenceResolver | session-query、context/file-reference* | — | ⬜ v0.6(#39) | — |
ctx.tokenMeter、ctx.toolResultPruner(core) | llm/token-meter、compaction-* | — | ⬜ v0.5(#30、#33) | — |
模型与上下文
| dsh 键(角色) | dsh 包 | Longe seam | 状态 | Longe 文档 |
|---|---|---|---|---|
ctx.llm(seam) | llm/llm + llm-deepseek / llm-pi-ai | ILlmClient + ILlmRequestPreparation(Longe.Llm + .DeepSeek / .Providers) | ✅ exact-client prepared route/capability/retry | LLM 抽象与适配器 |
| —(seam) | — | ILlmVirtualRouteRegistry(Longe.Llm + .Providers) | ✅ 虚拟 route 注册与委托派发 | LLM 抽象与适配器 |
ctx.agentDefaultModel(core) | core/agent-default-model | IAgentDefaultModel(Longe.Presets) | ✅ | 预设与运行时 Bundle |
ctx.agentPresets(core) | preset/* | AgentPresetRegistry / PresetGenerationPool(Longe.Presets) | ✅ leased standing generations + durable hash binding | 同上 |
ctx.compaction(seam) | compaction/* | — | ⬜ v0.5(#33) | — |
ctx.skills(seam) | skill/* | — | ⬜ v0.5(#32) | — |
执行与工具
| dsh 键(角色) | dsh 包 | Longe seam | 状态 | Longe 文档 |
|---|---|---|---|---|
ctx.subprocess(seam) | subprocess/* | ISubprocessRuntime(Longe.Subprocess + .Local) | ✅ | 子进程 |
ctx.shell(seam) | shell/* | IShellService(Longe.Shell + .Local + .Tools) | ✅ | Shell 能力 |
ctx.shellEnv(core) | shell/shell-env | IShellEnvRegistry(Longe.Shell 定义 + Longe.ShellEnv 行 shell-env) | ✅ #353 | 同上 |
ctx.fs(seam) | fs/* | IFsService(Longe.Fs + .Local + .Tools + .Search) | ✅ | 文件系统与搜索 |
ctx.terminals(seam) | terminal/* | ITerminalService(Longe.Terminal + .Local + .Tools) | ✅ exact Agent owner、HMR/awaited drain 已实现 | 作业与持久终端 |
ctx.jobs(seam) | jobs/* | IJobService(Longe.Jobs + .Local + .Tools) | ✅ model-tool owner、phase-aware completion 与 bounded wake 已实现 | 同上 |
ctx.sandbox + ctx.sandboxPolicy | sandbox/*、e2b/* | ISandboxState 等(Longe.Sandbox + .Local;.E2b 已按 #271 退役) | 🔶 seatbelt 同世界 + 其余平台 fail closed | 沙箱与执行世界 |
ctx.lsp(seam) | lsp/* | ILspService(Longe.Lsp + .Stdio + .Tools) | ✅(手写 framing 为记录在案偏离) | LSP 只读导航 |
ctx.web(seam) | web/* | IWebService(Longe.Web + .Http + .Tools) | 🟢 DeepSeek native wire、durable request 与 bounded multi-query 已实现 | Web 搜索与抓取 |
ctx.attachments(seam) | attachment/* | IAttachmentStore(Longe.Attachment + .Local) | ✅ refs-only message + exact combined block order | 附件与溢写 |
ctx.spillStore(seam) | spill/* | ISpillStore + SpillPolicyPlugin(Longe.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 包 | Longe seam | 状态 | Longe 文档 |
|---|---|---|---|---|
ctx.approval(seam) | interaction/user-approval | 审批 seam(Longe.Interaction) | ✅ | 审批与用户交互 |
ctx.userQuestions(seam) | interaction/user-questions | 提问 seam(Longe.Interaction) | ✅ | 同上 |
ctx.commands(core) | interaction/commands | ICommandRegistry:direct invoke + 原子图片准入 | ✅ | 同上 |
ctx.permissionPresets(core) | interaction/permission-presets | IPermissionPresets:durable origin + 空白 Session refresh | ✅ | 同上 |
ctx.authorization(seam) | authorization/* | IAuthorization(Longe.Authorization)+ adapter-owned flow | ✅ typed prompt + exact attempt settlement;Web UI 仍归 #80 | 设置、凭据与身份 |
ctx.planMode、ctx.goals(core) | plan/*、goal/* | — | ⬜ v0.5(#31) | — |
配置与身份
| dsh 键(角色) | dsh 包 | Longe seam | 状态 | Longe 文档 |
|---|---|---|---|---|
ctx.settings(seam) | settings/* | ISettings(Longe.Settings + .Profile) | ✅ | 设置、凭据与身份 |
ctx.credentials(seam) | credentials/* | ICredentials(Longe.Credentials + .Local) | ✅ strict records + adapter-owned API-key commit | 同上 |
| (anonymous-user-id) | identity/anonymous-user-id | IAnonymousIdentity(Longe.Identity) | ✅ | 同上 |
ctx.storage、ctx.workspaceRegistry | storage/*、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 里程碑,尚无 Longe 对应物。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。
键的映射不是一对一:Longe 用 Type 键代替字符串键,且允许把 dsh 的多个小服务合并为一个 .NET seam(如 shellEnv 并入 shell provider)——合并必须能在 架构总览 的三角色公式下说清归属。