{"_id":"@spatialreal/web-sdk","_rev":"8-6e904db6ba4f9fb35be398656d623cc8","name":"@spatialreal/web-sdk","dist-tags":{"latest":"1.0.0-beta.8"},"versions":{"1.0.0-beta.1":{"name":"@spatialreal/web-sdk","version":"1.0.0-beta.1","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"author":{"name":"SpatialReal"},"license":"MIT","_id":"@spatialreal/web-sdk@1.0.0-beta.1","maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"homepage":"https://docs.spatialreal.ai","dist":{"shasum":"3f7070d7cb4901d4a13413015b7f088a8304d1c4","tarball":"https://registry.npmjs.org/@spatialreal/web-sdk/-/web-sdk-1.0.0-beta.1.tgz","fileCount":83,"integrity":"sha512-wqvE7Bh0Yzzks9wBAbu2ADMvVR+6vAJY8cpCS/YZZ9pzivFwsiZDiM7NjiaWW8wni70vXUtCQa1VNkxYg5Mh2A==","signatures":[{"sig":"MEUCIQCcu2SRf3f0FRid/TVVIrtg+nyygYqzCZTeUx7RoCWBiwIgD3J0AkaNdlXzwpwq67egKf4QwWujZd8YSNyOWQONMNA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8940837},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./next.d.ts","import":"./next.js"},"./vite":{"types":"./vite.d.ts","import":"./vite.js"}},"gitHead":"b304ce40666b230bb9638d2e49cb2c0277162771","scripts":{"dev":"vite build --mode library --watch","test":"cd tests && pnpm test","build":"SDK_BUILD=true vite build --mode library && npm run build:vite-plugin && npm run build:next-plugin","clean":"rm -rf dist","test:e2e":"cd tests && pnpm run test:e2e","test:page":"vite --config test-page/vite.config.mjs","test:perf":"cd tests && pnpm run test:perf","typecheck":"tsc --noEmit","test:watch":"cd tests && pnpm run test:watch","check:package":"node tests/package/check-installed-package.mjs","typecheck:sdk":"tsc -p tsconfig.sdk.json","demo:benchmark":"vite --config benchmark-demo/vite.config.mjs","generate:proto":"rm -rf generated && cd proto && buf generate --path driveningress --path cp/v1/sdk_character.proto --path cp/v1/sdk_agent.proto","test:page:build":"vite build --config test-page/vite.config.mjs","test:integration":"vite --config tests/integration-runner/vite.config.mjs","build:next-plugin":"tsc next.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration","build:vite-plugin":"tsc vite.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration"},"_npmUser":{"name":"yueheng-sr","email":"y.han@spatialreal.com"},"_npmVersion":"11.17.0","description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","directories":{},"_nodeVersion":"26.5.0","dependencies":{"nanoid":"^5.1.6","@guiiai/logg":"^1.2.4","ogg-opus-decoder":"1.7.5","@bufbuild/protobuf":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.2","devDependencies":{"tsx":"^4.20.6","vite":"^5.0.0","typescript":"^5.0.0","@types/node":"^20.11.30","@webgpu/types":"^0.1.65","livekit-client":"2.22.3","vite-plugin-dts":"^4.5.4"},"peerDependencies":{"next":">=13.0.0","vite":">=5.0.0","@webgpu/types":"*","livekit-client":">=2.19.0 <3"},"peerDependenciesMeta":{"next":{"optional":true},"vite":{"optional":true},"livekit-client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.0-beta.1_1790750133052_0.4544025704876551","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.2":{"name":"@spatialreal/web-sdk","version":"1.0.0-beta.2","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"author":{"name":"SpatialReal"},"license":"MIT","_id":"@spatialreal/web-sdk@1.0.0-beta.2","maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"homepage":"https://docs.spatialreal.ai","dist":{"shasum":"b4981ed33920baa1789f1cd1b335096b6742e814","tarball":"https://registry.npmjs.org/@spatialreal/web-sdk/-/web-sdk-1.0.0-beta.2.tgz","fileCount":83,"integrity":"sha512-mYtZYiK3IdezHpBtlqjBUOwraW1eB0FBkBGwrGK6tgb5K8gVBmHW4ZcWU9OfUbDc0WMw8+ZMXlOd1r92dib25A==","signatures":[{"sig":"MEYCIQCHNcqF97QXgGpYcHgyOUquc26xR6KXh5PolNzqMCsplQIhANXBtsBwU+LP8G0APA6tugbJObQXWimFIg+pR0LjCf7u","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQC5mSg1s68MQxBGCnDtAmMo4LbKbNJjreyNFF/tMr52fAIhALksmsZLAxdFWePcVRHRc9INBU7HmP+HyRkGdh9iXxuC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8946767},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./next.d.ts","import":"./next.js"},"./vite":{"types":"./vite.d.ts","import":"./vite.js"}},"gitHead":"2f7f20e7b4fdeb291e5cbd3aabdb698f67d092af","scripts":{"dev":"vite build --mode library --watch","test":"cd tests && pnpm test","build":"SDK_BUILD=true vite build --mode library && npm run build:vite-plugin && npm run build:next-plugin","clean":"rm -rf dist","test:e2e":"cd tests && pnpm run test:e2e","test:page":"vite --config test-page/vite.config.mjs","test:perf":"cd tests && pnpm run test:perf","typecheck":"tsc --noEmit","test:watch":"cd tests && pnpm run test:watch","check:package":"node tests/package/check-installed-package.mjs","typecheck:sdk":"tsc -p tsconfig.sdk.json","demo:benchmark":"vite --config benchmark-demo/vite.config.mjs","generate:proto":"rm -rf generated && cd proto && buf generate --path driveningress --path cp/v1/sdk_character.proto --path cp/v1/sdk_agent.proto","test:page:build":"vite build --config test-page/vite.config.mjs","test:integration":"vite --config tests/integration-runner/vite.config.mjs","build:next-plugin":"tsc next.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration","build:vite-plugin":"tsc vite.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration"},"_npmUser":{"name":"yueheng-sr","email":"y.han@spatialreal.com"},"_npmVersion":"11.17.0","description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","directories":{},"_nodeVersion":"26.5.0","dependencies":{"nanoid":"^5.1.6","@guiiai/logg":"^1.2.4","ogg-opus-decoder":"1.7.5","@bufbuild/protobuf":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.2","devDependencies":{"tsx":"^4.20.6","vite":"^5.0.0","typescript":"^5.0.0","@types/node":"^20.11.30","@webgpu/types":"^0.1.65","livekit-client":"2.22.3","vite-plugin-dts":"^4.5.4"},"peerDependencies":{"next":">=13.0.0","vite":">=5.0.0","@webgpu/types":"*","livekit-client":">=2.19.0 <3"},"peerDependenciesMeta":{"next":{"optional":true},"vite":{"optional":true},"livekit-client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.0-beta.2_1791842998637_0.674900085520687","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.3":{"name":"@spatialreal/web-sdk","version":"1.0.0-beta.3","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"author":{"name":"SpatialReal"},"license":"MIT","_id":"@spatialreal/web-sdk@1.0.0-beta.3","maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"homepage":"https://docs.spatialreal.ai","dist":{"shasum":"962aa6e22bfdcd387c8399a0c0d7ea72703b55c1","tarball":"https://registry.npmjs.org/@spatialreal/web-sdk/-/web-sdk-1.0.0-beta.3.tgz","fileCount":84,"integrity":"sha512-h1HCpaeCn4TwFLBZSxVBQMNlTkFMIV/5YowqCPNwVPgd4jc5cjK+DrAR/6tJB1CG9U38zneYZZwt2O38bFh9nQ==","signatures":[{"sig":"MEQCICACSsDutoAR5FapTVg+BrDksu/BCr/XaUDvHYlGvJ2FAiAG60E6tIrdmRxxzOQ27ZmiX3/HaThyHM7ZCXgld5ByHg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDX9wnu49loHiqmnwH1G5pWfLa5x8jWibe1on76xkAlcgIgRl8CD53yJomc7rFUnaco9w3/Ca7FtiCwKGn3a5fXKS8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8953006},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./next.d.ts","import":"./next.js"},"./vite":{"types":"./vite.d.ts","import":"./vite.js"}},"gitHead":"dc1d315e117c241ad8adc29c2383fed70f65e5c2","scripts":{"dev":"vite build --mode library --watch","test":"cd tests && pnpm test","build":"SDK_BUILD=true vite build --mode library && npm run build:vite-plugin && npm run build:next-plugin","clean":"rm -rf dist","test:e2e":"cd tests && pnpm run test:e2e","test:page":"vite --config test-page/vite.config.mjs","test:perf":"cd tests && pnpm run test:perf","typecheck":"tsc --noEmit","test:watch":"cd tests && pnpm run test:watch","check:package":"node tests/package/check-installed-package.mjs","typecheck:sdk":"tsc -p tsconfig.sdk.json","demo:benchmark":"vite --config benchmark-demo/vite.config.mjs","generate:proto":"rm -rf generated && cd proto && buf generate --path driveningress --path cp/v1/sdk_character.proto --path cp/v1/sdk_agent.proto","test:page:build":"vite build --config test-page/vite.config.mjs","test:integration":"vite --config tests/integration-runner/vite.config.mjs","build:next-plugin":"tsc next.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration","build:vite-plugin":"tsc vite.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration"},"_npmUser":{"name":"yueheng-sr","email":"y.han@spatialreal.com"},"_npmVersion":"11.17.0","description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","directories":{},"_nodeVersion":"26.5.0","dependencies":{"nanoid":"^5.1.6","@guiiai/logg":"^1.2.4","ogg-opus-decoder":"1.7.5","@bufbuild/protobuf":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.2","devDependencies":{"tsx":"^4.20.6","vite":"^5.0.0","typescript":"^5.0.0","@types/node":"^20.11.30","@webgpu/types":"^0.1.65","livekit-client":"2.22.3","vite-plugin-dts":"^4.5.4"},"peerDependencies":{"next":">=13.0.0","vite":">=5.0.0","@webgpu/types":"*","livekit-client":">=2.19.0 <3"},"peerDependenciesMeta":{"next":{"optional":true},"vite":{"optional":true},"livekit-client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.0-beta.3_1792139765277_0.1701406665828118","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.4":{"name":"@spatialreal/web-sdk","version":"1.0.0-beta.4","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"author":{"name":"SpatialReal"},"license":"MIT","_id":"@spatialreal/web-sdk@1.0.0-beta.4","maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"homepage":"https://docs.spatialreal.ai","dist":{"shasum":"7cc145659235aea7f08685fe3f347501c6a36b78","tarball":"https://registry.npmjs.org/@spatialreal/web-sdk/-/web-sdk-1.0.0-beta.4.tgz","fileCount":84,"integrity":"sha512-ENoNVl4otes6iwtX7xiNuFqRHwsE69MRR9hR5uUBgsPeaXbOX4ZKM0KKWpgbEwSfT1RVCG5DluBHvSoCEhSfng==","signatures":[{"sig":"MEUCIHiKHlsvj02FZ2wBKtfIdP0O4f0509U84BSlRuVXWsRBAiEA4gny07mxyLWpXG3STup+CF0j9NNHoU2EAj3NO371N1g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCICKFVoQzDdXJHuOll+jpb6HMQig90n8F90ZEDTJz+3vTAiAZYFKe7HU+2wu1LFlK4siuxrKFwbPmgQl7t1tiNwh83Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8975245},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./next.d.ts","import":"./next.js"},"./vite":{"types":"./vite.d.ts","import":"./vite.js"}},"gitHead":"1697bd668ddb71a516c767bcd48dfd48d51813c4","scripts":{"dev":"vite build --mode library --watch","test":"cd tests && pnpm test","build":"SDK_BUILD=true vite build --mode library && npm run build:vite-plugin && npm run build:next-plugin","clean":"rm -rf dist","test:e2e":"cd tests && pnpm run test:e2e","test:page":"vite --config test-page/vite.config.mjs","test:perf":"cd tests && pnpm run test:perf","typecheck":"tsc --noEmit","test:watch":"cd tests && pnpm run test:watch","check:package":"node tests/package/check-installed-package.mjs","typecheck:sdk":"tsc -p tsconfig.sdk.json","demo:benchmark":"vite --config benchmark-demo/vite.config.mjs","generate:proto":"rm -rf generated && cd proto && buf generate --path driveningress --path cp/v1/sdk_character.proto --path cp/v1/sdk_agent.proto","test:page:build":"vite build --config test-page/vite.config.mjs","test:integration":"vite --config tests/integration-runner/vite.config.mjs","build:next-plugin":"tsc next.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration","build:vite-plugin":"tsc vite.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration"},"_npmUser":{"name":"yueheng-sr","email":"y.han@spatialreal.com"},"_npmVersion":"11.17.0","description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","directories":{},"_nodeVersion":"26.5.0","dependencies":{"nanoid":"^5.1.6","@guiiai/logg":"^1.2.4","ogg-opus-decoder":"1.7.5","@bufbuild/protobuf":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.2","devDependencies":{"tsx":"^4.20.6","vite":"^5.0.0","typescript":"^5.0.0","@types/node":"^20.11.30","@webgpu/types":"^0.1.65","livekit-client":"2.22.3","vite-plugin-dts":"^4.5.4"},"peerDependencies":{"next":">=13.0.0","vite":">=5.0.0","@webgpu/types":"*","livekit-client":">=2.19.0 <3"},"peerDependenciesMeta":{"next":{"optional":true},"vite":{"optional":true},"livekit-client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.0-beta.4_1793596533882_0.22861365135239176","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.5":{"name":"@spatialreal/web-sdk","version":"1.0.0-beta.5","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"author":{"name":"SpatialReal"},"license":"MIT","_id":"@spatialreal/web-sdk@1.0.0-beta.5","maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"homepage":"https://docs.spatialreal.ai","dist":{"shasum":"dfcbc072d1d6162230da9aacc7a7f08abf335c41","tarball":"https://registry.npmjs.org/@spatialreal/web-sdk/-/web-sdk-1.0.0-beta.5.tgz","fileCount":84,"integrity":"sha512-TpLBDFs+48Pfl9GJk+n7WCMbpXrLSTfvldjcy+C5fJqW9Y3T9NM496U1vE+eT/YcqQ7CdHUaz4Nzro0JLdK+5g==","signatures":[{"sig":"MEUCIQCWCpP49EsoXwxEE7CosK/SWPFa8P3DNV9MT0smy1w8PwIgXLBvHAWOwqneisvHfuB2CkujCSIZwCv76s6DSWde/84=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQC5iFASar8ImIWIVJdZp6O+fYFS6GS+Q+3WBZmnloRnZAIgMhKYZwtHouxTOKC+2puRr8Pjhp7Hy+jtoFEPQnZtL6I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8977410},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./next.d.ts","import":"./next.js"},"./vite":{"types":"./vite.d.ts","import":"./vite.js"}},"scripts":{"dev":"vite build --mode library --watch","test":"cd tests && pnpm test","build":"SDK_BUILD=true vite build --mode library && npm run build:vite-plugin && npm run build:next-plugin","clean":"rm -rf dist","test:e2e":"cd tests && pnpm run test:e2e","test:page":"vite --config test-page/vite.config.mjs","test:perf":"cd tests && pnpm run test:perf","typecheck":"tsc --noEmit","test:watch":"cd tests && pnpm run test:watch","check:package":"node tests/package/check-installed-package.mjs","typecheck:sdk":"tsc -p tsconfig.sdk.json","demo:benchmark":"vite --config benchmark-demo/vite.config.mjs","generate:proto":"rm -rf generated && cd proto && buf generate --path driveningress --path cp/v1/sdk_character.proto --path cp/v1/sdk_agent.proto","test:page:build":"vite build --config test-page/vite.config.mjs","test:integration":"vite --config tests/integration-runner/vite.config.mjs","build:next-plugin":"tsc next.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration","build:vite-plugin":"tsc vite.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration"},"_npmUser":{"name":"yueheng-sr","email":"y.han@spatialreal.com"},"_npmVersion":"11.17.0","description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","directories":{},"_nodeVersion":"26.5.0","dependencies":{"nanoid":"^5.1.6","@guiiai/logg":"^1.2.4","ogg-opus-decoder":"1.7.5","@bufbuild/protobuf":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.2","devDependencies":{"tsx":"^4.20.6","vite":"^5.0.0","typescript":"^5.0.0","@types/node":"^20.11.30","@webgpu/types":"^0.1.65","livekit-client":"2.22.3","vite-plugin-dts":"^4.5.4"},"peerDependencies":{"next":">=13.0.0","vite":">=5.0.0","@webgpu/types":"*","livekit-client":">=2.19.0 <3"},"peerDependenciesMeta":{"next":{"optional":true},"vite":{"optional":true},"livekit-client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.0-beta.5_1793740635114_0.8838156850369113","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.6":{"name":"@spatialreal/web-sdk","version":"1.0.0-beta.6","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"author":{"name":"SpatialReal"},"license":"MIT","_id":"@spatialreal/web-sdk@1.0.0-beta.6","maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"homepage":"https://docs.spatialreal.ai","dist":{"shasum":"8970bc9a8a77aca3639bd182bb59d3356d1d4b8e","tarball":"https://registry.npmjs.org/@spatialreal/web-sdk/-/web-sdk-1.0.0-beta.6.tgz","fileCount":112,"integrity":"sha512-pOxUGBYMaCXWLS7k6hnOjwDDZ5mmIDNrpKtNxQ5LgAqDLqBPZYYITzjJ4XzsWlIc79oQ08XTDtsNpC8sJk4eiQ==","signatures":[{"sig":"MEUCIQCVLWesA3rwXfABOiiliGhyYUOCslU1p1ExjXpqzTjnaAIgUIONVMc3A/oTcHh+0HLLUcam6uxtYYhBs2DMPXv+n0k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQD20qCJ4n3j/8SRRrvIAMJX6iDpunY7cpAvn0TCkWAsjwIhAJMIxui8mo7+O0IqHn+wf+mmV1UfmyjmQedgn+q/TwwA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9463692},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./next.d.ts","import":"./next.js"},"./vite":{"types":"./vite.d.ts","import":"./vite.js"}},"scripts":{"dev":"vite build --mode library --watch","test":"cd tests && pnpm test","build":"SDK_BUILD=true vite build --mode library && npm run build:vite-plugin && npm run build:next-plugin","clean":"rm -rf dist","test:e2e":"cd tests && pnpm run test:e2e","test:page":"vite --config test-page/vite.config.mjs","test:perf":"cd tests && pnpm run test:perf","typecheck":"tsc --noEmit","test:watch":"cd tests && pnpm run test:watch","check:package":"node tests/package/check-installed-package.mjs","typecheck:sdk":"tsc -p tsconfig.sdk.json","demo:benchmark":"vite --config benchmark-demo/vite.config.mjs","generate:proto":"rm -rf generated && cd proto && buf generate --path driveningress --path cp/v1/sdk_character.proto --path cp/v1/sdk_agent.proto --path pipecat","test:page:build":"vite build --config test-page/vite.config.mjs","test:integration":"vite --config tests/integration-runner/vite.config.mjs","build:next-plugin":"tsc next.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration","build:vite-plugin":"tsc vite.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration"},"_npmUser":{"name":"yueheng-sr","email":"y.han@spatialreal.com"},"_npmVersion":"11.17.0","description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","directories":{},"_nodeVersion":"26.5.0","dependencies":{"nanoid":"^5.1.6","@guiiai/logg":"^1.2.4","opus-decoder":"0.7.12","ogg-opus-decoder":"1.7.5","@bufbuild/protobuf":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.2","devDependencies":{"tsx":"^4.20.6","vite":"^5.0.0","typescript":"^5.0.0","@types/node":"^20.11.30","@webgpu/types":"^0.1.65","livekit-client":"2.22.3","vite-plugin-dts":"^4.5.4","agora-rtc-sdk-ng":"4.24.9"},"peerDependencies":{"next":">=13.0.0","vite":">=5.0.0","@webgpu/types":"*","livekit-client":">=2.19.0 <3","agora-rtc-sdk-ng":">=4.24.0 <5"},"peerDependenciesMeta":{"next":{"optional":true},"vite":{"optional":true},"livekit-client":{"optional":true},"agora-rtc-sdk-ng":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.0-beta.6_1794266992256_0.699662846344187","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.7":{"name":"@spatialreal/web-sdk","version":"1.0.0-beta.7","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"author":{"name":"SpatialReal"},"license":"MIT","_id":"@spatialreal/web-sdk@1.0.0-beta.7","maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"homepage":"https://docs.spatialreal.ai","dist":{"shasum":"014240e8cde6e9f58ca05c217b098090f7153eb2","tarball":"https://registry.npmjs.org/@spatialreal/web-sdk/-/web-sdk-1.0.0-beta.7.tgz","fileCount":112,"integrity":"sha512-hLDpFzb9juJnOP91YprFU6X6Ys7Z+8vMi3BgModR+mWYBvcCeK+XVv6ZcKAWuciDdNCq7dAfv77tjhVxaMY0SQ==","signatures":[{"sig":"MEQCIEtpoXVf24h5tYzaLC8oK6mKhsBqHl/upKNQTZMyaNUWAiAo5+zLG4qw2rXAUCyBZ9AHoYZ+riSt0mr5lHLukuRDgg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCICSnayMIT8/J0CkG7jkv0FWrBOZIr6yFfmXWM1jJvVyHAiBgFaH0oQder2fHadOWStGUR9r5VrvBPAU9ypH8IjMEnA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9466873},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./next.d.ts","import":"./next.js"},"./vite":{"types":"./vite.d.ts","import":"./vite.js"}},"scripts":{"dev":"vite build --mode library --watch","test":"cd tests && pnpm test","build":"SDK_BUILD=true vite build --mode library && npm run build:vite-plugin && npm run build:next-plugin","clean":"rm -rf dist","test:e2e":"cd tests && pnpm run test:e2e","test:page":"vite --config test-page/vite.config.mjs","test:perf":"cd tests && pnpm run test:perf","typecheck":"tsc --noEmit","test:watch":"cd tests && pnpm run test:watch","check:package":"node tests/package/check-installed-package.mjs","typecheck:sdk":"tsc -p tsconfig.sdk.json","demo:benchmark":"vite --config benchmark-demo/vite.config.mjs","generate:proto":"rm -rf generated && cd proto && buf generate --path driveningress --path cp/v1/sdk_character.proto --path cp/v1/sdk_agent.proto --path pipecat","test:page:build":"vite build --config test-page/vite.config.mjs","test:integration":"vite --config tests/integration-runner/vite.config.mjs","build:next-plugin":"tsc next.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration","build:vite-plugin":"tsc vite.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration"},"_npmUser":{"name":"yueheng-sr","email":"y.han@spatialreal.com"},"_npmVersion":"11.17.0","description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","directories":{},"_nodeVersion":"26.5.0","dependencies":{"nanoid":"^5.1.6","@guiiai/logg":"^1.2.4","opus-decoder":"0.7.12","ogg-opus-decoder":"1.7.5","@bufbuild/protobuf":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.2","devDependencies":{"tsx":"^4.20.6","vite":"^5.0.0","typescript":"^5.0.0","@types/node":"^20.11.30","@webgpu/types":"^0.1.65","livekit-client":"2.22.3","vite-plugin-dts":"^4.5.4","agora-rtc-sdk-ng":"4.24.9"},"peerDependencies":{"next":">=13.0.0","vite":">=5.0.0","@webgpu/types":"*","livekit-client":">=2.19.0 <3","agora-rtc-sdk-ng":">=4.24.0 <5"},"peerDependenciesMeta":{"next":{"optional":true},"vite":{"optional":true},"livekit-client":{"optional":true},"agora-rtc-sdk-ng":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.0-beta.7_1794270454144_0.17706965643898676","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-beta.8":{"_id":"@spatialreal/web-sdk@1.0.0-beta.8","dist":{"shasum":"c8fc85e32b0d573943bdf7e0a74d8b2fe13e0f69","tarball":"https://registry.npmjs.org/@spatialreal/web-sdk/-/web-sdk-1.0.0-beta.8.tgz","fileCount":112,"integrity":"sha512-pNUO5FDyWz7dgLqvrzSUyiIHz4O36hAss73HTfQaxOfF6aJapoXW7WOcppv3ik7QcIpLNq4S1jOGIB4bK9bHkg==","signatures":[{"sig":"MEUCIA245JAMqexGs+ZPG98rUL5ejPo6tri5WME7Lo6mDznWAiEAnM/lq78RQD5Gdo5lFOS38L4gYsvwY4mJLcsbcAjREl8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDJbzczfsODSt+H7HCGt1ynkEr8MEY+g1gCbmG9vxxyWAIgdGdslNJqmA0+6c2M/NBOwf2pJMXaZBdaj6qwtYkzLn0="}],"unpackedSize":9496748},"main":"./dist/index.js","name":"@spatialreal/web-sdk","type":"module","types":"./dist/index.d.ts","author":{"name":"SpatialReal"},"module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./next":{"types":"./next.d.ts","import":"./next.js"},"./vite":{"types":"./vite.d.ts","import":"./vite.js"}},"license":"MIT","scripts":{"dev":"vite build --mode library --watch","test":"cd tests && pnpm test","build":"SDK_BUILD=true vite build --mode library && npm run build:vite-plugin && npm run build:next-plugin","clean":"rm -rf dist","test:e2e":"cd tests && pnpm run test:e2e","test:page":"vite --config test-page/vite.config.mjs","test:perf":"cd tests && pnpm run test:perf","typecheck":"tsc --noEmit","test:watch":"cd tests && pnpm run test:watch","check:package":"node tests/package/check-installed-package.mjs","typecheck:sdk":"tsc -p tsconfig.sdk.json","demo:benchmark":"vite --config benchmark-demo/vite.config.mjs","generate:proto":"rm -rf generated && cd proto && buf generate --path driveningress --path cp/v1/sdk_character.proto --path cp/v1/sdk_agent.proto --path pipecat","test:page:build":"vite build --config test-page/vite.config.mjs","test:integration":"vite --config tests/integration-runner/vite.config.mjs","build:next-plugin":"tsc next.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration","build:vite-plugin":"tsc vite.ts --outDir . --module esnext --target es2020 --moduleResolution bundler --esModuleInterop --skipLibCheck --declaration"},"version":"1.0.0-beta.8","_npmUser":{"name":"yueheng-sr","email":"y.han@spatialreal.com"},"homepage":"https://docs.spatialreal.ai","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"_npmVersion":"11.17.0","description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","directories":{},"maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"_nodeVersion":"26.5.0","dependencies":{"nanoid":"^5.1.6","@guiiai/logg":"^1.2.4","opus-decoder":"0.7.12","ogg-opus-decoder":"1.7.5","@bufbuild/protobuf":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.2","devDependencies":{"tsx":"^4.20.6","vite":"^5.0.0","typescript":"^5.0.0","@types/node":"^20.11.30","@webgpu/types":"^0.1.65","livekit-client":"2.22.3","vite-plugin-dts":"^4.5.4","agora-rtc-sdk-ng":"4.24.9"},"peerDependencies":{"next":">=13.0.0","vite":">=5.0.0","@webgpu/types":"*","livekit-client":">=2.19.0 <3","agora-rtc-sdk-ng":">=4.24.0 <5"},"peerDependenciesMeta":{"next":{"optional":true},"vite":{"optional":true},"livekit-client":{"optional":true},"agora-rtc-sdk-ng":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/web-sdk_1.0.0-beta.8_1794950255279_0.7226899693636033"}}},"time":{"created":"2026-09-30T06:35:32.920Z","modified":"2026-11-17T21:17:35.773Z","1.0.0-beta.1":"2026-09-30T06:35:33.303Z","1.0.0-beta.2":"2026-10-12T22:09:58.796Z","1.0.0-beta.3":"2026-10-16T08:36:05.478Z","1.0.0-beta.4":"2026-11-02T05:15:34.037Z","1.0.0-beta.5":"2026-11-03T21:17:15.323Z","1.0.0-beta.6":"2026-11-09T23:29:52.476Z","1.0.0-beta.7":"2026-11-10T00:27:34.357Z","1.0.0-beta.8":"2026-11-17T21:17:35.562Z"},"author":{"name":"SpatialReal"},"license":"MIT","homepage":"https://docs.spatialreal.ai","keywords":["avatar","3d","gaussian-splatting","webgl","webgpu","wasm"],"description":"SpatialReal Web SDK: real-time talking avatars in the browser (Gaussian-splatting renderer, agent and drive sessions)","maintainers":[{"name":"yueheng-sr","email":"y.han@spatialreal.com"}],"readme":"# SpatialReal Web SDK\n\nReal-time talking avatars in the browser. One `createSession()` call connects to a SpatialReal\nagent or driving service, renders the avatar (WebGPU, WebGL fallback, Gaussian splatting in WASM),\nkeeps audio and animation in sync, and handles the microphone.\n\nFull documentation: **https://docs.spatialreal.ai**\n\n## Installation\n\n```bash\nnpm install @spatialreal/web-sdk\n# LiveKit sessions only:\nnpm install livekit-client\n# Agora sessions only:\nnpm install agora-rtc-sdk-ng\n```\n\nThe package exposes three entry points: `@spatialreal/web-sdk`, `@spatialreal/web-sdk/vite` and\n`@spatialreal/web-sdk/next`. Nothing under `dist/` is importable directly.\n\n`livekit-client` and `agora-rtc-sdk-ng` (>= 4.24) are optional peer dependencies, loaded only by\nLiveKit and Agora sessions respectively. Without them some bundlers (webpack, for one) warn that\nthe module cannot be resolved; the warning is harmless.\n\n## Bundler setup\n\nThe renderer ships as a `.wasm` file that must be served with the `application/wasm` MIME type\nand copied into your build. The plugins do that for you.\n\n**Vite** (`vite.config.ts`):\n\n```typescript\nimport { defineConfig } from 'vite'\nimport { spatialRealVitePlugin } from '@spatialreal/web-sdk/vite'\n\nexport default defineConfig({\n  plugins: [spatialRealVitePlugin()],\n})\n```\n\nThe plugin sets the MIME type on the dev server, copies the WASM into `build.outDir`/`build.assetsDir`,\nwrites a Cloudflare Pages `_headers` file, and configures `optimizeDeps`, `assetsInclude` and\n`assetsInlineLimit`. SSR builds are skipped.\n\n**Next.js** (`next.config.mjs`):\n\n```javascript\nimport { withSpatialReal } from '@spatialreal/web-sdk/next'\n\nexport default withSpatialReal({\n  // ...your existing Next.js config\n})\n```\n\nThe wrapper copies the WASM into `static/chunks/`, fixes its asset path and adds the\n`application/wasm` header; your existing `webpack` and `headers` settings are preserved.\nThe former names `avatarkitVitePlugin` and `withAvatarkit` still work as deprecated aliases.\nManual configuration without the plugins is described on the docs site.\n\n## Quick start\n\n```typescript\nimport { SpatialReal } from '@spatialreal/web-sdk'\n\nconst sr = new SpatialReal({ appId: 'app_xxx' })\nconst container = document.getElementById('avatar')!\n\n// 1. Chat with an agent: microphone in, rendered avatar + voice out.\nconst chat = await sr.createSession({ agentId: 'ua_xxx', credential, container })\nchat.on('transcript', (e) => showLine(e.role, e.text, e.partial))\nchat.on('state', (e) => console.log(e.previous, '->', e.current))\nchat.on('error', (e) => console.error(e.error.code, e.error.message))\nawait chat.start()      // call it from a click / tap: it opens the microphone and the audio output\nchat.sendText('Hello')\nchat.interrupt()\nawait chat.end()\nawait chat.dispose()\n```\n\nPass `container: null` for a voice-only agent session (`VoiceChatSession`, no rendering).\n\n```typescript\n// 2. Drive an avatar with your own audio (the driving service animates it).\nconst avatar = await sr.createSession({\n  avatarId: 'av_xxx',\n  credential,\n  container,\n  audioFormat: { codec: 'pcm16', sampleRate: 16000 }, // or { codec: 'ogg-opus', sampleRate: 48000 }\n})\nawait avatar.start()\navatar.send(pcmChunk, false)          // ArrayBuffer of 16-bit mono PCM (or Ogg Opus pages)\navatar.send(new ArrayBuffer(0), true) // end of the turn\n```\n\n```typescript\n// 3. Host mode: you supply both the audio and the animation frames.\nconst host = await sr.createSession({ avatarId: 'av_xxx', credential, container, drivingServiceMode: 'host' })\nawait host.start()\nhost.yieldAudioData(pcmChunk, false)\nhost.yieldFramesData(frames) // (Uint8Array | ArrayBuffer)[]\n```\n\n```typescript\n// 4. LiveKit room (audio and animation arrive on room tracks; needs livekit-client).\nconst lk = await sr.createSession({ avatarId: 'av_xxx', credential, container, livekit: { url, token } })\nawait lk.start()\n```\n\n```typescript\n// 5. Agora channel (speech and animation arrive from the avatar's uid; needs agora-rtc-sdk-ng).\nconst ag = await sr.createSession({\n  avatarId: 'av_xxx',\n  credential,\n  container,\n  agora: { appId, channel, token, avatarUid: 1001 }, // uid?: this browser's uid, omitted = assigned\n})\nawait ag.start()\n```\n\nThe Agora session joins the channel with its own client, always created as `{ mode: 'live', codec:\n'h264' }` with the `host` role (matching our egress's live-broadcasting profile; the most-verified\ncombination) and with SEI enabled. Do not play the avatar uid's audio yourself: the SDK plays it.\nWith source-audio-enabled egress, speech and mouth poses share the encoder's sample timeline;\nthe SDK waits for the final valid samples to play before ending the turn. Older egress retains\nthe native audio path. The SDK selects one path per publication and never plays both.\nThe viewer automatically detects the source playback profile from the first validated\ncontent packet and keeps that contract for the publication. Current Python SDK/TEN\npublishers default to bounded burst, so ordinary integrations need no playback flags.\nBurst entry uses the actual output clock after source0 audio priming and its real pose\nare accepted. It requires `AudioContext.getOutputTimestamp()`; an unsupported output\nclock, unknown profile or mid-publication profile change fails explicitly before\nincompatible media plays. There is no silent fallback after selection.\nOlder source/native-audio publications remain supported automatically. For a strict\ncompatibility requirement, set `agora.sourcePlaybackProfile: 'legacy'`; to require\nburst even before content arrives, set `'bounded-burst-v1'`. These are optional\nconstraints, not switches required to enable the current mode. Receiver byte,\nsample, carrier and pending-turn bounds remain enforced; detection does not add\nsender flow-control feedback or discover other viewers in the room.\n`ag.client` is that Agora client, for your own data; the SDK never renews the RTC token, so listen\nfor `token-privilege-will-expire` on it and call `client.renewToken(fresh)`. `avatarUid` and `uid`\nare integers in 1..4294967295 (Agora numeric uids; every participant in the channel must use\nnumeric uids). The browser must decode H.264: `start()` fails with `connection-failed` where it\ncannot.\n\n`credential` is the session token issued by your backend for this app; pass a fresh one to\n`start({ credential })` when it expires. `createSession` prepares the avatar (downloads, idle\nrendering); `start()` connects. Every session goes through the same states:\n`idle -> connecting -> live -> ending -> disposed`. `end()` returns it to `idle` and `start()` can be\ncalled again; `dispose()` releases everything.\n\nBrowsers only start audio inside a user gesture. Either call `start()` from the gesture handler, or\ncreate the context in the handler with `createUnlockedAudioContext()` and pass it as\n`createSession({ audioContext })`.\n\n## Sessions at a glance\n\n| Options | Session | Data plane |\n| --- | --- | --- |\n| `agentId`, `container` | `ChatSession` | `sendText()`, `interrupt()`, `mic`, `transcript` / `turn` events |\n| `agentId`, `container: null` | `VoiceChatSession` | same, no rendering |\n| `avatarId`, `container` | `AvatarSession` | `send(audio, end)` |\n| `avatarId`, `drivingServiceMode: 'host'` | `HostAvatarSession` | `yieldAudioData()`, `yieldFramesData()` |\n| `avatarId`, `livekit: { url, token }` | `LiveKitAvatarSession` | tracks from the room, `mic`, `reconnect()` |\n| `avatarId`, `agora: { appId, channel, token, avatarUid }` | `AgoraAvatarSession` | tracks from the channel, `mic`, `reconnect()` |\n| `avatarId`, `pipecat: {}` | `PipecatAvatarSession` | `setBotAudioTrack()`, `handleServerMessage()`, `turn` / `degraded` / `sync` events |\n\nCommon to all: `state`, `on('state' | 'error')`, `volume`, `view` (rendering surface:\n`pauseRendering()` / `resumeRendering()`, `renderStats`, camera settings), `start()`, `end()`,\n`dispose()`.\n\n**Microphone** (chat, LiveKit and Agora sessions): `mic: 'required'` (default; `start()` fails with\n`mic-denied` when refused), `'optional'` (listen-only when refused) or `'manual'` (opened by\n`session.mic.enable()`). `session.mic` exposes `state` (`on` / `muted` / `denied` / `off`),\n`muted`, `enable()`, `disable()` and `use(deviceId)`; `listMicDevices()` and `requestMicAccess()`\nare exported for device pickers and pre-flight prompts. Concurrent mic operations are queued and\nnever leave a capture running after `disable()`, `end()` or `dispose()`.\n\n**Reconnect** (`AvatarSession`): when the connection drops abnormally (close 1006, 1001, 1011,\n4503, or none), the session reconnects by itself after 1, 2, 4 and 8 s (about 15 s in all) and\nstays `live`. `send()` keeps working meanwhile; the audio goes out on the new connection, and the\nlip sync of the turn being played resumes from where it stopped. `on('reconnecting')` gives\n`{ attempt, delayMs, closeCode }` and `on('reconnected')` gives `{ attempts }`. If every attempt\nfails, the session fails as before, with the original `connection-failed`. A close the server\nmeans (`session-ended`, a refused credential, a normal close) is not retried, and `end()` /\n`dispose()` stop a reconnect. Pass `refreshCredential: () => Promise<string>` to\n`createSession()` to supply a fresh token when a reconnect is refused as expired.\n\n**Pipecat** (`PipecatAvatarSession`): for a Pipecat bot that runs the `pipecat-spatialreal`\nprocessor. Your own `pipecat-client-js` connection carries the microphone, the bot's audio track\nand the bot's RTVI server messages; the session joins nothing and opens no connection of its own\n(the credential only authorises the avatar download). Hand it the bot's audio track and forward\nevery server message; it plays the track continuously and overlays the animation on it:\n\n```ts\nconst session = await sr.createSession({ avatarId, credential, container, pipecat: {} })\nconst client = new PipecatClient({\n  transport,\n  callbacks: {\n    onTrackStarted: (track, participant) => {\n      if (!participant?.local && track.kind === 'audio') session.setBotAudioTrack(track)\n    },\n    onServerMessage: (data) => session.handleServerMessage(data), // false: not the avatar's\n  },\n})\nbutton.onclick = async () => {\n  await session.start() // inside the click: starts playback, no network\n  await client.connect(/* … */)\n}\n```\n\nNever attach the bot's audio track to an audible element (or `PipecatClientAudio`): the SDK plays\nit, and a second player would double the voice. The audio is never held for animation; when the\nanimation is late or missing, the avatar holds its pose or stays idle and the voice goes on.\n`on('turn')` gives `{ phase: 'start' | 'end' | 'abort', turnId }`; `on('degraded')` gives\n`{ reason, turnId? }` when the avatar falls back to plain audio (`no-envelope`: speech but no\nanimation messages, e.g. RTVI disabled in the bot or messages not forwarded;\n`processor-degraded`, `turn-degraded`, `anchor-missed`, `frames-invalid`, `frames-stalled`, and\n`sync-lost`: 2 s of the bot's speech that could not be found on the track, the face idles until it\nis found again). When the processor sends envelopes, the animation is aligned by correlating the\ntrack with them; `on('sync')` reports each alignment (`locked`, `held`, `never-locked`) for\ndiagnostics. When the track stalls (no audio reaches the browser), the animation holds and\n`sync` reports `frozen` / `unfrozen`; a freeze longer than about 300 ms fades the face to idle\nuntil the audio is found again. Interruptions come from\nthe bot (`turn` with `phase: 'abort'`); `session.interrupt()` only returns the face to idle. The\nsame page works on Pipecat's Daily and LiveKit transports. A hidden tab stops the animation, not\nthe voice.\n\n**Agent background** (chat sessions): when the agent's owner has set a background image, a session\ncreated with a `container` shows it there, behind the avatar (cover, centred), and takes it away on\n`dispose()`. `session.backgroundUrl` gives the image's URL for an app that lays out its own page;\nit is `undefined` when the agent has none, and always for `container: null`. It is read once, at\n`createSession()`.\n\n## Errors\n\nEvery failure is a `SpatialRealError` with a stable `code`; the class tells you the family.\n\n| `code` | Class | Meaning |\n| --- | --- | --- |\n| `invalid-params` | `InvalidParamsError` | Bad option, unknown device id, wrong argument type |\n| `invalid-state` | `InvalidStateError` | Call not allowed in the current session state |\n| `mic-denied` | `MicPermissionDeniedError` | The user refused the microphone |\n| `mic-unavailable` | `MicUnavailableError` | No device, busy, hardware failure, publish failure (`cause` keeps the browser error) |\n| `credential-invalid`, `credential-expired` | `CredentialError` | The credential was refused: a bad or expired session token, an app id that does not match it, a revoked app |\n| `connection-failed`, `protocol-mismatch` | `ConnectionError` | The connection could not be established or the server closed it; `closeCode` carries the WebSocket close code when there was one (4503 = the service is temporarily unavailable, retry with backoff) |\n| `session-ended` | `SessionEndedError` | The server ended or refused the session; `reason` is a stable code, never prose: `credits_exhausted`, `session_timeout`, `concurrency_limit` on both session kinds, and on agent sessions the server's own code for any other refusal (for example `agent_not_found`, `agent_disabled`, `session_id_used`; `refused` when a refusal carried no code); `closeCode` carries the WebSocket close code when there was one |\n| `resource-load-failed`, `wasm-load-failed` | `ResourceError` | Avatar assets or the renderer could not be loaded |\n| `backpressure` | `BackpressureError` | Audio is fed faster than it can be consumed |\n| `container-in-use` | `ContainerInUseError` | The element already hosts an undisposed session |\n| `cancelled` | `CancelledError` | The operation was superseded by `end()` / `dispose()` / a newer request |\n| `audio-decode-failed` | `AudioDecodeError` | Ogg Opus input could not be decoded |\n\n## Environments and endpoints\n\nEach endpoint is resolved once per session, in this order:\n\n1. `endpoints: { api?, driveningress?, cdn?, agent? }` on the client, used as given (a test\n   backend, local development, a self-hosted deployment); a fully explicit set never touches the\n   network.\n2. The SDK's config service for `environment` (`'us-west'`, the only public deployment today and\n   the default), fetched once per page.\n3. The built-in preset, when the config service is unreachable or silent on that endpoint.\n\nIn unit tests, give `new SpatialReal()` all four `endpoints`: a client without them asks the config\nservice on its first `createSession()`, which is a real network request in jsdom (with a 3 s\ntimeout and a silent fallback, but still a request).\n\n## Logging and debugging\n\nThe SDK logs to the console only, off by default. `new SpatialReal({ appId, logLevel: 'all' })`\nturns it on (`'off'`, `'error'`, `'warning'`, `'all'`), and `SpatialReal.setLogLevel('all')` changes\nit at any time, from the browser console included; the logger is shared by every client on the\npage, so the setting is global. With `'all'` the console also carries the identifiers to quote when\nreporting a problem: the agent session id (`agent session ready: sessionId=…`), the driving\nservice's `connection_id`, the LiveKit room name and sid, and the Agora channel and uids. For the data itself, chat sessions\nemit `rawFrame` (every server frame) and `uiPayload`, and `session.view.renderStats` reports frames\nand the audio clock.\n\n## Browser compatibility\n\n- **Chrome/Edge** 90+ (WebGPU recommended)\n- **Firefox** 90+ (WebGL)\n- **Safari** 14+ (WebGL)\n- **Mobile** iOS 14+, Android 8+\n\n## License\n\nMIT\n","readmeFilename":"README.md"}