/** * Per-machine Terms consent state (`/runtime-terms-consent.json`). * * One record per runtime. Writes are atomic (temp file + rename); an * unreadable file reads as empty. specs/2026-10-01-runtime-terms-consent.md * * @module services/runtime-terms/runtime-terms.store */ /** * Where a runtime's Terms stand on this machine. * * - `pending`: the first-run Terms screen was seen; a card is waiting for the owner * - `accepting`: the owner agreed; the harness is driving the screens * - `accepted`: the screens were completed (or were already done) * - `declined`: the owner chose Don't agree (or the deadline applied it) * - `failed`: the harness stopped before (or after) Done because the screen did not match */ export type RuntimeTermsStatus = 'pending' | 'accepting' | 'accepted' | 'declined' | 'failed'; /** One runtime's record. */ export interface RuntimeTermsRecord { runtime: string; status: RuntimeTermsStatus; /** ISO time of the last change */ updatedAt: string; /** Decision card of the current / last ask */ decisionId?: string; /** Owner's choice for the data-sharing item, once agreed */ dataSharing?: boolean; /** Why it is declined / failed (English, shown in Settings) */ reason?: string; /** What found the Terms screen (launch, smoke_test, settings, probe) */ detectedBy?: string; } /** Reads and writes the records. */ export declare class RuntimeTermsStore { private readonly file; /** * @param file - JSON file path */ constructor(file: string); /** * Store in a Crewly home. * * @param crewlyHome - CREWLY_HOME * @returns Store */ static inHome(crewlyHome: string): RuntimeTermsStore; /** @returns Every record, keyed by runtime */ all(): Record; /** * One record. * * @param runtime - Runtime id * @returns Record, or null */ get(runtime: string): RuntimeTermsRecord | null; /** * Replace a record. * * @param record - Record * @returns The record */ set(record: RuntimeTermsRecord): RuntimeTermsRecord; private read; private write; } //# sourceMappingURL=runtime-terms.store.d.ts.map