{"_id":"@aywa-ai/runtime-sdk","name":"@aywa-ai/runtime-sdk","dist-tags":{"next":"0.1.0","latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aywa-ai/runtime-sdk","version":"0.1.0","description":"Server-side SDK for the AYWA Voice Runtime public API.","type":"module","author":{"name":"Aywa Runtime","email":"admin@aywaruntime.com"},"main":"./dist/index.js","types":"./dist/index.d.ts","sideEffects":false,"homepage":"https://aywaruntime.com","bugs":{"email":"admin@aywaruntime.com"},"keywords":["aywa","runtime","voice","sdk","server","webhooks","tools"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"npx -y -p typescript@5.6.3 tsc -p tsconfig.json","test":"npm run build && node test/runtime-sdk.test.mjs","prepack":"npm run build"},"engines":{"node":">=20"},"license":"Apache-2.0","publishConfig":{"access":"public"},"_id":"@aywa-ai/runtime-sdk@0.1.0","gitHead":"3e960d6d5e02d11ab3a888ddcf6e3f3a2033fc4a","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-CCWaZx6DL51cUAARLhN379UETh+WQlwVE9DFB7f2SlyZ2B/ZmkJsiIVjZYIiZ28lxr1f8H9Uh3qbnNjQtN3GgA==","shasum":"486226621125248aa79918c669df4f424ff08d65","tarball":"https://registry.npmjs.org/@aywa-ai/runtime-sdk/-/runtime-sdk-0.1.0.tgz","fileCount":8,"unpackedSize":53503,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDL50k7ZbZpVUZfxoI/r69BUypjn1rjs13Wiu8Oe8OvPAiEAxstmuV73wkQA4PNDMC2odPSDt8Y0hoWduzoYFo+Homc="}]},"_npmUser":{"name":"aywaruntime","email":"admin@aywaruntime.com"},"directories":{},"maintainers":[{"name":"aywaruntime","email":"admin@aywaruntime.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/runtime-sdk_0.1.0_1782306932125_0.12913588684026567"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T13:15:31.845Z","0.1.0":"2026-06-24T13:15:32.313Z","modified":"2026-06-24T13:15:32.569Z"},"maintainers":[{"name":"aywaruntime","email":"admin@aywaruntime.com"}],"description":"Server-side SDK for the AYWA Voice Runtime public API.","homepage":"https://aywaruntime.com","keywords":["aywa","runtime","voice","sdk","server","webhooks","tools"],"author":{"name":"Aywa Runtime","email":"admin@aywaruntime.com"},"bugs":{"email":"admin@aywaruntime.com"},"license":"Apache-2.0","readme":"# AYWA Runtime SDK\n\nServer-side SDK for the AYWA Voice Runtime public API.\n\nThis package targets a single AYWA Voice Runtime API endpoint, not `app.aywaruntime.com` and not any AYWA SaaS/control-plane API. A runtime can be AYWA-hosted or self-hosted, so `baseUrl` is always required.\n\nFor V1 self-service, the public path is intentionally simple: one commercial runtime license activates one runtime endpoint and this SDK talks directly to that endpoint. `app.aywaruntime.com` is used for license, install, billing, and status workflows; it is not the SDK `baseUrl` and it is not in the call/data path. Multi-runtime routing, HA, and load balancing are Enterprise/custom deployments managed with AYWA.\n\n```sh\nnpm install @aywa-ai/runtime-sdk\n```\n\n```ts\nimport { AywaRuntimeClient, createIdempotencyKey } from '@aywa-ai/runtime-sdk';\n\nconst runtime = new AywaRuntimeClient({\n  apiKey: process.env.AYWA_RUNTIME_API_KEY!,\n  baseUrl: 'https://runtimevoice.aywa.ai',\n  organizationId: 'org_...',\n});\n\nconst call = await runtime.calls.createPhone({\n  assistantId: 'asst_...',\n  phoneNumberId: 'pn_...',\n  customer: { number: '+33611111111', name: 'Ada' },\n}, {\n  idempotencyKey: createIdempotencyKey('call'),\n});\n```\n\nSelf-hosted runtimes must pass their own domain:\n\n```ts\nconst runtime = new AywaRuntimeClient({\n  apiKey: process.env.AYWA_RUNTIME_API_KEY!,\n  baseUrl: 'https://aircallruntime.example.com',\n});\n```\n\nThe SDK does not default to `runtimevoice.aywa.ai` or `app.aywaruntime.com`; missing `baseUrl` throws `base_url_required`.\n\n## Licensing\n\nThe SDK is distributed under the Apache License 2.0. The AYWA Runtime, containers, dashboard, and control plane remain proprietary AYWA Runtime software. Installing, copying, or modifying this SDK does not grant any right to run AYWA Runtime without a valid commercial runtime license.\n\nRuntime usage rights are attached to a Runtime Slot license, not to the SDK package.\n\nIncluded helpers:\n\n- `calls.create`, `calls.createPhone`, `calls.createWeb`, `calls.get`, `calls.list`, `calls.end`\n- `assistants`, `phoneNumbers`, `tools`, `webhookEndpoints`, and admin `apiKeys` CRUD\n- normalized `RuntimeSdkError`\n- `createIdempotencyKey`\n- `createAywaWebhookSignature` and `verifyAywaWebhookSignature`\n- `extractToolCalls` and `createToolCallResults`\n\nRuntime behavior:\n\n- The SDK sends `Authorization: Bearer <apiKey>` and optional `x-organization-id`.\n- Call creation helpers require an explicit idempotency key to avoid duplicate calls on retries.\n- Non-2xx responses are normalized into `RuntimeSdkError`.\n- Tool execution is runtime server-url/tool-call traffic; this SDK manages tool definitions and helps format tool-call results.\n","readmeFilename":"README.md","_rev":"1-3252a295cd9fd3235ddb03689f648e9f"}