138 行
6.9 KiB
Markdown
138 行
6.9 KiB
Markdown
# 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.
|
||
|
||
## 2026-07-20:Q1 启动自动连接增量
|
||
|
||
- 已完成:在 Tauri 启动阶段读取已保存的 `auto_connect` Profile,并按 Companion / Operations 槽位独立激活。
|
||
- 已完成:启动失败保留在对应 Runtime 状态,不阻断另一槽位;凭据仍由 Rust 读取,React 不接触秘密值。
|
||
- 已完成:启动自动连接复用现有 AstrBot OpenAPI 与 Desktop Gateway 激活路径。
|
||
- 验证:`cargo check --workspace --all-targets`、`cargo test --workspace`(59 项通过)、`cargo clippy --workspace --all-targets -- -D warnings`、`pnpm.cmd run typecheck` 通过。
|
||
- 未完成:前端启动连接状态提示、自动重连退避、JWT 登录、聊天布局和快速窗口共享状态完善。
|
||
- 当前工作区:本地未提交,等待下一项 Q1/Q2 增量完成后按用户指令提交。
|
||
|
||
|
||
## 2026-07-20??? 1-6 ??????
|
||
|
||
- Q1????????????????????????????
|
||
- Q2??? SQLite schema v6 ???????????????????????60 ? Rust ?????
|
||
- Q3?????????????/????/?????????????? Hook ?????
|
||
- Q4???????????????? URL ???
|
||
- Q5????????????/????????????????????????????
|
||
- Q6????? JSON manifest ???? UI?????????????PNG/WebP ??????????????
|
||
- ?????`2e84ea5`?`5dfac59`?`e0b48c0`?`9f235a3`?`4f13581`?`1828c61` ???? Forgejo?
|
||
|
||
## 2026-07-20??????????
|
||
|
||
- ?????????????????????????????????????
|
||
- ????????????????/????/????????????
|
||
- ???????????????????????????????????????????
|
||
- ??????????????/?????????????????? Windows ?????
|
||
- ?????TypeScript?ESLint?Vitest 6/6?Vite production build ???
|
||
|
||
|
||
## 2026-07-20: chat extensibility contract
|
||
|
||
- Added Rust-owned AstrBot capability discovery, model configuration options, and slot-scoped IPC.
|
||
- Added a bounded 16 MiB multipart upload boundary and normalized attachment metadata.
|
||
- Extended chat send requests with optional configId and attachments; the existing dual-slot isolation remains the authority.
|
||
- Updated ChatPanel with model selection, attachment staging, upload state, and clean WebChat-style text labels.
|
||
- Validation: Rust workspace tests 60 passed; Vitest 6/6 passed; TypeScript, ESLint, cargo check, and Vite build passed.
|
||
|
||
|
||
## 2026-07-20: live chat extensibility probe
|
||
|
||
- Both supplied containers returned status=ok for chat sessions and config discovery.
|
||
- Container 1 accepted a minimal multipart upload and returned attachment_id, filename, and type.
|
||
- No chat message or configuration mutation was performed. Full multimodal rendering remains reserved for an explicit send-message acceptance test.
|