refactor(contracts): move the command-runtime contracts the daemon reads into @agent-device/contracts
Summary
Daemon-extraction PR 4a. Moves the pure command-runtime contracts the daemon reads out of the root command-runtime zone into @agent-device/contracts (new narrow subpaths ./backend, ./runtime-contract, ./artifact-adapter, ./backend-snapshot-options, ./command-policy), so no daemon file keeps a type edge into src/ command runtime. Value imports of createCommandSurfaceAgentDevice stay for PR 4b.
Moved declarations (no behavior change): the backend surface (src/backend.ts, R093 rename), the runtime vocabulary (src/runtime-contract.ts, R097), the artifact-adapter vocabulary split from src/io.ts (the node:fs implementation stays; the published agent-device/io surface is unchanged via the public src/sdk/io.ts entry), snapshotOptionsToFlags (src/backend-snapshot-options.ts, R100, test included), and the CommandPolicy presets (from src/command-runtime/runtime-factory.ts, test added at the new owner). 78 consumer files repointed: 66 under src/ outside the daemon, 11 daemon files, 1 test/ harness.
Owner rationale: R18 holds contracts to vocabulary free of host/process/timer mechanics — these declarations are pure types plus literal/pure functions (contracts already carries pure functions like screenshotFlagsFromOptions and depends only on kernel), and contracts sits below the daemon on the spine, so no new package is justified. No existing contracts export changed shape; only five subpaths were added (export snapshot pinned via generate-contracts-exports-snapshot.ts). Known debt the move makes visible: BackendSnapshotResult here vs snapshot-types.ts (different producer/client shapes; unifying is behavior change, not a move).
Remaining daemon → command-runtime edges (pnpm depgraph): exactly 4 value edges, all createCommandSurfaceAgentDevice → command-runtime/runtime-command-surface.ts, from interaction/internal/interaction-runtime.ts, screenshot-runtime.ts, selector-runtime-backend.ts, snapshot-command-runtime.ts.
Validation
Tested commit 8b8f1714e. Serially, all pass: pnpm install --frozen-lockfile && pnpm build, pnpm format, pnpm check:quick, pnpm check:layering, pnpm check:di-seams, pnpm build, plus pnpm check:daemon-wire-compat, pnpm check:gate-manifest, pnpm check:production-exports, and pnpm check:affected --run (449 related test files passed, including the moved backend-snapshot-options.test.ts and the new command-policy.test.ts at their paths).
depgraph summary diff: 1817→1819 files, 9721→9730 edges; R4 0→0, R5 0→0, R6 11→11; src/daemon.ts eager closure 650→651 (ADR 0027 pure-split tolerance; eager-closure gate green); zone SCCs 0→0. Unresolved risks: none local; provider-integration/coverage lanes are CI-owned and were selected by check:affected.