Skip to content

feat(biz-client): add portable AI role management - #47

Merged
sedawwk merged 2 commits into
tuya:masterfrom
xiongzh2000:codex/biz-client-ai-role
Oct 21, 2026
Merged

sedawwk merged 2 commits into
tuya:masterfrom
xiongzh2000:codex/biz-client-ai-role

Conversation

@xiongzh2000

Copy link
Copy Markdown
Contributor

Devices need a shared role-management API instead of duplicating product-specific ATOP calls. This adds modules/biz-client above the public iot_atop_call() API, separate from IoT transport and RTC Session ownership.

Changes

  • Add PAL-based Business Client contexts and typed APIs for bound/template/custom roles, binding, editing, deletion, languages, and paginated timbres.
  • Preserve full language codes and cloud rejection details; validate query results, parameters and allocation cleanup. Editing a template creates and requests binding a custom role; editing a custom role updates it without rebinding.
  • Add a standalone POSIX CLI and an ESP-IDF worker/queue integration component, plus bilingual guides and API reference. Wire sources into both build paths and register role tests in CI.
  • Keep NVS, avatars, UI, retries and RTC reconnection application-owned. The CLI skips firmware-version reporting for the existing device identity.

Validation

  • SDK ctest: 21/21 targets passed serially.
  • Role contract suite: 11 cases passed, including UBSan and allocation-failure cleanup.
  • POSIX CLI: built and help entry verified.
  • ESP-IDF 5.5 / ESP32-S3: module and worker example cross-compiled in an integration harness.
  • Documentation: Chinese and English production builds and prebuild checks passed.

Live cloud role switching and subsequent voice effects still require device integration acceptance. Binding success is not claimed as proof of the current AI Session effect.

xiong-luze and others added 2 commits October 20, 2026 08:27
Share cloud role behavior across device products without mixing it into
IoT activation/transport or RTC Session ownership. Borrow an IoT client
and its PAL, use only the public ATOP entry point, preserve cloud
rejections, validate typed query results and expose explicit list release
and pagination contracts. Template edits create and bind a custom role;
custom edits update in place without rebinding.

Add value-copy ESP-IDF worker integration and a standalone POSIX CLI,
with bilingual guides/reference and host/ESP-IDF build registration.
The CLI skips version reporting when operating an existing device.

Verified: 21/21 SDK ctest targets; 11 role contract cases with UBSan;
POSIX CLI build/help; ESP32-S3 ESP-IDF 5.5 build of module and example;
both documentation locales and documentation prebuild checks.
Live cloud role/voice acceptance remains an application integration check.

Co-Authored-By: Codex <noreply@openai.com>
Record the upstream review link required by the release-note convention.
Verified: git diff --check; documentation-only reference change.

Co-Authored-By: Codex <noreply@openai.com>
@sedawwk
sedawwk merged commit 73d1d9f into tuya:master Oct 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants