{"_id":"@cohesiumai/providers-webnn","_rev":"3-bd3aa68f03a9eb470885904e0eb8165f","name":"@cohesiumai/providers-webnn","dist-tags":{"latest":"2.1.2"},"versions":{"1.0.0":{"name":"@cohesiumai/providers-webnn","version":"1.0.0","license":"MIT","_id":"@cohesiumai/providers-webnn@1.0.0","maintainers":[{"name":"cohesiumai","email":"renald@cohesium.ai"}],"dist":{"shasum":"610a9744b7073c7ac445fe17bef0ad6c0e249195","tarball":"https://registry.npmjs.org/@cohesiumai/providers-webnn/-/providers-webnn-1.0.0.tgz","fileCount":5,"integrity":"sha512-OtkExzKYfKbbTQ7TeiSKD1UoGyHU0CVa3rLXPNGADWkeplzSTv+4HRLYOduSapsSs+ORDzOqj91GBhvHZ7L1yQ==","signatures":[{"sig":"MEUCIHAH1cIk+s3tMVsdQVH03Xa1sK3GKlArpVtsADKswS+cAiEAoYTrYKqm4uJruijST4vddYttf0StdMciK8hmvSONYk8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8575},"main":"dist/index.js","type":"module","_from":"file:cohesiumai-providers-webnn-1.0.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"cohesiumai","email":"renald@cohesium.ai"},"_resolved":"/tmp/07a8444e8ae5876d27c9bb0dfdd0b30d/cohesiumai-providers-webnn-1.0.0.tgz","_integrity":"sha512-OtkExzKYfKbbTQ7TeiSKD1UoGyHU0CVa3rLXPNGADWkeplzSTv+4HRLYOduSapsSs+ORDzOqj91GBhvHZ7L1yQ==","_npmVersion":"10.8.2","description":"WebNN provider for browser-ai — hardware-accelerated inference","directories":{},"_nodeVersion":"20.19.6","dependencies":{"@cohesiumai/core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","vitest":"^2.1.9","typescript":"^5.6.3"},"peerDependencies":{"@cohesiumai/core":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/providers-webnn_1.0.0_1768902461883_0.48724932590467795","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@cohesiumai/providers-webnn","version":"1.0.1","license":"MIT","_id":"@cohesiumai/providers-webnn@1.0.1","maintainers":[{"name":"cohesiumai","email":"renald@cohesium.ai"}],"dist":{"shasum":"d569dd090e7d9b36dcf6869627064a6a7e39e5b1","tarball":"https://registry.npmjs.org/@cohesiumai/providers-webnn/-/providers-webnn-1.0.1.tgz","fileCount":5,"integrity":"sha512-NVJXguzKVtZIK8t+U1q6QWGG6xN5ul7lt10wf6Q8hLLOwiBqjUdxwTM2p3ncv2FWREKrdq+O3eNfXIe9+4SDrw==","signatures":[{"sig":"MEUCID2t0DLtuTr0o82eftK/Upuitme3JKsurNnnSslFKBpsAiEA+K/v3YQ7R6u5Q3/uKzaCFVCx4vo6Yt/Hnms7yn4CIII=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8575},"main":"dist/index.js","type":"module","_from":"file:cohesiumai-providers-webnn-1.0.1.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"cohesiumai","email":"renald@cohesium.ai"},"_resolved":"/tmp/f3473e9f53068a5b6d27a081ba618451/cohesiumai-providers-webnn-1.0.1.tgz","_integrity":"sha512-NVJXguzKVtZIK8t+U1q6QWGG6xN5ul7lt10wf6Q8hLLOwiBqjUdxwTM2p3ncv2FWREKrdq+O3eNfXIe9+4SDrw==","_npmVersion":"10.8.2","description":"WebNN provider for browser-ai — hardware-accelerated inference","directories":{},"_nodeVersion":"20.19.6","dependencies":{"@cohesiumai/core":"0.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","vitest":"^2.1.9","typescript":"^5.6.3"},"peerDependencies":{"@cohesiumai/core":">=0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/providers-webnn_1.0.1_1768905736634_0.6825626960578652","host":"s3://npm-registry-packages-npm-production"}},"2.1.2":{"name":"@cohesiumai/providers-webnn","version":"2.1.2","description":"WebNN provider for browser-ai — hardware-accelerated inference","type":"module","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@cohesiumai/core":"2.1.2"},"devDependencies":{"tsup":"^8.2.4","typescript":"^5.6.3","vitest":"^2.1.9"},"peerDependencies":{"@cohesiumai/core":"2.1.2"},"publishConfig":{"access":"public"},"license":"MIT","scripts":{"build":"tsup src/index.ts --format esm --dts","typecheck":"tsc -p tsconfig.json --noEmit","lint":"eslint .","test":"vitest run --passWithNoTests"},"_id":"@cohesiumai/providers-webnn@2.1.2","_integrity":"sha512-Nm/xzXz6euVPKO9GSnor3iGYDvW0nMnu4zRdJognhTv3LYutj/YucVIdpI6PuueP04YAfliEn3AlMdc7dMST1A==","_resolved":"/tmp/ce6d739aab61564f714d0b5b54ef0124/cohesiumai-providers-webnn-2.1.2.tgz","_from":"file:cohesiumai-providers-webnn-2.1.2.tgz","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Nm/xzXz6euVPKO9GSnor3iGYDvW0nMnu4zRdJognhTv3LYutj/YucVIdpI6PuueP04YAfliEn3AlMdc7dMST1A==","shasum":"75897a74af783dd63303b87fdfd2e8affec061e5","tarball":"https://registry.npmjs.org/@cohesiumai/providers-webnn/-/providers-webnn-2.1.2.tgz","fileCount":5,"unpackedSize":8573,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCWAORaYyyI6NnPkUWhu33HcjAqNsof5t1rh02TSRJLFAIgAcCdG1e/Py1kLxC4ttfSHKytOKF8owq72k4Dxh1l1BA="}]},"_npmUser":{"name":"cohesiumai","email":"renald@cohesium.ai"},"directories":{},"maintainers":[{"name":"cohesiumai","email":"renald@cohesium.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/providers-webnn_2.1.2_1768910614390_0.3970163358597236"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-20T09:47:41.798Z","modified":"2026-01-20T12:03:34.628Z","1.0.0":"2026-01-20T09:47:42.018Z","1.0.1":"2026-01-20T10:42:16.779Z","2.1.2":"2026-01-20T12:03:34.525Z"},"license":"MIT","description":"WebNN provider for browser-ai — hardware-accelerated inference","maintainers":[{"name":"cohesiumai","email":"renald@cohesium.ai"}],"readme":"# @cohesiumai/providers-webnn\n\n> WebNN provider for browser-ai — Hardware-accelerated inference via Web Neural Network API.\n\n## Installation\n\n```bash\npnpm add @cohesiumai/providers-webnn\n```\n\n## Usage\n\n```typescript\nimport { createWebNNProvider } from '@cohesiumai/providers-webnn';\n\nconst provider = createWebNNProvider();\n\n// Check availability\nconst result = await provider.detect();\nif (result.available) {\n  console.log('WebNN is available');\n}\n```\n\n## Browser Support\n\n| Browser | Support |\n|---------|---------|\n| Chrome 127+ | ✅ Full |\n| Edge 127+ | ✅ Full |\n| Chrome <127 | ⚠️ Flag required |\n| Firefox | ❌ Not supported |\n| Safari | ❌ Not supported |\n\n## Features\n\n- **Hardware Acceleration** — Uses GPU/NPU when available\n- **Native Performance** — Direct access to ML accelerators\n- **Automatic Fallback** — Works with browser-ai's provider selection\n\n## API\n\n### `createWebNNProvider(options?)`\n\nCreates a new WebNN provider instance.\n\n```typescript\ninterface WebNNProviderOptions {\n  devicePreference?: 'gpu' | 'cpu' | 'npu';\n}\n```\n\n### Provider Interface\n\n- `detect()` — Check if WebNN is available\n- `init(config, modelSpec)` — Initialize with model\n- `generate(params)` — Run inference\n- `abort()` — Cancel current generation\n- `teardown()` — Cleanup resources\n\n## V0.2+\n\nThis provider was introduced in browser-ai V0.2.\n\n## License\n\nMIT © 2026\n","readmeFilename":"README.md"}