refactor(daemon): move wire request and response types out of the daemon package
Summary
Step L1 of the daemon single-entrypoint stack: the wire request/response types leave @agent-device/daemon, and src/daemon-client no longer imports the daemon package at all.
src/daemon-client,src/client,src/remoteand the CLI's wire-typed code useDaemonWireRequestfrom@agent-device/contracts/commandandDaemonResponse/DaemonArtifact/DaemonResponseDatafrom@agent-device/kernel/contracts.packages/daemon/src/core/daemon-request.tskeeps only the daemon's ownDaemonRequest(wire request plusinternal) andDaemonInvokeFn; the response aliases are gone and daemon internals import from kernel.- R78 (
daemon-client-entry) bans anysrc/daemon-clientā daemon-package edge; R10 (daemon-modularity) bans any production importer ofdaemon-request.ts/session-state.tsoutside the daemon. Both inventories were empty after the move, so both rules became flat bans. - Wire-compat ledger: changed digests are acked as compile-time type-name moves only (no serialized field changed);
DaemonWireRequest/DaemonWireRequestMetaare waived in the closure policy as narrowings of the listed kernel types.
Not in this PR
The CLI and remote code still import value/type modules from the daemon package (session-artifact-paths, daemon-stop, the device-claim modules, platform-request-scope, DaemonCommandRoute). Moving those, and banning @agent-device/daemon under src/cli*, src/client, src/remote and src/daemon-client, is the next layer (L1b, #3625), stacked on this branch (stack #3626).
Two commits: the implementation, then the enforcement edits (chore(gates): ā¦).
Validation
On head 7d007f5cf: pnpm format:check, pnpm typecheck, pnpm lint, pnpm check:layering, pnpm check:daemon-wire-compat and pnpm check:affected --run pass. One check:affected run hit a process-spawn timing failure in src/__tests__/daemon-registration-owner.test.ts (untouched by this diff); it passes in isolation twice and in the full rerun. No device-facing behavior changes.
š¤ Generated with Claude Code