Lumi SDK for browser extensions

For Chrome / Edge / Firefox extensions, Electron apps, Tauri apps, and any environment where the Lumi SDK script tag doesn't fit. Manifest v3 native, runs in service workers and content scripts, with React (<LumiSlot /> + LumiProvider) and Vue (provideLumi + <LumiSlot />) bindings included.

v1.0.1 — beta. Live on npm today.

@boostbossai/lumi-sdk@1.0.1 is published — npm install @boostbossai/lumi-sdk resolves and works. Three entry points: @boostbossai/lumi-sdk (vanilla Lumi class), @boostbossai/lumi-sdk/react (<LumiSlot /> + LumiProvider), @boostbossai/lumi-sdk/vue (<LumiSlot /> + provideLumi). Manifest v3 compliant — zero eval, zero remote code execution. Sandbox flow works without signup using publisherId: "pub_test_demo". Demand-side fill is in early beta; expect lower fill rates than mature ad networks until our Founding Publisher cohort fills out.

Quick start

npm install @boostbossai/lumi-sdk
import { Lumi } from '@boostbossai/lumi-sdk';

const lumi = new Lumi({
  publisherId: 'pub_xxx',
  format:      'sidebar',
  debug:       false
});

lumi.render('#ad-slot');

When to use this vs. the JS snippet

If you can drop a <script> tag in your HTML <head>, use the JS snippet — it's lighter and auto-discovers slots.

Use the NPM SDK when:

Manifest v3 setup

The SDK is bundled with your extension code, so no remote-script restrictions apply. Use it from your service worker, content script, sidepanel, or popup — same import either way.

// manifest.json — no special permissions needed beyond what your extension already requests
{
  "manifest_version": 3,
  "host_permissions": [
    "https://api.boostboss.ai/*"
  ],
  "content_security_policy": {
    "extension_pages": "script-src 'self'; connect-src 'self' https://api.boostboss.ai"
  }
}

The SDK doesn't use eval, new Function, or remote script loading — Chrome Web Store reviewers flag those, and we don't go near them.

React component

import { LumiSlot } from '@boostbossai/lumi-sdk/react';

function Sidebar() {
  return <LumiSlot format="sidebar" context="document.title" />;
}

Vue component

import { LumiSlot } from '@boostbossai/lumi-sdk/vue';
export default {
  components: { LumiSlot }
}
<template>
  <LumiSlot format="sidebar" :context="docTitle" />
</template>

Conversion tracking

For traditional advertiser-side conversions on a separate landing page, advertisers should install pixel.js — see the conversion beacon docs.

For publisher-side conversions — when the user converts inside the same surface that hosted the ad (browser-extension popup, Electron app, embedded webview) — call lumi.trackConversion():

// After the user completes the action your ad promoted:
await lumi.trackConversion({
  type:       'signup',           // matches campaigns.conversion_event_types
  value:      29.99,              // USD; required for ROAS / target_roas optimization
  currency:   'USD',             // optional; defaults to 'USD'
  externalId: 'order_98123',     // optional — your order/user id for reconciliation
});

The SDK auto-resolves adId + auctionId from the most recent slot it rendered. To target a specific slot when several ads are mounted, pass slot (selector or HTMLElement). Failures emit an error event and surface in the silent-failure observability endpoint.

While this page is being filled out, the comprehensive SDK API (all methods, all options, error codes, beacon endpoints) lives in the API reference SDK section.

Testing

Use publisherId: 'pub_test_demo' in development — sandbox always returns a fixed creative.

Need this page expanded?

Email hello@boostboss.ai with what you're building — we prioritize the doc deep-dives based on what publishers are actually shipping.