@duckduckgo/autoconsent 16.43.1 → 16.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +9 -1
- package/CHANGELOG.md +18 -0
- package/data/coverage.json +2005 -1512
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-mv3/manifest.json +1 -1
- package/docs/rule-syntax.md +4 -4
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -76,7 +76,7 @@ Site-specific rules are rules scoped to specific sites with a `urlPattern`. Rule
|
|
|
76
76
|
|
|
77
77
|
### JSON Rules vs Code-based rules
|
|
78
78
|
|
|
79
|
-
JSON rules live in `rules/autoconsent/` (hand-maintained) and `rules/generated/` (auto-generated). Each file defines one CMP rule following the `AutoConsentCMPRule` type in `lib/rules.ts`.
|
|
79
|
+
JSON rules live in `rules/autoconsent/` (hand-maintained) and `rules/generated/` (auto-generated). Each file defines one CMP rule following the `AutoConsentCMPRule` type in `lib/rules.ts`. **Add new JSON rules only to `rules/autoconsent/`.** Do not add new files to `rules/generated/`: only the crawler creates them. You may remove a generated rule, for example when it is stale.
|
|
80
80
|
|
|
81
81
|
```json
|
|
82
82
|
{
|
|
@@ -122,6 +122,14 @@ shadow root or same-origin iframe.
|
|
|
122
122
|
- Use `npm run create-rule` to scaffold a new rule and a spec file.
|
|
123
123
|
- Code comments: keep them brief (max one line), explain why not what, no references to specific sites in library code
|
|
124
124
|
|
|
125
|
+
### Rule step traps
|
|
126
|
+
|
|
127
|
+
- **For "not visible", use `check: "none"`, never `negated`.** `negated` only inverts the final result. `waitForVisible` + `negated` does not wait for the element to disappear: it fails at once while the element is visible. `visible` + `negated` is true when one match is visible and another is hidden.
|
|
128
|
+
- **Array selectors search only inside the first match.** `["iframe", "button"]` searches only the first `iframe` on the page.
|
|
129
|
+
- **`cookieContains` is a plain substring match.** `consent=1` also matches `myconsent=10`. It cannot see `HttpOnly` cookies.
|
|
130
|
+
- **`setStyle` replaces the full inline style.** Use `addStyle` to keep the other inline styles.
|
|
131
|
+
- **`npm run rule-syntax-check` does not check `rules/generated/`.** Check generated rules against the schema yourself.
|
|
132
|
+
|
|
125
133
|
### Updating existing rules
|
|
126
134
|
- **For site-specific popups, prefer a heuristic-pattern fix over a new rule, and check whether a rule is needed at all.** If the popup is unique to a site (not a shared CMP) and already has a reject, dismiss, or acknowledge button that the heuristic should match, extend `lib/heuristic-patterns.ts` instead of adding a `urlPattern`-scoped JSON rule. Do not use a heuristic fix in place of a generic CMP rule. A heuristic change must not cause false positives on other sites.
|
|
127
135
|
- If an existing generic rule fails on a specific site: first look for other sites with the same failure (spec sites, data/coverage.json, publicwww). If the issue applies to more sites, update the generic rule; if the issue is truly site-specific, prefer making a site-specific rule or a config exception. Never change a generic rule to fix a site-specific implementation problem.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# v16.43.2 (Thu Oct 01 2026)
|
|
2
|
+
|
|
3
|
+
#### AI / Agent Workflow
|
|
4
|
+
|
|
5
|
+
- Document rule step traps for agents [#1582](https://github.com/duckduckgo/autoconsent/pull/1582) ([@claude](https://github.com/claude) [@muodov](https://github.com/muodov))
|
|
6
|
+
|
|
7
|
+
#### Other
|
|
8
|
+
|
|
9
|
+
- Coverage data update [#1575](https://github.com/duckduckgo/autoconsent/pull/1575) ([@daxtheduck](https://github.com/daxtheduck))
|
|
10
|
+
|
|
11
|
+
#### Authors: 3
|
|
12
|
+
|
|
13
|
+
- Claude ([@claude](https://github.com/claude))
|
|
14
|
+
- Dax ([@daxtheduck](https://github.com/daxtheduck))
|
|
15
|
+
- Maxim Tsoy ([@muodov](https://github.com/muodov))
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
1
19
|
# v16.43.1 (Wed Sep 30 2026)
|
|
2
20
|
|
|
3
21
|
#### Dependencies
|