F-33. A voice reply produced nothing at all: no marker, no event, no error. Four independent gates each dropped it, and fixing any one alone would have changed nothing observable. The mapper reached `map_media` for image, record, file and video alike, but its only emitting branch was gated on the frame being an image, and the `attachment_saved` fallback rejected every other type outright. Both now carry whatever type arrived, with the frame type as the marker's alt text so the renderer knows what to expect before any bytes exist. `pending_media` was also a single slot, so a second attachment in one reply overwrote the first before it was paired; it is a bounded queue now, and an `attachment_saved` with no id no longer consumes the media frame still waiting for one. The download judged a candidate path successful only if the bytes sniffed as an image — this server answers unknown paths with its own text under HTTP 200, so sniffing is load-bearing and cannot simply be dropped. Audio and video signatures are recognised now, and a declared Content-Type is trusted when it names media rather than only images. SILK is included deliberately: it is what AstrBot relays for QQ and WeChat voice, no browser decodes it, and recognising it is what lets the UI say so instead of rendering a player whose play button does nothing. The CSP had no `media-src`, so it fell back to `default-src 'self'` and an `<audio src="blob:">` was refused — in release builds only, since the dev server serves no CSP at all. That is the same divergence as F-04 and the inline-script trap in pet.html, so the policy now has a test of its own that pins each directive the app depends on, including that script-src still refuses inline. The renderer chose `<img>` unconditionally. The element now follows the media type of the bytes that actually arrived, falling back to the marker's declared kind for the placeholder and the failure message. `map_media` also kept a private copy of the message-id handling that included the reopen-suffix overwrite fixed earlier in `adopt_message_id`; it shares the one implementation now. Protocol tests 22 -> 26, Rust client 99 -> 101, frontend 35 -> 43. All six mutations of the new assertions were confirmed to fail. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| assets | ||
| crates | ||
| docs | ||
| src | ||
| src-tauri | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| .node-version | ||
| .npmrc | ||
| .prettierignore | ||
| AGENTS.md | ||
| AstrBot_Desktop_Codex_Forgejo_Predevelopment_Workflow.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| eslint.config.js | ||
| index.html | ||
| package.json | ||
| pet.html | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| rust-toolchain.toml | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
AstrBot Desktop
AstrBot Desktop is a Windows companion and local-assistance client built with Tauri 2, React, TypeScript, Vite, and Rust.
The MVP supports two isolated active AstrBot connection slots:
companionfor chat, proactive messages, voice, and game companionship;operationsfor user-authorized, policy-controlled diagnostics and recoverable file operations.
Security boundaries
- Credentials remain in Windows secure storage and are never exposed to React.
- Server tool requests are proposals; the Rust policy layer makes the final decision.
- The application does not provide arbitrary PowerShell, CMD, or shell execution.
- NAS transfers use
plan -> dry run -> copy -> verify -> commitand preserve source files on failure.
Current phase
The repository is in the P00 bootstrap and high-risk Spike phase. See docs/implementation-plan.md and docs/progress.md.
Authoritative documents
AGENTS.mddocs/01_Architecture_Design.mddocs/02_Codex_Implementation_Tasks.mdAstrBot_Desktop_Codex_Forgejo_Predevelopment_Workflow.md
Development prerequisites
- Windows 11
- Node.js and pnpm
- Rust stable with the MSVC target
- Visual Studio 2022 Build Tools with Desktop development with C++
- WebView2 Evergreen Runtime
Local commands
pnpm install --frozen-lockfile
pnpm check:frontend
pnpm test:e2e
pnpm rust:fmt
pnpm rust:clippy
pnpm rust:test
pnpm rust:check
pnpm tauri:dev
pnpm tauri:build
On Windows, Cargo build output can be redirected away from a NAS workspace:
$env:CARGO_TARGET_DIR = "$env:LOCALAPPDATA\Temp\AstrBot-Desktop-target"
The 30-minute connection soak and the controlled Windows UIA/capture smoke are ignored by the normal suite and must be invoked explicitly as documented in tests/README.md. The UIA/capture smoke opens only a generated, non-sensitive standard dialog and never writes captured pixels to disk.
P00 results and unresolved environment boundaries are recorded in docs/spikes and docs/progress.md.