feat: add Yuheng ticket bind, trial SMS off, shared bindings

Ship ticket-exchange and bind/policy for Z13, keep trial binds SMS-free, allow shared company bindings, and align SyncPage plus sync docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
whm
2026-08-05 15:09:49 +08:00
parent f90245db9c
commit d195aa4804
19 changed files with 957 additions and 96 deletions

View File

@@ -54,11 +54,25 @@ type SMSConf struct {
CodeTTLSeconds int `json:",default=300"`
ResendSeconds int `json:",default=60"`
DevFixedCode string `json:",optional"` // 开发可固定如 123456
// RequireForBind手机号确认绑定时是否强制短信。
// 试运行/未接短信平台false关闭验证正式接入后改为 true。
RequireForBind bool `json:",optional"`
}
type AgentConf struct {
CapsuleSecret string `json:",optional"`
RegisterSecret string `json:",optional"` // 宿主自注册防刷;空则回退 IssueSecret/AccessSecret
// YuhengTicket仅宇恒平台签名凭票免登录HMAC其它客户端勿用。
YuhengTicket YuhengTicketConf `json:",optional"`
}
// YuhengTicketConf 宇恒 → 智建 短时凭票scope=sync_bind
type YuhengTicketConf struct {
Enabled bool `json:",optional"`
Secret string `json:",optional"` // 与宇恒共享;生产必换
Issuer string `json:",default=yuheng"`
Audience string `json:",default=aijianzhan"`
MaxAgeSec int `json:",default=120"` // 签发端建议 TTL验票另限 exp 不超过 now+10m
}
type StorageConf struct {