# autoconsent: Kuuko's changed rules

> Markdown copy of https://kuuko.app/source/autoconsent/ for agents; the HTML page is the source.

The source the MPL 2.0 asks us to publish for the cookie-banner part of Kuuko's Safari extension.

## What this is

Kuuko's Safari extension answers cookie banners with “reject all”. It does this with [autoconsent](https://github.com/duckduckgo/autoconsent) by DuckDuckGo, version 17.0.0, under the [Mozilla Public License 2.0](https://mozilla.org/MPL/2.0/).

The extension carries autoconsent's program files unchanged. Its rules file is Kuuko's changed copy: rules that would hide, close or accept a banner are left out, and the others are changed so they never hide or accept one. Below are the changed file, the files it is built from and the script that builds it, under the same licence.

## Files

- [`kuuko-autoconsent-rules.json`](kuuko-autoconsent-rules.json), 371,359 bytes. Kuuko's changed rules file, as it is in the Safari extension. SHA‑256 `85584f8796f2430f5abe36c643503d878860c2c44474e148bfb157f92e03f156`.
- [`autoconsent.mjs`](autoconsent.mjs), 24,462 bytes. The script that builds it: which rules Kuuko keeps, changes or leaves out, and why. SHA‑256 `85b28d5026d072b1db530d04a030f5ac194974a86a73c10fa2b4a49ee3567081`.
- [`autoconsent-pin.json`](autoconsent-pin.json), 45,394 bytes. What the script checks: autoconsent's version, the checksums of its files and of every rule Kuuko read. SHA‑256 `20b00e49616c12a709e7eee383d901dbebc1b1ccfa946a9ffd8baadff5416a93`.
- [`rules.json`](rules.json), 1,038,162 bytes. autoconsent's rules, unchanged (`rules/rules.json` in the package): what Kuuko's copy is built from. Not in the app. SHA‑256 `80e2201b319586e3d5e8002573bb3da13383cd203f7c7e30e6143f9258a23aa6`.
- [`autoconsent.esm.js`](autoconsent.esm.js), 157,045 bytes. autoconsent, unchanged (`dist/autoconsent.esm.js` in the package). The script reads it while building. SHA‑256 `224a1ff716fc5190210829cf171cf2e55c940968bf1dbd553fd74ea968b6805b`.
- [`autoconsent.content.js`](autoconsent.content.js), 156,802 bytes. autoconsent's content script, unchanged (`dist/addon-mv3/content.bundle.js` in the package), as it is in the Safari extension. SHA‑256 `eaee4d35e31a077085ba0681dea701e16f0233e3c5a8081950a1868f72c97f2b`.
- [`autoconsent.LICENSE.txt`](autoconsent.LICENSE.txt), 16,726 bytes. The Mozilla Public License 2.0, as it comes with autoconsent (`LICENSE` in the package). SHA‑256 `fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85`.

## Build it yourself

1. Put the files in this layout: `extension/safari/` for `autoconsent.esm.js`, `autoconsent.content.js` and `autoconsent.LICENSE.txt`; `extension/tools/` for `autoconsent.mjs` and `autoconsent-pin.json`; `extension/vendor/autoconsent/` for `rules.json`.
2. Run `node extension/tools/autoconsent.mjs build` (Node.js 22 or later, no packages). It writes `extension/safari/kuuko-autoconsent-rules.json`, the same file as above, byte for byte.
3. `node extension/tools/autoconsent.mjs check` checks that autoconsent's files match the checksums in the pin file and that the rules file is current.

## autoconsent's own source code

DuckDuckGo's source code of version 17.0.0: [github.com/duckduckgo/autoconsent, tag v17.0.0](https://github.com/duckduckgo/autoconsent/tree/v17.0.0). The unchanged files above come from its npm package `@duckduckgo/autoconsent@17.0.0` (integrity `sha512-8KcbpNvzaoWmfp6rpKuCf3pB1hfe3hgr6uPukk5dvIEK6W5oCFEvuqy0dJFbGcHS2n77Jwbz8BCg5wTG4mOaFw==`).

Questions, or a copy of these files by email: [kuuko@sf4l.net](mailto:kuuko@sf4l.net).
