Send the API key header, fix the ElevenLabs monitor command, add end and watch, release 0.0.2 - #1
Merged
Merged
Conversation
buildbyjithu
force-pushed
the
jithu/sdk-0-0-2-hosted-path
branch
from
September 10, 2026 04:52
27d0a84 to
a2af224
Compare
buildbyjithu
marked this pull request as ready for review
September 10, 2026 04:52
There was a problem hiding this comment.
🔍 Devin Review: 1 bug
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
sahajgandhi-deeptrust
approved these changes
Sep 10, 2026
buildbyjithu
force-pushed
the
jithu/sdk-0-0-2-hosted-path
branch
from
September 10, 2026 15:39
a2af224 to
9dbc48a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aligns the client with the agent endpoints that land in deeptrust-ai/deeptrust #3658 and adds the two calls the hosted "Connect ElevenLabs" path needs. Bumps to 0.0.2.
What changed
X-DeepTrust-Api-Key, which is the headerrequire_agent_api_keyreads. The bearer form is still sent for one release and goes away in 0.1.https://app.deeptrust.ai/api/v1. ADEEPTRUST_BASE_URLfrom 0.0.1 ending in/apineeds/v1appended.detail, socode,neededandscopesare now read from either the top level ordetail.EntitlementErrorandScopeErrorfire on the real 403 shapes.command_type+parameters.contextual_update). 0.0.1 sent the main-socket{"type": ...}shape, which the monitor socket ignores, so nudges never arrived.Session.end()posts to/agents/sessions/{id}/endso post-call processing starts now rather than after the inactivity timeout.DeepTrust.watch(conversation_id, platform="elevenlabs")posts to/agents/conversations/{id}/watch, handing a live conversation to the hosted monitor for an org that connected its workspace in the dashboard.handoffcommand. README presents Connect as the no-code option andMonitoras the self-hosted one.Tests
just checkis clean: ruff, mypy strict, 28 tests. New tests pin the header, the base URL, both nested error shapes,endidempotence,watchresults, and a fake monitor socket asserting the command envelope is sent once per nudge.Merge order
After deeptrust-ai/deeptrust #3658 (the analyze, end and watch routes) is on dev. Until then the default base URL points at routes that do not exist yet.
🤖 Generated with Claude Code
Rebased onto main (2026-09-10)
Main landed
0aef103, which already made two of the changes this PR opened with: the/api/v1base URL and sending the key asX-DeepTrust-Api-Key. Both conflicts resolved in favour of main, so this PR no longer touches either.One deliberate change of mind: this branch originally kept
Authorization: Beareralongside the new header for one release. Main removed it, with the reasoning that the API tells a key-authenticated request from a session-authenticated one by which header carried the credential, and sending both makes a key look like a user's token at the edge. That is the better call and the backend reads the dedicated header first anyway, so the bearer form is gone andtest_key_travels_in_the_api_key_headernow assertsauthorizationis absent.What remains in this PR and is not on main: nested
detailparsing in_read_error, thecommand_typeenvelope for the ElevenLabs monitor socket,Session.end(),DeepTrust.watch(), the dev server endpoints behind them, thehandoffexample command, the README, and the 0.0.2 bump.Local:
ruff check,ruff format --check,mypyand 28 tests all pass onsrcandtests, matching CI.