Commit Graph

973 Commits

Author SHA1 Message Date
boos cf73250999 refactor: follow remote picture template policy 2026-07-14 03:46:06 +08:00
boos 379dfd7b11 feat: cache remote picture templates in database 2026-07-14 03:42:34 +08:00
boos bdd26a5e43 chore: remove local deployment and template artifacts 2026-07-14 03:34:59 +08:00
boos d68da02d9b perf: compact picture agent prompt dataset 2026-07-14 03:32:22 +08:00
boos 7554730f56 chore: remove local agent instructions and test env 2026-07-14 03:31:06 +08:00
boos 5f6d5ce5a0 chore: remove obsolete docs and planning files 2026-07-14 03:29:58 +08:00
boos 86d310ab35 chore: remove redundant repository artifacts 2026-07-14 03:29:04 +08:00
boos 557914fea8 chore: sync current workspace changes
Desktop CI Build / Build macOS ARM64 DMG (push) Has been cancelled
Desktop CI Build / Build Windows x64 (push) Has been cancelled
2026-07-14 03:21:10 +08:00
boos 1512fa23ce chore: remove local workspace artifacts from tracking 2026-06-29 16:34:16 +08:00
boos d452a7a4d9 refactor: simplify dashboard ops signals 2026-06-29 16:15:19 +08:00
boos 535fa988ef refactor: move ops triage cards to ops page 2026-06-29 15:47:35 +08:00
boos 0515b90b6c fix: allow deleting desktop providers 2026-06-29 15:22:40 +08:00
boos 7dd099b2e9 fix: rename desktop import action copy 2026-06-29 14:58:30 +08:00
boos dfae8cdc80 fix: restore compact desktop chat empty state 2026-06-29 14:52:47 +08:00
boos 258f4c1a00 feat: add desktop document skills workspace 2026-06-29 14:35:34 +08:00
boos 2b181344b2 fix: explain digital human frame templates 2026-06-29 13:59:21 +08:00
boos ffa38a4e7d ci: use pnpm for desktop workspace installs 2026-06-29 13:30:27 +08:00
boos be1f388b26 feat: add desktop video and ppt skills 2026-06-29 12:54:57 +08:00
boos bdfb9b8dc2 fix: align desktop chat with BoosAPI client flow 2026-06-29 12:27:27 +08:00
boos 2a5eca83c8 design: refresh desktop app logo 2026-06-29 11:59:18 +08:00
boos 8c9fbea822 fix: update desktop links and skills market 2026-06-29 11:43:49 +08:00
boos 6863ccd16c fix: tolerate stale workspace asset owners 2026-06-29 11:34:24 +08:00
boos 7e1bfdd7fe perf: index workflow route model lookup 2026-06-29 11:27:56 +08:00
boos 1fd7af1246 fix: allow large digital human uploads 2026-06-29 11:20:22 +08:00
boos 9ae9224669 refactor: merge agent workbench into chat 2026-06-29 10:56:07 +08:00
boos cd08ac931d feat: bundle desktop skills 2026-06-26 14:28:13 +08:00
boos 424aaa9b1f feat: add desktop agent workbench 2026-06-26 13:08:00 +08:00
boos bc99c678f9 feat: improve agent workbench and digital human flows 2026-06-25 16:32:21 +08:00
boos 22e6c162b6 ci: pin pnpm for macos dmg workflow 2026-06-24 14:35:44 +08:00
boos 397274be0c ci: add bun macos arm64 dmg build 2026-06-24 14:32:08 +08:00
boos 86bbfe2f3c fix: render registration errors as text 2026-06-24 10:52:20 +08:00
boos f9118583ff chore: stop tracking package-lock.json 2026-06-23 18:43:16 +08:00
boos 24f56ac53e Merge branch 'feat/jimeng-sites-ui' into feat/embed-desktop
# Conflicts:
#	src/services/jimeng/mod.rs
2026-06-23 18:43:05 +08:00
boos ce3dc9e4f4 Merge branch 'test/jimeng-unit' into feat/embed-desktop 2026-06-23 18:41:30 +08:00
boos d8011e2959 feat(agent): 前端补齐 P0(AskUser 问答 UI + 停止按钮)
- AskModal: agent 调用 AskUserQuestion 时弹出问答框(多选 options +
  自由文本),提交走 POST /api/agent/answer;ask/ask_resolved SSE
  事件接入 handleEvent。
- 停止按钮: AbortController 绑定 chat fetch,abort 即 drop SSE
  stream → 后端 CancelGuard 触发 CancellationToken 取消 agent loop;
  区分 [已停止] 与 [连接中断]。
