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. * * Runtime Config can only disable what this file already selected, and no * dynamic import path is ever built from a configuration string. * * Only the Service Worker is installed by an entry here alone. Realtime, Web * Workers and offline commands have no runtime in the composition yet: a * selection without one makes `createOptionalRuntimeHost` refuse to compose * (09-07). Connect the runtime there first. * * 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, });