# Cookie, Local Storage & Telemetry Disclosure Policy (EU ePrivacy & UK PECR)

> **DRAFT FOR LEGAL COUNSEL REVIEW:** This document is a draft prepared for review by qualified legal counsel prior to publication or commercial use.

**Effective Date:** `[EFFECTIVE_DATE]`  
**Version:** `1.0`

---

## 1. Zero Cookies & Zero Tracking in the Desktop Application

The **Imladris** desktop application:

* uses **zero HTTP tracking cookies**;
* embeds **zero third-party analytics SDKs** (no Google Analytics, Mixpanel, Sentry, or Meta Pixel); and
* performs **zero background telemetry** to external servers.

---

## 2. Strictly Necessary Local Storage Inventory (Code-Verified)

In accordance with **EU ePrivacy Directive Art. 5(3)**, **Garante Privacy Guidelines (10 June 2021)**, and **UK PECR Reg. 6**, the following local storage mechanisms are strictly necessary to deliver user-requested functionality:

| Storage Mechanism | Location | Purpose | Persistence / Expiry | Classification |
| :--- | :--- | :--- | :--- | :--- |
| **Application & Hardware Settings** | `~/.config/imladris/settings.ini` & GSettings | UI theme, font, layout quadrants, GPU backend (`GSK_RENDERER`) | Persistent until deleted or `--purge-user-data` | Strictly Necessary |
| **Opt-In AI Configuration** | `~/.config/imladris/ai_config.json` (`0600`) | User-configured AI endpoints, API keys, `free_api_consent_accepted` flag | Persistent until deleted or `--purge-user-data` | Strictly Necessary (when enabled by user) |
| **Copilot Credential** | OS Keyring (`libsecret`) or `~/.config/imladris/copilot_token` (`0600`) | OAuth token for GitHub Copilot if user logs in | Until sign-out or `--purge-user-data` | Strictly Necessary (user-initiated auth) |
| **Offline Documentation & Package Cache** | `~/.cache/imladris/docs/` (`etags.json`, `*.md`) & `indices/` | Offline 11-domain Help Hub manuals & CRAN/PyPI autocomplete | Persistent until cleared or `--purge-user-data` | Strictly Necessary |
| **Qualitative Research Sidecar** | `<workspace>/.imladris-qual.db` | SQLite WAL index of `.qual` spans, memos, CRA queries, and `audit_log` | User-controlled project file | Strictly Necessary |
| **WebKitGTK Help & Preview Views** | In-memory / standard WebKitGTK isolated context | Render local Markdown/Quarto previews and local Help Hub HTML | Session-scoped | Strictly Necessary |

---

## 3. External Assets in Exported HTML Presentations

When a user exports an HTML Reveal.js presentation via `PresentationTemplateDialog`, the generated standalone `.html` file references `https://cdn.jsdelivr.net/npm/reveal.js@5/...`. Opening that exported `.html` file in a browser fetches Reveal.js CSS/JS from jsDelivr's CDN.

---

## 4. Web Portals & Consent Gatekeeping Standard

Should `[LEGAL_ENTITY_NAME]` operate a companion marketing website or web application setting any non-essential cookies, it shall enforce:

1. Prior affirmative opt-in before loading any analytics/marketing script (no pre-ticked boxes);
2. Equal visual prominence between **Accept All** and **Reject All**;
3. Dismissal (`X`) treated as **Reject All**;
4. Granular category toggles and a persistent footer link to withdraw or modify consent at any time.