2026-06-23 16:14:39 +08:00
boos 36a69c265f feat(jimeng-ui): record Jimeng connections via sites/accounts (方案甲)
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.
2026-06-23 16:09:49 +08:00
boos c177e0ce77 wip(agent): P0进度快照(会话历史/AskUser/取消) 2026-06-23 15:18:02 +08:00
boos f1265d863a test(jimeng): cover poll state machine edges
Exercise the decision logic and async driver beyond the happy path:
- decide() consults the business code before data.status (fatal and
  retryable codes win over a bogus done status)
- not_found is terminal
- exponential backoff grows 1,2,4,8 and caps at 8x the interval
- backoff multiplier resets after a normal generating wait
- a retryable code followed by a fatal one stops the loop
2026-06-23 14:22:43 +08:00
boos d956b3f9f4 test(jimeng): cover body assembly and poll parameters
Round out request-body validation and pin the polling parameters:
- all five allowed aspect ratios and both frame counts build
- prompt + image_urls together both land in the video body
- whitespace-only prompt is dropped but an image still satisfies one-of
- optional video fields are omitted when absent
- default poll interval/timeout values (image 2s/120s, video 8s/600s)
2026-06-23 14:22:43 +08:00
boos bf16139695 test(jimeng): cover classify edges and response parsing
Add unit tests for error-code classification boundaries and response
decoding that the existing cases left open:
- 50516/50517 are capability-independent (retryable for image too)
- adjacent copyright codes 50518 (fatal) vs 50519 (retryable)
- full 50520..=50522 service-exception range is fatal
- 50500/50501 fatal-for-image / retryable-for-video via classify directly
- negative codes are fatal (no poll loop)
- base64 image output and absent (not just null) data field decode safely
2026-06-23 14:22:34 +08:00
boos bd129fc160 fix(billing): new users get zero quota by default not unlimited
A freshly registered user's auto-provisioned default downstream key must
start with a zero spend allowance, not unlimited. Two parts:

- DEFAULT_NEW_USER_MAX_COST_USD changes from 1.0 to 0.0, so new users have no
  free spend until they top up or an admin raises the cap.
- The constant's docs now spell out the failure mode it guards: a NULL
  max_cost is treated as *unlimited* by the proxy, so the column must always
  be bound on INSERT. The registration path (routes::auth::register) and the
  admin create-user path (routes::admin::users) both already include the
  max_cost column and bind this constant, so both now persist 0.0 rather than
  leaving NULL.

Tests (cargo test --lib routes::auth::tests, 10 passed): assert the constant
is 0.0, and run the registration key INSERT against an in-memory DB to verify
the stored max_cost is non-NULL and exactly 0.0. The agent suites
(approval/sandbox/bash_sandbox/toctou) stay green.
2026-06-23 13:25:52 +08:00
boos cb5c0febbd fix(auth): drop duplicate pixelle_video field in test AppConfig
The test AppConfig initializer in routes::auth listed pixelle_video twice
(a merge artifact from stacking the Gemini and comfy-cloud branches), which
made the lib test binary fail to compile with E0062 and blocked `cargo test
--lib` for the whole crate. Remove the duplicate; lib tests build again.
2026-06-23 13:25:52 +08:00
boos 294ea7ccea docs: document jimeng provider in AGENTS.md 2026-06-23 12:50:27 +08:00
boos 7b68855c56 feat(jimeng): add image/video generation routes with background jobs, workspace transfer and billing 2026-06-23 12:46:40 +08:00
boos 7087c75162 feat(jimeng): add request signing, body validation and polling state machine 2026-06-23 12:24:48 +08:00
boos 311659cafd feat(jimeng): add capability mapping, request/response types and error classification 2026-06-23 12:22:58 +08:00
boos 916e92a25a feat(config): add jimeng provider config section 2026-06-23 12:17:24 +08:00
boos 018d832972 chore: add volc-visual-sdk dependency (signer only, no blocking) 2026-06-23 11:57:52 +08:00
boos b41bfd4d49 docs: note the embedded desktop subproject in the project layout
Point the project-structure section at desktop/, clarify it is an
independent Cargo workspace (excluded from the backend crate), and link
to desktop/README.md for build steps.
2026-06-22 11:33:03 +08:00
boos e0a5f57793 feat(desktop): embed BoosAPI Desktop client as a subproject
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as
a monorepo subdirectory under desktop/. Source only — node_modules,
dist, Cargo target and the upstream .git history are excluded.

desktop/ keeps its own independent Cargo workspace (desktop/src-tauri
with crates/*); it is not part of the backend boosapi crate, so a
`cargo check` at the metapi root still compiles only the backend. Build
the desktop app from desktop/src-tauri per desktop/README.md.

Note: app icons are still placeholder assets pending the final BoosAPI
logo. The updater signing keys live outside the repo and are not
included.
2026-06-22 11:32:57 +08:00