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
{{ message }}
Repository navigation
Commit 1612e33
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(daemon): move the runtime dependency construction to the process root (PR 6) (#3431)
* refactor(daemon): move the runtime dependency construction to the process root
startDaemonRuntime now receives its composed dependencies instead of
building them: provider runtimes, the platform gateway and inventory
gateways, request platform providers, host diagnostics, credential
fingerprinting, the platform lifecycle owners, the platform-services and
claim-recovery compositions, and the command-surface factory all move to
src/daemon-composition.ts, which src/daemon.ts composes and injects. The
operational server keeps startup sequencing, listeners, shutdown, the
metadata watch, idle reap, and request-handler creation, with the same
order on both paths. DaemonProviderCredentials moves to
@agent-device/daemon-contracts/provider-credentials, the #2559 shared
home beside daemon-policy-file; the fingerprint implementation stays in
the root. Tests boot the runtime through one shared fixture.
No production file under src/daemon/ now reads a non-package src/ module
except the direct-ios-selector edge owned by #2273/#2274.
* refactor(daemon): let the server own assembly and take the root's deps as a factory
startDaemonRuntime now takes a composeDeps factory and keeps the daemon
paths, the ADR 0029 policy load (typed stderr and exit included), the
SessionStore, the session callbacks, and the assertShutdownAllowed
derivation in the server, so the process root and every runtime test
share one assembly and the second resolveDaemonPaths and the policy
round-trip go away. Skipped provider runtimes are data on the deps and
the server emits provider_runtime_skipped through emitDaemonDiagnostic;
the lease-lifecycle facts, the runtime gateway, the resource-cleanup
surface, and the claim-recovery factory are declared once at the top
level of DaemonRuntimeDeps. The fixture is a thin call through the real
factory, and a new assembly test proves a dropped shutdown gate, a
mis-wired store, or an unreadable policy cannot pass silently.
* chore(gates): retire the daemon composition edges R76 carried
The daemon-runtime rows of the R76 inventory no longer describe tree
reality once the composition moved out of src/daemon/, so the stale
entries go and the planted tests retarget the one surviving classified
pair. daemon-composition is declared in the platform-runtime zone (a
composition, not an executable), and ADRs 0019/0022/0033 record where
the composition and the extracted credential type landed.
Copy file name to clipboardExpand all lines: docs/adr/0033-collocation-decision-table.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,7 +150,7 @@ optimal.
150
150
|`src/platform-runtime-daemon-lifecycle.ts`| retain for this batch | Same path-keyed R13/ADR 0022 seam: relocation is possible only with coordinated changes to those declarations. |
151
151
|`src/platform-runtime-device-boot.ts`| retain for this batch | Same path-keyed R13/ADR 0022 seam. |
152
152
|`src/platform-runtime-resource-cleanup.ts`| retain for this batch | Same path-keyed R13/ADR 0022 seam. |
153
-
|`src/provider-credential-fingerprint.ts`| keep | Daemon ⇄ client shared contract from the same #2559 decision as `daemon-policy-file.ts`; #3288 declares its zone beside the provider composition that reads the credentials it fingerprints. |
153
+
|`src/provider-credential-fingerprint.ts`| keep (type extracted) | Daemon ⇄ client shared contract from the same #2559 decision as `daemon-policy-file.ts`; #3288 declares its zone beside the provider composition that reads the credentials it fingerprints. PR 6 of the daemon extraction moved only the `DaemonProviderCredentials` declaration to `packages/daemon-contracts` (`./provider-credentials`), the same shared-below-both landing as the policy file; the fingerprinting implementation stays here because it reads the installed-plugin manifest. |
154
154
|`src/provider-limrun-runtime.ts`| keep | Proposed → provider-limrun, but there is no seam: the class's constructor self-builds the root dependency factory (`src/sdk/limrun-runtime-dependencies.ts`), which is the ADR 0019 composition seam — it loads the root's adb-host binder, core Android interactor, and platform-runtime app-state helpers that the package must not import. Moving the class means moving that composition, which is design, not a move. |
155
155
|`src/request-progress-protocol.ts`| moved → `packages/daemon-contracts/src/request-progress-protocol.ts`| Daemon ⇄ client shared contract from the same #2559 decision — the client reads it statically (`daemon-client-progress.ts`) and the server through `src/daemon/server/`, so only #2559's shared-placement boundary and the wire-compat ledgers pin it; declared `daemon-contracts` by #3288 and now physically placed by the extraction. Contracts was considered and R18 keeps contracts free of envelope validation mechanics. The wire-ledger keys moved with the file. |
156
156
|`src/runtime-command-surface.ts`| moved → `src/command-runtime/runtime-command-surface.ts` ([#3299](https://github.com/callstack/agent-device/pull/3299)) | Physical move landed with `runtime-factory.ts` as one assembly group: the command-surface binding sits beside the factory it composes, under the folder that derives its `command-runtime` zone, so `topFolder` replaces the per-file `ROOT_MODULE_ZONES` row. |
0 commit comments