Locara

Implementation Status

This tracks what’s actually shipped in code vs. what each spec section describes. Specs are aspirational by design; this doc is the ground-truth pointer when a reader wants to know “can I use this today?”

Status keys:

  • Shipped — implemented, exercised by reference apps, tests cover the core path.
  • 🚧 Partial — primary path works, edges or polish missing.
  • 🧪 Demo — real implementation exists but not yet wired into a reference app or production-shaped.
  • 📝 Stub — type/scaffold present, no real logic.
  • Not started — no code yet.

Last reviewed: ground-up audit at the end of the v0 reference-app push. If you change behaviour, update this doc in the same commit.


Core (crates/locara-core)

SpecItemStatusNotes
02Manifest validation (validate)Regex-checked schema; tests for missing models, wrong schema, invalid tooling.
03Capability set + checkerAll ops gated; check failures appended to capability log.
04Modality + tooling expansionClosed sets; tooling: ["echo"] + others recognised.
04image-to-text modalityWired to OCR pipeline.
04speech-to-text modalityWired to whisper streaming + file modes.
04text-to-image modalityNo backend yet.
04text-to-speech / voice-to-voiceNo TTS backend.

SDK (packages/sdk)

SpecItemStatusNotes
05llm.chat / llm.chatStreamStreaming via Channel<T>; raw event shapes translated client-side.
05embed({input})Single + array; runtime auto-routes arrays to embed_many for batched perf.
05transcribe.fromFileWeb Audio decode → 16kHz mono PCM → IPC.
05transcribe.stream'microphone', 'system', MediaStream, AsyncIterable<Float32Array> sources.
05ocr.fromFileSends base64 image bytes, runtime dispatches to OCR backend.
05db.query / db.execCoerces JS arrays of floats to f32 LE blobs for sqlite-vec params.
05audit.capabilityLogLogEntry[] snapshot.
05tools.invokeRoutes to wasmtime via runtime registry.
05vlm.describeType exists; no backend.
05audio.openMicrophone (legacy)Superseded by transcribe.stream({source: 'microphone'}).

Runtime (crates/locara-runtime)

SpecItemStatusNotes
07LocaraState builderwith_transcribe, with_ocr, with_embedding_backend, with_app_db, with_tool_invoker.
07Tauri IPC commandsAll gated through check(); denials logged + structured-error’d.
07run_with_clean_exitmacOS C++ static-dtor crash workaround via _exit(0) on RunEvent::Exit.
07Capability logAppend-only CapabilityLog; readable via capability_log IPC.
33Streaming transcribe (sliding-window)10s window, 750ms tick, partial→final promotion.

Shared model daemon (crates/locara-modeld*)

SpecItemStatusNotes
07 / ADR-0015Protocol crate (locara-modeld-protocol)Msgpack-over-Unix-socket framing; externally-tagged Body; 8 unit tests cover round-trip + oversize / truncated / garbage rejection.
07 / ADR-0015Daemon binary (locara-modeld)Per-user socket, session table with refcount + idle eviction, graceful shutdown handle, SIGINT/SIGTERM aware, Chat dispatch streams tokens to clients via Notification::Token. 23 unit + 9 end-to-end tests.
07 / ADR-0015Client crate (locara-modeld-client)Typed Client::connect, Client::load_model, Session::chat_stream returns a streaming ChatStream, Session with Drop-fires-release semantics.
07 / ADR-0015Backend trait + StubBackend (v1.0)Backend::load + chat_stream. StubBackend echoes the user’s last message word-by-word — deterministic, exercises the full streaming round-trip in CI without real model weights.
07 / ADR-0015Real inference via locara-llama (v1.1)crates/locara-modeld/src/llama_backend.rs adapts locara_llama::LlamaBackend to the daemon Backend trait, gated behind --features llama. llama_backend_factory(cache_root) plugs into Config::backend_factory. Resolves models from content-addressed + flat-cache layouts. 8 unit tests for the adapter; 1 gated integration test (LOCARA_TEST_MODEL_PATH=<gguf>).
07 / ADR-0015Transcribe wiring (v1.2)🚧Runtime IPC for models_resolve_or_request + model_download plus a React first-run flow. Foundation primitives (fetch_to_cache, ModelDownloader) both exist; the wiring needs real-Mac end-to-end testing.
07 / ADR-0015Tray UI (v2)Read-only menubar app: warm models, RAM consumed, current inferring app.
07 / ADR-0015launchd auto-start (v3)locara modeld install / status / restart / uninstall writes the LaunchAgent plist.
07 / ADR-0015Runtime opt-in path🚧v0 daemon ships disabled-by-default. App runtime gets the runtime.backend: "daemon" field with v1.2 (transcribe wiring).

