mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
e229957602
Phase-5 §5.5 folder move (server side; the daemon/client/ split shipped in #962). Extracts the process-bootstrap / server-runtime cluster into src/daemon/server/ as a pure, behaviorless path codemod — no logic changes. Moved (server bootstrap/runtime — the layer that spins up the daemon and owns the platform graph; each imported only by the bootstrap layer + each other): src/daemon-runtime.ts -> src/daemon/server/daemon-runtime.ts src/daemon/http-server.ts -> src/daemon/server/http-server.ts src/daemon/transport.ts -> src/daemon/server/transport.ts src/daemon/server-lifecycle.ts -> src/daemon/server/server-lifecycle.ts src/daemon/server-shutdown.ts -> src/daemon/server/server-shutdown.ts Left in src/daemon/ root (request core / shared wire helpers, out of scope): request-router.ts, handlers/, session-store.ts, lease-registry.ts, context.ts (the daemon's request layer) and http-contract.ts / http-health.ts / http-errors.ts / config.ts (HTTP wire contract + daemon config shared across client, remote, and cli — not server-only). Left: src/daemon.ts (the thin process entry) stays at src/ with the other package entrypoints; it is coupled to its physical path by four non-import string references (rslib entry, config dev-mode sentinel, process-identity detection regex, daemon-client launch srcPath), so moving it is beyond a pure import codemod. Rewrote every from/import/import()/type-only specifier per importer (resolve-based path.relative recompute) across src and test, and renamed the fallow health-baseline key for http-server.ts. daemon-runtime's static platforms/ import is now inside the daemon-server seam the layering lint (#984 R3) allows. Verification: tsc --noEmit 0; layering check (branch script) unchanged (3 pre-existing R3 violations, 0 new); oxfmt clean; oxlint --deny-warnings 0; fallow audit --base origin/main clean (14 files); rslib build 0 (internal/daemon entry still emits); vitest 17 passed (daemon-entrypoint, http-server-rpc-validation, server-shutdown + 3 provider-integration).