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
+58
View File
@@ -0,0 +1,58 @@
package workflowbridge
import (
"errors"
"regexp"
"strings"
)
const DefaultTextModel = "deepseek-v4-1-flash-260910"
const DefaultBookModel = "doubao-seed-evolving"
const DefaultImageModel = "doubao-seedream-5-0-pro-260628"
var modelID = regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$`)
var errInvalidModel = errors.New("invalid model selection")
// Nodes carry only an Ark model/endpoint identifier. URL and credentials remain
// server configuration; choosing a model never silently falls back to another.
func selectedModel(step, model, custom string) (string, error) {
var fallback string
switch step {
case "classify", "daily":
fallback = DefaultTextModel
case "write-book":
fallback = DefaultBookModel
case "illustrate":
fallback = DefaultImageModel
default:
return "", nil
}
model = strings.TrimSpace(model)
if model == "__custom__" {
model = strings.TrimSpace(custom)
if model == "" {
return "", errInvalidModel
}
}
if model == "" {
if inCustom := strings.TrimSpace(custom); inCustom != "" {
return "", errInvalidModel
}
model = fallback
}
if !modelID.MatchString(model) || model == "__custom__" {
return "", errInvalidModel
}
if step == "illustrate" {
if !strings.HasPrefix(model, "doubao-seedream-") && !strings.HasPrefix(model, "ep-") {
return "", errInvalidModel
}
} else {
for _, modality := range []string{"seedream", "seedance", "embedding", "seed3d"} {
if strings.Contains(strings.ToLower(model), modality) {
return "", errInvalidModel
}
}
}
return model, nil
}