No description
  • TypeScript 92.4%
  • JavaScript 6.5%
  • CSS 0.9%
  • HTML 0.2%
Find a file
amayakase 5ad9c513f5 Implement M05 selective Tavily research
Adds end-to-end selective research for remote chat: new research IPC/preload bridge, Tavily adapter, shared search policy engine, and a main-process ResearchService with SQLite-backed source/cache linking plus credit reservation/settlement tracking. Updates chat/settings/models UX with Tavily setup, consent toggles, richer source/activity provenance, product-card safety fallbacks, and new default local budget behavior. Expands automated coverage with policy/adapter unit tests, SQLite behavior script, and E2E research scenarios/screenshots, while synchronizing milestone/docs status for completed M05 scope and planned M06 download-manager requirements.
2026-10-08 22:06:02 +02:00
apps/desktop Implement M05 selective Tavily research 2026-10-08 22:06:02 +02:00
docs Implement M05 selective Tavily research 2026-10-08 22:06:02 +02:00
examples Docs 2026-10-08 19:06:52 +02:00
packages Implement M05 selective Tavily research 2026-10-08 22:06:02 +02:00
scripts Implement M05 selective Tavily research 2026-10-08 22:06:02 +02:00
tests Implement M05 selective Tavily research 2026-10-08 22:06:02 +02:00
.gitignore Scaffold M00 desktop shell and tooling 2026-10-08 19:24:41 +02:00
AGENTS.md Generalize remote chat to configurable APIs 2026-10-08 21:49:36 +02:00
eslint.config.js Scaffold M00 desktop shell and tooling 2026-10-08 19:24:41 +02:00
LICENSE Initial commit 2026-10-08 18:52:48 +02:00
package-lock.json Add SQLite IPC persistence for Electron chat 2026-10-08 20:37:50 +02:00
package.json Add SQLite IPC persistence for Electron chat 2026-10-08 20:37:50 +02:00
playwright.config.ts Scaffold M00 desktop shell and tooling 2026-10-08 19:24:41 +02:00
README.md Implement M05 selective Tavily research 2026-10-08 22:06:02 +02:00
tsconfig.json Add SQLite IPC persistence for Electron chat 2026-10-08 20:37:50 +02:00
vite.config.ts Scaffold M00 desktop shell and tooling 2026-10-08 19:24:41 +02:00

MioLab — Codex implementation documentation

Status: M05 selective Tavily research implemented alongside configurable remote Chat and credential-free Demo Mode. Live-key verification remains opt-in and unverified; M06 is next. See implementation status for validation and limitations. Product: local-first, configurable Electron desktop AI workspace built with React, Vite, TypeScript, and MUI. Audience: Codex or another coding agent, maintainers, QA testers, and contributors.

Start here

  1. Codex: read AGENTS.md first. It contains the non-negotiable rules and working process.
  2. Read docs/ROADMAP.md; implement only the current milestone, not the whole backlog at once.
  3. Read docs/01_PRODUCT.md, docs/02_UX.md, docs/03_ARCHITECTURE.md, and any feature-specific documents linked by the milestone.
  4. For every task, run the app and demonstrate what changed. Favor runnable vertical slices, not detached backend code.
  5. Before each handoff, audit and synchronize checklists across all docs, marking completed items in their original task lists as well as the tracker. See the checklist workflow.
  6. Use docs/CODEX_PLAYBOOK.md for a copyable starting prompt and the definition of done.

Product areas

  • Chat: conversations, personas, branching, streaming, Markdown and safe rich blocks, selective web research with visible source activity.
  • Translate: DeepL-style bilingual editing, automatic language detection, optional context, glossary, caching, translation memory, batch operations later.
  • Brain: transparent inspection/search of cached material, saved knowledge, source provenance, translation memory and imported documents.
  • Models: remote APIs (DeepSeek preset or custom OpenAI-compatible endpoint) and local Ollama behind one provider system. MioLab downloads/starts/stops its own external runtime; never bundle Ollama in the installer and never require using the Ollama UI/terminal.
  • Statistics: token usage, credits, latency, models, features and task progress.
  • Download Manager (planned for M06): asynchronous runtime/model downloads continue across page navigation while the app stays usable; global Downloads progress, cancellation, retry and recovery. See requirements.
  • Optional: OCR (clipboard image to editable multilingual text), global quick actions, model comparison Playground, further tool/provider extensions.

First principle: front-end first

M00–M02 must produce a usable desktop prototype with clickable routes, mock streaming, mocked search activity, translator, model catalog, Brain, statistics, settings, errors and empty states. Providers remain mocked, and no API keys or external downloads are needed to play with the prototype. Later milestones replace the mocked service adapters with real ones without rebuilding UI screens.

Explicit decisions

  • Three-pane shell: navigation sidebar, primary workspace, optional right inspector; not three separate Electron apps.
  • Single Electron desktop application; local-first and account-free by default.
  • TypeScript throughout; one repository, modular packages, typed IPC, SQLite.
  • Search is not automatic for every prompt. Search has Off / Auto / Explicit-only modes, local cache first, user-configurable monthly credit budget, and a bounded request policy.
  • Brain storage is not automatic personal memory. Cached sources and opt-in saved knowledge are separate and have provenance, visibility and deletion controls.
  • Reasoning means compatible model options and status; do not expose unapproved hidden chain-of-thought.
  • Provider names/model IDs and pricing change. Discover or configure them; don't freeze historical names into application logic.

Document index

See docs/INDEX.md for all documentation and milestone links.

Run the app shell

Requires Node.js 22.16+ and npm 10+. From the repository root:

npm ci
npm run dev

For the same React shell in a browser, run npm run dev:web and open http://127.0.0.1:5173. Chat supports M01 session history, simulated streaming and research; Translate, Brain, Models, Statistics and Settings now support interactive M02 simulations. No API credentials are needed.

npm run lint
npm run typecheck
npm test
npm run build
npm run test:electron
npm run test:e2e
npm run format:check

Browser E2E uses installed Google Chrome through Playwright (channel chrome); install Chrome or change the test channel for your environment. Electron smoke launches the built renderer; build first. npm run dev starts Vite and Electron together. Closing Electron stops Vite. Electron retains Demo chat and settings in app-data SQLite through validated IPC; browser preview remains an in-memory fixture demo. Electron supports opt-in remote Chat through Models → Remote API setup. Choose DeepSeek or Custom OpenAI-compatible API, save the API base URL, explicitly read its key from the clipboard, refresh models, then select one in Chat; enable optional Tavily research separately in Models. Other product features remain simulated. Disable and save Offline mode before testing the connection. Browser preview remains Demo only. See the M04 live smoke recipe in docs/IMPLEMENTATION_STATUS.md.