@dornick/extension
v0.1.0
Published
Reference Manifest V3 browser-extension scaffold for Dornick — inject the in-page agent SDK into allow-listed SaaS origins.
Maintainers
Readme
@dornick/extension
Reference Manifest V3 browser-extension scaffold for Dornick.
A drop-in WebExtension that injects Dornick into allow-listed origins. Per-origin agent configs, BYO API key, same-origin to whatever the user is authenticated to. Architecturally what makes Dornick-as-extension viable — the runtime is unchanged; the extension is just the carrier.
This package is not a runtime dependency — it's a fork point. Copy the directory, drop in your icons, decide on your distribution channel, ship.
Files
@dornick/extension/
├── manifest.json — Manifest V3 declaration
├── background.js — service worker; initialises storage defaults
├── content.js — injects [data-dornick] on allow-listed pages
├── options.html — settings UI (key, allow-list)
├── options.js — settings logic
├── options.css — styling
└── icons/ — REPLACE ME with your brandingYou must also drop dornick.js into the directory before zipping:
# from the monorepo root
cp packages/script/dist/dornick.js packages/extension/dornick.jsOr fetch the latest published bundle:
curl -L https://unpkg.com/@dornick/script/dist/dornick.js -o packages/extension/dornick.jsBuild
npm run package --workspace=@dornick/extension
# → packages/extension/dist/dornick-extension.zipLoad unpacked in Chrome (chrome://extensions → Developer mode → Load unpacked) pointing at packages/extension/ or the unzipped dist/.
Configuring an origin
After installing, open the extension options. Add an entry:
| Origin | Config URL |
|---|---|
| https://app.salesforce.com | https://yourcorp.com/dornick/salesforce.json |
| https://linear.app | https://yourcorp.com/dornick/linear.json |
The config URL points to a Dornick DornickConfigurationWithHooks JSON. The content script injects [data-dornick] with these attributes, and Dornick's auto-init does the rest.
Allow-listing model
Defaults to empty — Dornick does not activate on any page until the user explicitly adds an entry. That's intentional: the extension model is consent-based.
The MV3 optional_host_permissions: ["<all_urls>"] lets the content script run on allow-listed pages without requiring up-front blanket grants. (Chrome currently still runs content scripts on <all_urls> declared in content_scripts.matches — this is a known platform limitation; the option-page allow-list is enforced in content.js and is the real gate.)
Production checklist
- [ ] Replace
icons/*.pngwith your branding. - [ ] Set a real extension name, description, and version in
manifest.json. - [ ] Decide BYOK vs proxy: for team deployments, swap
apiKeyfor aproxyUrl+ auth token pattern incontent.js. - [ ] Encrypt
apiKeyinchrome.storage.localwith a derived key from a user passphrase if you don't trust the device. - [ ] Add per-origin "what does Dornick see here?" first-run modal — sets a clear consent expectation.
- [ ] Provide a kill-switch (a stored boolean) the user can flip without uninstalling.
- [ ] Test on the actual SaaS origins before shipping; some apps' CSPs or
frame-ancestorsmay block Shadow-DOM overlays. Document any incompatibilities. - [ ] Audit
manifest.jsonpermissions — keep them as narrow as your real use case requires.
See also
License
MIT — © Dipankar Sarkar
