Part of #2335.
Purpose
src/daemon/client/ (9 files, 2,416 lines; zone daemon-client, rank 5) is the daemon's client, not the daemon. No daemon file imports it; its consumers are src/cli.ts, src/agent-device-client.ts, src/cli/commands/proxy.ts, src/commands/management/output.ts (via B) and src/cli/injected-daemon-dispatch.ts (type). Relocating it makes src/daemon server-only. This issue is a relocation; it does not promise a package.
Remaining server and root seams (inventory to carry into the PR)
src/daemon/config.ts (113, pure over host-kit/kernel), src/daemon/daemon-process.ts (122, host-kit), src/daemon/request-progress-protocol.ts (48, imports the request types C splits).
src/daemon/code-signature*.ts — moved by E.
src/daemon/session-store.ts → findUnrecoveredRepairCommitFailure from daemon-client-lifecycle.ts:17: a disk reader of session artifacts, to be extracted below both client and store.
src/core/lease-scope.ts (258, kernel-only) from the RPC layer.
src/remote/daemon-artifacts.ts (imports daemon types and recording/output-path.ts) and src/remote/remote-request-diagnostics.ts (imports session-store.ts).
src/command-catalog.ts, core/command-descriptor/registry.ts, timeout-policy.ts — A's package.
src/daemon/types.ts wire types — C's request module.
src/daemon/client/doctor-progress.ts — deleted by B.
Required behavior
- Move the directory to
src/daemon-client/ (zone name unchanged; targetDagZone in scripts/layering/model.ts updated from the src/daemon/client/ prefix). Rank stays 5.
- The client's imports of
src/daemon/* are reduced to the named shared kernel: config.ts, daemon-process.ts, request-progress-protocol.ts, the extracted session-artifact reader, and C's request module.
- No behavior change in daemon launch, takeover, progress streaming or code-signature checks;
test/integration/smoke-cli and the daemon lifecycle tests pass unchanged.
Completion conditions
src/daemon/client/ no longer exists; src/daemon contains only server code plus the shared kernel modules listed above.
- The PR lists every remaining
src/daemon and src/remote import from the relocated client, each with its seam named; the list is the input to any later packaging decision.
check:layering green (R5, R6 type-inversion ratchet, DAEMON_MODULARITY_BASELINE), eager-closure budgets green for src/cli.ts.
Dependencies
Blocked by A, B, C, E.
Part of #2335.
Purpose
src/daemon/client/(9 files, 2,416 lines; zonedaemon-client, rank 5) is the daemon's client, not the daemon. No daemon file imports it; its consumers aresrc/cli.ts,src/agent-device-client.ts,src/cli/commands/proxy.ts,src/commands/management/output.ts(via B) andsrc/cli/injected-daemon-dispatch.ts(type). Relocating it makessrc/daemonserver-only. This issue is a relocation; it does not promise a package.Remaining server and root seams (inventory to carry into the PR)
src/daemon/config.ts(113, pure over host-kit/kernel),src/daemon/daemon-process.ts(122, host-kit),src/daemon/request-progress-protocol.ts(48, imports the request types C splits).src/daemon/code-signature*.ts— moved by E.src/daemon/session-store.ts→findUnrecoveredRepairCommitFailurefromdaemon-client-lifecycle.ts:17: a disk reader of session artifacts, to be extracted below both client and store.src/core/lease-scope.ts(258, kernel-only) from the RPC layer.src/remote/daemon-artifacts.ts(imports daemon types andrecording/output-path.ts) andsrc/remote/remote-request-diagnostics.ts(importssession-store.ts).src/command-catalog.ts,core/command-descriptor/registry.ts,timeout-policy.ts— A's package.src/daemon/types.tswire types — C's request module.src/daemon/client/doctor-progress.ts— deleted by B.Required behavior
src/daemon-client/(zone name unchanged;targetDagZoneinscripts/layering/model.tsupdated from thesrc/daemon/client/prefix). Rank stays 5.src/daemon/*are reduced to the named shared kernel:config.ts,daemon-process.ts,request-progress-protocol.ts, the extracted session-artifact reader, and C's request module.test/integration/smoke-cliand the daemon lifecycle tests pass unchanged.Completion conditions
src/daemon/client/no longer exists;src/daemoncontains only server code plus the shared kernel modules listed above.src/daemonandsrc/remoteimport from the relocated client, each with its seam named; the list is the input to any later packaging decision.check:layeringgreen (R5, R6 type-inversion ratchet,DAEMON_MODULARITY_BASELINE), eager-closure budgets green forsrc/cli.ts.Dependencies
Blocked by A, B, C, E.