{"_id":"@desert-ant-labs/desert-ant-web","_rev":"4-023a109f78032fe120c88724dd643b2b","name":"@desert-ant-labs/desert-ant-web","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@desert-ant-labs/desert-ant-web","version":"0.1.0","keywords":["usage","telemetry","active-devices","mad","desert-ant"],"license":"UNLICENSED","_id":"@desert-ant-labs/desert-ant-web@0.1.0","maintainers":[{"name":"finnvoorhees","email":"finn@detail.co"},{"name":"laurierrochon","email":"laurier@detail.co"}],"homepage":"https://github.com/Desert-Ant-Labs/desert-ant-web","bugs":{"url":"https://github.com/Desert-Ant-Labs/desert-ant-web/issues"},"dist":{"shasum":"0a90750f910c584a8c46ef92b755449f45bf2f3a","tarball":"https://registry.npmjs.org/@desert-ant-labs/desert-ant-web/-/desert-ant-web-0.1.0.tgz","fileCount":14,"integrity":"sha512-XXeteg5aIhYwAzQFgMcWMHkVwSACgpXv1d79++3Wzz0XKdtRSfhZ3sILSRkClwPsGvVdEdIZqV5+Fc2/L51oDQ==","signatures":[{"sig":"MEYCIQC4KQVFDdzYpTZHUJkGLF/UTawNvyDgqYN9A1YAdo+ZDAIhAO6sCaPNcQLchlczBeuU5Xs+cu1SxloLxW7UeTlzawLm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22706},"main":"./dist/index.node.js","type":"module","types":"./dist/index.node.d.ts","engines":{"node":">=18"},"exports":{".":{"node":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"}},"./core":{"types":"./dist/core.d.ts","default":"./dist/core.js"},"./package.json":"./package.json"},"gitHead":"1c40e2c5fdd44da71dc91132c5c274fc5e9d742e","scripts":{"test":"node --import tsx --test test/*.test.ts","build":"tsc","prepare":"npm run build","check:pkg":"npm run build && npm run lint:publint && npm run lint:attw","lint:attw":"attw --pack . --profile esm-only","lint:publint":"publint --strict"},"_npmUser":{"name":"laurierrochon","email":"laurier@detail.co"},"repository":{"url":"git+https://github.com/Desert-Ant-Labs/desert-ant-web.git","type":"git"},"_npmVersion":"10.2.4","description":"Internal shared browser/JS code for Desert Ant on-device SDKs (currently: usage reporting — active-device 'load' events to the ingestion API).","directories":{},"sideEffects":false,"_nodeVersion":"21.6.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4","publint":"^0.3","typescript":"^5","@types/node":"^22","@arethetypeswrong/cli":"^0.18"},"_npmOperationalInternal":{"tmp":"tmp/desert-ant-web_0.1.0_1783522575287_0.7276236719169367","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@desert-ant-labs/desert-ant-web","version":"0.2.0","keywords":["usage","telemetry","active-devices","mad","desert-ant"],"license":"UNLICENSED","_id":"@desert-ant-labs/desert-ant-web@0.2.0","maintainers":[{"name":"finnvoorhees","email":"finn@detail.co"},{"name":"laurierrochon","email":"laurier@detail.co"},{"name":"pveugen","email":"paul@pave4.com"}],"homepage":"https://github.com/Desert-Ant-Labs/desert-ant-web","bugs":{"url":"https://github.com/Desert-Ant-Labs/desert-ant-web/issues"},"dist":{"shasum":"b3a33ce574c4301c88f6ec25934525769e8ba3f7","tarball":"https://registry.npmjs.org/@desert-ant-labs/desert-ant-web/-/desert-ant-web-0.2.0.tgz","fileCount":16,"integrity":"sha512-5liNxiid/NZw96YSfxj2iKWrWMG3Vq4+e8K3zZamok/pqPPxuixX1BnZOqNwe96VYkjd13I1P+xADD1duw4+BQ==","signatures":[{"sig":"MEUCIQDHEkoHcHBxJlY6chqMkGHZ/5/LVvQxMO257tCfSF34MAIgP6WLaqPZCMBxSDcNvJwUjLC6MQ0eimlucrGSaAueapM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28999},"main":"./dist/index.node.js","type":"module","types":"./dist/index.node.d.ts","engines":{"node":">=18"},"exports":{".":{"node":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"},"browser":{"types":"./dist/index.browser.d.ts","default":"./dist/index.browser.js"},"default":{"types":"./dist/index.node.d.ts","default":"./dist/index.node.js"}},"./core":{"types":"./dist/core.d.ts","default":"./dist/core.js"},"./package.json":"./package.json"},"gitHead":"6c321682b0646c557ab7bba0a02a91390bdcd19d","scripts":{"test":"node --import tsx --test test/*.test.ts","build":"tsc","prepare":"npm run build","check:pkg":"npm run build && npm run lint:publint && npm run lint:attw","lint:attw":"attw --pack . --profile esm-only","lint:publint":"publint --strict"},"_npmUser":{"name":"laurierrochon","email":"laurier@detail.co"},"repository":{"url":"git+https://github.com/Desert-Ant-Labs/desert-ant-web.git","type":"git"},"_npmVersion":"10.2.4","description":"Internal shared browser/JS code for Desert Ant on-device SDKs (currently: usage reporting — active-device 'load' events to the ingestion API).","directories":{},"sideEffects":false,"_nodeVersion":"21.6.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4","publint":"^0.3","typescript":"^5","@types/node":"^22","@arethetypeswrong/cli":"^0.18"},"_npmOperationalInternal":{"tmp":"tmp/desert-ant-web_0.2.0_1783621985822_0.051549443421625485","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-07-08T14:56:15.109Z","modified":"2026-07-29T13:27:03.907Z","0.1.0":"2026-07-08T14:56:15.430Z","0.2.0":"2026-07-09T18:33:05.941Z"},"bugs":{"url":"https://github.com/Desert-Ant-Labs/desert-ant-web/issues"},"license":"UNLICENSED","homepage":"https://github.com/Desert-Ant-Labs/desert-ant-web","keywords":["usage","telemetry","active-devices","mad","desert-ant"],"repository":{"url":"git+https://github.com/Desert-Ant-Labs/desert-ant-web.git","type":"git"},"description":"Internal shared browser/JS code for Desert Ant on-device SDKs (currently: usage reporting — active-device 'load' events to the ingestion API).","maintainers":[{"email":"finn@detail.co","name":"finnvoorhees"},{"email":"laurier@detail.co","name":"laurierrochon"},{"email":"paul@pave4.com","name":"pveugen"},{"email":"gabesuit@gmail.com","name":"akagabi"}],"readme":"# @desert-ant-labs/desert-ant-web\n\nInternal shared web/JS code for Desert Ant's on-device SDKs (`shapes`, `emo`, …).\nCurrently it provides usage reporting: an active-device `load` event (the MAD\nturnstile) sent to our ingestion API.\n\n> **Not for direct use.** This package is published only so our SDKs can depend\n> on it. It has no stable public API and may change without notice — integrate a\n> Desert Ant SDK, not this.\n\n## API\n\n```ts\nimport { initUsage } from \"@desert-ant-labs/desert-ant-web\";\n\nconst usage = initUsage();  // keyless: the browser Origin identifies the site\nusage.recordCall();         // once per inference; rides the session's load event\n```\n\n- One `load` per device per session (30-min idle timeout); the server dedups by\n  device per month and sums `callCount` across events.\n- Auto-collects low-entropy device context (`locale`, `osName`, `osVersion`,\n  `browserName`, `browserVersion`, `formFactor`) from User-Agent Client Hints /\n  the UA string — no high-entropy hints, no permission prompt. Pass `appVersion`\n  via `context` (it can't be auto-detected).\n- Zero dependencies, best-effort, never throws into the host.\n- `initUsage({ key?, endpoint?, callCount?, context?, disabled? })` — `endpoint`\n  overrides the default (e.g. staging). `@desert-ant-labs/desert-ant-web/core`\n  exposes the transport/storage-free `createClient`.\n\n## Develop\n\n```bash\nnpm run build\nnpm test              # offline unit tests\nDAL_LIVE=1 npm test   # also hits staging\nnpm run check:pkg     # build + publint + attw\n```\n","readmeFilename":"README.md"}