You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Third decoupling wave for src/daemon and @agent-device/contracts, following #2316, #2317 and #2318. Measured on main at 27a97ee619 with a production-only import graph (1,629 files, 8,805 edges):
src/daemon: 350 production files, 56.8k lines; 197 flat top-level files (30k lines). The value graph is acyclic and the daemon has zero edges into platform packages. It has 154 value edges into 67 root src/ files; the top hubs are command-catalog.ts (15 daemon files), core/command-descriptor/registry.ts (13), core/dispatch-resolve.ts (12), provider-device-runtime.ts (11).
@agent-device/contracts: 190 modules, 18.2k lines, 118 subpaths. 106 modules export runtime code (13k lines). 146 modules are reachable from a platform/provider package; 44 are not; 19 are reachable from no package at all.
The command descriptor registry is the keystone: it is package-ready today (its only root dependency is core/parse-timeout.ts) and it is what forbids packaging the daemon client and the session event journal under R11.
Move-dominated PRs with rename-only proof; pure moves carry their tests unchanged; gate edits land in a final chore(gates) commit.
No compatibility re-exports at the old path (no-internal-package-reexports); every consumer switches to the owning specifier.
New package subpaths point directly at moved source files so the eager-closure gate carries each baseline through rename detection; no APPROVED_OVER_CEILING row without a measurement.
@agent-device/gestures (gesture-plan, android-touch-plan, apple-multitouch-support, gesture-admission; ~780 lines with a clean DAG below the contracts hubs): viable, deferred for new-package cost.
Client-contracts audience split (client-* ×14 + facades/client.ts, 1.4k lines, all type-only consumers): buys ownership clarity, not coupling reduction.
src/daemon/session-target-evidence.ts: needs capture-kit and ad-script; no package depends on both.
Purpose
Third decoupling wave for
src/daemonand@agent-device/contracts, following #2316, #2317 and #2318. Measured onmainat27a97ee619with a production-only import graph (1,629 files, 8,805 edges):src/daemon: 350 production files, 56.8k lines; 197 flat top-level files (30k lines). The value graph is acyclic and the daemon has zero edges into platform packages. It has 154 value edges into 67 rootsrc/files; the top hubs arecommand-catalog.ts(15 daemon files),core/command-descriptor/registry.ts(13),core/dispatch-resolve.ts(12),provider-device-runtime.ts(11).@agent-device/contracts: 190 modules, 18.2k lines, 118 subpaths. 106 modules export runtime code (13k lines). 146 modules are reachable from a platform/provider package; 44 are not; 19 are reachable from no package at all.The command descriptor registry is the keystone: it is package-ready today (its only root dependency is
core/parse-timeout.ts) and it is what forbids packaging the daemon client and the session event journal under R11.Children (dependency order)
Rules for every child
chore(gates)commit.no-internal-package-reexports); every consumer switches to the owning specifier.APPROVED_OVER_CEILINGrow without a measurement.Evaluated and not scheduled
@agent-device/gestures(gesture-plan, android-touch-plan, apple-multitouch-support, gesture-admission; ~780 lines with a clean DAG below the contracts hubs): viable, deferred for new-package cost.client-*×14 +facades/client.ts, 1.4k lines, all type-only consumers): buys ownership clarity, not coupling reduction.src/daemon/session-target-evidence.ts: needs capture-kit and ad-script; no package depends on both.replay/: rejected, R9 engine-cycle prefix.Completion
All children closed with their completion conditions met, and the two measurements above re-run and recorded here.