Backends

SpecItemStatusNotes
09locara-llama chatllama.cpp via llama-cpp-2; Metal on Apple Silicon.
09locara-llama embedMean-pool; embed_many shares one context across inputs.
09locara-whisper (file)whisper.cpp 0.16; Metal.
09locara-whisper (stream worker)Lives in runtime, calls WhisperBackend.transcribe per tick.
locara-vision-ocrApple Vision via objc2-vision.
locara-microphonecpal CoreAudio input; f32/i16/u16 conversion.
locara-screencapture-audiomacOS SCK; excludesCurrentProcessAudio = true.
bge-small-en-v1.5 dedicated embedderWired through with_embedding_backend; 384-dim vec0 in DocVault.

Tools (crates/locara-tools)

SpecItemStatusNotes
10Wasmtime + WASI Preview 1 invokerFuel + memory limits, preopened dirs, JSON in/out.
10Tool registry (in-memory)WasmToolRegistry in runtime; demo echo tool ships.
10Content-addressed cache (ToolCache)🚧Type + tests exist; not yet used by any app.
10Capability composition per invocationToolGrant built per call; no ambient authority.
10Real-world tool wasm artefactsOnly the demo echo. Real tools (filesystem.search, etc.) unimplemented.

Storage (crates/locara-storage)

SpecItemStatusNotes
08SQLite open + WAL pragmaslocara_storage::open().
08sqlite-vec auto-extensionlocara_storage::init() registers it.
35Migration runner🚧apply_migrations exists; DocVault uses idempotent CREATE IF NOT EXISTS in lieu of versioned migrations.
08Schema parsing + diffing🚧parse_schema works; diff is type-shaped only.

CLI (crates/locara-cli)

SpecItemStatusNotes
06locara init <template> <name>blank template scaffolds a runnable Tauri app.
06locara verifyValidates manifest + reports modalities/models.
06locara doctorChecks bun, cargo, rustc, git.
06locara model listShows both flat-cache files (gguf/bin) and blobs/ content-addressed entries.
06locara model addLocal files and HTTP(S) URLs; streams via locara-models::fetch_to_cache with running SHA-256 verification and atomic blob rename.
06locara add <component>Reads packages/components/registry.json and copies real files into src/components/ui/.
06locara devResolves model, sets LOCARA_MODEL_PATH, shells to tauri dev.
06locara test🚧Shells to bun test + cargo test; minimal post-processing.
06locara build🚧Delegates to tauri build.
06locara simulate📝Argument parser only.
06locara publish📝Dry-run; no real registry yet.

Components (packages/components)

