feat: expand companion platform, device controls, and memoir workflows
ci / verify (push) Canceled after 0s

Add customer and operator login, BLE provisioning, device fleet controls, call memory, memoir generation, and refreshed family and maintenance portals. Include API contracts, migrations, firmware sources, tests, assets, and deployment documentation.
This commit is contained in:
Codex Local
2026-10-08 10:06:44 +08:00
parent 98fb2965d0
commit bf1233d5df
861 changed files with 94614 additions and 3209 deletions
+117 -6
View File
@@ -700,13 +700,15 @@ paths:
/api/v1/web/setup/auth-link:
post:
operationId: onboardingOIDCPOSTapiv1websetupauthlink
summary: 关联OIDC登录
summary: 关联已登录账号
tags:
- Onboarding
description: HTTPS,同源浏览器,Cookie不可读,CSRF仅保存在当前标签页。
description: HTTPS,同源浏览器,必须提供设置会话 Cookie 和对应 CSRF;身份可来自 OIDC Bearer 或已登录账号 Cookie。
security:
- SetupCookie: []
Bearer: []
- SetupCookie: []
AccountCookie: []
parameters:
- in: header
name: X-Request-ID
@@ -745,6 +747,70 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Empty'
/api/v1/web/auth/captcha:
post:
operationId: onboardingSetupCaptcha
summary: 获取或刷新设备绑定登录的图片验证码
description: HTTPS、同源和 CSRF 校验;绑定当前设备设置会话,2 分钟有效,刷新和验证均使旧图失效。
security: [{ SetupCookie: [] }]
parameters:
- { in: header, name: X-Request-ID, required: true, schema: { type: string, format: uuid } }
- { in: header, name: X-CSRF-Token, required: true, schema: { type: string } }
- { in: header, name: Origin, required: true, schema: { type: string } }
requestBody:
required: true
content:
application/json:
schema: { type: object, additionalProperties: false }
responses:
'200':
description: PNG 图片、captcha_id 和 expires_at_ms,不返回答案
content:
application/json:
schema:
type: object
required: [ok, data]
properties:
ok: { type: boolean }
data:
type: object
required: [captcha_id, mode, expires_at_ms]
properties:
captcha_id: { type: string, format: uuid }
mode: { type: string, enum: [image, tencent, slide] }
captcha_app_id: { type: string, description: 腾讯云 Web 验证码公开 ID }
image: { type: string }
thumb_image: { type: string, pattern: '^data:image/png;base64,' }
image_width: { type: integer, minimum: 1 }
image_height: { type: integer, minimum: 1 }
thumb_width: { type: integer, minimum: 1 }
thumb_height: { type: integer, minimum: 1 }
thumb_x: { type: integer, minimum: 0, description: 拼图块的初始展示横坐标 }
thumb_y: { type: integer, minimum: 0, description: 拼图块所在水平轨道 }
expires_at_ms: { type: integer, format: int64 }
default: { description: 校验失败或会话过期 }
/api/v1/web/auth/captcha/verify:
post:
operationId: onboardingVerifyLocalSlideCaptcha
summary: 校验设备设置会话的本地滑块位置
description: HTTPS、同源、CSRF 和设备设置会话校验;每次提交即消费挑战。成功票据只对当前设置会话、客户端和策略版本有效,不能超过原 2 分钟期限。
security: [{ SetupCookie: [] }]
parameters:
- { in: header, name: X-Request-ID, required: true, schema: { type: string, format: uuid } }
- { in: header, name: X-CSRF-Token, required: true, schema: { type: string } }
- { in: header, name: Origin, required: true, schema: { type: string } }
requestBody:
required: true
content:
application/json:
schema: { $ref: './login-captcha.yaml#/components/schemas/SlideCaptchaVerifyInput' }
responses:
'200':
description: 一次性位置校验票据
content:
application/json:
schema: { $ref: './login-captcha.yaml#/components/schemas/SlideCaptchaVerifyResponse' }
default: { description: 校验失败或会话过期 }
/api/v1/web/auth/sms/send:
post:
operationId: onboardingPOSTapiv1webauthsmssend
@@ -1266,7 +1332,7 @@ paths:
$ref: '#/components/schemas/Failure'
post:
operationId: onboardingPOSTapiv1opsdeviceinventory
summary: 登记生产设备
summary: 创建设备并直接进入等待绑定
tags:
- Onboarding
description: 必须使用运维OIDC身份。对账仅ops_admin;其它写操作ops_admin或ops_operator。
@@ -1888,12 +1954,35 @@ components:
pattern: ^\+[1-9][0-9]{7,14}$
purpose:
type: string
description: 固定LOGIN
description: LOGIN 由服务端按手机号是否已有凭据选择注册或登录模板;CHANGE_PASSWORD 用于现有的短信登录后重置密码流程。更换手机号不可使用本接口。
enum:
- LOGIN
- CHANGE_PASSWORD
captcha_id:
type: string
format: uuid
description: 当前登录或设备设置会话的人机验证挑战 ID
captcha_code:
type: string
pattern: '^[0-9]{6}$'
description: 图片中的 6 位数字;每次新的发送都须使用未消费的图片验证码
captcha_ticket:
type: string
maxLength: 4096
writeOnly: true
description: 腾讯云模式使用对应端 SDK/插件票据;本地滑块模式使用 captcha/verify 返回的票据。绑定当前会话并一次性消费。
captcha_randstr:
type: string
maxLength: 256
writeOnly: true
description: 腾讯云 Web 模式必填;微信小程序插件不需要
anyOf:
- required: [captcha_code]
- required: [captcha_ticket]
required:
- phone_e164
- purpose
- captcha_id
SMSVerifyInput:
type: object
additionalProperties: false
@@ -1972,6 +2061,21 @@ components:
type: object
additionalProperties: false
properties:
initial_consents:
type: object
additionalProperties: false
required: [types, confirmed]
properties:
types:
type: array
maxItems: 5
uniqueItems: true
items:
type: string
enum: [transcript_storage, raw_audio_storage, story_extraction, personalized_memory, family_sharing]
confirmed:
type: boolean
description: 用户明确确认所选授权;不选任何项目时仍可创建资料
household_id:
type: string
description: 家庭公开UUID;省略时须提供新家庭名称
@@ -2099,9 +2203,12 @@ components:
device_name:
type: string
description: 冻结的物理设备名
product_secret:
device_secret:
type: string
description: 供应商产品注册密钥,只在设备认证后的HTTPS激活配置中下发
description: 平台代注册取得的本设备火山密钥;不再下发product_secret
RTCAppID:
type: string
description: 平台代注册取得的RTC应用ID
bot_id:
type: string
description: 智能体ID
@@ -2176,6 +2283,10 @@ components:
description: 状态版本
released:
type: boolean
description: 设备已完成内部初始化,可以开始绑定
bound:
type: boolean
description: 当前是否存在有效绑定
activation_id:
type: string
description: 激活任务UUID