Skip to content

Commit 7fd5aa3

Browse files
thymikeeclaude
andcommitted
docs(adr): describe the daemon package's single entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 64fe12d commit 7fd5aa3

2 files changed

Lines changed: 20 additions & 15 deletions

File tree

‎docs/adr/0019-request-bound-platform-runtime.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ therefore structurally enforced rather than periodically measured.
841841
Some request-path work asks the host machine something without ever taking a device runtime:
842842
concrete local readiness, boot-time and runner-session observation, and open-target
843843
classification. Those asks now cross the daemon boundary as one required dependency,
844-
`DaemonPlatformServices` (`packages/daemon/src/core/platform-services.ts`), assembled by the daemon runtime's
844+
`DaemonPlatformServices` (`packages/daemon/src/core/platform-services.ts`, exported from the package entry `@agent-device/daemon`), assembled by the daemon runtime's
845845
root-composition module in `src/daemon-composition.ts` — which reaches the concrete adapters
846846
through `src/platform-runtime-daemon-services.ts` behind a function-scoped `await import` — and
847847
threaded composition → `startDaemonRuntime` deps → `RequestRouterDeps` → the request execution

‎docs/adr/0033-collocation-decision-table.md‎

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -192,20 +192,25 @@ files have no seam (published facade, public-type collision, root dependency fac
192192

193193
## The daemon package's export surface
194194

195-
`@agent-device/daemon` publishes a façade, not importer reach: one named subpath per
196-
production/script consumer — a subpath that only tests import is not production surface.
197-
Everything else a root test reaches lives under the `./testing/` namespace: named
198-
`./testing/<module>` entries for production modules tests drive, named `./testing/<fixture>`
199-
entries, and, per fixture folder, a `./testing/<dir>/*` pattern whose target template
200-
reconstructs the source path. Never a wildcard that also exposes production modules. R11
201-
refuses any `./testing/` import from a non-test file, so root production code cannot import
202-
a module the package publishes for tests (a package test double reached through the
203-
boundary is production code depending on a fake), and root production imports are limited
204-
to the named production surface. The exports keys stay exact except the per-folder fixture
205-
patterns; `resolveWorkspaceSpecifier` (layering model) owns Node's exports semantics — the
206-
layering edges, the depgraph, mutation ownership, and R11's named-surface check call it, and
207-
the Stryker alias table orders its Vite first-match list to resolve in exactly its order —
208-
so every lane gives a specifier the module id Node's exports resolution gives it.
195+
`@agent-device/daemon` has one entry, `.`, which is `packages/daemon/src/index.ts`: explicit named
196+
re-exports of what the daemon process root uses (`startDaemonRuntime` and the types its
197+
composition and platform-runtime modules name), no `export *`. It is the package boundary, the
198+
one place a barrel is allowed; the layer folders hold no barrel. A value import of the package
199+
evaluates the daemon server graph, so root code that needs only command metadata reads it from
200+
its owner: the route owner-file claims sit beside the per-command claims in
201+
`@agent-device/command-registry/owner-files`, and the wire request and response types come from
202+
`@agent-device/contracts/command` and `@agent-device/kernel/contracts`.
203+
204+
Root tests that still drive daemon internals reach them through transitional `./testing/`
205+
entries: named `./testing/<module>` entries for production modules, named `./testing/<fixture>`
206+
entries, and per fixture folder a `./testing/<dir>/*` pattern. Each batch of tests that moves into
207+
`packages/daemon/src`, where they import their subject relatively, deletes the entries it frees.
208+
R11 refuses any `./testing/` import from a non-test file, so root production code cannot import
209+
a module the package publishes for tests (a package test double reached through the boundary is
210+
production code depending on a fake). `resolveWorkspaceSpecifier` (layering model) owns Node's
211+
exports semantics — the layering edges, the depgraph, mutation ownership, and R11's named-surface
212+
check call it, and the Stryker alias table orders its Vite first-match list to resolve in exactly
213+
its order — so every lane gives a specifier the module id Node's exports resolution gives it.
209214

210215
## Refuted alternatives
211216

0 commit comments

Comments
 (0)