@maschinenlesbar.org/openka-cli
    Preparing search index...

    Interface SourceState

    Per-source bookkeeping: what was last seen, and the conditional-request state.

    interface SourceState {
        documents_seen?: number;
        failed?: FailedRef[];
        http_cache: Record<
            string,
            { etag?: string; last_modified?: string; sha256?: string },
        >;
        last_error?: string;
        last_success?: string;
        last_sync?: string;
        source: string;
    }
    Index
    documents_seen?: number
    failed?: FailedRef[]

    The Anfragen whose last attempt failed and that have not been handled since, so ka sync --retry-failed can take only them (issue #27). A ref leaves the list when a later run stores it or finds it unchanged.

    http_cache: Record<
        string,
        { etag?: string; last_modified?: string; sha256?: string },
    >

    Per-URL ETag / Last-Modified, so unchanged documents are never re-fetched.

    last_error?: string

    Last error message, kept so ka sources list can show a degraded source.

    last_success?: string
    last_sync?: string
    source: string