Repository navigation
feat(platform): managed-user update, caller ID config and identity catalog - #7
Merged
Charlie-Qilin merged 5 commits intoOct 21, 2026
Merged
Conversation
…y catalog
- platform.managed_users.update() (PATCH): only the given members are sent,
phone="" removes the phone. create() and update() take assistant as a dict
with identity_id and/or name; ManagedUser.assistant defaults to None, so
responses without the field still parse.
- sessions.get_config() / update_config(caller_id="user" | "platform") on
GET/PUT /v2/sessions/{id}/config; other values fail before any request.
- app_settings.assistant_identities() reads the identity catalog
(/v2/app/settings/assistance_identities?identities=catalog); a key-only
client reads it anonymously.
- client_now_date: Socket.IO chat() and send_message() take it, and every
path requires an RFC 3339 time with a UTC offset. The Socket.IO default
of a naive local time is removed: the server could not parse it, so the
agent always used UTC.
Docs, CHANGELOG and version 0.5.0rc3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the lines on when the first call uses the setting and on removing it. "user" and no value behave the same; the assistant number applies only when the user has one; "platform" shows a pool number without "always". The STIR/SHAKEN caution now says the rating depends on whether the carrier that places the call owns the number, so any caller ID can get B or C. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
send_message() on REST and chat()/send_message() on Socket.IO take timezone (an IANA name or a tzinfo). The SDK sends the current local time in it as client_now_date, so callers cannot send a malformed value. An unknown time zone raises ValueError before any request. tzdata is a dependency on Windows, which has no system time zone database. Docs: the caller ID section is shorter and drops the STIR/SHAKEN caution; it can be set or changed at any time. README links point to the docs on main, so they stay the same across releases and open on PyPI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
client.app_settings is now client.settings (SettingsAPI, SyncSettingsAPI); the request path is unchanged. Docs: on update(), an identity without name also replaces a custom name; a call already placed, including its retries, keeps its caller ID, and a change while the session is paused applies when it resumes; the session config is open to managed users and test accounts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Charlie-Qilin
marked this pull request as ready for review
October 21, 2026 12:46
Collaborator
Author
|
@codex review |
Charlie-Qilin
force-pushed
the
feat/platform-session-config-and-profile-update
branch
from
October 21, 2026 14:24
246c742 to
289fbcd
Compare
Go back to one client_now_date parameter on REST send_message() and on Socket.IO chat()/send_message(): it keeps 0.5.0rc2 code working and matches the HTTP field. A value without a UTC offset still raises ValueError, and validate_client_now_date() is exported again. The tzdata dependency is removed. Docs: managed users have Pine's default assistant until you choose one; the CHANGELOG entry is shorter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Charlie-Qilin
force-pushed
the
feat/platform-session-config-and-profile-update
branch
from
October 21, 2026 14:24
289fbcd to
54947f3
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.
Why
Partners need to change a managed user's profile, choose the caller ID per session, and set the assistant. This PR adds those calls to the SDK and its docs.
It also fixes a bug: Socket.IO messages sent
datetime.now().isoformat()asclient_now_date. That value has no UTC offset, so the server could not parse it, and the agent always used UTC.What changed
platform.managed_users.update(external_id, *, email, name, phone, assistant)→PATCH /platform/v1/managed-users/{external_id}.Noneis not sent;phone=""removes the phone; no arguments sends{}. Errors raisePlatformError.create()andupdate()takeassistantas a dict withidentity_id,nameor both. Other keys or non-string values raiseValueErrorbefore any request.ManagedUser.assistantisManagedUserAssistantorNone.sessions.get_config()/sessions.update_config(caller_id=...)onGET/PUT /v2/sessions/{id}/config.caller_idis"user"or"platform"; other values raiseValueErrorbefore any request. 503session_config_push_failedis aSessionError; no automatic retry.settings.assistant_identities()→GET /v2/app/settings/assistance_identities?identities=catalog. A key-only client reads it anonymously.client_now_datechat()andsend_message()take it, as RESTsend_message()already did. On every path it must be an RFC 3339 time with a UTC offset, orValueErroris raised before any request (validate_client_now_date). Without it, nothing is sent.PineAIhas the same REST methods.Docs: new sections in
sdk-api.mdandhttp-api.mdfor update, assistant identity (Pine's default assistant until one is chosen), caller ID and the user's time. The REST history delay now says "a minute or more". README links point to the docs onmain, so they stay the same across releases and open on PyPI. CHANGELOG has upgrade notes, and the version is0.5.0rc3.Breaking
client_now_datewithout a UTC offset now raisesValueError. The server ignored such values before, so the effect was UTC anyway.Verification
ruff check src tests: clean.pytest tests --ignore=tests/integration: 271 passed on Python 3.12 and 3.10, 51 of them new.python -m buildandtwine check: passed.client_now_dateover REST and Socket.IO, no offset without it, and the config change while a session was active.🤖 Generated with Claude Code