agent: lumotia-rebrand — docs, scripts, root config, residuals
Phase 9 of the rebrand cascade. Sweep covers everything the Phase 8
frontend pass deliberately skipped: docs/, root markdown, scripts,
Cargo.toml descriptions, code comments that survived earlier
word-boundary sed, plus a handful of identifiers caught on the final
verify pass.
transcription-app changes:
- README.md, HANDOVER.md, KNOWN-ISSUES.md, run.sh — magnotia/Magnotia
-> lumotia/Lumotia.
- docs/ — sweep across all subdirs except docs/handovers/ (preserved
as immutable audit trail). Includes architecture-map references
to magnotia_core::*, magnotia_storage::*, etc. now pointing at
lumotia_*; dev-setup.md tracing output examples (lumotia_startup
target); brief/ + superpowers/ + issues/ + whisper-ecosystem/ +
audit/.
- Cargo.toml descriptions on 9 crates (core, audio, cloud-providers,
hotkey, llm, mcp, plus referenced others).
- crates/core/src/{error,hardware,recommendation,paths}.rs +
crates/audio/src/wav.rs + crates/llm/src/model_manager.rs +
crates/cloud-providers/src/keystore.rs + crates/mcp/src/lib.rs —
doc comments and a model-manager user-agent string.
- Caught on final pass: BroadcastChannel("magnotia_task_sync") -> ...
("lumotia_task_sync"); magnotia_locale i18n localStorage key
renamed + migration shim added; CSS keyframe names
magnotiaPulse / magnotiaBar / magnotiaFade renamed in the design-
system kit; magnotia_viewer_item / magnotia_viewer_mode handoff
keys renamed in HistoryPage + viewer/+page.svelte; src/assets/
wordmark.svg text.
- src-tauri/src/lib.rs comment cleanup ("magnotia era" was sed'd
to "lumotia era" earlier — restored).
Preserved (intentional):
- crates/core/src/paths.rs — keeps "magnotia" / "Magnotia" / ".magnotia"
legacy detection strings in legacy_and_target_paths() so the
migration shim can still find user data from the magnotia era.
- src/lib/stores/{page,focusTimer}.svelte.ts + src/lib/i18n/index.ts
— migration call sites reference the legacy magnotia keys
deliberately.
- docs/handovers/ — historical audit trail.
cargo build --workspace passes. npm run check: 0 errors / 0 warnings
(3958 files). cargo test --workspace: 339 pass / 0 fail.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,24 +9,24 @@ last_verified: 2026/05/09
|
||||
|
||||
> **Where you are:** [Architecture map](../README.md) → [LLM, Formatting, MCP](README.md) → MCP server
|
||||
|
||||
**Plain English summary.** `magnotia-mcp` is a standalone binary that speaks JSON-RPC 2.0 over stdio. It opens Magnotia's SQLite store read-only and exposes four tools to any MCP-capable client (Claude desktop, Cline, Goose, etc). One stdin line per request, one stdout line per response, stderr for logs. No auth — stdio access is the trust boundary.
|
||||
**Plain English summary.** `lumotia-mcp` is a standalone binary that speaks JSON-RPC 2.0 over stdio. It opens Lumotia's SQLite store read-only and exposes four tools to any MCP-capable client (Claude desktop, Cline, Goose, etc). One stdin line per request, one stdout line per response, stderr for logs. No auth — stdio access is the trust boundary.
|
||||
|
||||
## At a glance
|
||||
|
||||
- Crate: `magnotia-mcp`
|
||||
- Crate: `lumotia-mcp`
|
||||
- Paths:
|
||||
- `crates/mcp/src/main.rs` — 53 LOC binary entry
|
||||
- `crates/mcp/src/lib.rs` — 531 LOC dispatcher and tool implementations
|
||||
- Public surface (from `lib.rs`):
|
||||
- `pub const PROTOCOL_VERSION: &str = "2024-11-05"` (`:14`)
|
||||
- `pub const SERVER_NAME: &str = "magnotia-mcp"` (`:15`)
|
||||
- `pub const SERVER_NAME: &str = "lumotia-mcp"` (`:15`)
|
||||
- `pub const SERVER_VERSION: &str = env!("CARGO_PKG_VERSION")` (`:16`)
|
||||
- `pub struct JsonRpcRequest` (`:18`)
|
||||
- `pub struct JsonRpcResponse` (`:28`)
|
||||
- `pub struct JsonRpcError` (`:38`)
|
||||
- `pub async fn handle_message(pool: &SqlitePool, raw: Value) -> Option<JsonRpcResponse>` (`:49`)
|
||||
- `pub fn parse_error_response(detail: &str) -> JsonRpcResponse` (`:362`)
|
||||
- External deps that matter: `sqlx 0.8` with `runtime-tokio` and `sqlite` features (no migrations from this binary), `serde_json`, `tokio` (`current_thread` flavor), `anyhow`, `magnotia-storage` for the read-only init and the data accessors.
|
||||
- External deps that matter: `sqlx 0.8` with `runtime-tokio` and `sqlite` features (no migrations from this binary), `serde_json`, `tokio` (`current_thread` flavor), `anyhow`, `lumotia-storage` for the read-only init and the data accessors.
|
||||
- Tauri command that calls this: n/a — the binary is invoked by external MCP clients, never by Tauri.
|
||||
|
||||
## What's in here
|
||||
@@ -37,8 +37,8 @@ last_verified: 2026/05/09
|
||||
|
||||
Steps:
|
||||
|
||||
1. **Resolve database path.** `magnotia_storage::database_path()` — slice 5 owns the path computation. Logged to stderr.
|
||||
2. **Open read-only.** `magnotia_storage::init_readonly(&db_path).await?`. The init call sets the SQLite connection's URI to the read-only mode at the connection level, so this binary cannot write regardless of which tools the dispatcher exposes. Migrations are deliberately skipped — only the main app owns the schema.
|
||||
1. **Resolve database path.** `lumotia_storage::database_path()` — slice 5 owns the path computation. Logged to stderr.
|
||||
2. **Open read-only.** `lumotia_storage::init_readonly(&db_path).await?`. The init call sets the SQLite connection's URI to the read-only mode at the connection level, so this binary cannot write regardless of which tools the dispatcher exposes. Migrations are deliberately skipped — only the main app owns the schema.
|
||||
3. **Stdin loop.** Buffered line reader. For each non-empty line:
|
||||
- Parse as `serde_json::Value`.
|
||||
- On parse error: log to stderr, build a `parse_error_response` (code -32700, id `null`), write to stdout. Previously this branch logged-and-continued, dropping the response, which left clients in silence; the 2026-04-22 review flagged it as a MAJOR (`d25b095 fix(cr-2026-04-22): MCP stdio replies with parse-error on malformed JSON`).
|
||||
@@ -71,8 +71,8 @@ Returns the protocol-mandated handshake:
|
||||
{
|
||||
"protocolVersion": "2024-11-05",
|
||||
"capabilities": { "tools": {} },
|
||||
"serverInfo": { "name": "magnotia-mcp", "version": "0.1.0" },
|
||||
"instructions": "Read-only access to Magnotia's local transcript history and task list. All data stays on the user's machine."
|
||||
"serverInfo": { "name": "lumotia-mcp", "version": "0.1.0" },
|
||||
"instructions": "Read-only access to Lumotia's local transcript history and task list. All data stays on the user's machine."
|
||||
}
|
||||
```
|
||||
|
||||
@@ -124,10 +124,10 @@ Public helper called from `main.rs`'s parse-error branch. Emits a JSON-RPC 2.0 P
|
||||
```
|
||||
external MCP client
|
||||
↓ stdin (newline-delimited JSON-RPC 2.0)
|
||||
magnotia-mcp main.rs loop
|
||||
lumotia-mcp main.rs loop
|
||||
→ serde_json::from_str → Value
|
||||
(or parse_error_response on failure)
|
||||
→ magnotia_mcp::handle_message(&pool, raw)
|
||||
→ lumotia_mcp::handle_message(&pool, raw)
|
||||
→ JsonRpcRequest deserialise (or -32700 on shape mismatch)
|
||||
→ notification check (None)
|
||||
→ method dispatch:
|
||||
@@ -142,11 +142,11 @@ magnotia-mcp main.rs loop
|
||||
external MCP client
|
||||
```
|
||||
|
||||
The SQLite pool is opened once at startup and shared across the whole loop. `init_readonly` from `magnotia-storage` configures the connection with `mode=ro`, so a misbehaving tool implementation cannot write.
|
||||
The SQLite pool is opened once at startup and shared across the whole loop. `init_readonly` from `lumotia-storage` configures the connection with `mode=ro`, so a misbehaving tool implementation cannot write.
|
||||
|
||||
## Watch-outs
|
||||
|
||||
- **No auth, no transport-level scoping.** Anyone with stdio access to this binary has read access to every transcript and task in the user's local store. Magnotia's threat model treats stdio as a trust boundary; cloud / HTTP transport would need an auth layer. Tracked in the slice README.
|
||||
- **No auth, no transport-level scoping.** Anyone with stdio access to this binary has read access to every transcript and task in the user's local store. Lumotia's threat model treats stdio as a trust boundary; cloud / HTTP transport would need an auth layer. Tracked in the slice README.
|
||||
- **Read-only at the connection level, not just at the tool layer.** Even if a future contributor adds a write-shaped tool by mistake, the SQLite connection rejects it. Defense in depth.
|
||||
- **`current_thread` Tokio runtime.** No internal parallelism. A request that takes 5 seconds blocks the next request. Acceptable because (a) MCP is a single-client protocol over stdio and (b) every read tool is a quick SQLite query. Worth knowing if a future tool ever makes a network call (it should not).
|
||||
- **Logs go to stderr deliberately.** Stdout is the JSON-RPC channel; mixing logs in would corrupt the stream. Every log uses `eprintln!`; this is enforced by convention only — there is no `tracing` setup gating the writers.
|
||||
@@ -158,4 +158,4 @@ The SQLite pool is opened once at startup and shared across the whole loop. `ini
|
||||
|
||||
- [MCP tools](mcp-tools.md)
|
||||
- [Slice README — MCP auth gap](README.md)
|
||||
- Slice 5 (forthcoming) — `magnotia-storage::init_readonly`, `database_path`, `list_transcripts`, `get_transcript`, `search_transcripts`, `list_tasks`
|
||||
- Slice 5 (forthcoming) — `lumotia-storage::init_readonly`, `database_path`, `list_transcripts`, `get_transcript`, `search_transcripts`, `list_tasks`
|
||||
|
||||
Reference in New Issue
Block a user