refactor(jobs): move the human kill to the job namespace

`session.killJob` becomes `job.kill` on `dsh-api-job-controller`, beside
`job.observe`, so the Session Controller carries only session control and
the roster while every per-job Remote lives on the job namespace. The
client `ctx.jobOutput` gains `kill(sessionId, jobId)`; `dsh-client-ui-jobs`
routes its stop control through it and no longer requires `sessions`.
Unknown or foreign jobs reject with `job/not-found`; the controller
requires `ctx.jobs` to load, so `jobs-unavailable` disappears. The two
subagent ownership-fence helpers are classified duplicate-install-safe
Host exports of the Session Controller for the cross-controller import.
This commit is contained in:
Yichen Jiang committed 2026-09-02 23:18:08 +08:00
1 parent 121db081a4
commit e8469d6f6c
50 files changed
+282 -324

No files matched your search

+2 -2
View File
@@ -310,8 +310,6 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
SessionAttachmentValue: 'session.md',
SessionCancelRequest: 'session.md',
SessionCancelValue: 'session.md',
SessionKillJobRequest: 'session.md',
SessionKillJobValue: 'session.md',
SessionControlFrame: 'session.md',
SessionCreateRequest: 'session.md',
SessionCreateValue: 'session.md',
@@ -512,6 +510,8 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
JobDoneListener: 'jobs.md',
JobId: 'jobs.md',
JobKillOptions: 'jobs.md',
JobKillRequest: 'jobs.md',
JobKillValue: 'jobs.md',
JobObserveFrame: 'jobs.md',
JobObserveRequest: 'jobs.md',
JobRead: 'jobs.md',
+1
View File
@@ -41,6 +41,7 @@ const DUPLICATE_SAFE_PACKAGES: readonly string[] = [
* Runtime exports whose values remain valid when npm installs another package copy.
*/
const SAFE_HOST_DEPENDENCY_EXPORTS = {
'@deepseek-ai/dsh-api-session-controller': ['apiSessionSubagentOwnershipError', 'hasApiSessionSubagentOwner'],
'@deepseek-ai/dsh-credentials': ['credentialKey'],
'@deepseek-ai/dsh-deque': ['Deque'],
'@deepseek-ai/dsh-llm': ['callConfigEquals'],