Conversation
…e-kit The 19-module durable-capture admission family (durable-*, perf-*, audio-*, screen-*) reached src/** only through SessionState, SessionStore, and safeSessionName. Its SessionState slice is exactly the three durable-capture slots it reads/replaces (perfCapture, audioProbe, screenRecording); its SessionStore use is exactly capture-kit's structural DurableCaptureSessionStore (set + resolveSessionDir) — not the session spine. capture-kit's durable-capture machinery is already generic over S, so the residue retypes onto that slice with no behavior change: sessionSlot.replace spreads S and sessionStore.set writes the runtime record back, so the session type stays opaque behind S. - safeSessionName + session path helpers move to @agent-device/host-kit/session-paths (its only dep was host-kit/file). - The family moves to @agent-device/capture-kit/capture-admission; the eager-closure-sensitive hub (session-teardown) reaches the same modules through narrow per-kind subpaths so its closure stays flat. - app-log-* stay in the daemon and consume the relocated factory/ledger. Closes #2544 Issue #2544
- session-resource-ownership (R68): extend scan roots to packages/capture-kit/src/capture-admission and repoint the audio/perf owner paths to the relocated owners, so the field guard follows the code; add a case proving a field planted there is still caught. - package-boundaries (R11): add the new capture-kit and host-kit export subpaths to the exact export-surface enumeration. - eager-closure budgets: one APPROVED_OVER_CEILING row (#2544) for the cohesive capture-admission barrel entry; the hub-reachable modules stay under the ceiling behind their narrow subpaths. Issue #2544
Size Report
Startup median (7 runs, lower is better):
|
|
Reviewed at c5edae5. This PR breaks a test that landed on main after its merge base. Could this ship with only the per-kind subpaths that session-teardown needs, plus one recovery subpath, and without the |
Summary
Extracts the daemon's durable-capture admission family — the perf-capture, audio-probe, and screen-recording admission ledgers, session resources, resource stores, recoveries, and the durable-capture factory — out of
src/daemonintopackages/capture-kit/src/capture-admission, exposed behind granular per-concern subpaths plus one barrel. The family binds to a package-localDurableCaptureSessionStateslice instead of daemon-privateSessionState, so nothing underpackages/**importsSessionState/DaemonRequestInternal.safeSessionNamemoved to@agent-device/host-kit/session-paths. Behavior-preserving; cuts ~20 files / ~1,300 LOC fromsrc/daemon. Closes #2544.Measured
SessionStatefield set the family touches:{ perfCapture, audioProbe, screenRecording }— a non-spine slice, so shipping the family is the correct scope for #2544.The maestro adapters move was evaluated and deferred: the runtime port reads
internal.publicNetworkOnlyand writes a daemon-internal endpoint-hold bag (ADR 0015), so a clean move needs a package-local compatibility bag, daemon-side invoke forwarding, and newprovision-kit/undicideps, plus device/conformance verification that can't run here. It belongs in its own device-verified PR.Validation
Tested at
c5edae5e2f.pnpm check:affected --runpasses: typecheck, lint, layering, fallow ("no issues in 87 changed files"), and affected unit suites.pnpm check:layering,check:production-exports,check:package, and eager-closure budgets are green; full unit suite 10,343 passed. No Apple/Android runtime path is changed, so no device run is required.