SpecItemStatusNotes
11Primitives — Button / Input / Badge / Kbd / Card / Stack / Tooltip / Skeleton / Spinnershadcn-style copy-in via locara add <id>.
11App shell — AppShell / AuditLog / AuditDrawerRight-slot accepts arbitrary children; audit drawer wired into every reference app.
11Chat — Chat / MessageBubble / PromptBox / ChatComposer / MessageActions / ConversationList / TokenCount / VariableChipChatComposer composites model-picker + mode-switcher + slash menu + attachments.
11Voice — AudioInput / TranscriptStream / ListeningPill / VoiceOrb / WaveformBars / ListeningSurfaceUsed by Listen / Transcribe.
11Documents — DocDropzone / DocPreview / ResultsList / MarkdownView / PdfView / FileTreeUsed by DocVault.
11AI affordances — ModelSelector / ModelDownloader / ToolCallCard / Reasoning / ThinkingIndicator / StreamingText / ContextMeter / ModeSwitcher / AttachmentChip / StatusPill / EmptyStateCards / FollowupRow / AcceptReject / SlashMenu / CommandPalette / HoverActionRow / AIText / CitationChip / SourceCardThe “Cursor / Granola / Claude / Linear” pattern set.
11Foundation primitives — Dialog / Sheet / Toast / ContextMenu / Switch / Checkbox / RadioGroup / Slider / Tabs / SegmentedControl / Select / Combobox / FormField / Avatar / Progress / CopyButton / TimeAgoRadix-flavoured + WAI-ARIA APG compliant.
11Editors — MarkdownEditor / CodeEditor / DiffView / InlineEditPopover / EditorToolbar / SuggestionGhostText / EditorOutlineBear / iA Writer / Cursor / CodeMirror lineage.
11Data + media — DataTable / CodeBlock / VegaChart / RemotionFrame / SandboxFrameDataTable used by data-analyser; SandboxFrame for inline LLM-generated UI.
11Registry + locara add60+ entries in registry.json; integration test asserts every entry resolves cleanly to disk.
11Visual regression46 Playwright snapshots of /components/[id] previews, 1% pixel-diff tolerance; live React demos for 15 interactive components via Astro islands.

Reference Apps (apps/)

AppStatusNotes
apps/transcribeFile → whisper transcript → optional Q&A via Qwen.
apps/listenReal-time mic + system audio → sliding-window whisper transcript; demo echo tool registered.
apps/docvaultDrop text/images → OCR → chunked → bge-small embeddings → sqlite-vec KNN → grounded Q&A with citations; persists across restarts.
apps/scribeMulti-modal scribe agent; uses locara-automation for browser drive.
apps/voiceVoice-to-voice agent shell.
apps/reader🚧Local doc browser + grounded chat; agent loop uses list_sections / read_section tools. Builds clean, passes locara verify. Polish gap: first-run model download UX.
apps/studio🚧Multi-track sandbox. Builds clean, passes locara verify. Same first-run gap.
apps/data-analyser🚧DataTable + Vega + LLM Q&A over CSVs. Builds clean, passes locara verify. Same first-run gap.
apps/video-gen🚧Describe-a-video → LLM emits Remotion JSX → live preview. Builds clean, passes locara verify. Same first-run gap.
apps/demoReference shell for new components.

Website (website/)

SpecItemStatusNotes
45Static Astro site (238 pages)Manifesto, /apps, /components (per-id), /compatibility (Mac × model fit), /docs, /spec, /security.
45Live React demos15 components mounted as Astro islands on detail pages; production component code, scoped to a transformed containing block so modal/scrim stays inside the demo card.
45Visual regressionbun run test:visual — 46 baselines, runs in ≈10 s against astro preview.
45Compatibility surfaceEvery Mac SKU × every supported model: which fits, headroom, expected tok/s, ANE/MPS/AMX usage.

Distribution / publishing

SpecItemStatusNotes
15App packaging (.app bundle)🚧Tauri’s defaults work for unsigned dev builds; signing/notarisation not configured.
15Model fetch on first runApps panic if LOCARA_MODEL_PATH / cache lookup fails.
12Registry server / submissionlocara publish is a stub.
24Monetisation hooksNone.

Cross-cutting

SpecItemStatusNotes
13/14Threat model + capability gatingEvery IPC capability-checked; tests assert denial paths. Tauri-consistency check now resolves cross-crate plugin permissions (e.g. locara-automation:default from its sibling crate).
41Telemetry-zeroNo outbound network in any reference app.
30Testing strategy681 tests workspace-wide: 391 Rust (19 crates including 8 new tests for the LlamaBackend adapter; +1 gated integration test exercising real inference when LOCARA_TEST_MODEL_PATH is set), 244 TypeScript (80 components + 109 SDK + 49 manifest + 6 test-helpers), 46 visual-regression snapshots. cargo test --workspace && bun run ci is the canonical pre-commit.
18PhasingThis doc captures the v0.0.4 reference-app + component-library push.