

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345678910# Strict TypeScript: Message Bridge1112## Task1314Fix all strict-mode TypeScript errors in 3 message-bridge files and add them to `CORE_FILES`.1516## Branch1718```19git checkout main && git pull origin main && git checkout -b cursor/strict/message-bridge20```2122## Files (62 errors total)2324### `injected/src/features/message-bridge.js` (5 errors)25```26(48,10): error TS7006: Parameter 'args' implicitly has an 'any' type.27(84,22): error TS2769: No overload matches this call.28(157,35): error TS18046: 'e' is of type 'unknown'.29(181,63): error TS2345: Argument of type '(data: Record<string, any>) => void' is not assignable to parameter of type '(value: unknown) => void'.30(215,10): error TS7006: Parameter '_args' implicitly has an 'any' type.31```3233### `injected/src/features/message-bridge/create-page-world-bridge.js` (6 errors)34```35(86,18): error TS2769: No overload matches this call.36(89,14): error TS2769: No overload matches this call.37(161,34): error TS2769: No overload matches this call.38(164,26): error TS2769: No overload matches this call.39(197,22): error TS2769: No overload matches this call.40(200,26): error TS2769: No overload matches this call.41```4243### `injected/src/features/message-bridge/schema.js` (51 errors)44All TS2339 — Property does not exist on type 'Object'. The schema validation functions receive `Object` typed params but access specific properties:45```46Properties accessed: featureName, id, method, params, result, error, subscriptionName47Lines: 32-34, 56-57, 84-92, 122-132, 161-167, 193-199, 227-235, 257-25948```4950## Fix Patterns5152### schema.js Strategy (51 errors)53The schema.js file validates message shapes. Each validation function receives an `Object` parameter but needs to access typed properties. **Define `@typedef` types for each message shape:**5455```js56/**57 * @typedef {Object} NotifyMessage58 * @property {string} featureName59 * @property {string} id60 */6162/**63 * @typedef {Object} RequestMessage64 * @property {string} featureName65 * @property {string} method66 * @property {string} id67 * @property {unknown} [params]68 */6970/**71 * @typedef {Object} ResponseMessage72 * @property {string} featureName73 * @property {string} method74 * @property {string} id75 * @property {unknown} [result]76 * @property {unknown} [error]77 */7879/**80 * @typedef {Object} SubscriptionMessage81 * @property {string} featureName82 * @property {string} subscriptionName83 * @property {string} id84 * @property {unknown} [params]85 */86```8788Then cast each validation function's input parameter.8990### create-page-world-bridge.js (6 errors)91All TS2769 "No overload matches" — likely addEventListener/postMessage calls with custom event types. Check the actual event type strings and cast or use proper event map overloads.9293### message-bridge.js (5 errors)94- TS7006: Add `@param` annotations.95- TS2769: Same overload pattern as above.96- TS18046: `instanceof Error` check or `String(e)`.97- TS2345: Cast callback or widen type.9899## Workflow1001011. `npm ci`1022. Add all 3 files to CORE_FILES in `scripts/check-strict-core.js`1033. Fix schema.js first (bulk errors), then the other two1044. `npm run tsc-strict-core` — must pass1055. `npm run test-unit` — must pass1066. `npm run lint` — must pass (run `npm run lint-fix` first if needed)1077. Commit: `fix(types): add strict checking for message-bridge files`1088. `git push -u origin cursor/strict/message-bridge`109110## Constraints111112- Do NOT use `any` — use `unknown`, specific types, or proper interfaces113- Do NOT use `@ts-ignore` or `@ts-expect-error`114- Do NOT modify files outside the assigned list (except `scripts/check-strict-core.js`)115- Do NOT remove existing CORE_FILES entries116- Preserve existing behavior — type fixes only, no logic changes117
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| duckduckgo/content-scope-scriptstypes-generator/AGENTS.md · 70 | AGENTS.md | testarchtypesdo-not | 73/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-broker-protection-actions.mdc · 70 | Cursor rules | buildteststyletypes+4 | 93/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-broker-protection-rest.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-click-to-load.mdc · 70 | Cursor rules | teststyletypesgit+2 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-detectors.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-duckplayer-native.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-duckplayer.mdc · 70 | Cursor rules | setupteststyletypes+4 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-fingerprinting.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-a.mdc · 70 | Cursor rules | teststyletypesgit+4 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-b.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-c.mdc · 70 | Cursor rules | teststyletypesgit+4 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-web-compat-and-telemetry.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 14 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-zero-errors-batch.mdc · 70 | Cursor rules | testtypesgitdo-not+1 | 81/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsAGENTS.md · 70 | AGENTS.md | buildtestlint-formatstyle+5 | 83/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsinjected/AGENTS.md · 70 | AGENTS.md | buildteststylearch+2 | 92/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsmessaging/AGENTS.md · 70 | AGENTS.md | testarchtesting-strategyapi | 66/100 | 14 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/duckduckgo-content-scope-scripts-cursor-rules-strict-message-bridge)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.