refactor(job-controller): drop the subagent ownership fence from job.kill

The registry's owner fence is the only access rule for a human kill: a job
is killable by the session whose list carries it, and a child session's own
jobs are no exception. The fence had pulled two implementation helpers out
of the Session Controller's package entry (plus a safe-host-export exception
for them) so the job controller could import them; both go, and the job
controller no longer depends on the agent registry or the Session Controller.
This commit is contained in:
Yichen Jiang committed 2026-09-21 16:34:15 +08:00
1 parent 2bba702a6e
commit 0659ded55b
20 files changed
+40 -52

No files matched your search

+2 -2
View File
@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/config-catalog.md
config-catalog.md: e373bc9536fd7c7f1e9019db589f21d7440efef3
config-catalog.zh.md: dd7078c8cabc0c1edbd8e1952c2e72cb998d7974
config-catalog.md: a9f82169c1a0d1ced020a84c56e994be1c963d01
config-catalog.zh.md: 572131ec9efc2149fb1e81850135d8e9687ccd13
+2 -2
View File
@@ -205,7 +205,7 @@ Source: [`packages/api/gateway/src/index.ts:144`](../packages/api/gateway/src/in
## `@deepseek-ai/dsh-api-job-controller`
Requires: `agents` · `jobs` · `typert`
Requires: `jobs` · `typert`
```ts config-catalog
/** Job Controller deployment policy. */
@@ -217,7 +217,7 @@ export interface Config {
}
```
Source: [`packages/api/job-controller/src/index.ts:37`](../packages/api/job-controller/src/index.ts)
Source: [`packages/api/job-controller/src/index.ts:35`](../packages/api/job-controller/src/index.ts)
<a id="deepseek-aidsh-api-session-controller"></a>
+1 -1
View File
@@ -219,7 +219,7 @@ export interface Config {
}
```
来源:[`packages/api/job-controller/src/index.ts:37`](../packages/api/job-controller/src/index.ts)
来源:[`packages/api/job-controller/src/index.ts:35`](../packages/api/job-controller/src/index.ts)
<a id="deepseek-aidsh-api-session-controller"></a>
+2 -2
View File
@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/subsystems/jobs.md
jobs.md: 85400f905e1d313f5f903863f572b0bedbcadfd7
jobs.zh.md: 1397e1b93bbdd2f57ab219122b1c1ad8c0938538
jobs.md: 0d235c6101ff20c9ef530bc08efc98000ce05fd0
jobs.zh.md: fbb650bbc10e4c35451b193cdf7317b28980752c
+6 -6
View File
@@ -369,12 +369,12 @@ Host service backing the generated `ctx.remote.job` namespace.
/**
* Kill one background job on a human's behalf. The request's session is
* the fenced read's caller, so the job must be one that session can see;
* the subagent ownership fence applies exactly as it does to
* `session.cancel`. The kill records `cancelled by the user` as its reason;
* it is not one the model requested, so the owning agent still receives
* the completion notice, and a shell tool waiting on that job reads the
* reason in its own result.
* the fenced read's caller, so the job must be one that session can see:
* the registry's owner fence is the only access rule, and a child session's
* own jobs are killable from its list like any other. The kill records
* `cancelled by the user` as its reason; it is not one the model requested,
* so the owning agent still receives the completion notice, and a shell
* tool waiting on that job reads the reason in its own result.
* @param request - Session whose job list carries the job, and the job id.
* @returns the registry's admission of the kill request.
*/
+6 -6
View File
@@ -369,12 +369,12 @@ Host service backing the generated `ctx.remote.job` namespace.
/**
* Kill one background job on a human's behalf. The request's session is
* the fenced read's caller, so the job must be one that session can see;
* the subagent ownership fence applies exactly as it does to
* `session.cancel`. The kill records `cancelled by the user` as its reason;
* it is not one the model requested, so the owning agent still receives
* the completion notice, and a shell tool waiting on that job reads the
* reason in its own result.
* the fenced read's caller, so the job must be one that session can see:
* the registry's owner fence is the only access rule, and a child session's
* own jobs are killable from its list like any other. The kill records
* `cancelled by the user` as its reason; it is not one the model requested,
* so the owning agent still receives the completion notice, and a shell
* tool waiting on that job reads the reason in its own result.
* @param request - Session whose job list carries the job, and the job id.
* @returns the registry's admission of the kill request.
*/