import type { InstalledOfflineCommandContribution } from "../contracts/offline-command.ts"; import type { InstalledRealtimeContribution, InstalledRuntimeCapabilities, } from "../contracts/runtime-capabilities.ts"; import { validateRealtimeContributions, } from "../contracts/runtime-capabilities.ts"; import type { InstalledServiceWorkerSelection } from "../contracts/service-worker.ts"; import { validateWebWorkerContributions, type InstalledWebWorkerContribution, } from "../contracts/web-worker.ts"; /** * §3.5. Static optional capability selection SSOT. * * Adding an entry here is what installs a capability. Runtime Config can only * disable what this file already selected, and no dynamic import path is ever * built from a configuration string. * * Current template state, matching the §25 stop conditions: * * - realtime: `NOT_SELECTED`. The RT-01..RT-04 common runtime exists and is * independently verified, but no product contribution supplies an exact * endpoint, event descriptor and recovery mode (§13.6). * - webWorkers: `NOT_SELECTED`. No profiled CPU-bound task with an owner * exists, so no production worker entry is created (§16.2). * - serviceWorker: `null`. Switching to `ACTIVE` also enables the two-pass * build in `scripts/build-frontend.ts`. * - offlineCommands: `NOT_SELECTED`. No external package declares a `KEYED` * operation with a recovery descriptor (§19.3). */ const REALTIME: readonly InstalledRealtimeContribution[] = Object.freeze([]); const WEB_WORKERS: readonly InstalledWebWorkerContribution[] = Object.freeze([]); const SERVICE_WORKER: InstalledServiceWorkerSelection | null = null; const OFFLINE_COMMANDS: InstalledOfflineCommandContribution | null = null; export const INSTALLED_RUNTIME_CAPABILITIES: InstalledRuntimeCapabilities = Object.freeze({ realtime: validateRealtimeContributions(REALTIME), webWorkers: validateWebWorkerContributions(WEB_WORKERS), serviceWorker: SERVICE_WORKER, offlineCommands: OFFLINE_COMMANDS, });