{"_id":"@cekura/livekit","name":"@cekura/livekit","dist-tags":{"beta":"1.0.0-rc.1","latest":"1.0.0-rc.1"},"versions":{"1.0.0-rc.1":{"name":"@cekura/livekit","version":"1.0.0-rc.1","description":"Testing and Observability SDK for Livekit Agents","repository":{"type":"git","url":"git+https://github.com/cekura-ai/cekura-js.git"},"homepage":"https://cekura.ai","author":{"name":"Cekura","email":"support@cekura.ai"},"license":"MIT","type":"module","engines":{"node":">=20.0.0"},"main":"./build/cjs/index.js","module":"./build/esm/index.js","types":"./build/types/index.d.ts","exports":{".":{"types":"./build/types/index.d.ts","import":"./build/esm/index.js","require":"./build/cjs/index.js","default":"./build/esm/index.js"},"./livekit":{"types":"./build/types/livekit/index.d.ts","import":"./build/esm/livekit/index.js","require":"./build/cjs/livekit/index.js"},"./package.json":"./package.json"},"scripts":{"build":"npm run clean && npm run build:esm && npm run build:cjs && npm run build:types","build:esm":"tsc --project tsconfig.esm.json","build:cjs":"tsc --project tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > build/cjs/package.json","build:types":"tsc --project tsconfig.types.json","clean":"rm -rf build","test":"vitest run","test:watch":"vitest","lint":"eslint \"src/**/*.ts\"","lint:fix":"eslint \"src/**/*.ts\" --fix","format":"prettier --write \"src/**/*.{ts,json,md}\"","format:check":"prettier --check \"src/**/*.{ts,json,md}\"","prepublishOnly":"npm run build"},"keywords":["observability","ai-agents","livekit","monitoring","tracing","testing","voice-ai"],"peerDependencies":{"@livekit/agents":"^1.2.7","livekit-server-sdk":">=2.0.0"},"peerDependenciesMeta":{"@livekit/agents":{"optional":false},"livekit-server-sdk":{"optional":true}},"devDependencies":{"@livekit/agents":"^1.2.7","@types/node":"^22.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","prettier":"^3.0.0","typescript":"^5.9.0","vitest":"^4.0.0"},"publishConfig":{"access":"public","tag":"beta"},"_id":"@cekura/livekit@1.0.0-rc.1","gitHead":"66b41d3c0e6c04dff5d8282da1cee4b8b7840b8b","bugs":{"url":"https://github.com/cekura-ai/cekura-js/issues"},"_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-GESffjUtmVBihTUa2gVPrMj3Kp/nkhFSLcyM8a2oRtiuMt4n815VYlTT26z+iBki5VfHZRb9tQ+7KuylNazMvg==","shasum":"b4fa04d7df83417fedb0d77461eabd7f446639d0","tarball":"https://registry.npmjs.org/@cekura/livekit/-/livekit-1.0.0-rc.1.tgz","fileCount":28,"unpackedSize":157433,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDu2EQg/OWKJ+xPUCBXq4nXoKvr33gZ6+1JjIA0fcoo1AIgVy9loP3Uk63hXiCa5P6pXVe5Vf+jJgIVZsHiAbG3HPQ="}]},"_npmUser":{"name":"atul_cekura","email":"atul@cekura.ai"},"directories":{},"maintainers":[{"name":"atul_cekura","email":"atul@cekura.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/livekit_1.0.0-rc.1_1777641067519_0.8302093959595247"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-01T13:11:07.417Z","1.0.0-rc.1":"2026-05-01T13:11:07.675Z","modified":"2026-05-01T13:11:07.965Z"},"maintainers":[{"name":"atul_cekura","email":"atul@cekura.ai"}],"description":"Testing and Observability SDK for Livekit Agents","homepage":"https://cekura.ai","keywords":["observability","ai-agents","livekit","monitoring","tracing","testing","voice-ai"],"repository":{"type":"git","url":"git+https://github.com/cekura-ai/cekura-js.git"},"author":{"name":"Cekura","email":"support@cekura.ai"},"bugs":{"url":"https://github.com/cekura-ai/cekura-js/issues"},"license":"MIT","readme":"# Cekura JavaScript/TypeScript SDK\n\n**Testing and Observability for AI Voice Agents. Launch in minutes not weeks by ensuring your agents deliver a seamless experience in every conversational scenario.**\n\n## Installation\n\n```bash\nnpm install @cekura/sdk\n```\n\n## Integrations\n\n### LiveKit\n- One-line integration for simulation and observability\n- Automatic metrics collection (STT, LLM, TTS, EOU)\n- Session logs capture\n- Mock tool injection for testing\n- Dual-channel audio recording\n\n[→ LiveKit Integration Guide](#livekit-integration)\n\n## LiveKit Integration\n\n### Setup\n\n1. Create a new agent in the [Cekura dashboard](https://dashboard.cekura.ai)\n2. Select **LiveKit** as the provider in agent settings\n3. Enable tracing for your agent\n4. Copy your API key and Agent ID\n\n### Quick Start\n\n```typescript\nimport { defineAgent, voice } from '@livekit/agents';\nimport type { JobContext } from '@livekit/agents';\nimport { LiveKitTracer } from '@cekura/sdk';\n\nconst cekura = new LiveKitTracer({\n  apiKey: process.env.CEKURA_API_KEY || '',\n  agentId: parseInt(process.env.CEKURA_AGENT_ID || '0', 10),\n});\n\nexport default defineAgent({\n  entry: async (ctx: JobContext) => {\n    const agent = new YourAssistant();\n    const session = new voice.AgentSession({ /* stt, llm, tts, vad */ });\n\n    // Track session with Cekura for simulation calls (includes mock tool injection)\n    await cekura.trackSession(ctx, session, agent);\n\n    // Send call with audio to Cekura for observability\n    await cekura.observeSession(ctx, session);\n\n    await session.start({ room: ctx.room, agent });\n  },\n});\n```\n\nSee [`examples/appointment-agent/`](examples/appointment-agent/) for a complete working agent.\n\n## Features\n\n- **One-Line Integration**: Simple API for both simulation calls and observability\n- **Automatic Metrics Collection**: Captures STT, LLM, TTS, and End-of-Utterance metrics\n- **Session Logs Capture**: Automatically captures all application logs (INFO level and above) with session context\n- **Automated Chat Mode Support**: Automatically detects and configures text-only mode when running chat-based tests from Cekura\n- **Dual-Channel Audio Recording**: Records production calls with dual audio channel for analysis\n- **Conversation Tracking**: Records complete chat history with tool calls\n- **Mock Tool Injection**: Automatically replaces tools with mock versions configured in Cekura dashboard for simulation calls\n- **Session Reports**: Generates comprehensive session reports from LiveKit\n\n## Automated Chat Mode Support\n\nWhen running chat-based simulation tests from the Cekura platform, the SDK automatically detects chat mode and patches the session to disable audio components.\n\n**What happens automatically:**\n- Disables STT (Speech-to-Text)\n- Disables TTS (Text-to-Speech)\n- Disables VAD (Voice Activity Detection)\n- Disables turn detection\n- Injects text-only input/output options (`audioEnabled: false`)\n\n**No code changes needed** — the SDK detects chat mode from Cekura and handles everything automatically.\n\n## Mock Tools\n\nThe SDK automatically injects mock tools when running tests from the Cekura platform. Mock tools return predefined responses configured in the dashboard.\n\n**Setup:**\n1. Create mock tools in the Cekura dashboard under your agent settings\n2. Define input/output pairs for each tool\n3. When tests run, the SDK automatically replaces matching tools with mocks\n\n## Configuration\n\n### Parameters\n\n- `apiKey` (string, required): Your Cekura API key\n- `agentId` (number, required): Unique identifier for your agent from Cekura dashboard\n- `host` (string, optional): API host URL (default: `https://api.cekura.ai`)\n- `enabled` (boolean, optional): Enable/disable tracer. Defaults to `true` if not set\n\n### Environment Variables\n\n- `CEKURA_TRACING_ENABLED` (default: `\"true\"`): Enable/disable `trackSession()` for simulation calls\n- `CEKURA_OBSERVABILITY_ENABLED` (default: `\"true\"`): Enable/disable `observeSession()` for production call recording\n- `CEKURA_MOCK_TOOLS_ENABLED` (default: `\"true\"`): Enable/disable mock tool injection\n\n## Data Collected\n\nThe SDK automatically collects:\n\n- Session start/end timestamps\n- Complete conversation transcripts\n- Tool/function calls and outputs\n- Session logs (INFO level and above)\n- Dual-channel audio recording for production calls\n- Performance metrics:\n  - Speech-to-Text (STT) latency and duration\n  - LLM token usage and timing\n  - Text-to-Speech (TTS) generation time\n  - End-of-Utterance detection timing\n- Room and job information\n- Custom metadata\n\n## Requirements\n\n- Node.js >= 20\n- `@livekit/agents` >= 1.2.7\n- `livekit-server-sdk` >= 2.0.0 (peer dependency, required for audio recording)\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Links\n\n- [Homepage](https://cekura.ai)\n- [Documentation](https://docs.cekura.ai)\n- [Dashboard](https://dashboard.cekura.ai)\n\n## Support\n\nFor support, email support@cekura.ai\n","readmeFilename":"README.md","_rev":"1-0eddfd2b9890e140af70e8d5063deef7"}