{"_id":"@boostbossai/lumi-extension","_rev":"3-4b557a0a9740b24dd6ac78d233d1b1a6","name":"@boostbossai/lumi-extension","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@boostbossai/lumi-extension","version":"0.1.0","keywords":["boostboss","lumi","chrome","extension","manifest-v3","ads","monetization"],"author":{"name":"Boost Boss"},"license":"MIT","_id":"@boostbossai/lumi-extension@0.1.0","maintainers":[{"name":"boostboss","email":"admin@boostboss.ai"}],"homepage":"https://boostboss.ai/publish/extensions","bugs":{"url":"https://github.com/boostbossai/boostboss/issues"},"dist":{"shasum":"313708b8b21f290c679e61b0fec589535cd39353","tarball":"https://registry.npmjs.org/@boostbossai/lumi-extension/-/lumi-extension-0.1.0.tgz","fileCount":22,"integrity":"sha512-IgOX9pGFQgskltAFEnTEdYm6KUFfWbXeS1j1YlCtSOMmHN8eJjNeZE2OEpaNLANTq4WTzI6L8lkuKszG2XyiLg==","signatures":[{"sig":"MEUCIAmZC9ZEAMoJ8Y8ZNtZHv9u5mHMAil4iiUaydPHNkdfwAiEAw86xiKmS3OPsWRPWaiLI65mUSVW9dUgeHCPmTlkRVGE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60855},"main":"./src/index.js","type":"module","engines":{"node":">=18"},"exports":{".":{"import":"./src/index.js","default":"./src/index.js"},"./card":"./dist/card.js","./chip":"./dist/chip.js","./popup":"./dist/popup.js","./newtab":"./dist/newtab.js","./shared":"./src/shared.js","./loading":"./dist/loading.js","./citation":"./dist/citation.js","./sidepanel":"./dist/sidepanel.js","./background":"./src/background.js","./onboarding":"./dist/onboarding.js"},"gitHead":"87b7456aa540943beb5b7284e7b68c30cda6d92a","_npmUser":{"name":"boostboss","email":"admin@boostboss.ai"},"repository":{"url":"git+https://github.com/boostbossai/boostboss.git","type":"git","directory":"packages/lumi-extension"},"_npmVersion":"11.9.0","description":"Lumi for Browser Extension App runtime SDK — Boost Boss's ad placements for Chrome MV3 extensions.","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/lumi-extension_0.1.0_1782011397357_0.9054341582884975","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@boostbossai/lumi-extension","version":"0.2.0","keywords":["boostboss","lumi","chrome","extension","manifest-v3","ads","monetization"],"author":{"name":"Boost Boss"},"license":"MIT","_id":"@boostbossai/lumi-extension@0.2.0","maintainers":[{"name":"boostboss","email":"admin@boostboss.ai"}],"homepage":"https://boostboss.ai/publish/extensions","bugs":{"url":"https://github.com/boostbossai/boostboss/issues"},"dist":{"shasum":"899e2dc91ecc6c75c49e122006286aba4129916c","tarball":"https://registry.npmjs.org/@boostbossai/lumi-extension/-/lumi-extension-0.2.0.tgz","fileCount":23,"integrity":"sha512-/RGuUcs/MO/DgiULdnaBbKS2KkNw+ieBOc8Aads56XSL3LkteftaB5F0CS8Euv7PoI2aOPdQfphIHP95qB/sNw==","signatures":[{"sig":"MEUCICXjI/o3tiH1E2Fwbo4E0gKSN71iRW3uCL0srkuAiP6xAiEAgFQMM3Mu9SZ5UtFZ7U35HBMZwUH53pCzD0OclpxDEGo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68982},"main":"./src/index.js","type":"module","engines":{"node":">=18"},"exports":{".":{"import":"./src/index.js","default":"./src/index.js"},"./card":"./dist/card.js","./chip":"./dist/chip.js","./popup":"./dist/popup.js","./newtab":"./dist/newtab.js","./shared":"./src/shared.js","./loading":"./dist/loading.js","./citation":"./dist/citation.js","./sidepanel":"./dist/sidepanel.js","./background":"./src/background.js","./onboarding":"./dist/onboarding.js"},"gitHead":"0f1704a90e30edc84c419e70db86ae09f2831354","_npmUser":{"name":"boostboss","email":"admin@boostboss.ai"},"repository":{"url":"git+https://github.com/boostbossai/boostboss.git","type":"git","directory":"packages/lumi-extension"},"_npmVersion":"11.9.0","description":"Lumi for Browser Extension App runtime SDK — Boost Boss's ad placements for Chrome MV3 extensions.","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/lumi-extension_0.2.0_1782013182594_0.7882897381709455","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@boostbossai/lumi-extension","version":"0.3.0","description":"Lumi for Browser Extension App runtime SDK — Boost Boss's ad placements for Chrome MV3 extensions.","main":"./src/index.js","type":"module","exports":{".":{"import":"./src/index.js","default":"./src/index.js"},"./popup":"./dist/popup.js","./sidepanel":"./dist/sidepanel.js","./newtab":"./dist/newtab.js","./citation":"./dist/citation.js","./chip":"./dist/chip.js","./card":"./dist/card.js","./loading":"./dist/loading.js","./onboarding":"./dist/onboarding.js","./background":"./src/background.js","./shared":"./src/shared.js"},"engines":{"node":">=18"},"keywords":["boostboss","lumi","chrome","extension","manifest-v3","ads","monetization"],"homepage":"https://boostboss.ai/publish/extensions","repository":{"type":"git","url":"git+https://github.com/boostbossai/boostboss.git","directory":"packages/lumi-extension"},"license":"MIT","author":{"name":"Boost Boss"},"gitHead":"2482486a3ea5a6ed845de48a96e90517c3d180b6","_id":"@boostbossai/lumi-extension@0.3.0","bugs":{"url":"https://github.com/boostbossai/boostboss/issues"},"_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-fGOpV1nxcpxR7tx3rvuTmyskMEYYHly2QwF3KBRbrG63faTjfuNUK8/kEXOKTpk6G6LGv+vT8Za7ItwR1klQyg==","shasum":"f30168a024dff5321efb232e6edfad420e07fcc2","tarball":"https://registry.npmjs.org/@boostbossai/lumi-extension/-/lumi-extension-0.3.0.tgz","fileCount":23,"unpackedSize":74079,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIECZpW7Z5clvjfZ/k5LyR4ezrVhJBkU7u505DCJWPKVkAiEAyBTLyQdnNZeEANdP7QL4SXN0QphXlI9ba2E+QZfx/ZE="}]},"_npmUser":{"name":"boostboss","email":"admin@boostboss.ai"},"directories":{},"maintainers":[{"name":"boostboss","email":"admin@boostboss.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lumi-extension_0.3.0_1782377211205_0.2817439857394315"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T03:09:57.165Z","modified":"2026-06-25T08:46:51.463Z","0.1.0":"2026-06-21T03:09:57.502Z","0.2.0":"2026-06-21T03:39:42.736Z","0.3.0":"2026-06-25T08:46:51.339Z"},"bugs":{"url":"https://github.com/boostbossai/boostboss/issues"},"author":{"name":"Boost Boss"},"license":"MIT","homepage":"https://boostboss.ai/publish/extensions","keywords":["boostboss","lumi","chrome","extension","manifest-v3","ads","monetization"],"repository":{"type":"git","url":"git+https://github.com/boostbossai/boostboss.git","directory":"packages/lumi-extension"},"description":"Lumi for Browser Extension App runtime SDK — Boost Boss's ad placements for Chrome MV3 extensions.","maintainers":[{"name":"boostboss","email":"admin@boostboss.ai"}],"readme":"# @boostbossai/lumi-extension\n\nRuntime SDK for **Lumi for Browser Extension App** — Boost Boss's ad\nplacements for Chrome Manifest V3 extensions.\n\nYou shouldn't install this directly. Use the installer:\n\n```bash\ncd /path/to/your/chrome-extension\nnpx @boostbossai/install-extension <publisherId>\n```\n\nThe installer adds this package to your extension and wires up the four\nruntime entry points (background, popup, sidepanel, newtab).\n\n## Scope (v0)\n\n- **Chrome MV3 only.** Firefox/Safari extension manifests differ; we'll add\n  them once the Chrome flow is proven.\n- Zero deps. Vanilla browser-extension JS.\n- ES modules in `src/`. The `dist/` directory holds the files referenced by\n  popup/sidepanel/newtab HTML — for v0 they re-export from `src/`. A real\n  build step (esbuild/rollup) will replace these with bundled single-file\n  outputs later.\n- A classic (non-module) service-worker build lives at\n  `dist/background.classic.js` for publishers whose manifest doesn't set\n  `background.type === \"module\"`.\n\n## Entry points\n\n| File                              | Purpose                                                      |\n| --------------------------------- | ------------------------------------------------------------ |\n| `src/background.js`               | `LumiBackground.init({ publisherId })` — service worker init |\n| `src/popup.js`                    | Popup card renderer (auto-mount on DOMContentLoaded)         |\n| `src/sidepanel.js`                | Side panel slot renderer (auto-mount on DOMContentLoaded)    |\n| `src/newtab.js`                   | New-tab takeover renderer (auto-mount on DOMContentLoaded)   |\n| `src/citation.js`                 | `LumiCitation.mount(opts)` — single-line sponsored citation  |\n| `src/chip.js`                     | `LumiChip.mount(opts)` — tappable quick-reply pill           |\n| `src/card.js`                     | `LumiCard.mount(opts)` — inline sponsored card               |\n| `src/loading.js`                  | `LumiLoading.observe(opts)` — loading-state ad               |\n| `src/onboarding.js`               | `LumiOnboarding.mount(opts)` — one-time install hero card    |\n| `src/shared.js`                   | `fetchAd`, `fireImpression`, constants                       |\n| `src/index.js`                    | Package root re-exports                                      |\n| `dist/background.classic.js`      | Non-module service worker build                              |\n\n## Placements (8/8 auto-mounted in v0.2.0)\n\nEvery placement auto-mounts inside `popup.html`, `sidepanel.html`, and `newtab.html` — the install CLI wires the surface scripts and the runtime does the rest. Per [Publisher Agreement §4.1](https://boostboss.ai/publisher-agreement#section-4) auto-placement is the default. Publishers suppress individual placements with `<div data-lumi-disable=\"<placement>\"></div>` or pin one to an exact spot with `<div data-lumi-slot=\"<placement>\"></div>`.\n\n| Placement     | Module                       | Surface                          | Auto-mount strategy              |\n| ------------- | ---------------------------- | -------------------------------- | -------------------------------- |\n| `popup`       | `src/popup.js`               | popup.html                       | Auto-mount on DOMContentLoaded   |\n| `sidepanel`   | `src/sidepanel.js`           | sidepanel.html                   | Auto-mount on DOMContentLoaded   |\n| `newtab`      | `src/newtab.js`              | newtab.html                      | Auto-mount on DOMContentLoaded   |\n| `citation`    | `src/citation.js`            | under AI response                | Heuristic: detected AI container → safe-default fallback |\n| `chip`        | `src/chip.js`                | suggested-action row             | Heuristic: detected suggestion container → safe-default |\n| `card`        | `src/card.js`                | feed flow                        | Heuristic: detected feed container → safe-default |\n| `loading`     | `src/loading.js`             | busy state                       | Heuristic: detected spinner/`aria-busy` → safe-default |\n| `onboarding`  | `src/onboarding.js`          | popup post-install               | Fires once via `chrome.storage.local` seen flag |\n\nThe 5 secondary placements (`citation`, `chip`, `card`, `loading`, `onboarding`) are driven by `src/auto-mount.js`, which runs alongside the popup/sidepanel/newtab renderers, observes the DOM with `MutationObserver` for SPA-style late mounts, and refuses to inject into risky containers (code blocks, form inputs, system messages, navigation chrome).\n\n### Loading-state detection\n\n`LumiLoading.observe()` watches the passed container for:\n\n- `[aria-busy=\"true\"]`\n- elements matching `.spinner` or `.loading`\n- elements with `[data-lumi-slot=\"loading\"]` — optional explicit pin\n\nSpinner-like elements that stay visible for **>1.5s** are replaced with a\nsponsored card. Explicit `data-lumi-slot=\"loading\"` markers mount\nimmediately (no delay). One ad per `observe()` call — re-arm by calling\nagain.\n\n## Network\n\nAll four renderers call `https://boostboss.ai/api/lumi-fetch` with:\n\n```json\n{\n  \"publisher_id\": \"...\",\n  \"placement\": \"popup-card | sidepanel-slot | newtab-takeover | ...\",\n  \"surface\": \"browser-extension-app\",\n  \"context\": { \"url\": \"<active tab URL or null>\" },\n  \"session_id\": \"<uuid>\",\n  \"sdk\": \"lumi-extension\",\n  \"sdk_version\": \"0.1.0\"\n}\n```\n\nImpressions are reported to `/api/lumi-impression` using the\n`impression_token` returned with each ad.\n\n## Manifest V3 compliance\n\n- No remote code loading (`fetch` for JSON only, never script source).\n- No `eval` or `new Function`.\n- No inline scripts in popup/sidepanel/newtab HTML — the install CLI inserts\n  `<script type=\"module\" src=\"./node_modules/@boostbossai/lumi-extension/dist/<surface>.js\">`.\n- Session state lives in `chrome.storage.session` (service workers don't have\n  `localStorage`).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}