36a69c265f
Onboard Jimeng (火山视觉) as a `platform = "jimeng"` entry in the existing sites/accounts console, reusing the CRUD/list/status UI while branching every OpenAI-specific path so no other platform is affected. Jimeng is not OpenAI-compatible (Volcengine V4 HMAC signing, async two-step generation, no `/models` endpoint), so each branch keys off the single source of truth `routes::admin::accounts::is_jimeng_platform` (case-insensitive). Backend (src/routes/admin, src/services/jimeng): - create_account → create_jimeng_account: AK lands in accounts.access_token; SK + region/host/sessionToken nest under extra_config.jimeng.*; credentialMode forced to "apikey". No spawn_route_rebuild — Jimeng never enters the route table. - Secret protection: SK/sessionToken masked with •••• on list/get/update responses (mask_account_extra_config); update_account rejects a masked extra_config write-back so an edit round-trip can't clobber the real secret. - verify_token → verify_jimeng_token: signs a sentinel GetResult probe via JimengProvider::from_credentials(...).verify(). The Volcengine gateway checks the V4 signature before the business layer, so a valid AK/SK is Authenticated (business layer reports "not found") and a bad one yields an auth-class Code (classify_verify_response / is_auth_error_code). Never calls /models, never triggers generation. - build_probe_plan short-circuits Jimeng (probe-now/-stream) with a BadRequest pointing operators at the connection "验证" flow. - runtimeHealth: Jimeng has no proxy_logs, so derive_jimeng_runtime_health reads the latest jimeng background_tasks row; account_response_value_with_jimeng applies it only when the site is Jimeng and ignores the override otherwise. Frontend (src/web): - Sites.tsx: add jimeng platform option; prefill visual.volcengineapi.com; hide URL pool + auto-probe sections. - Accounts.tsx: AK + SK(required) + region/host/session fields under the API Key segment; "验证 AK/SK 签名" gates add; skip model sync / route rebuild. - api.ts: verify-token payload carries secretKey/region/host/sessionToken. Tests: unit coverage for credential nesting, secret masking, verify-response classification, and regression guards proving non-Jimeng accounts ignore the Jimeng health override and keep their proxy-log-derived health. Also: stop tracking the stray root package-lock.json (repo installs via pnpm) and gitignore it.
46 lines
702 B
Plaintext
46 lines
702 B
Plaintext
/target
|
|
**/*.rs.bk
|
|
.env
|
|
.env.*
|
|
data/
|
|
node_modules/
|
|
website/.next/
|
|
website/out/
|
|
dist/
|
|
release/
|
|
*.log
|
|
*.tsbuildinfo
|
|
logs/
|
|
tmp/
|
|
!tmp/.gitkeep
|
|
.DS_Store
|
|
Thumbs.db
|
|
docker/data/
|
|
docker/.env
|
|
.ace-tool/
|
|
.comfyui/
|
|
.claude/
|
|
.codex/
|
|
.agents/
|
|
.cache/
|
|
openspec/
|
|
boosapi
|
|
bossai
|
|
docker/*.tar
|
|
boosapi.db-shm
|
|
boosapi.db-wal
|
|
.tours/
|
|
bun.lock
|
|
|
|
# Embedded desktop subproject (BoosAPI Desktop) — generated artifacts only.
|
|
# Source lives in desktop/; these are build outputs that must never be tracked.
|
|
desktop/node_modules/
|
|
desktop/dist/
|
|
desktop/target/
|
|
desktop/src-tauri/target/
|
|
desktop/src-tauri/gen/schemas/
|
|
desktop/website/node_modules/
|
|
|
|
# Root uses pnpm (pnpm-lock.yaml); ignore stray npm lockfile
|
|
package-lock.json
|