Files
deepseek-harness/packages/api/README.zh.md
T
Yichen Jiang 7ec142a325 refactor(jobs): move job observation into api-job-controller
Review asked for the observation wire and its client service to leave
session-controller: a job should reach the Host only through its own
Remote namespace, and the session plugin's apply had to materialize
{ $stream, session } for a service that is not session state.

@deepseek-ai/dsh-api-job-controller now owns the Host JobController
(job.observe over ctx.jobs, requiring the agent and job registries) and
the client ClientJobOutput (ctx.jobOutput) over ClientJobOutputModel,
resolving both Remote faces in its own apply. The remotes assembly
mounts the job namespace; ui-jobs injects the new package; the wire
types drop their Session prefix and spell the status union out so the
client face pulls no Host declaration merges into browser programs.
session-controller keeps the jobsBySession roster and loses observe-job,
job-output, and the observe cadence config.

ui-chat's slots and snapshot-builder import CommandNode and friends from
the declaring package: the typert analyzer's cross-package rule trips on
the snapshot re-export as soon as another client face joins the root
Client program (the new controller does), which is why this branch
carried the change before. JobPumpSource documents why it is an offset
snapshot reader rather than a Node.js Readable.
2026-09-02 22:53:36 +08:00

3.0 KiB

description, kind
description kind
应用 Remote 层的包映射:类型化的 Client 到 Host 能力调用、结果与转发事件,供用户与维护者浏览该组。 package-group

api/ — Remote API 层

English | 中文

概述

api/ 组提供应用的 Remote 层:Client 环境可以调用运行在 Host 上的业务能力——管理目标、运行命令、查看插件清单、发现文件与会话引用——调用方式是类型化方法,并接收结果或转发的 Host 事件。remotes 决定暴露哪些能力、以及每次调用如何到达正确会话的 agent;gateway 在 Client 与 Host 之间承载调用及其结果。技术栈运行在应用共享的 Connection 之上;流式会话数据刻意不在其中。

目录


包

下面这些包共同提供 Remote 层;穷尽式约定以各包 README 为准。

包 职责 ctx key
remotes/ 决定 Client 可以消费哪些 Host 能力与事件。 —
gateway/ 承载带类型的单次调用、多路复用 stream 与转发的 Host 事件。 ctx.typertGateway / ctx.remote
job-controller/ 把一个后台任务的观测 record 流式送到 Client。 ctx.jobController / ctx.remote.job
session-controller/ 拥有 Session 命令、历史 stream、实时控制状态与 Agent/Session 身份策略。 ctx.sessionController / ctx.remote.session
settings-controller/ 拥有 settings 域各 seam 之上的配置界面读写。 ctx.settingsController、ctx.credentialsController / ctx.remote.settings、ctx.remote.credentials
workspace-controller/ 拥有 Workspace 变更与完整 Client Workspace 投影。 ctx.workspaceController / ctx.remote.workspace

Remote 调用沿 Client → Host 方向运行在应用共享的 Connection 之上。API Gateway 拥有 Remote 传输,各 controller 包分别拥有 Session、配置界面与 Workspace 行为。流式下载等不适合 Remote 调用的响应由功能包注册精确的 Connection Fetch 路由。


相关文档

先读 API Gateway 参考以端到端了解 Remote 模型,再读 Typert 子系统页了解共享定义,并通过 Connection 了解物理载体。

  • API Gateway 参考——Typert API Gateway 的现状参考:编程模型、生成流水线与运行时调用。
  • Typert 子系统参考——protocol、Gateway 与消费方装配共享的公共约定。
  • Connection——每次 Remote 调用背后的 RPC 载体、/api 信任围栏与响应封装。

开发备注

维护者的工作上下文——点击展开

无。