{"_id":"@benvargas/bb-plugin-xai-voice","_rev":"2-b2a0f23cea517080fc8cec08672e09ca","name":"@benvargas/bb-plugin-xai-voice","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@benvargas/bb-plugin-xai-voice","version":"0.1.0","license":"MIT","_id":"@benvargas/bb-plugin-xai-voice@0.1.0","maintainers":[{"name":"benvargas","email":"ben@vargas.com"}],"homepage":"https://github.com/ben-vargas/bb-plugins#readme","bugs":{"url":"https://github.com/ben-vargas/bb-plugins/issues"},"bb":{"host":"./host.ts","name":"xAI Voice","server":"./server.ts","skills":[],"branding":{"icon":"./icons/xai-voice.svg"},"description":"Voice transcription (speech-to-text) served by xAI's Grok STT, using an xAI API key or your Grok sign-in."},"dist":{"shasum":"337ad0d188f49b20c680983d514421c269a0b813","tarball":"https://registry.npmjs.org/@benvargas/bb-plugin-xai-voice/-/bb-plugin-xai-voice-0.1.0.tgz","fileCount":15,"integrity":"sha512-4EF+3QcIJgWDUBRcKYDoD1ZyDu1Cn2IKn3xwO7RXEUbwxUMNqxr86XodkBS/OgxIxN8CggPFc/IAmP/JHabw8g==","signatures":[{"sig":"MEUCICFf68KwEuMeBovrmSy5klmfpsqZgzKOCSYnwxGtvNEaAiEA2Yp3Lzt87ikSrZxMUxc42OG7gXmqPtiG8M/BVHpxVkA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3010122},"type":"module","engines":{"bb":">=0.40","bbPluginSdk":">=0.4.16"},"gitHead":"09e3a700c87acb4a2660e5ac96fc08cf427d266b","scripts":{"test":"vitest run","build":"bb plugin build","check":"tsc --noEmit"},"_npmUser":{"name":"benvargas","email":"ben@vargas.com"},"repository":{"url":"git+https://github.com/ben-vargas/bb-plugins.git","type":"git","directory":"plugins/xai-voice"},"_npmVersion":"11.8.0","description":"Voice transcription (speech-to-text) for bb, served by xAI's Grok STT (`https://api.x.ai/v1/stt`). Registers the `xai-voice` AI service so bb's prompt-box dictation can run on xAI instead of OpenAI or Codex.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"@get-bb/plugin-sdk":"0.4.16"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11","typescript":"^5.7.0","@types/node":"^22.0.0","cron-parser":"^5.10.0","better-sqlite3":"^12.10.0","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/bb-plugin-xai-voice_0.1.0_1787731011097_0.5910402642526784","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"bb":{"host":"./host.ts","name":"xAI Voice","server":"./server.ts","skills":[],"branding":{"icon":"./icons/xai-voice.svg"},"description":"Voice transcription (speech-to-text) served by xAI's Grok STT, using an xAI API key or your Grok sign-in."},"_id":"@benvargas/bb-plugin-xai-voice@0.2.0","bugs":{"url":"https://github.com/ben-vargas/bb-plugins/issues"},"dist":{"shasum":"6cee37f995e364aec0a7dc0b7929bbff0abab696","tarball":"https://registry.npmjs.org/@benvargas/bb-plugin-xai-voice/-/bb-plugin-xai-voice-0.2.0.tgz","fileCount":17,"integrity":"sha512-72olvzqgpvtYiiqm5eiU8FgLl+n2BJFjZoFv33GmSjO29PPWcoXEl7ncv38hitGOQAw0xGiJSWlJR9WXvmhAIA==","signatures":[{"sig":"MEUCIQDDlLcgd6e5JoHaFcTJy5cVzm2sW22xM7pHv6hgiNmY7QIgUeUn+qe1N3iuEYa/RHGIplyEJJN03MCK+nVPgiRG1cQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDnYyc/6o/nBgqMmjNX/WKlojVSurSzX4VKvTXOac9SFAIgQFQ2IohFNSsW7I8VI+0Dv0ap3GTmS/RxPW7ObEPrPxo="}],"unpackedSize":804299},"name":"@benvargas/bb-plugin-xai-voice","type":"module","engines":{"bb":">=0.44","bbPluginSdk":">=0.5.23"},"gitHead":"379ad8a91527a4406c122f0c077f6d51589a20f6","license":"MIT","scripts":{"test":"vitest run","build":"bb plugin build","check":"tsc --noEmit"},"version":"0.2.0","_npmUser":{"name":"benvargas","email":"ben@vargas.com"},"homepage":"https://github.com/ben-vargas/bb-plugins#readme","repository":{"url":"git+https://github.com/ben-vargas/bb-plugins.git","type":"git","directory":"plugins/xai-voice"},"_npmVersion":"11.19.0","description":"Voice transcription (speech-to-text) for bb, served by xAI's Grok STT (`https://api.x.ai/v1/stt`). Registers the `xai-voice` AI service so bb's prompt-box dictation can run on xAI instead of Codex.","directories":{},"maintainers":[{"name":"benvargas","email":"ben@vargas.com"}],"_nodeVersion":"24.20.0","dependencies":{"zod":"^4.3.6","@get-bb/plugin-sdk":"0.5.29"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11","typescript":"^5.7.0","@types/node":"^22.0.0","cron-parser":"^5.10.0","better-sqlite3":"^12.10.0","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bb-plugin-xai-voice_0.2.0_1790577834406_0.455988637737617"}}},"time":{"created":"2026-08-26T07:56:50.768Z","modified":"2026-09-28T06:43:54.783Z","0.1.0":"2026-08-26T07:56:51.258Z","0.2.0":"2026-09-28T06:43:54.547Z"},"bugs":{"url":"https://github.com/ben-vargas/bb-plugins/issues"},"license":"MIT","homepage":"https://github.com/ben-vargas/bb-plugins#readme","repository":{"url":"git+https://github.com/ben-vargas/bb-plugins.git","type":"git","directory":"plugins/xai-voice"},"description":"Voice transcription (speech-to-text) for bb, served by xAI's Grok STT (`https://api.x.ai/v1/stt`). Registers the `xai-voice` AI service so bb's prompt-box dictation can run on xAI instead of Codex.","maintainers":[{"name":"benvargas","email":"ben@vargas.com"}],"readme":"# bb-plugin-xai-voice\n\nVoice transcription (speech-to-text) for bb, served by xAI's Grok STT\n(`https://api.x.ai/v1/stt`). Registers the `xai-voice` AI service so bb's\nprompt-box dictation can run on xAI instead of Codex.\n\n## Requirements\n\n- bb 0.44 or newer (plugin SDK >= 0.5.23, where AI services became plain\n  `transcribe`/`complete` functions picked per task). bb 0.40–0.43 used an\n  older host-contract API; use xai-voice 0.1.x there.\n- Credentials on the primary machine (where bb's host daemon runs), either of:\n  - **xAI API key** — `XAI_API_KEY` in the host daemon's environment.\n  - **Grok sign-in (OAuth)** — a Grok Build CLI session in its auth store\n    (`GROK_AUTH_PATH`, else `$GROK_HOME/auth.json`, else\n    `~/.grok/auth.json`; run `grok` once to sign in). The plugin treats\n    that store as strictly read-only: when the ~6h access token has\n    expired it runs `grok sessions list -n 1` — whose first act is the\n    CLI's own unconditional non-interactive refresh\n    (`try_ensure_fresh_auth`: cross-process lock, refresh-token rotation,\n    atomic persist) — then re-reads the store. The spawned CLI is never\n    killed; a transcription that runs out of bb's 10-second budget while a\n    refresh is in flight fails, and the next dictation reads the refreshed\n    session. The `grok` binary must be on the host\n    daemon's PATH for OAuth.\n\nWhen both are present the API key wins.\n\n## Setup\n\n```sh\n# from GitHub, tracking compatible releases:\nbb plugin install \\\n  git:https://github.com/ben-vargas/bb-plugins.git@semver:^0.2.0 \\\n  --plugin xai-voice \\\n  --tag-prefix xai-voice/\n\n# or from a local checkout of this repository:\nbb plugin install path:. --plugin xai-voice\n\nbb settings ai-services set voice xai-voice\n```\n\nOr pick **xAI (API key or Grok sign-in)** for Voice in Settings → AI services.\nThe picker shows the service as not ready (and bb hides the microphone) when\nthe primary machine has neither `XAI_API_KEY` nor a Grok session. A picked\nservice is used alone: bb does not fall back to another service when it\nfails. xAI exposes no STT model choice, and bb's vocabulary hint is not sent.\n\n## Configuration\n\n| Knob | Where | Meaning |\n| --- | --- | --- |\n| `XAI_API_KEY` | host daemon env | API-key auth; takes precedence over OAuth. |\n| `XAI_STT_URL` | host daemon env | Full override of the STT endpoint (default `https://api.x.ai/v1/stt`), for proxies. |\n\n## Notes\n\n- OAuth usage is attributed to your Grok subscription account; API-key usage\n  bills the xAI console account.\n- bb records dictation as `audio/webm` (Opus) in Chromium and the desktop\n  app; xAI STT accepts it (verified live), along with the documented WAV,\n  MP3, OGG, MP4/M4A, and friends — no transcoding happens.\n- The Grok CLI is spawned only when the picked session is locally\n  expired; concurrent expired-token transcriptions share one spawn. On a\n  401 with an OAuth bearer the plugin never spawns the CLI — it retries\n  once with the best *other* unexpired entry in the store (the\n  wrong-scope case) and otherwise reports that you need to run `grok` to\n  sign in again. A 403 never retries.\n- The plugin never writes the Grok auth store — refresh, locking, and\n  refresh-token rotation stay entirely inside the Grok CLI.\n\n## Releasing\n\nBuild the published `dist/` artifacts with a bb whose SDK matches\n`engines.bbPluginSdk` (>= 0.5.23, i.e. bb 0.44 or newer) so\n`dist/*.meta.json` records a matching `builtWith`; artifacts built by an\nolder bb carry stale metadata and must not be packed or tagged.\n","readmeFilename":"README.md"}