AstrBot-Desktop/docs/progress.md
YokiiroBW 3d1d962461
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
feat(chat): add AstrBot dual-slot chat foundation
2026-07-20 11:31:41 +08:00

4.4 KiB

Development Progress

Current phase

P02 dual connections remains active on feat/p02-dual-connections. The foundation has been adjusted for real AstrBot OpenAPI transport after live container probe. Credential enrollment, dual-slot runtime skeleton, and AstrBot SSE mapping are implemented. Full product chat UI activation and production identity enrollment remain open for acceptance.

Completed

Prior phases

  • P00 bootstrap merged.
  • P01 foundation merged through Forgejo PR #2.
  • P02 first increment: persistent dual slot assignment (bcc08cf).
  • P02 second increment: auto-connect validation and operations switch guard (34a563c).

Real-protocol foundation (this session)

  • Reviewed local AstrBot clone and live probe target http://192.168.31.210:26285.
  • Confirmed API Key chat SSE works; dual usernames/session ids isolate cleanly.
  • Added internal mapping module desktop-protocol::astrbot for OpenAPI SSE → Desktop events.
  • Added TransportKind (desktop-v1 | astrbot-openapi) plus remote_username / sticky_session_id profile fields.
  • Migrated SQLite schema to v4.
  • Added Rust AstrBotClient for probe/list/send chat stream.
  • Added DualSlotRuntime with activate/probe/send/deactivate skeleton.
  • Added bounded credential enrollment IPC (enroll_profile_credential / clear_profile_credential) using Windows Credential Manager; secrets never returned to React.
  • Added frontend transport fields and credential enrollment card.
  • Recorded ADR-0005 and live probe report.

In progress

  • User acceptance of real-protocol foundation.
  • Next product increments: chat panel rendering, history persistence, JWT login path, stronger server identity UX.

Remaining

  • Wire auto-connect startup to DualSlotRuntime without weakening secret boundary.
  • Dual chat UI panels consuming normalized runtime events.
  • Message persistence for AstrBot mapped events.
  • Dashboard JWT auth strategy.
  • File attachment OpenAPI path.
  • Certificate fingerprint binding.
  • Full stage gate (fmt/clippy/typecheck/build/installer) before merge.

Blockers / reserved for user

  • Production API Key rotation after shared test key exposure in chat.
  • Optional second AstrBot container if true dual-server soak is required.
  • Product decision on companion/operations remote username naming convention.
  • TLS-terminated HTTPS endpoint if pinning must be validated before release.

Test status

  • desktop-protocol lib tests: 4 passed (AstrBot mapper).
  • astrbot-desktop lib tests: 58 passed.
  • Vitest: 6 passed.
  • Live non-destructive probe artifacts retained under docs/reports/ (secrets redacted).
  • Full release build / Clippy gate / Playwright not re-run in this autonomous stretch.

Current branch

  • feat/p02-dual-connections

Next step after acceptance

  1. Chat panel MVP against AstrBot adapter.
  2. Persist sticky session + message history under profile/server/session keys.
  3. Optional auto-connect activation using enrolled credential references only.

Queue decision

  • Q1-Q3 complete the real AstrBot text-chat path and main UI before visual polish.
  • Q4 adds the draggable/resizable quick window using the same chat state.
  • Q5 adds the status bubble and configurable click routing.
  • Q6-Q7 reserve pet assets, multi-monitor geometry, and game-mode policy without adding arbitrary desktop control.

Autonomous queue increment

Completed in this increment:

  • Q1: Rust-owned bounded runtime event drain IPC and normalized event identity fields.
  • Q2: SQLite schema v5 chat message persistence keyed by account/profile/slot/server/session/message.
  • Q3: main chat panel MVP with Companion/Operations switching, streaming event merge, send error state, and session history restore.
  • Q4: dynamic Tauri quick-chat window sharing the Rust runtime.
  • Q5: non-default-topmost status bubble window with runtime status display.
  • Q6: pet state, safe PNG/WebP manifest schema, monitor geometry, and safe-edge placement model.

Validation: Rust workspace tests passed (59 tests), Rust Clippy with warnings denied passed, Rust format check passed, TypeScript check passed, Vitest passed (6 tests), and Vite production build passed.

Still not claimed complete: automatic startup activation, real Tauri multi-window manual UX, long-duration reconnect soak, JWT login, attachment protocol, certificate pinning, actual Windows multi-monitor/game-mode integration, voice, and release installer validation.