diff --git a/python/frameworks/elevenlabs-agents/CHANGELOG.md b/python/frameworks/elevenlabs-agents/CHANGELOG.md new file mode 100644 index 000000000..4593c1d53 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/CHANGELOG.md @@ -0,0 +1,21 @@ +## [0.1.0] - unreleased +### Feature +- ElevenLabs Agents post-call OpenTelemetry forwarder: HMAC-verified `post_call_transcription_otel` + webhook receiver, Voice-tab mapping (`fi.span.kind=CONVERSATION` root, `call.duration`, + `call.total_turns`, LLM model and tokens, tool spans, transcript), per-conversation + idempotency record, and a one-shot `backfill` command for `GET ?format=opentelemetry`. +- Content on by default, like every traceAI instrumentor; the standard `FI_HIDE_INPUTS` / + `FI_HIDE_OUTPUTS` (and the `*_MESSAGES` / `*_TEXT` variants) or `TraceConfig(...)` drop it, + and `FI_PII_REDACTION` works as elsewhere. No package-specific privacy switch. +- Never exported in any mode: resource attributes outside an allowlist (no host, process or + OS details), environment and identity span attributes, stack traces, and emails, local + paths and private host names in metadata and error text. +### Fixed +- A live webhook body carries the caller id only as the root span attribute `elevenlabs.user_id` + (there is no `data.user_id`), so `user.id` was missing on webhook deliveries. The root attribute is + now used when `data.user_id` is absent. +### Verified +- 2026-10-19: live `post_call_transcription_otel` webhook deliveries (HMAC, ok / abrupt disconnect / + 2-minute timeout / with user id). Captured bodies added as sanitized fixtures. +- `backfill` run against the live ElevenLabs API (2026-10-17); attribute names matched. Added a + sanitized captured body as a test fixture. diff --git a/python/frameworks/elevenlabs-agents/README.md b/python/frameworks/elevenlabs-agents/README.md new file mode 100644 index 000000000..cdadba9f9 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/README.md @@ -0,0 +1,189 @@ +# traceAI-elevenlabs-agents + +Forward finished [ElevenLabs Agents](https://elevenlabs.io/agents) conversations to +Future AGI Observe. Each conversation becomes one trace and one row in the Voice tab, +with its transcript, turns, tool calls, and the LLM model and token counts ElevenLabs +reports. Content follows the standard traceAI `FI_HIDE_*` switches. + +ElevenLabs runs the agent, so there is nothing to instrument. After a call ends and +analysis completes, ElevenLabs POSTs an OpenTelemetry JSON trace to a webhook URL you +host. This package is that webhook: it runs in your environment, checks the +`ElevenLabs-Signature` header, maps the trace onto Future AGI's attribute names and +exports it to Future AGI with your own keys. Future AGI never sees your ElevenLabs +signing secret. + +Status: alpha. The `backfill` path (the `GET ...?format=opentelemetry` export) was verified +on 2026-10-17 against a live ElevenLabs workspace and a local Future AGI. Webhook delivery +was verified on 2026-10-19: a real ElevenLabs workspace POSTed signed +`post_call_transcription_otel` deliveries to this forwarder on Cloud Run, and the traces +were stored in Future AGI cloud. Not seen live: ElevenLabs retries, a duplicate delivery, +a span with status ERROR, and a call longer than 2 minutes. + +## Install + +```bash +pip install traceAI-elevenlabs-agents +``` + +Python 3.10 to 3.13. One runtime dependency, `fi-instrumentation-otel`, for +`TraceConfig` (the privacy switch every traceAI package shares). No ElevenLabs SDK. + +## Run + +```bash +export ELEVENLABS_WEBHOOK_SECRET="..." # the secret ElevenLabs shows when you create the workspace webhook +export FI_API_KEY="..." +export FI_SECRET_KEY="..." +export FI_PROJECT_NAME="elevenlabs-calls" +traceai-elevenlabs-agents --host 0.0.0.0 --port 8787 +``` + +The webhook path is `/elevenlabs/webhook` (`--path` to change it); `GET /healthz` +answers 200. Put HTTPS in front of it (your ingress or a reverse proxy) and register +`https:///elevenlabs/webhook` in ElevenLabs: + +1. ElevenAgents dashboard: create a workspace webhook with that URL (HMAC authentication). +2. [Agents settings](https://elevenlabs.io/app/agents/settings): assign it as the + post-call webhook, enable the **Transcript** event and **OpenTelemetry transcript + payloads** (`transcript_format: opentelemetry`). Turn on **Enable retries** so + ElevenLabs retries 5xx responses. + +| Variable | Default | Meaning | +|---|---|---| +| `ELEVENLABS_WEBHOOK_SECRET` | required for `serve` | HMAC secret of the workspace webhook | +| `FI_API_KEY`, `FI_SECRET_KEY` | required | Future AGI keys | +| `FI_PROJECT_NAME` | required | Observe project; created on first export if it does not exist. A payload cannot choose another project | +| `FI_BASE_URL` | `https://api.futureagi.com` | Future AGI base URL; traces go to `{FI_BASE_URL}/tracer/v1/traces` | +| `FI_HIDE_INPUTS`, `FI_HIDE_OUTPUTS`, `FI_HIDE_INPUT_MESSAGES`, `FI_HIDE_OUTPUT_MESSAGES`, `FI_HIDE_INPUT_TEXT`, `FI_HIDE_OUTPUT_TEXT` | `false` | The standard traceAI switches; see [Privacy](#privacy) | +| `FI_PII_REDACTION` | `false` | The standard traceAI switch: replace emails, phone numbers, card numbers ... inside the exported content | +| `FI_ELEVENLABS_STATE_PATH` | `~/.traceai-elevenlabs-agents/forwarded.sqlite3` | Idempotency record (one row per forwarded conversation). Keep it on a persistent volume | +| `FI_ELEVENLABS_SIGNATURE_TOLERANCE_SECS` | `1800` | Replay window, the 30 minutes the ElevenLabs SDK uses | +| `FI_ELEVENLABS_PAUSED` | off | `true` answers 503 to every delivery (ElevenLabs retries later) | +| `ELEVENLABS_API_KEY` | only for `backfill` | API key with `CONVAI_READ` | +| `FI_ELEVENLABS_API_BASE_URL` | `https://api.elevenlabs.io` | ElevenLabs API host for `backfill` (for example a data-residency host) | + +### Backfill one conversation + +```bash +ELEVENLABS_API_KEY=... traceai-elevenlabs-agents backfill --conversation-id conv_... +``` + +Calls `GET /v1/convai/conversations/{id}?format=opentelemetry` once and forwards the +result through the same mapper. A conversation the webhook already forwarded is +acknowledged as `duplicate` and not exported again: ElevenLabs keeps the trace id but +mints new span ids on every export, so a second export would duplicate every turn and +tool span. `--force` exports anyway; use it only when the first export never landed. + +## Responses + +| Delivery | HTTP | Stored | +|---|---|---| +| Missing, malformed, stale or wrong signature | 401 | nothing; the body is not parsed | +| Declared body over 20 MiB | 413 | nothing; the body is not read | +| `post_call_transcription`, `post_call_audio`, `call_initiation_failure` | 200 `ignored` | nothing | +| No `resourceSpans`, no conversation id, malformed span ids | 400 + code | nothing | +| Conversation already forwarded (retry) | 200 `duplicate` | nothing | +| Same conversation being exported by another worker | 503 | nothing | +| Future AGI unreachable or refused the batch | 502 | nothing; ElevenLabs may retry | +| Accepted | 200 `forwarded` | one trace | + +The 2xx is sent only after Future AGI accepted the batch. + +## What is captured + +Kept as ElevenLabs sent it: trace id, span ids, parent ids, span names (unknown names +pass through), timestamps, status codes. + +| Span | Added attributes | +|---|---| +| `elevenlabs.conversation` (root) | `fi.span.kind=CONVERSATION`, `gen_ai.system=elevenlabs`, `session.id` (conversation id), `call.duration` (root span seconds, else `time_in_call_secs`), `call.total_turns` (user + agent turn spans), `elevenlabs.agent_id`, `elevenlabs.source`, `elevenlabs.cost_fiat` (total ElevenLabs cost incl. TTS/ASR, not LLM cost) | +| `elevenlabs.recv.agent_response` with `elevenlabs.producing_llm` | `fi.span.kind=LLM`, `gen_ai.request.model`, `gen_ai.usage.input_tokens` / `output_tokens` from `elevenlabs.llm_usage..input` / `.output_total` | +| other agent and user turns | `fi.span.kind=CHAIN` | +| `elevenlabs.tool.{name}` | `fi.span.kind=TOOL`, `tool.name` | +| every span | `session.id` | + +The conversation content, captured by default like every traceAI instrumentor: +`conversation.transcript` and `fi.conversation.transcript` (the same JSON list of +`{role, content, time}` turns), `conversation.transcript.{i}.message.role` / `.content`, +`input.value` / `output.value` on the root (first user turn, last agent turn), on turns +(an LLM turn's input is the user turn before it) and on tools (from +`elevenlabs.tool.params` / `elevenlabs.tool.result`), `user.id` when ElevenLabs supplies +one, the other `elevenlabs.*` attributes ElevenLabs sent, status messages and +exception messages. + +## Privacy + +Content follows `fi_instrumentation.TraceConfig`, the switch every traceAI instrumentor +uses, read from the standard environment variables at startup (or pass +`ForwarderConfig(..., trace_config=TraceConfig(...))`). There is no package-specific +privacy setting. + +| Switch | Drops | +|---|---| +| `FI_HIDE_INPUTS`, `FI_HIDE_INPUT_MESSAGES` or `FI_HIDE_INPUT_TEXT` = `true` | What goes in: user turn text, tool arguments, RAG queries, dynamic variables, `user.id`, every `input.value` | +| `FI_HIDE_OUTPUTS`, `FI_HIDE_OUTPUT_MESSAGES` or `FI_HIDE_OUTPUT_TEXT` = `true` | What comes out: agent turn text, tool results, reasoning, analysis and data-collection results, status and exception messages, every `output.value` | +| either side | The combined transcript, and any attribute that cannot be placed on one side (for example `elevenlabs.event.data`) | +| `FI_PII_REDACTION=true` | Emails, phone numbers, card numbers, IP addresses ... inside what is still exported | + +In a conversation the turns are the messages, so the `*_MESSAGES` and `*_TEXT` +variants hide a side the same way `FI_HIDE_INPUTS` / `FI_HIDE_OUTPUTS` do. With all of +them on, only identifiers, timings, counts, status codes, model names and token numbers +are exported, and the call is still listed in the Voice tab with its duration and turns. + +Never exported, whatever the switches say: + +- resource attributes outside an allowlist (`service.*`, `deployment.environment`, + `telemetry.sdk.*`, the ElevenLabs conversation id, agent id, environment and source): + no `host.*`, `process.*`, `os.*` or anything else about the machine; +- span attributes under `host.`, `process.`, `os.`, `user.`, `enduser.`, `code.`, + `client.`, `cloud.`, `container.`, `k8s.`, stack-trace keys and credential-named keys; +- stack traces: error text is cut to one line (the exception line of a traceback), and + a stack trace inside a tool result is cut the same way; +- email addresses, local file paths and private host names (`*.local`, `*.internal`, + `*.lan` ...) in metadata (dynamic variables, analysis results, unknown attributes, + status and exception messages): replaced with ``, ``, + ``; a `user.id` that contains one is not written; +- signed media URLs (they expire in about 15 minutes; no recordings are stored) and + any `project_name` / `fi.*` resource attribute in the payload; +- the ElevenLabs signing secret, the `ElevenLabs-Signature` header, the ElevenLabs API + key and the Future AGI keys: never on a span, in a response or in a log line. Log + lines carry the conversation id and the outcome only. + +What a caller says is conversation content: an email address spoken in a turn stays in +the transcript unless you set `FI_PII_REDACTION=true` or hide that side. + +## Not captured + +- `call.talk_ratio` and per-turn audio durations: the OpenTelemetry payload has no + per-side audio durations, so they are omitted rather than guessed. +- Recordings (`post_call_audio`), the monitoring WebSocket (Enterprise-gated, a + different span shape), TTS-only API calls, RAG chunk text (not in the trace). +- A live in-progress view: a conversation appears after ElevenLabs finishes analysis. + +## What was tested + +- Unit and contract tests (`pytest tests`): 112 tests on Python 3.10, 3.12 and 3.13 with + `fi-instrumentation-otel` 1.1.0 (latest), and on 0.1.11 (the lowest allowed; the + `FI_PII_REDACTION` test is skipped there because that release has no such switch). The + HMAC check is tested against a hand-computed HMAC-SHA256 and against the real + `elevenlabs` SDK `construct_event` (2.73.0, the latest stable on 2026-10-15, and + 2.70.0). +- `examples/run_e2e.sh`: the real `traceai-elevenlabs-agents` process against a local + Future AGI collector, with ElevenLabs stood in by `examples/standin.py` (docs-shaped + deliveries signed with a local secret; a GET endpoint the real SDK client parses). + The webhook leg was also run live on 2026-10-19 (see Live below); this stand-in is for the failure cases a live workspace does not produce. +- Live, 2026-10-17: a throwaway agent and three short text-only SDK conversations + (`elevenlabs` 2.73.0), exported with `backfill` against the real ElevenLabs API into a + local Future AGI (`fi_verify` PASS, privacy scan clean with `FI_HIDE_*` on). The real + attribute names matched. ElevenLabs sent status OK for failing tool calls (404, an + unanswered client tool), so no live ERROR span was produced; the ERROR mapping is + covered by fixtures only. `tests/fixtures/live_get_conversation_opentelemetry.json` is + one sanitized captured body, used by `tests/test_live_capture.py`. +- The other fixtures follow the documented payload and the attribute names in the Langfuse + ElevenLabs cookbook (see `tests/fixtures/README.md`). + +## Sources (re-read 2026-10-15) + +- https://elevenlabs.io/docs/eleven-agents/customization/opentelemetry-traces +- https://elevenlabs.io/docs/eleven-agents/workflows/post-call-webhooks +- https://langfuse.com/integrations/no-code/elevenlabs (attribute names, "fresh span ids on every export") diff --git a/python/frameworks/elevenlabs-agents/examples/README.md b/python/frameworks/elevenlabs-agents/examples/README.md new file mode 100644 index 000000000..025914d5e --- /dev/null +++ b/python/frameworks/elevenlabs-agents/examples/README.md @@ -0,0 +1,31 @@ +# End-to-end run (ElevenLabs stood in) + +`run_e2e.sh` starts the real `traceai-elevenlabs-agents` process, configured only with the +environment variables from the package README, and drives it with `standin.py`, a local +**stand-in for ElevenLabs**: deliveries built from the docs-shaped fixtures in +`tests/fixtures/`, signed exactly as documented with a throwaway secret, and a +`GET /v1/convai/conversations/{id}?format=opentelemetry` endpoint. No ElevenLabs account +is used and nothing here is a live ElevenLabs session. The webhook leg stays a stand-in; +the `backfill` command was separately run against the live ElevenLabs API on 2026-10-17 (see +the package README, "What was tested"). + +```bash +pip install -e .. # or: pip install traceAI-elevenlabs-agents +pip install elevenlabs # optional: cross-checks signatures and the GET body with the real SDK +export FI_API_KEY=... FI_SECRET_KEY=... FI_BASE_URL=http://localhost:14338 # or your Future AGI +./run_e2e.sh my-elevenlabs-project ./out +``` + +It runs twice: with the traceAI defaults (content captured) into ``, then with +`FI_HIDE_INPUTS`, `FI_HIDE_OUTPUTS`, `FI_HIDE_INPUT_MESSAGES` and `FI_HIDE_OUTPUT_MESSAGES` +set to `true` into `-hidden`. +Steps: one conversation with a tool call and two LLM turns, the same delivery again +(must be `duplicate`), an abnormal-disconnect conversation (root ERROR, failing tool), +wrong / stale / missing / mutated signatures (401), the three other webhook types +(200 ignored), a payload without `resourceSpans` (400), a backfill of the delivered +conversation (`duplicate`) and of a GET-only conversation (`forwarded`), and a second +forwarder whose collector is down (502). The report (`out/e2e-report.json`) lists every +status, the conversation ids and each phase's unique marker, written into every content +field. Search your projects for them: the first appears in the transcript and the turn and +tool inputs and outputs, the second appears nowhere. Neither project should contain the +stand-in's host name, local paths, `alice`, the dynamic-variable email or a stack trace. diff --git a/python/frameworks/elevenlabs-agents/examples/run_e2e.py b/python/frameworks/elevenlabs-agents/examples/run_e2e.py new file mode 100644 index 000000000..5dfd14dcf --- /dev/null +++ b/python/frameworks/elevenlabs-agents/examples/run_e2e.py @@ -0,0 +1,245 @@ +"""End-to-end run of the real forwarder process against a real Future AGI collector. + +ElevenLabs itself is a STANDIN here (see standin.py): deliveries are built from the +docs-shaped fixtures and signed locally with a throwaway secret. + +What runs: + 1. ``traceai-elevenlabs-agents serve`` as a subprocess, configured only through the + environment variables the docs page lists (traceAI defaults: content captured), + pointed at FI_BASE_URL. + 2. Deliveries: a good conversation, a duplicate (ElevenLabs retry), an abnormal-disconnect + conversation (root ERROR, failing tool), bad / stale / missing / mutated signatures, + other webhook types, a payload without resourceSpans. + 3. ``traceai-elevenlabs-agents backfill`` for the delivered conversation (must be a + duplicate) and for a conversation that only exists on the GET stand-in. + 4. Collector failure: a second forwarder pointed at a closed port returns 502. + 5. SIGTERM, then the same run with the standard traceAI switches FI_HIDE_INPUTS, + FI_HIDE_OUTPUTS, FI_HIDE_INPUT_MESSAGES and FI_HIDE_OUTPUT_MESSAGES set to true, into a + second project. Each phase writes its own unique marker into every content field. + +Writes a JSON report (statuses, conversation ids, trace ids, markers) to --out. + + FI_API_KEY=... FI_SECRET_KEY=... FI_BASE_URL=http://localhost:14338 \\ + python examples/run_e2e.py --project my-elevenlabs --out e2e-report.json +""" + +from __future__ import annotations + +import argparse +import json +import os +import secrets +import shutil +import signal +import socket +import subprocess +import sys +import time +import urllib.request +from pathlib import Path +from typing import Any, Dict, List + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import standin # noqa: E402 + +PATH = "/elevenlabs/webhook" + + +def free_port() -> int: + with socket.socket() as s: + s.bind(("127.0.0.1", 0)) + return s.getsockname()[1] + + +def cli() -> List[str]: + exe = shutil.which("traceai-elevenlabs-agents") + return [exe] if exe else [sys.executable, "-m", "traceai_elevenlabs_agents"] + + +def start_forwarder(env: Dict[str, str], port: int, log_path: Path) -> subprocess.Popen: + log = open(log_path, "ab") + proc = subprocess.Popen(cli() + ["serve", "--port", str(port)], env=env, stdout=log, stderr=subprocess.STDOUT) + for _ in range(200): + try: + with urllib.request.urlopen("http://127.0.0.1:%d/healthz" % port, timeout=1): + return proc + except OSError: + if proc.poll() is not None: + raise SystemExit("forwarder exited early, see %s" % log_path) from None + time.sleep(0.05) + proc.kill() + raise SystemExit("forwarder did not start") + + +def stop(proc: subprocess.Popen) -> int: + proc.send_signal(signal.SIGTERM) + try: + return proc.wait(timeout=15) + except subprocess.TimeoutExpired: + proc.kill() + return -9 + + +def sdk_oracle(): + """The real ElevenLabs SDK, when installed: checks the stand-in signs and serves what it accepts.""" + try: + from importlib.metadata import version + + from elevenlabs.client import ElevenLabs + except ImportError: + return None, None + return ElevenLabs, version("elevenlabs") + + +def signed(body: Dict[str, Any], secret: str, phase: Dict[str, Any]): + raw = json.dumps(body, separators=(",", ":")).encode() + header = standin._sign(secret, raw, int(time.time())) + client_cls, sdk_version = sdk_oracle() + if client_cls is not None: + event = client_cls(api_key="unused").webhooks.construct_event(rawBody=raw.decode(), sig_header=header, secret=secret) + phase.setdefault("sdk_checks", []).append( + {"check": "construct_event accepted stand-in delivery", "sdk": sdk_version, "type": event["type"]} + ) + return raw, header + + +HIDE_ENV = ("FI_HIDE_INPUTS", "FI_HIDE_OUTPUTS", "FI_HIDE_INPUT_MESSAGES", "FI_HIDE_OUTPUT_MESSAGES") + + +def run_phase(args, *, project: str, hidden: bool, report: Dict[str, Any], out_dir: Path) -> None: + label = "hidden" if hidden else "default" + phase: Dict[str, Any] = {"project": project, "mode": label, "hide_env": list(HIDE_ENV) if hidden else [], "steps": []} + marker = standin.unique_marker() + phase["marker"] = marker + secret = "whsec_standin_" + secrets.token_hex(16) + xi_key = "xi_standin_" + secrets.token_hex(16) + port = free_port() + env = { + "PATH": os.environ.get("PATH", ""), + "HOME": os.environ.get("HOME", ""), + "ELEVENLABS_WEBHOOK_SECRET": secret, + "FI_API_KEY": os.environ["FI_API_KEY"], + "FI_SECRET_KEY": os.environ["FI_SECRET_KEY"], + "FI_PROJECT_NAME": project, + "FI_BASE_URL": os.environ.get("FI_BASE_URL", "https://api.futureagi.com"), + "FI_ELEVENLABS_STATE_PATH": str(out_dir / ("state-%s.sqlite3" % label)), + } + if hidden: + env.update({name: "true" for name in HIDE_ENV}) + log_path = out_dir / ("forwarder-%s.log" % label) + log_path.write_bytes(b"") + url = "http://127.0.0.1:%d%s" % (port, PATH) + + def step(name: str, expect: int, status: int, payload: Dict[str, Any], **extra: Any) -> None: + ok = status == expect + phase["steps"].append({"step": name, "expect": expect, "status": status, "ok": ok, "response": payload, **extra}) + print("%-4s %-44s HTTP %d %s" % ("ok" if ok else "FAIL", name, status, json.dumps(payload)[:120])) + + proc = start_forwarder(env, port, log_path) + get_server = standin.GetStandin(xi_key) + try: + good = standin.build_delivery("post_call_transcription_otel.json", marker) + raw_good, header = signed(good, secret, phase) + status, payload = standin.send(url, raw_good, secret, header=header) + step("conversation (tool call, 2 LLM turns)", 200, status, payload, conversation_id=good["data"]["conversation_id"]) + status, payload = standin.send(url, good, secret, timestamp=int(time.time()) + 1) + step("same conversation again (retry)", 200, status, payload) + + bad = standin.build_delivery("post_call_transcription_otel_error.json", marker) + raw_bad, header = signed(bad, secret, phase) + status, payload = standin.send(url, raw_bad, secret, header=header) + step("abnormal disconnect (root ERROR)", 200, status, payload, conversation_id=bad["data"]["conversation_id"]) + + probe = standin.build_delivery("post_call_transcription_otel.json", marker) + raw = json.dumps(probe, separators=(",", ":")).encode() + step("wrong secret", 401, *standin.send(url, raw, "not-the-secret")) + step("stale timestamp (31 min)", 401, *standin.send(url, raw, secret, timestamp=int(time.time()) - 31 * 60)) + step("missing signature header", 401, *standin.send(url, raw, secret, header="")) + valid_header = standin._sign(secret, raw, int(time.time())) + mutated = raw.replace(b"Goodbye", b"G00dbye") + step("mutated body, valid header", 401, *standin.send(url, mutated, secret, header=valid_header)) + others = json.loads((standin.FIXTURES / "other_webhook_types.json").read_text().replace("{{MARKER}}", marker)) + for kind, body in others.items(): + step("type %s" % kind, 200, *standin.send(url, body, secret)) + empty = standin.build_delivery("post_call_transcription_otel.json", marker) + empty["data"]["otlp_traces"] = {"resourceSpans": []} + step("missing resourceSpans", 400, *standin.send(url, empty, secret)) + + # Backfill: the delivered conversation converges; a GET-only conversation is forwarded. + get_server.add_from_delivery(good) + only_get = standin.build_delivery("post_call_transcription_otel.json", marker) + get_server.add_from_delivery(only_get, user_id="user-" + marker) + client_cls, sdk_version = sdk_oracle() + if client_cls is not None: + fetched = client_cls(api_key=xi_key, base_url=get_server.base_url).conversational_ai.conversations.get( + conversation_id=only_get["data"]["conversation_id"], format="opentelemetry" + ) + phase.setdefault("sdk_checks", []).append( + {"check": "conversations.get(format=opentelemetry) parsed the GET stand-in", "sdk": sdk_version, + "spans": sum(len(ss["spans"]) for rs in fetched.otlp_traces["resourceSpans"] for ss in rs["scopeSpans"])} + ) + backfill_env = dict(env, ELEVENLABS_API_KEY=xi_key, FI_ELEVENLABS_API_BASE_URL=get_server.base_url) + backfill_env.pop("ELEVENLABS_WEBHOOK_SECRET") + for name, conv, expect_status in ( + ("backfill of the delivered conversation", good["data"]["conversation_id"], "duplicate"), + ("backfill of a GET-only conversation", only_get["data"]["conversation_id"], "forwarded"), + ): + done = subprocess.run( + cli() + ["backfill", "--conversation-id", conv], env=backfill_env, capture_output=True, timeout=120 + ) + with open(log_path, "ab") as log: + log.write(done.stderr) + try: + payload = json.loads(done.stdout.decode().strip().splitlines()[-1]) + except (IndexError, ValueError): + payload = {"stdout": done.stdout.decode()[-200:]} + status = 200 if done.returncode == 0 and payload.get("status") == expect_status else 500 + step(name, 200, status, payload, conversation_id=conv) + + # Collector failure: same delivery through a forwarder whose collector is down. + dead_port, dead_env = free_port(), dict(env, FI_BASE_URL="http://127.0.0.1:%d" % free_port()) + dead_env["FI_ELEVENLABS_STATE_PATH"] = str(out_dir / ("state-dead-%s.sqlite3" % label)) + dead_log = out_dir / ("forwarder-dead-%s.log" % label) + dead_log.write_bytes(b"") + dead = start_forwarder(dead_env, dead_port, dead_log) + try: + lost = standin.build_delivery("post_call_transcription_otel.json", marker) + step( + "collector down -> 5xx so ElevenLabs can retry", + 502, + *standin.send("http://127.0.0.1:%d%s" % (dead_port, PATH), lost, secret), + conversation_id=lost["data"]["conversation_id"], + ) + finally: + stop(dead) + finally: + get_server.close() + phase["exit_code"] = stop(proc) + phase["ok"] = all(s["ok"] for s in phase["steps"]) and phase["exit_code"] == 0 + report["phases"].append(phase) + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument("--project", required=True, help="project for the run with traceAI defaults (content on)") + parser.add_argument("--hidden-project", help="project for the FI_HIDE_* run (default: -hidden)") + parser.add_argument("--out", required=True) + args = parser.parse_args() + for name in ("FI_API_KEY", "FI_SECRET_KEY"): + if not os.environ.get(name): + raise SystemExit("%s is not set" % name) + out = Path(args.out) + out_dir = out.parent + out_dir.mkdir(parents=True, exist_ok=True) + report: Dict[str, Any] = {"started": int(time.time()), "standin": "ElevenLabs sender and GET endpoint", "phases": []} + run_phase(args, project=args.project, hidden=False, report=report, out_dir=out_dir) + run_phase(args, project=args.hidden_project or args.project + "-hidden", hidden=True, report=report, out_dir=out_dir) + report["ok"] = all(p["ok"] for p in report["phases"]) + out.write_text(json.dumps(report, indent=2)) + print("report: %s ok=%s" % (out, report["ok"])) + return 0 if report["ok"] else 1 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/python/frameworks/elevenlabs-agents/examples/run_e2e.sh b/python/frameworks/elevenlabs-agents/examples/run_e2e.sh new file mode 100755 index 000000000..388fe5199 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/examples/run_e2e.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Run the forwarder end to end against a Future AGI collector, with ElevenLabs stood in. +# FI_API_KEY=... FI_SECRET_KEY=... FI_BASE_URL=http://localhost:14338 ./run_e2e.sh [out-dir] +# Needs the package installed in the current Python (pip install -e .. or pip install traceAI-elevenlabs-agents). +set -euo pipefail +here="$(cd "$(dirname "$0")" && pwd)" +project="${1:?usage: run_e2e.sh [out-dir]}" +out="${2:-$here/.e2e}" +: "${FI_API_KEY:?FI_API_KEY is not set}" +: "${FI_SECRET_KEY:?FI_SECRET_KEY is not set}" +mkdir -p "$out" +python "$here/run_e2e.py" --project "$project" --out "$out/e2e-report.json" diff --git a/python/frameworks/elevenlabs-agents/examples/standin.py b/python/frameworks/elevenlabs-agents/examples/standin.py new file mode 100644 index 000000000..dde6a8029 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/examples/standin.py @@ -0,0 +1,180 @@ +"""STANDIN for ElevenLabs: a local sender and a local GET endpoint, shaped like the docs. + +Nothing here talks to ElevenLabs. It exists so the forwarder can be exercised end to +end without an ElevenLabs workspace: + +* ``build_delivery`` turns a fixture into a fresh ``post_call_transcription_otel`` body + (new conversation id, trace id and span ids, timestamps moved to now, a marker in + every content field). +* ``send`` signs it exactly as documented (``ElevenLabs-Signature: t={unix},v0={hmac}`` + over ``{timestamp}.{body}``) and POSTs it. +* ``GetStandin`` serves ``GET /v1/convai/conversations/{id}?format=opentelemetry`` with + the same ``otlp_traces`` (same trace id, fresh span ids, as ElevenLabs does on every + export) and checks the ``xi-api-key`` header. + +Fixture provenance: tests/fixtures/README.md. +""" + +from __future__ import annotations + +import json +import os +import secrets +import threading +import time +import urllib.error +import urllib.request +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from pathlib import Path +from typing import Any, Dict, Optional, Tuple +from urllib.parse import parse_qs, urlsplit + +HERE = Path(__file__).resolve().parent +FIXTURES = HERE.parent / "tests" / "fixtures" + + +def _sign(secret: str, body: bytes, timestamp: int) -> str: + import hashlib + import hmac + + digest = hmac.new(secret.encode(), str(timestamp).encode() + b"." + body, hashlib.sha256).hexdigest() + return "t=%d,v0=%s" % (timestamp, digest) + + +def _spans(otlp: Dict[str, Any]): + for rs in otlp.get("resourceSpans", []): + for ss in rs.get("scopeSpans", []): + for span in ss.get("spans", []): + yield span + + +def refresh_span_ids(otlp: Dict[str, Any]) -> Dict[str, Any]: + """Same trace id, new span ids: what a second ElevenLabs export of a conversation looks like.""" + otlp = json.loads(json.dumps(otlp)) + mapping: Dict[str, str] = {} + for span in _spans(otlp): + mapping[span["spanId"]] = secrets.token_hex(8) + for span in _spans(otlp): + span["spanId"] = mapping[span["spanId"]] + if span.get("parentSpanId"): + span["parentSpanId"] = mapping.get(span["parentSpanId"], span["parentSpanId"]) + return otlp + + +def build_delivery(fixture: str, marker: str, *, now: Optional[int] = None) -> Dict[str, Any]: + text = (FIXTURES / fixture).read_text(encoding="utf-8").replace("{{MARKER}}", marker) + body = json.loads(text) + data = body["data"] + old_conv = data["conversation_id"] + new_conv = "conv_th8231" + secrets.token_hex(10) + new_trace = secrets.token_hex(16) + text = json.dumps(body).replace(old_conv, new_conv) + body = json.loads(text) + otlp = refresh_span_ids(body["data"]["otlp_traces"]) + spans = list(_spans(otlp)) + starts = [int(s["startTimeUnixNano"]) for s in spans] + ends = [int(s["endTimeUnixNano"]) for s in spans] + current = int(time.time()) if now is None else now + shift = (current - 5) * 1_000_000_000 - max(ends) + for span in spans: + span["traceId"] = new_trace + span["startTimeUnixNano"] = str(int(span["startTimeUnixNano"]) + shift) + span["endTimeUnixNano"] = str(int(span["endTimeUnixNano"]) + shift) + for event in span.get("events", []): + event["timeUnixNano"] = str(int(event["timeUnixNano"]) + shift) + del starts + body["data"]["otlp_traces"] = otlp + body["event_timestamp"] = current + return body + + +def send( + url: str, + body: Any, + secret: str, + *, + timestamp: Optional[int] = None, + header: Optional[str] = None, +) -> Tuple[int, Dict[str, Any]]: + raw = body if isinstance(body, bytes) else json.dumps(body, separators=(",", ":")).encode("utf-8") + ts = int(time.time()) if timestamp is None else timestamp + headers = {"Content-Type": "application/json"} + signature = _sign(secret, raw, ts) if header is None else header + if signature: + headers["ElevenLabs-Signature"] = signature + request = urllib.request.Request(url, data=raw, headers=headers, method="POST") + try: + with urllib.request.urlopen(request, timeout=60) as response: + return response.status, json.loads(response.read() or b"{}") + except urllib.error.HTTPError as error: + return error.code, json.loads(error.read() or b"{}") + + +class GetStandin: + """Loopback ``GET /v1/convai/conversations/{id}`` shaped like the ElevenLabs API.""" + + def __init__(self, api_key: str, host: str = "127.0.0.1", port: int = 0) -> None: + self.api_key = api_key + self.conversations: Dict[str, Dict[str, Any]] = {} + self.requests: list = [] + owner = self + + class Handler(BaseHTTPRequestHandler): + def _json(self, status: int, payload: Any) -> None: + body = json.dumps(payload).encode("utf-8") + self.send_response(status) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def do_GET(self) -> None: # noqa: N802 + parts = urlsplit(self.path) + query = parse_qs(parts.query) + owner.requests.append({"path": parts.path, "query": query}) + if self.headers.get("xi-api-key") != owner.api_key: + self._json(401, {"detail": {"status": "invalid_api_key"}}) + return + prefix = "/v1/convai/conversations/" + conv_id = parts.path[len(prefix):] if parts.path.startswith(prefix) else "" + conversation = owner.conversations.get(conv_id) + if conversation is None: + self._json(404, {"detail": {"status": "conversation_not_found"}}) + return + payload = dict(conversation) + if query.get("format", ["json"])[0] == "opentelemetry": + payload["otlp_traces"] = refresh_span_ids(conversation["otlp_traces"]) + else: + payload.pop("otlp_traces", None) + self._json(200, payload) + + def log_message(self, *args: Any) -> None: + pass + + self.httpd = ThreadingHTTPServer((host, port), Handler) + self.base_url = "http://%s:%d" % (host, self.httpd.server_port) + self._thread = threading.Thread(target=self.httpd.serve_forever, daemon=True) + self._thread.start() + + def add_from_delivery(self, delivery: Dict[str, Any], *, user_id: Optional[str] = None) -> str: + data = delivery["data"] + template = json.loads((FIXTURES / "get_conversation_opentelemetry.json").read_text(encoding="utf-8")) + template.update( + conversation_id=data["conversation_id"], + agent_id=data["agent_id"], + otlp_traces=data["otlp_traces"], + ) + if user_id is None: + template.pop("user_id", None) + else: + template["user_id"] = user_id + self.conversations[data["conversation_id"]] = template + return data["conversation_id"] + + def close(self) -> None: + self.httpd.shutdown() + self.httpd.server_close() + + +def unique_marker() -> str: + return "zqx-th8231-" + secrets.token_hex(6) + "-" + str(os.getpid()) diff --git a/python/frameworks/elevenlabs-agents/poetry.lock b/python/frameworks/elevenlabs-agents/poetry.lock new file mode 100644 index 000000000..e92c0e9a5 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/poetry.lock @@ -0,0 +1,1379 @@ +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. + +[[package]] +name = "annotated-types" +version = "0.8.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.10" +groups = ["main", "dev"] +files = [ + {file = "annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0"}, + {file = "annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7"}, +] + +[[package]] +name = "anyio" +version = "4.15.1" +description = "High-level concurrency and networking framework on top of asyncio or Trio" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "anyio-4.15.1-py3-none-any.whl", hash = "sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101"}, + {file = "anyio-4.15.1.tar.gz", hash = "sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94"}, +] + +[package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} +idna = ">=2.8" +typing_extensions = {version = ">=4.16.0", markers = "python_version < \"3.15\""} + +[package.extras] +trio = ["trio (>=0.32.0)"] + +[[package]] +name = "attrs" +version = "26.1.0" +description = "Classes Without Boilerplate" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309"}, + {file = "attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32"}, +] + +[[package]] +name = "certifi" +version = "2026.7.22" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.7" +groups = ["main", "dev"] +files = [ + {file = "certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775"}, + {file = "certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55"}, +] + +[[package]] +name = "charset-normalizer" +version = "3.5.2" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7" +groups = ["main", "dev"] +files = [ + {file = "charset_normalizer-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-win32.whl", hash = "sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275"}, + {file = "charset_normalizer-3.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d21b8b13c7592db2ac5e544a6d83187b995257472b0c9e8351b6d507ae37ed6"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d760fe2a4d7c3b226cb9026d6a842868d52a7901bd98420e1baf14e80da85cf5"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c9790464842f85f437dbbb54417eda1e0e6bfc52dd8d22d6fd1c994b73b2dc74"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4685902cf26edf013ed7a3da0f426ebba7a00ebb9541386d835afbf002c11cab"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4495c5002a7b28557e7e222e77e0b661183e432b7d6d2e788101e3f240e05b8c"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef4fcbf3327382cd4c9f540babd61248208af7b93eec4de397b4d5f58a09e288"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd16aabe4a02a297c23417aa17ac6299dbd8c49f673bcd645b4929b11f5a4400"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:fb9e68df06293761f9fe66ade60a9bc6d0f5e42b8acf2939a9158af86ab0e5bd"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:59f63901b0031c3136cf64704dcb21de0bbae62ce2c9529bc39d27665463de37"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:304d5463e65a35d7bb0850550e0780395395f6fcf452f04db7d5ca7cecc425ac"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9cf9b1a857e25c4baceeb3624e92a56df3668f398c4acba74e174d81fb4d1d3a"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:114e4d0c92d618409ed82a99e22b5c5e768fe995f2973f78265f4524f49d4640"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-win32.whl", hash = "sha256:2625388c6c754520c37abaf3b41eb34d1cc4a373f457898f08606c8e362b891d"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:87e50a3e7cb90af586b6c5faf23e302a970415ac73bd7bd90a515a04b427ef96"}, + {file = "charset_normalizer-3.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:254eb48b9fa5ee9898a3c445825a1f340fe53712a098904b39b0bddba8ea3cb1"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed2a239c0ea213acc1908150a3037257083c7c083128f1a4cec2ec4b97dca491"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b91363207bd9dc966a691e959bb47f64b30f7ac4b072be9968b366982f7db77c"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:38a873987f3be698494da8b2e3085e29da02da7b633dce73e79c699a113d7bf0"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:355ad8011081dec5412240c087a9a0c9d4d5039f3ed11a3f13e18c2b29b56c51"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ee21e28f0430bd6dc9086c6e525d5e818a44a5ad19720c8a0ef766792f3eb5e5"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5cde776b7cc66e4f6c99612cea4aa7269aa65863f7a15841b2c264f103822f4e"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ae4f5fea5b8b8ccff88238cc8569303e5ee95efae67fa62922a311397a71f346"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f7d486c83842422badd511868fd8a9a20e9407ace71564b6af47ce7e60a336c1"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:11a4d68a6ecda3292cb1e50239e111543ba5d709bb62a6b4ea1afcfa729d8875"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d6734d2ef8a50fbf8445c139477da401f50d62a0606bf00e20ec6d87773fefb1"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a815775b6c38d4e0ff7bcffbeba67feded90202bb6a226b8dd35f1c855217413"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:23851fb4e1b85ed3f6c2a27b777cdfe2e19fb5b38429a8faf38c7542b7665869"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-win32.whl", hash = "sha256:db19d07e2e0129e974a0e65d0064fc222a446cd5122c2fd4184d2af9fc734a9e"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:780fbe7cab297b81dad9fb8dc5eb003c0468ffb0d9e5f65068c53a34661a96bc"}, + {file = "charset_normalizer-3.5.2-cp312-cp312-win_arm64.whl", hash = "sha256:e2af3aad578aa6bd1384bcf4750fc285e5a9de53f40b7d41e5a0bf748edeb2b3"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:ed905975ab14056a2e5eb1c376cb2e1ebc5396baf84163939c518556fccde9f5"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-android_24_x86_64.whl", hash = "sha256:a66c3bc5ab1f0ff2164fc9965ddd611ff0802173f4b9d24554c563f6ab7e1d6e"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d2374b62878abb00cd8309b32af6c0b715cd02dec0ca74ef12e5069bdc64144a"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d376bbd28b3a8999db1a103b3b388aee6f1ddeb3e51bc2172993efdcd86e064d"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6045373d5a89a5ec71afde535db987ca28e76dfa276c2d4c818265b375d4b055"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849df64e889b2e17230d58410a03dba311a65b163508fd33679b2b737d4b7858"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:15c44f7edfd477b06f517a5cc317fc1707edb9de2c865f43d4b6513907473234"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a89012d6d5476ee112d20d998570ed58df2260a852afb1758809cd6900411d21"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0c951d5e6dd9c2ff60609476752bee49da4206adde960ebc247766937f72e718"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7218e8f32b0956cfcd048fd42d9d5779809745ca1d86113ca56f66e7ae1549c4"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a19a731138fc27d5682277d3b9df22855cea1239bce7fcec5f78f42ef2d1f3c3"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62603db9a7caa0802eaa28c1c46fecd7b3a263a774069c24c3c28c302448721c"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b6856554c4f44d79fc2307d5768854310a8f0096e501c75637542c82292b0429"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1bc0baf5ef96b6ede57d47f4b8fe4d9d84019c3bfcbeb20a41edc6a6ee341f1f"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:56bc200a365efb37383b7852e4cc5898d3b2da5987289b543956cf8cad71018a"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2c9ad19a6cfcd5ea5c0d41161d22f9df1dcc277e9bef2751391334546a314c00"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e243bd13217235fc7290c621941c3f5cc8b66e4872495be821d7436ba2fb838d"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:a090bb2c68df85450502e3e20d665e3a5af9c65a84d6508ed477badd49166fd3"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-win32.whl", hash = "sha256:2b7b3bbfb4fe8ef40600792d762fbaa9057559f9d3fad209525b7a22b99e91fd"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:78456a747de8dc58360ffa581f30a002baf5aa28cb262536545e91f113ed7639"}, + {file = "charset_normalizer-3.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:11912e4bb14baae7c5d8791aa55ba0a3a03ec6729073307b0f57270abaa713d3"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:1afb975bd5d68d5ce9f6b6d44fdf2f7e34b895a35e95708a7a91b20a3b51d187"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:bbbfc8e28816f19d7c0f1816664980c0a9875d01b27cdf8eedddb639d9e108ad"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7967d08cf06dee78443b874f98c98036f624f3a4e73e11f9f64f5be4d25393cf"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4c2b5031f63e331e3839b40aed2dd6f191e9c07edbde303e7876846ea1946995"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fcff63213e8e6e47770541a4607175404f47cbb3ebea7b6058cc82d524a0e424"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8d86d6fc60743dc916eb79e2eb1ec4818e21e427731543af40a3021851174a13"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a881931aa470808df94a8c380eed2bbbc76cd9dc622310f99665658c821eb6d"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8024d00c3faf3fc0c16e07a69f4405e8eac7cc0ab15f65fe6cf43827c4cf72b4"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4d48f2d08b9de5864e2c8744d4461b862fb149a18274abc8b698c45975573438"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34276fd796040bf0993ab33a369aa572e6979c7aab225a88893667ad8eac8f7a"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0521c5665880b33d603717defa76c094048900010897909952397feb3039da56"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:eff0ac9dbe711a4aee69bf04a83896aa9b85f19641264053a9f6d48573abb7dd"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:1503bccbeb36d5527790c3930327704c39af22de3112f1b1666a9f3ce15ee204"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:52aa6992700996af31f375de0c6bacd402b0097fe40b53c426b9f51a90ebabc7"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e09a3942ecbdee5cce73ea9d42da82b81b72ac1bf031ce069b93b5adf4eac8cd"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c7c9ab723cde841fefb34efbad91e87f00a674b1fe1cd0784fde742bf2c154dc"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ddc7dacc8ece3a182e7f15cb862d1fd616b46d076cb1ae9dd232b2c38b655874"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:ee43c17b173d46a3212baa6ead3ae258eeabdae48c263a01ccf0218c366dd655"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-win32.whl", hash = "sha256:4f87960d57feabfb618e4e0af6e7371645fa26a277860739d6e5d6e0012c92f0"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:e4e81e09c1578b8df602e3db08b0b3ea0a6947ad612f52bf8dc5ea8d47691f0c"}, + {file = "charset_normalizer-3.5.2-cp314-cp314-win_arm64.whl", hash = "sha256:80d02b6f04e92601a081dd97b23d3128033098bff5d35d392ddcc0476ea11253"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:dca9ab98072a5a54ebacebdc45f53e645336b320c667410b061be1ca588ae709"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0aa869112ef88429ae17820d99c3dd9504c9e9c671d3c246f3d7442cb051084"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c0afc6800ba57ccc350374c5bd6150419915d95ce93cdbab2d783d75eaf30ecb"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7dcd882da75ef9adf94903b1e3b9419e8aa8fb4c7396822b834b9ef7fb96954f"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2e06a3a98f916dd41d27f3105e02e7a40181c98c94b9158733d03a6f80506c09"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6bd128f206a7752ae1f2ab6c61bf8a24ba28913a10df8b14c2637b973ff97a80"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c8f3d67aeaf55f017982b73683f0e7342ba2f6635a78f69ce89ebb26aa411e5c"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fe9753dfee015c570d73df76f899f18444d41388bffcde097deba51c4fadbb9f"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:92888bb3187c5ba50500b00b3b310c9f2c651709d28036077680cb5255450a03"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d008d90a7f2471519aef0c90dfbe73b3e6e4d5e66ac48e19154c17e89e98b604"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31f3930700408d211f13378ccbe1c40845d8da54bd0681fac3a9b5aae81c7aa8"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:2a925889534b3748302dae5dead07cc13480de1dac3aea80a941b729b471ef93"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f5ec61164adcec446f8969a3358ec3f9b26bbda3b9213e5586d219afa8df2915"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-win32.whl", hash = "sha256:598a11a2c7ebaa5334bf698bf29568c9c390abac6a154d8170fedecd1cea38c5"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:7fdde2c9fd9e3eca40631e024664cf2584272cc8f96308cbe5fdfc930f51d8bc"}, + {file = "charset_normalizer-3.5.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d1befeed746d247c81127bb14de9dc3d30edb6e5976d34f83f86ed262b1d9105"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:87475fabc8d9996fd9c27debb395e642e8c838d78a00b6e932227a0e06b81e26"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9409a8bf35cf78353942504b24a57de3d75b708997a1e4bd8db71ac8633ce364"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:498dc3188ca05a68231ac3fdbfc7f57eb67e1343c30e0fea17f8218c1599b253"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e242bb1c5e76e97dfa9e7f209a71e93a01d7f19ffdd5cfbb2e2d55b4f08f8ab0"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:def79fa35ef0cef8d2accec024f4fdc7ead3012ff02f5215c783f39f03ef8cfc"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3df041de8887954562c9b261cba85ca0e9ded74048daf125f45edcfaa4832229"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04851f73ae72b8413dddadb16a49dfee95263553741fd42d546f7d66907e6be5"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:183b88127acdb4fabe59d951ab424faf1af7b63cdbb5f776186c1ea2ffcaed98"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:16fa0eccf81304b79c5cd87f9271c3b85dd9dd99245e4422ae9c0dd45e0f99d3"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:7441d755b7ab94f8d4eb3e43ec05482d760842fd263d003a99102d742cd835e2"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:ca403d7e4798f525fdfc78e258820419cbbd0f0ecbab9de7840e3c017cf6b8cf"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:df29a0a7107f7011e77f4eebdddec4c7331e24d787a0b21a46d63bdf7445da95"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:f3c96f633825733f735c5a9cf21d21a257d8e1edf0b1cee0a064b9c424ca0f7d"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-win32.whl", hash = "sha256:281cb91036248400f4cc957495cccd44c275c2e0c5854f7e45ac5cf7dc193847"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-win_amd64.whl", hash = "sha256:89b53f3cda69831909888e0494f4fa0bcd3537e3e138dabeb620bd6ad946bae8"}, + {file = "charset_normalizer-3.5.2-cp315-cp315-win_arm64.whl", hash = "sha256:6be488a102b8cf28d0391d8c4ba7748938ae28b78ad901f8585520fca33ead1a"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:915563965d418f986e7e145accc592eae9e1a1be3566ff98a05d7a9ec42a76e1"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:65cd72beeeca9d3aaea1201e5923859f308f952f9c71de93f06063c79f0f7a3b"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b7fd005a73d9e657273b7a10dc71a9e03c8fb9ee6999798d6918ce095b81ac7f"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e54da4baf05720032d527874d40b65fa4d7e5c6c6a43d0c3adbeffcaf275a2b3"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:124fbf1a8ff966d87ae05bb8bd45a71f966055ed8bba320d0c7cf450bc5f4d0e"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28b4f0d66fb834ff90f28209ac7bce77868c45d8c93e26f906709d9b7c2e1af9"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:58ca3755ee7ff7f59b57789ec9833c9de9ea275405cdd240eda1f193112e398a"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:443eae2bf318abeaf6f15d785138f71fd6de770e99a92158b8b814265e079115"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:58f361dcbab699cf8f42db3f47c8e7fd1036f138c23a5d08de9fde5f425a730c"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:1b4cbc7c3491ccb4aa17fcd8165649d01cf39f76de1696da8631b5f71b85401d"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:ba0b1d2620edf869789c3879223f52bf2afc5d31b3cb47cc57b3a12c05e2aa9d"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:5e2b6b57e9733d39f0c9fd3185efa6b8e29652c4cd8fe94180272cf6ed9a78c4"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:51cf45226a9b588d0d2b4880c62d686934b63ab0bd79ca23ab0e9762eb27441b"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-win32.whl", hash = "sha256:5fb29fb8cd1a46c27a1bf9613ad5ec2599310d46b4025d9556404a6b6a292800"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-win_amd64.whl", hash = "sha256:a192e2c40070d92c3ccf777e3a5c4ff515573cd2bb7ed0c537fdadbbec5bbf21"}, + {file = "charset_normalizer-3.5.2-cp315-cp315t-win_arm64.whl", hash = "sha256:749e97e1b32313717a565abbe321bc2190bc8b35f1a67e4cdbc7c56c8d8ffe58"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036"}, + {file = "charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:75a3ceed0724d625d64b86ca20aba182e4df462e04c2414fc941c0f523f06aac"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0891b9d3903c5571c03771ca669a4b0ec5618ca722a5c957d3d29cd4e5062848"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fc14a032f813bf5fe624d991960ea83e9715adc27e4c1830a2361eb1d02ac341"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8b2bfab86aa71ae13aa41a6a26aab338e0db2b8bc75434b05aea89e011ff35a4"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9bde855991b7e362c146535e3136a50bfaffc0487d38b33ca7e5edefc6e23849"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:55ea99acb17b9325618de155a0cd6a2e8f5d10be008113e1d433bbb58db543b2"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:68eb192d85ab8e5f6ec69c2bc6ac0179fbf04a5ac1569d12fbef74883fe102d0"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:d913de495d90407cd859d263bee2e5d1a4ed3eb6573c04e70d9ec619a7cbed7f"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:3ddacd27458c45bdacd6bd6db644bfb730efbf9e830310186e3045c9c5be8fb2"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:588461c2e8384d309bd63e5826019b6977bc66d629b99ac8737bb795d7b2cb5a"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:e80e6c2f55656b4824d72065abb4ddd6a525c74bd78a0aab5d9fc2cf4fb5af50"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:d4a7319f304a774bed22115bc891618e45f85065ab44ea6acd07d274e750519a"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:fd1fbe0f116b6e55da77aca2c6ddcddcfac2186cbf78bdebf40fc156efca389d"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-win32.whl", hash = "sha256:93223adc95033dd47133a46ccfc316a0139176fd79085762e27202ec56018f03"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-win_amd64.whl", hash = "sha256:15bb4005af6320d259dc7593ca84a38d7fe06a421dbcf7b910ae23979101e787"}, + {file = "charset_normalizer-3.5.2-cp39-cp39-win_arm64.whl", hash = "sha256:2cc961b171b3f3440f410489ab3573e86aea8736134ebbb40ea1338b7f0831bc"}, + {file = "charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685"}, + {file = "charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +markers = "sys_platform == \"win32\"" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "elevenlabs" +version = "2.73.0" +description = "" +optional = false +python-versions = "<4.0,>=3.8" +groups = ["dev"] +files = [ + {file = "elevenlabs-2.73.0-py3-none-any.whl", hash = "sha256:47f60f1fe7917e32f5469500b7d89926bc2c52df75292e3fe4ba5380b172b8fd"}, + {file = "elevenlabs-2.73.0.tar.gz", hash = "sha256:20bdfe59601b21c7a545ef8e0118dc47c015c3ae19d952e92551a07a95350b0f"}, +] + +[package.dependencies] +httpx = ">=0.21.2" +pydantic = ">=1.9.2" +pydantic-core = ">=2.18.2" +requests = ">=2.20" +typing_extensions = ">=4.0.0" +websockets = ">=13.0" + +[package.extras] +pyaudio = ["pyaudio (>=0.2.14)"] + +[[package]] +name = "exceptiongroup" +version = "1.3.1" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.11\"" +files = [ + {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"}, + {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""} + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "fi-instrumentation-otel" +version = "1.1.0" +description = "OpenTelemetry instrumentation" +optional = false +python-versions = "<3.14,>3.9" +groups = ["main"] +files = [ + {file = "fi_instrumentation_otel-1.1.0-py3-none-any.whl", hash = "sha256:4fa2bf663e0ce09447aca92ae798cd7b0dee35c5c92c2e033f1d89d158a9e62c"}, + {file = "fi_instrumentation_otel-1.1.0.tar.gz", hash = "sha256:7ec324c3c9242aa87a88cf23a21c11919b8736c6451c5fb50917f592a853b059"}, +] + +[package.dependencies] +jsonschema = ">=4.21.1,<5.0.0" +opentelemetry-api = ">=1.29.0,<2.0.0" +opentelemetry-exporter-otlp-proto-http = ">=1.29.0,<2.0.0" +opentelemetry-instrumentation = "*" +opentelemetry-sdk = ">=1.29.0,<2.0.0" +pydantic = ">=2.9.2,<3.0.0" +requests = ">=2.32.3,<3.0.0" +typing-extensions = ">=4.9.0,<5.0.0" +wrapt = ">=1.15.0,<2.0.0" + +[package.extras] +evaluation = ["ai-evaluation (>=0.1.0)", "futureagi (>=0.6.0)"] +grpc = ["opentelemetry-exporter-otlp-proto-grpc (>=1.29.0,<2.0.0)"] + +[[package]] +name = "googleapis-common-protos" +version = "1.75.5" +description = "Common protobufs used in Google APIs" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "googleapis_common_protos-1.75.5-py3-none-any.whl", hash = "sha256:d7285525c23039db98f2463e6d5a4f9b958b94d497f03a844ece3259c4e72d5d"}, + {file = "googleapis_common_protos-1.75.5.tar.gz", hash = "sha256:c7a866fc34ed29a3b10af627a4b9b1dc2433313ca6e959f0ae4feb132047ed72"}, +] + +[package.dependencies] +protobuf = ">=6.33.5,<8.0.0" + +[package.extras] +grpc = ["grpcio (>=1.59.0,<2.0.0)"] + +[[package]] +name = "h11" +version = "0.16.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +optional = false +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, +] + +[[package]] +name = "httpcore" +version = "1.0.9" +description = "A minimal low-level HTTP client." +optional = false +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, +] + +[package.dependencies] +certifi = "*" +h11 = ">=0.16" + +[package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<1.0)"] + +[[package]] +name = "httpx" +version = "0.28.1" +description = "The next generation HTTP client." +optional = false +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, +] + +[package.dependencies] +anyio = "*" +certifi = "*" +httpcore = "==1.*" +idna = "*" + +[package.extras] +brotli = ["brotli", "brotlicffi"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "idna" +version = "3.20" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.9" +groups = ["main", "dev"] +files = [ + {file = "idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c"}, + {file = "idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44"}, +] + +[package.extras] +all = ["coverage (>=7.10.0)", "hypothesis (>=6.141.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.16.0)", "ty (>=0.0.37)"] + +[[package]] +name = "iniconfig" +version = "2.3.1" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7"}, + {file = "iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960"}, +] + +[[package]] +name = "jsonschema" +version = "4.26.0" +description = "An implementation of JSON Schema validation for Python" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "jsonschema-4.26.0-py3-none-any.whl", hash = "sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce"}, + {file = "jsonschema-4.26.0.tar.gz", hash = "sha256:0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326"}, +] + +[package.dependencies] +attrs = ">=22.2.0" +jsonschema-specifications = ">=2023.03.6" +referencing = ">=0.28.4" +rpds-py = ">=0.25.0" + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "rfc3987-syntax (>=1.1.0)", "uri-template", "webcolors (>=24.6.0)"] + +[[package]] +name = "jsonschema-specifications" +version = "2025.9.1" +description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe"}, + {file = "jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d"}, +] + +[package.dependencies] +referencing = ">=0.31.0" + +[[package]] +name = "opentelemetry-api" +version = "1.45.1" +description = "OpenTelemetry Python API" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_api-1.45.1-py3-none-any.whl", hash = "sha256:b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb"}, + {file = "opentelemetry_api-1.45.1.tar.gz", hash = "sha256:aa38ed19bcc084ba42782a73255b3582283eced7ad6dddbd6695189e69adfb75"}, +] + +[package.dependencies] +typing-extensions = ">=4.5.0" + +[[package]] +name = "opentelemetry-exporter-http-transport" +version = "0.66b1" +description = "OpenTelemetry Exporters HTTP transport" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_exporter_http_transport-0.66b1-py3-none-any.whl", hash = "sha256:2f95404bdee7f9d2d529c7de56c7bd86d014d774d8fbf137810e0167f8a492bf"}, + {file = "opentelemetry_exporter_http_transport-0.66b1.tar.gz", hash = "sha256:443080203bf52586ce0b2ad901e8951c61833eab1aa539ae6f1f16fe9e8e7952"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.15,<2.0" +requests = {version = ">=2.25,<3.0", optional = true, markers = "extra == \"requests\""} + +[package.extras] +requests = ["requests (>=2.25,<3.0)"] +urllib3 = ["urllib3 (>=1.26)"] + +[[package]] +name = "opentelemetry-exporter-otlp-common" +version = "0.66b1" +description = "OpenTelemetry OTLP HTTP export utilities" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_exporter_otlp_common-0.66b1-py3-none-any.whl", hash = "sha256:00ff8592c3a7cb729ff3fdc7ffa12372c243bdf2163e80c180994d0c7bd83ee9"}, + {file = "opentelemetry_exporter_otlp_common-0.66b1.tar.gz", hash = "sha256:6b1403487a2185ac1feb45fd5546fdf8630ce71c36bcefaadf51e2130e9e23f9"}, +] + +[package.dependencies] +opentelemetry-sdk = ">=1.45.1,<1.46.0" + +[package.extras] +http = ["opentelemetry-exporter-http-transport (==0.66b1)"] + +[[package]] +name = "opentelemetry-exporter-otlp-proto-common" +version = "1.45.1" +description = "OpenTelemetry Protobuf encoding" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_exporter_otlp_proto_common-1.45.1-py3-none-any.whl", hash = "sha256:2f446183ae7047b036226f1d846c41a834b0e8755ad13b51a51dd38952eb466c"}, + {file = "opentelemetry_exporter_otlp_proto_common-1.45.1.tar.gz", hash = "sha256:2e4adcc3a67bcf57804fc49514f0ef64974ca7590aa3491da389852b4a0628f6"}, +] + +[package.dependencies] +opentelemetry-proto = "1.45.1" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-http" +version = "1.45.1" +description = "OpenTelemetry Collector Protobuf over HTTP Exporter" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_exporter_otlp_proto_http-1.45.1-py3-none-any.whl", hash = "sha256:24a97cf3753c7fb52fad44a696e452ff371686339e2acf3309e2eda3d0230700"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.45.1.tar.gz", hash = "sha256:45c218405ce3fd879596924b1874bf9a8f6880206d61065c5a912c8e5c297fb7"}, +] + +[package.dependencies] +googleapis-common-protos = ">=1.52,<2.0" +opentelemetry-api = ">=1.15,<2.0" +opentelemetry-exporter-http-transport = {version = "0.66b1", extras = ["requests"]} +opentelemetry-exporter-otlp-common = "0.66b1" +opentelemetry-exporter-otlp-proto-common = "1.45.1" +opentelemetry-proto = "1.45.1" +opentelemetry-sdk = ">=1.45.1,<1.46.0" +requests = ">=2.7,<3.0" +typing-extensions = ">=4.5.0" + +[package.extras] +gcp-auth = ["opentelemetry-exporter-credential-provider-gcp (>=0.59b0)"] +requests = ["opentelemetry-exporter-http-transport[requests] (==0.66b1)", "requests (>=2.7,<3.0)"] + +[[package]] +name = "opentelemetry-instrumentation" +version = "0.66b1" +description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_instrumentation-0.66b1-py3-none-any.whl", hash = "sha256:4c4aa14dc9a24a02325a9d4c42c4d0208dbb1374c2b1b8fe6c9392d59f3e1008"}, + {file = "opentelemetry_instrumentation-0.66b1.tar.gz", hash = "sha256:e79a510f7d87c72d95e964ddb42193a0d9a75668c027d980eab032ea1322a5ce"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.4,<2.0" +opentelemetry-semantic-conventions = "0.66b1" +packaging = ">=18.0" +wrapt = ">=1.0.0,<3.0.0" + +[[package]] +name = "opentelemetry-proto" +version = "1.45.1" +description = "OpenTelemetry Python Proto" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_proto-1.45.1-py3-none-any.whl", hash = "sha256:f38e2a8413053c180cd3d2637fbb279673ec2f6a6e09c995aafa2f452c52b46e"}, + {file = "opentelemetry_proto-1.45.1.tar.gz", hash = "sha256:79e0fb95e4616691a469439238aa9224d75779b3e108e895d1aa125ab29ca77c"}, +] + +[package.dependencies] +protobuf = ">=5.0,<8.0" + +[[package]] +name = "opentelemetry-sdk" +version = "1.45.1" +description = "OpenTelemetry Python SDK" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_sdk-1.45.1-py3-none-any.whl", hash = "sha256:c604c11dc429810812348989115fa44bd558772a3d7442afc43d024f2c250ca4"}, + {file = "opentelemetry_sdk-1.45.1.tar.gz", hash = "sha256:63d24a6ca645019a631e6a51999c73e93adcac1196ca640b8ae78a7cc4762bf3"}, +] + +[package.dependencies] +opentelemetry-api = "1.45.1" +opentelemetry-semantic-conventions = "0.66b1" +typing-extensions = ">=4.5.0" + +[package.extras] +file-configuration = ["opentelemetry-configuration (==0.66b1)"] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.66b1" +description = "OpenTelemetry Semantic Conventions" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "opentelemetry_semantic_conventions-0.66b1-py3-none-any.whl", hash = "sha256:d4cddeb4315490b35213f55e2bdc9ac54bb1e4d318927475bed62b35545e581b"}, + {file = "opentelemetry_semantic_conventions-0.66b1.tar.gz", hash = "sha256:497ca63bf383723411e8eaf60c8779e9877633c936bb641080adab59d0eb6ec8"}, +] + +[package.dependencies] +opentelemetry-api = "1.45.1" +typing-extensions = ">=4.5.0" + +[[package]] +name = "packaging" +version = "26.3" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.9" +groups = ["main", "dev"] +files = [ + {file = "packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c"}, + {file = "packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79"}, +] + +[[package]] +name = "pluggy" +version = "1.7.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "pluggy-1.7.0-py3-none-any.whl", hash = "sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec"}, + {file = "pluggy-1.7.0.tar.gz", hash = "sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8"}, +] + +[[package]] +name = "protobuf" +version = "7.36.2" +description = "" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "protobuf-7.36.2-cp310-abi3-macosx_10_9_universal2.whl", hash = "sha256:cbc70b17ee27e28894c7fee8bb04be1abead49e936bc70eb60052531eee2079e"}, + {file = "protobuf-7.36.2-cp310-abi3-manylinux2014_aarch64.whl", hash = "sha256:e11e1f0180583a2af89db6a2ecd9e8dc40aa6d2988ca175bfd0e6d12ea72d74e"}, + {file = "protobuf-7.36.2-cp310-abi3-manylinux2014_s390x.whl", hash = "sha256:f4fee11ec330d238b34a05c9b675f693c20415d1c5bd7d5320cc2f8a798eb9cf"}, + {file = "protobuf-7.36.2-cp310-abi3-manylinux2014_x86_64.whl", hash = "sha256:89f23aa53c24553a2416fd4fd1ec06f74fa42b14b546d8883128813f775bbfd2"}, + {file = "protobuf-7.36.2-cp310-abi3-win32.whl", hash = "sha256:912c1221170e16c08d1f086762f563dd61ff83c18b5fa6652952dfaded66f728"}, + {file = "protobuf-7.36.2-cp310-abi3-win_amd64.whl", hash = "sha256:a300819d441e078a5608c0d3c709796bb548136058fda017ae51d425b44fd353"}, + {file = "protobuf-7.36.2-py3-none-any.whl", hash = "sha256:bdb3a345d48db958e6ce1f18e508beb0cc981d64f24088427549c866cd039f1e"}, + {file = "protobuf-7.36.2.tar.gz", hash = "sha256:497d0463ff3316681da6c0b9e8d06cb465d61abce00b613ab42226175644d1bb"}, +] + +[[package]] +name = "pydantic" +version = "2.14.1" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.10" +groups = ["main", "dev"] +files = [ + {file = "pydantic-2.14.1-py3-none-any.whl", hash = "sha256:9195d967ec791692a04438115466764fb8b9a27b31f14a760437694f40d6b454"}, + {file = "pydantic-2.14.1.tar.gz", hash = "sha256:94f478203dd03404682a1ada216965651dd74b1d2d5ffd62e00e0837caab5c26"}, +] + +[package.dependencies] +annotated-types = ">=0.6.0" +pydantic-core = "2.50.1" +typing-extensions = ">=4.16.0" +typing-inspection = ">=0.4.4" + +[package.extras] +email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata"] + +[[package]] +name = "pydantic-core" +version = "2.50.1" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.10" +groups = ["main", "dev"] +files = [ + {file = "pydantic_core-2.50.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b281a3b0f0822618fe5e3e0d8a2048b6356b14388505dc9374ccffeb69989713"}, + {file = "pydantic_core-2.50.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fa4c8bc12c1354c5550c0c35c1852c8c1901e89e06561724e03f8d0342e1f87"}, + {file = "pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3aa9de446b793de2beb6fa2d9d0961803126c4e2a99c2f25ab59b9fd6ea125c0"}, + {file = "pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:de531ce1e2a3364e8767878b58f4ff728a434b4fde089781fe30b1e08e2396e0"}, + {file = "pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7c58106de36ac6a56314182958de20db8d3a29dfd5db527192cc754e4f8e7fb"}, + {file = "pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8b4c3df25bd323bf1d36a648d563cf1fc69d717451569927151bdad7cad07a77"}, + {file = "pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f77ac30b19221cd9bd3fcfa3d4614eff93140d0572ab730cded17b64adca05f3"}, + {file = "pydantic_core-2.50.1-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:d939de9c82e2126f7f48a7e658f8a85ed46d57662d53f44c49b8895fe94a3eb7"}, + {file = "pydantic_core-2.50.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:30ddf019d082c117b5d309e5b86710c2a78909907ec1a9381feec3eec02eca0b"}, + {file = "pydantic_core-2.50.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2ab756b72bd5054e4c7ef3ded331b35786cbd3cf931531a508f79a9537517064"}, + {file = "pydantic_core-2.50.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:b087b1c5be7ac687cf22eabfe4b6b608d40df23610651e93611e1f49118baf84"}, + {file = "pydantic_core-2.50.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a44101320cfe99432db74237545a63057dc7a88dfe792cbcad0647f2af56cb81"}, + {file = "pydantic_core-2.50.1-cp310-cp310-win32.whl", hash = "sha256:a4aaaa791bdae1c972a7e81765f4f3571c926b8e0b9b6e47346499fb80079665"}, + {file = "pydantic_core-2.50.1-cp310-cp310-win_amd64.whl", hash = "sha256:2eedf82ee4753cdab8e50044c6bd569577eebc3859b11fecf4eb9223761ff966"}, + {file = "pydantic_core-2.50.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:c531166c42ea7bdfecc8c50049581f05dd1993b09cc7c52bb36a14e96deaec7d"}, + {file = "pydantic_core-2.50.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b6d0c2183008c188e19f4906d426b293bdc4f67ab17df8e180fe16cda208fa71"}, + {file = "pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94be440c03fede26969a5ce75468e0e6a9927a1b46d9b679ee8adc1b057b0350"}, + {file = "pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:36c426eac0af8d1529ff8467e612b933346caec1fdc0d774f78f67a1a11e16c1"}, + {file = "pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:028e2f212273d4a39b1ec1e0de8166b1165a65fc0f1111452a9d94fc7c625c63"}, + {file = "pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6f0cc1bb9900dc558960894adeb30b0c083366fc1d69b856209fb2ca5c36fe5"}, + {file = "pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8812592c85d0edf423f10eadcef42716d71e8219085ad9e85b775057b7306133"}, + {file = "pydantic_core-2.50.1-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:bbce99252ba3167b2b6277f1829d5bf4b43b754524bddf7f944707c3db7d2253"}, + {file = "pydantic_core-2.50.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:476f6ed8e43cd1e0b460920e23571700872b284e77331cb30c4faf459cf48a4b"}, + {file = "pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2cbd1b75b09e976ed0d6b6ca297675632ca35df86130088457cdc60ef36970ae"}, + {file = "pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:5958c72adb417c39b12ac87525ac60b0d73315fcdc59e21f44ee4a5e2512c9ef"}, + {file = "pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f9e8a6c4ab04b78d61f78627370d834eb004b2869dcb28cfffa647b4ea1980"}, + {file = "pydantic_core-2.50.1-cp311-cp311-win32.whl", hash = "sha256:4be846f55c9477f5f3ddde8f2ce941137e16862a56d018ed885d422bb6ae02f2"}, + {file = "pydantic_core-2.50.1-cp311-cp311-win_amd64.whl", hash = "sha256:0048b6dddc8ef4b64fccaad878bd143b0c3882ea9936279dc11d613f6b7dd1bc"}, + {file = "pydantic_core-2.50.1-cp311-cp311-win_arm64.whl", hash = "sha256:6a733778df2f7087ec1100ed0b41533e4f3001976e99570fa34f57c66e7f8e3e"}, + {file = "pydantic_core-2.50.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:704075d10b74f2f3c6e15407c696d88701df35fc8953f434a431add0d0074db0"}, + {file = "pydantic_core-2.50.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e8e1d6ce820aa23317e8209a86bd65a540973c12dc7552b48a4f6c8e9926815e"}, + {file = "pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c18db21573bd2c6489f9a544b7499f0df2853958c568e5e783536ee1f690af41"}, + {file = "pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cb57f304525a5e3c13333b772bf9a473f36326e9c821b2e8e1b2fd36f80ae2c3"}, + {file = "pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a27c09d86600f1bf2fe3f37e1ae697faf3143931c09322cd799da94deee923b5"}, + {file = "pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:46b3301d3b5c886f77de7546e47274a5842c622ea2020b8c6524c6b66913b4a6"}, + {file = "pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93ba4e9d8210d941c200431a56b2c0400b131865947903937ed3ec5404307d2e"}, + {file = "pydantic_core-2.50.1-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:e5faeaee74a57d32b3ab3aebad2e348f06d3ba946fc5d28c1728455f00a3d13a"}, + {file = "pydantic_core-2.50.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3cda0e538208e5d722bbf3698b24f19c0a7d05bc8d5f8a7f9b121ea7fa243d9"}, + {file = "pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:57f51b31ff826e2859120cf4737c5a758a48d96f3e97da40ccee1796d58078ff"}, + {file = "pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:8daa7ee75245d43ad7d747e5c9ecc1b1d06552f72b14887e9276f787d57375f4"}, + {file = "pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:acbf31f37c53a5ac0c34706c80b4f5107ba20b05fdd3816124bf236ef0c57dd2"}, + {file = "pydantic_core-2.50.1-cp312-cp312-win32.whl", hash = "sha256:45b11cac094aa25725581d9304eee93c9028516b9ea80dd9e175e13a5a2c840e"}, + {file = "pydantic_core-2.50.1-cp312-cp312-win_amd64.whl", hash = "sha256:132529c83901437ff642f585216831bf5fd7a91df66829907e155192ead62498"}, + {file = "pydantic_core-2.50.1-cp312-cp312-win_arm64.whl", hash = "sha256:4e834f6a8e4ff772dcc34f58ef5504147a3ea5b0f4eeb13b0f8eb2ca75ac57f1"}, + {file = "pydantic_core-2.50.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:d5e062c01286d861fd6a1c4ff6e063547b3e713067f2df033c0ff97ac2ca006b"}, + {file = "pydantic_core-2.50.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0c003c3b7f49debb893d2d85ae099ac5959c9839e2f330fadb1fcdf7a6594482"}, + {file = "pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:409e0ea40ec30d9158f33574fd758e689f6045a0f2596701828c27816ca9687d"}, + {file = "pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:131059670f1d2444269b8585cb888963994871932447c08b39ac6a51fcfef658"}, + {file = "pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6dbcbee53bf17196a7f745aa9bf5a9603953a1e365b1f020be3207c676a3e7c4"}, + {file = "pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:325c23f3e35cfbf0fe3486fa5f7260d1e45885173002d30a28ca019994124255"}, + {file = "pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17e722e156d0444ecaefbe640bdb60928752bf2013e2b7a11cdb099aaae19bec"}, + {file = "pydantic_core-2.50.1-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:aa8224f10880d9bf1b5993988ba153d42a8b4f3f4f511f93b1f09c93ff613c72"}, + {file = "pydantic_core-2.50.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:41bc8237121bd8dc8d888dfd6279fc166ffc88c1f1bf3a8bf00869680533ca4c"}, + {file = "pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:45c6266d071c241f2a168d45bf8c54344f0effce35e7e6b73afdec11f3687568"}, + {file = "pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:1deeacb112d14d3f4fcb16b165f7dbaf76c70ba6e82f37ba042bdab51970a0b8"}, + {file = "pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1c96fd793b73d1b92e65570132505498fe7b21eaef73cdf74e67e5dfba7ac9e4"}, + {file = "pydantic_core-2.50.1-cp313-cp313-win32.whl", hash = "sha256:06ead20d39ffd6f2f6f2a8f8a6de67ff8bb1b4f14a8a30e058502514ee2ac685"}, + {file = "pydantic_core-2.50.1-cp313-cp313-win_amd64.whl", hash = "sha256:7816e98acc08119dc0f340ab167048ecc54126316330c1f0caf7c6756c88e28f"}, + {file = "pydantic_core-2.50.1-cp313-cp313-win_arm64.whl", hash = "sha256:c17799a62c142d61b8a3c51752a7cbc87fe2ad4ccfab10e628a77b405075c662"}, + {file = "pydantic_core-2.50.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:1cf41f1ae3fa155cf167a72689ad044bcc1e3c97e064123677149bdfb5dafc4a"}, + {file = "pydantic_core-2.50.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4df197990c15b5a37c5a277d131d9f2c67de6133f2e5dafd80d9bba4b99f46f9"}, + {file = "pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0036473f5583e6a60e50b8b21651511564277a3f05cc5dab8cf579f552cd5f6c"}, + {file = "pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:992c3514ec891fa7858099183e4d64e6bd5a5d4ff452fae29df22faa77a006bb"}, + {file = "pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:739dc730e6be3bd5ec2f4ab5cfc7eb047cc45fc1497b3bafec74ff2ed07df597"}, + {file = "pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:32fad3a91e51b6d2039c572db04a5a873260b399f6bd62c3552671fa7a4a2899"}, + {file = "pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42b54c2c90ad348b5e3a85e03e715d572c1fde357ef104cdfe3b03b697a404ea"}, + {file = "pydantic_core-2.50.1-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:2df1ff41884de2bc4b307bafd7c40a691094fad2ff8e767e5b45a319257bcf4e"}, + {file = "pydantic_core-2.50.1-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe90228920fd8ff2be62622b6bb8a2b11acd65046d50c6b130614b5879605a20"}, + {file = "pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:844b869f118e22a41a091bdcedda8a71bc1b0f62c38d1a0c3211cece47e1d8fc"}, + {file = "pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:2eb75304506894a281d346220a4f7481a1b8729577c5ed2a05395991966a8396"}, + {file = "pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:6b20a4bffabdad0db2927ac034ae3b8a681b1f7a0182f3e60b479ad2fde21ebb"}, + {file = "pydantic_core-2.50.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:99ba9bc2b8062ea0c326a990f7f00e6530c23579de66dd246e72c4cafef950a5"}, + {file = "pydantic_core-2.50.1-cp314-cp314-win32.whl", hash = "sha256:cf356f70551d40374eaffb1aa63f1eb6d2006681cbd7a9faea173ce0f4dd7cd2"}, + {file = "pydantic_core-2.50.1-cp314-cp314-win_amd64.whl", hash = "sha256:d32f3acc081cc3923386d88f422cde8892335e95f034e0104bb4cf9310d9915f"}, + {file = "pydantic_core-2.50.1-cp314-cp314-win_arm64.whl", hash = "sha256:bed5163e03b98bc1fa2eb05d74c63d9c5c95d8ed6254985481640fbf5e237dea"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:9572c1369e9c9da2d64a7b7992c786d90ff295abc93964cfe3125e4290768070"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2005207aafe1231315718bf6ed5d064a7300fb4772754af35ee72fc68159492e"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64f6047f62a6c5ae08d0a6afb035667aa2d97c3d20d69762e034c5ea144d92a5"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ef800dd7d85bcdadf4c3076e4c94e43939493558a3b69a1ea830c706d4617bb"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0135bcdcaa0f23573f286e4cb5e0fd2962700964ed13df085b85f2b97aeab9e"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0b3a6f334c6a2345ca15318ff894502a90012536404b37c844a976c76c846e0b"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06e01fbbfdb9be777b316a71b6c49efaf4a08b615d0a98d678cda3023f79d019"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:a29a061fec0b4e2d714f277e70a3a18125ecff803f2fea6eade2f2e53711d112"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f5187624823423e1d1b82b1072ac41dc837389e18d3d0572cc19bbee46cd550a"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:3e46a9eb0a0901dd6275e6b06ac3a464885ef350ec4121fe486869de8053e4bb"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:756d669f04e62ec4148ecfe22be6a4484d9b1181a6ef32e205ebfd200540858b"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:c516cc5367ca3448995d42cb994bf3f4c9002d2a7c22eac9622551269ad1b807"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-win32.whl", hash = "sha256:9d1bed94af6a63835461f3cf7502058eb166c58c4778e11d0f433cfb1bd69e19"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-win_amd64.whl", hash = "sha256:c8dce1f1e0e5358b682a6ad3fa5e31b31d4560997b8e61417e9217c8d60f8a0c"}, + {file = "pydantic_core-2.50.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ceff0acc940be2715bd6ad17b24c0e5304abf44f6efd0f81ee8499e640f9dc86"}, + {file = "pydantic_core-2.50.1-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:8a6791afa2245e6c6b180122d105941644f5bd410bb18623b408808cc41a3102"}, + {file = "pydantic_core-2.50.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:84f34323a61a365b4e9295de6028474754829aaddd59c7bf1a040e7487ef8f3c"}, + {file = "pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23edad659e8dbd8ca7e4e877fe6c81573abbdf215bd25a68b53e1272f58b80c7"}, + {file = "pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a5fce22f1e87d181e924e12da7d81cfe031fb3881a5ddf26ad28f141756ca43"}, + {file = "pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c73622ef819328873b53109ee4f77ceb598bffedd02daf916102be3228866b78"}, + {file = "pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ce8c25ca38cc0e3d7753ba180808de2c0c8cb24eae0df64491e40921454e9831"}, + {file = "pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7689580e72a642ab5ec64d5f55b2e33636fa43b4ebe63c0c2c965ef307c7d1aa"}, + {file = "pydantic_core-2.50.1-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:d5c0e32fdbce7f1e8ef4d11f655694bf5f4175c757a9f1dc2be09b8864e5bcf5"}, + {file = "pydantic_core-2.50.1-cp315-cp315-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40f523349960fa30f3ea51404308ff50f9997a90df639590f47a057c1f32b415"}, + {file = "pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_aarch64.whl", hash = "sha256:d4193206b6587047437f6f11d7e776df23e1c1e23af2a54d9347275614791e10"}, + {file = "pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_armv7l.whl", hash = "sha256:84bc765b282a9d5b7fe0348b8648904f25a6a04b2139da52b1dd30c8ac3a2c8f"}, + {file = "pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_x86_64.whl", hash = "sha256:ed1e728b39a383c81035b2459cfcb35d99dfb01f7d6ebe3a913bc1cc5b81e459"}, + {file = "pydantic_core-2.50.1-cp315-cp315-win32.whl", hash = "sha256:bc94f474417604bd383d2cd445d071b07dd55fedceed3ce33407bf1fcc107290"}, + {file = "pydantic_core-2.50.1-cp315-cp315-win_amd64.whl", hash = "sha256:983a662de2571cb2502fc8ff47b6770b03d025d2eb314c92f77b3f07c74720ed"}, + {file = "pydantic_core-2.50.1-cp315-cp315-win_arm64.whl", hash = "sha256:94845ff54dc5193f228cab81b2662a04bfbb892e95bdc15edf7399000ce57d54"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-macosx_10_12_x86_64.whl", hash = "sha256:4a53d13cdfbedbfa87f08b83c1a0a5efcc767d785a4b41934fa9cb672670493a"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:efbecf43d321f7b9281441f1f213f7c21c66988b0e06c2730ba13ed47a46bb08"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc1f08f68dac9f9e83845a8039880aba2ab553eb9b2259c3243a313182c253fe"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5dfe41f232befddb9c4377f6cfc702b51595e2d78ed082672adf8758d2c4619f"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:adc06d218a1cadfd2ec4628424d7d79ce4eba69c2965e7e7b55106f0da5208c8"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2cf91809d0721ab81592ba67bea7694821679c10b1a2e3c3460082b286c1918a"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23923ab9292c40da026330b1ecf4dc2618c8e86e0422e5d1fbf50d94d64ca4f8"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:f3377c8c2b3ce898423c5e5dd94c7982e30aa7717a7e6ab2470b9de364963709"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:455a773617b5913bf5c20d0692e5787b119e52c4d40ea644ca31f5758fd31be2"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_aarch64.whl", hash = "sha256:1a9006395dece0e32e704c315eff8a00bede494f6108546cfc5539c89fef4f9a"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_armv7l.whl", hash = "sha256:d2d82aa62521c55ddfb000ae70f88cdd8de974078f6024e821dfe5addd0c818f"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_x86_64.whl", hash = "sha256:009634b83993777ddcd69cad0ffcace43dabde692109528e35f0fde91e386a8b"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-win32.whl", hash = "sha256:3fde4fdc6487a58d944ca87cf5adc95d5f266e872c19599f5f4c0a8a1b1f9f9f"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-win_amd64.whl", hash = "sha256:1c8632d4ac04e6f91128fca584b3a8a507d81604c24eeaaad00d4be42765c32b"}, + {file = "pydantic_core-2.50.1-cp315-cp315t-win_arm64.whl", hash = "sha256:c3ede305158e75510be50869b319550ab072008c13d64d4ab1e094fb286b6f44"}, + {file = "pydantic_core-2.50.1-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:062e891facce5ca296a1c37098e5e466780457f86413894b399f0cf22934f769"}, + {file = "pydantic_core-2.50.1-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:49c2cbb2397fe4d0987e84606e691af6cb87bc0ee1bd3e7b737f7e10b4c142f9"}, + {file = "pydantic_core-2.50.1-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e4472072de0137ee0d8e72d6620e85939c271d2f90f6bbb4b15c24638b79f92"}, + {file = "pydantic_core-2.50.1-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ed4f3cef55164b026fefb41341b7754cc6b624c75dfe7142d2ecceb5ad21c87"}, + {file = "pydantic_core-2.50.1-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:76e2e83fa6ec8cdc972d438dafc2522b3a47bee4ec0ae668b29cfb1977ab5242"}, + {file = "pydantic_core-2.50.1-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:a51eee75939cf811ac09b278745a6cee7dc873ccfbc8b9af3cc88fe4b7ce25b5"}, + {file = "pydantic_core-2.50.1-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae28183297fb0d2b8dc46a1f01d51f5e45825fc5afe76a835a6cb7fb34821295"}, + {file = "pydantic_core-2.50.1-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88e492e8b9d0312e7dc13667c30222abf284dc3b79b5302b3607b41a5784ce61"}, + {file = "pydantic_core-2.50.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7456d699b13954e9c0164dcb267250a10ae0dfb03e6e26d6796ab0d46e189c84"}, + {file = "pydantic_core-2.50.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0d955195bbbe489ad343fcc956eacea9357b79cb22192c66cacdefcbc14b32f"}, + {file = "pydantic_core-2.50.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2c634642694e6a0dad2ab1d375589fa671fd442edd5caf7d9737b8f6ca22906"}, + {file = "pydantic_core-2.50.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ee6db2fbed51a7991302e8fac498cd67e336246026d0dfa84cf5166ce1412760"}, + {file = "pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:79490e33c4c0fcb933bbbcfc3a62184d8803b99f535863dfbb925e1bcb6945ad"}, + {file = "pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:48569b0ade9edfbe065cad1d700175546592aebbb42f02adcebcc26e75b896fe"}, + {file = "pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:5f3cae32fc46121f787cb2486de9cf95a8bf72aec5cc78f64c606fa1735a6ef5"}, + {file = "pydantic_core-2.50.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:7f476456ac2bb0d937f75191494a09c83a30765fea4f70f3b404942fe25f6cdf"}, + {file = "pydantic_core-2.50.1.tar.gz", hash = "sha256:e50d7b94baac6c7d09927fa5ca5800a0c7ee5015c7fcff65beb3a1931b5a6e09"}, +] + +[package.dependencies] +typing-extensions = ">=4.16.0" + +[[package]] +name = "pygments" +version = "2.21.0" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9"}, + {file = "pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + +[[package]] +name = "pytest" +version = "9.1.1" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c"}, + {file = "pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313"}, +] + +[package.dependencies] +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1.0.1" +packaging = ">=22" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} + +[package.extras] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "referencing" +version = "0.37.0" +description = "JSON Referencing + Python" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231"}, + {file = "referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8"}, +] + +[package.dependencies] +attrs = ">=22.2.0" +rpds-py = ">=0.7.0" +typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.13\""} + +[[package]] +name = "requests" +version = "2.34.2" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.10" +groups = ["main", "dev"] +files = [ + {file = "requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0"}, + {file = "requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed"}, +] + +[package.dependencies] +certifi = ">=2023.5.7" +charset_normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.26,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<8)"] + +[[package]] +name = "rpds-py" +version = "0.30.0" +description = "Python bindings to Rust's persistent data structures (rpds)" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "rpds_py-0.30.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:679ae98e00c0e8d68a7fda324e16b90fd5260945b45d3b824c892cec9eea3288"}, + {file = "rpds_py-0.30.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4cc2206b76b4f576934f0ed374b10d7ca5f457858b157ca52064bdfc26b9fc00"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:389a2d49eded1896c3d48b0136ead37c48e221b391c052fba3f4055c367f60a6"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:32c8528634e1bf7121f3de08fa85b138f4e0dc47657866630611b03967f041d7"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f207f69853edd6f6700b86efb84999651baf3789e78a466431df1331608e5324"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:67b02ec25ba7a9e8fa74c63b6ca44cf5707f2fbfadae3ee8e7494297d56aa9df"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0e95f6819a19965ff420f65578bacb0b00f251fefe2c8b23347c37174271f3"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:a452763cc5198f2f98898eb98f7569649fe5da666c2dc6b5ddb10fde5a574221"}, + {file = "rpds_py-0.30.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e0b65193a413ccc930671c55153a03ee57cecb49e6227204b04fae512eb657a7"}, + {file = "rpds_py-0.30.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:858738e9c32147f78b3ac24dc0edb6610000e56dc0f700fd5f651d0a0f0eb9ff"}, + {file = "rpds_py-0.30.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:da279aa314f00acbb803da1e76fa18666778e8a8f83484fba94526da5de2cba7"}, + {file = "rpds_py-0.30.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7c64d38fb49b6cdeda16ab49e35fe0da2e1e9b34bc38bd78386530f218b37139"}, + {file = "rpds_py-0.30.0-cp310-cp310-win32.whl", hash = "sha256:6de2a32a1665b93233cde140ff8b3467bdb9e2af2b91079f0333a0974d12d464"}, + {file = "rpds_py-0.30.0-cp310-cp310-win_amd64.whl", hash = "sha256:1726859cd0de969f88dc8673bdd954185b9104e05806be64bcd87badbe313169"}, + {file = "rpds_py-0.30.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a2bffea6a4ca9f01b3f8e548302470306689684e61602aa3d141e34da06cf425"}, + {file = "rpds_py-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc4f992dfe1e2bc3ebc7444f6c7051b4bc13cd8e33e43511e8ffd13bf407010d"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:422c3cb9856d80b09d30d2eb255d0754b23e090034e1deb4083f8004bd0761e4"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07ae8a593e1c3c6b82ca3292efbe73c30b61332fd612e05abee07c79359f292f"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12f90dd7557b6bd57f40abe7747e81e0c0b119bef015ea7726e69fe550e394a4"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:99b47d6ad9a6da00bec6aabe5a6279ecd3c06a329d4aa4771034a21e335c3a97"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33f559f3104504506a44bb666b93a33f5d33133765b0c216a5bf2f1e1503af89"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:946fe926af6e44f3697abbc305ea168c2c31d3e3ef1058cf68f379bf0335a78d"}, + {file = "rpds_py-0.30.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:495aeca4b93d465efde585977365187149e75383ad2684f81519f504f5c13038"}, + {file = "rpds_py-0.30.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9a0ca5da0386dee0655b4ccdf46119df60e0f10da268d04fe7cc87886872ba7"}, + {file = "rpds_py-0.30.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8d6d1cc13664ec13c1b84241204ff3b12f9bb82464b8ad6e7a5d3486975c2eed"}, + {file = "rpds_py-0.30.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3896fa1be39912cf0757753826bc8bdc8ca331a28a7c4ae46b7a21280b06bb85"}, + {file = "rpds_py-0.30.0-cp311-cp311-win32.whl", hash = "sha256:55f66022632205940f1827effeff17c4fa7ae1953d2b74a8581baaefb7d16f8c"}, + {file = "rpds_py-0.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:a51033ff701fca756439d641c0ad09a41d9242fa69121c7d8769604a0a629825"}, + {file = "rpds_py-0.30.0-cp311-cp311-win_arm64.whl", hash = "sha256:47b0ef6231c58f506ef0b74d44e330405caa8428e770fec25329ed2cb971a229"}, + {file = "rpds_py-0.30.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a161f20d9a43006833cd7068375a94d035714d73a172b681d8881820600abfad"}, + {file = "rpds_py-0.30.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6abc8880d9d036ecaafe709079969f56e876fcf107f7a8e9920ba6d5a3878d05"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca28829ae5f5d569bb62a79512c842a03a12576375d5ece7d2cadf8abe96ec28"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1010ed9524c73b94d15919ca4d41d8780980e1765babf85f9a2f90d247153dd"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8d1736cfb49381ba528cd5baa46f82fdc65c06e843dab24dd70b63d09121b3f"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d948b135c4693daff7bc2dcfc4ec57237a29bd37e60c2fabf5aff2bbacf3e2f1"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47f236970bccb2233267d89173d3ad2703cd36a0e2a6e92d0560d333871a3d23"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:2e6ecb5a5bcacf59c3f912155044479af1d0b6681280048b338b28e364aca1f6"}, + {file = "rpds_py-0.30.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a8fa71a2e078c527c3e9dc9fc5a98c9db40bcc8a92b4e8858e36d329f8684b51"}, + {file = "rpds_py-0.30.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:73c67f2db7bc334e518d097c6d1e6fed021bbc9b7d678d6cc433478365d1d5f5"}, + {file = "rpds_py-0.30.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5ba103fb455be00f3b1c2076c9d4264bfcb037c976167a6047ed82f23153f02e"}, + {file = "rpds_py-0.30.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7cee9c752c0364588353e627da8a7e808a66873672bcb5f52890c33fd965b394"}, + {file = "rpds_py-0.30.0-cp312-cp312-win32.whl", hash = "sha256:1ab5b83dbcf55acc8b08fc62b796ef672c457b17dbd7820a11d6c52c06839bdf"}, + {file = "rpds_py-0.30.0-cp312-cp312-win_amd64.whl", hash = "sha256:a090322ca841abd453d43456ac34db46e8b05fd9b3b4ac0c78bcde8b089f959b"}, + {file = "rpds_py-0.30.0-cp312-cp312-win_arm64.whl", hash = "sha256:669b1805bd639dd2989b281be2cfd951c6121b65e729d9b843e9639ef1fd555e"}, + {file = "rpds_py-0.30.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f83424d738204d9770830d35290ff3273fbb02b41f919870479fab14b9d303b2"}, + {file = "rpds_py-0.30.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e7536cd91353c5273434b4e003cbda89034d67e7710eab8761fd918ec6c69cf8"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2771c6c15973347f50fece41fc447c054b7ac2ae0502388ce3b6738cd366e3d4"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0a59119fc6e3f460315fe9d08149f8102aa322299deaa5cab5b40092345c2136"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:76fec018282b4ead0364022e3c54b60bf368b9d926877957a8624b58419169b7"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:692bef75a5525db97318e8cd061542b5a79812d711ea03dbc1f6f8dbb0c5f0d2"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9027da1ce107104c50c81383cae773ef5c24d296dd11c99e2629dbd7967a20c6"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:9cf69cdda1f5968a30a359aba2f7f9aa648a9ce4b580d6826437f2b291cfc86e"}, + {file = "rpds_py-0.30.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a4796a717bf12b9da9d3ad002519a86063dcac8988b030e405704ef7d74d2d9d"}, + {file = "rpds_py-0.30.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5d4c2aa7c50ad4728a094ebd5eb46c452e9cb7edbfdb18f9e1221f597a73e1e7"}, + {file = "rpds_py-0.30.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ba81a9203d07805435eb06f536d95a266c21e5b2dfbf6517748ca40c98d19e31"}, + {file = "rpds_py-0.30.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:945dccface01af02675628334f7cf49c2af4c1c904748efc5cf7bbdf0b579f95"}, + {file = "rpds_py-0.30.0-cp313-cp313-win32.whl", hash = "sha256:b40fb160a2db369a194cb27943582b38f79fc4887291417685f3ad693c5a1d5d"}, + {file = "rpds_py-0.30.0-cp313-cp313-win_amd64.whl", hash = "sha256:806f36b1b605e2d6a72716f321f20036b9489d29c51c91f4dd29a3e3afb73b15"}, + {file = "rpds_py-0.30.0-cp313-cp313-win_arm64.whl", hash = "sha256:d96c2086587c7c30d44f31f42eae4eac89b60dabbac18c7669be3700f13c3ce1"}, + {file = "rpds_py-0.30.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:eb0b93f2e5c2189ee831ee43f156ed34e2a89a78a66b98cadad955972548be5a"}, + {file = "rpds_py-0.30.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:922e10f31f303c7c920da8981051ff6d8c1a56207dbdf330d9047f6d30b70e5e"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdc62c8286ba9bf7f47befdcea13ea0e26bf294bda99758fd90535cbaf408000"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:47f9a91efc418b54fb8190a6b4aa7813a23fb79c51f4bb84e418f5476c38b8db"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f3587eb9b17f3789ad50824084fa6f81921bbf9a795826570bda82cb3ed91f2"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:39c02563fc592411c2c61d26b6c5fe1e51eaa44a75aa2c8735ca88b0d9599daa"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51a1234d8febafdfd33a42d97da7a43f5dcb120c1060e352a3fbc0c6d36e2083"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:eb2c4071ab598733724c08221091e8d80e89064cd472819285a9ab0f24bcedb9"}, + {file = "rpds_py-0.30.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6bdfdb946967d816e6adf9a3d8201bfad269c67efe6cefd7093ef959683c8de0"}, + {file = "rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c77afbd5f5250bf27bf516c7c4a016813eb2d3e116139aed0096940c5982da94"}, + {file = "rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:61046904275472a76c8c90c9ccee9013d70a6d0f73eecefd38c1ae7c39045a08"}, + {file = "rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c5f36a861bc4b7da6516dbdf302c55313afa09b81931e8280361a4f6c9a2d27"}, + {file = "rpds_py-0.30.0-cp313-cp313t-win32.whl", hash = "sha256:3d4a69de7a3e50ffc214ae16d79d8fbb0922972da0356dcf4d0fdca2878559c6"}, + {file = "rpds_py-0.30.0-cp313-cp313t-win_amd64.whl", hash = "sha256:f14fc5df50a716f7ece6a80b6c78bb35ea2ca47c499e422aa4463455dd96d56d"}, + {file = "rpds_py-0.30.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:68f19c879420aa08f61203801423f6cd5ac5f0ac4ac82a2368a9fcd6a9a075e0"}, + {file = "rpds_py-0.30.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ec7c4490c672c1a0389d319b3a9cfcd098dcdc4783991553c332a15acf7249be"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f251c812357a3fed308d684a5079ddfb9d933860fc6de89f2b7ab00da481e65f"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac98b175585ecf4c0348fd7b29c3864bda53b805c773cbf7bfdaffc8070c976f"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3e62880792319dbeb7eb866547f2e35973289e7d5696c6e295476448f5b63c87"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e7fc54e0900ab35d041b0601431b0a0eb495f0851a0639b6ef90f7741b39a18"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47e77dc9822d3ad616c3d5759ea5631a75e5809d5a28707744ef79d7a1bcfcad"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:b4dc1a6ff022ff85ecafef7979a2c6eb423430e05f1165d6688234e62ba99a07"}, + {file = "rpds_py-0.30.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4559c972db3a360808309e06a74628b95eaccbf961c335c8fe0d590cf587456f"}, + {file = "rpds_py-0.30.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0ed177ed9bded28f8deb6ab40c183cd1192aa0de40c12f38be4d59cd33cb5c65"}, + {file = "rpds_py-0.30.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ad1fa8db769b76ea911cb4e10f049d80bf518c104f15b3edb2371cc65375c46f"}, + {file = "rpds_py-0.30.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:46e83c697b1f1c72b50e5ee5adb4353eef7406fb3f2043d64c33f20ad1c2fc53"}, + {file = "rpds_py-0.30.0-cp314-cp314-win32.whl", hash = "sha256:ee454b2a007d57363c2dfd5b6ca4a5d7e2c518938f8ed3b706e37e5d470801ed"}, + {file = "rpds_py-0.30.0-cp314-cp314-win_amd64.whl", hash = "sha256:95f0802447ac2d10bcc69f6dc28fe95fdf17940367b21d34e34c737870758950"}, + {file = "rpds_py-0.30.0-cp314-cp314-win_arm64.whl", hash = "sha256:613aa4771c99f03346e54c3f038e4cc574ac09a3ddfb0e8878487335e96dead6"}, + {file = "rpds_py-0.30.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:7e6ecfcb62edfd632e56983964e6884851786443739dbfe3582947e87274f7cb"}, + {file = "rpds_py-0.30.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a1d0bc22a7cdc173fedebb73ef81e07faef93692b8c1ad3733b67e31e1b6e1b8"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d08f00679177226c4cb8c5265012eea897c8ca3b93f429e546600c971bcbae7"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5965af57d5848192c13534f90f9dd16464f3c37aaf166cc1da1cae1fd5a34898"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a4e86e34e9ab6b667c27f3211ca48f73dba7cd3d90f8d5b11be56e5dbc3fb4e"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5d3e6b26f2c785d65cc25ef1e5267ccbe1b069c5c21b8cc724efee290554419"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:626a7433c34566535b6e56a1b39a7b17ba961e97ce3b80ec62e6f1312c025551"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:acd7eb3f4471577b9b5a41baf02a978e8bdeb08b4b355273994f8b87032000a8"}, + {file = "rpds_py-0.30.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe5fa731a1fa8a0a56b0977413f8cacac1768dad38d16b3a296712709476fbd5"}, + {file = "rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:74a3243a411126362712ee1524dfc90c650a503502f135d54d1b352bd01f2404"}, + {file = "rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3e8eeb0544f2eb0d2581774be4c3410356eba189529a6b3e36bbbf9696175856"}, + {file = "rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dbd936cde57abfee19ab3213cf9c26be06d60750e60a8e4dd85d1ab12c8b1f40"}, + {file = "rpds_py-0.30.0-cp314-cp314t-win32.whl", hash = "sha256:dc824125c72246d924f7f796b4f63c1e9dc810c7d9e2355864b3c3a73d59ade0"}, + {file = "rpds_py-0.30.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27f4b0e92de5bfbc6f86e43959e6edd1425c33b5e69aab0984a72047f2bcf1e3"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c2262bdba0ad4fc6fb5545660673925c2d2a5d9e2e0fb603aad545427be0fc58"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:ee6af14263f25eedc3bb918a3c04245106a42dfd4f5c2285ea6f997b1fc3f89a"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3adbb8179ce342d235c31ab8ec511e66c73faa27a47e076ccc92421add53e2bb"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:250fa00e9543ac9b97ac258bd37367ff5256666122c2d0f2bc97577c60a1818c"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9854cf4f488b3d57b9aaeb105f06d78e5529d3145b1e4a41750167e8c213c6d3"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:993914b8e560023bc0a8bf742c5f303551992dcb85e247b1e5c7f4a7d145bda5"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58edca431fb9b29950807e301826586e5bbf24163677732429770a697ffe6738"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:dea5b552272a944763b34394d04577cf0f9bd013207bc32323b5a89a53cf9c2f"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ba3af48635eb83d03f6c9735dfb21785303e73d22ad03d489e88adae6eab8877"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:dff13836529b921e22f15cb099751209a60009731a68519630a24d61f0b1b30a"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:1b151685b23929ab7beec71080a8889d4d6d9fa9a983d213f07121205d48e2c4"}, + {file = "rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ac37f9f516c51e5753f27dfdef11a88330f04de2d564be3991384b2f3535d02e"}, + {file = "rpds_py-0.30.0.tar.gz", hash = "sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84"}, +] + +[[package]] +name = "tomli" +version = "2.5.0" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.11\"" +files = [ + {file = "tomli-2.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c4dc1c1781f2f716de763d1e9a7b34c6a894e167e291c7c5d16c72f7a9538545"}, + {file = "tomli-2.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:eff8babca5a7999bc137acbc7482a8b7e17ffca5075ab41f5d770ab408c7bfef"}, + {file = "tomli-2.5.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:86665cee9c4835b7a7f1e8ec2c719b5258d4dc782887aded5a8ae7352a96843b"}, + {file = "tomli-2.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7e369fd63331746182360977b1892bfc215476a30d61612d732425311639f56"}, + {file = "tomli-2.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7ad1ea345759240d6463efa0ed1c704402752e49aa21476620738d74d72d8aa1"}, + {file = "tomli-2.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:96243987194634bd411066ce40c952e108f86af04db533ecd8ac3ff2a85b1885"}, + {file = "tomli-2.5.0-cp311-cp311-win32.whl", hash = "sha256:610b27d99f28ec5f191c7064a48f3ddb179a1fe6ca73d571483ae859f57b605e"}, + {file = "tomli-2.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:c804ae44fe7b4bab5da295e4f980a1ff04670bca9d23fe0a4e887e08ebd741a8"}, + {file = "tomli-2.5.0-cp311-cp311-win_arm64.whl", hash = "sha256:cfac177ebd6236003846ea339981f71457cb6eb748f23381eb257e45092e3980"}, + {file = "tomli-2.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:1f4a40d03fb9f63424f0979855bdeaf44dd7696b8d59501822c10ed30ba532df"}, + {file = "tomli-2.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9ebf8d19b17bd0daeb7b7dec81a946a439b753942fd0210d6e96c532249eea6b"}, + {file = "tomli-2.5.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf0b5e8e0f68ebb494356e577c06c139161efd8d3b9050f93b39b7c26cc54ff0"}, + {file = "tomli-2.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6cf74416bdc94ae458b14e37286c1073081850ac8459a00d0c5efef5d44294c6"}, + {file = "tomli-2.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:61ea1ebe1e55a34ea8199cc8dbff398d35027b82271c8ac4802fd3a1fd5b1bcc"}, + {file = "tomli-2.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ed53f7e89bb04f6d9e8e7799112360b0c4d5cbff067de0814c98c37c39b920f7"}, + {file = "tomli-2.5.0-cp312-cp312-win32.whl", hash = "sha256:e7ad033e27a516a233bea839cdb77b80146facb3b4f40bf02cd0cac165cdd5c2"}, + {file = "tomli-2.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:bd05de8c1698f8413dd7d869492693a0bf2211543b787ac78cd5e7536af1a6d7"}, + {file = "tomli-2.5.0-cp312-cp312-win_arm64.whl", hash = "sha256:069435bd5480429b98c5e5afb02ab21c219b6f0064680671c6dc0d46817346ea"}, + {file = "tomli-2.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:943276cf269e0071948d9ff697159c1735e623c1151d88abb09b74659ef0cbea"}, + {file = "tomli-2.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:463b16086865b97facd8d0b3fb4cb7c544e3f58d2a69dc3113d6db9653fdb043"}, + {file = "tomli-2.5.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1245a6638fc4bb0a60af38a7d45413db34a13842027c77597c712c998c62fdf0"}, + {file = "tomli-2.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5d8bac3d603c97e6854424e5b2b5b741bdbde387e09f162fb0446812b4a8362b"}, + {file = "tomli-2.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:21e4cae4114aba25aa0d4f85cdf486d290fb35c0954d7bba536248da64d43066"}, + {file = "tomli-2.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bbaefc84548d754be821bba7c4141c4787dda182f9e77f2f87b71213529efa7b"}, + {file = "tomli-2.5.0-cp313-cp313-win32.whl", hash = "sha256:abdbf6313b8d9efe157edeb7ab6eae4de064b1300ad31abf73755154b30abe68"}, + {file = "tomli-2.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:fd4dc129784e0c5335bd4e61dfcc4487499a013419e655cf2da1d091b7e0efdc"}, + {file = "tomli-2.5.0-cp313-cp313-win_arm64.whl", hash = "sha256:69491c143d2fe063046e0301e62a810bed338fa4d1ce0fd870c27dc1e09b0d84"}, + {file = "tomli-2.5.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d3182ee2d887e507bd67319a0a61105d1dd33facc111329559a233b772c1a105"}, + {file = "tomli-2.5.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:521345fd1f19d45b8df87657aaa38b6f2ca3800059fadf428e7ebf479a383646"}, + {file = "tomli-2.5.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e95c7614e705bfe2b04b27aa124adec59752d15813df37e2156747cab3a006b"}, + {file = "tomli-2.5.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7ac2027d37c3afbdf4bdd377f2676f6f1d2122a5be1f1137b49dced590b37e75"}, + {file = "tomli-2.5.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c414be4ed9d3cac80c42e348fa5a956117d1a48227f48026e31f59cb4a7671eb"}, + {file = "tomli-2.5.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9b03d7dc168353b4132965bde20feceabaa470e570c6f59660dfae59b1f9eeb3"}, + {file = "tomli-2.5.0-cp314-cp314-win32.whl", hash = "sha256:6f041843c4d3a37245c0c056fd955b186bf8b1fb85690cbe40b81230891dc34b"}, + {file = "tomli-2.5.0-cp314-cp314-win_amd64.whl", hash = "sha256:f4b653094e18f9031102d3a1da5c729c8f222d85225b18037dac621695e46e1a"}, + {file = "tomli-2.5.0-cp314-cp314-win_arm64.whl", hash = "sha256:3f89d10c1ff6a38d992c27fc8a4816af71a909e08a40ec66934240b1e74347c3"}, + {file = "tomli-2.5.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:e9e15b4a6c7dd6b85b5fbab29488a73f1f70de516942308daa266bf0e0aeb0d4"}, + {file = "tomli-2.5.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e12bbcd32897272fb05929110362ae9ff4c1b9bb26bd9e971e71dcd3275b4c3d"}, + {file = "tomli-2.5.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20aa36de8f2cf87237143bc1fa1aae8d6612c09118f4da21c6a684db5dd1f6f9"}, + {file = "tomli-2.5.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22185fad8a1e622f064e78008018a0dd3323550dcb479cb7a1d296888d74024f"}, + {file = "tomli-2.5.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:984012f71908165449a951de2050d52f276bfe3aa5d5f570f63ddad814370374"}, + {file = "tomli-2.5.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f79203b3965b4000e91808aaa7c040206093f2b8bf86f455982f2274c9ccf442"}, + {file = "tomli-2.5.0-cp314-cp314t-win32.whl", hash = "sha256:91294a9fb94a75542f6e46e4a2ae709bd8d9b51134098cae5cf3bea5478b6d03"}, + {file = "tomli-2.5.0-cp314-cp314t-win_amd64.whl", hash = "sha256:f15e3e0b835a6d68b10c86bf80a3149780498d6911c93c3ffd1861d19f9200f1"}, + {file = "tomli-2.5.0-cp314-cp314t-win_arm64.whl", hash = "sha256:6664b7ae7af7294256c53960a6103077f4914cec8ff98479c352f622c6f6b2f0"}, + {file = "tomli-2.5.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:a525685c2f97da40762b8695eb7aa0af4c8344ca1905c73e4e29cb04d34607dc"}, + {file = "tomli-2.5.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:9dbb18c1cfb2f6517942fc9314437f66aa06d94436ffb1f06102ef3572f35276"}, + {file = "tomli-2.5.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:752e8b1aa6a4367ef8bf6a1a1e005540f7ed055ba36d7193796812ca5404eb52"}, + {file = "tomli-2.5.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c47300f9bf791808f77d82747691c4bb09cb14bdf3060cca99b42cdc4361d5a7"}, + {file = "tomli-2.5.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:19b0dd8749f4ea2f112c5fcfb3c5248390c899d7e2e173f1d91abee1fa0ff391"}, + {file = "tomli-2.5.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:57b1c3b01fab802e2899bc3d168dca320e14165e2fd9fd584760fb4ca5826859"}, + {file = "tomli-2.5.0-cp315-cp315-win32.whl", hash = "sha256:667e521b37a6c5ccaa044202c235b530f90177ffe2cd4a64ecc213c7dd535feb"}, + {file = "tomli-2.5.0-cp315-cp315-win_amd64.whl", hash = "sha256:d747252933c8a65ef6bd8da0fbb7ce28a90eb6119d8cd00772cd528aa07b68d5"}, + {file = "tomli-2.5.0-cp315-cp315-win_arm64.whl", hash = "sha256:75dbcde8751b0a960aa3de173aa5e894d590755c6d7758b7e774c06f1dc3cbdd"}, + {file = "tomli-2.5.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:2419c2a189551987b59d80e63ec355671283336f41c6b9b89462df679c7d0c57"}, + {file = "tomli-2.5.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:0dc598040da8d42cf20f0be588ed7004f46db12a0ac6c32e03a59dccedaaadcd"}, + {file = "tomli-2.5.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49096930c8d886c9bbdab62d2d0d17ce823ddeea522309a190b36245d5b49e01"}, + {file = "tomli-2.5.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8ade5023067f99fe72b88accd30d0ea05a158e9e32a11f124e731ea9695313f"}, + {file = "tomli-2.5.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:b69564772b5c8f22ea5f498dff08cfa825045b4d4c4400529000bdf818aa3b2a"}, + {file = "tomli-2.5.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:8ff3a2ca028c7eee0c777f9a092038d0a594a9fa04e215f929a22c329e2cb142"}, + {file = "tomli-2.5.0-cp315-cp315t-win32.whl", hash = "sha256:62fc1bc8eb03e3a9cadfca713d65614ed8e09d974a283295ffe3a831976b4dc5"}, + {file = "tomli-2.5.0-cp315-cp315t-win_amd64.whl", hash = "sha256:f3fcbc57b1791fa6cbe5d8434179d51de12be1a4811469529f47f6e7487a2571"}, + {file = "tomli-2.5.0-cp315-cp315t-win_arm64.whl", hash = "sha256:d2ba24db8a9376921b5e87b4762b9adb0f3f1deaea68f2b8b0bb2c11efb9c3e7"}, + {file = "tomli-2.5.0-py3-none-any.whl", hash = "sha256:32a7b79ac57a2e83670ce329ccf675798bc5a2094783a63676866b70503f2e2b"}, + {file = "tomli-2.5.0.tar.gz", hash = "sha256:264507556cd8b8c8e7c6ee037cdf443a463f03f4c958e57195e3d369711b8ff6"}, +] + +[[package]] +name = "typing-extensions" +version = "4.16.0" +description = "Backported and Experimental Type Hints for Python 3.9+" +optional = false +python-versions = ">=3.9" +groups = ["main", "dev"] +files = [ + {file = "typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8"}, + {file = "typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5"}, +] + +[[package]] +name = "typing-inspection" +version = "0.4.4" +description = "Runtime typing introspection tools" +optional = false +python-versions = ">=3.10" +groups = ["main", "dev"] +files = [ + {file = "typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147"}, + {file = "typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47"}, +] + +[package.dependencies] +typing-extensions = ">=4.15.0" + +[[package]] +name = "urllib3" +version = "2.8.0" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.10" +groups = ["main", "dev"] +files = [ + {file = "urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3"}, + {file = "urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63"}, +] + +[package.extras] +brotli = ["brotli (>=1.2.0)", "brotlicffi (>=1.2.0.0)"] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["backports-zstd (>=1.0.0)"] + +[[package]] +name = "websockets" +version = "16.1.1" +description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "websockets-16.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:49ae99bdfcae803a885c926bf14f886196e84925395bb3f568fef5c0f0979d7d"}, + {file = "websockets-16.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5bfd1ac19b1b9986a9c95a82d5e23a391ebb09e12c34d7be6094b86efcc35731"}, + {file = "websockets-16.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9246a0d063cfcbcc85f2359dd6876d681213f4790832272aa16641b4ed5d64d4"}, + {file = "websockets-16.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1214e673c404684b9bf7154f5cf43b45025b1a6160fac3a9e438e9c1a97e22cb"}, + {file = "websockets-16.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90001d893bc368e302ef168d82130b4e4fdd27b85fa094682df9b667c2d48838"}, + {file = "websockets-16.1.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:130937b167a52af203c8d58e78d67705874e82759862e3b9671a452fec4abc87"}, + {file = "websockets-16.1.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9c9f23004a3d40e89c01a7955d186a6cc83418d93b749701944ce2de3e95a1f3"}, + {file = "websockets-16.1.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f55f0b01956a094c8587146d9558c91937e78789c333860ffaf35931a6e5dbc4"}, + {file = "websockets-16.1.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6aaface73b9c71974c6497366d8b9628357f6c9749e09c4ea3610176c63f2ae3"}, + {file = "websockets-16.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dc0fad4933f427acd5b1cec210f3ea6dce7089e1724e4b9ec6ef47c6c04d1b3b"}, + {file = "websockets-16.1.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:f2769a0344a09e9ccf5b3cce538bc75a51b53eff3275d3896310c8552049195d"}, + {file = "websockets-16.1.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:f70541f3104339f59f830522d94ebadb1bf47426287381623443d8bb1cdbf33d"}, + {file = "websockets-16.1.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:dc385593a42e31cd6fb60c19f0ecb015b386603818fc2c6c274fb42bd2bb4165"}, + {file = "websockets-16.1.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:387e8e4aa5df2f90b198fa3cad3478822a89cf905b6a6d6c97dc3664689640cc"}, + {file = "websockets-16.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:fd46fff7eb62c24804d234f0051c7a8ea81285ad63e0337d3dcf33ca82aee58a"}, + {file = "websockets-16.1.1-cp310-cp310-win32.whl", hash = "sha256:7883388947767080f094950b342b30d35a2a06b849cd967c422fa0db72b40ea9"}, + {file = "websockets-16.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:d57685547e0060cc6fd90ee6a28405d6bd395e525545f13c8d7cd99c78afd79f"}, + {file = "websockets-16.1.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d0fcf657e9f13ff4b177960ab2200237b12994232dfb6df16f1cfe1d4339f93c"}, + {file = "websockets-16.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b852788aa51764e2d8e4cf5493d559326bcae5e38d16ba25ffa322b034df272a"}, + {file = "websockets-16.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1427fb4cf0d72f66333e2cacc3ff5f575bf2d7008166ce991a4a470b21d51a22"}, + {file = "websockets-16.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:da4ca1a9d72f9030b3146b8d7022719a9f3d478f61efe6f7dd51d243f61c51b2"}, + {file = "websockets-16.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:86d7f0f8bdb25d2c632b72527325e4776430fd5bc61b9118de4e2b8ddb5f5b01"}, + {file = "websockets-16.1.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7dfcad78ea1492ee3a9ec765cb7f51bbc17d477107aaf6b22abf7b2558d1c5a0"}, + {file = "websockets-16.1.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fb9a0a6dc3d1b3986cb88091b6899f0396651e0f74e2c9766ab8d6ffc3842e29"}, + {file = "websockets-16.1.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29dfa8114c4a620c69591c5973860f768eac29d3fd6904f37f34266cb219c512"}, + {file = "websockets-16.1.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6ff9417c0ada4d0f7d212f928303e5579bdf3ace4c802fa4afabb30995da58c3"}, + {file = "websockets-16.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fe0b50da2d84535fb4f7b4bfa951280f97ce3d558a0443b541166d609e67b57"}, + {file = "websockets-16.1.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:34420aaa64440ebd51ac72ca8a45ef4626429438c9b02e633ae412ed43f925d3"}, + {file = "websockets-16.1.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a6a61aff018180c9c50b7b0da33bfd29d378af3497429c95006c589a23a11648"}, + {file = "websockets-16.1.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:04fd29a0e2fe9414a95b00e92c67ae51bf900c50c0f8a4b2dafdad621f49ea1d"}, + {file = "websockets-16.1.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5c31aa7e39ee3e8a358573257f1c0bb5c52430d1b637030dd9c8cc2c282926be"}, + {file = "websockets-16.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d14bfb217eb4701e850f1525c9d29d79c44794cdf1c299ead25f39f8c78dea81"}, + {file = "websockets-16.1.1-cp311-cp311-win32.whl", hash = "sha256:2e28e602bb13da44fbe518c1781a88e3b9d4c3d48d02c9bad83e546164336f57"}, + {file = "websockets-16.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:7421fad442de870a8cbf2287d1cad7e706ece0dbfeba5e911df132cbdc1cb56a"}, + {file = "websockets-16.1.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:cc97814dfb786a83b6e2dc2e79351e1b83e6d715647d6887fcabd83026417a00"}, + {file = "websockets-16.1.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e047dc87ef7ca50f4d309bf775ad4a71711c58556d75d7bd0604b2317f43e94b"}, + {file = "websockets-16.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:01fbdcbac298efe19360b94bc0039c8f746f0220ba570f327577bfee81059175"}, + {file = "websockets-16.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:0f62863e8a00a6d33c3d6566ec0b89f23787b747ffe0c3bc71ec0e76b82c94b1"}, + {file = "websockets-16.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8087e82f842609734c9b5a1330464f8e94e346ba0e18c832c08bafa4b0d63c15"}, + {file = "websockets-16.1.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2bb5d041a8307d2e18782e7ce777f6fdb1e8c2f5d09291484b18c294b789d9aa"}, + {file = "websockets-16.1.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1db4de4a0e95673f7545d393c49eeb0c2f18ac1ef93073218c79d5cdb2ee75ab"}, + {file = "websockets-16.1.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f17dbe07eb3ea7f99e4df9b7e0efefe80fbf30d37a8cc4d561a0aed310bc8847"}, + {file = "websockets-16.1.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4b57693728576d84ede0a77987ab16881b783d2cd9f1dc180a8fbbc3f79c4428"}, + {file = "websockets-16.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2a636ff1e7a5c4edf71ef0e79adae7f25dba93b4fcbe3dc958733477ffeb0eaf"}, + {file = "websockets-16.1.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d6bec75c290fe484a8ba4cacdf838501e17c06ecfbbf31eede81a9e431bd7751"}, + {file = "websockets-16.1.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:54509b8e92fee4453e152b7558ddef37ce9705a044922f2095a6105e3f80c96f"}, + {file = "websockets-16.1.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:f0aa4aad3b1b69ad3fd85a0fd0952ec64331c762bd77ec51cc814170873890b2"}, + {file = "websockets-16.1.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:42290eb6db4ccaca7012656738214f8514082fb6fa40cdeb61bb9a471b52e383"}, + {file = "websockets-16.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:53260c8930da5771cec89439bff99c20c8cb03ddb9588b980697355a83cd4bd3"}, + {file = "websockets-16.1.1-cp312-cp312-win32.whl", hash = "sha256:1d27fa8462ad6a1cb36206a3d0640b2333340def181fae11ed7f9adeaa5c0747"}, + {file = "websockets-16.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:b436f6ec4fc3a6b4237c84d3f83170ed2b40bb584222f0ac47a0c8a5921980c7"}, + {file = "websockets-16.1.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ab59169ace05dcb49a1d4118f0bde139557adf45091bd85747e36bf5de984dd1"}, + {file = "websockets-16.1.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5e3b7d601f6f84156b08cc4a5e541c2b50ad7b36cfc302b657a12477c904a5df"}, + {file = "websockets-16.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cd2ca96a082a36964aca83e992f72abeb61b7306c1a6cba4c7d06a7b93750cac"}, + {file = "websockets-16.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f5d497865f05bb222cab7016c6034542e84e5f29f49c6fd3f4939cda7197b5b8"}, + {file = "websockets-16.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bae954c382e013d5ea5b190d2830526bfa45ad121c326da0049b8c769f185db6"}, + {file = "websockets-16.1.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e09f753a169951eb4f28c2c774f71069304f66e7277e0f5a2892423599cfa854"}, + {file = "websockets-16.1.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:024193f8551a2b0eafbdd160911012c4e6c228c28430c84433253299a9e42d6a"}, + {file = "websockets-16.1.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:aabe464bfd13bd25f4821faf111da6fefdc389f870265a53105580e45b0a2e49"}, + {file = "websockets-16.1.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a28fcbc9b6baf54a2e23f8655f308e4ccc6afdd7266f8fe7954f320dcda0f785"}, + {file = "websockets-16.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:79eace538c6a97e96d0d03d4f9d314f9677f5ed85a8a984992ffd90b13cb8a56"}, + {file = "websockets-16.1.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:496af849a472b531f758dbd4d61338f5000538cb1a7b3d20d9d32a264517f509"}, + {file = "websockets-16.1.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5283810d2646741a0d8da2aa733d6aefa0545809afccb2a5d105a26bc45125f1"}, + {file = "websockets-16.1.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:4e3b680b1e0a27457e727a0d572fd81dffa87b6dbf8b228ab57da64f7d85aead"}, + {file = "websockets-16.1.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:69159730a823dde3ea8d08783e8d47ef135a6d7e8d44eb127e32b321c9db8e3e"}, + {file = "websockets-16.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ed5bb271084b46530ee2ddc0410537a9961152c5ccba2fc98c5276d992ccba87"}, + {file = "websockets-16.1.1-cp313-cp313-win32.whl", hash = "sha256:cfb70b4eb56cac4da0a83588f3ad50d46beb0690391082f3d4e2d488c70b68ea"}, + {file = "websockets-16.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:d9531d9cbeac99af6f038fb1bc351403531f7d634a2c2e10e2f7c854c6ed5b68"}, + {file = "websockets-16.1.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:443aefe96b7fdb132e2a70806cca1f2af49bb3f28e47abcd7c2e9dcf4d8fa1b8"}, + {file = "websockets-16.1.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:6456ff333092d509127d75a638cb411afae8ff17f092635015d1902efec8a293"}, + {file = "websockets-16.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:fce6c48559c86d1ac3632ccb1bebc7d5442fbe79bd9bb0e40379ee54be2a4051"}, + {file = "websockets-16.1.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:92b820d345f7a3fc7b8163949ee92df910f290c3fc517b3d5301c78065adafe1"}, + {file = "websockets-16.1.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2a606d9c24035242a3e256e9d5b77ed9cd6bccfcb7cf993e5ca3c0f6f68fb6a7"}, + {file = "websockets-16.1.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:414e596c75f74e0994084694189d7dc9229fb278e33064d6784b73ffbba3ca31"}, + {file = "websockets-16.1.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:536676848fc5961aca9d20389951f59169508f765637a172403dc5434d722fa0"}, + {file = "websockets-16.1.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:97fd3a0e8b53efa41970ac1dff3d8cf0d2884cadeb4caaf95db7ad1526926ee3"}, + {file = "websockets-16.1.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7b1b19636af86a3c7995d4d028dbe376f39b4bf31541146f9c123582a6c94562"}, + {file = "websockets-16.1.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:41c8e77f17294c0ac18008a7309b99b34ee72247ef10b6dff4c3f8b5ac29896b"}, + {file = "websockets-16.1.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:9f63bcef7f4b02b06b35fc01c93b96c43b5e88e1e8868676caacf493d5a31f3a"}, + {file = "websockets-16.1.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:dab9eb87869da2d6ed3af3f3adf28414baae6ec9d4df355ffc18889132f3436c"}, + {file = "websockets-16.1.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:43e3a9fdd7cbf7ba6040c31fae0faf84ca1474fef777c4e37912f1540f854499"}, + {file = "websockets-16.1.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:056ae37939ed7e9974f364f5864e76e49182622d8f9751ac1903c0d09b013985"}, + {file = "websockets-16.1.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a0eadbbf2c30f01efa58e1f110eb6fa293261f6b0b1aa38f7f48707107690af9"}, + {file = "websockets-16.1.1-cp314-cp314-win32.whl", hash = "sha256:195c978b065fa40910582464f99d6b15c8b314c68e0546549a55ed83f4735328"}, + {file = "websockets-16.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:4e8d01cc3bcae7bbf8167f944aeafefed590fae5693552bba9794a9df68371cc"}, + {file = "websockets-16.1.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0ffd3031ea8bda8d61762e84220186105ba3b748b3c8da2ae4f7816fac03e573"}, + {file = "websockets-16.1.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:84a2cef8deffbd9ab8ee0ea546a2a6a7030c28f44e6cdd4547dbfeb489eb8999"}, + {file = "websockets-16.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:3df13f73af9b3b38ab1195eb299ecb67a4330c911c97ae04043ff74085728abe"}, + {file = "websockets-16.1.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:23253dd5bcae3f9aaee0a1d30967a8dbd52e5d3cff93a2e5b84df57b77d4750d"}, + {file = "websockets-16.1.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c1c5705e314449e3308872fe084b8571ce078ee4fc55a98a769bdefe5917392"}, + {file = "websockets-16.1.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:69e52d175a0a7d1e13b4b67ad41c560b7d98e8c6f6126eb0bda496c784faf8c7"}, + {file = "websockets-16.1.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1f79c89b5eb034d1722938a891916582f8f7f503f58ca22518a63c3f2cd18499"}, + {file = "websockets-16.1.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:39f2a024af5c345ffe8fcf1ee18c049c024c94df393bb09b044a6917c77bde43"}, + {file = "websockets-16.1.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:952303a7318d4cbe1011400839bb2051c9f84fa0a35923267f5daba34b15d458"}, + {file = "websockets-16.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:249116b4a76063d930a46391ad56e135c286e4562a18309029fc2c73f4ed4c62"}, + {file = "websockets-16.1.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:61922544a0587a13fd3f53e4c0e5e606510c7b0d9d22c8444e5fae22a06b38cb"}, + {file = "websockets-16.1.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:46dcaa042cd1de6c59e7d9269fa63ff7572b6df40510600b678f0826b3c7af51"}, + {file = "websockets-16.1.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:38565aca3e01ea8734e578fb2118dade0ecb0250533f29e22b8d1a7a196cf4d0"}, + {file = "websockets-16.1.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:42f599f4d48c7e1a3338fdaac3acd075be3b3cf02d4b274f3bf2767aedd3d217"}, + {file = "websockets-16.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dcc04fedf83effaeb9cce98abc9469bb1b42ef85f03e01c8c1f4438ef7555737"}, + {file = "websockets-16.1.1-cp314-cp314t-win32.whl", hash = "sha256:8483c2096363120eea8b07c06ae7304d520f686665fffd4811fad423930a65d7"}, + {file = "websockets-16.1.1-cp314-cp314t-win_amd64.whl", hash = "sha256:bcce07e23e5769375158f5efdcdafa8d5cd014b93c6683865b840ed65b96f231"}, + {file = "websockets-16.1.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:820fb8450edddae3812fd58cbc08e2bf22812cb248ecb5f06dbb82119a56e869"}, + {file = "websockets-16.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:125f22dbefaf1554fea66fc83851490edb284ce4f501d37ffed2752f418332d9"}, + {file = "websockets-16.1.1-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:30bbe120437b5648a77d3519b7024ea09530e0b5b18d3698c5a0ae536fe0cc2e"}, + {file = "websockets-16.1.1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b6b9dadbef0cccd9f4c4ee96b08898afa73e26803bbe0f6aeb5bb12b0074206d"}, + {file = "websockets-16.1.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56cd5fc4f10a9ea8aa0804bddb7b42506cf9e136046f3b4c27de8fec9e2ecba5"}, + {file = "websockets-16.1.1-py3-none-any.whl", hash = "sha256:6abbd3e82c731c8e531714466acd5d87b5e88ac3243465337ba71d68e23ae7e3"}, + {file = "websockets-16.1.1.tar.gz", hash = "sha256:db234eda965dcce15df96bb9709f587cd87d4d52aaf0e80e2f34ec04c7670c57"}, +] + +[[package]] +name = "wrapt" +version = "1.17.3" +description = "Module for decorators, wrappers and monkey patching." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "wrapt-1.17.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88bbae4d40d5a46142e70d58bf664a89b6b4befaea7b2ecc14e03cedb8e06c04"}, + {file = "wrapt-1.17.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6b13af258d6a9ad602d57d889f83b9d5543acd471eee12eb51f5b01f8eb1bc2"}, + {file = "wrapt-1.17.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd341868a4b6714a5962c1af0bd44f7c404ef78720c7de4892901e540417111c"}, + {file = "wrapt-1.17.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f9b2601381be482f70e5d1051a5965c25fb3625455a2bf520b5a077b22afb775"}, + {file = "wrapt-1.17.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:343e44b2a8e60e06a7e0d29c1671a0d9951f59174f3709962b5143f60a2a98bd"}, + {file = "wrapt-1.17.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:33486899acd2d7d3066156b03465b949da3fd41a5da6e394ec49d271baefcf05"}, + {file = "wrapt-1.17.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e6f40a8aa5a92f150bdb3e1c44b7e98fb7113955b2e5394122fa5532fec4b418"}, + {file = "wrapt-1.17.3-cp310-cp310-win32.whl", hash = "sha256:a36692b8491d30a8c75f1dfee65bef119d6f39ea84ee04d9f9311f83c5ad9390"}, + {file = "wrapt-1.17.3-cp310-cp310-win_amd64.whl", hash = "sha256:afd964fd43b10c12213574db492cb8f73b2f0826c8df07a68288f8f19af2ebe6"}, + {file = "wrapt-1.17.3-cp310-cp310-win_arm64.whl", hash = "sha256:af338aa93554be859173c39c85243970dc6a289fa907402289eeae7543e1ae18"}, + {file = "wrapt-1.17.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:273a736c4645e63ac582c60a56b0acb529ef07f78e08dc6bfadf6a46b19c0da7"}, + {file = "wrapt-1.17.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5531d911795e3f935a9c23eb1c8c03c211661a5060aab167065896bbf62a5f85"}, + {file = "wrapt-1.17.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0610b46293c59a3adbae3dee552b648b984176f8562ee0dba099a56cfbe4df1f"}, + {file = "wrapt-1.17.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b32888aad8b6e68f83a8fdccbf3165f5469702a7544472bdf41f582970ed3311"}, + {file = "wrapt-1.17.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cccf4f81371f257440c88faed6b74f1053eef90807b77e31ca057b2db74edb1"}, + {file = "wrapt-1.17.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8a210b158a34164de8bb68b0e7780041a903d7b00c87e906fb69928bf7890d5"}, + {file = "wrapt-1.17.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:79573c24a46ce11aab457b472efd8d125e5a51da2d1d24387666cd85f54c05b2"}, + {file = "wrapt-1.17.3-cp311-cp311-win32.whl", hash = "sha256:c31eebe420a9a5d2887b13000b043ff6ca27c452a9a22fa71f35f118e8d4bf89"}, + {file = "wrapt-1.17.3-cp311-cp311-win_amd64.whl", hash = "sha256:0b1831115c97f0663cb77aa27d381237e73ad4f721391a9bfb2fe8bc25fa6e77"}, + {file = "wrapt-1.17.3-cp311-cp311-win_arm64.whl", hash = "sha256:5a7b3c1ee8265eb4c8f1b7d29943f195c00673f5ab60c192eba2d4a7eae5f46a"}, + {file = "wrapt-1.17.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ab232e7fdb44cdfbf55fc3afa31bcdb0d8980b9b95c38b6405df2acb672af0e0"}, + {file = "wrapt-1.17.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9baa544e6acc91130e926e8c802a17f3b16fbea0fd441b5a60f5cf2cc5c3deba"}, + {file = "wrapt-1.17.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6b538e31eca1a7ea4605e44f81a48aa24c4632a277431a6ed3f328835901f4fd"}, + {file = "wrapt-1.17.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:042ec3bb8f319c147b1301f2393bc19dba6e176b7da446853406d041c36c7828"}, + {file = "wrapt-1.17.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3af60380ba0b7b5aeb329bc4e402acd25bd877e98b3727b0135cb5c2efdaefe9"}, + {file = "wrapt-1.17.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0b02e424deef65c9f7326d8c19220a2c9040c51dc165cddb732f16198c168396"}, + {file = "wrapt-1.17.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:74afa28374a3c3a11b3b5e5fca0ae03bef8450d6aa3ab3a1e2c30e3a75d023dc"}, + {file = "wrapt-1.17.3-cp312-cp312-win32.whl", hash = "sha256:4da9f45279fff3543c371d5ababc57a0384f70be244de7759c85a7f989cb4ebe"}, + {file = "wrapt-1.17.3-cp312-cp312-win_amd64.whl", hash = "sha256:e71d5c6ebac14875668a1e90baf2ea0ef5b7ac7918355850c0908ae82bcb297c"}, + {file = "wrapt-1.17.3-cp312-cp312-win_arm64.whl", hash = "sha256:604d076c55e2fdd4c1c03d06dc1a31b95130010517b5019db15365ec4a405fc6"}, + {file = "wrapt-1.17.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a47681378a0439215912ef542c45a783484d4dd82bac412b71e59cf9c0e1cea0"}, + {file = "wrapt-1.17.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:54a30837587c6ee3cd1a4d1c2ec5d24e77984d44e2f34547e2323ddb4e22eb77"}, + {file = "wrapt-1.17.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:16ecf15d6af39246fe33e507105d67e4b81d8f8d2c6598ff7e3ca1b8a37213f7"}, + {file = "wrapt-1.17.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6fd1ad24dc235e4ab88cda009e19bf347aabb975e44fd5c2fb22a3f6e4141277"}, + {file = "wrapt-1.17.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ed61b7c2d49cee3c027372df5809a59d60cf1b6c2f81ee980a091f3afed6a2d"}, + {file = "wrapt-1.17.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:423ed5420ad5f5529db9ce89eac09c8a2f97da18eb1c870237e84c5a5c2d60aa"}, + {file = "wrapt-1.17.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e01375f275f010fcbf7f643b4279896d04e571889b8a5b3f848423d91bf07050"}, + {file = "wrapt-1.17.3-cp313-cp313-win32.whl", hash = "sha256:53e5e39ff71b3fc484df8a522c933ea2b7cdd0d5d15ae82e5b23fde87d44cbd8"}, + {file = "wrapt-1.17.3-cp313-cp313-win_amd64.whl", hash = "sha256:1f0b2f40cf341ee8cc1a97d51ff50dddb9fcc73241b9143ec74b30fc4f44f6cb"}, + {file = "wrapt-1.17.3-cp313-cp313-win_arm64.whl", hash = "sha256:7425ac3c54430f5fc5e7b6f41d41e704db073309acfc09305816bc6a0b26bb16"}, + {file = "wrapt-1.17.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cf30f6e3c077c8e6a9a7809c94551203c8843e74ba0c960f4a98cd80d4665d39"}, + {file = "wrapt-1.17.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e228514a06843cae89621384cfe3a80418f3c04aadf8a3b14e46a7be704e4235"}, + {file = "wrapt-1.17.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:5ea5eb3c0c071862997d6f3e02af1d055f381b1d25b286b9d6644b79db77657c"}, + {file = "wrapt-1.17.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:281262213373b6d5e4bb4353bc36d1ba4084e6d6b5d242863721ef2bf2c2930b"}, + {file = "wrapt-1.17.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dc4a8d2b25efb6681ecacad42fca8859f88092d8732b170de6a5dddd80a1c8fa"}, + {file = "wrapt-1.17.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:373342dd05b1d07d752cecbec0c41817231f29f3a89aa8b8843f7b95992ed0c7"}, + {file = "wrapt-1.17.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d40770d7c0fd5cbed9d84b2c3f2e156431a12c9a37dc6284060fb4bec0b7ffd4"}, + {file = "wrapt-1.17.3-cp314-cp314-win32.whl", hash = "sha256:fbd3c8319de8e1dc79d346929cd71d523622da527cca14e0c1d257e31c2b8b10"}, + {file = "wrapt-1.17.3-cp314-cp314-win_amd64.whl", hash = "sha256:e1a4120ae5705f673727d3253de3ed0e016f7cd78dc463db1b31e2463e1f3cf6"}, + {file = "wrapt-1.17.3-cp314-cp314-win_arm64.whl", hash = "sha256:507553480670cab08a800b9463bdb881b2edeed77dc677b0a5915e6106e91a58"}, + {file = "wrapt-1.17.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ed7c635ae45cfbc1a7371f708727bf74690daedc49b4dba310590ca0bd28aa8a"}, + {file = "wrapt-1.17.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:249f88ed15503f6492a71f01442abddd73856a0032ae860de6d75ca62eed8067"}, + {file = "wrapt-1.17.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a03a38adec8066d5a37bea22f2ba6bbf39fcdefbe2d91419ab864c3fb515454"}, + {file = "wrapt-1.17.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:5d4478d72eb61c36e5b446e375bbc49ed002430d17cdec3cecb36993398e1a9e"}, + {file = "wrapt-1.17.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:223db574bb38637e8230eb14b185565023ab624474df94d2af18f1cdb625216f"}, + {file = "wrapt-1.17.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e405adefb53a435f01efa7ccdec012c016b5a1d3f35459990afc39b6be4d5056"}, + {file = "wrapt-1.17.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:88547535b787a6c9ce4086917b6e1d291aa8ed914fdd3a838b3539dc95c12804"}, + {file = "wrapt-1.17.3-cp314-cp314t-win32.whl", hash = "sha256:41b1d2bc74c2cac6f9074df52b2efbef2b30bdfe5f40cb78f8ca22963bc62977"}, + {file = "wrapt-1.17.3-cp314-cp314t-win_amd64.whl", hash = "sha256:73d496de46cd2cdbdbcce4ae4bcdb4afb6a11234a1df9c085249d55166b95116"}, + {file = "wrapt-1.17.3-cp314-cp314t-win_arm64.whl", hash = "sha256:f38e60678850c42461d4202739f9bf1e3a737c7ad283638251e79cc49effb6b6"}, + {file = "wrapt-1.17.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:70d86fa5197b8947a2fa70260b48e400bf2ccacdcab97bb7de47e3d1e6312225"}, + {file = "wrapt-1.17.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:df7d30371a2accfe4013e90445f6388c570f103d61019b6b7c57e0265250072a"}, + {file = "wrapt-1.17.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:caea3e9c79d5f0d2c6d9ab96111601797ea5da8e6d0723f77eabb0d4068d2b2f"}, + {file = "wrapt-1.17.3-cp38-cp38-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:758895b01d546812d1f42204bd443b8c433c44d090248bf22689df673ccafe00"}, + {file = "wrapt-1.17.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:02b551d101f31694fc785e58e0720ef7d9a10c4e62c1c9358ce6f63f23e30a56"}, + {file = "wrapt-1.17.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:656873859b3b50eeebe6db8b1455e99d90c26ab058db8e427046dbc35c3140a5"}, + {file = "wrapt-1.17.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:a9a2203361a6e6404f80b99234fe7fb37d1fc73487b5a78dc1aa5b97201e0f22"}, + {file = "wrapt-1.17.3-cp38-cp38-win32.whl", hash = "sha256:55cbbc356c2842f39bcc553cf695932e8b30e30e797f961860afb308e6b1bb7c"}, + {file = "wrapt-1.17.3-cp38-cp38-win_amd64.whl", hash = "sha256:ad85e269fe54d506b240d2d7b9f5f2057c2aa9a2ea5b32c66f8902f768117ed2"}, + {file = "wrapt-1.17.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:30ce38e66630599e1193798285706903110d4f057aab3168a34b7fdc85569afc"}, + {file = "wrapt-1.17.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:65d1d00fbfb3ea5f20add88bbc0f815150dbbde3b026e6c24759466c8b5a9ef9"}, + {file = "wrapt-1.17.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a7c06742645f914f26c7f1fa47b8bc4c91d222f76ee20116c43d5ef0912bba2d"}, + {file = "wrapt-1.17.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7e18f01b0c3e4a07fe6dfdb00e29049ba17eadbc5e7609a2a3a4af83ab7d710a"}, + {file = "wrapt-1.17.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f5f51a6466667a5a356e6381d362d259125b57f059103dd9fdc8c0cf1d14139"}, + {file = "wrapt-1.17.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:59923aa12d0157f6b82d686c3fd8e1166fa8cdfb3e17b42ce3b6147ff81528df"}, + {file = "wrapt-1.17.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:46acc57b331e0b3bcb3e1ca3b421d65637915cfcd65eb783cb2f78a511193f9b"}, + {file = "wrapt-1.17.3-cp39-cp39-win32.whl", hash = "sha256:3e62d15d3cfa26e3d0788094de7b64efa75f3a53875cdbccdf78547aed547a81"}, + {file = "wrapt-1.17.3-cp39-cp39-win_amd64.whl", hash = "sha256:1f23fa283f51c890eda8e34e4937079114c74b4c81d2b2f1f1d94948f5cc3d7f"}, + {file = "wrapt-1.17.3-cp39-cp39-win_arm64.whl", hash = "sha256:24c2ed34dc222ed754247a2702b1e1e89fdbaa4016f324b4b8f1a802d4ffe87f"}, + {file = "wrapt-1.17.3-py3-none-any.whl", hash = "sha256:7171ae35d2c33d326ac19dd8facb1e82e5fd04ef8c6c0e394d7af55a55051c22"}, + {file = "wrapt-1.17.3.tar.gz", hash = "sha256:f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0"}, +] + +[metadata] +lock-version = "2.1" +python-versions = ">=3.10,<3.14" +content-hash = "37fb6da6eff2943627edd68a064af7443c5a48bff821997bd1076d5e6da4331d" diff --git a/python/frameworks/elevenlabs-agents/pyproject.toml b/python/frameworks/elevenlabs-agents/pyproject.toml new file mode 100644 index 000000000..3e38523a4 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/pyproject.toml @@ -0,0 +1,43 @@ +[tool.poetry] +name = "traceAI-elevenlabs-agents" +version = "0.1.0" +description = "Forward ElevenLabs Agents post-call OpenTelemetry traces to Future AGI (Observe Voice tab)" +authors = ["Future AGI "] +license = "Apache-2.0" +readme = "README.md" +packages = [ + { include = "traceai_elevenlabs_agents" } +] +keywords = ["opentelemetry", "elevenlabs", "voice", "agents", "webhook", "tracing", "observability"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: System :: Monitoring", +] + +[tool.poetry.dependencies] +python = ">=3.10,<3.14" +# For fi_instrumentation.TraceConfig only: the same FI_HIDE_* privacy switch every +# traceAI instrumentor uses. HMAC, the HTTP server, the OTLP/HTTP JSON export and the +# SQLite idempotency record are standard library. The ElevenLabs SDK is a test +# oracle, not a dependency. +fi-instrumentation-otel = ">=0.1.11" + +[tool.poetry.group.dev.dependencies] +pytest = ">=7.0.0" +# Signature oracle (construct_event). 2.73.0 is the latest stable on 2026-10-15; +# the tests also pass against 2.70.0, the version the PRD pinned. +elevenlabs = "2.73.0" + +[tool.poetry.scripts] +traceai-elevenlabs-agents = "traceai_elevenlabs_agents.cli:main" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/python/frameworks/elevenlabs-agents/tests/conftest.py b/python/frameworks/elevenlabs-agents/tests/conftest.py new file mode 100644 index 000000000..d613ef9f8 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/conftest.py @@ -0,0 +1,115 @@ +import json +import logging +import os +import sys +from pathlib import Path +from typing import Any, Dict, List + +import pytest +from fi_instrumentation import TraceConfig + +sys.path.insert(0, str(Path(__file__).resolve().parent)) + +from traceai_elevenlabs_agents.config import ForwarderConfig # noqa: E402 +from traceai_elevenlabs_agents.forwarder import Forwarder # noqa: E402 +from traceai_elevenlabs_agents.store import ForwardedStore # noqa: E402 + +FIXTURES = Path(__file__).resolve().parent / "fixtures" +MARKER = "zqx-th8231-privacy-marker-7f3a" +WEBHOOK_SECRET = "wsec_test_9c1d7e0b5a8f4d2e9b6c3a1f0e7d4c2b" +FI_API_KEY = "fi_test_api_key_0123456789abcdef" +FI_SECRET_KEY = "fi_test_secret_key_fedcba9876543210" +#: The four standard switches the privacy proof turns on (FI_HIDE_INPUTS, FI_HIDE_OUTPUTS, +#: FI_HIDE_INPUT_MESSAGES, FI_HIDE_OUTPUT_MESSAGES). +HIDE_ENV = ("FI_HIDE_INPUTS", "FI_HIDE_OUTPUTS", "FI_HIDE_INPUT_MESSAGES", "FI_HIDE_OUTPUT_MESSAGES") +# Values the stand-in payload carries that must never be exported in ANY mode: host, +# path, user name, email, stack trace, signed URL, a foreign project. +NEVER_NEEDLES = ( + "alice", + "/Users/", + "/home/", + "example.com", + "Traceback", + "X-Goog-Signature", + "someone-elses-project", + "host.name", + "process.executable.path", + "exception.stacktrace", +) + + +def hide_all() -> TraceConfig: + return TraceConfig(hide_inputs=True, hide_outputs=True, hide_input_messages=True, hide_output_messages=True) + + +@pytest.fixture(autouse=True) +def _standard_trace_config(monkeypatch): + """Every test starts from TraceConfig defaults, whatever the developer's shell exports.""" + for name in list(os.environ): + if name.startswith("FI_HIDE_") or name in ("FI_PII_REDACTION", "FI_BASE64_IMAGE_MAX_LENGTH"): + monkeypatch.delenv(name, raising=False) + + +def load_fixture(name: str, marker: str = MARKER) -> Any: + text = (FIXTURES / name).read_text(encoding="utf-8").replace("{{MARKER}}", marker) + return json.loads(text) + + +def raw(obj: Any) -> bytes: + return json.dumps(obj, separators=(",", ":")).encode("utf-8") + + +class RecordingExporter: + """In-memory exporter: what would have been sent to the collector.""" + + def __init__(self, fail: Exception = None) -> None: + self.batches: List[Dict[str, Any]] = [] + self.fail = fail + + def export(self, export_request): + if self.fail is not None: + raise self.fail + self.batches.append(json.loads(json.dumps(export_request))) + return {} + + def spans(self): + out = [] + for batch in self.batches: + for rs in batch["resourceSpans"]: + for ss in rs["scopeSpans"]: + out.extend(ss["spans"]) + return out + + +def make_config(**overrides) -> ForwarderConfig: + values = dict( + fi_api_key=FI_API_KEY, + fi_secret_key=FI_SECRET_KEY, + project_name="th8231-unit", + fi_base_url="http://127.0.0.1:9", + webhook_secret=WEBHOOK_SECRET, + state_path=":memory:", + ) + values.update(overrides) + return ForwarderConfig(**values) + + +@pytest.fixture +def make_forwarder(): + created = [] + + def _make(exporter=None, **overrides): + config = make_config(**overrides) + forwarder = Forwarder(config, exporter=exporter or RecordingExporter(), store=ForwardedStore(config.state_path)) + created.append(forwarder) + return forwarder + + yield _make + for forwarder in created: + forwarder.store.close() + + +@pytest.fixture +def log_capture(caplog): + caplog.set_level(logging.DEBUG, logger="traceai_elevenlabs_agents") + return caplog diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/README.md b/python/frameworks/elevenlabs-agents/tests/fixtures/README.md new file mode 100644 index 000000000..0a0e1ceb5 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/README.md @@ -0,0 +1,33 @@ +# Fixtures + +Built from the documented shape on +https://elevenlabs.io/docs/eleven-agents/customization/opentelemetry-traces (re-read +2026-10-15) and the attribute names the Langfuse cookbook reads from real exports +(https://langfuse.com/integrations/no-code/elevenlabs, `elevenlabs.tool.params`, +`elevenlabs.producing_llm`, `elevenlabs.llm_usage..`, `elevenlabs.turn.index`). + +Except `live_get_conversation_opentelemetry.json`, they are **not** captured from a live +ElevenLabs workspace. That one is a sanitized real `GET ?format=opentelemetry` body captured +2026-10-17 (ids replaced, clock-derived variables dropped). + +`{{MARKER}}` is replaced at load time with a unique string so tests can prove that +no content reaches an exported span when the standard `FI_HIDE_*` switches are on, and +that it does by default. A few values ElevenLabs is not documented to send +(`host.name` and `process.executable.path` on the resource, a `project_name` on the +resource, a stack trace event, a local path and host name in a status message, an +email in a dynamic variable) are adversarial extras for the never-exported and +project-binding tests. + +| File | What it is | +|---|---| +| `post_call_transcription_otel.json` | Webhook body: greeting, two user turns, two LLM turns, one tool call, one unknown span name, a signed media URL | +| `post_call_transcription_otel_error.json` | Abnormal disconnect: root status ERROR, failing tool with an exception event, interrupted agent turn | +| `post_call_transcription_otel_no_text.json` | Turns without text, zero-length root with `time_in_call_secs` | +| `get_conversation_opentelemetry.json` | `GET /v1/convai/conversations/{id}?format=opentelemetry` body | +| `other_webhook_types.json` | `post_call_transcription`, `post_call_audio`, `call_initiation_failure` bodies | +| `live_get_conversation_opentelemetry.json` | Captured 2026-10-17 from the live API: user turn, three LLM turns with usage, one webhook tool call | + +`live_webhook_post_call_transcription_otel.json` and `live_webhook_post_call_transcription_otel_timeout.json` +are real `post_call_transcription_otel` webhook bodies captured 2026-10-19 (conversation, agent, branch +and version ids and trace/span ids replaced; a test user id and agent name renamed). The first has a tool +call and `elevenlabs.user_id`; the second is a 2-minute call that ended on the time limit. diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/get_conversation_opentelemetry.json b/python/frameworks/elevenlabs-agents/tests/fixtures/get_conversation_opentelemetry.json new file mode 100644 index 000000000..611363629 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/get_conversation_opentelemetry.json @@ -0,0 +1,374 @@ +{ + "agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6", + "conversation_id": "conv_9001k1zph3fkeh5s8xg9z90swaqa", + "status": "done", + "user_id": "user-{{MARKER}}", + "metadata": { + "start_time_unix_secs": 1760000000, + "call_duration_secs": 42 + }, + "has_audio": false, + "has_user_audio": false, + "has_response_audio": false, + "has_auxiliary_audio": false, + "transcript": [], + "otlp_traces": { + "resourceSpans": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "elevenlabs-convai" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_9001k1zph3fkeh5s8xg9z90swaqa" + } + }, + { + "key": "host.name", + "value": { + "stringValue": "alice-laptop-{{MARKER}}.local" + } + }, + { + "key": "process.executable.path", + "value": { + "stringValue": "/Users/alice/{{MARKER}}/agent" + } + }, + { + "key": "project_name", + "value": { + "stringValue": "someone-elses-project" + } + } + ] + }, + "scopeSpans": [ + { + "scope": { + "name": "elevenlabs.convai", + "version": "1.0.0" + }, + "spans": [ + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000001", + "name": "elevenlabs.conversation", + "kind": 1, + "startTimeUnixNano": "1760000000000000000", + "endTimeUnixNano": "1760000042000000000", + "attributes": [ + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_9001k1zph3fkeh5s8xg9z90swaqa" + } + }, + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_7101k5zvyjhmfg983brhmhkd98n6" + } + }, + { + "key": "elevenlabs.source", + "value": { + "stringValue": "post_call_webhook" + } + }, + { + "key": "elevenlabs.environment", + "value": { + "stringValue": "production" + } + }, + { + "key": "elevenlabs.cost_fiat", + "value": { + "doubleValue": 0.0421 + } + }, + { + "key": "elevenlabs.analysis.transcript_summary", + "value": { + "stringValue": "Caller asked for the USD to EUR rate. {{MARKER}}" + } + }, + { + "key": "elevenlabs.dynamic_variable.user_email", + "value": { + "stringValue": "alice.{{MARKER}}@example.com" + } + }, + { + "key": "elevenlabs.dynamic_variable.account_number", + "value": { + "intValue": "4400123456" + } + }, + { + "key": "elevenlabs.recording_url", + "value": { + "stringValue": "https://storage.googleapis.com/convai/conv_9001k1zph3fkeh5s8xg9z90swaqa/audio.mp3?X-Goog-Expires=900&X-Goog-Signature=deadbeef" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000002", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1760000000000000000", + "endTimeUnixNano": "1760000003000000000", + "attributes": [ + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Hi! I can help with exchange rates. {{MARKER}}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "0" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000003", + "name": "elevenlabs.recv.user_transcript", + "kind": 1, + "startTimeUnixNano": "1760000004000000000", + "endTimeUnixNano": "1760000008000000000", + "attributes": [ + { + "key": "elevenlabs.user.text", + "value": { + "stringValue": "What is the US dollar to euro rate today? {{MARKER}}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "1" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000004", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1760000009000000000", + "endTimeUnixNano": "1760000020000000000", + "attributes": [ + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "One US dollar is 0.92 euros right now. {{MARKER}}" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{'tokens': 412, 'price': 6.18e-05}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{'tokens': 23, 'price': 1.38e-05}" + } + }, + { + "key": "elevenlabs.reasoning_content", + "value": { + "stringValue": "User wants an FX rate, call the tool. {{MARKER}}" + } + }, + { + "key": "elevenlabs.rag.retrieval_query", + "value": { + "stringValue": "usd eur rate {{MARKER}}" + } + }, + { + "key": "elevenlabs.rag.embedding_model", + "value": { + "stringValue": "multilingual_e5_large_instruct" + } + }, + { + "key": "elevenlabs.rag.latency_ms", + "value": { + "doubleValue": 41.5 + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "2" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000005", + "name": "elevenlabs.tool.get_exchange_rate", + "kind": 1, + "startTimeUnixNano": "1760000010000000000", + "endTimeUnixNano": "1760000011000000000", + "attributes": [ + { + "key": "elevenlabs.tool.params", + "value": { + "stringValue": "{\"base\": \"USD\", \"symbols\": \"EUR\", \"note\": \"{{MARKER}}\"}" + } + }, + { + "key": "elevenlabs.tool.result", + "value": { + "stringValue": "{\"rates\": {\"EUR\": 0.92}, \"echo\": \"{{MARKER}}\"}" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000004" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000006", + "name": "elevenlabs.recv.user_transcript", + "kind": 1, + "startTimeUnixNano": "1760000030000000000", + "endTimeUnixNano": "1760000033000000000", + "attributes": [ + { + "key": "elevenlabs.user.text", + "value": { + "stringValue": "Great, thank you. Goodbye! {{MARKER}}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "3" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000007", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1760000034000000000", + "endTimeUnixNano": "1760000036000000000", + "attributes": [ + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Goodbye! {{MARKER}}" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{'tokens': 450, 'price': 6.75e-05}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{'tokens': 4, 'price': 2.4e-06}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "4" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000008", + "name": "elevenlabs.event.something_new", + "kind": 1, + "startTimeUnixNano": "1760000037000000000", + "endTimeUnixNano": "1760000037000000000", + "attributes": [ + { + "key": "elevenlabs.event.data", + "value": { + "stringValue": "{\"detail\": \"{{MARKER}}\"}" + } + }, + { + "key": "elevenlabs.event.count", + "value": { + "intValue": "3" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + } + ] + } + ] + } + ] + } +} diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/live_get_conversation_opentelemetry.json b/python/frameworks/elevenlabs-agents/tests/fixtures/live_get_conversation_opentelemetry.json new file mode 100644 index 000000000..9492f075d --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/live_get_conversation_opentelemetry.json @@ -0,0 +1,650 @@ +{ + "_note": "Captured 2026-10-17 from GET /v1/convai/conversations/{id}?format=opentelemetry on a live ElevenLabs workspace (text-only SDK conversation, one webhook tool). Only otlp_traces is kept; ids, voice id, clock-derived dynamic variables and the model-written summary are replaced or dropped.", + "conversation_id": "conv_LIVEFIXTURE1", + "agent_id": "agent_LIVEFIXTURE1", + "otlp_traces": { + "resourceSpans": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "elevenlabs-convai" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_LIVEFIXTURE1" + } + } + ] + }, + "scopeSpans": [ + { + "scope": { + "name": "elevenlabs.convai", + "version": "1.0.0" + }, + "spans": [ + { + "traceId": "ea5d20b167de14804539f834f26d0630", + "spanId": "31590ddc21b9420d", + "name": "elevenlabs.conversation", + "kind": 1, + "startTimeUnixNano": "1792200782000000000", + "endTimeUnixNano": "1792200799000000000", + "attributes": [ + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.agent_name", + "value": { + "stringValue": "live-test-agent" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.conversation_product", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.status", + "value": { + "stringValue": "done" + } + }, + { + "key": "elevenlabs.session.duration_ms", + "value": { + "intValue": "17000" + } + }, + { + "key": "elevenlabs.source", + "value": { + "stringValue": "post_call_webhook" + } + }, + { + "key": "elevenlabs.environment", + "value": { + "stringValue": "production" + } + }, + { + "key": "elevenlabs.cost", + "value": { + "intValue": "109" + } + }, + { + "key": "elevenlabs.cost_fiat", + "value": { + "doubleValue": 0.021821082066643238 + } + }, + { + "key": "elevenlabs.authorization_method", + "value": { + "stringValue": "signed_url" + } + }, + { + "key": "elevenlabs.termination_reason", + "value": { + "stringValue": "Client disconnected: 1000" + } + }, + { + "key": "elevenlabs.analysis.call_successful", + "value": { + "stringValue": "success" + } + }, + { + "key": "elevenlabs.analysis.call_summary_title", + "value": { + "stringValue": "Get Quote" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__agent_turns", + "value": { + "intValue": "2" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__current_agent_turns", + "value": { + "intValue": "2" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__current_subagent_turns", + "value": { + "intValue": "2" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__is_text_only", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.dynamic_variable.system__channel", + "value": { + "stringValue": "python_sdk" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__environment", + "value": { + "stringValue": "production" + } + }, + { + "key": "elevenlabs.visited_agents.0.agent_id", + "value": { + "stringValue": "agent_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.visited_agents.0.branch_id", + "value": { + "stringValue": "agtbrch_LIVEFIXTURE1" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "ea5d20b167de14804539f834f26d0630", + "spanId": "b5f02697632a4839", + "parentSpanId": "31590ddc21b9420d", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792200782000000000", + "endTimeUnixNano": "1792200782009999872", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Hi." + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "0" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.voice_id", + "value": { + "stringValue": "voice_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.metric.convai_tts_service_ttfb_ms", + "value": { + "doubleValue": 84.9 + } + }, + { + "key": "elevenlabs.metric.convai_ttf_audio_since_silence_ms", + "value": { + "doubleValue": 95.1 + } + }, + { + "key": "elevenlabs.metric.convai_turn_silence_before_initiation_ms", + "value": { + "doubleValue": 0.0 + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "ea5d20b167de14804539f834f26d0630", + "spanId": "0b1bf74e19ac47d6", + "parentSpanId": "31590ddc21b9420d", + "name": "elevenlabs.recv.user_transcript", + "kind": 1, + "startTimeUnixNano": "1792200782000000000", + "endTimeUnixNano": "1792200782009999872", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "user" + } + }, + { + "key": "elevenlabs.user.text", + "value": { + "stringValue": "Give me a quote, please." + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "1" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "ea5d20b167de14804539f834f26d0630", + "spanId": "7623f2be9a994a44", + "parentSpanId": "31590ddc21b9420d", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792200782000000000", + "endTimeUnixNano": "1792200782009999872", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "2" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.metric.convai_llm_service_ttfb_ms", + "value": { + "doubleValue": 476.6 + } + }, + { + "key": "elevenlabs.metric.convai_llm_tool_request_generation_latency_ms", + "value": { + "doubleValue": 477.0 + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{\"tokens\": 717, \"price\": 0.00010755}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input_cache_read", + "value": { + "stringValue": "{\"tokens\": 0, \"price\": 0.0}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input_cache_write", + "value": { + "stringValue": "{\"tokens\": 0, \"price\": 0.0}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{\"tokens\": 11, \"price\": 6.5999999999999995e-06}" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "ea5d20b167de14804539f834f26d0630", + "spanId": "541fb98b28564dc4", + "parentSpanId": "7623f2be9a994a44", + "name": "elevenlabs.tool.get_zen", + "kind": 1, + "startTimeUnixNano": "1792200782000000000", + "endTimeUnixNano": "1792200782089999104", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "client_tool_call" + } + }, + { + "key": "elevenlabs.tool.name", + "value": { + "stringValue": "get_zen" + } + }, + { + "key": "elevenlabs.tool_span_id", + "value": { + "stringValue": "541fb98b28564dc4" + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.tool.latency_ms", + "value": { + "doubleValue": 90.0 + } + }, + { + "key": "elevenlabs.tool.params", + "value": { + "stringValue": "{}" + } + }, + { + "key": "elevenlabs.tool.result", + "value": { + "stringValue": "It's not fully shipped until it's fast." + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "ea5d20b167de14804539f834f26d0630", + "spanId": "4bf34e39a89d4393", + "parentSpanId": "31590ddc21b9420d", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792200782000000000", + "endTimeUnixNano": "1792200783000000000", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "3" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVEFIXTURE1" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "ea5d20b167de14804539f834f26d0630", + "spanId": "78b956443b274311", + "parentSpanId": "31590ddc21b9420d", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792200783000000000", + "endTimeUnixNano": "1792200799000000000", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "It's not fully shipped until it's fast." + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "4" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.voice_id", + "value": { + "stringValue": "voice_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVEFIXTURE1" + } + }, + { + "key": "elevenlabs.metric.convai_llm_service_ttf_sentence_ms", + "value": { + "doubleValue": 455.9 + } + }, + { + "key": "elevenlabs.metric.convai_llm_service_ttfb_ms", + "value": { + "doubleValue": 329.7 + } + }, + { + "key": "elevenlabs.metric.convai_llm_service_tt_last_sentence_ms", + "value": { + "doubleValue": 455.9 + } + }, + { + "key": "elevenlabs.metric.convai_tts_service_ttfb_ms", + "value": { + "doubleValue": 78.6 + } + }, + { + "key": "elevenlabs.metric.convai_ttf_audio_since_silence_ms", + "value": { + "doubleValue": 1116.6 + } + }, + { + "key": "elevenlabs.metric.convai_turn_silence_before_initiation_ms", + "value": { + "doubleValue": 0.0 + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{\"tokens\": 745, \"price\": 0.00011175}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input_cache_read", + "value": { + "stringValue": "{\"tokens\": 0, \"price\": 0.0}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input_cache_write", + "value": { + "stringValue": "{\"tokens\": 0, \"price\": 0.0}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{\"tokens\": 9, \"price\": 5.399999999999999e-06}" + } + } + ], + "status": { + "code": 1 + } + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/live_webhook_post_call_transcription_otel.json b/python/frameworks/elevenlabs-agents/tests/fixtures/live_webhook_post_call_transcription_otel.json new file mode 100644 index 000000000..ac53a8463 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/live_webhook_post_call_transcription_otel.json @@ -0,0 +1,734 @@ +{ + "type": "post_call_transcription_otel", + "event_timestamp": 1792453038, + "data": { + "conversation_id": "conv_LIVEA", + "agent_id": "agent_LIVE", + "branch_id": "agtbrch_LIVE", + "version_id": "agtvrsn_LIVE", + "environment": "production", + "otlp_traces": { + "resourceSpans": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "elevenlabs-convai" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_LIVEA" + } + }, + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + } + ] + }, + "scopeSpans": [ + { + "scope": { + "name": "elevenlabs.convai", + "version": "1.0.0" + }, + "spans": [ + { + "traceId": "00000000000000000000000000abc001", + "spanId": "0000000000abc002", + "name": "elevenlabs.conversation", + "kind": 1, + "startTimeUnixNano": "1792453028000000000", + "endTimeUnixNano": "1792453034000000000", + "attributes": [ + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.agent_name", + "value": { + "stringValue": "live-test-agent" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_LIVEA" + } + }, + { + "key": "elevenlabs.conversation_product", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.status", + "value": { + "stringValue": "done" + } + }, + { + "key": "elevenlabs.session.duration_ms", + "value": { + "intValue": "6000" + } + }, + { + "key": "elevenlabs.source", + "value": { + "stringValue": "post_call_webhook" + } + }, + { + "key": "elevenlabs.user_id", + "value": { + "stringValue": "live-user-42" + } + }, + { + "key": "elevenlabs.environment", + "value": { + "stringValue": "production" + } + }, + { + "key": "elevenlabs.cost", + "value": { + "intValue": "16" + } + }, + { + "key": "elevenlabs.cost_fiat", + "value": { + "doubleValue": 0.0031428 + } + }, + { + "key": "elevenlabs.authorization_method", + "value": { + "stringValue": "public" + } + }, + { + "key": "elevenlabs.termination_reason", + "value": { + "stringValue": "Client disconnected: 1000" + } + }, + { + "key": "elevenlabs.analysis.call_successful", + "value": { + "stringValue": "success" + } + }, + { + "key": "elevenlabs.analysis.transcript_summary", + "value": { + "stringValue": "The user requested a Zen quote. The agent successfully used a tool to retrieve the quote \"Encourage flow\" and provided it to the user." + } + }, + { + "key": "elevenlabs.analysis.call_summary_title", + "value": { + "stringValue": "Zen Quote" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__agent_turns", + "value": { + "intValue": "2" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__current_agent_turns", + "value": { + "intValue": "2" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__current_subagent_turns", + "value": { + "intValue": "2" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__current_agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__conversation_id", + "value": { + "stringValue": "conv_LIVEA" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__call_duration_secs", + "value": { + "intValue": "6" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_utc", + "value": { + "stringValue": "2026-10-19T23:37:14.882495+00:00" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time", + "value": { + "stringValue": "Monday, 23:37 19 October 2026" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_date", + "value": { + "stringValue": "Monday, 19 October 2026" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_hour", + "value": { + "intValue": "23" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_minute", + "value": { + "intValue": "37" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_second", + "value": { + "intValue": "14" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__is_text_only", + "value": { + "boolValue": true + } + }, + { + "key": "elevenlabs.dynamic_variable.system__channel", + "value": { + "stringValue": "python_sdk" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__conversation_history", + "value": { + "stringValue": "{\"x-elevenlabs-history\": true, \"entries\": [{\"role\": \"agent\", \"message\": \"Hi.\"}, {\"role\": \"user\", \"message\": \"Give me a zen quote please.\"}, {\"role\": \"agent\", \"tool_requests\": [{\"tool_name\": \"get_zen\", \"params_as_json\": {}}]}, {\"role\": \"agent\", \"tool_results\": [{\"tool_name\": \"get_zen\", \"result_value\": \"Encourage flow.\"}]}, {\"role\": \"agent\", \"message\": \"Encourage flow.\"}]}" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__user_id", + "value": { + "stringValue": "live-user-42" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__environment", + "value": { + "stringValue": "production" + } + }, + { + "key": "elevenlabs.visited_agents.0.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.visited_agents.0.branch_id", + "value": { + "stringValue": "agtbrch_LIVE" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "00000000000000000000000000abc001", + "spanId": "0000000000abc003", + "parentSpanId": "0000000000abc002", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792453028000000000", + "endTimeUnixNano": "1792453028009999872", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Hi." + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "0" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVE" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVE" + } + }, + { + "key": "elevenlabs.turn.agent_name", + "value": { + "stringValue": "live-test-agent" + } + }, + { + "key": "elevenlabs.metric.convai_ttf_response_since_user_message_ms", + "value": { + "doubleValue": 1.5 + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "00000000000000000000000000abc001", + "spanId": "0000000000abc004", + "parentSpanId": "0000000000abc002", + "name": "elevenlabs.recv.user_transcript", + "kind": 1, + "startTimeUnixNano": "1792453028000000000", + "endTimeUnixNano": "1792453029000000000", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "user" + } + }, + { + "key": "elevenlabs.user.text", + "value": { + "stringValue": "Give me a zen quote please." + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "1" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "00000000000000000000000000abc001", + "spanId": "0000000000abc005", + "parentSpanId": "0000000000abc002", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792453029000000000", + "endTimeUnixNano": "1792453029009999872", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "2" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVE" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVE" + } + }, + { + "key": "elevenlabs.turn.agent_name", + "value": { + "stringValue": "live-test-agent" + } + }, + { + "key": "elevenlabs.metric.convai_llm_service_ttfb_ms", + "value": { + "doubleValue": 655.2 + } + }, + { + "key": "elevenlabs.metric.convai_llm_tool_request_generation_latency_ms", + "value": { + "doubleValue": 655.9 + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{\"tokens\": 432, \"price\": 6.48e-05}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input_cache_read", + "value": { + "stringValue": "{\"tokens\": 0, \"price\": 0.0}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input_cache_write", + "value": { + "stringValue": "{\"tokens\": 0, \"price\": 0.0}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{\"tokens\": 11, \"price\": 6.5999999999999995e-06}" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "00000000000000000000000000abc001", + "spanId": "0000000000abc006", + "parentSpanId": "0000000000abc005", + "name": "elevenlabs.tool.get_zen", + "kind": 1, + "startTimeUnixNano": "1792453029000000000", + "endTimeUnixNano": "1792453029105612288", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "client_tool_call" + } + }, + { + "key": "elevenlabs.tool.name", + "value": { + "stringValue": "get_zen" + } + }, + { + "key": "elevenlabs.tool_span_id", + "value": { + "stringValue": "76b319af74984315" + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVE" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVE" + } + }, + { + "key": "elevenlabs.turn.agent_name", + "value": { + "stringValue": "live-test-agent" + } + }, + { + "key": "elevenlabs.tool.latency_ms", + "value": { + "doubleValue": 105.6 + } + }, + { + "key": "elevenlabs.tool.params", + "value": { + "stringValue": "{}" + } + }, + { + "key": "elevenlabs.tool.result", + "value": { + "stringValue": "Encourage flow." + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "00000000000000000000000000abc001", + "spanId": "0000000000abc007", + "parentSpanId": "0000000000abc002", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792453029000000000", + "endTimeUnixNano": "1792453029009999872", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "3" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVE" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVE" + } + }, + { + "key": "elevenlabs.turn.agent_name", + "value": { + "stringValue": "live-test-agent" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "00000000000000000000000000abc001", + "spanId": "0000000000abc008", + "parentSpanId": "0000000000abc002", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792453029000000000", + "endTimeUnixNano": "1792453034000000000", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Encourage flow." + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "4" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVE" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVE" + } + }, + { + "key": "elevenlabs.turn.agent_name", + "value": { + "stringValue": "live-test-agent" + } + }, + { + "key": "elevenlabs.metric.convai_llm_service_ttf_sentence_ms", + "value": { + "doubleValue": 577.3 + } + }, + { + "key": "elevenlabs.metric.convai_llm_service_ttfb_ms", + "value": { + "doubleValue": 525.4 + } + }, + { + "key": "elevenlabs.metric.convai_llm_service_tt_last_sentence_ms", + "value": { + "doubleValue": 577.3 + } + }, + { + "key": "elevenlabs.metric.convai_ttf_response_since_user_message_ms", + "value": { + "doubleValue": 1348.9 + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{\"tokens\": 456, \"price\": 6.84e-05}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input_cache_read", + "value": { + "stringValue": "{\"tokens\": 0, \"price\": 0.0}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input_cache_write", + "value": { + "stringValue": "{\"tokens\": 0, \"price\": 0.0}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{\"tokens\": 5, \"price\": 3e-06}" + } + } + ], + "status": { + "code": 1 + } + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/live_webhook_post_call_transcription_otel_timeout.json b/python/frameworks/elevenlabs-agents/tests/fixtures/live_webhook_post_call_transcription_otel_timeout.json new file mode 100644 index 000000000..3c668a794 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/live_webhook_post_call_transcription_otel_timeout.json @@ -0,0 +1,340 @@ +{ + "type": "post_call_transcription_otel", + "event_timestamp": 1792453181, + "data": { + "conversation_id": "conv_LIVEC", + "agent_id": "agent_LIVE", + "branch_id": "agtbrch_LIVE", + "version_id": "agtvrsn_LIVE", + "environment": "production", + "otlp_traces": { + "resourceSpans": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "elevenlabs-convai" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_LIVEC" + } + }, + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + } + ] + }, + "scopeSpans": [ + { + "scope": { + "name": "elevenlabs.convai", + "version": "1.0.0" + }, + "spans": [ + { + "traceId": "00000000000000000000000000123001", + "spanId": "0000000000123002", + "name": "elevenlabs.conversation", + "kind": 1, + "startTimeUnixNano": "1792453058000000000", + "endTimeUnixNano": "1792453179000000000", + "attributes": [ + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.agent_name", + "value": { + "stringValue": "live-test-agent" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_LIVEC" + } + }, + { + "key": "elevenlabs.conversation_product", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.status", + "value": { + "stringValue": "done" + } + }, + { + "key": "elevenlabs.session.duration_ms", + "value": { + "intValue": "121000" + } + }, + { + "key": "elevenlabs.source", + "value": { + "stringValue": "post_call_webhook" + } + }, + { + "key": "elevenlabs.environment", + "value": { + "stringValue": "production" + } + }, + { + "key": "elevenlabs.cost", + "value": { + "intValue": "0" + } + }, + { + "key": "elevenlabs.cost_fiat", + "value": { + "intValue": "0" + } + }, + { + "key": "elevenlabs.authorization_method", + "value": { + "stringValue": "public" + } + }, + { + "key": "elevenlabs.termination_reason", + "value": { + "stringValue": "Conversation has exceeded maximum duration" + } + }, + { + "key": "elevenlabs.analysis.call_successful", + "value": { + "stringValue": "success" + } + }, + { + "key": "elevenlabs.analysis.transcript_summary", + "value": { + "stringValue": "The agent initiated the conversation with a simple greeting." + } + }, + { + "key": "elevenlabs.analysis.call_summary_title", + "value": { + "stringValue": "Greeting" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__agent_turns", + "value": { + "intValue": "1" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__current_agent_turns", + "value": { + "intValue": "1" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__current_subagent_turns", + "value": { + "intValue": "1" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__current_agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__conversation_id", + "value": { + "stringValue": "conv_LIVEC" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__call_duration_secs", + "value": { + "intValue": "121" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_utc", + "value": { + "stringValue": "2026-10-19T23:39:39.188655+00:00" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time", + "value": { + "stringValue": "Monday, 23:39 19 October 2026" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_date", + "value": { + "stringValue": "Monday, 19 October 2026" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_hour", + "value": { + "intValue": "23" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_minute", + "value": { + "intValue": "39" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__time_second", + "value": { + "intValue": "39" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__is_text_only", + "value": { + "boolValue": true + } + }, + { + "key": "elevenlabs.dynamic_variable.system__channel", + "value": { + "stringValue": "python_sdk" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__conversation_history", + "value": { + "stringValue": "{\"x-elevenlabs-history\": true, \"entries\": [{\"role\": \"agent\", \"message\": \"Hi.\"}]}" + } + }, + { + "key": "elevenlabs.dynamic_variable.system__environment", + "value": { + "stringValue": "production" + } + }, + { + "key": "elevenlabs.visited_agents.0.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.visited_agents.0.branch_id", + "value": { + "stringValue": "agtbrch_LIVE" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "00000000000000000000000000123001", + "spanId": "0000000000123003", + "parentSpanId": "0000000000123002", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1792453058000000000", + "endTimeUnixNano": "1792453179000000000", + "attributes": [ + { + "key": "elevenlabs.event.type", + "value": { + "stringValue": "agent" + } + }, + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Hi." + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "0" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.ignored_as_backchannel", + "value": { + "boolValue": false + } + }, + { + "key": "elevenlabs.turn.agent_id", + "value": { + "stringValue": "agent_LIVE" + } + }, + { + "key": "elevenlabs.turn.branch_id", + "value": { + "stringValue": "agtbrch_LIVE" + } + }, + { + "key": "elevenlabs.turn.version_id", + "value": { + "stringValue": "agtvrsn_LIVE" + } + }, + { + "key": "elevenlabs.turn.agent_name", + "value": { + "stringValue": "live-test-agent" + } + }, + { + "key": "elevenlabs.metric.convai_ttf_response_since_user_message_ms", + "value": { + "doubleValue": 1.8 + } + } + ], + "status": { + "code": 1 + } + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/other_webhook_types.json b/python/frameworks/elevenlabs-agents/tests/fixtures/other_webhook_types.json new file mode 100644 index 000000000..59527fdef --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/other_webhook_types.json @@ -0,0 +1,34 @@ +{ + "post_call_transcription": { + "type": "post_call_transcription", + "event_timestamp": 1760000060, + "data": { + "conversation_id": "conv_9001k1zph3fkeh5s8xg9z90swaqa", + "agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6", + "transcript": [ + { + "role": "user", + "message": "{{MARKER}}" + } + ] + } + }, + "post_call_audio": { + "type": "post_call_audio", + "event_timestamp": 1760000060, + "data": { + "conversation_id": "conv_9001k1zph3fkeh5s8xg9z90swaqa", + "agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6", + "full_audio": "UklGRg==" + } + }, + "call_initiation_failure": { + "type": "call_initiation_failure", + "event_timestamp": 1760000060, + "data": { + "conversation_id": "conv_9001k1zph3fkeh5s8xg9z90swaqa", + "agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6", + "failure_reason": "busy {{MARKER}}" + } + } +} diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel.json b/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel.json new file mode 100644 index 000000000..1c9c03269 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel.json @@ -0,0 +1,367 @@ +{ + "type": "post_call_transcription_otel", + "event_timestamp": 1760000060, + "data": { + "conversation_id": "conv_9001k1zph3fkeh5s8xg9z90swaqa", + "agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6", + "otlp_traces": { + "resourceSpans": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "elevenlabs-convai" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_9001k1zph3fkeh5s8xg9z90swaqa" + } + }, + { + "key": "host.name", + "value": { + "stringValue": "alice-laptop-{{MARKER}}.local" + } + }, + { + "key": "process.executable.path", + "value": { + "stringValue": "/Users/alice/{{MARKER}}/agent" + } + }, + { + "key": "project_name", + "value": { + "stringValue": "someone-elses-project" + } + } + ] + }, + "scopeSpans": [ + { + "scope": { + "name": "elevenlabs.convai", + "version": "1.0.0" + }, + "spans": [ + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000001", + "name": "elevenlabs.conversation", + "kind": 1, + "startTimeUnixNano": "1760000000000000000", + "endTimeUnixNano": "1760000042000000000", + "attributes": [ + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_9001k1zph3fkeh5s8xg9z90swaqa" + } + }, + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_7101k5zvyjhmfg983brhmhkd98n6" + } + }, + { + "key": "elevenlabs.source", + "value": { + "stringValue": "post_call_webhook" + } + }, + { + "key": "elevenlabs.environment", + "value": { + "stringValue": "production" + } + }, + { + "key": "elevenlabs.cost_fiat", + "value": { + "doubleValue": 0.0421 + } + }, + { + "key": "elevenlabs.analysis.transcript_summary", + "value": { + "stringValue": "Caller asked for the USD to EUR rate. {{MARKER}}" + } + }, + { + "key": "elevenlabs.dynamic_variable.user_email", + "value": { + "stringValue": "alice.{{MARKER}}@example.com" + } + }, + { + "key": "elevenlabs.dynamic_variable.account_number", + "value": { + "intValue": "4400123456" + } + }, + { + "key": "elevenlabs.recording_url", + "value": { + "stringValue": "https://storage.googleapis.com/convai/conv_9001k1zph3fkeh5s8xg9z90swaqa/audio.mp3?X-Goog-Expires=900&X-Goog-Signature=deadbeef" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000002", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1760000000000000000", + "endTimeUnixNano": "1760000003000000000", + "attributes": [ + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Hi! I can help with exchange rates. {{MARKER}}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "0" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000003", + "name": "elevenlabs.recv.user_transcript", + "kind": 1, + "startTimeUnixNano": "1760000004000000000", + "endTimeUnixNano": "1760000008000000000", + "attributes": [ + { + "key": "elevenlabs.user.text", + "value": { + "stringValue": "What is the US dollar to euro rate today? {{MARKER}}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "1" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000004", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1760000009000000000", + "endTimeUnixNano": "1760000020000000000", + "attributes": [ + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "One US dollar is 0.92 euros right now. {{MARKER}}" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{'tokens': 412, 'price': 6.18e-05}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{'tokens': 23, 'price': 1.38e-05}" + } + }, + { + "key": "elevenlabs.reasoning_content", + "value": { + "stringValue": "User wants an FX rate, call the tool. {{MARKER}}" + } + }, + { + "key": "elevenlabs.rag.retrieval_query", + "value": { + "stringValue": "usd eur rate {{MARKER}}" + } + }, + { + "key": "elevenlabs.rag.embedding_model", + "value": { + "stringValue": "multilingual_e5_large_instruct" + } + }, + { + "key": "elevenlabs.rag.latency_ms", + "value": { + "doubleValue": 41.5 + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "2" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000005", + "name": "elevenlabs.tool.get_exchange_rate", + "kind": 1, + "startTimeUnixNano": "1760000010000000000", + "endTimeUnixNano": "1760000011000000000", + "attributes": [ + { + "key": "elevenlabs.tool.params", + "value": { + "stringValue": "{\"base\": \"USD\", \"symbols\": \"EUR\", \"note\": \"{{MARKER}}\"}" + } + }, + { + "key": "elevenlabs.tool.result", + "value": { + "stringValue": "{\"rates\": {\"EUR\": 0.92}, \"echo\": \"{{MARKER}}\"}" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000004" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000006", + "name": "elevenlabs.recv.user_transcript", + "kind": 1, + "startTimeUnixNano": "1760000030000000000", + "endTimeUnixNano": "1760000033000000000", + "attributes": [ + { + "key": "elevenlabs.user.text", + "value": { + "stringValue": "Great, thank you. Goodbye! {{MARKER}}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "3" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000007", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1760000034000000000", + "endTimeUnixNano": "1760000036000000000", + "attributes": [ + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Goodbye! {{MARKER}}" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{'tokens': 450, 'price': 6.75e-05}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{'tokens': 4, 'price': 2.4e-06}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "4" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + }, + { + "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", + "spanId": "a000000000000008", + "name": "elevenlabs.event.something_new", + "kind": 1, + "startTimeUnixNano": "1760000037000000000", + "endTimeUnixNano": "1760000037000000000", + "attributes": [ + { + "key": "elevenlabs.event.data", + "value": { + "stringValue": "{\"detail\": \"{{MARKER}}\"}" + } + }, + { + "key": "elevenlabs.event.count", + "value": { + "intValue": "3" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "a000000000000001" + } + ] + } + ] + } + ] + } + } +} diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel_error.json b/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel_error.json new file mode 100644 index 000000000..1bee21ed6 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel_error.json @@ -0,0 +1,183 @@ +{ + "type": "post_call_transcription_otel", + "event_timestamp": 1760000060, + "data": { + "conversation_id": "conv_7701k1zph3fkeh5s8xg9z90errr1", + "agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6", + "otlp_traces": { + "resourceSpans": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "elevenlabs-convai" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_7701k1zph3fkeh5s8xg9z90errr1" + } + } + ] + }, + "scopeSpans": [ + { + "scope": { + "name": "elevenlabs.convai", + "version": "1.0.0" + }, + "spans": [ + { + "traceId": "0af7651916cd43dd8448eb211c80319c", + "spanId": "b000000000000001", + "name": "elevenlabs.conversation", + "kind": 1, + "startTimeUnixNano": "1760000100000000000", + "endTimeUnixNano": "1760000118000000000", + "attributes": [ + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_7701k1zph3fkeh5s8xg9z90errr1" + } + }, + { + "key": "elevenlabs.agent_id", + "value": { + "stringValue": "agent_7101k5zvyjhmfg983brhmhkd98n6" + } + }, + { + "key": "elevenlabs.source", + "value": { + "stringValue": "post_call_webhook" + } + } + ], + "status": { + "code": 2, + "message": "call ended: websocket closed abnormally {{MARKER}} /home/alice/app/agent.py on alice-laptop.local" + } + }, + { + "traceId": "0af7651916cd43dd8448eb211c80319c", + "spanId": "b000000000000002", + "name": "elevenlabs.recv.user_transcript", + "kind": 1, + "startTimeUnixNano": "1760000101000000000", + "endTimeUnixNano": "1760000104000000000", + "attributes": [ + { + "key": "elevenlabs.user.text", + "value": { + "stringValue": "Book me a table for two at eight. {{MARKER}}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "0" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "b000000000000001" + }, + { + "traceId": "0af7651916cd43dd8448eb211c80319c", + "spanId": "b000000000000003", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1760000105000000000", + "endTimeUnixNano": "1760000110000000000", + "attributes": [ + { + "key": "elevenlabs.agent.text", + "value": { + "stringValue": "Sure, let me check...{{MARKER}}" + } + }, + { + "key": "elevenlabs.producing_llm", + "value": { + "stringValue": "gpt-4o-mini" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.input", + "value": { + "stringValue": "{'tokens': 120, 'price': 1.8e-05}" + } + }, + { + "key": "elevenlabs.llm_usage.gpt-4o-mini.output_total", + "value": { + "stringValue": "{'tokens': 9, 'price': 5.4e-06}" + } + }, + { + "key": "elevenlabs.turn.index", + "value": { + "intValue": "1" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "b000000000000001" + }, + { + "traceId": "0af7651916cd43dd8448eb211c80319c", + "spanId": "b000000000000004", + "name": "elevenlabs.tool.book_table", + "kind": 1, + "startTimeUnixNano": "1760000106000000000", + "endTimeUnixNano": "1760000116000000000", + "attributes": [ + { + "key": "elevenlabs.tool.params", + "value": { + "stringValue": "{\"party\": 2, \"time\": \"20:00\", \"who\": \"{{MARKER}}\"}" + } + } + ], + "status": { + "code": 2, + "message": "upstream timeout {{MARKER}}" + }, + "parentSpanId": "b000000000000003", + "events": [ + { + "name": "exception", + "timeUnixNano": "1760000116000000000", + "attributes": [ + { + "key": "exception.message", + "value": { + "stringValue": "ReadTimeout {{MARKER}}" + } + }, + { + "key": "exception.stacktrace", + "value": { + "stringValue": "Traceback (most recent call last):\n File \"/Users/alice/{{MARKER}}/tools.py\", line 9" + } + } + ] + } + ] + } + ] + } + ] + } + ] + } + } +} diff --git a/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel_no_text.json b/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel_no_text.json new file mode 100644 index 000000000..231ff7396 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/fixtures/post_call_transcription_otel_no_text.json @@ -0,0 +1,98 @@ +{ + "type": "post_call_transcription_otel", + "event_timestamp": 1760000060, + "data": { + "conversation_id": "conv_5501k1zph3fkeh5s8xg9z90notxt", + "agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6", + "otlp_traces": { + "resourceSpans": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "elevenlabs-convai" + } + }, + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_5501k1zph3fkeh5s8xg9z90notxt" + } + } + ] + }, + "scopeSpans": [ + { + "scope": { + "name": "elevenlabs.convai", + "version": "1.0.0" + }, + "spans": [ + { + "traceId": "5b8aa5a2d2c872e8321cf37308d69df2", + "spanId": "c000000000000001", + "name": "elevenlabs.conversation", + "kind": 1, + "startTimeUnixNano": "1760000200000000000", + "endTimeUnixNano": "1760000200000000000", + "attributes": [ + { + "key": "elevenlabs.conversation_id", + "value": { + "stringValue": "conv_5501k1zph3fkeh5s8xg9z90notxt" + } + }, + { + "key": "time_in_call_secs", + "value": { + "intValue": "7" + } + } + ], + "status": { + "code": 1 + } + }, + { + "traceId": "5b8aa5a2d2c872e8321cf37308d69df2", + "spanId": "c000000000000002", + "name": "elevenlabs.recv.user_transcript", + "kind": 1, + "startTimeUnixNano": "1760000200000000000", + "endTimeUnixNano": "1760000200000000000", + "attributes": [ + { + "key": "elevenlabs.user.text", + "value": { + "stringValue": "" + } + } + ], + "status": { + "code": 1 + }, + "parentSpanId": "c000000000000001" + }, + { + "traceId": "5b8aa5a2d2c872e8321cf37308d69df2", + "spanId": "c000000000000003", + "name": "elevenlabs.recv.agent_response", + "kind": 1, + "startTimeUnixNano": "1760000200000000000", + "endTimeUnixNano": "1760000200000000000", + "attributes": [], + "status": { + "code": 1 + }, + "parentSpanId": "c000000000000001" + } + ] + } + ] + } + ] + } + } +} diff --git a/python/frameworks/elevenlabs-agents/tests/test_backfill.py b/python/frameworks/elevenlabs-agents/tests/test_backfill.py new file mode 100644 index 000000000..b0f2b5a32 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_backfill.py @@ -0,0 +1,102 @@ +import importlib +import json +import sys +from pathlib import Path + +import pytest + +from conftest import MARKER, WEBHOOK_SECRET, raw +from traceai_elevenlabs_agents.backfill import BackfillError, backfill, fetch_conversation +from traceai_elevenlabs_agents.verify import sign + +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "examples")) +import standin # noqa: E402 + +API_KEY = "xi_test_key_6e2d9a0c4b8f1e3d7a5c" + + +@pytest.fixture +def get_server(): + server = standin.GetStandin(API_KEY) + yield server + server.close() + + +def test_backfill_forwards_a_conversation(make_forwarder, get_server): + delivery = standin.build_delivery("post_call_transcription_otel.json", MARKER) + conv = get_server.add_from_delivery(delivery, user_id="user-7") + forwarder = make_forwarder(elevenlabs_api_key=API_KEY, elevenlabs_base_url=get_server.base_url) + status, payload = backfill(forwarder, conv) + assert (status, payload["status"]) == (200, "forwarded") + assert get_server.requests[0]["query"]["format"] == ["opentelemetry"] + assert get_server.requests[0]["path"] == "/v1/convai/conversations/" + conv + root = [s for s in forwarder.exporter.spans() if "parentSpanId" not in s][0] + attrs = {a["key"]: a["value"] for a in root["attributes"]} + assert attrs["user.id"] == {"stringValue": "user-7"} # GET carries user_id; inputs are captured by default + + +def test_backfill_after_webhook_converges(make_forwarder, get_server): + delivery = standin.build_delivery("post_call_transcription_otel.json", MARKER) + conv = get_server.add_from_delivery(delivery) + forwarder = make_forwarder(elevenlabs_api_key=API_KEY, elevenlabs_base_url=get_server.base_url) + body = raw(delivery) + assert forwarder.handle_webhook(body, sign(WEBHOOK_SECRET, body))[0] == 200 + status, payload = backfill(forwarder, conv) + assert (status, payload["status"]) == (200, "duplicate") + assert len(forwarder.exporter.batches) == 1 + + +def test_force_reexports_with_fresh_span_ids_in_the_same_trace(make_forwarder, get_server): + delivery = standin.build_delivery("post_call_transcription_otel.json", MARKER) + conv = get_server.add_from_delivery(delivery) + forwarder = make_forwarder(elevenlabs_api_key=API_KEY, elevenlabs_base_url=get_server.base_url) + assert backfill(forwarder, conv)[0] == 200 + assert backfill(forwarder, conv, force=True)[0] == 200 + first, second = forwarder.exporter.batches + + def ids(batch): + return {s["spanId"] for rs in batch["resourceSpans"] for ss in rs["scopeSpans"] for s in ss["spans"]} + + def traces(batch): + return {s["traceId"] for rs in batch["resourceSpans"] for ss in rs["scopeSpans"] for s in ss["spans"]} + + assert traces(first) == traces(second) + assert not ids(first) & ids(second) # why --force duplicates spans: ElevenLabs re-mints span ids + + +def test_backfill_errors(make_forwarder, get_server): + forwarder = make_forwarder(elevenlabs_api_key="wrong", elevenlabs_base_url=get_server.base_url) + with pytest.raises(BackfillError) as info: + backfill(forwarder, "conv_missing") + assert "401" in str(info.value) + forwarder = make_forwarder(elevenlabs_api_key=API_KEY, elevenlabs_base_url=get_server.base_url) + with pytest.raises(BackfillError) as info: + backfill(forwarder, "conv_missing") + assert "404" in str(info.value) + with pytest.raises(BackfillError): + fetch_conversation("c", "", get_server.base_url) + + +def test_get_without_otlp_traces_is_400(make_forwarder, get_server, monkeypatch): + forwarder = make_forwarder(elevenlabs_api_key=API_KEY, elevenlabs_base_url=get_server.base_url) + module = importlib.import_module("traceai_elevenlabs_agents.backfill") + monkeypatch.setattr(module, "fetch_conversation", lambda *a, **k: {"conversation_id": "c", "agent_id": "a"}) + assert backfill(forwarder, "c") == (400, {"error": "missing_otlp_traces", "conversation_id": "c"}) + + +def test_standin_get_body_parses_with_the_real_sdk(get_server): + """The stand-in GET body is accepted by the real SDK client (``conversations.get(format=...)``).""" + pytest.importorskip("elevenlabs") + from elevenlabs.client import ElevenLabs + + delivery = standin.build_delivery("post_call_transcription_otel.json", MARKER) + conv = get_server.add_from_delivery(delivery, user_id="user-7") + client = ElevenLabs(api_key=API_KEY, base_url=get_server.base_url) + conversation = client.conversational_ai.conversations.get(conversation_id=conv, format="opentelemetry") + assert conversation.conversation_id == conv + assert conversation.user_id == "user-7" + names = [s["name"] for s in conversation.otlp_traces["resourceSpans"][0]["scopeSpans"][0]["spans"]] + assert names[0] == "elevenlabs.conversation" + plain = client.conversational_ai.conversations.get(conversation_id=conv) + assert plain.otlp_traces is None + assert json.dumps(conversation.otlp_traces).count(MARKER) > 0 diff --git a/python/frameworks/elevenlabs-agents/tests/test_cli.py b/python/frameworks/elevenlabs-agents/tests/test_cli.py new file mode 100644 index 000000000..93a06e22f --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_cli.py @@ -0,0 +1,118 @@ +import json +import os +import socket +import subprocess +import sys +import time +import urllib.request +from pathlib import Path + +import pytest +from fi_instrumentation import TraceConfig + +from conftest import FI_API_KEY, FI_SECRET_KEY, WEBHOOK_SECRET +from traceai_elevenlabs_agents.cli import _parser, main +from traceai_elevenlabs_agents.config import ConfigError, ForwarderConfig + +HIDE_FIELDS = ("hide_inputs", "hide_outputs", "hide_input_messages", "hide_output_messages") + +PACKAGE_ROOT = Path(__file__).resolve().parents[1] + + +def test_missing_env_exits_2(capsys, monkeypatch): + for name in ("FI_API_KEY", "FI_SECRET_KEY", "FI_PROJECT_NAME", "ELEVENLABS_WEBHOOK_SECRET"): + monkeypatch.delenv(name, raising=False) + assert main(["serve"]) == 2 + err = capsys.readouterr().err + assert "FI_API_KEY" in err and "ELEVENLABS_WEBHOOK_SECRET" in err + + +def test_config_from_env_defaults_and_flags(tmp_path): + env = { + "FI_API_KEY": "apikey-value-1234", + "FI_SECRET_KEY": "secretkey-value-5678", + "FI_PROJECT_NAME": "p", + "ELEVENLABS_WEBHOOK_SECRET": "webhook-secret-9012", + "FI_ELEVENLABS_STATE_PATH": str(tmp_path / "x.sqlite3"), + } + config = ForwarderConfig.from_env(env) + # Content is on by default: the standard TraceConfig defaults. + assert config.trace_config == TraceConfig(**{f: False for f in HIDE_FIELDS}) + assert config.fi_base_url == "https://api.futureagi.com" + assert config.signature_tolerance_secs == 1800 + assert config.state_path.endswith("x.sqlite3") + for value in ("apikey-value-1234", "secretkey-value-5678", "webhook-secret-9012"): + assert value not in repr(config) + hidden = ForwarderConfig.from_env({**env, "FI_HIDE_INPUTS": "true", "FI_HIDE_OUTPUT_MESSAGES": "TRUE"}).trace_config + assert (hidden.hide_inputs, hidden.hide_output_messages, hidden.hide_outputs) == (True, True, False) + # Read the way TraceConfig reads it: only true/false count, anything else keeps the default. + assert ForwarderConfig.from_env({**env, "FI_HIDE_INPUTS": "1"}).trace_config.hide_inputs is False + # There is no package-specific privacy switch. + legacy = ForwarderConfig.from_env({**env, "FI_ELEVENLABS_CAPTURE_CONTENT": "false"}) + assert legacy.trace_config == config.trace_config + with pytest.raises(ConfigError): + ForwarderConfig.from_env({**env, "FI_ELEVENLABS_SIGNATURE_TOLERANCE_SECS": "abc"}) + # Backfill does not need the webhook secret. + no_secret = {k: v for k, v in env.items() if k != "ELEVENLABS_WEBHOOK_SECRET"} + assert ForwarderConfig.from_env(no_secret, require_webhook_secret=False).webhook_secret == "" + + +def test_process_environment_uses_trace_config_itself(monkeypatch): + monkeypatch.setenv("FI_HIDE_OUTPUTS", "true") + for name, value in (("FI_API_KEY", "k" * 16), ("FI_SECRET_KEY", "s" * 16), ("FI_PROJECT_NAME", "p"), + ("ELEVENLABS_WEBHOOK_SECRET", "w" * 16)): + monkeypatch.setenv(name, value) + config = ForwarderConfig.from_env() + assert config.trace_config.hide_outputs is True and config.trace_config.hide_inputs is False + + +def test_serve_flags_after_subcommand_win(): + args = _parser().parse_args(["serve", "--port", "9100"]) + assert (args.command, args.port, args.host) == ("serve", 9100, "127.0.0.1") + args = _parser().parse_args(["--port", "9200", "serve"]) + assert args.port == 9200 + + +def _free_port(): + with socket.socket() as s: + s.bind(("127.0.0.1", 0)) + return s.getsockname()[1] + + +def test_console_entry_point_serves_and_stops_on_sigterm(tmp_path): + port = _free_port() + env = dict( + os.environ, + FI_API_KEY=FI_API_KEY, + FI_SECRET_KEY=FI_SECRET_KEY, + FI_PROJECT_NAME="p", + FI_BASE_URL="http://127.0.0.1:9", + ELEVENLABS_WEBHOOK_SECRET=WEBHOOK_SECRET, + FI_ELEVENLABS_STATE_PATH=str(tmp_path / "s.sqlite3"), + PYTHONPATH=str(PACKAGE_ROOT), + ) + proc = subprocess.Popen( + [sys.executable, "-m", "traceai_elevenlabs_agents", "serve", "--port", str(port)], + env=env, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + ) + try: + for _ in range(100): + try: + with urllib.request.urlopen("http://127.0.0.1:%d/healthz" % port, timeout=1) as r: + assert json.loads(r.read()) == {"status": "ok"} + break + except OSError: + time.sleep(0.05) + else: + pytest.fail("forwarder did not start") + proc.terminate() + output = proc.communicate(timeout=10)[0].decode() + finally: + if proc.poll() is None: + proc.kill() + assert proc.returncode == 0 + assert "listening on" in output + for secret in (FI_API_KEY, FI_SECRET_KEY, WEBHOOK_SECRET): + assert secret not in output diff --git a/python/frameworks/elevenlabs-agents/tests/test_example.py b/python/frameworks/elevenlabs-agents/tests/test_example.py new file mode 100644 index 000000000..c8caa0f72 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_example.py @@ -0,0 +1,59 @@ +"""The shipped E2E example runs green against a loopback collector (keeps examples/ honest).""" + +import json +import os +import subprocess +import sys +from pathlib import Path + +from conftest import NEVER_NEEDLES +from test_server import Collector +from traceai_elevenlabs_agents.map import attributes_to_dict + +PACKAGE_ROOT = Path(__file__).resolve().parents[1] + + +def test_run_e2e_example_against_loopback_collector(tmp_path): + collector = Collector() + try: + env = dict( + os.environ, + FI_API_KEY="fi_example_key_0123456789", + FI_SECRET_KEY="fi_example_secret_0123456789", + FI_BASE_URL=collector.base_url, + PYTHONPATH=str(PACKAGE_ROOT), + ) + out = tmp_path / "report.json" + done = subprocess.run( + [sys.executable, str(PACKAGE_ROOT / "examples" / "run_e2e.py"), "--project", "example", "--out", str(out)], + env=env, + capture_output=True, + timeout=240, + ) + assert done.returncode == 0, done.stdout.decode()[-2000:] + done.stderr.decode()[-2000:] + report = json.loads(out.read_text()) + assert report["ok"] is True + assert [p["project"] for p in report["phases"]] == ["example", "example-hidden"] + assert [p["mode"] for p in report["phases"]] == ["default", "hidden"] + forwarded = [s for p in report["phases"] for s in p["steps"] if s["response"].get("status") == "forwarded"] + assert len(forwarded) == 6 # per phase: good, error, GET-only backfill + # 6 exports reached the collector: nothing for duplicates, rejections or the dead collector. + assert len(collector.requests) == 6 + bodies = [json.loads(r["body"]) for r in collector.requests] + default_marker = report["phases"][0]["marker"] + hidden_marker = report["phases"][1]["marker"] + + def project(body): + return attributes_to_dict(body["resourceSpans"][0]["resource"]["attributes"])["project_name"] + + default = [b for b in bodies if project(b) == "example"] + hidden = [b for b in bodies if project(b) == "example-hidden"] + assert len(default) == 3 and len(hidden) == 3 + # traceAI defaults: the conversation is captured. FI_HIDE_*: none of it leaves. + assert default_marker in json.dumps(default) + assert hidden_marker not in json.dumps(hidden) + # Never in any mode: host, local path, user name, email, stack trace, signed URL. + for needle in NEVER_NEEDLES: + assert needle not in json.dumps(bodies), needle + finally: + collector.close() diff --git a/python/frameworks/elevenlabs-agents/tests/test_forwarder.py b/python/frameworks/elevenlabs-agents/tests/test_forwarder.py new file mode 100644 index 000000000..954784e5f --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_forwarder.py @@ -0,0 +1,285 @@ +import json +import time + +import pytest + +from conftest import ( + FI_API_KEY, + FI_SECRET_KEY, + MARKER, + NEVER_NEEDLES, + WEBHOOK_SECRET, + RecordingExporter, + hide_all, + load_fixture, + raw, +) +from traceai_elevenlabs_agents import map as map_mod +from traceai_elevenlabs_agents.exporter import ExportError +from traceai_elevenlabs_agents.store import ForwardedStore +from traceai_elevenlabs_agents.verify import sign + +OK = raw(load_fixture("post_call_transcription_otel.json")) + + +def deliver(forwarder, body=OK, header=None): + return forwarder.handle_webhook(body, sign(WEBHOOK_SECRET, body) if header is None else header) + + +def test_good_signature_is_forwarded_once(make_forwarder): + forwarder = make_forwarder() + status, payload = deliver(forwarder) + assert status == 200 + assert payload["status"] == "forwarded" + assert payload["trace_id"] == "4bf92f3577b34da6a3ce929d0e0e4736" + assert payload["spans"] == 8 + assert len(forwarder.exporter.batches) == 1 + + +@pytest.mark.parametrize( + "header", + [ + "", + "t=1760000000,v0=" + "0" * 64, + sign("wrong-secret", OK), + sign(WEBHOOK_SECRET, OK, int(time.time()) - 3600), + ], +) +def test_bad_signatures_return_401_and_store_nothing(make_forwarder, header): + forwarder = make_forwarder() + status, payload = deliver(forwarder, header=header) + assert (status, payload) == (401, {"error": "invalid_signature"}) + assert forwarder.exporter.batches == [] + assert forwarder.store.state("conv_9001k1zph3fkeh5s8xg9z90swaqa") is None + + +def test_mutated_body_returns_401(make_forwarder): + forwarder = make_forwarder() + header = sign(WEBHOOK_SECRET, OK) + status, _ = forwarder.handle_webhook(OK.replace(b"Goodbye", b"G00dbye"), header) + assert status == 401 + assert forwarder.exporter.batches == [] + + +@pytest.mark.parametrize("kind", ["post_call_transcription", "post_call_audio", "call_initiation_failure"]) +def test_other_webhook_types_ack_and_store_nothing(make_forwarder, kind): + forwarder = make_forwarder() + body = raw(load_fixture("other_webhook_types.json")[kind]) + status, payload = deliver(forwarder, body) + assert (status, payload) == (200, {"status": "ignored"}) + assert forwarder.exporter.batches == [] + + +def test_duplicate_delivery_yields_one_export(make_forwarder): + forwarder = make_forwarder() + assert deliver(forwarder)[0] == 200 + # ElevenLabs retries with a new timestamp, so a new signature. + status, payload = deliver(forwarder, header=sign(WEBHOOK_SECRET, OK, int(time.time()) + 1)) + assert (status, payload["status"]) == (200, "duplicate") + roots = [s for s in forwarder.exporter.spans() if "parentSpanId" not in s] + assert len(roots) == 1 + + +def test_idempotency_record_survives_a_restart(tmp_path, make_forwarder): + state = str(tmp_path / "state" / "forwarded.sqlite3") + first = make_forwarder(state_path=state) + assert deliver(first)[0] == 200 + first.store.close() + second = make_forwarder(state_path=state) + status, payload = deliver(second) + assert (status, payload["status"]) == (200, "duplicate") + assert second.exporter.batches == [] + + +@pytest.mark.parametrize( + "mutate, code", + [ + (lambda b: b["data"].pop("otlp_traces"), "missing_resource_spans"), + (lambda b: b["data"]["otlp_traces"].update(resourceSpans=[]), "missing_resource_spans"), + (lambda b: b.update(data="x"), "missing_data"), + ], +) +def test_malformed_otlp_returns_400_and_stores_nothing(make_forwarder, mutate, code): + forwarder = make_forwarder() + body = load_fixture("post_call_transcription_otel.json") + mutate(body) + status, payload = deliver(forwarder, raw(body)) + assert (status, payload) == (400, {"error": code}) + assert forwarder.exporter.batches == [] + + +def test_invalid_json_after_valid_signature_is_400(make_forwarder): + forwarder = make_forwarder() + status, payload = deliver(forwarder, b"{not json") + assert (status, payload) == (400, {"error": "invalid_json"}) + + +def test_mapper_bug_returns_500_and_exports_nothing(make_forwarder, monkeypatch): + forwarder = make_forwarder() + + def boom(*args, **kwargs): + raise KeyError("bug") + + monkeypatch.setattr("traceai_elevenlabs_agents.forwarder.map_otlp_traces", boom) + status, payload = deliver(forwarder) + assert (status, payload) == (500, {"error": "mapping_failed"}) + assert forwarder.exporter.batches == [] + assert forwarder.store.state("conv_9001k1zph3fkeh5s8xg9z90swaqa") is None + + +def test_export_failure_returns_502_releases_claim_and_retry_succeeds(make_forwarder): + exporter = RecordingExporter(fail=ExportError("collector returned HTTP 503", 503)) + forwarder = make_forwarder(exporter=exporter) + status, payload = deliver(forwarder) + assert (status, payload["error"]) == (502, "export_failed") + assert forwarder.store.state("conv_9001k1zph3fkeh5s8xg9z90swaqa") is None + exporter.fail = None + status, payload = deliver(forwarder) + assert (status, payload["status"]) == (200, "forwarded") + assert len(exporter.batches) == 1 + + +def test_ack_only_after_export(make_forwarder): + # AC-13 at the unit boundary: 2xx is returned only after the exporter accepted the batch. + order = [] + + class Exporter(RecordingExporter): + def export(self, request): + order.append("export") + return super().export(request) + + forwarder = make_forwarder(exporter=Exporter()) + status, _ = deliver(forwarder) + order.append("ack:%d" % status) + assert order == ["export", "ack:200"] + assert forwarder.store.state("conv_9001k1zph3fkeh5s8xg9z90swaqa") == "done" + + +def test_concurrent_delivery_of_same_conversation_is_deferred(make_forwarder): + forwarder = make_forwarder() + assert forwarder.store.claim("conv_9001k1zph3fkeh5s8xg9z90swaqa", "post_call_webhook") == "claimed" + status, payload = deliver(forwarder) + assert (status, payload["error"]) == (503, "in_flight") + assert forwarder.exporter.batches == [] + + +def test_stale_pending_claim_is_taken_over(tmp_path): + store = ForwardedStore(str(tmp_path / "s.sqlite3"), stale_after_secs=0) + assert store.claim("c1", "post_call_webhook") == "claimed" + time.sleep(0.01) + assert store.claim("c1", "post_call_webhook") == "claimed" + store.complete("c1", "t") + assert store.claim("c1", "backfill") == "duplicate" + assert store.claim("c1", "backfill", force=True) == "claimed" + store.close() + + +def test_paused_forwarder_returns_503(make_forwarder): + forwarder = make_forwarder(paused=True) + assert deliver(forwarder) == (503, {"error": "paused"}) + assert forwarder.exporter.batches == [] + + +def test_logs_and_responses_carry_no_secret_signature_or_content(make_forwarder, log_capture): + forwarder = make_forwarder() + header = sign(WEBHOOK_SECRET, OK) + responses = [ + forwarder.handle_webhook(OK, header), + forwarder.handle_webhook(OK, header), + forwarder.handle_webhook(OK, sign("wrong", OK)), + forwarder.handle_webhook(OK.replace(b"Goodbye", b"Bye"), header), + forwarder.handle_webhook(raw(load_fixture("other_webhook_types.json")["post_call_audio"]), + sign(WEBHOOK_SECRET, raw(load_fixture("other_webhook_types.json")["post_call_audio"]))), + ] + # Logs and HTTP responses never carry content, in any mode. + text = log_capture.text + json.dumps(responses) + for needle in (WEBHOOK_SECRET, FI_API_KEY, FI_SECRET_KEY, header.split("v0=")[1], MARKER, "UklGRg"): + assert needle not in text + # Spans never carry a credential or the signature. + exported = json.dumps(forwarder.exporter.batches) + for needle in (WEBHOOK_SECRET, FI_API_KEY, FI_SECRET_KEY, header.split("v0=")[1], "UklGRg"): + assert needle not in exported + assert "conv_9001k1zph3fkeh5s8xg9z90swaqa" in log_capture.text + + +def test_content_by_default_and_the_standard_hide_flags_remove_it(make_forwarder): + default = make_forwarder() + hidden = make_forwarder(trace_config=hide_all()) + deliver(default) + deliver(hidden) + assert MARKER in json.dumps(default.exporter.batches) + assert MARKER not in json.dumps(hidden.exporter.batches) + for forwarder in (default, hidden): + blob = json.dumps(forwarder.exporter.batches) + for needle in (WEBHOOK_SECRET, FI_API_KEY, FI_SECRET_KEY) + NEVER_NEEDLES: + assert needle not in blob + + +def test_webhook_user_id_is_written_when_present(make_forwarder): + body = load_fixture("post_call_transcription_otel.json") + body["data"]["user_id"] = "caller-17" + forwarder = make_forwarder() + assert deliver(forwarder, raw(body))[0] == 200 + root = [s for s in forwarder.exporter.spans() if "parentSpanId" not in s][0] + assert map_mod.attributes_to_dict(root["attributes"])["user.id"] == "caller-17" + + +def test_two_forwarders_bind_two_projects(make_forwarder): + a = make_forwarder(project_name="project-a") + b = make_forwarder(project_name="project-b") + deliver(a) + deliver(b) + names = [] + for forwarder in (a, b): + for batch in forwarder.exporter.batches: + resources = [map_mod.attributes_to_dict(rs["resource"]["attributes"]) for rs in batch["resourceSpans"]] + names.append({r["project_name"] for r in resources}) + assert names == [{"project-a"}, {"project-b"}] + + +# --- bodies captured from a live ElevenLabs post-call webhook, 2026-10-19 --------------------------- + +LIVE = "live_webhook_post_call_transcription_otel.json" +LIVE_TIMEOUT = "live_webhook_post_call_transcription_otel_timeout.json" + + +def test_live_webhook_body_is_forwarded_with_hierarchy_model_tokens_and_user(make_forwarder): + forwarder = make_forwarder() + status, payload = deliver(forwarder, raw(load_fixture(LIVE))) + assert (status, payload["status"]) == (200, "forwarded") + spans = forwarder.exporter.spans() + attrs = {s["spanId"]: map_mod.attributes_to_dict(s["attributes"]) for s in spans} + root = [s for s in spans if "parentSpanId" not in s] + assert len(root) == 1 and attrs[root[0]["spanId"]]["fi.span.kind"] == "CONVERSATION" + r = attrs[root[0]["spanId"]] + # the live body has no data.user_id: the id is the root attribute elevenlabs.user_id + assert r["user.id"] == "live-user-42" + assert r["session.id"].startswith("conv_LIVE") + kinds = [a.get("fi.span.kind") for a in attrs.values()] + assert kinds.count("TOOL") == 1 and kinds.count("LLM") >= 1 + llm = [a for a in attrs.values() if a.get("fi.span.kind") == "LLM"] + assert all(a["gen_ai.request.model"] == "gpt-4o-mini" for a in llm) + assert any(int(a.get("gen_ai.usage.input_tokens", 0)) > 0 for a in llm) + + +def test_live_webhook_without_user_has_no_user_id(make_forwarder): + forwarder = make_forwarder() + assert deliver(forwarder, raw(load_fixture(LIVE_TIMEOUT)))[0] == 200 + root = [s for s in forwarder.exporter.spans() if "parentSpanId" not in s][0] + assert "user.id" not in map_mod.attributes_to_dict(root["attributes"]) + + +def test_live_timeout_call_is_ok_status_and_two_minutes_long(make_forwarder): + # ElevenLabs reports status OK even when the call hit the maximum duration (no ERROR in 3 live cases) + forwarder = make_forwarder() + assert deliver(forwarder, raw(load_fixture(LIVE_TIMEOUT)))[0] == 200 + root = [s for s in forwarder.exporter.spans() if "parentSpanId" not in s][0] + a = map_mod.attributes_to_dict(root["attributes"]) + assert root["status"]["code"] == 1 and a["call.duration"] == 121.0 + + +def test_live_webhook_body_hides_user_id_with_hide_inputs(make_forwarder): + forwarder = make_forwarder(trace_config=hide_all()) + assert deliver(forwarder, raw(load_fixture(LIVE)))[0] == 200 + blob = json.dumps(forwarder.exporter.batches) + assert "live-user-42" not in blob and "Encourage flow" not in blob diff --git a/python/frameworks/elevenlabs-agents/tests/test_live_capture.py b/python/frameworks/elevenlabs-agents/tests/test_live_capture.py new file mode 100644 index 000000000..4c829fcf5 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_live_capture.py @@ -0,0 +1,41 @@ +"""Maps a body captured from a live ElevenLabs workspace on 2026-10-17 (see the fixture's _note).""" +import json + +from conftest import FIXTURES, hide_all +from traceai_elevenlabs_agents.map import map_otlp_traces + +CAPTURED = json.loads((FIXTURES / "live_get_conversation_opentelemetry.json").read_text()) + + +def _spans(request): + return [s for rs in request["resourceSpans"] for ss in rs["scopeSpans"] for s in ss["spans"]] + + +def _attrs(span): + return {a["key"]: list(a["value"].values())[0] for a in span["attributes"]} + + +def _map(**kw): + return map_otlp_traces( + CAPTURED["otlp_traces"], conversation_id=CAPTURED["conversation_id"], project_name="p", **kw + ) + + +def test_captured_body_maps_to_conversation_llm_and_tool_spans(): + request, summary = _map() + spans = _spans(request) + kinds = [_attrs(s).get("fi.span.kind") for s in spans] + assert kinds.count("CONVERSATION") == 1 and kinds.count("TOOL") == 1 and kinds.count("LLM") == 3 + tool = next(s for s in spans if _attrs(s).get("fi.span.kind") == "TOOL") + assert _attrs(tool)["tool.name"] == "get_zen" + llm = [_attrs(s) for s in spans if _attrs(s).get("fi.span.kind") == "LLM"] + assert {a["gen_ai.request.model"] for a in llm} == {"gpt-4o-mini"} + # real attribute names: elevenlabs.llm_usage..input / .output_total, JSON {"tokens", "price"} + assert sorted(int(a["gen_ai.usage.input_tokens"]) for a in llm if "gen_ai.usage.input_tokens" in a) == [717, 745] + assert sorted(int(a["gen_ai.usage.output_tokens"]) for a in llm if "gen_ai.usage.output_tokens" in a) == [9, 11] + + +def test_captured_body_hides_content_with_the_standard_switches(): + request, _ = _map(trace_config=hide_all()) + blob = json.dumps(request) + assert "fully shipped" not in blob and "Give me a quote" not in blob diff --git a/python/frameworks/elevenlabs-agents/tests/test_map.py b/python/frameworks/elevenlabs-agents/tests/test_map.py new file mode 100644 index 000000000..15e336233 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_map.py @@ -0,0 +1,449 @@ +import json +from dataclasses import fields + +import pytest +from fi_instrumentation import TraceConfig + +from conftest import MARKER, NEVER_NEEDLES, hide_all, load_fixture +from traceai_elevenlabs_agents import privacy +from traceai_elevenlabs_agents.map import MappingInputError, attributes_to_dict, iter_spans, map_otlp_traces +from voice_tab_check import assert_voice_tab + +CONTENT_KEYS = ("input.value", "output.value", "conversation.transcript", "fi.conversation.transcript", "user.id") +RAW_INPUT_KEYS = ("elevenlabs.user.text", "elevenlabs.tool.params", "elevenlabs.rag.retrieval_query") +RAW_OUTPUT_KEYS = ("elevenlabs.agent.text", "elevenlabs.tool.result", "elevenlabs.reasoning_content") + + +def mapped(name="post_call_transcription_otel.json", trace_config=None, **kwargs): + body = load_fixture(name) + data = body["data"] if "data" in body else body + return map_otlp_traces( + data["otlp_traces"], + conversation_id=data.get("conversation_id"), + agent_id=data.get("agent_id"), + project_name=kwargs.pop("project_name", "th8231-unit"), + trace_config=trace_config if trace_config is not None else TraceConfig(), + **kwargs, + ) + + +def by_name(export_request): + out = {} + for resource, span in iter_spans(export_request): + out.setdefault(span["name"], []).append((resource, span, attributes_to_dict(span["attributes"]))) + return out + + +def all_attrs(export_request): + return [attributes_to_dict(span["attributes"]) for _, span in iter_spans(export_request)] + + +def test_ids_names_times_and_hierarchy_are_preserved(): + source = load_fixture("post_call_transcription_otel.json")["data"]["otlp_traces"] + source_spans = source["resourceSpans"][0]["scopeSpans"][0]["spans"] + request, summary = mapped() + out_spans = [s for _, s in iter_spans(request)] + assert len(out_spans) == len(source_spans) == summary["span_count"] == 8 + for src, out in zip(source_spans, out_spans, strict=True): + assert (out["traceId"], out["spanId"], out.get("parentSpanId"), out["name"]) == ( + src["traceId"], + src["spanId"], + src.get("parentSpanId"), + src["name"], + ) + assert out["startTimeUnixNano"] == src["startTimeUnixNano"] + assert out["endTimeUnixNano"] == src["endTimeUnixNano"] + assert summary["trace_ids"] == ["4bf92f3577b34da6a3ce929d0e0e4736"] + # AC-04: the tool span's parent is the agent-response span ElevenLabs set. + tool = by_name(request)["elevenlabs.tool.get_exchange_rate"][0][1] + assert tool["parentSpanId"] == "a000000000000004" + + +def test_root_is_parentless_conversation_with_voice_tab_attributes(): + request, _ = mapped() + _, root, attrs = by_name(request)["elevenlabs.conversation"][0] + assert "parentSpanId" not in root + assert attrs["fi.span.kind"] == "CONVERSATION" + assert attrs["gen_ai.system"] == "elevenlabs" + assert attrs["session.id"] == "conv_9001k1zph3fkeh5s8xg9z90swaqa" + assert attrs["call.duration"] == 42.0 + assert attrs["call.total_turns"] == 5 + assert attrs["elevenlabs.agent_id"] == "agent_7101k5zvyjhmfg983brhmhkd98n6" + assert attrs["elevenlabs.source"] == "post_call_webhook" + assert attrs["elevenlabs.cost_fiat"] == 0.0421 + assert "call.talk_ratio" not in attrs # AC-07: no per-side audio durations in the payload + # Only the root is a conversation. + kinds = [a.get("fi.span.kind") for a in all_attrs(request)] + assert kinds.count("CONVERSATION") == 1 + # Defaults: the transcript is there, and nothing from the never-exported list is. + assert_voice_tab( + [s for _, s in iter_spans(request)], + omissions=("call.talk_ratio", "user.id"), # the webhook payload carries no user id + forbidden_substrings=NEVER_NEEDLES, + ) + + +def test_defaults_capture_the_conversation_like_every_traceai_instrumentor(): + request, summary = mapped(user_id="user-42") + names = by_name(request) + attrs = names["elevenlabs.conversation"][0][2] + transcript = json.loads(attrs["conversation.transcript"]) + assert attrs["fi.conversation.transcript"] == attrs["conversation.transcript"] + assert [r["role"] for r in transcript] == ["assistant", "user", "assistant", "user", "assistant"] + assert transcript[1]["content"] == "What is the US dollar to euro rate today? " + MARKER + assert transcript[1]["time"] == "4" + assert summary["transcript_rows"] == 5 + for i, row in enumerate(transcript): + assert attrs["conversation.transcript.%d.message.role" % i] == row["role"] + assert attrs["conversation.transcript.%d.message.content" % i] == row["content"] + assert attrs["user.id"] == "user-42" + assert attrs["input.value"].startswith("What is the US dollar") + assert attrs["output.value"] == "Goodbye! " + MARKER + assert attrs["elevenlabs.analysis.transcript_summary"].endswith(MARKER) + # Dynamic variables are kept, but an email address in one never leaves. + assert attrs["elevenlabs.dynamic_variable.account_number"] == 4400123456 + assert attrs["elevenlabs.dynamic_variable.user_email"] == "" + tool = names["elevenlabs.tool.get_exchange_rate"][0][2] + assert json.loads(tool["input.value"])["base"] == "USD" + assert json.loads(tool["output.value"])["rates"]["EUR"] == 0.92 + llm = [a for _, _, a in names["elevenlabs.recv.agent_response"] if a["fi.span.kind"] == "LLM"][0] + assert llm["input.value"] == "What is the US dollar to euro rate today? " + MARKER + assert llm["output.value"] == "One US dollar is 0.92 euros right now. " + MARKER + assert llm["elevenlabs.reasoning_content"].endswith(MARKER) + assert llm["elevenlabs.rag.retrieval_query"].endswith(MARKER) + # Signed media URLs are dropped in every mode (D-V03). + assert "X-Goog-Signature" not in json.dumps(request) + assert "elevenlabs.recording_url" not in attrs + assert_voice_tab([s for _, s in iter_spans(request)], omissions=("call.talk_ratio",)) + + +def test_all_hide_flags_on_export_no_content_anywhere(): + request, summary = mapped(trace_config=hide_all(), user_id="user-" + MARKER) + blob = json.dumps(request) + assert MARKER not in blob + for needle in NEVER_NEEDLES: + assert needle not in blob + assert summary["transcript_rows"] == 0 + for attrs in all_attrs(request): + for key in CONTENT_KEYS + RAW_INPUT_KEYS + RAW_OUTPUT_KEYS: + assert key not in attrs + prefixes = ("conversation.transcript.", "elevenlabs.dynamic_variable", "elevenlabs.analysis") + assert not any(k.startswith(prefixes) for k in attrs) + + +def test_all_hide_flags_on_keep_structure_model_and_tokens(): + request, _ = mapped(trace_config=hide_all()) + names = by_name(request) + llm_turns = [a for _, _, a in names["elevenlabs.recv.agent_response"] if a["fi.span.kind"] == "LLM"] + assert len(llm_turns) == 2 + first = llm_turns[0] + assert first["gen_ai.request.model"] == "gpt-4o-mini" + assert first["gen_ai.usage.input_tokens"] == 412 + assert first["gen_ai.usage.output_tokens"] == 23 + assert first["elevenlabs.rag.embedding_model"] == "multilingual_e5_large_instruct" + assert first["elevenlabs.rag.latency_ms"] == 41.5 + greeting = names["elevenlabs.recv.agent_response"][0][2] + assert greeting["fi.span.kind"] == "CHAIN" + assert all(a["fi.span.kind"] == "CHAIN" for _, _, a in names["elevenlabs.recv.user_transcript"]) + tool = names["elevenlabs.tool.get_exchange_rate"][0][2] + assert tool["fi.span.kind"] == "TOOL" + assert tool["tool.name"] == "get_exchange_rate" + root = names["elevenlabs.conversation"][0][2] + assert (root["call.duration"], root["call.total_turns"]) == (42.0, 5) + assert all(a["session.id"] == "conv_9001k1zph3fkeh5s8xg9z90swaqa" for a in all_attrs(request)) + # Still listed in the Voice tab, without a transcript. + assert_voice_tab( + [s for _, s in iter_spans(request)], + omissions=("call.talk_ratio", "user.id", "conversation.transcript", "fi.conversation.transcript"), + forbidden_substrings=(MARKER,), + ) + + +@pytest.mark.parametrize("flag", privacy.INPUT_FLAGS) +def test_any_input_flag_hides_the_user_side_only(flag): + request, _ = mapped(trace_config=TraceConfig(**{flag: True}), user_id="user-42") + names = by_name(request) + for attrs in all_attrs(request): + assert "input.value" not in attrs + assert not any(k.startswith(RAW_INPUT_KEYS + ("elevenlabs.dynamic_variable",)) for k in attrs) + root = names["elevenlabs.conversation"][0][2] + assert "user.id" not in root + assert "conversation.transcript" not in root and "fi.conversation.transcript" not in root + # The agent side stays. + assert root["output.value"] == "Goodbye! " + MARKER + assert names["elevenlabs.tool.get_exchange_rate"][0][2]["output.value"].startswith('{"rates"') + llm = [a for _, _, a in names["elevenlabs.recv.agent_response"] if a["fi.span.kind"] == "LLM"][0] + assert llm["output.value"].endswith(MARKER) and llm["elevenlabs.reasoning_content"].endswith(MARKER) + # Nothing the user said is left anywhere. + assert "What is the US dollar" not in json.dumps(request) and "Great, thank you" not in json.dumps(request) + + +@pytest.mark.parametrize("flag", privacy.OUTPUT_FLAGS) +def test_any_output_flag_hides_the_agent_side_and_error_text(flag): + request, _ = mapped(trace_config=TraceConfig(**{flag: True})) + for attrs in all_attrs(request): + assert "output.value" not in attrs + assert not any(k.startswith(RAW_OUTPUT_KEYS + ("elevenlabs.analysis",)) for k in attrs) + names = by_name(request) + root = names["elevenlabs.conversation"][0][2] + assert "conversation.transcript" not in root + assert root["input.value"].startswith("What is the US dollar") + assert names["elevenlabs.tool.get_exchange_rate"][0][2]["input.value"].startswith('{"base"') + blob = json.dumps(request) + for agent_said in ("One US dollar is", "Hi! I can help", '"rates"', "User wants an FX rate", "Caller asked for"): + assert agent_said not in blob + + errored, _ = mapped("post_call_transcription_otel_error.json", trace_config=TraceConfig(**{flag: True})) + error_names = by_name(errored) + assert error_names["elevenlabs.conversation"][0][1]["status"] == {"code": 2} + tool = error_names["elevenlabs.tool.book_table"][0][1] + assert tool["status"] == {"code": 2} + assert tool["events"] == [{"name": "exception", "timeUnixNano": "1760000116000000000"}] + + +def test_standard_env_vars_drive_the_default_trace_config(monkeypatch): + for name in ("FI_HIDE_INPUTS", "FI_HIDE_OUTPUTS", "FI_HIDE_INPUT_MESSAGES", "FI_HIDE_OUTPUT_MESSAGES"): + monkeypatch.setenv(name, "true") + body = load_fixture("post_call_transcription_otel.json")["data"] + request, _ = map_otlp_traces(body["otlp_traces"], conversation_id=None, project_name="p") # trace_config=None + assert MARKER not in json.dumps(request) + monkeypatch.setenv("FI_HIDE_INPUTS", "false") + monkeypatch.setenv("FI_HIDE_INPUT_MESSAGES", "false") + request, _ = map_otlp_traces(body["otlp_traces"], conversation_id=None, project_name="p") + root = by_name(request)["elevenlabs.conversation"][0][2] + assert root["input.value"].endswith(MARKER) and "output.value" not in root + + +@pytest.mark.parametrize("trace_config", [None, "hide_all"]) +def test_never_exported_in_any_mode(trace_config): + config = hide_all() if trace_config == "hide_all" else TraceConfig() + for fixture in ("post_call_transcription_otel.json", "post_call_transcription_otel_error.json"): + request, _ = mapped(fixture, trace_config=config, user_id="alice@example.com") + blob = json.dumps(request) + for needle in NEVER_NEEDLES: + assert needle not in blob, (fixture, needle) + for resource, _ in iter_spans(request): + assert set(resource) <= privacy.RESOURCE_ALLOWLIST | {"project_name", "project_type"} + assert resource["service.name"] == "elevenlabs-convai" + assert all("user.id" not in a for a in all_attrs(request)) # an email-shaped user id is never written + + +def test_resource_allowlist_drops_host_and_process_attributes(): + request, _ = mapped() + resource = next(iter_spans(request))[0] + assert resource == { + "service.name": "elevenlabs-convai", + "elevenlabs.conversation_id": "conv_9001k1zph3fkeh5s8xg9z90swaqa", + "project_name": "th8231-unit", + "project_type": "observe", + } + + +def test_identity_keys_on_spans_are_dropped_but_token_counts_are_not(): + otlp = { + "resourceSpans": [ + { + "resource": {"attributes": []}, + "scopeSpans": [ + { + "spans": [ + { + "traceId": "1" * 32, + "spanId": "2" * 16, + "name": "elevenlabs.conversation", + "attributes": [ + {"key": k, "value": {"stringValue": v}} + for k, v in ( + ("host.name", "box"), + ("process.command_line", "python agent.py"), + ("user.email", "a@b.io"), + ("enduser.id", "u"), + ("code.filepath", "agent.py"), + ("db.password", "pw"), + ("x.api_key", "k"), + ("http.request.header.authorization", "Bearer x"), + ("custom.note", "kept"), + ) + ] + + [{"key": "gen_ai.usage.input_tokens", "value": {"intValue": "7"}}], + } + ] + } + ], + } + ] + } + request, _ = map_otlp_traces(otlp, conversation_id="conv_x", project_name="p", trace_config=TraceConfig()) + attrs = attributes_to_dict(next(iter_spans(request))[1]["attributes"]) + assert attrs["custom.note"] == "kept" + assert attrs["gen_ai.usage.input_tokens"] == 7 + for key in ("host.name", "process.command_line", "user.email", "enduser.id", "code.filepath", "db.password", + "x.api_key", "http.request.header.authorization"): + assert key not in attrs + + +def test_error_text_is_one_scrubbed_line_by_default(): + request, _ = mapped("post_call_transcription_otel_error.json") + names = by_name(request) + root_status = names["elevenlabs.conversation"][0][1]["status"] + assert root_status == { + "code": 2, + "message": "call ended: websocket closed abnormally " + MARKER + " on ", + } + tool = names["elevenlabs.tool.book_table"][0][1] + assert tool["status"] == {"code": 2, "message": "upstream timeout " + MARKER} + event = attributes_to_dict(tool["events"][0]["attributes"]) + assert event == {"exception.message": "ReadTimeout " + MARKER} # the stack trace is never forwarded + transcript = json.loads(names["elevenlabs.conversation"][0][2]["conversation.transcript"]) + assert transcript[-1]["content"] == "Sure, let me check..." + MARKER # interruption stays as sent + + +def test_stack_trace_inside_a_tool_result_is_cut_to_its_error_line(): + body = load_fixture("post_call_transcription_otel.json") + trace = 'Traceback (most recent call last):\n File "/Users/bob/tools/fx.py", line 9, in rate\nKeyError: \'EUR\'' + for span in body["data"]["otlp_traces"]["resourceSpans"][0]["scopeSpans"][0]["spans"]: + if span["name"] == "elevenlabs.tool.get_exchange_rate": + span["attributes"][1]["value"]["stringValue"] = trace + request, _ = map_otlp_traces(body["data"]["otlp_traces"], conversation_id=None, project_name="p") + tool = by_name(request)["elevenlabs.tool.get_exchange_rate"][0][2] + assert tool["output.value"] == "KeyError: 'EUR'" + assert tool["elevenlabs.tool.result"] == "KeyError: 'EUR'" + assert "/Users/bob" not in json.dumps(request) + + +def test_fi_pii_redaction_applies_to_the_content(): + if "pii_redaction" not in {f.name for f in fields(TraceConfig)}: + pytest.skip("this fi-instrumentation-otel has no FI_PII_REDACTION") + body = load_fixture("post_call_transcription_otel.json") + for span in body["data"]["otlp_traces"]["resourceSpans"][0]["scopeSpans"][0]["spans"]: + for attribute in span.get("attributes", []): + if attribute["key"] == "elevenlabs.user.text": + attribute["value"]["stringValue"] = "Mail me at carol.jones@acme.io please" + break + plain, _ = map_otlp_traces(body["data"]["otlp_traces"], conversation_id=None, project_name="p") + assert "carol.jones@acme.io" in json.dumps(plain) # spoken content is content + redacted, _ = map_otlp_traces( + body["data"]["otlp_traces"], + conversation_id=None, + project_name="p", + trace_config=TraceConfig(pii_redaction=True), + ) + blob = json.dumps(redacted) + assert "carol.jones@acme.io" not in blob and "" in blob + root = by_name(redacted)["elevenlabs.conversation"][0][2] + assert root["session.id"] == "conv_9001k1zph3fkeh5s8xg9z90swaqa" + + +def test_turn_order_uses_turn_index_when_present(): + body = load_fixture("post_call_transcription_otel.json") + spans = body["data"]["otlp_traces"]["resourceSpans"][0]["scopeSpans"][0]["spans"] + for span in spans: # whole-second timestamps: make every turn start in the same second + if span["name"].startswith("elevenlabs.recv."): + span["startTimeUnixNano"] = spans[0]["startTimeUnixNano"] + spans[1], spans[2] = spans[2], spans[1] + request, _ = map_otlp_traces(body["data"]["otlp_traces"], conversation_id=None, project_name="p") + attrs = by_name(request)["elevenlabs.conversation"][0][2] + assert [r["role"] for r in json.loads(attrs["conversation.transcript"])][:2] == ["assistant", "user"] + + +def test_no_turn_text_omits_transcript_and_uses_time_in_call_fallback(): + request, _ = mapped("post_call_transcription_otel_no_text.json") + attrs = by_name(request)["elevenlabs.conversation"][0][2] + for key in ("conversation.transcript", "fi.conversation.transcript", "input.value", "output.value"): + assert key not in attrs + assert not any(k.startswith("conversation.transcript.") for k in attrs) + assert attrs["call.duration"] == 7.0 # zero-length root, numeric time_in_call_secs on the root + assert attrs["call.total_turns"] == 2 + + +def test_root_without_turns_omits_turn_count_and_duration(): + otlp = { + "resourceSpans": [ + { + "resource": {"attributes": []}, + "scopeSpans": [ + { + "spans": [ + { + "traceId": "1" * 32, + "spanId": "2" * 16, + "name": "elevenlabs.conversation", + "startTimeUnixNano": "1760000000000000000", + "endTimeUnixNano": "1760000000000000000", + } + ] + } + ], + } + ] + } + request, _ = map_otlp_traces(otlp, conversation_id="conv_x", project_name="p") + attrs = attributes_to_dict(next(iter_spans(request))[1]["attributes"]) + assert "call.total_turns" not in attrs and "call.duration" not in attrs + assert attrs["session.id"] == "conv_x" + + +def test_unknown_span_name_passes_through_without_kind(): + request, _ = mapped() + unknown = by_name(request)["elevenlabs.event.something_new"][0][2] + assert "fi.span.kind" not in unknown + assert unknown["elevenlabs.event.count"] == 3 + assert json.loads(unknown["elevenlabs.event.data"])["detail"] == MARKER + hidden, _ = mapped(trace_config=hide_all()) + unknown = by_name(hidden)["elevenlabs.event.something_new"][0][2] + assert unknown["elevenlabs.event.count"] == 3 # numeric metadata survives every mode + assert "elevenlabs.event.data" not in unknown + + +def test_four_kb_tool_argument_is_stored_as_sent(): + body = load_fixture("post_call_transcription_otel.json") + big = '{"q": "' + ("x" * 4087) + '"}' + assert len(big) == 4096 + for span in body["data"]["otlp_traces"]["resourceSpans"][0]["scopeSpans"][0]["spans"]: + if span["name"] == "elevenlabs.tool.get_exchange_rate": + span["attributes"][0]["value"]["stringValue"] = big + request, _ = map_otlp_traces(body["data"]["otlp_traces"], conversation_id=None, project_name="p") + tool = by_name(request)["elevenlabs.tool.get_exchange_rate"][0][2] + assert tool["elevenlabs.tool.params"] == big + assert tool["input.value"] == big + assert "elevenlabs.truncated" not in tool + + +def test_payload_cannot_choose_the_project(): + request, _ = mapped(project_name="bound-project") + for resource, _ in iter_spans(request): + assert resource["project_name"] == "bound-project" + assert resource["project_type"] == "observe" + assert not any(k.startswith("fi.") for k in resource) + other, _ = mapped(project_name="second-project") + assert {r["project_name"] for r, _ in iter_spans(other)} == {"second-project"} + + +def test_trace_config_must_be_a_trace_config(): + with pytest.raises(TypeError): + mapped(trace_config={"hide_inputs": True}) + + +@pytest.mark.parametrize( + "otlp, code", + [ + (None, "missing_resource_spans"), + ({}, "missing_resource_spans"), + ({"resourceSpans": []}, "missing_resource_spans"), + ({"resourceSpans": [{"scopeSpans": [{"spans": []}]}]}, "missing_resource_spans"), + ({"resourceSpans": [{"scopeSpans": [{"spans": [{"traceId": "zz", "spanId": "1" * 16}]}]}]}, "invalid_span"), + ({"resourceSpans": [{"scopeSpans": [{"spans": [{"traceId": "1" * 32, "spanId": "1"}]}]}]}, "invalid_span"), + ({"resourceSpans": ["x"]}, "invalid_resource_spans"), + ], +) +def test_malformed_payloads_raise_stable_codes(otlp, code): + with pytest.raises(MappingInputError) as info: + map_otlp_traces(otlp, conversation_id="conv_x", project_name="p") + assert info.value.code == code + + +def test_missing_conversation_id_everywhere_is_an_input_error(): + otlp = {"resourceSpans": [{"scopeSpans": [{"spans": [{"traceId": "1" * 32, "spanId": "2" * 16, "name": "x"}]}]}]} + with pytest.raises(MappingInputError) as info: + map_otlp_traces(otlp, conversation_id=None, project_name="p") + assert info.value.code == "missing_conversation_id" diff --git a/python/frameworks/elevenlabs-agents/tests/test_privacy.py b/python/frameworks/elevenlabs-agents/tests/test_privacy.py new file mode 100644 index 000000000..cb6906ab6 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_privacy.py @@ -0,0 +1,80 @@ +"""The never-exported layer and the TraceConfig side mapping.""" + +import pytest +from fi_instrumentation import TraceConfig + +from traceai_elevenlabs_agents import privacy +from traceai_elevenlabs_agents.privacy import Capture, error_summary, looks_like_stack_trace, scrub_identity + + +@pytest.mark.parametrize( + "text, expected", + [ + ("mail alice.smith+x@corp.example.com now", "mail now"), + ("failed in /home/alice/app/agent.py:12", "failed in :12"), + ("see /Users/bob/Library/x.log", "see "), + ("open C:\\Users\\bob\\agent\\run.py", "open "), + ("cfg at ~/.config/agent.toml", "cfg at "), + ("loaded file:///Users/bob/x.json", "loaded "), + ("on alice-laptop.local and db.corp", "on and "), + # Not identity: URLs, dates, ratios, a bare root path, public host names. + ("GET https://api.elevenlabs.io/v1/convai/x", "GET https://api.elevenlabs.io/v1/convai/x"), + ("on 10/16/2026, and/or 3/4 of /tmp", "on 10/16/2026, and/or 3/4 of /tmp"), + ("api.openai.com timed out", "api.openai.com timed out"), + ], +) +def test_scrub_identity(text, expected): + assert scrub_identity(text) == expected + + +def test_error_summary_keeps_one_line_and_no_frames(): + py = 'Traceback (most recent call last):\n File "/srv/app/a.py", line 3, in f\nValueError: bad /srv/app/x' + assert error_summary(py) == "ValueError: bad " + java = "java.io.IOException: closed\n\tat com.acme.Agent.run(Agent.java:42)\n\tat java.lang.Thread.run(Thread.java:1)" + assert error_summary(java) == "java.io.IOException: closed" + assert error_summary("upstream timeout") == "upstream timeout" + assert error_summary("x" * 2000).endswith("\u2026") and len(error_summary("x" * 2000)) == privacy.MAX_ERROR_TEXT + assert error_summary(" \n ") is None and error_summary(None) is None + + +def test_stack_trace_detection(): + assert looks_like_stack_trace("Traceback (most recent call last):\n x") + assert looks_like_stack_trace('oops\n File "a.py", line 1, in ') + assert not looks_like_stack_trace("The file is at line 4 of the form") + assert not looks_like_stack_trace('File "a.py", line 1') # single line: a sentence, not a trace + + +@pytest.mark.parametrize( + "config, sides", + [ + (TraceConfig(), (True, True)), + (TraceConfig(hide_inputs=True), (False, True)), + (TraceConfig(hide_input_messages=True), (False, True)), + (TraceConfig(hide_input_text=True), (False, True)), + (TraceConfig(hide_outputs=True), (True, False)), + (TraceConfig(hide_output_messages=True), (True, False)), + (TraceConfig(hide_output_text=True), (True, False)), + (TraceConfig(hide_inputs=True, hide_outputs=True), (False, False)), + # Not a content switch here: there are no images or embeddings in a call trace. + (TraceConfig(hide_input_images=True, hide_embedding_vectors=True), (True, True)), + ], +) +def test_trace_config_sides(config, sides): + capture = Capture.from_trace_config(config) + assert (capture.input, capture.output) == sides + assert capture.everything is all(sides) + + +def test_classification(): + usage = lambda v: {"tokens": 1} if v == "ok" else None # noqa: E731 + assert privacy.classify("elevenlabs.user.text", "hi", parse_llm_usage=usage) == privacy.INPUT + assert privacy.classify("elevenlabs.dynamic_variable.name", "Bo", parse_llm_usage=usage) == privacy.INPUT + assert privacy.classify("elevenlabs.tool.result", "{}", parse_llm_usage=usage) == privacy.OUTPUT + assert privacy.classify("elevenlabs.data_collection.age", 41, parse_llm_usage=usage) == privacy.OUTPUT + assert privacy.classify("elevenlabs.event.data", "{}", parse_llm_usage=usage) == privacy.CONTENT + assert privacy.classify("elevenlabs.turn.index", 3, parse_llm_usage=usage) == privacy.SAFE + assert privacy.classify("elevenlabs.llm_usage.m.input", "ok", parse_llm_usage=usage) == privacy.SAFE + assert privacy.classify("elevenlabs.llm_usage.m.input", "??", parse_llm_usage=usage) == privacy.CONTENT + assert privacy.classify("host.name", "box", parse_llm_usage=usage) == privacy.NEVER + assert privacy.classify("exception.stacktrace", "...", parse_llm_usage=usage) == privacy.NEVER + assert privacy.classify("gen_ai.usage.output_tokens", 4, parse_llm_usage=usage) == privacy.CONTENT diff --git a/python/frameworks/elevenlabs-agents/tests/test_sdk_oracle.py b/python/frameworks/elevenlabs-agents/tests/test_sdk_oracle.py new file mode 100644 index 000000000..928a764b1 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_sdk_oracle.py @@ -0,0 +1,49 @@ +"""Second signature oracle: the real ElevenLabs SDK ``construct_event``. + +Skipped when the ``elevenlabs`` test extra is not installed. Run against 2.73.0 +(latest stable on 2026-10-15) and 2.70.0 (the PRD pin); the webhook code is +byte-identical in both. +""" + +import time + +import pytest + +from conftest import WEBHOOK_SECRET, load_fixture, raw +from traceai_elevenlabs_agents.verify import DEFAULT_TOLERANCE_SECS, SignatureError, sign, verify_signature + +BODY = raw(load_fixture("post_call_transcription_otel.json")) + +elevenlabs = pytest.importorskip("elevenlabs") + + +def _sdk_webhooks(): + from elevenlabs.client import ElevenLabs + + return ElevenLabs(api_key="not-used-by-construct-event").webhooks + + +def test_sdk_construct_event_accepts_what_we_sign(): + header = sign(WEBHOOK_SECRET, BODY) + event = _sdk_webhooks().construct_event(rawBody=BODY.decode("utf-8"), sig_header=header, secret=WEBHOOK_SECRET) + assert event["type"] == "post_call_transcription_otel" + assert verify_signature(BODY, header, WEBHOOK_SECRET) + + +def test_sdk_and_forwarder_agree_on_rejections(): + from elevenlabs.errors import BadRequestError + + now = int(time.time()) + good = sign(WEBHOOK_SECRET, BODY, now) + mutated = BODY.replace(b"post_call_transcription_otel", b"post_call_transcription_xxx", 1) + cases = [ + (BODY, sign("wrong-secret", BODY, now)), + (mutated, good), + (BODY, sign(WEBHOOK_SECRET, BODY, now - DEFAULT_TOLERANCE_SECS - 5)), + (BODY, "t=%d" % now), + ] + for body, header in cases: + with pytest.raises(BadRequestError): + _sdk_webhooks().construct_event(rawBody=body.decode("utf-8"), sig_header=header, secret=WEBHOOK_SECRET) + with pytest.raises(SignatureError): + verify_signature(body, header, WEBHOOK_SECRET) diff --git a/python/frameworks/elevenlabs-agents/tests/test_server.py b/python/frameworks/elevenlabs-agents/tests/test_server.py new file mode 100644 index 000000000..d9e6f3145 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_server.py @@ -0,0 +1,149 @@ +"""The real HTTP server and the real OTLP/HTTP JSON exporter, both on loopback.""" + +import json +import threading +import urllib.error +import urllib.request +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer + +import pytest + +from conftest import FI_API_KEY, FI_SECRET_KEY, WEBHOOK_SECRET, load_fixture, make_config, raw +from traceai_elevenlabs_agents.exporter import ExportError, OTLPJsonExporter, traces_endpoint +from traceai_elevenlabs_agents.forwarder import Forwarder +from traceai_elevenlabs_agents.server import make_server +from traceai_elevenlabs_agents.store import ForwardedStore +from traceai_elevenlabs_agents.verify import sign + + +class Collector: + """Loopback stand-in for the Future AGI collector's OTLP/HTTP route.""" + + def __init__(self, status=200, body=b'{"partialSuccess":{}}'): + self.requests = [] + owner = self + + class Handler(BaseHTTPRequestHandler): + def do_POST(self): # noqa: N802 + data = self.rfile.read(int(self.headers["Content-Length"])) + owner.requests.append( + {"path": self.path, "headers": {k.lower(): v for k, v in self.headers.items()}, "body": data} + ) + self.send_response(owner.status) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(owner.body))) + self.end_headers() + self.wfile.write(owner.body) + + def log_message(self, *args): + pass + + self.status, self.body = status, body + self.httpd = ThreadingHTTPServer(("127.0.0.1", 0), Handler) + self.base_url = "http://127.0.0.1:%d" % self.httpd.server_port + threading.Thread(target=self.httpd.serve_forever, daemon=True).start() + + def close(self): + self.httpd.shutdown() + self.httpd.server_close() + + +@pytest.fixture +def stack(): + collector = Collector() + config = make_config(fi_base_url=collector.base_url) + forwarder = Forwarder(config, store=ForwardedStore(":memory:")) + httpd = make_server(forwarder, "127.0.0.1", 0) + threading.Thread(target=httpd.serve_forever, daemon=True).start() + url = "http://127.0.0.1:%d" % httpd.server_port + yield url, collector, forwarder + httpd.shutdown() + httpd.server_close() + collector.close() + forwarder.store.close() + + +def post(url, body, headers=None): + request = urllib.request.Request(url, data=body, headers=headers or {}, method="POST") + try: + with urllib.request.urlopen(request, timeout=10) as response: + return response.status, json.loads(response.read()) + except urllib.error.HTTPError as error: + return error.code, json.loads(error.read() or b"{}") + + +def test_end_to_end_over_loopback(stack): + url, collector, _ = stack + body = raw(load_fixture("post_call_transcription_otel.json")) + status, payload = post( + url + "/elevenlabs/webhook", + body, + {"Content-Type": "application/json", "ElevenLabs-Signature": sign(WEBHOOK_SECRET, body)}, + ) + assert status == 200 and payload["status"] == "forwarded" + assert len(collector.requests) == 1 + sent = collector.requests[0] + assert sent["path"] == "/tracer/v1/traces" + assert sent["headers"]["x-api-key"] == FI_API_KEY + assert sent["headers"]["x-secret-key"] == FI_SECRET_KEY + assert sent["headers"]["content-type"] == "application/json" + assert "content-encoding" not in sent["headers"] # uncompressed: the collector rejects gzip + exported = json.loads(sent["body"]) + assert len(exported["resourceSpans"][0]["scopeSpans"][0]["spans"]) == 8 + + +def test_signature_failure_over_http(stack): + url, collector, _ = stack + body = raw(load_fixture("post_call_transcription_otel.json")) + status, payload = post(url + "/elevenlabs/webhook", body, {"ElevenLabs-Signature": sign("nope", body)}) + assert (status, payload) == (401, {"error": "invalid_signature"}) + assert collector.requests == [] + + +def test_routes_and_limits(stack): + url, _, _ = stack + with urllib.request.urlopen(url + "/healthz", timeout=5) as response: + assert response.status == 200 + assert post(url + "/other", b"{}")[0] == 404 + request = urllib.request.Request(url + "/elevenlabs/webhook", data=b"x", method="PUT") + with pytest.raises(urllib.error.HTTPError) as info: + urllib.request.urlopen(request, timeout=5) + assert info.value.code == 405 + + +def test_body_size_cap(): + forwarder = Forwarder(make_config(), store=ForwardedStore(":memory:")) + httpd = make_server(forwarder, "127.0.0.1", 0, max_body_bytes=10) + threading.Thread(target=httpd.serve_forever, daemon=True).start() + try: + status, payload = post("http://127.0.0.1:%d/elevenlabs/webhook" % httpd.server_port, b"x" * 11) + assert (status, payload) == (413, {"error": "payload_too_large"}) + finally: + httpd.shutdown() + httpd.server_close() + forwarder.store.close() + + +def test_exporter_maps_collector_errors(): + collector = Collector(status=401, body=b'{"error":"bad key"}') + try: + exporter = OTLPJsonExporter(traces_endpoint(collector.base_url), "k", "s") + with pytest.raises(ExportError) as info: + exporter.export({"resourceSpans": []}) + assert info.value.status == 401 + collector.status, collector.body = 200, b'{"partialSuccess":{"rejectedSpans":"2","errorMessage":"x"}}' + with pytest.raises(ExportError) as info: + exporter.export({"resourceSpans": []}) + assert "rejected 2" in info.value.detail + finally: + collector.close() + with pytest.raises(ExportError) as info: + OTLPJsonExporter("http://127.0.0.1:9/tracer/v1/traces", "k", "s", timeout=2).export({}) + assert "unreachable" in info.value.detail + + +def test_traces_endpoint_matches_fi_instrumentation(): + assert traces_endpoint("https://api.futureagi.com") == "https://api.futureagi.com/tracer/v1/traces" + assert traces_endpoint("http://localhost:14338/") == "http://localhost:14338/tracer/v1/traces" + with pytest.raises(ValueError): + traces_endpoint("localhost:14338") diff --git a/python/frameworks/elevenlabs-agents/tests/test_verify.py b/python/frameworks/elevenlabs-agents/tests/test_verify.py new file mode 100644 index 000000000..d81d228eb --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/test_verify.py @@ -0,0 +1,89 @@ +import hashlib +import hmac +import time + +import pytest + +from conftest import WEBHOOK_SECRET, load_fixture, raw +from traceai_elevenlabs_agents.verify import ( + DEFAULT_TOLERANCE_SECS, + SignatureError, + compute_signature, + sign, + verify_signature, +) + +BODY = raw(load_fixture("post_call_transcription_otel.json")) + + +def hand_signature(secret: str, timestamp: int, body: bytes) -> str: + # Primary oracle, written from the docs: HMAC-SHA256 hex of "{timestamp}.{raw_body}". + return hmac.new(secret.encode(), ("%d." % timestamp).encode() + body, hashlib.sha256).hexdigest() + + +def test_signature_matches_hand_computed_hmac(): + ts = 1760000000 + assert compute_signature(WEBHOOK_SECRET, ts, BODY) == hand_signature(WEBHOOK_SECRET, ts, BODY) + assert sign(WEBHOOK_SECRET, BODY, ts) == "t=%d,v0=%s" % (ts, hand_signature(WEBHOOK_SECRET, ts, BODY)) + + +def test_valid_signature_returns_timestamp(): + now = time.time() + header = sign(WEBHOOK_SECRET, BODY, int(now)) + assert verify_signature(BODY, header, WEBHOOK_SECRET, now=now) == int(now) + + +@pytest.mark.parametrize( + "header, reason", + [ + (None, "missing_signature_header"), + ("", "missing_signature_header"), + ("v0=abc", "malformed_signature_header"), + ("t=1760000000", "malformed_signature_header"), + ("t=notanumber,v0=abc", "malformed_signature_header"), + ], +) +def test_missing_or_malformed_header(header, reason): + with pytest.raises(SignatureError) as info: + verify_signature(BODY, header, WEBHOOK_SECRET, now=1760000000) + assert info.value.reason == reason + + +def test_wrong_secret_and_mutated_byte_fail(): + now = 1760000000 + header = sign(WEBHOOK_SECRET, BODY, now) + with pytest.raises(SignatureError) as info: + verify_signature(BODY, header, "another-secret", now=now) + assert info.value.reason == "signature_mismatch" + mutated = bytearray(BODY) + mutated[len(mutated) // 2] ^= 0x01 + with pytest.raises(SignatureError): + verify_signature(bytes(mutated), header, WEBHOOK_SECRET, now=now) + + +def test_stale_and_future_timestamps_fail(): + now = 1760000000 + stale = sign(WEBHOOK_SECRET, BODY, now - DEFAULT_TOLERANCE_SECS - 1) + future = sign(WEBHOOK_SECRET, BODY, now + DEFAULT_TOLERANCE_SECS + 1) + edge = sign(WEBHOOK_SECRET, BODY, now - DEFAULT_TOLERANCE_SECS) + for header in (stale, future): + with pytest.raises(SignatureError) as info: + verify_signature(BODY, header, WEBHOOK_SECRET, now=now) + assert info.value.reason == "timestamp_outside_tolerance" + assert verify_signature(BODY, edge, WEBHOOK_SECRET, now=now) + # A configurable window. + with pytest.raises(SignatureError): + verify_signature(BODY, sign(WEBHOOK_SECRET, BODY, now - 120), WEBHOOK_SECRET, tolerance_secs=60, now=now) + + +def test_header_with_spaces_and_several_v0_entries(): + now = 1760000000 + good = compute_signature(WEBHOOK_SECRET, now, BODY) + header = "t=%d, v0=%s, v0=%s" % (now, "0" * 64, good) + assert verify_signature(BODY, header, WEBHOOK_SECRET, now=now) == now + + +def test_no_secret_configured_fails_closed(): + with pytest.raises(SignatureError) as info: + verify_signature(BODY, sign("x", BODY), "") + assert info.value.reason == "webhook_secret_not_configured" diff --git a/python/frameworks/elevenlabs-agents/tests/voice_tab_check.py b/python/frameworks/elevenlabs-agents/tests/voice_tab_check.py new file mode 100644 index 000000000..16458a75a --- /dev/null +++ b/python/frameworks/elevenlabs-agents/tests/voice_tab_check.py @@ -0,0 +1,73 @@ +"""Minimal Voice-tab assertion, local to this package's tests. + +TEMPORARY STAND-IN, flagged: the TH-8103 voice family architecture (D-V06) puts one +shared ``assert_voice_tab`` helper under TH-8339. On 2026-10-15 neither traceAI ``dev`` +nor the open harness PR (#203, ``python/tests/harness``: ``post_otlp``/``compare``) +has it. This file implements the documented interface so the gates run now; replace +the import with the shared helper when it lands and delete this file. + +The listing predicate it mirrors is the collector's ``resolveObservationType`` +(fi-collector ``exporter/clickhouse25exporter/converter.go``): the first non-empty of +``fi.span.kind``, ``gen_ai.span.kind``, ``llm.request.type``, +``openinference.span.kind``, lowercased, must be ``conversation`` on the parentless +root. This helper does not call ClickHouse or the network. +""" + +from typing import Any, Dict, Iterable, List, Mapping, Sequence + +from traceai_elevenlabs_agents.map import attributes_to_dict + +_KIND_KEYS = ("fi.span.kind", "gen_ai.span.kind", "llm.request.type", "openinference.span.kind") +_CREDENTIAL_TOKENS = ("sk-", "Bearer ", "api_key=", "openai-insecure-api-key.") + + +def _flat(spans: Iterable[Mapping[str, Any]]) -> List[Dict[str, Any]]: + out = [] + for span in spans: + attrs = span.get("attributes") + out.append( + { + "name": span.get("name"), + "span_id": span.get("spanId"), + "parent": span.get("parentSpanId") or "", + "attrs": attributes_to_dict(attrs) if isinstance(attrs, list) else dict(attrs or {}), + } + ) + return out + + +def _kind(attrs: Mapping[str, Any]) -> str: + for key in _KIND_KEYS: + value = attrs.get(key) + if value: + return str(value).strip().lower() + return "" + + +def _root(flat: Sequence[Dict[str, Any]]) -> Dict[str, Any]: + roots = [s for s in flat if not s["parent"]] + assert len(roots) == 1, "expected exactly one parentless root, got %d" % len(roots) + return roots[0] + + +def assert_voice_tab(spans, *, omissions: Sequence[str] = (), forbidden_substrings: Sequence[str] = ()) -> None: + flat = _flat(spans) + root = _root(flat) + attrs = root["attrs"] + # converter.go resolveObservationType -> observation_type; voice_call_list.py filters 'conversation'. + assert _kind(attrs) == "conversation", "root kind %r would not store observation_type=conversation" % _kind(attrs) + assert attrs.get("gen_ai.system"), "gen_ai.system missing on the root (the server would parse the call as Vapi)" + assert attrs.get("session.id"), "session.id missing on the root" + for key in omissions: + assert key not in attrs, "%s must be omitted (absent key), found %r" % (key, attrs.get(key)) + for span in flat: + blob = repr(span["attrs"]) + for token in _CREDENTIAL_TOKENS: + assert token not in blob, "credential-shaped token %r on span %s" % (token, span["name"]) + for needle in forbidden_substrings: + assert needle not in blob, "forbidden value on span %s" % span["name"] + + +def assert_not_voice_tab(spans) -> None: + root = _root(_flat(spans)) + assert _kind(root["attrs"]) != "conversation" diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/__init__.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/__init__.py new file mode 100644 index 000000000..4d556377b --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/__init__.py @@ -0,0 +1,41 @@ +"""Forward ElevenLabs Agents post-call OpenTelemetry traces to Future AGI. + +ElevenLabs runs the agent; this package runs in your environment. It verifies the +``post_call_transcription_otel`` webhook signature, maps the conversation onto the +Future AGI Voice-tab attributes and exports it as OTLP/HTTP JSON with your keys. + +Content is captured by default and follows the standard traceAI switch, +``fi_instrumentation.TraceConfig`` / ``FI_HIDE_*``; see :mod:`.privacy` for what is +never exported in any mode. +""" + +from .backfill import backfill, fetch_conversation +from .config import ConfigError, ForwarderConfig +from .exporter import ExportError, OTLPJsonExporter, traces_endpoint +from .forwarder import WEBHOOK_TYPE, Forwarder +from .map import MappingInputError, map_otlp_traces +from .server import make_server, serve +from .store import ForwardedStore +from .verify import SignatureError, sign, verify_signature +from .version import __version__ + +__all__ = [ + "ConfigError", + "ExportError", + "ForwardedStore", + "Forwarder", + "ForwarderConfig", + "MappingInputError", + "OTLPJsonExporter", + "SignatureError", + "WEBHOOK_TYPE", + "__version__", + "backfill", + "fetch_conversation", + "make_server", + "map_otlp_traces", + "serve", + "sign", + "traces_endpoint", + "verify_signature", +] diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/__main__.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/__main__.py new file mode 100644 index 000000000..dd8a8c90e --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/__main__.py @@ -0,0 +1,5 @@ +import sys + +from .cli import main + +sys.exit(main()) diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/backfill.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/backfill.py new file mode 100644 index 000000000..0026923b5 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/backfill.py @@ -0,0 +1,66 @@ +"""One-shot backfill: ``GET /v1/convai/conversations/{id}?format=opentelemetry``. + +Same mapper and same idempotency record as the webhook, so a conversation the +webhook already forwarded is not exported twice. ElevenLabs mints fresh span ids +on every export, so ``--force`` re-exports and duplicates the turn and tool spans +inside the existing trace; use it only for a conversation whose first export you +know did not land. + +Needs an ElevenLabs API key with ``CONVAI_READ``. This is a pull command, never a +poll loop. +""" + +from __future__ import annotations + +import json +import urllib.error +import urllib.request +from typing import Any, Dict, Tuple +from urllib.parse import quote, urlencode + +from .forwarder import Forwarder + +GET_PATH = "/v1/convai/conversations/{conversation_id}" + + +class BackfillError(Exception): + pass + + +def fetch_conversation(conversation_id: str, api_key: str, base_url: str, timeout: float = 30.0) -> Dict[str, Any]: + if not api_key: + raise BackfillError("ELEVENLABS_API_KEY is required for backfill") + url = base_url.rstrip("/") + GET_PATH.format(conversation_id=quote(conversation_id, safe="")) + "?" + urlencode( + {"format": "opentelemetry"} + ) + request = urllib.request.Request(url, headers={"xi-api-key": api_key, "Accept": "application/json"}) + try: + with urllib.request.urlopen(request, timeout=timeout) as response: + body = response.read() + except urllib.error.HTTPError as error: + raise BackfillError("ElevenLabs returned HTTP {0}".format(error.code)) from None + except (urllib.error.URLError, OSError) as error: + raise BackfillError("ElevenLabs unreachable ({0})".format(type(getattr(error, "reason", error)).__name__)) from None + try: + parsed = json.loads(body.decode("utf-8")) + except (UnicodeDecodeError, ValueError): + raise BackfillError("ElevenLabs returned a non-JSON body") from None + if not isinstance(parsed, dict): + raise BackfillError("ElevenLabs returned an unexpected body") + return parsed + + +def backfill(forwarder: Forwarder, conversation_id: str, *, force: bool = False) -> Tuple[int, Dict[str, Any]]: + config = forwarder.config + conversation = fetch_conversation(conversation_id, config.elevenlabs_api_key, config.elevenlabs_base_url) + if "otlp_traces" not in conversation: + return 400, {"error": "missing_otlp_traces", "conversation_id": conversation_id} + user_id = conversation.get("user_id") + return forwarder.forward( + conversation_id=conversation.get("conversation_id") or conversation_id, + agent_id=conversation.get("agent_id"), + otlp_traces=conversation.get("otlp_traces"), + user_id=user_id if isinstance(user_id, str) and user_id else None, + source="backfill", + force=force, + ) diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/cli.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/cli.py new file mode 100644 index 000000000..f223aed7c --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/cli.py @@ -0,0 +1,71 @@ +"""``traceai-elevenlabs-agents`` command line. + + traceai-elevenlabs-agents [serve] [--host 127.0.0.1] [--port 8787] [--path /elevenlabs/webhook] + traceai-elevenlabs-agents backfill --conversation-id conv_... [--force] +""" + +from __future__ import annotations + +import argparse +import json +import logging +import sys +from typing import List, Optional + +from .backfill import BackfillError, backfill +from .config import ConfigError, ForwarderConfig +from .forwarder import Forwarder +from .server import DEFAULT_PATH, serve + + +def _parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser( + prog="traceai-elevenlabs-agents", + description="Forward ElevenLabs Agents post-call OpenTelemetry traces to Future AGI.", + ) + sub = parser.add_subparsers(dest="command") + serve_p = sub.add_parser("serve", help="run the webhook receiver (default)") + for p, top in ((parser, True), (serve_p, False)): + # The subcommand copy only overrides what was actually passed after "serve". + p.add_argument("--host", default="127.0.0.1" if top else argparse.SUPPRESS, help="bind address (default 127.0.0.1)") + p.add_argument("--port", type=int, default=8787 if top else argparse.SUPPRESS, help="bind port (default 8787)") + p.add_argument( + "--path", default=DEFAULT_PATH if top else argparse.SUPPRESS, help="webhook path (default %s)" % DEFAULT_PATH + ) + back = sub.add_parser("backfill", help="pull one conversation with GET ?format=opentelemetry") + back.add_argument("--conversation-id", required=True) + back.add_argument( + "--force", + action="store_true", + help="export even if this conversation was already forwarded (duplicates spans in that trace)", + ) + parser.add_argument("--log-level", default="INFO") + return parser + + +def main(argv: Optional[List[str]] = None) -> int: + args = _parser().parse_args(argv) + logging.basicConfig(level=args.log_level.upper(), format="%(asctime)s %(levelname)s %(name)s %(message)s") + command = args.command or "serve" + try: + config = ForwarderConfig.from_env(require_webhook_secret=command == "serve") + except ConfigError as error: + print("traceai-elevenlabs-agents: {0}".format(error), file=sys.stderr) + return 2 + forwarder = Forwarder(config) + if command == "backfill": + try: + status, payload = backfill(forwarder, args.conversation_id, force=args.force) + except BackfillError as error: + print("traceai-elevenlabs-agents: {0}".format(error), file=sys.stderr) + return 1 + finally: + forwarder.store.close() + print(json.dumps(payload)) + return 0 if status == 200 else 1 + serve(forwarder, host=args.host, port=args.port, path=args.path) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/config.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/config.py new file mode 100644 index 000000000..d9884e8a9 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/config.py @@ -0,0 +1,117 @@ +"""Process configuration, read once at startup from the environment. + +The Future AGI project and keys are process config: a webhook payload can never +choose a different project. + +Privacy uses the standard traceAI switch, ``fi_instrumentation.TraceConfig``, and its +``FI_HIDE_*`` environment variables. There is no package-specific privacy setting. +""" + +from __future__ import annotations + +import logging +import os +from dataclasses import dataclass, field, fields +from typing import Any, Dict, Mapping, Optional + +from fi_instrumentation import TraceConfig + +from .verify import DEFAULT_TOLERANCE_SECS + +logger = logging.getLogger("traceai_elevenlabs_agents") + +DEFAULT_FI_BASE_URL = "https://api.futureagi.com" +DEFAULT_STATE_PATH = os.path.join("~", ".traceai-elevenlabs-agents", "forwarded.sqlite3") +DEFAULT_ELEVENLABS_BASE_URL = "https://api.elevenlabs.io" + +_TRUE = ("1", "true", "yes", "on") + + +def _flag(env: Mapping[str, str], name: str) -> bool: + return env.get(name, "").strip().lower() in _TRUE + + +def trace_config_from_env(env: Optional[Mapping[str, str]] = None) -> TraceConfig: + """``TraceConfig()`` for the process environment; for any other mapping, the same + ``FI_HIDE_*`` variables read the way ``TraceConfig`` reads them (``true`` / ``false``, + anything else keeps the default).""" + if env is None or env is os.environ: + return TraceConfig() + values: Dict[str, Any] = {} + for f in fields(TraceConfig): + env_var, default = f.metadata.get("env_var"), f.metadata.get("default_value") + if not env_var: + continue + raw = env.get(env_var) + value = default + if raw is not None: + if isinstance(default, bool): + lowered = raw.strip().lower() + if lowered in ("true", "false"): + value = lowered == "true" + else: + logger.warning("%s=%r is not true or false; using %s", env_var, raw, default) + else: + try: + value = type(default)(raw) + except (TypeError, ValueError): + logger.warning("%s=%r could not be parsed; using %s", env_var, raw, default) + values[f.name] = value + return TraceConfig(**values) + + +class ConfigError(ValueError): + pass + + +@dataclass(frozen=True) +class ForwarderConfig: + fi_api_key: str = field(repr=False) + fi_secret_key: str = field(repr=False) + project_name: str + fi_base_url: str = DEFAULT_FI_BASE_URL + webhook_secret: str = field(default="", repr=False) + trace_config: TraceConfig = field(default_factory=TraceConfig) + state_path: str = DEFAULT_STATE_PATH + signature_tolerance_secs: int = DEFAULT_TOLERANCE_SECS + paused: bool = False + elevenlabs_api_key: str = field(default="", repr=False) + elevenlabs_base_url: str = DEFAULT_ELEVENLABS_BASE_URL + + @classmethod + def from_env(cls, env: Optional[Mapping[str, str]] = None, *, require_webhook_secret: bool = True) -> "ForwarderConfig": + env = os.environ if env is None else env + missing = [n for n in ("FI_API_KEY", "FI_SECRET_KEY", "FI_PROJECT_NAME") if not env.get(n)] + if require_webhook_secret and not env.get("ELEVENLABS_WEBHOOK_SECRET"): + missing.append("ELEVENLABS_WEBHOOK_SECRET") + if missing: + raise ConfigError("missing environment variable(s): " + ", ".join(missing)) + tolerance_raw = env.get("FI_ELEVENLABS_SIGNATURE_TOLERANCE_SECS", "").strip() + try: + tolerance = int(tolerance_raw) if tolerance_raw else DEFAULT_TOLERANCE_SECS + except ValueError: + raise ConfigError("FI_ELEVENLABS_SIGNATURE_TOLERANCE_SECS must be an integer") from None + if tolerance <= 0: + raise ConfigError("FI_ELEVENLABS_SIGNATURE_TOLERANCE_SECS must be positive") + state_path = env.get("FI_ELEVENLABS_STATE_PATH", "").strip() or DEFAULT_STATE_PATH + if state_path != ":memory:": + state_path = os.path.expanduser(state_path) + return cls( + fi_api_key=env["FI_API_KEY"], + fi_secret_key=env["FI_SECRET_KEY"], + project_name=env["FI_PROJECT_NAME"], + fi_base_url=env.get("FI_BASE_URL", "").strip() or DEFAULT_FI_BASE_URL, + webhook_secret=env.get("ELEVENLABS_WEBHOOK_SECRET", ""), + trace_config=trace_config_from_env(env), + state_path=state_path, + signature_tolerance_secs=tolerance, + paused=_flag(env, "FI_ELEVENLABS_PAUSED"), + elevenlabs_api_key=env.get("ELEVENLABS_API_KEY", ""), + elevenlabs_base_url=env.get("FI_ELEVENLABS_API_BASE_URL", "").strip() or DEFAULT_ELEVENLABS_BASE_URL, + ) + + def secrets(self) -> "tuple[str, ...]": + """Values that must never appear in a span, a log line or a response body.""" + return tuple( + s for s in (self.fi_api_key, self.fi_secret_key, self.webhook_secret, self.elevenlabs_api_key) if s + ) diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/exporter.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/exporter.py new file mode 100644 index 000000000..d85176aea --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/exporter.py @@ -0,0 +1,73 @@ +"""Send one OTLP/HTTP JSON export request to the Future AGI collector. + +Uncompressed JSON, traces only, ``X-Api-Key`` / ``X-Secret-Key`` headers, the +same ``{FI_BASE_URL}/tracer/v1/traces`` endpoint ``fi_instrumentation`` uses. +Synchronous on purpose: the webhook is acknowledged only after the collector +accepted the batch. +""" + +from __future__ import annotations + +import json +import urllib.error +import urllib.request +from typing import Any, Dict, Mapping, Optional +from urllib.parse import urlsplit, urlunsplit + + +class ExportError(Exception): + """The collector did not accept the batch. ``detail`` never contains credentials or content.""" + + def __init__(self, detail: str, status: Optional[int] = None) -> None: + super().__init__(detail) + self.detail = detail + self.status = status + + +def traces_endpoint(base_url: str) -> str: + """``https://api.futureagi.com`` -> ``https://api.futureagi.com/tracer/v1/traces``.""" + parts = urlsplit(base_url.strip()) + if parts.scheme not in ("http", "https") or not parts.netloc: + raise ValueError("FI_BASE_URL must be an http(s) URL") + return urlunsplit((parts.scheme, parts.netloc, "/tracer/v1/traces", "", "")) + + +class OTLPJsonExporter: + def __init__(self, endpoint: str, api_key: str, secret_key: str, timeout: float = 30.0) -> None: + if not api_key or not secret_key: + raise ValueError("FI_API_KEY and FI_SECRET_KEY are required") + self.endpoint = endpoint + self._headers = { + "Content-Type": "application/json", + "X-Api-Key": api_key, + "X-Secret-Key": secret_key, + } + self.timeout = timeout + + def export(self, export_request: Mapping[str, Any]) -> Dict[str, Any]: + body = json.dumps(export_request, ensure_ascii=False, separators=(",", ":")).encode("utf-8") + request = urllib.request.Request(self.endpoint, data=body, headers=self._headers, method="POST") + try: + with urllib.request.urlopen(request, timeout=self.timeout) as response: + raw = response.read() + status = response.status + except urllib.error.HTTPError as error: + raise ExportError("collector returned HTTP {0}".format(error.code), error.code) from None + except (urllib.error.URLError, OSError) as error: + reason = getattr(error, "reason", error) + raise ExportError("collector unreachable ({0})".format(type(reason).__name__)) from None + if not 200 <= status < 300: + raise ExportError("collector returned HTTP {0}".format(status), status) + try: + parsed = json.loads(raw.decode("utf-8")) if raw else {} + except ValueError: + parsed = {} + partial = parsed.get("partialSuccess") if isinstance(parsed, dict) else None + if isinstance(partial, dict): + try: + rejected = int(partial.get("rejectedSpans") or 0) + except (TypeError, ValueError): + rejected = 0 + if rejected: + raise ExportError("collector rejected {0} span(s)".format(rejected), status) + return parsed if isinstance(parsed, dict) else {} diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/forwarder.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/forwarder.py new file mode 100644 index 000000000..b1d901bd3 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/forwarder.py @@ -0,0 +1,148 @@ +"""The webhook decision table, independent of any HTTP server. + +| Delivery | Response | Exported | +|---|---|---| +| forwarder paused (``FI_ELEVENLABS_PAUSED``) | 503 | nothing | +| signature missing, malformed, stale or wrong | 401 | nothing; the body is not parsed | +| body not JSON | 400 ``invalid_json`` | nothing | +| ``type`` other than ``post_call_transcription_otel`` | 200 ``ignored`` | nothing | +| no conversation id / no ``resourceSpans`` / malformed span ids | 400 + stable code | nothing | +| conversation already forwarded | 200 ``duplicate`` | nothing | +| same conversation being exported by another worker | 503 | nothing (ElevenLabs may retry) | +| mapper bug | 500 | nothing | +| collector refused or unreachable | 502 | nothing (ElevenLabs may retry) | +| collector accepted the batch | 200 ``forwarded`` | one trace | +""" + +from __future__ import annotations + +import json +import logging +from typing import Any, Dict, Mapping, Optional, Tuple + +from . import store as store_mod +from .config import ForwarderConfig +from .exporter import ExportError, OTLPJsonExporter, traces_endpoint +from .map import MappingInputError, map_otlp_traces +from .store import ForwardedStore +from .verify import SignatureError, verify_signature + +logger = logging.getLogger("traceai_elevenlabs_agents") + +WEBHOOK_TYPE = "post_call_transcription_otel" + +Result = Tuple[int, Dict[str, Any]] + + +class Forwarder: + def __init__( + self, + config: ForwarderConfig, + *, + exporter: Optional[Any] = None, + store: Optional[ForwardedStore] = None, + ) -> None: + self.config = config + self.exporter = exporter or OTLPJsonExporter( + traces_endpoint(config.fi_base_url), config.fi_api_key, config.fi_secret_key + ) + self.store = store or ForwardedStore(config.state_path) + + # ------------------------------------------------------------------ webhook + + def handle_webhook(self, raw_body: bytes, signature_header: Optional[str]) -> Result: + if self.config.paused: + logger.info("delivery refused: forwarder paused") + return 503, {"error": "paused"} + try: + verify_signature( + raw_body, + signature_header, + self.config.webhook_secret, + tolerance_secs=self.config.signature_tolerance_secs, + ) + except SignatureError as error: + logger.warning("delivery rejected: %s", error.reason) + return 401, {"error": "invalid_signature"} + try: + event = json.loads(raw_body.decode("utf-8")) + except (UnicodeDecodeError, ValueError): + logger.warning("delivery rejected: invalid_json") + return 400, {"error": "invalid_json"} + if not isinstance(event, Mapping): + return 400, {"error": "invalid_json"} + event_type = event.get("type") + if event_type != WEBHOOK_TYPE: + logger.info("delivery ignored: type=%s", event_type if isinstance(event_type, str) else "?") + return 200, {"status": "ignored"} + data = event.get("data") + if not isinstance(data, Mapping): + return 400, {"error": "missing_data"} + user_id = data.get("user_id") + return self.forward( + conversation_id=data.get("conversation_id"), + agent_id=data.get("agent_id"), + otlp_traces=data.get("otlp_traces"), + user_id=user_id if isinstance(user_id, str) and user_id else None, + source="post_call_webhook", + ) + + # ------------------------------------------------------------------ shared path + + def forward( + self, + *, + conversation_id: Any, + agent_id: Any, + otlp_traces: Any, + source: str, + user_id: Optional[str] = None, + force: bool = False, + ) -> Result: + conversation_id = conversation_id if isinstance(conversation_id, str) and conversation_id else None + agent_id = agent_id if isinstance(agent_id, str) and agent_id else None + try: + export_request, summary = map_otlp_traces( + otlp_traces, + conversation_id=conversation_id, + agent_id=agent_id, + user_id=user_id, + project_name=self.config.project_name, + trace_config=self.config.trace_config, + ) + except MappingInputError as error: + logger.warning("delivery rejected: conversation_id=%s error=%s", conversation_id or "?", error.code) + return 400, {"error": error.code} + except Exception: # noqa: BLE001 - a mapper bug must never half-export + logger.error("mapper failed: conversation_id=%s", conversation_id or "?") + return 500, {"error": "mapping_failed"} + + key = summary["conversation_id"] + claim = self.store.claim(key, source, force=force) + if claim == store_mod.DUPLICATE: + logger.info("delivery acknowledged: conversation_id=%s already forwarded", key) + return 200, {"status": "duplicate", "conversation_id": key} + if claim == store_mod.IN_FLIGHT: + logger.info("delivery deferred: conversation_id=%s export in flight", key) + return 503, {"error": "in_flight", "conversation_id": key} + try: + self.exporter.export(export_request) + except ExportError as error: + self.store.release(key) + logger.error("export failed: conversation_id=%s %s", key, error.detail) + return 502, {"error": "export_failed", "conversation_id": key} + except Exception: # noqa: BLE001 + self.store.release(key) + logger.error("export failed: conversation_id=%s unexpected error", key) + return 502, {"error": "export_failed", "conversation_id": key} + trace_id = summary["trace_ids"][0] if summary["trace_ids"] else None + self.store.complete(key, trace_id) + logger.info( + "forwarded: conversation_id=%s source=%s spans=%d", key, source, summary["span_count"] + ) + return 200, { + "status": "forwarded", + "conversation_id": key, + "trace_id": trace_id, + "spans": summary["span_count"], + } diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/map.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/map.py new file mode 100644 index 000000000..e6af6f4d2 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/map.py @@ -0,0 +1,573 @@ +"""Map one ElevenLabs ``otlp_traces`` object onto Future AGI's Voice-tab attribute names. + +Input is the ``otlp_traces`` object ElevenLabs puts in the +``post_call_transcription_otel`` webhook and in +``GET /v1/convai/conversations/{id}?format=opentelemetry``. Output is an OTLP/HTTP +JSON export request for the Future AGI collector. + +What is kept as ElevenLabs sent it: ``traceId``, ``spanId``, ``parentSpanId``, +span names (including names this module does not know), start and end times, +status codes, the scope. + +What is added: + +* the parentless ``elevenlabs.conversation`` root gets ``fi.span.kind=CONVERSATION`` + (the Voice-tab listing predicate), ``gen_ai.system=elevenlabs``, ``call.duration`` + and ``call.total_turns`` when they can be computed from the payload; +* every span gets ``session.id`` = the conversation id; +* tool spans get ``fi.span.kind=TOOL`` and ``tool.name``; agent turns ElevenLabs + marks with ``elevenlabs.producing_llm`` get ``fi.span.kind=LLM``, the model and the + token counts from ``elevenlabs.llm_usage.*``; other turns get ``CHAIN``; +* the conversation content: the transcript (``conversation.transcript``, + ``fi.conversation.transcript``, flattened rows), ``input.value`` / ``output.value`` on + the root, turn and tool spans, and ``user.id`` when ElevenLabs supplied one. + +Content is captured by default and follows the standard traceAI ``TraceConfig`` +switches (``FI_HIDE_INPUTS``, ``FI_HIDE_OUTPUTS``, ...); what is never exported in any +mode is listed in :mod:`traceai_elevenlabs_agents.privacy`. + +Signed media URLs are always dropped (they expire in about 15 minutes and this +forwarder stores no recordings). +""" + +from __future__ import annotations + +import ast +import copy +import json +import math +import re +from typing import Any, Dict, Iterable, List, Mapping, Optional, Tuple + +from fi_instrumentation import TraceConfig + +from . import privacy +from .privacy import INPUT, OUTPUT, Capture + +ROOT_SPAN_NAME = "elevenlabs.conversation" +USER_TURN_SPAN_NAME = "elevenlabs.recv.user_transcript" +AGENT_TURN_SPAN_NAME = "elevenlabs.recv.agent_response" +TOOL_SPAN_PREFIX = "elevenlabs.tool." + +ATTR_CONVERSATION_ID = "elevenlabs.conversation_id" +ATTR_AGENT_ID = "elevenlabs.agent_id" +ATTR_USER_TEXT = "elevenlabs.user.text" +ATTR_AGENT_TEXT = "elevenlabs.agent.text" +ATTR_TOOL_PARAMS = "elevenlabs.tool.params" +ATTR_TOOL_RESULT = "elevenlabs.tool.result" +ATTR_PRODUCING_LLM = "elevenlabs.producing_llm" +ATTR_LLM_USAGE_PREFIX = "elevenlabs.llm_usage." +ATTR_TURN_INDEX = "elevenlabs.turn.index" +ATTR_TIME_IN_CALL = "time_in_call_secs" + +# Set by this module or by the platform, never accepted from the payload. +_RESERVED_RESOURCE_KEYS = frozenset({"project_name", "project_type", "project_version_name", "project_version_id"}) +_RESERVED_RESOURCE_PREFIXES = ("fi.",) + +_HEX32 = re.compile(r"^[0-9a-fA-F]{32}$") +_HEX16 = re.compile(r"^[0-9a-fA-F]{16}$") + + +class MappingInputError(ValueError): + """The payload is not a usable trace. Maps to HTTP 400; ``code`` is stable.""" + + def __init__(self, code: str, detail: str = "") -> None: + super().__init__(detail or code) + self.code = code + + +# --------------------------------------------------------------------------- OTLP JSON helpers + + +def any_value_to_python(value: Mapping[str, Any]) -> Any: + """Decode an OTLP JSON ``AnyValue``.""" + if not isinstance(value, Mapping): + return None + if "stringValue" in value: + return value["stringValue"] + if "boolValue" in value: + return bool(value["boolValue"]) + if "intValue" in value: + try: + return int(value["intValue"]) + except (TypeError, ValueError): + return None + if "doubleValue" in value: + try: + return float(value["doubleValue"]) + except (TypeError, ValueError): + return None + if "arrayValue" in value: + return [any_value_to_python(v) for v in (value["arrayValue"] or {}).get("values", [])] + if "kvlistValue" in value: + return { + kv.get("key", ""): any_value_to_python(kv.get("value", {})) + for kv in (value["kvlistValue"] or {}).get("values", []) + } + if "bytesValue" in value: + return value["bytesValue"] + return None + + +def python_to_any_value(value: Any) -> Dict[str, Any]: + if isinstance(value, bool): + return {"boolValue": value} + if isinstance(value, int): + return {"intValue": str(value)} + if isinstance(value, float): + return {"doubleValue": value} + return {"stringValue": str(value)} + + +def attributes_to_dict(attributes: Optional[Iterable[Mapping[str, Any]]]) -> Dict[str, Any]: + out: Dict[str, Any] = {} + for attribute in attributes or []: + if isinstance(attribute, Mapping) and "key" in attribute: + out[str(attribute["key"])] = any_value_to_python(attribute.get("value", {})) + return out + + +def _set_attr(attributes: List[Dict[str, Any]], key: str, value: Any) -> None: + attributes[:] = [a for a in attributes if a.get("key") != key] + attributes.append({"key": key, "value": python_to_any_value(value)}) + + +def _set_masked(attributes: List[Dict[str, Any]], capture: Capture, key: str, value: Any) -> None: + """Set an attribute through ``TraceConfig.mask``, as ``FITracer`` does.""" + value = capture.mask(key, value) + if value is None or value == "": + return + _set_attr(attributes, key, value) + + +def _parse_llm_usage(raw: Any) -> Optional[Dict[str, float]]: + """``elevenlabs.llm_usage..`` values look like ``{'tokens': 12, 'price': 0.0001}``.""" + parsed: Any = raw + if isinstance(raw, str): + try: + parsed = json.loads(raw) + except ValueError: + try: + parsed = ast.literal_eval(raw) + except (ValueError, SyntaxError, MemoryError, RecursionError): + return None + if not isinstance(parsed, dict): + return None + out: Dict[str, float] = {} + for key, number in parsed.items(): + if isinstance(number, bool) or not isinstance(number, (int, float)): + return None + if isinstance(number, float) and not math.isfinite(number): + return None + out[str(key)] = number + return out + + +def _keep_attribute(key: str, value_in: Mapping[str, Any], capture: Capture) -> Optional[Dict[str, Any]]: + """One payload attribute after both privacy layers, or ``None`` when it is dropped.""" + value = any_value_to_python(value_in) + if privacy.contains_signed_url(value): + return None + kind = privacy.classify(key, value, parse_llm_usage=_parse_llm_usage) + if not capture.allows(kind): + return None + if kind == privacy.SAFE: + cleaned = copy.deepcopy(dict(value_in)) + if isinstance(value, str): + cleaned = {"stringValue": privacy.scrub_identity(value)} + return {"key": key, "value": cleaned} + cleaned = privacy.scrub_any_value(value_in, text=privacy.is_conversation_text(key)) + if cleaned is None: + return None + plain = any_value_to_python(cleaned) + masked = capture.mask(key, plain) + if masked is None or masked == "": + return None + if masked != plain: # REDACTED_VALUE, or FI_PII_REDACTION rewrote the text + if isinstance(masked, list): + cleaned = {"arrayValue": {"values": [python_to_any_value(v) for v in masked]}} + elif not isinstance(masked, dict): + cleaned = python_to_any_value(masked) + return {"key": key, "value": cleaned} + + +def _filter_attributes(attributes: Optional[Iterable[Mapping[str, Any]]], capture: Capture) -> List[Dict[str, Any]]: + kept: List[Dict[str, Any]] = [] + for attribute in attributes or []: + if not isinstance(attribute, Mapping) or "key" not in attribute: + continue + out = _keep_attribute(str(attribute["key"]), attribute.get("value", {}), capture) + if out is not None: + kept.append(out) + return kept + + +def _filter_resource(attributes: Optional[Iterable[Mapping[str, Any]]]) -> List[Dict[str, Any]]: + """Resource attributes: an allowlist in every mode (no host, process or OS details).""" + kept: List[Dict[str, Any]] = [] + for attribute in attributes or []: + if not isinstance(attribute, Mapping) or "key" not in attribute: + continue + key = str(attribute["key"]) + value = any_value_to_python(attribute.get("value", {})) + if key not in privacy.RESOURCE_ALLOWLIST or not isinstance(value, (str, int, float, bool)): + continue + if privacy.contains_signed_url(value): + continue + if isinstance(value, str): + kept.append({"key": key, "value": {"stringValue": privacy.scrub_identity(value)}}) + else: + kept.append({"key": key, "value": copy.deepcopy(attribute.get("value", {}))}) + return kept + + +def _nanos(span: Mapping[str, Any], key: str) -> Optional[int]: + raw = span.get(key) + if raw in (None, ""): + return None + try: + return int(raw) + except (TypeError, ValueError): + return None + + +def _parent(span: Mapping[str, Any]) -> str: + return str(span.get("parentSpanId") or "") + + +# --------------------------------------------------------------------------- mapping + + +def map_otlp_traces( + otlp_traces: Any, + *, + conversation_id: Optional[str], + project_name: str, + agent_id: Optional[str] = None, + user_id: Optional[str] = None, + trace_config: Optional[TraceConfig] = None, +) -> Tuple[Dict[str, Any], Dict[str, Any]]: + """Return ``(export_request, summary)``. + + ``trace_config`` is the standard traceAI privacy switch; ``None`` reads the + ``FI_HIDE_*`` environment variables, as ``TraceConfig()`` does everywhere. + + Raises :class:`MappingInputError` for a payload that is not a trace. + Any other exception is a bug in this module and must not be exported. + """ + capture = Capture.from_trace_config(trace_config) + if not project_name: + raise ValueError("project_name is required") + if not isinstance(otlp_traces, Mapping): + raise MappingInputError("missing_resource_spans", "otlp_traces is not an object") + resource_spans = otlp_traces.get("resourceSpans") + if not isinstance(resource_spans, list) or not resource_spans: + raise MappingInputError("missing_resource_spans", "otlp_traces.resourceSpans is missing or empty") + + # Collect every span first: the root and the turn order need the whole trace. + all_spans: List[Dict[str, Any]] = [] + resource_conversation_id = None + for resource_span in resource_spans: + if not isinstance(resource_span, Mapping): + raise MappingInputError("invalid_resource_spans", "resourceSpans entry is not an object") + resource_attrs = attributes_to_dict((resource_span.get("resource") or {}).get("attributes")) + resource_conversation_id = resource_conversation_id or resource_attrs.get(ATTR_CONVERSATION_ID) + for scope_span in resource_span.get("scopeSpans") or []: + if not isinstance(scope_span, Mapping): + raise MappingInputError("invalid_resource_spans", "scopeSpans entry is not an object") + for span in scope_span.get("spans") or []: + if not isinstance(span, Mapping): + raise MappingInputError("invalid_span", "span is not an object") + if not _HEX32.match(str(span.get("traceId") or "")): + raise MappingInputError("invalid_span", "span traceId is not 32 hex characters") + if not _HEX16.match(str(span.get("spanId") or "")): + raise MappingInputError("invalid_span", "span spanId is not 16 hex characters") + parent = _parent(span) + if parent and not _HEX16.match(parent): + raise MappingInputError("invalid_span", "span parentSpanId is not 16 hex characters") + all_spans.append(span) + if not all_spans: + raise MappingInputError("missing_resource_spans", "otlp_traces has no spans") + + root_attrs_in: Dict[str, Any] = {} + roots = [s for s in all_spans if not _parent(s)] + root = next((s for s in roots if s.get("name") == ROOT_SPAN_NAME), None) + if root is None and len(roots) == 1: + root = roots[0] + if root is not None: + root_attrs_in = attributes_to_dict(root.get("attributes")) + + session_id = root_attrs_in.get(ATTR_CONVERSATION_ID) or resource_conversation_id or conversation_id + if not session_id or not isinstance(session_id, str): + raise MappingInputError("missing_conversation_id", "no conversation id on the payload") + + # Turns in transcript order: elevenlabs.turn.index when every turn has one, + # else start time, else payload order (ElevenLabs timestamps are whole seconds). + turns: List[Tuple[int, Dict[str, Any], Dict[str, Any]]] = [] + for position, span in enumerate(all_spans): + if span.get("name") in (USER_TURN_SPAN_NAME, AGENT_TURN_SPAN_NAME): + turns.append((position, span, attributes_to_dict(span.get("attributes")))) + if turns and all(isinstance(a.get(ATTR_TURN_INDEX), int) for _, _, a in turns): + turns.sort(key=lambda t: (t[2][ATTR_TURN_INDEX], t[0])) + else: + turns.sort(key=lambda t: (_nanos(t[1], "startTimeUnixNano") or 0, t[0])) + + root_start = _nanos(root, "startTimeUnixNano") if root is not None else None + transcript: List[Dict[str, Any]] = [] + last_user_text_before: Dict[str, str] = {} + last_user_text: Optional[str] = None + for _, span, attrs in turns: + is_user = span.get("name") == USER_TURN_SPAN_NAME + text = privacy.conversation_text(attrs.get(ATTR_USER_TEXT if is_user else ATTR_AGENT_TEXT)) + if not is_user and last_user_text: + last_user_text_before[str(span.get("spanId"))] = last_user_text + if not isinstance(text, str) or not text.strip(): + continue + if is_user: + last_user_text = text + row: Dict[str, Any] = {"role": "user" if is_user else "assistant", "content": text} + start = _nanos(span, "startTimeUnixNano") + if root_start is not None and start is not None and start >= root_start: + row["time"] = str((start - root_start) // 1_000_000_000) + transcript.append(row) + + out_resource_spans: List[Dict[str, Any]] = [] + span_count = 0 + trace_ids = set() + for resource_span in resource_spans: + resource_in = resource_span.get("resource") or {} + resource_attributes = [ + a + for a in _filter_resource(resource_in.get("attributes")) + if a["key"] not in _RESERVED_RESOURCE_KEYS and not a["key"].startswith(_RESERVED_RESOURCE_PREFIXES) + ] + _set_attr(resource_attributes, "project_name", project_name) + _set_attr(resource_attributes, "project_type", "observe") + out_scopes: List[Dict[str, Any]] = [] + for scope_span in resource_span.get("scopeSpans") or []: + out_spans = [ + _map_span( + span, + is_root=span is root, + session_id=session_id, + agent_id=agent_id, + user_id=user_id, + capture=capture, + turns=turns, + transcript=transcript, + last_user_text_before=last_user_text_before, + ) + for span in scope_span.get("spans") or [] + ] + span_count += len(out_spans) + trace_ids.update(s["traceId"] for s in out_spans) + scope_out: Dict[str, Any] = {"spans": out_spans} + if isinstance(scope_span.get("scope"), Mapping): + scope = scope_span["scope"] + scope_out["scope"] = {k: scope[k] for k in ("name", "version") if k in scope} + out_scopes.append(scope_out) + out_resource_spans.append({"resource": {"attributes": resource_attributes}, "scopeSpans": out_scopes}) + + summary = { + "conversation_id": session_id, + "trace_ids": sorted(trace_ids), + "span_count": span_count, + "root_found": root is not None, + "turns": sum(1 for _ in turns), + "transcript_rows": len(transcript) if capture.everything else 0, + } + return {"resourceSpans": out_resource_spans}, summary + + +def _map_span( + span: Mapping[str, Any], + *, + is_root: bool, + session_id: str, + agent_id: Optional[str], + user_id: Optional[str], + capture: Capture, + turns: List[Tuple[int, Dict[str, Any], Dict[str, Any]]], + transcript: List[Dict[str, Any]], + last_user_text_before: Mapping[str, str], +) -> Dict[str, Any]: + name = str(span.get("name") or "") + attrs_in = attributes_to_dict(span.get("attributes")) + attributes = _filter_attributes(span.get("attributes"), capture) + + out: Dict[str, Any] = { + "traceId": str(span["traceId"]).lower(), + "spanId": str(span["spanId"]).lower(), + "name": name, + } + if _parent(span): + out["parentSpanId"] = _parent(span).lower() + for key in ("kind", "startTimeUnixNano", "endTimeUnixNano"): + if key in span: + out[key] = span[key] + + status = span.get("status") + if isinstance(status, Mapping): + status_out = {k: status[k] for k in ("code",) if k in status} + # Error text is output: one scrubbed line, never a stack trace or a path. + message = privacy.error_summary(status.get("message")) if capture.output else None + message = capture.mask("exception.message", message) if message else None + if message: + status_out["message"] = message + out["status"] = status_out + + events = [] + for event in span.get("events") or []: + if not isinstance(event, Mapping): + continue + event_out = {k: event[k] for k in ("name", "timeUnixNano") if k in event} + event_attributes = _event_attributes(event.get("attributes"), capture) + if event_attributes: + event_out["attributes"] = event_attributes + events.append(event_out) + if events: + out["events"] = events + links = [] + for link in span.get("links") or []: + if isinstance(link, Mapping) and "traceId" in link and "spanId" in link: + links.append({"traceId": link["traceId"], "spanId": link["spanId"]}) + if links: + out["links"] = links + + _set_attr(attributes, "session.id", session_id) + + def content(key: str, value: Any, side: str) -> None: + if (capture.input if side == INPUT else capture.output) and value not in (None, ""): + _set_masked(attributes, capture, key, value) + + if is_root: + _set_attr(attributes, "fi.span.kind", "CONVERSATION") + _set_attr(attributes, "gen_ai.system", "elevenlabs") + if agent_id and ATTR_AGENT_ID not in attrs_in: + _set_attr(attributes, ATTR_AGENT_ID, agent_id) + start, end = _nanos(span, "startTimeUnixNano"), _nanos(span, "endTimeUnixNano") + duration: Optional[float] = None + if start is not None and end is not None and end > start: + duration = (end - start) / 1_000_000_000 + else: + fallback = attrs_in.get(ATTR_TIME_IN_CALL) + if isinstance(fallback, (int, float)) and not isinstance(fallback, bool) and fallback > 0: + duration = float(fallback) + if duration is not None: + _set_attr(attributes, "call.duration", float(duration)) + if turns: + _set_attr(attributes, "call.total_turns", len(turns)) + # The caller's id from ElevenLabs is an input. One that carries an email address, + # a local path or a host name is never written. + # A live webhook body has no top-level ``user_id`` (2026-10-19): the id is the root + # span's ``elevenlabs.user_id`` attribute. The GET export's ``user_id`` still wins. + root_user = attrs_in.get("elevenlabs.user_id") + caller = user_id or (root_user if isinstance(root_user, str) and root_user else None) + if caller and privacy.scrub_identity(caller) == caller: + content("user.id", caller, INPUT) + if transcript and capture.everything: + rendered = json.dumps( + [{k: row[k] for k in ("role", "content", "time") if k in row} for row in transcript], + ensure_ascii=False, + ) + _set_masked(attributes, capture, "conversation.transcript", rendered) + _set_masked(attributes, capture, "fi.conversation.transcript", rendered) + for index, row in enumerate(transcript): + _set_attr(attributes, "conversation.transcript.{0}.message.role".format(index), row["role"]) + _set_masked( + attributes, capture, "conversation.transcript.{0}.message.content".format(index), row["content"] + ) + first_user = next((r["content"] for r in transcript if r["role"] == "user"), None) + last_agent = next((r["content"] for r in reversed(transcript) if r["role"] == "assistant"), None) + content("input.value", first_user, INPUT) + content("output.value", last_agent, OUTPUT) + elif name.startswith(TOOL_SPAN_PREFIX): + _set_attr(attributes, "fi.span.kind", "TOOL") + tool_name = name[len(TOOL_SPAN_PREFIX):] + if tool_name: + _set_attr(attributes, "tool.name", tool_name) + params, result = attrs_in.get(ATTR_TOOL_PARAMS), attrs_in.get(ATTR_TOOL_RESULT) + if params not in (None, ""): + content("input.value", privacy.conversation_text(_as_text(params)), INPUT) + if result not in (None, ""): + content("output.value", privacy.conversation_text(_as_text(result)), OUTPUT) + elif name == AGENT_TURN_SPAN_NAME: + model = attrs_in.get(ATTR_PRODUCING_LLM) + if isinstance(model, str) and model: + _set_attr(attributes, "fi.span.kind", "LLM") + _set_attr(attributes, "gen_ai.request.model", model) + input_tokens, output_tokens = _token_totals(attrs_in) + if input_tokens is not None: + _set_attr(attributes, "gen_ai.usage.input_tokens", input_tokens) + if output_tokens is not None: + _set_attr(attributes, "gen_ai.usage.output_tokens", output_tokens) + content("input.value", last_user_text_before.get(str(span.get("spanId"))), INPUT) + else: + _set_attr(attributes, "fi.span.kind", "CHAIN") + text = attrs_in.get(ATTR_AGENT_TEXT) + if isinstance(text, str): + content("output.value", privacy.conversation_text(text), OUTPUT) + elif name == USER_TURN_SPAN_NAME: + _set_attr(attributes, "fi.span.kind", "CHAIN") + text = attrs_in.get(ATTR_USER_TEXT) + if isinstance(text, str): + content("input.value", privacy.conversation_text(text), INPUT) + # Any other span name passes through with its (filtered) attributes and no kind. + + out["attributes"] = attributes + return out + + +def _as_text(value: Any) -> str: + return value if isinstance(value, str) else json.dumps(value) + + +def _event_attributes(attributes: Optional[Iterable[Mapping[str, Any]]], capture: Capture) -> List[Dict[str, Any]]: + """Span event attributes. The exception type always; its message (one scrubbed line) + only with output capture on; a stack trace never; anything else like a span attribute.""" + kept: List[Dict[str, Any]] = [] + for attribute in attributes or []: + if not isinstance(attribute, Mapping) or "key" not in attribute: + continue + key = str(attribute["key"]) + value = any_value_to_python(attribute.get("value", {})) + if key == "exception.type" and isinstance(value, str): + kept.append({"key": key, "value": {"stringValue": privacy.scrub_identity(value)}}) + elif key == "exception.message": + message = privacy.error_summary(value) if capture.output else None + message = capture.mask(key, message) if message else None + if message: + kept.append({"key": key, "value": {"stringValue": message}}) + elif key == "exception.escaped" and isinstance(value, bool): + kept.append({"key": key, "value": {"boolValue": value}}) + else: + out = _keep_attribute(key, attribute.get("value", {}), capture) + if out is not None: + kept.append(out) + return kept + + +def _token_totals(attrs: Mapping[str, Any]) -> Tuple[Optional[int], Optional[int]]: + input_tokens = output_tokens = None + for key, raw in attrs.items(): + if not key.startswith(ATTR_LLM_USAGE_PREFIX): + continue + usage = _parse_llm_usage(raw) + if not usage or "tokens" not in usage: + continue + kind = key.rsplit(".", 1)[-1] + tokens = int(usage["tokens"]) + if kind == "input": + input_tokens = (input_tokens or 0) + tokens + elif kind in ("output_total", "output"): + output_tokens = (output_tokens or 0) + tokens + return input_tokens, output_tokens + + +def iter_spans(export_request: Mapping[str, Any]) -> Iterable[Tuple[Dict[str, Any], Dict[str, Any]]]: + """Yield ``(resource_attributes, span)`` pairs of an export request (tests, checks).""" + for resource_span in export_request.get("resourceSpans") or []: + resource = attributes_to_dict((resource_span.get("resource") or {}).get("attributes")) + for scope_span in resource_span.get("scopeSpans") or []: + for span in scope_span.get("spans") or []: + yield resource, span diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/privacy.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/privacy.py new file mode 100644 index 000000000..d0318cf22 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/privacy.py @@ -0,0 +1,315 @@ +"""What may leave the forwarder. + +Two layers, in this order: + +1. **Never exported, in any mode.** Things that describe the machine or the person + behind it rather than the conversation: resource attributes outside a short + allowlist (no ``host.*``, ``process.*``, ``os.*`` ...), span attributes under + environment or identity prefixes (``host.``, ``process.``, ``user.``, ``enduser.``, + ``code.``, ``*.stacktrace``, credential-named keys), signed media URLs, and raw stack + traces. Free-form metadata (dynamic variables, analysis and data-collection results, + unknown attributes, status and exception messages) is kept only after email + addresses, local file paths and private host names are replaced with + ````, ```` and ````. Error text is cut to one + line. A ``user.id`` that is an email address is not written. + +2. **Conversation content: the standard traceAI switch.** Exactly what every traceAI + instrumentor uses, ``fi_instrumentation.TraceConfig``, read from the standard + ``FI_HIDE_*`` environment variables unless you pass one. Content is captured by + default. In an ElevenLabs conversation the turns are the messages, so: + + * ``hide_inputs`` / ``hide_input_messages`` / ``hide_input_text`` + (``FI_HIDE_INPUTS``, ``FI_HIDE_INPUT_MESSAGES``, ``FI_HIDE_INPUT_TEXT``) drop what + goes in: user turn text, tool arguments, RAG queries, dynamic variables, ``user.id`` + and every ``input.value``; + * ``hide_outputs`` / ``hide_output_messages`` / ``hide_output_text`` + (``FI_HIDE_OUTPUTS`` ...) drop what comes out: agent turn text, tool results, + reasoning, analysis and data-collection results, status and exception messages + and every ``output.value``; + * either side drops the combined transcript and every attribute this module cannot + place on one side. + + ``FI_PII_REDACTION`` (``TraceConfig(pii_redaction=True)``) also works as everywhere + else in traceAI: emails, phone numbers, card numbers ... inside the content are + replaced before export. + +Identifiers, timings, counts, status codes, model names and token numbers are kept +in every mode. +""" + +from __future__ import annotations + +import copy +import re +from dataclasses import dataclass +from typing import Any, Dict, Mapping, Optional + +from fi_instrumentation import TraceConfig + +INPUT_FLAGS = ("hide_inputs", "hide_input_messages", "hide_input_text") +OUTPUT_FLAGS = ("hide_outputs", "hide_output_messages", "hide_output_text") + +# Attribute classes. +SAFE = "safe" # identifiers and numbers: always kept +INPUT = "input" # kept unless an input-side hide flag is on +OUTPUT = "output" # kept unless an output-side hide flag is on +CONTENT = "content" # cannot be placed on one side: kept only when nothing is hidden +NEVER = "never" # never exported + +#: Resource attributes that may be exported. Everything else on the payload's resource +#: (``host.name``, ``process.executable.path``, ``os.*`` ...) is dropped in every mode. +RESOURCE_ALLOWLIST = frozenset( + { + "service.name", + "service.version", + "service.namespace", + "deployment.environment", + "deployment.environment.name", + "telemetry.sdk.name", + "telemetry.sdk.language", + "telemetry.sdk.version", + "elevenlabs.conversation_id", + "elevenlabs.agent_id", + "elevenlabs.environment", + "elevenlabs.source", + } +) + +_NEVER_PREFIXES = ( + "host.", + "process.", + "os.", + "device.", + "container.", + "k8s.", + "cloud.", + "enduser.", + "user.", + "code.", + "net.host.", + "client.", + "source.address", + "exception.stacktrace", +) +_NEVER_KEY = re.compile( + r"(stack_?trace|secret|passw(or)?d|api[_\-]?key|authorization|cookie|access[_\-]?token|auth[_\-]?token|bearer)", + re.IGNORECASE, +) + +# Conversation text: kept as said, governed only by the hide flags (and FI_PII_REDACTION). +_INPUT_TEXT = ("elevenlabs.user.text", "elevenlabs.tool.params", "elevenlabs.rag.retrieval_query") +_OUTPUT_TEXT = ("elevenlabs.agent.text", "elevenlabs.tool.result", "elevenlabs.reasoning") +# Free-form metadata on one side: scrubbed of identity, then governed by the hide flags. +_INPUT_META = ("elevenlabs.dynamic_variable", "elevenlabs.user") +_OUTPUT_META = ("elevenlabs.analysis", "elevenlabs.data_collection") +# Numbers under these prefixes can still be content (a collected age, an account +# number), so they follow their side instead of being treated as plain metadata. +_CONTENT_PREFIXES = _INPUT_TEXT + _OUTPUT_TEXT + _INPUT_META + _OUTPUT_META + ("elevenlabs.event.data",) + +ATTR_LLM_USAGE_PREFIX = "elevenlabs.llm_usage." +ATTR_TIME_IN_CALL = "time_in_call_secs" +_SAFE_STRING_KEYS = frozenset( + { + "service.name", + "elevenlabs.conversation_id", + "elevenlabs.agent_id", + "elevenlabs.source", + "elevenlabs.environment", + "elevenlabs.cost_fiat", + "elevenlabs.producing_llm", + "elevenlabs.rag.embedding_model", + } +) +#: Never passed through the TraceConfig mask: ids and kinds the Voice tab groups on. +STRUCTURAL_KEYS = frozenset( + { + "session.id", + "fi.span.kind", + "gen_ai.system", + "gen_ai.request.model", + "tool.name", + "elevenlabs.conversation_id", + "elevenlabs.agent_id", + } +) + +_EMAIL = re.compile(r"[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}") +_WINDOWS_PATH = re.compile(r"\b[A-Za-z]:\\(?:[^\\\s\"'<>|]+\\)*[^\\\s\"'<>|]*") +_HOME_PATH = re.compile(r"(?|]*") +_FILE_URL = re.compile(r"\bfile://[^\s\"'<>|]+", re.IGNORECASE) +# An absolute POSIX path with at least two segments, not part of a URL or a word. +_POSIX_PATH = re.compile(r"(?]+\([^)]*:\d+\))") +_SIGNED_URL = re.compile(r"^https?://\S+\?\S*$", re.IGNORECASE) +MAX_ERROR_TEXT = 512 + + +@dataclass(frozen=True) +class Capture: + """The two content sides, resolved once from a ``TraceConfig``.""" + + input: bool + output: bool + config: TraceConfig + + @classmethod + def from_trace_config(cls, config: Optional[TraceConfig] = None) -> "Capture": + config = TraceConfig() if config is None else config + if not isinstance(config, TraceConfig): + raise TypeError("trace_config must be a fi_instrumentation.TraceConfig") + return cls( + input=not any(bool(getattr(config, flag, False)) for flag in INPUT_FLAGS), + output=not any(bool(getattr(config, flag, False)) for flag in OUTPUT_FLAGS), + config=config, + ) + + @property + def everything(self) -> bool: + return self.input and self.output + + def allows(self, cls_: str) -> bool: + if cls_ == SAFE: + return True + if cls_ == INPUT: + return self.input + if cls_ == OUTPUT: + return self.output + if cls_ == CONTENT: + return self.everything + return False + + def mask(self, key: str, value: Any) -> Any: + """``TraceConfig.mask``, as ``FITracer`` applies it to every attribute it sets.""" + if key in STRUCTURAL_KEYS or isinstance(value, (bool, int, float)): + return value + return self.config.mask(key, value) + + +# --------------------------------------------------------------------------- scrubbing + + +def looks_like_stack_trace(text: str) -> bool: + """A Python traceback header, or a multi-line text with a ``File "...", line N`` / + ``at pkg.Class(File.java:N)`` frame in it.""" + if _PY_TRACEBACK.search(text): + return True + return "\n" in text and bool(_FRAME.search(text)) + + +def scrub_identity(text: str) -> str: + """Replace email addresses, local file paths and private host names.""" + if not text: + return text + text = _EMAIL.sub("", text) + text = _FILE_URL.sub("", text) + text = _WINDOWS_PATH.sub("", text) + text = _HOME_PATH.sub("", text) + text = _POSIX_PATH.sub("", text) + text = _PRIVATE_HOST.sub("", text) + return text + + +def error_summary(message: Any) -> Optional[str]: + """One line of error text: the exception line of a traceback, else the first line. + Never the frames, never a path, a host name or an email address.""" + if not isinstance(message, str): + return None + lines = [line.strip() for line in message.strip().splitlines() if line.strip()] + if not lines: + return None + line = lines[-1] if _PY_TRACEBACK.search(lines[0]) else lines[0] + line = scrub_identity(line) + if len(line) > MAX_ERROR_TEXT: + line = line[: MAX_ERROR_TEXT - 1] + "…" + return line or None + + +def conversation_text(text: Any) -> Any: + """Conversation content is exported as said, except a raw stack trace inside it.""" + if isinstance(text, str) and looks_like_stack_trace(text): + return error_summary(text) + return text + + +def contains_signed_url(value: Any) -> bool: + if isinstance(value, str): + return bool(_SIGNED_URL.match(value.strip())) + if isinstance(value, list): + return any(contains_signed_url(v) for v in value) + if isinstance(value, dict): + return any(contains_signed_url(v) for v in value.values()) + return False + + +# --------------------------------------------------------------------------- classification + + +def is_never(key: str) -> bool: + return key.startswith(_NEVER_PREFIXES) or bool(_NEVER_KEY.search(key)) + + +def is_conversation_text(key: str) -> bool: + return key.startswith(_INPUT_TEXT + _OUTPUT_TEXT) + + +def classify(key: str, value: Any, *, parse_llm_usage: Any) -> str: + """Return the class of one payload span attribute (see the module docstring).""" + if is_never(key): + return NEVER + if key in _SAFE_STRING_KEYS: + return SAFE if isinstance(value, (str, int, float, bool)) else CONTENT + if key.startswith(ATTR_LLM_USAGE_PREFIX): + return SAFE if parse_llm_usage(value) is not None else CONTENT + if key == ATTR_TIME_IN_CALL: + return SAFE if isinstance(value, (int, float)) and not isinstance(value, bool) else CONTENT + if key.startswith(_INPUT_TEXT + _INPUT_META): + return INPUT + if key.startswith(_OUTPUT_TEXT + _OUTPUT_META): + return OUTPUT + if ( + key.startswith("elevenlabs.") + and not key.startswith(_CONTENT_PREFIXES) + and isinstance(value, (int, float, bool)) + ): + return SAFE + return CONTENT + + +def scrub_any_value(value: Mapping[str, Any], *, text: bool) -> Optional[Dict[str, Any]]: + """Copy an OTLP ``AnyValue``, cleaning every string leaf. + + ``text=True``: conversation content, only stack traces are cut. ``text=False``: + free-form metadata, identity is scrubbed too. Returns ``None`` for an empty result. + """ + if not isinstance(value, Mapping): + return None + out = copy.deepcopy(dict(value)) + if "stringValue" in out: + s = out["stringValue"] + if isinstance(s, str): + cleaned = conversation_text(s) if text else scrub_identity(s) + if looks_like_stack_trace(cleaned or ""): + cleaned = error_summary(cleaned) + out["stringValue"] = cleaned if cleaned is not None else "" + return out + if "arrayValue" in out: + values = [scrub_any_value(v, text=text) for v in (out["arrayValue"] or {}).get("values", [])] + out["arrayValue"] = {"values": [v for v in values if v is not None]} + return out + if "kvlistValue" in out: + kept = [] + for kv in (out["kvlistValue"] or {}).get("values", []): + if not isinstance(kv, Mapping) or is_never(str(kv.get("key", ""))): + continue + inner = scrub_any_value(kv.get("value", {}), text=text) + if inner is not None: + kept.append({"key": kv.get("key", ""), "value": inner}) + out["kvlistValue"] = {"values": kept} + return out + return out diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/py.typed b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/server.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/server.py new file mode 100644 index 000000000..0a8601902 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/server.py @@ -0,0 +1,129 @@ +"""Standard-library HTTP server for the ElevenLabs post-call webhook. + +``POST {path}`` (default ``/elevenlabs/webhook``) handles one delivery. +``GET /healthz`` answers 200. Anything else is 404/405. + +Put TLS in front of it (a reverse proxy or your platform's HTTPS ingress): +ElevenLabs delivers to an HTTPS URL. Request logs carry the method, path and +status only; the forwarder's own log lines carry the conversation id and the +outcome only. + +A body is read into memory (at most ``max_body_bytes``; a larger declared length is +refused with 413 unread) before its signature can be checked, because the HMAC +covers the raw bytes. A delivery whose signature fails is never parsed. Rate- and +size-limit unauthenticated traffic at your ingress. +""" + +from __future__ import annotations + +import json +import logging +import signal +import threading +from http import HTTPStatus +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from typing import Any, Optional, Tuple +from urllib.parse import urlsplit + +from .forwarder import Forwarder +from .verify import SIGNATURE_HEADER + +logger = logging.getLogger("traceai_elevenlabs_agents") + +DEFAULT_PATH = "/elevenlabs/webhook" +#: ElevenLabs truncates tool attributes at 4 KB each; a whole conversation is far below this. +DEFAULT_MAX_BODY_BYTES = 20 * 1024 * 1024 + + +def make_server( + forwarder: Forwarder, + host: str = "127.0.0.1", + port: int = 8787, + path: str = DEFAULT_PATH, + max_body_bytes: int = DEFAULT_MAX_BODY_BYTES, +) -> ThreadingHTTPServer: + class Handler(BaseHTTPRequestHandler): + server_version = "traceai-elevenlabs-agents" + sys_version = "" + + def _reply(self, status: int, payload: Any) -> None: + body = json.dumps(payload).encode("utf-8") + self.send_response(status) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def do_GET(self) -> None: # noqa: N802 + if urlsplit(self.path).path == "/healthz": + self._reply(200, {"status": "ok"}) + else: + self._reply(404, {"error": "not_found"}) + + def do_POST(self) -> None: # noqa: N802 + if urlsplit(self.path).path != path: + self._reply(404, {"error": "not_found"}) + return + if "chunked" in self.headers.get("Transfer-Encoding", "").lower(): + self._reply(411, {"error": "length_required"}) + return + try: + length = int(self.headers.get("Content-Length", "")) + except ValueError: + self._reply(411, {"error": "length_required"}) + return + if length < 0 or length > max_body_bytes: + self._reply(413, {"error": "payload_too_large"}) + return + raw_body = self.rfile.read(length) + try: + status, payload = forwarder.handle_webhook(raw_body, self.headers.get(SIGNATURE_HEADER)) + except Exception: # noqa: BLE001 - never leak a traceback to the caller + logger.error("unexpected error while handling a delivery") + status, payload = 500, {"error": "internal_error"} + self._reply(status, payload) + + def do_PUT(self) -> None: # noqa: N802 + self._reply(HTTPStatus.METHOD_NOT_ALLOWED, {"error": "method_not_allowed"}) + + do_DELETE = do_PATCH = do_PUT + + def log_message(self, format: str, *args: Any) -> None: # noqa: A002 + # Default logging prints the request line with the full query string. + # Keep method, bare path and status only. + return + + def log_request(self, code: Any = "-", size: Any = "-") -> None: + logger.info("%s %s -> %s", self.command, urlsplit(self.path).path, code) + + return ThreadingHTTPServer((host, port), Handler) + + +def serve( + forwarder: Forwarder, + host: str = "127.0.0.1", + port: int = 8787, + path: str = DEFAULT_PATH, + ready: Optional[threading.Event] = None, +) -> None: + """Run until SIGTERM/SIGINT. In-flight requests finish before the process exits.""" + httpd = make_server(forwarder, host, port, path) + bound: Tuple[str, int] = httpd.server_address[:2] # type: ignore[assignment] + logger.info("listening on http://%s:%d%s project=%s", bound[0], bound[1], path, forwarder.config.project_name) + + def _stop(signum: int, _frame: Any) -> None: + logger.info("signal %d: shutting down", signum) + threading.Thread(target=httpd.shutdown, daemon=True).start() + + if threading.current_thread() is threading.main_thread(): + signal.signal(signal.SIGTERM, _stop) + signal.signal(signal.SIGINT, _stop) + httpd.daemon_threads = False + httpd.block_on_close = True + if ready is not None: + ready.set() + try: + httpd.serve_forever() + finally: + httpd.server_close() + forwarder.store.close() diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/store.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/store.py new file mode 100644 index 000000000..090aa8a84 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/store.py @@ -0,0 +1,100 @@ +"""Per-conversation idempotency record, kept in the customer's process (SQLite file). + +ElevenLabs keeps the trace id stable per conversation but mints fresh span ids on +every export, so forwarding the same conversation twice (a webhook retry after a +lost 2xx, or a GET backfill after the webhook) would duplicate every turn and tool +span inside one trace. The forwarder therefore records each conversation it +forwarded and acknowledges a repeat without exporting again. + +A row is ``pending`` while one worker exports it and ``done`` after the collector +accepted the batch. A failed export deletes the row so the next delivery retries. +A ``pending`` row older than ``stale_after_secs`` is taken over (the worker that +claimed it died before finishing). +""" + +from __future__ import annotations + +import os +import sqlite3 +import threading +import time +from typing import Optional + +CLAIMED = "claimed" +DUPLICATE = "duplicate" +IN_FLIGHT = "in_flight" + + +class ForwardedStore: + def __init__(self, path: str, stale_after_secs: int = 300) -> None: + self.path = path + self.stale_after_secs = stale_after_secs + self._lock = threading.Lock() + if path != ":memory:": + directory = os.path.dirname(os.path.abspath(path)) + os.makedirs(directory, exist_ok=True) + # One connection per store; the lock serialises threads of this process, + # SQLite's own locking serialises processes sharing the file. + self._conn = sqlite3.connect(path, timeout=30, isolation_level=None, check_same_thread=False) + self._conn.execute( + "CREATE TABLE IF NOT EXISTS forwarded (" + " conversation_id TEXT PRIMARY KEY," + " state TEXT NOT NULL," + " source TEXT NOT NULL," + " trace_id TEXT," + " updated_at REAL NOT NULL)" + ) + + def claim(self, conversation_id: str, source: str, *, force: bool = False) -> str: + """Return CLAIMED (caller must export, then ``complete`` or ``release``), DUPLICATE or IN_FLIGHT.""" + now = time.time() + with self._lock: + self._conn.execute("BEGIN IMMEDIATE") + try: + row = self._conn.execute( + "SELECT state, updated_at FROM forwarded WHERE conversation_id = ?", (conversation_id,) + ).fetchone() + if row is not None: + state, updated_at = row + if state == "done" and not force: + self._conn.execute("COMMIT") + return DUPLICATE + if state == "pending" and now - updated_at < self.stale_after_secs: + self._conn.execute("COMMIT") + return IN_FLIGHT + self._conn.execute( + "INSERT INTO forwarded (conversation_id, state, source, trace_id, updated_at)" + " VALUES (?, 'pending', ?, NULL, ?)" + " ON CONFLICT(conversation_id) DO UPDATE SET state='pending', source=excluded.source," + " updated_at=excluded.updated_at", + (conversation_id, source, now), + ) + self._conn.execute("COMMIT") + return CLAIMED + except BaseException: + self._conn.execute("ROLLBACK") + raise + + def complete(self, conversation_id: str, trace_id: Optional[str]) -> None: + with self._lock: + self._conn.execute( + "UPDATE forwarded SET state='done', trace_id=?, updated_at=? WHERE conversation_id=?", + (trace_id, time.time(), conversation_id), + ) + + def release(self, conversation_id: str) -> None: + with self._lock: + self._conn.execute( + "DELETE FROM forwarded WHERE conversation_id=? AND state='pending'", (conversation_id,) + ) + + def state(self, conversation_id: str) -> Optional[str]: + with self._lock: + row = self._conn.execute( + "SELECT state FROM forwarded WHERE conversation_id=?", (conversation_id,) + ).fetchone() + return row[0] if row else None + + def close(self) -> None: + with self._lock: + self._conn.close() diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/verify.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/verify.py new file mode 100644 index 000000000..c46135228 --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/verify.py @@ -0,0 +1,99 @@ +"""Verify the ``ElevenLabs-Signature`` header with the standard library only. + +ElevenLabs signs every workspace webhook delivery with +``ElevenLabs-Signature: t={unix},v0={hmac}``, where ``hmac`` is the hex +HMAC-SHA256 of ``{timestamp}.{raw_body}`` keyed with the webhook secret. + +Sources (re-read 2026-10-15): + +* https://elevenlabs.io/docs/eleven-agents/customization/opentelemetry-traces + (Delivery table: header format and signed string) +* https://elevenlabs.io/docs/eleven-agents/workflows/post-call-webhooks + (verify with the SDK ``construct_event``) +* ``elevenlabs`` Python SDK ``webhooks_custom.WebhooksClient.construct_event`` + (2.70.0 and 2.73.0 are byte-identical): HMAC-SHA256, ``v0=`` prefix, + deliveries older than 30 minutes are rejected. + +The SDK is not a runtime dependency. Tests use it as a second oracle. +""" + +from __future__ import annotations + +import hashlib +import hmac +import time +from typing import Optional, Union + +#: Default replay window, the one ``construct_event`` enforces (30 minutes). +DEFAULT_TOLERANCE_SECS = 30 * 60 + +SIGNATURE_HEADER = "ElevenLabs-Signature" + + +class SignatureError(Exception): + """The delivery is not authentic. The ``reason`` is safe to log.""" + + def __init__(self, reason: str) -> None: + super().__init__(reason) + self.reason = reason + + +def _parse_header(header: str) -> "tuple[str, list[str]]": + timestamp = "" + signatures = [] + for part in header.split(","): + part = part.strip() + if part.startswith("t="): + timestamp = part[2:].strip() + elif part.startswith("v0="): + signatures.append(part[3:].strip()) + return timestamp, signatures + + +def compute_signature(secret: str, timestamp: Union[int, str], raw_body: Union[bytes, str]) -> str: + """Return the ``v0`` hex digest ElevenLabs would send for this body.""" + if isinstance(raw_body, str): + raw_body = raw_body.encode("utf-8") + message = str(timestamp).encode("utf-8") + b"." + raw_body + return hmac.new(secret.encode("utf-8"), message, hashlib.sha256).hexdigest() + + +def sign(secret: str, raw_body: Union[bytes, str], timestamp: Optional[int] = None) -> str: + """Build an ``ElevenLabs-Signature`` header value. Used by tests and the local stand-in sender.""" + ts = int(time.time()) if timestamp is None else int(timestamp) + return "t={0},v0={1}".format(ts, compute_signature(secret, ts, raw_body)) + + +def verify_signature( + raw_body: bytes, + header: Optional[str], + secret: str, + *, + tolerance_secs: int = DEFAULT_TOLERANCE_SECS, + now: Optional[float] = None, +) -> int: + """Check one delivery. Returns the signed timestamp, raises :class:`SignatureError`. + + The body is only hashed here, never parsed: a forged delivery is never decoded. + A timestamp older than ``tolerance_secs`` fails, as in the SDK. A timestamp + more than ``tolerance_secs`` in the future also fails (the SDK does not check + that side; a real delivery is never that far ahead). + """ + if not secret: + raise SignatureError("webhook_secret_not_configured") + if not header: + raise SignatureError("missing_signature_header") + timestamp, signatures = _parse_header(header) + if not timestamp or not signatures: + raise SignatureError("malformed_signature_header") + try: + ts = int(timestamp) + except ValueError: + raise SignatureError("malformed_signature_header") from None + current = time.time() if now is None else now + if ts < current - tolerance_secs or ts > current + tolerance_secs: + raise SignatureError("timestamp_outside_tolerance") + expected = compute_signature(secret, timestamp, raw_body) + if not any(hmac.compare_digest(expected, candidate) for candidate in signatures): + raise SignatureError("signature_mismatch") + return ts diff --git a/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/version.py b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/version.py new file mode 100644 index 000000000..3dc1f76bc --- /dev/null +++ b/python/frameworks/elevenlabs-agents/traceai_elevenlabs_agents/version.py @@ -0,0 +1 @@ +__version__ = "0.1.0"