Part of #2335.
Purpose
src/daemon/session-event-*.ts (6 files, 1,867 lines; ADR 0018) has zero value dependencies on other daemon files. Its root dependencies are command-catalog.ts (4 files), core/command-descriptor/registry.ts (1) and core/keyboard-actions.ts (7 lines, no imports). Its type dependencies are DaemonRequest, DaemonResponse, DaemonResponseData from src/daemon/types.ts in session-event-request.ts, session-event-log.ts, session-event-action-presentation.ts; the fields read are req.command, req.flags, req.meta.requestId, req.meta.clientArtifactPaths.
Relocating the type declaration is not enough: today's DaemonRequest carries internal (callbacks taking SessionState, an admitted DeviceLease, lifecycle hooks) and daemon-only meta fields.
Required behavior
- New workspace package (
@agent-device/session-journal, name open) with one subpath per moved module; consumers request-generic-dispatch.ts, request-execution-scope.ts, session-store.ts, replay/internal/session-replay-action-runtime.ts, replay/internal/session-replay-runtime-failure-response.ts switch specifier.
- Journal inputs are typed by shared request types only: the wire-only request shape C exports, or
@agent-device/kernel/contracts public request/meta types. No reachability from any journal input type to SessionState or DeviceLease. Splitting files or lowering importer counts does not satisfy this.
keyboard-actions.ts folds into the package; catalog and registry come from A's package.
Completion conditions
- The package imports nothing under
src/ (R11) and compiles against A's and C's packages only.
- A type-level test in the package asserts its input type has no
internal key and no property path typed as SessionState or DeviceLease.
- Event journal output byte-identical for the existing journal fixtures; ADR 0018 references updated.
check:layering, eager-closure (subpaths at renamed files), package-boundaries, fallow green.
Dependencies
Blocked by A (catalog, registry) and C (wire-only request shape).
Part of #2335.
Purpose
src/daemon/session-event-*.ts(6 files, 1,867 lines; ADR 0018) has zero value dependencies on other daemon files. Its root dependencies arecommand-catalog.ts(4 files),core/command-descriptor/registry.ts(1) andcore/keyboard-actions.ts(7 lines, no imports). Its type dependencies areDaemonRequest,DaemonResponse,DaemonResponseDatafromsrc/daemon/types.tsinsession-event-request.ts,session-event-log.ts,session-event-action-presentation.ts; the fields read arereq.command,req.flags,req.meta.requestId,req.meta.clientArtifactPaths.Relocating the type declaration is not enough: today's
DaemonRequestcarriesinternal(callbacks takingSessionState, an admittedDeviceLease, lifecycle hooks) and daemon-onlymetafields.Required behavior
@agent-device/session-journal, name open) with one subpath per moved module; consumersrequest-generic-dispatch.ts,request-execution-scope.ts,session-store.ts,replay/internal/session-replay-action-runtime.ts,replay/internal/session-replay-runtime-failure-response.tsswitch specifier.@agent-device/kernel/contractspublic request/meta types. No reachability from any journal input type toSessionStateorDeviceLease. Splitting files or lowering importer counts does not satisfy this.keyboard-actions.tsfolds into the package; catalog and registry come from A's package.Completion conditions
src/(R11) and compiles against A's and C's packages only.internalkey and no property path typed asSessionStateorDeviceLease.check:layering, eager-closure (subpaths at renamed files), package-boundaries, fallow green.Dependencies
Blocked by A (catalog, registry) and C (wire-only request shape).