diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index a0d9c74..58c761c 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -3,6 +3,6 @@ github: # Optional funding platforms can be added later. # open_collective: -# - mimir +# - ragmir # custom: # - https://polar.sh/ diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index f496dd1..8a9acf9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,5 @@ name: Bug report -description: Report a reproducible Mimir bug +description: Report a reproducible Ragmir bug title: "bug: " labels: ["bug"] body: @@ -21,8 +21,8 @@ body: - type: input id: version attributes: - label: Mimir version - placeholder: "pnpm exec mimir --version" + label: Ragmir version + placeholder: "pnpm exec ragmir --version" validations: required: true - type: textarea diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 71ceac6..b908830 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -10,5 +10,5 @@ ## Security -- [ ] No secrets, private documents, `.env` files, generated `.kb/` or generated `.mimir/` state are included. +- [ ] No secrets, private documents, `.env` files, generated `.kb/` or generated `.ragmir/` state are included. - [ ] Public documentation does not expose private project, customer, pricing, or validation details. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71358fb..804499b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: run: pnpm smoke - name: Verify generated dist is committed - run: git diff --exit-code -- packages/mimir-core/dist packages/mimir-tts/dist + run: git diff --exit-code -- packages/ragmir-core/dist packages/ragmir-tts/dist - name: Verify npm package metadata run: pnpm package:check diff --git a/.github/workflows/deploy-landing.yml b/.github/workflows/deploy-landing.yml index 3959c87..0d6d8ac 100644 --- a/.github/workflows/deploy-landing.yml +++ b/.github/workflows/deploy-landing.yml @@ -4,7 +4,7 @@ on: push: branches: [main, develop] paths: - - "packages/mimir-landing/**" + - "packages/ragmir-landing/**" - ".github/workflows/deploy-landing.yml" workflow_dispatch: @@ -21,10 +21,10 @@ jobs: runs-on: ubuntu-latest environment: name: ${{ github.ref == 'refs/heads/main' && 'landing-production' || 'landing-staging' }} - url: ${{ github.ref == 'refs/heads/main' && 'https://mimir.jcode.works' || 'https://staging.mimir.jcode.works' }} + url: ${{ github.ref == 'refs/heads/main' && 'https://ragmir.jcode.works' || 'https://staging.ragmir.jcode.works' }} defaults: run: - working-directory: packages/mimir-landing + working-directory: packages/ragmir-landing steps: - name: Checkout uses: actions/checkout@v6 @@ -52,7 +52,7 @@ jobs: if: github.ref == 'refs/heads/main' run: pnpm build env: - PUBLIC_MIMIR_LANDING_URL: https://mimir.jcode.works + PUBLIC_RAGMIR_LANDING_URL: https://ragmir.jcode.works - name: Deploy (production) if: github.ref == 'refs/heads/main' @@ -65,7 +65,7 @@ jobs: if: github.ref == 'refs/heads/develop' run: pnpm build env: - PUBLIC_MIMIR_LANDING_URL: https://staging.mimir.jcode.works + PUBLIC_RAGMIR_LANDING_URL: https://staging.ragmir.jcode.works - name: Deploy (staging) if: github.ref == 'refs/heads/develop' diff --git a/.github/workflows/native-app-build.yml b/.github/workflows/native-app-build.yml index 8e0ff54..4982eb1 100644 --- a/.github/workflows/native-app-build.yml +++ b/.github/workflows/native-app-build.yml @@ -53,22 +53,22 @@ jobs: run: pnpm install --frozen-lockfile - name: Run release preflight - run: pnpm --filter @jcode.labs/mimir-app release:preflight -- --target linux --soft + run: pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target linux --soft - name: Build native bundle - run: pnpm --filter @jcode.labs/mimir-app tauri:build:linux + run: pnpm --filter @jcode.labs/ragmir-app tauri:build:linux - name: Generate checksums - run: pnpm --filter @jcode.labs/mimir-app release:checksums + run: pnpm --filter @jcode.labs/ragmir-app release:checksums - name: Generate release manifest - run: pnpm --filter @jcode.labs/mimir-app release:manifest -- --target linux + run: pnpm --filter @jcode.labs/ragmir-app release:manifest -- --target linux - name: Upload native bundle uses: actions/upload-artifact@v4 with: - name: mimir-app-linux-${{ github.sha }} - path: packages/mimir-app/src-tauri/target/release/bundle/ + name: ragmir-app-linux-${{ github.sha }} + path: packages/ragmir-app/src-tauri/target/release/bundle/ if-no-files-found: error macos: @@ -97,22 +97,22 @@ jobs: run: pnpm install --frozen-lockfile - name: Run release preflight - run: pnpm --filter @jcode.labs/mimir-app release:preflight -- --target macos --soft + run: pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target macos --soft - name: Build native bundle - run: pnpm --filter @jcode.labs/mimir-app tauri:build:macos + run: pnpm --filter @jcode.labs/ragmir-app tauri:build:macos - name: Generate checksums - run: pnpm --filter @jcode.labs/mimir-app release:checksums + run: pnpm --filter @jcode.labs/ragmir-app release:checksums - name: Generate release manifest - run: pnpm --filter @jcode.labs/mimir-app release:manifest -- --target macos + run: pnpm --filter @jcode.labs/ragmir-app release:manifest -- --target macos - name: Upload native bundle uses: actions/upload-artifact@v4 with: - name: mimir-app-macos-${{ github.sha }} - path: packages/mimir-app/src-tauri/target/release/bundle/ + name: ragmir-app-macos-${{ github.sha }} + path: packages/ragmir-app/src-tauri/target/release/bundle/ if-no-files-found: error windows: @@ -144,20 +144,20 @@ jobs: run: pnpm install --frozen-lockfile - name: Run release preflight - run: pnpm --filter @jcode.labs/mimir-app release:preflight -- --target windows --soft + run: pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target windows --soft - name: Build native bundle - run: pnpm --filter @jcode.labs/mimir-app tauri:build:windows + run: pnpm --filter @jcode.labs/ragmir-app tauri:build:windows - name: Generate checksums - run: pnpm --filter @jcode.labs/mimir-app release:checksums + run: pnpm --filter @jcode.labs/ragmir-app release:checksums - name: Generate release manifest - run: pnpm --filter @jcode.labs/mimir-app release:manifest -- --target windows + run: pnpm --filter @jcode.labs/ragmir-app release:manifest -- --target windows - name: Upload native bundle uses: actions/upload-artifact@v4 with: - name: mimir-app-windows-${{ github.sha }} - path: packages/mimir-app/src-tauri/target/release/bundle/ + name: ragmir-app-windows-${{ github.sha }} + path: packages/ragmir-app/src-tauri/target/release/bundle/ if-no-files-found: error diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index afd4249..f5eb15c 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest environment: name: npm-publish - url: https://www.npmjs.com/package/@jcode.labs/mimir + url: https://www.npmjs.com/package/@jcode.labs/ragmir steps: - name: Verify main branch run: test "${GITHUB_REF}" = "refs/heads/main" @@ -57,5 +57,5 @@ jobs: - name: Upload release verification artifacts uses: actions/upload-artifact@v4 with: - name: mimir-release-${{ github.sha }} + name: ragmir-release-${{ github.sha }} path: release-artifacts/ diff --git a/.gitignore b/.gitignore index 4699eca..e527bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ coverage/ .DS_Store private/** .kb/ -.mimir/ +.ragmir/ .claude/ .codex/ .agents/ @@ -13,22 +13,22 @@ private/** release-artifacts/ *.pid -packages/mimir-app/dist/ -packages/mimir-app/src-tauri/target/ -packages/mimir-app/src-tauri/gen/ -packages/mimir-landing/.astro/ -packages/mimir-landing/dist/ -packages/mimir-license-webhook/dist/ +packages/ragmir-app/dist/ +packages/ragmir-app/src-tauri/target/ +packages/ragmir-app/src-tauri/gen/ +packages/ragmir-landing/.astro/ +packages/ragmir-landing/dist/ +packages/ragmir-license-webhook/dist/ # Tracked synthetic examples. Keep generated example runtime state ignored. -!packages/mimir-core/examples/ -!packages/mimir-core/examples/**/ -!packages/mimir-core/examples/**/.mimir/ -!packages/mimir-core/examples/**/.mimir/config.json -!packages/mimir-core/examples/**/.mimir/sources.txt -packages/mimir-core/examples/**/.mimir/storage/ -packages/mimir-core/examples/**/.mimir/access.log -packages/mimir-core/examples/**/.mimir/models/ -packages/mimir-core/examples/**/.mimir/reports/ -packages/mimir-core/examples/**/.mimir/audio/ +!packages/ragmir-core/examples/ +!packages/ragmir-core/examples/**/ +!packages/ragmir-core/examples/**/.ragmir/ +!packages/ragmir-core/examples/**/.ragmir/config.json +!packages/ragmir-core/examples/**/.ragmir/sources.txt +packages/ragmir-core/examples/**/.ragmir/storage/ +packages/ragmir-core/examples/**/.ragmir/access.log +packages/ragmir-core/examples/**/.ragmir/models/ +packages/ragmir-core/examples/**/.ragmir/reports/ +packages/ragmir-core/examples/**/.ragmir/audio/ .gitnexus diff --git a/.gitnexusignore b/.gitnexusignore index faa241e..2c7c627 100644 --- a/.gitnexusignore +++ b/.gitnexusignore @@ -4,8 +4,8 @@ node_modules/ .pnpm-store/ -# Local generated Mimir state and agent exposure folders -.mimir/ +# Local generated Ragmir state and agent exposure folders +.ragmir/ .kb/ .agents/ .claude/ diff --git a/AGENTS.md b/AGENTS.md index c02f162..6a14b93 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# Mimir +# Ragmir ## Working Rules @@ -6,17 +6,17 @@ - Write code, identifiers, commit messages, filenames, and technical comments in English. - Keep this repository free of private user documents, scans, tax identifiers, API keys, environment files, or generated vector stores. -- Keep public branding centered on `Mimir`. Use JCode Labs and Jean-Baptiste Thery for +- Keep public branding centered on `Ragmir`. Use JCode Labs and Jean-Baptiste Thery for package scope, repository ownership, and copyright, not as the product name. -- Use `Mimir Core` only for the technical core package `@jcode.labs/mimir` and developer-facing - package metadata. User-facing product copy remains `Mimir`; companion packages are Mimir add-ons. +- Use `Ragmir Core` only for the technical core package `@jcode.labs/ragmir` and developer-facing + package metadata. User-facing product copy remains `Ragmir`; companion packages are Ragmir add-ons. - The package is open source under the MIT License unless the user explicitly changes it. - This package must stay reusable across repositories. Resolve project data from the caller's working directory or explicit config, not from the package installation path. -- The public CLI name is `mimir`; keep `kb` only as a legacy compatibility alias. New docs, - generated agent configs, landing copy, and setup guidance should use `mimir ...` commands. -- `mimir init` and `mimir install-skill` must keep generated local Mimir state ignored in target - repositories. By default, add one `.mimir/` entry to the target repository `.gitignore`; `.kb/` +- The public CLI name is `ragmir`; keep `kb` only as a legacy compatibility alias. New docs, + generated agent configs, landing copy, and setup guidance should use `ragmir ...` commands. +- `ragmir init` and `ragmir install-skill` must keep generated local Ragmir state ignored in target + repositories. By default, add one `.ragmir/` entry to the target repository `.gitignore`; `.kb/` and `private/` are legacy-only compatibility paths. `security-audit` should still accept older `private/**` entries. - Keep confidentiality features low-friction: local-hash retrieval by default, optional @@ -29,12 +29,12 @@ - Keep FR/EU sovereignty, GDPR, AI Act, and legal-vertical claims bounded by `docs/fr-eu-sovereign-positioning.md`. Do not claim blanket compliance, legal advice, or regulated sovereignty certification without a separate review. -- Keep first-run UX centered on `mimir setup` for full onboarding and `mimir doctor --fix` for safe - repairs. `mimir init`, `mimir install-skill`, and `mimir ingest` remain available as explicit +- Keep first-run UX centered on `ragmir setup` for full onboarding and `ragmir doctor --fix` for safe + repairs. `ragmir init`, `ragmir install-skill`, and `ragmir ingest` remain available as explicit lower-level commands. -- Keep monorepo source onboarding simple: the `sources` array in `.mimir/config.json` accepts paths, - glob patterns, and `!` exclusions. The legacy `.mimir/sources.txt` file (managed by `mimir sources - add/list`) is still read and merged when present, but `mimir init` no longer creates it. +- Keep monorepo source onboarding simple: the `sources` array in `.ragmir/config.json` accepts paths, + glob patterns, and `!` exclusions. The legacy `.ragmir/sources.txt` file (managed by `ragmir sources + add/list`) is still read and merged when present, but `ragmir init` no longer creates it. - Keep product documentation canonical in the root `README.md`. Package README files under `packages/*/README.md` are intentionally minimal npm entrypoints and must link clearly to the GitHub root README because npm displays package README files separately. @@ -43,14 +43,14 @@ - Keep real-corpus dogfooding, business validation, pricing tests, customer ledgers, interview notes, generated JSON, reports, screenshots, paths, and client details outside Git. Commit only public-safe aggregate findings or synthetic reproductions. -- For private retrieval dogfooding, use `mimir evaluate --fail-under ` as the local recall +- For private retrieval dogfooding, use `ragmir evaluate --fail-under ` as the local recall gate, and keep the real corpus, golden query files, and generated evaluation JSON outside Git. -- Use `mimir usage-report --days ` for metadata-only dogfooding summaries; do not read or commit +- Use `ragmir usage-report --days ` for metadata-only dogfooding summaries; do not read or commit raw access logs when an aggregate report is enough. -- Keep user-facing titles and marketing surfaces branded as `Mimir`. Use `Mimir Core` only for the +- Keep user-facing titles and marketing surfaces branded as `Ragmir`. Use `Ragmir Core` only for the technical core package and developer-facing metadata. - Keep public repository surfaces safe to publish: no active checkout URLs, fake download/update URLs - under real Mimir domains, private documents, generated `.pid` files, committed secrets, internal + under real Ragmir domains, private documents, generated `.pid` files, committed secrets, internal GTM/pricing ledgers, or wording that presents tracked MIT source as proprietary or closed source. `pnpm public:smoke` enforces the cheap checks. - The public-surface secret scanner (`scripts/public-surface-smoke.mjs`) runs over every tracked @@ -64,83 +64,83 @@ `excludeFolders`/`excludeFiles` in sync with new generated-output or private-data directories. Registering the repo on context7.com (so it resolves through `resolve-library-id`) is a manual step on their site; these files only prepare the repo for that step. -- `packages/mimir-ui` is the shared UI/style foundation adapted from the WorkoutGen landing/UI +- `packages/ragmir-ui` is the shared UI/style foundation adapted from the WorkoutGen landing/UI approach. It provides the common Tailwind theme and React primitives for both the landing and the Tauri app; do not import WorkoutGen product copy, assets, analytics, or secrets. -- Prefer the shared shadcn-style primitives from `packages/mimir-ui` for landing and app surfaces. +- Prefer the shared shadcn-style primitives from `packages/ragmir-ui` for landing and app surfaces. Tune reusable component variants or theme tokens before adding per-use raw color, typography, or shape overrides; primary buttons should stay rounded pill buttons. -- Keep shadcn CLI configuration explicit in `packages/mimir-ui/components.json` and - `packages/mimir-landing/components.json`. Use `pnpm dlx shadcn@latest info -c - packages/mimir-ui` for shared primitives and `pnpm dlx shadcn@latest info -c - packages/mimir-landing` for the Astro landing surface; do not duplicate landing-local UI - components when an export from `@jcode.labs/mimir-ui` fits. -- `packages/mimir-landing` is the Astro static landing package. It must stay telemetry-free by +- Keep shadcn CLI configuration explicit in `packages/ragmir-ui/components.json` and + `packages/ragmir-landing/components.json`. Use `pnpm dlx shadcn@latest info -c + packages/ragmir-ui` for shared primitives and `pnpm dlx shadcn@latest info -c + packages/ragmir-landing` for the Astro landing surface; do not duplicate landing-local UI + components when an export from `@jcode.labs/ragmir-ui` fits. +- `packages/ragmir-landing` is the Astro static landing package. It must stay telemetry-free by default; do not add PostHog. Run Astro through - `packages/mimir-landing/scripts/astro-no-telemetry.mjs` so local dev, check, preview, and build + `packages/ragmir-landing/scripts/astro-no-telemetry.mjs` so local dev, check, preview, and build commands set `ASTRO_TELEMETRY_DISABLED=1`. If analytics are needed later, prefer Cloudflare Web Analytics. - The landing deploy target is Cloudflare Workers Static Assets through - `packages/mimir-landing/wrangler.jsonc` and the canonical domain `mimir.jcode.works`. Keep + `packages/ragmir-landing/wrangler.jsonc` and the canonical domain `ragmir.jcode.works`. Keep Cloudflare account IDs, tokens, and analytics secrets out of the repository; use local dry-runs before any protected-branch deployment. -- Mimir landing should keep the broad WorkoutGen landing signals when content changes: Astro i18n - routes, dark-first theme, self-hosted Inter, the shared `MimirBackground` port of WorkoutGen's +- Ragmir landing should keep the broad WorkoutGen landing signals when content changes: Astro i18n + routes, dark-first theme, self-hosted Inter, the shared `RagmirBackground` port of WorkoutGen's animated particle/canvas background, rounded pill nav, and language switching. Do not flatten it into a generic single-language static page or replace the background with an unrelated imitation. -- `packages/mimir-app` is the cross-platform Tauri desktop/mobile shell. Root `pnpm build` validates +- `packages/ragmir-app` is the cross-platform Tauri desktop/mobile shell. Root `pnpm build` validates the frontend bundle only; native `tauri build`, `tauri ios *`, and `tauri android *` commands stay explicit and are not part of npm release validation. -- Distribute the Mimir app through direct downloads and sideloadable installers, not App Store or +- Distribute the Ragmir app through direct downloads and sideloadable installers, not App Store or Play Store flows. Desktop installers and Android APK-style distribution are first-class; iOS stays deferred until a compliant non-store channel is chosen. - Keep Android release packaging on the APK/direct-sideload path with - `pnpm --filter @jcode.labs/mimir-app tauri:android:build`; do not add an iOS release build script + `pnpm --filter @jcode.labs/ragmir-app tauri:android:build`; do not add an iOS release build script until a compliant non-store distribution path exists. - Keep direct-download packaging and updater rules in `docs/app-distribution.md`; do not wire the Tauri updater with placeholder keys or endpoints. -- Keep `packages/mimir-app` `release:updater-guard` passing. It must fail on partial or placeholder +- Keep `packages/ragmir-app` `release:updater-guard` passing. It must fail on partial or placeholder Tauri updater configuration and stay part of release preflight for direct-download packaging. - Native desktop CI artifacts may be built only through the manual `Native App Build` workflow. It uploads artifacts for inspection but must not create GitHub releases, deploy, publish, or bypass signing/checksum requirements. -- Before native app packaging, run `pnpm --filter @jcode.labs/mimir-app release:preflight -- --target +- Before native app packaging, run `pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target ` on the matching release machine. The preflight may check that secret-bearing environment variables are present, but it must never print their values. -- Keep `packages/mimir-app` `release:preflight:smoke` passing. It verifies supported native release +- Keep `packages/ragmir-app` `release:preflight:smoke` passing. It verifies supported native release targets, keeps iOS out of release packaging, and confirms secret-bearing preflight environment values are not printed. -- Generate native artifact checksums with `pnpm --filter @jcode.labs/mimir-app release:checksums` +- Generate native artifact checksums with `pnpm --filter @jcode.labs/ragmir-app release:checksums` after Tauri packaging and before publishing direct-download files. The manual Native App Build workflow uploads the generated `SHA256SUMS` with the bundle artifacts. -- Generate `mimir-app-release.json` with - `pnpm --filter @jcode.labs/mimir-app release:manifest -- --target ` +- Generate `ragmir-app-release.json` with + `pnpm --filter @jcode.labs/ragmir-app release:manifest -- --target ` after checksums. The manifest is for static direct-download metadata and must not contain fake checkout URLs or unsigned-artifact claims. - App license validation is local and per-major. Keep private signing keys out of the repository; - only inject the public JWK at build time through `VITE_MIMIR_LICENSE_PUBLIC_KEY_JWK`, and use - `packages/mimir-app` `license:keypair` / `license:issue` scripts for local license operations. + only inject the public JWK at build time through `VITE_RAGMIR_LICENSE_PUBLIC_KEY_JWK`, and use + `packages/ragmir-app` `license:keypair` / `license:issue` scripts for local license operations. - Lemon Squeezy integration stays offline until a real webhook service is intentionally deployed: convert exported order/subscription JSON with `license:from-lemonsqueezy`, keep the unpublished - webhook handler in `packages/mimir-license-webhook`, and never commit API keys or webhook secrets. -- `packages/mimir-app/src/lib/project-registry.ts` owns the app-side local project registry. Store - selected project roots there and derive `.mimir/raw` plus `.mimir/storage`; keep ingest/query/index - truth in Mimir Core through the sidecar/CLI surface. -- The app's watched-folder feature is an opt-in polling layer over `mimir ingest`; do not add + webhook handler in `packages/ragmir-license-webhook`, and never commit API keys or webhook secrets. +- `packages/ragmir-app/src/lib/project-registry.ts` owns the app-side local project registry. Store + selected project roots there and derive `.ragmir/raw` plus `.ragmir/storage`; keep ingest/query/index + truth in Ragmir Core through the sidecar/CLI surface. +- The app's watched-folder feature is an opt-in polling layer over `ragmir ingest`; do not add background daemons unless the plan explicitly changes. The first Google Drive connector is an opt-in local-sync folder flow using Google Drive for desktop files already present on disk; do not add OAuth, Drive API calls, or cloud credentials by default. - Keep optional audio summaries separate from core ingestion/query behavior. The - `mimir-audio-summary` skill must prefer `mimir audio` / `@jcode.labs/mimir-tts`, default to the + `ragmir-audio-summary` skill must prefer `ragmir audio` / `@jcode.labs/ragmir-tts`, default to the Transformers.js WAV path for offline/confidential rendering, use the Edge MP3 path for global Voice Forge quality only when online TTS is explicitly acceptable, and keep generated audio under - ignored local Mimir state. + ignored local Ragmir state. - Keep offline TTS preload explicit: use non-sensitive text for the first remote-model render that - warms `.mimir/models/tts`, pass `--allow-remote-models` only for that preload, then use `--offline` + warms `.ragmir/models/tts`, pass `--allow-remote-models` only for that preload, then use `--offline` for confidential narration. Remote TTS model loading must stay disabled by default. The operational guide lives in `docs/offline-tts-preload.md`. -- Keep report generation separate from core retrieval. The `mimir-markdown-report` skill writes cited - Markdown reports under ignored `.mimir/reports/` by default and must distinguish evidence, +- Keep report generation separate from core retrieval. The `ragmir-markdown-report` skill writes cited + Markdown reports under ignored `.ragmir/reports/` by default and must distinguish evidence, inference, uncertainty, missing documents, and professional-review items. - Keep the public source boundary in `docs/source-boundary.md`: every tracked package is MIT source. Commercial value can gate official signed builds, support, updates, and hosted license delivery, @@ -149,22 +149,22 @@ rules in `docs/payment-webhook-architecture.md`. Do not introduce App Store, Play Store, hosted document storage, committed payment/license secrets, public pricing tests, or customer validation ledgers. -- Ingestion must be explicit about files it did not index. Preserve `mimir audit --unsupported`, +- Ingestion must be explicit about files it did not index. Preserve `ragmir audit --unsupported`, unsupported-extension summaries, secret-like file skipping, max file size limits, and checksum-based stale detection. - Source discovery should include useful dotfiles (for example `.gitignore`, `.gitlab-ci.yml`, and `.vscode/settings.json`) while still ignoring generated/runtime directories and skipping secret-like files explicitly. - OCR and legacy binary extraction are opt-in only. Keep PDF OCR behind `pdfOcrCommand` / - `MIMIR_PDF_OCR_COMMAND`, image OCR behind `imageOcrCommand` / `MIMIR_IMAGE_OCR_COMMAND`, and - legacy `.doc` extraction behind `legacyWordCommand` / `MIMIR_LEGACY_WORD_COMMAND`; execute + `RAGMIR_PDF_OCR_COMMAND`, image OCR behind `imageOcrCommand` / `RAGMIR_IMAGE_OCR_COMMAND`, and + legacy `.doc` extraction behind `legacyWordCommand` / `RAGMIR_LEGACY_WORD_COMMAND`; execute commands without a shell, require stdout text, and do not add heavy OCR/conversion dependencies or claim universal scan/image/binary support. `KB_PDF_OCR_COMMAND` and `KB_IMAGE_OCR_COMMAND` remain legacy aliases only. - Keep the repository as a simple pnpm workspace monorepo. Add Turbo only if multiple packages or apps start needing task caching/orchestration beyond `pnpm --filter`. - The Node.js and Rust versions are each pinned once, in `mise.toml` (via - [mise](https://mise.jdx.dev/)); Rust is only used by `packages/mimir-app`'s Tauri shell. Bump + [mise](https://mise.jdx.dev/)); Rust is only used by `packages/ragmir-app`'s Tauri shell. Bump versions there only, not as a hardcoded `node-version` in individual workflow steps. Run `pnpm bootstrap` (`mise install && pnpm install`) for one-command onboarding. CI (`ci.yml`, `native-app-build.yml`) installs mise with the official `curl https://mise.run | sh` script in a @@ -179,16 +179,16 @@ would create a second source of truth and break the "plain pnpm works without mise" onboarding path. For local dev, contributors activate mise in their shell (`mise activate`) so the pinned Node/Rust land on `PATH` via shims and every `pnpm` script uses the CI toolchain automatically. -- Keep Mimir core free of Ollama. `embeddingProvider: "local-hash"` supports ingestion, search, MCP, +- Keep Ragmir core free of Ollama. `embeddingProvider: "local-hash"` supports ingestion, search, MCP, and cited retrieval without a model server, but it must not be described as equivalent to semantic retrieval. `embeddingProvider: "transformers"` is the optional semantic embedding path. -- Keep `packages/mimir-core/examples/sovereign-rag-demo` synthetic and safe to commit. It exists for +- Keep `packages/ragmir-core/examples/sovereign-rag-demo` synthetic and safe to commit. It exists for package/user testing only; never place real confidential documents there. -- `packages/mimir-core/examples/library-api-demo` is the local library-API smoke (`pnpm example`). It - `import`s `@jcode.labs/mimir` via Node self-referencing so it always exercises the local - `packages/mimir-core/dist` build, never the npm-published package, and it reuses the +- `packages/ragmir-core/examples/library-api-demo` is the local library-API smoke (`pnpm example`). It + `import`s `@jcode.labs/ragmir` via Node self-referencing so it always exercises the local + `packages/ragmir-core/dist` build, never the npm-published package, and it reuses the `sovereign-rag-demo` synthetic corpus rather than adding a second one. Testing local changes must - use this local build (or `node packages/mimir-core/dist/cli.js`), not `npx mimir`, which would + use this local build (or `node packages/ragmir-core/dist/cli.js`), not `npx ragmir`, which would resolve the released npm version. - Use Context7 before changing dependencies or public APIs that rely on external libraries. - Run `pnpm validate` before opening a release pull request or publishing. It covers @@ -197,7 +197,7 @@ - Do not publish from a local machine or direct push to `main`. npm releases must go through the protected `Release npm` GitHub Actions workflow on `main`; semantic-release derives the version from Conventional Commits, prepares both package tarballs, publishes - `@jcode.labs/mimir-tts` first, then publishes `@jcode.labs/mimir`. + `@jcode.labs/ragmir-tts` first, then publishes `@jcode.labs/ragmir`. - Use Git Flow locally: `main` is production, `develop` is integration, feature work starts from `develop` under `feature/*`. Do not deploy or publish from feature branches. @@ -236,7 +236,7 @@ General principles (KISS, DRY, YAGNI, SOLID) as applied in this codebase. Match - No dead or obsolete code. Delete replaced code, unused exports, and commented-out blocks in the same change; a deletion must cover both source and the regenerated package `dist/`. - No magic strings or numbers. Name meaningful literals as constants, and put shared paths, provider - defaults, and ignore constants in `packages/mimir-core/src/defaults.ts` rather than copying them across + defaults, and ignore constants in `packages/ragmir-core/src/defaults.ts` rather than copying them across modules. - Validate at the boundary, narrow inside. Use Zod at external edges (config in `config.ts`, MCP inputs in `mcp.ts`) and CLI parsers (`parsePositiveInt`); trust the types past that point. @@ -250,89 +250,89 @@ General principles (KISS, DRY, YAGNI, SOLID) as applied in this codebase. Match ## Architecture -- `packages/mimir-core` is Mimir Core, published as `@jcode.labs/mimir`. -- `packages/mimir-core/src/cli.ts` exposes the `mimir` CLI and keeps `kb` as a legacy alias. -- The `mimir` CLI supports global `--project-root ` for sidecar/app usage. Prefer it when a +- `packages/ragmir-core` is Ragmir Core, published as `@jcode.labs/ragmir`. +- `packages/ragmir-core/src/cli.ts` exposes the `ragmir` CLI and keeps `kb` as a legacy alias. +- The `ragmir` CLI supports global `--project-root ` for sidecar/app usage. Prefer it when a process cannot or should not change cwd for each selected knowledge base. -- `packages/mimir-core/src/doctor.ts` owns the user-facing readiness diagnosis behind - `mimir doctor`. -- `packages/mimir-core/src/config.ts` resolves `.mimir/config.json` from the target repository and +- `packages/ragmir-core/src/doctor.ts` owns the user-facing readiness diagnosis behind + `ragmir doctor`. +- `packages/ragmir-core/src/config.ts` resolves `.ragmir/config.json` from the target repository and falls back to legacy `.kb/config.json` when present. -- `packages/mimir-core/src/defaults.ts` owns shared default paths, provider defaults, and generated-state ignore +- `packages/ragmir-core/src/defaults.ts` owns shared default paths, provider defaults, and generated-state ignore constants. Keep config/init/security/gitignore aligned through this module instead of copying literals. -- `packages/mimir-core/src/sources.ts` owns the `.mimir/sources.txt` management API used by - `mimir sources add/list`; file discovery itself remains in `files.ts`. -- `packages/mimir-core/src/skill.ts` owns agent skill installation and the per-agent - `agentHelpers`/MCP config generation (`AgentHelperFile`) behind `mimir setup` and - `mimir install-skill`/`install-agent`. Add a new agent target through `SUPPORTED_AGENT_TARGETS` +- `packages/ragmir-core/src/sources.ts` owns the `.ragmir/sources.txt` management API used by + `ragmir sources add/list`; file discovery itself remains in `files.ts`. +- `packages/ragmir-core/src/skill.ts` owns agent skill installation and the per-agent + `agentHelpers`/MCP config generation (`AgentHelperFile`) behind `ragmir setup` and + `ragmir install-skill`/`install-agent`. Add a new agent target through `SUPPORTED_AGENT_TARGETS` and its helper builder here, not by hand-listing agents in `cli.ts`. -- `packages/mimir-core/src/ingest.ts` parses supported files, chunks text, embeds chunks, and rebuilds the +- `packages/ragmir-core/src/ingest.ts` parses supported files, chunks text, embeds chunks, and rebuilds the local LanceDB table. Normal ingest is incremental and reuses rows whose checksum/provider/model still match; `--rebuild` forces a full re-index. -- `packages/mimir-core/src/parsing.ts` uses proven parsers for high-risk Office formats: +- `packages/ragmir-core/src/parsing.ts` uses proven parsers for high-risk Office formats: Mammoth for `.docx` and read-excel-file for `.xlsx`. Keep the lightweight XML ZIP parser for `.pptx`, OpenDocument, and EPUB unless tests show fidelity gaps. Legacy `.xls` workbooks are not supported by default; convert them to `.xlsx`, CSV, PDF, HTML, or text before ingesting. -- `packages/mimir-core/src/query.ts` performs hybrid retrieval (vector candidates plus bounded lexical - BM25 scoring) and returns cited retrieval context; LLM synthesis belongs outside Mimir core. -- `packages/mimir-core/src/research.ts` runs the audit-backed multi-query research pass behind - `mimir research`, combining `query.ts` search results with `ingest.ts` audit coverage. -- `packages/mimir-core/src/evaluate.ts` scores retrieval recall against a golden query file behind - `mimir evaluate`, for the local recall gate described above. -- `packages/mimir-core/src/mcp.ts` exposes Mimir as an MCP stdio server for agents. -- `packages/mimir-tts` is the standalone TTS package used by `mimir audio`; it uses `edge-tts` for +- `packages/ragmir-core/src/query.ts` performs hybrid retrieval (vector candidates plus bounded lexical + BM25 scoring) and returns cited retrieval context; LLM synthesis belongs outside Ragmir core. +- `packages/ragmir-core/src/research.ts` runs the audit-backed multi-query research pass behind + `ragmir research`, combining `query.ts` search results with `ingest.ts` audit coverage. +- `packages/ragmir-core/src/evaluate.ts` scores retrieval recall against a golden query file behind + `ragmir evaluate`, for the local recall gate described above. +- `packages/ragmir-core/src/mcp.ts` exposes Ragmir as an MCP stdio server for agents. +- `packages/ragmir-tts` is the standalone TTS package used by `ragmir audio`; it uses `edge-tts` for high-quality MP3 when available and Transformers.js for offline WAV rendering. -- `packages/mimir-ui` owns shared React UI primitives and Tailwind theme tokens used by Mimir +- `packages/ragmir-ui` owns shared React UI primitives and Tailwind theme tokens used by Ragmir product surfaces. -- `packages/mimir-landing` owns the static Astro landing page. -- `packages/mimir-app` owns the Tauri app shell for desktop and mobile. -- `packages/mimir-license-webhook` owns the unpublished MIT-licensed Cloudflare Worker handler for - Lemon Squeezy webhook signature verification, KV-backed idempotency records, and local `MIMIR1` +- `packages/ragmir-landing` owns the static Astro landing page. +- `packages/ragmir-app` owns the Tauri app shell for desktop and mobile. +- `packages/ragmir-license-webhook` owns the unpublished MIT-licensed Cloudflare Worker handler for + Lemon Squeezy webhook signature verification, KV-backed idempotency records, and local `RAGMIR1` license issuance. It must stay undeployed until real provider variants, secrets, storage/idempotency, and a release surface exist. Its `wrangler.jsonc` must keep placeholder KV namespace IDs until real Cloudflare resources are provisioned; use `cf:dry-run` only before protected deployment. -- The app integrates Mimir Core through the existing `mimir` CLI/MCP surface. Keep the sidecar +- The app integrates Ragmir Core through the existing `ragmir` CLI/MCP surface. Keep the sidecar decision and command allowlist in `docs/app-sidecar-architecture.md`; the current native bridge is - the bounded `run_mimir_command` Tauri command, and `externalBin` stays deferred until real platform + the bounded `run_ragmir_command` Tauri command, and `externalBin` stays deferred until real platform sidecar binaries exist. -- `packages/mimir-core/src/gitignore.ts` owns target-repository `.gitignore` entries for local generated Mimir +- `packages/ragmir-core/src/gitignore.ts` owns target-repository `.gitignore` entries for local generated Ragmir state. -- `packages/mimir-core/src/security.ts`, `packages/mimir-core/src/redaction.ts`, and - `packages/mimir-core/src/access-log.ts` own the +- `packages/ragmir-core/src/security.ts`, `packages/ragmir-core/src/redaction.ts`, and + `packages/ragmir-core/src/access-log.ts` own the privacy and confidentiality hardening layer. -- `packages/mimir-core/skills/mimir/SKILL.md` is the bundled portable agent skill. -- `packages/mimir-core/skills/mimir-audio-summary/SKILL.md` is the optional bundled audio-summary skill. -- `packages/mimir-core/skills/mimir-markdown-report/SKILL.md` is the optional bundled Markdown-report +- `packages/ragmir-core/skills/ragmir/SKILL.md` is the bundled portable agent skill. +- `packages/ragmir-core/skills/ragmir-audio-summary/SKILL.md` is the optional bundled audio-summary skill. +- `packages/ragmir-core/skills/ragmir-markdown-report/SKILL.md` is the optional bundled Markdown-report skill. -- `mimir setup` must keep generating agent-specific MCP helpers for easy local use by default: - `.mimir/claude-mcp-server.json` for `claude mcp add-json`, `.mimir/codex-mcp.toml` for Codex - config layers, `.mimir/kimi-mcp.json` for Kimi, `.mimir/opencode.jsonc` for OpenCode, and - `.mimir/cline-mcp.json` for Cline. Keep `--agents` available on setup/install-skill so a target +- `ragmir setup` must keep generating agent-specific MCP helpers for easy local use by default: + `.ragmir/claude-mcp-server.json` for `claude mcp add-json`, `.ragmir/codex-mcp.toml` for Codex + config layers, `.ragmir/kimi-mcp.json` for Kimi, `.ragmir/opencode.jsonc` for OpenCode, and + `.ragmir/cline-mcp.json` for Cline. Keep `--agents` available on setup/install-skill so a target repository can generate only the helpers it uses and remove stale unselected helpers. -- `mimir setup --semantic` is the first-run opt-in path for higher-quality semantic retrieval. It +- `ragmir setup --semantic` is the first-run opt-in path for higher-quality semantic retrieval. It may download the configured Transformers.js embedding model once, then must leave `transformersAllowRemoteModels` false for normal confidential indexing. - Keep `--mcp-name`, `--mcp-command`, and repeatable `--mcp-arg` available on setup/install-skill so repositories can generate MCP helper files for a stable server name or local wrapper script - without post-processing `.mimir/`. -- `mimir install-agent` owns native skill discovery for the main supported coding agents. Keep + without post-processing `.ragmir/`. +- `ragmir install-agent` owns native skill discovery for the main supported coding agents. Keep `--agents claude|codex|kimi|opencode|cline` targeted so a user can install only the agent they use, with project scope by default and user scope available through `--scope user`. -- Keep `.mimir/skills/` as the canonical skill source in target repositories. Native agent folders - created by `mimir install-agent` should link to that source by default; use copy mode only as a +- Keep `.ragmir/skills/` as the canonical skill source in target repositories. Native agent folders + created by `ragmir install-agent` should link to that source by default; use copy mode only as a compatibility fallback for runtimes or filesystems that cannot follow symlinks. -- `packages/mimir-core/examples/sovereign-rag-demo` is the tracked synthetic test workspace for manual +- `packages/ragmir-core/examples/sovereign-rag-demo` is the tracked synthetic test workspace for manual and package validation. -- `.mimir/`, `.claude/`, `.codex/`, and `.agents/` are local user data or generated agent state in +- `.ragmir/`, `.claude/`, `.codex/`, and `.agents/` are local user data or generated agent state in target repositories and must not be committed. Legacy `.kb/` and project `private/` folders must also stay uncommitted when encountered. # GitNexus — Code Intelligence -This project is indexed by GitNexus as **jcode-mimir** (2829 symbols, 4724 relationships, 241 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. +This project is indexed by GitNexus as **jcode-ragmir** (2829 symbols, 4724 relationships, 241 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. > If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. @@ -355,10 +355,10 @@ This project is indexed by GitNexus as **jcode-mimir** (2829 symbols, 4724 relat | Resource | Use for | |----------|---------| -| `gitnexus://repo/jcode-mimir/context` | Codebase overview, check index freshness | -| `gitnexus://repo/jcode-mimir/clusters` | All functional areas | -| `gitnexus://repo/jcode-mimir/processes` | All execution flows | -| `gitnexus://repo/jcode-mimir/process/{name}` | Step-by-step execution trace | +| `gitnexus://repo/jcode-ragmir/context` | Codebase overview, check index freshness | +| `gitnexus://repo/jcode-ragmir/clusters` | All functional areas | +| `gitnexus://repo/jcode-ragmir/processes` | All execution flows | +| `gitnexus://repo/jcode-ragmir/process/{name}` | Step-by-step execution trace | ## CLI diff --git a/CHANGELOG.md b/CHANGELOG.md index 32452c2..5338478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,14 +3,14 @@ ## 0.4.2 - 2026-06-29 - Add `kb doctor` to diagnose initialization, index freshness, security posture, and next steps. -- Make `kb audio` and `mimir-tts` default to the offline/confidential Transformers.js WAV path; +- Make `kb audio` and `ragmir-tts` default to the offline/confidential Transformers.js WAV path; Edge MP3 now requires an explicit `--engine edge` command. - Stop indexing the generated `private/README.md` helper file created by `kb init`. - Improve onboarding output from `kb init` and `kb install-skill`. ## 0.4.1 - 2026-06-29 -- Add an Edge-compatible Mimir TTS engine so `kb audio` can match the global Voice Forge quality +- Add an Edge-compatible Ragmir TTS engine so `kb audio` can match the global Voice Forge quality path with `edge-tts`, `fr-FR-DeniseNeural`, and MP3 output. - Keep Transformers.js WAV rendering as the explicit offline/confidential path. - Remove duplicated governance documents from package directories; root project docs are the single @@ -18,21 +18,21 @@ ## 0.4.0 - 2026-06-28 -- Reposition Mimir as sovereign local RAG for confidential datasets and AI agents. +- Reposition Ragmir as sovereign local RAG for confidential datasets and AI agents. - Expand default ingestion to common text, Office/OpenDocument, data, config, log, and source-code file types. - Add `includeExtensions` / `KB_INCLUDE_EXTENSIONS` for custom UTF-8 text file extensions. -- Add the optional `mimir-audio-summary` bundled skill for confidential audio summaries. -- Install both the main Mimir skill and optional audio-summary skill with `kb install-skill`. +- Add the optional `ragmir-audio-summary` bundled skill for confidential audio summaries. +- Install both the main Ragmir skill and optional audio-summary skill with `kb install-skill`. - Improve agent guidance for deep multi-query retrieval before synthesis. -- Make Mimir core retrieval-only: `kb ask` now returns cited context for external agents or LLMs +- Make Ragmir core retrieval-only: `kb ask` now returns cited context for external agents or LLMs instead of generating answers internally. - Add optional Transformers.js semantic embeddings through `embeddingProvider: "transformers"`. - Remove Ollama providers and keep `embeddingProvider: "local-hash"` as the no-model default. - Move the repository to a simple pnpm workspace monorepo without adding Turbo. -- Move the core `@jcode.labs/mimir` package into `packages/mimir-core`. -- Add `@jcode.labs/mimir-tts` for plug-and-play JS/ONNX WAV rendering without Python or ffmpeg. -- Add `kb audio` and update the audio-summary skill to use Mimir TTS before advanced fallback +- Move the core `@jcode.labs/ragmir` package into `packages/ragmir-core`. +- Add `@jcode.labs/ragmir-tts` for plug-and-play JS/ONNX WAV rendering without Python or ffmpeg. +- Add `kb audio` and update the audio-summary skill to use Ragmir TTS before advanced fallback engines. ## 0.3.0 - 2026-06-28 @@ -49,15 +49,15 @@ - Add GitHub Sponsors funding metadata and document suggested sponsor tiers. - Add maintainer positioning for Jean-Baptiste Thery and JCode Labs in the README. -- Make `kb init` and `kb install-skill` automatically keep `.kb/` and `.mimir/` +- Make `kb init` and `kb install-skill` automatically keep `.kb/` and `.ragmir/` ignored by Git. ## 0.2.0 - 2026-06-28 -- Rename public product branding to Mimir while keeping the JCode Labs npm scope. -- Add the bundled portable `mimir` agent skill. -- Add the MCP stdio server with `mimir_status`, `mimir_search`, `mimir_ask`, and - `mimir_audit`. +- Rename public product branding to Ragmir while keeping the JCode Labs npm scope. +- Add the bundled portable `ragmir` agent skill. +- Add the MCP stdio server with `ragmir_status`, `ragmir_search`, `ragmir_ask`, and + `ragmir_audit`. - Add production smoke coverage for the built CLI and MCP server. - Add Biome, commitlint, publint, CodeQL, Dependabot grouping, protected npm publishing, and open-source contribution/security documentation. diff --git a/CLAUDE.md b/CLAUDE.md index 5d3008f..9d09b69 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,7 +19,7 @@ Guardrails" in `AGENTS.md`. ```bash pnpm bootstrap # mise install (pinned Node/Rust) && pnpm install -pnpm build # builds UI, app frontend, landing, TTS, then Mimir Core +pnpm build # builds UI, app frontend, landing, TTS, then Ragmir Core pnpm check # typecheck UI/app/landing/TTS/core pnpm dev:app # run the Vite frontend for the Tauri shell pnpm dev:landing # run the Astro landing locally @@ -27,64 +27,64 @@ pnpm example # build core + run the library-API smoke against the loc pnpm lint # Biome CI (format + lint check, no writes) pnpm lint:fix # Biome auto-fix pnpm format # Biome format --write -pnpm test # vitest run for packages/mimir-tts, then packages/mimir-core +pnpm test # vitest run for packages/ragmir-tts, then packages/ragmir-core pnpm smoke # build production CLI + MCP smoke test (scripts/smoke.mjs) pnpm audit:security # dependency security audit at moderate severity and above pnpm release:semantic:smoke # checks semantic-release config and monorepo publish scripts without publishing pnpm validate # full release gate: lint + audit + check + test + build + smoke + package:check + semantic release smoke + release:artifacts ``` -Run a single core test file: `pnpm --filter @jcode.labs/mimir exec vitest run src/config.test.ts` -Run a single core test by name: `pnpm --filter @jcode.labs/mimir exec vitest run -t "applies env overrides"` -Run only the TTS package tests: `pnpm --filter @jcode.labs/mimir-tts test` +Run a single core test file: `pnpm --filter @jcode.labs/ragmir exec vitest run src/config.test.ts` +Run a single core test by name: `pnpm --filter @jcode.labs/ragmir exec vitest run -t "applies env overrides"` +Run only the TTS package tests: `pnpm --filter @jcode.labs/ragmir-tts test` Tests are colocated as `packages/*/src/*.test.ts` and run on the TypeScript sources. ## Committed `dist/` — critical -`packages/mimir-core/dist/` and `packages/mimir-tts/dist/` are checked into Git. CI enforces -`git diff --exit-code -- packages/mimir-core/dist packages/mimir-tts/dist`. After any change under -`packages/mimir-core/src/` or `packages/mimir-tts/src/`, run `pnpm build` and commit the regenerated +`packages/ragmir-core/dist/` and `packages/ragmir-tts/dist/` are checked into Git. CI enforces +`git diff --exit-code -- packages/ragmir-core/dist packages/ragmir-tts/dist`. After any change under +`packages/ragmir-core/src/` or `packages/ragmir-tts/src/`, run `pnpm build` and commit the regenerated output in the same commit, or CI fails. This is the single easiest mistake to make in this repo. -`packages/mimir-app/dist/` and `packages/mimir-landing/dist/` are build artifacts and stay ignored. +`packages/ragmir-app/dist/` and `packages/ragmir-landing/dist/` are build artifacts and stay ignored. ## Naming map (the package has several names on purpose) -- Product name: **Mimir** on the landing, app, README title, and user-facing copy. -- Core package: **Mimir Core**, published as `@jcode.labs/mimir` from `packages/mimir-core`. -- TTS package: **Mimir TTS**, published as `@jcode.labs/mimir-tts`. -- UI package: **Mimir UI**, unpublished workspace package `@jcode.labs/mimir-ui`. -- Landing package: unpublished workspace package `@jcode.labs/mimir-landing`. -- App package: unpublished workspace package `@jcode.labs/mimir-app`. -- CLI binary: **`mimir`** (`packages/mimir-core/bin.mimir` -> `packages/mimir-core/dist/cli.js`). +- Product name: **Ragmir** on the landing, app, README title, and user-facing copy. +- Core package: **Ragmir Core**, published as `@jcode.labs/ragmir` from `packages/ragmir-core`. +- TTS package: **Ragmir TTS**, published as `@jcode.labs/ragmir-tts`. +- UI package: **Ragmir UI**, unpublished workspace package `@jcode.labs/ragmir-ui`. +- Landing package: unpublished workspace package `@jcode.labs/ragmir-landing`. +- App package: unpublished workspace package `@jcode.labs/ragmir-app`. +- CLI binary: **`ragmir`** (`packages/ragmir-core/bin.ragmir` -> `packages/ragmir-core/dist/cli.js`). The `kb` binary remains only as a legacy compatibility alias. Commands: `init`, `setup`, `ingest`, `sources add`, `sources list`, `models pull`, `search`, `ask`, `research`, `evaluate`, `audit`, `usage-report`, `status`, `security-audit`, `destroy-index`, `audio`, `doctor`, `serve-mcp`, `skill-path`, `install-skill`, `install-agent`. -- TTS CLI binary: **`mimir-tts`** (`packages/mimir-tts/dist/cli.js`). Commands: `doctor`, `render`. -- Project config/state in the target repo: **`.mimir/`** (`config.json`, `sources.txt`, `raw/`, +- TTS CLI binary: **`ragmir-tts`** (`packages/ragmir-tts/dist/cli.js`). Commands: `doctor`, `render`. +- Project config/state in the target repo: **`.ragmir/`** (`config.json`, `sources.txt`, `raw/`, `storage/`, `access.log`, `skills/`, reports, audio, and model caches). **`.kb/`** and **`private/`** are legacy compatibility paths only. -- Environment overrides: **`MIMIR_*`** (e.g. `MIMIR_EMBEDDING_PROVIDER`, `MIMIR_CHUNK_SIZE`). +- Environment overrides: **`RAGMIR_*`** (e.g. `RAGMIR_EMBEDDING_PROVIDER`, `RAGMIR_CHUNK_SIZE`). **`KB_*`** aliases remain only for existing automation. -- MCP tools exposed to agents: **`mimir_*`** (`mimir_status`, `mimir_search`, `mimir_ask`, - `mimir_research`, `mimir_audit`, `mimir_evaluate`, `mimir_usage_report`, - `mimir_security_audit`). +- MCP tools exposed to agents: **`ragmir_*`** (`ragmir_status`, `ragmir_search`, `ragmir_ask`, + `ragmir_research`, `ragmir_audit`, `ragmir_evaluate`, `ragmir_usage_report`, + `ragmir_security_audit`). ## Architecture and data flow -This is a pnpm workspace monorepo. `packages/mimir-core` and `packages/mimir-tts` are the published -npm packages. `packages/mimir-ui`, `packages/mimir-landing`, and `packages/mimir-app` are +This is a pnpm workspace monorepo. `packages/ragmir-core` and `packages/ragmir-tts` are the published +npm packages. `packages/ragmir-ui`, `packages/ragmir-landing`, and `packages/ragmir-app` are unpublished workspace packages for product surfaces. Do not add Turbo unless `pnpm --filter` stops being enough. -`@jcode.labs/mimir` depends on `@jcode.labs/mimir-tts` (`workspace:*`), so release builds still keep +`@jcode.labs/ragmir` depends on `@jcode.labs/ragmir-tts` (`workspace:*`), so release builds still keep TTS and core in sync. The core package is an ESM-only TypeScript library + CLI + MCP server. Same core, three entry -points: `packages/mimir-core/src/cli.ts` (commander), `packages/mimir-core/src/index.ts` (public library -exports), `packages/mimir-core/src/mcp.ts` (stdio MCP server). +points: `packages/ragmir-core/src/cli.ts` (commander), `packages/ragmir-core/src/index.ts` (public library +exports), `packages/ragmir-core/src/mcp.ts` (stdio MCP server). -The ingest pipeline (`packages/mimir-core/src/ingest.ts`) chains single-responsibility modules: +The ingest pipeline (`packages/ragmir-core/src/ingest.ts`) chains single-responsibility modules: `files.ts` (discover supported files via fast-glob, with sha256 checksums) → `parsing.ts` (extract text per format: PDF/Office/HTML/etc.) → `redaction.ts` (strip secrets/PII *before* anything is embedded) → @@ -93,34 +93,34 @@ The ingest pipeline (`packages/mimir-core/src/ingest.ts`) chains single-responsi candidates with bounded lexical BM25 scoring, and `ask` returns cited passages only (no LLM synthesis in core). -`packages/mimir-tts` is a separate ESM package. It defaults to Transformers.js for offline WAV +`packages/ragmir-tts` is a separate ESM package. It defaults to Transformers.js for offline WAV rendering without Python or ffmpeg, and uses `edge-tts` for high-quality MP3 only when explicitly -requested. Core `mimir audio` imports it dynamically. +requested. Core `ragmir audio` imports it dynamically. -`packages/mimir-ui` is the shared Tailwind 4 + React UI layer adapted from the WorkoutGen UI/landing -foundation, but with Mimir tokens and no WorkoutGen product copy, analytics, CDN paths, or secrets. -`packages/mimir-landing` is an Astro static site using that UI package. `packages/mimir-app` is a +`packages/ragmir-ui` is the shared Tailwind 4 + React UI layer adapted from the WorkoutGen UI/landing +foundation, but with Ragmir tokens and no WorkoutGen product copy, analytics, CDN paths, or secrets. +`packages/ragmir-landing` is an Astro static site using that UI package. `packages/ragmir-app` is a Tauri v2 shell using the same UI package; root build validates its Vite frontend, while native Tauri -desktop/mobile builds are explicit `pnpm --filter @jcode.labs/mimir-app tauri:*` commands. +desktop/mobile builds are explicit `pnpm --filter @jcode.labs/ragmir-app tauri:*` commands. Key behaviors to keep in mind before editing: - **Config resolution is caller-relative.** `loadConfig` walks up from `cwd` looking for - `.mimir/config.json`, with fallback to legacy `.kb/config.json`. The package must resolve project + `.ragmir/config.json`, with fallback to legacy `.kb/config.json`. The package must resolve project data from the caller's working directory, never from its own install path. Zod validates config; - `MIMIR_*` env vars override, with `KB_*` kept as legacy aliases. + `RAGMIR_*` env vars override, with `KB_*` kept as legacy aliases. - **Two embedding providers, not interchangeable at runtime.** `local-hash` (default) is a 384-dim sha256 lexical embedding — fully offline, no model, *not semantic*. `transformers` lazily - `import()`s `@huggingface/transformers` with `allowRemoteModels` off by default. `mimir models pull` - and `mimir setup --semantic` are the explicit one-time remote-download paths for preloading the + `import()`s `@huggingface/transformers` with `allowRemoteModels` off by default. `ragmir models pull` + and `ragmir setup --semantic` are the explicit one-time remote-download paths for preloading the configured embedding model. The two providers produce different vectors, so **switching providers - requires `mimir ingest --rebuild`**. + requires `ragmir ingest --rebuild`**. - **Ingest is incremental by default.** It reuses rows whose checksum, embedding provider, and model still match, then overwrites the LanceDB table with reused + rebuilt rows. Use `--rebuild` to force every supported file through parsing, redaction, chunking, and embedding again. - **Privacy is a feature, not a side effect.** Redaction runs before embedding, the access log stores query hashes/metadata only (`access-log.ts`), MCP top-K is clamped to `mcpMaxTopK`, and - `gitignore.ts` keeps `.mimir/` ignored in target repos. `security-audit` also preserves legacy + `gitignore.ts` keeps `.ragmir/` ignored in target repos. `security-audit` also preserves legacy warnings when a project still uses `.kb/` or `private/**`. Preserve these guarantees. Coding conventions (KISS, DRY, YAGNI, SOLID as applied here) live in `AGENTS.md`. @@ -135,12 +135,12 @@ Coding conventions (KISS, DRY, YAGNI, SOLID as applied here) live in `AGENTS.md` - Conventional Commits are enforced by commitlint in CI. Release policy (no local publish, no direct push to `main`, protected semantic-release workflow) -lives in `AGENTS.md`. The workflow publishes `@jcode.labs/mimir-tts` before `@jcode.labs/mimir`. +lives in `AGENTS.md`. The workflow publishes `@jcode.labs/ragmir-tts` before `@jcode.labs/ragmir`. # GitNexus — Code Intelligence -This project is indexed by GitNexus as **jcode-mimir** (2829 symbols, 4724 relationships, 241 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. +This project is indexed by GitNexus as **jcode-ragmir** (2829 symbols, 4724 relationships, 241 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. > If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. @@ -163,10 +163,10 @@ This project is indexed by GitNexus as **jcode-mimir** (2829 symbols, 4724 relat | Resource | Use for | |----------|---------| -| `gitnexus://repo/jcode-mimir/context` | Codebase overview, check index freshness | -| `gitnexus://repo/jcode-mimir/clusters` | All functional areas | -| `gitnexus://repo/jcode-mimir/processes` | All execution flows | -| `gitnexus://repo/jcode-mimir/process/{name}` | Step-by-step execution trace | +| `gitnexus://repo/jcode-ragmir/context` | Codebase overview, check index freshness | +| `gitnexus://repo/jcode-ragmir/clusters` | All functional areas | +| `gitnexus://repo/jcode-ragmir/processes` | All execution flows | +| `gitnexus://repo/jcode-ragmir/process/{name}` | Step-by-step execution trace | ## CLI diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3146584..6e57fac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,11 @@ # Contributing -Mimir is an open-source project under the MIT License. Issues and pull requests are welcome. +Ragmir is an open-source project under the MIT License. Issues and pull requests are welcome. ## Development This repo pins its Node.js and Rust versions with [mise](https://mise.jdx.dev/) (see `mise.toml`), -the same versions CI uses; Rust is only needed if you're working on `packages/mimir-app`'s Tauri +the same versions CI uses; Rust is only needed if you're working on `packages/ragmir-app`'s Tauri shell. Install mise, then run the single onboarding command: ```bash @@ -25,9 +25,9 @@ version pinner, not a task runner (see `AGENTS.md`). `pnpm validate` runs Biome, a dependency security audit, TypeScript, Vitest, the production CLI/MCP smoke test, and npm package metadata checks. -To smoke-test the library API against your local build while developing Mimir Core, run +To smoke-test the library API against your local build while developing Ragmir Core, run `pnpm example` (see -[`packages/mimir-core/examples/library-api-demo`](./packages/mimir-core/examples/library-api-demo)). +[`packages/ragmir-core/examples/library-api-demo`](./packages/ragmir-core/examples/library-api-demo)). Run the security audit alone with: @@ -44,7 +44,7 @@ pnpm audit:security - Use `hotfix/` branches from `main` for urgent production fixes, then back-merge the fix into `develop`. - Keep changes focused and include tests or smoke coverage for behavior changes. -- Do not commit private documents, generated vector stores, generated `.mimir/` state, environment +- Do not commit private documents, generated vector stores, generated `.ragmir/` state, environment files, tokens, credentials, customer ledgers, pricing tests, or interview notes. - Use conventional commit messages such as `feat: add source parser` or `fix: handle empty index`. diff --git a/README.md b/README.md index de6c5ac..9ed3335 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,48 @@ -# Mimir +# Ragmir -[![CI](https://github.com/jcode-works/jcode-mimir/actions/workflows/ci.yml/badge.svg)](https://github.com/jcode-works/jcode-mimir/actions/workflows/ci.yml) -[![CodeQL](https://github.com/jcode-works/jcode-mimir/actions/workflows/codeql.yml/badge.svg)](https://github.com/jcode-works/jcode-mimir/actions/workflows/codeql.yml) -[![npm](https://img.shields.io/npm/v/@jcode.labs/mimir)](https://www.npmjs.com/package/@jcode.labs/mimir) -[![npm downloads](https://img.shields.io/npm/dm/@jcode.labs/mimir?label=downloads%2Fmonth)](https://www.npmjs.com/package/@jcode.labs/mimir) -[![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jcode-works/jcode-mimir/blob/main/LICENSE) +[![CI](https://github.com/jcode-works/jcode-ragmir/actions/workflows/ci.yml/badge.svg)](https://github.com/jcode-works/jcode-ragmir/actions/workflows/ci.yml) +[![CodeQL](https://github.com/jcode-works/jcode-ragmir/actions/workflows/codeql.yml/badge.svg)](https://github.com/jcode-works/jcode-ragmir/actions/workflows/codeql.yml) +[![npm](https://img.shields.io/npm/v/@jcode.labs/ragmir)](https://www.npmjs.com/package/@jcode.labs/ragmir) +[![npm downloads](https://img.shields.io/npm/dm/@jcode.labs/ragmir?label=downloads%2Fmonth)](https://www.npmjs.com/package/@jcode.labs/ragmir) +[![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jcode-works/jcode-ragmir/blob/main/LICENSE) -Open-source local RAG library, CLI, and MCP server. Mimir indexes your specs, docs, and code +Open-source local RAG library, CLI, and MCP server. Ragmir indexes your specs, docs, and code locally and gives your AI agents only the useful cited passages, over MCP, without burning tokens on your whole repo. Build from your requirements, keep everything on your machine, and let Claude, Codex, Kimi, -OpenCode, Cline, or any MCP client answer from your real sources. Mimir installs into any Node.js +OpenCode, Cline, or any MCP client answer from your real sources. Ragmir installs into any Node.js repository, stores vectors locally with LanceDB, and runs fully offline by default, with built-in local-hash retrieval or optional Transformers.js semantic embeddings. -Mimir Core returns cited retrieval context. Answer synthesis belongs to the AI agent, LLM, or local +Ragmir Core returns cited retrieval context. Answer synthesis belongs to the AI agent, LLM, or local model runtime you choose around it, so every answer stays grounded in your real evidence. Created by Jean-Baptiste Thery and published under the JCode Labs npm scope. ## Developer Use Cases -Mimir is designed for agent-assisted development when the useful context is local, private, and +Ragmir is designed for agent-assisted development when the useful context is local, private, and spread across repositories, specifications, exports, and synced folders. | Use case | What it enables | | --- | --- | | Index a repository's documentation | Ask Claude Code, Codex, Kimi Code CLI, OpenCode, Cline, or another agent to implement features from local README files, architecture notes, API contracts, ADRs, and runbooks. | | Code from a specification or `cahier des charges` | Turn a local PRD, tender response, client brief, or engineering spec into an implementation plan, acceptance checklist, and cited change guidance. | -| Work from a downloaded Google Drive folder | Point Mimir at files synced locally through Google Drive for desktop, then let the agent retrieve context without uploading the corpus to a hosted RAG service. | +| Work from a downloaded Google Drive folder | Point Ragmir at files synced locally through Google Drive for desktop, then let the agent retrieve context without uploading the corpus to a hosted RAG service. | | Onboard to a legacy codebase | Ask where a flow is implemented, which modules own a responsibility, which docs explain a behavior, and what to read before changing risky code. | -| Turn a dense document into a listenable mini-learning | Generate a short spoken summary (MP3/WAV) from cited passages with `mimir audio`, to review a spec, architecture doc, or research pass hands-free instead of only reading dense text. | +| Turn a dense document into a listenable mini-learning | Generate a short spoken summary (MP3/WAV) from cited passages with `ragmir audio`, to review a spec, architecture doc, or research pass hands-free instead of only reading dense text. | | Keep multiple agents on the same evidence | Install the same project skills and MCP server for Claude Code, Codex, Kimi Code CLI, OpenCode, and Cline so each tool retrieves from the same local index. | | Research before implementation | Run an audit-backed multi-query pass over specs, docs, and code references before asking an agent to plan a feature, migration, or review. | | Prepare implementation and review work | Generate cited task breakdowns, migration notes, release checklists, QA plans, and code-review context from the same local sources the team uses. | | Audit local knowledge coverage | Check which supported files were indexed, which formats were skipped, whether secrets are likely present, and whether golden queries still retrieve expected evidence. | -The workflow stays simple: keep files on disk, run `mimir ingest`, connect your coding agent through +The workflow stays simple: keep files on disk, run `ragmir ingest`, connect your coding agent through MCP or portable skills, then ask it to work from cited local passages. ## At A Glance -Mimir is the local evidence layer for AI agents: put documents in a repository, index them locally, +Ragmir is the local evidence layer for AI agents: put documents in a repository, index them locally, then let your CLI, MCP-compatible agent, or bundled skills retrieve cited passages without uploading the corpus to a hosted RAG service. @@ -50,13 +50,13 @@ the corpus to a hosted RAG service. flowchart TD subgraph Workspace["Your repository"] Docs["Local files
docs, specs, code, PDFs"] - Config[".mimir/config.json
.mimir/raw/"] - Index[".mimir/storage
local LanceDB index"] + Config[".ragmir/config.json
.ragmir/raw/"] + Index[".ragmir/storage
local LanceDB index"] end - subgraph Mimir["Mimir Core"] - Ingest["mimir ingest
parse, redact, chunk"] - Retrieve["mimir search / ask / research
rank cited evidence"] + subgraph Ragmir["Ragmir Core"] + Ingest["ragmir ingest
parse, redact, chunk"] + Retrieve["ragmir search / ask / research
rank cited evidence"] Audit["doctor, audit,
security-audit, evaluate"] end @@ -78,32 +78,32 @@ flowchart TD MCP --> LLM ``` -The fastest useful path is to install Mimir in the repository, wire it into the coding agent you +The fastest useful path is to install Ragmir in the repository, wire it into the coding agent you already use, then ask that agent questions grounded in local files: ```bash -npm install --save-dev @jcode.labs/mimir -npx mimir setup +npm install --save-dev @jcode.labs/ragmir +npx ragmir setup # Optional: download a Transformers.js embedding model once and enable higher-quality semantic retrieval. -npx mimir setup --semantic -npx mimir install-agent --agents claude,codex,kimi,opencode,cline -npx mimir doctor --fix -npx mimir research "release readiness and risks" --compact +npx ragmir setup --semantic +npx ragmir install-agent --agents claude,codex,kimi,opencode,cline +npx ragmir doctor --fix +npx ragmir research "release readiness and risks" --compact # Claude Code -claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)" +claude mcp add-json --scope local ragmir "$(cat .ragmir/claude-mcp-server.json)" # Codex -cat .mimir/codex-mcp.toml +cat .ragmir/codex-mcp.toml # Kimi Code CLI -kimi --mcp-config-file .mimir/kimi-mcp.json +kimi --mcp-config-file .ragmir/kimi-mcp.json # OpenCode -cat .mimir/opencode.jsonc +cat .ragmir/opencode.jsonc # Cline -cat .mimir/cline-mcp.json +cat .ragmir/cline-mcp.json ``` Use it when an agent needs grounded context over private specs, codebases, legal dossiers, tenders, @@ -115,18 +115,18 @@ This root README is the canonical product documentation for the public npm packa | Package | Role | | --- | --- | -| `@jcode.labs/mimir` | Mimir Core: CLI, library, MCP server, bundled agent skills, and synthetic examples. | -| `@jcode.labs/mimir-tts` | Mimir add-on for Edge-quality MP3 and offline Transformers.js WAV rendering through `mimir audio`. | -| `@jcode.labs/mimir-ui` | Unpublished workspace UI package adapted from the WorkoutGen design foundation for Mimir surfaces. | -| `@jcode.labs/mimir-landing` | Unpublished Astro static landing package. Product-facing titles stay `Mimir`. | -| `@jcode.labs/mimir-app` | Unpublished Tauri desktop/mobile shell package. Native builds are explicit app commands. Core integration uses a bounded native command around the `mimir` CLI, with packaged sidecar distribution still planned. | -| `@jcode.labs/mimir-license-webhook` | Unpublished, undeployed MIT-licensed Cloudflare Worker handler for future Lemon Squeezy webhooks and local `MIMIR1` license issuance. | +| `@jcode.labs/ragmir` | Ragmir Core: CLI, library, MCP server, bundled agent skills, and synthetic examples. | +| `@jcode.labs/ragmir-tts` | Ragmir add-on for Edge-quality MP3 and offline Transformers.js WAV rendering through `ragmir audio`. | +| `@jcode.labs/ragmir-ui` | Unpublished workspace UI package adapted from the WorkoutGen design foundation for Ragmir surfaces. | +| `@jcode.labs/ragmir-landing` | Unpublished Astro static landing package. Product-facing titles stay `Ragmir`. | +| `@jcode.labs/ragmir-app` | Unpublished Tauri desktop/mobile shell package. Native builds are explicit app commands. Core integration uses a bounded native command around the `ragmir` CLI, with packaged sidecar distribution still planned. | +| `@jcode.labs/ragmir-license-webhook` | Unpublished, undeployed MIT-licensed Cloudflare Worker handler for future Lemon Squeezy webhooks and local `RAGMIR1` license issuance. | The package README files are intentionally short because npm displays each package README separately. They point npm readers back to this GitHub documentation. -The product name visible to users is **Mimir**. The technical core package is **Mimir Core** and now -lives under `packages/mimir-core`; the public npm package name remains `@jcode.labs/mimir`. +The product name visible to users is **Ragmir**. The technical core package is **Ragmir Core** and now +lives under `packages/ragmir-core`; the public npm package name remains `@jcode.labs/ragmir`. The public source and commercial distribution boundary is tracked in [`docs/source-boundary.md`](./docs/source-boundary.md) and @@ -140,7 +140,7 @@ agent wiring, API shapes, security details, or app packaging rules: | Document | Use it for | | --- | --- | -| [`docs/cli-reference.md`](./docs/cli-reference.md) | Complete `mimir` and `mimir-tts` command reference. | +| [`docs/cli-reference.md`](./docs/cli-reference.md) | Complete `ragmir` and `ragmir-tts` command reference. | | [`docs/api-reference.md`](./docs/api-reference.md) | Public TypeScript API, setup options, semantic model preload, and MCP tool inputs. | | [`docs/agent-integration.md`](./docs/agent-integration.md) | Claude Code, Codex, Kimi Code CLI, OpenCode, and Cline setup. | | [`docs/troubleshooting.md`](./docs/troubleshooting.md) | Empty indexes, weak search, strict security audit warnings, and audio preload fixes. | @@ -156,10 +156,10 @@ agent wiring, API shapes, security details, or app packaging rules: ## Open Source -Mimir is a public open-source project under the MIT License. It is designed to be inspectable, +Ragmir is a public open-source project under the MIT License. It is designed to be inspectable, forkable, and usable without a JCode Labs account. -Every tracked package in this repository is visible source. Commercial Mimir app distribution can +Every tracked package in this repository is visible source. Commercial Ragmir app distribution can gate official signed builds, support, updates, and hosted license delivery, but it does not make the tracked Tauri app or webhook source proprietary. @@ -168,7 +168,7 @@ Security reports should stay private and follow [`SECURITY.md`](./SECURITY.md). ## Sponsors -Mimir stays MIT open source. Sponsorship helps fund maintenance, issue triage, documentation, and +Ragmir stays MIT open source. Sponsorship helps fund maintenance, issue triage, documentation, and practical agent-workflow improvements. Sponsor the project through [GitHub Sponsors](https://github.com/sponsors/jb-thery). @@ -186,10 +186,10 @@ Early public package. APIs may evolve before `1.0.0`. ## Desktop Client Preview -Mimir Core is the open-source product you can use today through the CLI, library, MCP server, and +Ragmir Core is the open-source product you can use today through the CLI, library, MCP server, and portable agent skills. -A cross-platform Mimir desktop/mobile client is being developed in `packages/mimir-app`. Its goal is +A cross-platform Ragmir desktop/mobile client is being developed in `packages/ragmir-app`. Its goal is to make local confidential workspaces easier for non-CLI workflows: register a local dossier, run setup and ingest, ask questions with cited local passages, inspect privacy posture, and preload embedding models explicitly. Google Drive support is implemented as an opt-in local-sync folder flow @@ -200,10 +200,10 @@ waitlist, or hosted account flow in this repository. When released, it is planne downloads and sideloadable installers, not App Store or Play Store distribution. The canonical landing and future direct-download release URL is -[`mimir.jcode.works`](https://mimir.jcode.works). It is prepared as a Cloudflare Workers Static Assets +[`ragmir.jcode.works`](https://ragmir.jcode.works). It is prepared as a Cloudflare Workers Static Assets site, but public deployment remains a separate release action. -## What Mimir Is For +## What Ragmir Is For - Build a local RAG knowledge base inside any repository. - Analyze confidential datasets while keeping raw files and generated indexes local. @@ -214,7 +214,7 @@ site, but public deployment remains a separate release action. - Prepare legal-dossier summaries, chronologies, clause reviews, and professional-review handoffs with the optional bundled legal skill. -Mimir is not a hosted SaaS, not a remote vector database, and not a certified high-assurance system. +Ragmir is not a hosted SaaS, not a remote vector database, and not a certified high-assurance system. For regulated or state-grade environments, pair it with encrypted disks, controlled machines, release verification, and an external security review. @@ -224,17 +224,17 @@ release verification, and an external security review. - pnpm, npm, yarn, or bun. - A repository where generated local folders can be ignored by Git. - No model runtime is required for the default `embeddingProvider: "local-hash"` mode. -- Optional semantic embeddings use Transformers.js with local model files under `.mimir/models` by - default. Use `mimir models pull` when remote model download is acceptable, then keep +- Optional semantic embeddings use Transformers.js with local model files under `.ragmir/models` by + default. Use `ragmir models pull` when remote model download is acceptable, then keep `transformersAllowRemoteModels` false for confidential indexing. -- Generated answers are intentionally outside Mimir core. Use Claude, Codex, OpenAI, a local model - MCP server, or another trusted model runtime to synthesize from Mimir's cited context. -- Optional audio summaries use `@jcode.labs/mimir-tts`. For highest-quality MP3, install the +- Generated answers are intentionally outside Ragmir core. Use Claude, Codex, OpenAI, a local model + MCP server, or another trusted model runtime to synthesize from Ragmir's cited context. +- Optional audio summaries use `@jcode.labs/ragmir-tts`. For highest-quality MP3, install the external `edge-tts` CLI and render with `--engine edge`. For confidential or air-gapped content, use the Transformers.js WAV path with `--engine transformers --offline`; it does not require Python, ffmpeg, Piper, XTTS, or a local server. -- Optional Markdown reports use the bundled `mimir-markdown-report` skill and should stay under - ignored `.mimir/reports/` unless explicitly sanitized for sharing. +- Optional Markdown reports use the bundled `ragmir-markdown-report` skill and should stay under + ignored `.ragmir/reports/` unless explicitly sanitized for sharing. ## Install @@ -243,19 +243,19 @@ The package is public. Users do not need a JCode Labs account or npm token to in With npm: ```bash -npm install --save-dev @jcode.labs/mimir +npm install --save-dev @jcode.labs/ragmir ``` With pnpm: ```bash -pnpm add -D @jcode.labs/mimir +pnpm add -D @jcode.labs/ragmir ``` Install the standalone TTS package only when you want to use it directly: ```bash -npm install --save-dev @jcode.labs/mimir-tts +npm install --save-dev @jcode.labs/ragmir-tts ``` Maintainer tokens are only needed to publish new versions. @@ -267,84 +267,84 @@ when supported files are already present: ```bash # Fast start: no model download, fully local lexical/hash retrieval. -npx mimir setup +npx ragmir setup # Higher-quality natural-language retrieval: one-time Transformers.js model download, # then remote model loading stays disabled for normal confidential indexing. -npx mimir setup --semantic +npx ragmir setup --semantic ``` -Fresh setup keeps local state under one ignored `.mimir/` folder: +Fresh setup keeps local state under one ignored `.ragmir/` folder: ```plain text -.mimir/config.json # local config -.mimir/sources.txt # optional extra source paths -.mimir/raw/ # raw documents to ingest -.mimir/storage/ # generated LanceDB index after ingest -.mimir/access.log # metadata-only access log after use -.mimir/skills/mimir/SKILL.md # portable agent skill -.mimir/skills/mimir-audio-summary/SKILL.md -.mimir/skills/mimir-markdown-report/SKILL.md -.mimir/skills/mimir-legal-dossier/SKILL.md -.mimir/mcp.json # generic MCP server config snippet -.mimir/claude-mcp-server.json # Claude Code add-json payload -.mimir/codex-mcp.toml # Codex config.toml snippet with MCP and skills.config -.mimir/kimi-mcp.json # Kimi Code CLI MCP config -.mimir/opencode.jsonc # OpenCode config snippet -.mimir/cline-mcp.json # Cline MCP config -.mimir/agent-setup.md # agent-specific setup guide -.gitignore # ignores .mimir/ +.ragmir/config.json # local config +.ragmir/sources.txt # optional extra source paths +.ragmir/raw/ # raw documents to ingest +.ragmir/storage/ # generated LanceDB index after ingest +.ragmir/access.log # metadata-only access log after use +.ragmir/skills/ragmir/SKILL.md # portable agent skill +.ragmir/skills/ragmir-audio-summary/SKILL.md +.ragmir/skills/ragmir-markdown-report/SKILL.md +.ragmir/skills/ragmir-legal-dossier/SKILL.md +.ragmir/mcp.json # generic MCP server config snippet +.ragmir/claude-mcp-server.json # Claude Code add-json payload +.ragmir/codex-mcp.toml # Codex config.toml snippet with MCP and skills.config +.ragmir/kimi-mcp.json # Kimi Code CLI MCP config +.ragmir/opencode.jsonc # OpenCode config snippet +.ragmir/cline-mcp.json # Cline MCP config +.ragmir/agent-setup.md # agent-specific setup guide +.gitignore # ignores .ragmir/ ``` It detects the repository package manager and writes the MCP helper files with the right command: -`npx mimir serve-mcp`, `pnpm exec mimir serve-mcp`, `yarn exec mimir serve-mcp`, or `bunx mimir serve-mcp`. +`npx ragmir serve-mcp`, `pnpm exec ragmir serve-mcp`, `yarn exec ragmir serve-mcp`, or `bunx ragmir serve-mcp`. When a repository needs a wrapper script or only a subset of agent helpers, make that explicit during setup: ```bash -npx mimir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh +npx ragmir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh ``` -For the usual agent-first workflow, expose Mimir to the coding assistants used in the repository: +For the usual agent-first workflow, expose Ragmir to the coding assistants used in the repository: ```bash -npx mimir install-agent --agents claude,codex,kimi,opencode,cline +npx ragmir install-agent --agents claude,codex,kimi,opencode,cline ``` Then wire the agent you use. Claude Code, Codex, and Cline follow the standard MCP shapes from their -public docs; Kimi and OpenCode use the generated helper files that Mimir writes under `.mimir/`. +public docs; Kimi and OpenCode use the generated helper files that Ragmir writes under `.ragmir/`. ```bash # Claude Code: registers the local MCP server for this repository. -claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)" +claude mcp add-json --scope local ragmir "$(cat .ragmir/claude-mcp-server.json)" # Codex: review and merge the generated MCP and skills config. -cat .mimir/codex-mcp.toml +cat .ragmir/codex-mcp.toml -# Kimi Code CLI: launch Kimi with the generated Mimir MCP config. -kimi --mcp-config-file .mimir/kimi-mcp.json +# Kimi Code CLI: launch Kimi with the generated Ragmir MCP config. +kimi --mcp-config-file .ragmir/kimi-mcp.json # OpenCode: review and merge the generated OpenCode JSONC snippet. -cat .mimir/opencode.jsonc +cat .ragmir/opencode.jsonc # Cline: add the generated JSON under Cline's mcpServers configuration. -cat .mimir/cline-mcp.json +cat .ragmir/cline-mcp.json ``` -From the agent, ask naturally, for example: "Use Mimir to find what this repository says about +From the agent, ask naturally, for example: "Use Ragmir to find what this repository says about deployment." The agent calls the MCP tools and uses the bundled skills to work with cited local context. Check readiness at any time: ```bash -npx mimir doctor +npx ragmir doctor ``` If files are missing from the index, stale, or the setup is incomplete, run: ```bash -npx mimir doctor --fix +npx ragmir doctor --fix ``` `doctor --fix` performs safe repairs: missing scaffolding, Git ignore entries, agent kit install, and @@ -353,22 +353,22 @@ index rebuild when supported files are present and the privacy posture has no wa Manual initialization is still available: ```plain text -.mimir/config.json # local config (add extra paths to the "sources" array) -.mimir/raw/ # raw documents to ingest -.gitignore # ignores .mimir/ +.ragmir/config.json # local config (add extra paths to the "sources" array) +.ragmir/raw/ # raw documents to ingest +.gitignore # ignores .ragmir/ ``` -Put supported files under `.mimir/raw/`: +Put supported files under `.ragmir/raw/`: ```plain text -.mimir/raw/ +.ragmir/raw/ policy.md meeting-notes.pdf requirements.docx ``` For monorepos or downloaded local folders, add extra paths or glob patterns to the `sources` array in -`.mimir/config.json`. Relative entries resolve from the Mimir project root, and `!` excludes matched files: +`.ragmir/config.json`. Relative entries resolve from the Ragmir project root, and `!` excludes matched files: ```json { @@ -381,34 +381,34 @@ For monorepos or downloaded local folders, add extra paths or glob patterns to t } ``` -The legacy `.mimir/sources.txt` file (one entry per line) is still read when present and can be managed +The legacy `.ragmir/sources.txt` file (one entry per line) is still read when present and can be managed from the CLI: ```bash -npx mimir sources add "../apps/*/README.md" "../apps/*/docs/**/*.{md,mdx}" -npx mimir sources list +npx ragmir sources add "../apps/*/README.md" "../apps/*/docs/**/*.{md,mdx}" +npx ragmir sources list ``` ### Team Workflow With A Shared Private Corpus For a team of 10 developers, keep Git as the reproducible setup layer and keep the corpus in an approved private source. Each developer materializes the same corpus locally, then builds their own -local Mimir index. +local Ragmir index. ```plain text Git repository README.md - mimir.config.example.json - mimir-sources.example.txt + ragmir.config.example.json + ragmir-sources.example.txt scripts/sync-corpus.sh Ignored local state on each developer machine - .mimir/config.json - .mimir/sources.txt - .mimir/raw/ or data/private-corpus/ - .mimir/storage/ - .mimir/access.log - .mimir/models/ + .ragmir/config.json + .ragmir/sources.txt + .ragmir/raw/ or data/private-corpus/ + .ragmir/storage/ + .ragmir/access.log + .ragmir/models/ ``` If your team uses Google Drive, Dropbox, SharePoint, S3, rsync, an encrypted ZIP, or another private @@ -418,98 +418,98 @@ source, write a small project script that syncs into an ignored local folder and #!/usr/bin/env bash set -euo pipefail -mkdir -p .mimir/raw +mkdir -p .ragmir/raw # Example only: replace this with your approved private sync command. -# rclone copy "team-drive:Project Knowledge" .mimir/raw --drive-export-formats docx,xlsx,pptx,pdf +# rclone copy "team-drive:Project Knowledge" .ragmir/raw --drive-export-formats docx,xlsx,pptx,pdf -npx mimir ingest -npx mimir doctor +npx ragmir ingest +npx ragmir doctor ``` Commit the script and instructions, not the synced files. The same pattern works without Google Drive: every developer downloads the same approved archive or mirror into the same ignored path, then -runs `npx mimir ingest`. Mimir compares checksums and reuses unchanged rows, so refreshes stay +runs `npx ragmir ingest`. Ragmir compares checksums and reuses unchanged rows, so refreshes stay incremental. Build the local index: ```bash -npx mimir ingest -npx mimir doctor +npx ragmir ingest +npx ragmir doctor ``` -When the index is ready, `mimir doctor` prints `ready=true`. `mimir ingest` and `mimir audit` also report +When the index is ready, `ragmir doctor` prints `ready=true`. `ragmir ingest` and `ragmir audit` also report files that were discovered but not indexed because the type is unsupported, the file is too large, or the file name looks like a secret/private key. List skipped paths explicitly: ```bash -npx mimir audit --unsupported +npx ragmir audit --unsupported ``` Summarize recent metadata-only usage without exposing raw queries or local paths: ```bash -npx mimir usage-report --days 7 +npx ragmir usage-report --days 7 ``` Retrieve exact passages: ```bash -npx mimir search "approval for offline operation" +npx ragmir search "approval for offline operation" ``` Return cited retrieval context for an agent or model: ```bash -npx mimir ask "What evidence supports offline operation?" +npx ragmir ask "What evidence supports offline operation?" ``` Run an audit-backed multi-query research pass before a broad synthesis or implementation task: ```bash -npx mimir research "release readiness and risks" --compact +npx ragmir research "release readiness and risks" --compact ``` Measure recall against a golden query file: ```bash -npx mimir evaluate --golden golden-queries.json +npx ragmir evaluate --golden golden-queries.json ``` For private dogfooding, keep the real corpus and golden query file outside Git or under an ignored local path, then use a threshold that matches the evaluation phase: ```bash -npx mimir --project-root /path/to/workspace ingest -npx mimir --project-root /path/to/workspace evaluate --golden .mimir/evaluations/golden-queries.json --fail-under 0.8 --json +npx ragmir --project-root /path/to/workspace ingest +npx ragmir --project-root /path/to/workspace evaluate --golden .ragmir/evaluations/golden-queries.json --fail-under 0.8 --json ``` The JSON report includes the active `embeddingProvider` and `embeddingModel`, so you can compare default local-hash recall with a private Transformers semantic run without storing the report in Git. -Mimir does not synthesize an LLM answer. It returns cited local passages; your chosen agent or model +Ragmir does not synthesize an LLM answer. It returns cited local passages; your chosen agent or model does the writing around those passages. With pnpm, use `pnpm exec` after installing the package: ```bash -pnpm exec mimir setup -pnpm exec mimir doctor -pnpm exec mimir search "approval for offline operation" +pnpm exec ragmir setup +pnpm exec ragmir doctor +pnpm exec ragmir search "approval for offline operation" ``` ## Choose A Retrieval Mode -Mimir has two embedding modes. +Ragmir has two embedding modes. ### Default Local Hash Retrieval Use this when you want a fully local, no-model smoke test or a dependency-light setup. Retrieval is lexical/hash-based, not semantic. -`.mimir/config.json`: +`.ragmir/config.json`: ```json { @@ -520,25 +520,25 @@ lexical/hash-based, not semantic. Commands: ```bash -npx mimir ingest -npx mimir search "offline retrieval approval" -npx mimir ask "What evidence supports offline operation?" +npx ragmir ingest +npx ragmir search "offline retrieval approval" +npx ragmir ask "What evidence supports offline operation?" ``` -`mimir ask` always returns cited retrieved passages instead of a generated synthesis. You can pass those +`ragmir ask` always returns cited retrieved passages instead of a generated synthesis. You can pass those passages to any LLM or agent you trust. ### Optional Semantic Embeddings With Transformers.js -Use this when you want better semantic retrieval while keeping Mimir core free of an LLM server. +Use this when you want better semantic retrieval while keeping Ragmir core free of an LLM server. -`.mimir/config.json`: +`.ragmir/config.json`: ```json { "embeddingProvider": "transformers", "embeddingModel": "mixedbread-ai/mxbai-embed-xsmall-v1", - "embeddingModelPath": ".mimir/models", + "embeddingModelPath": ".ragmir/models", "transformersAllowRemoteModels": false } ``` @@ -546,60 +546,60 @@ Use this when you want better semantic retrieval while keeping Mimir core free o Commands: ```bash -npx mimir setup --semantic +npx ragmir setup --semantic # Or later: -npx mimir models pull --enable -npx mimir ingest -npx mimir ask "Which passages support offline operation?" +npx ragmir models pull --enable +npx ragmir ingest +npx ragmir ask "Which passages support offline operation?" ``` -`mimir setup --semantic` is the first-run shortcut. It intentionally allows a one-time download from -Hugging Face into `embeddingModelPath`, switches `.mimir/config.json` to `embeddingProvider: +`ragmir setup --semantic` is the first-run shortcut. It intentionally allows a one-time download from +Hugging Face into `embeddingModelPath`, switches `.ragmir/config.json` to `embeddingProvider: "transformers"`, and leaves `transformersAllowRemoteModels` false for normal confidential indexing. -Use `mimir models pull --enable` when you want to make the same choice later. Re-run -`mimir ingest --rebuild` after changing embedding provider or model so stored vectors match the +Use `ragmir models pull --enable` when you want to make the same choice later. Re-run +`ragmir ingest --rebuild` after changing embedding provider or model so stored vectors match the active configuration. ## Agent Skills And MCP -Mimir ships with portable agent skills and a standard MCP server. +Ragmir ships with portable agent skills and a standard MCP server. -Use `mimir setup` for the normal path, or install only the agent layer later: +Use `ragmir setup` for the normal path, or install only the agent layer later: ```bash -npx mimir install-skill -npx mimir install-skill --agents claude,codex --mcp-command ./scripts/serve-mcp.sh -npx mimir install-agent --agents claude,codex,kimi,opencode,cline +npx ragmir install-skill +npx ragmir install-skill --agents claude,codex --mcp-command ./scripts/serve-mcp.sh +npx ragmir install-agent --agents claude,codex,kimi,opencode,cline ``` Main agent examples: ```bash # Claude Code -claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)" +claude mcp add-json --scope local ragmir "$(cat .ragmir/claude-mcp-server.json)" # Codex -cat .mimir/codex-mcp.toml +cat .ragmir/codex-mcp.toml # Kimi Code CLI -kimi --mcp-config-file .mimir/kimi-mcp.json +kimi --mcp-config-file .ragmir/kimi-mcp.json # OpenCode -cat .mimir/opencode.jsonc +cat .ragmir/opencode.jsonc # Cline -cat .mimir/cline-mcp.json +cat .ragmir/cline-mcp.json ``` Start the MCP server from the repository root when a compatible agent needs tool access: ```bash -npx mimir serve-mcp +npx ragmir serve-mcp ``` -The MCP server exposes `mimir_status`, `mimir_search`, `mimir_ask`, `mimir_research`, -`mimir_audit`, `mimir_evaluate`, `mimir_usage_report`, and `mimir_security_audit`. The LLM does not -need to know about LanceDB or the raw file layout; it asks Mimir for ranked passages, cited context, +The MCP server exposes `ragmir_status`, `ragmir_search`, `ragmir_ask`, `ragmir_research`, +`ragmir_audit`, `ragmir_evaluate`, `ragmir_usage_report`, and `ragmir_security_audit`. The LLM does not +need to know about LanceDB or the raw file layout; it asks Ragmir for ranked passages, cited context, audit-backed research, local recall gates, or metadata-only usage summaries and uses the returned citations. @@ -607,47 +607,47 @@ Per-agent setup details live in [`docs/agent-integration.md`](./docs/agent-integ ## Audio Summaries -Mimir includes a plug-and-play text-to-speech path for listenable summaries. +Ragmir includes a plug-and-play text-to-speech path for listenable summaries. For the same quality path as the global Voice Forge skill, install `edge-tts` and render MP3: ```bash -npx mimir audio --doctor +npx ragmir audio --doctor pipx install edge-tts -npx mimir audio /tmp/MIMIR-SUMMARY-project.txt \ +npx ragmir audio /tmp/RAGMIR-SUMMARY-project.txt \ --engine edge \ - --out .mimir/audio/project-summary.mp3 + --out .ragmir/audio/project-summary.mp3 ``` The Edge path uses the online Microsoft Edge TTS service through the `edge-tts` CLI. Use it only when sending the narration text to that service is acceptable. MP3 output requires explicit `--engine edge` for this reason. -By default, `mimir audio` uses the Transformers.js WAV path. For confidential or air-gapped work, +By default, `ragmir audio` uses the Transformers.js WAV path. For confidential or air-gapped work, preload Transformers.js-compatible model files with non-sensitive text, then render WAV offline: ```bash -npx mimir audio /tmp/MIMIR-SUMMARY-project.txt \ +npx ragmir audio /tmp/RAGMIR-SUMMARY-project.txt \ --engine transformers \ --offline \ --lang fr \ - --model-path .mimir/models/tts \ - --out .mimir/audio/project-summary.wav + --model-path .ragmir/models/tts \ + --out .ragmir/audio/project-summary.wav ``` Use the standalone package directly: ```bash -npx mimir-tts doctor --json -npx mimir-tts render /tmp/MIMIR-SUMMARY-project.txt \ +npx ragmir-tts doctor --json +npx ragmir-tts render /tmp/RAGMIR-SUMMARY-project.txt \ --engine edge \ - --out .mimir/audio/project-summary.mp3 + --out .ragmir/audio/project-summary.mp3 ``` The default standalone engine is `transformers` and the default language is `fr`. Pass -`--lang en|es|fr` (or `MIMIR_TTS_LANG`) to switch language: it selects the matching self-contained +`--lang en|es|fr` (or `RAGMIR_TTS_LANG`) to switch language: it selects the matching self-contained offline model (`Xenova/mms-tts-eng`, `Xenova/mms-tts-spa`, or `Xenova/mms-tts-fra`) and, on the Edge -path, a native neural voice. Override the model directly with `--model` or `MIMIR_TTS_MODEL`. +path, a native neural voice. Override the model directly with `--model` or `RAGMIR_TTS_MODEL`. See [`docs/offline-tts-preload.md`](./docs/offline-tts-preload.md) for the exact preload and offline-check workflow. @@ -659,27 +659,27 @@ where you run the CLI: ```plain text your-project/ - .mimir/config.json # local config - .mimir/sources.txt # optional extra source paths - .mimir/raw/ # raw documents to ingest - .mimir/storage/ # generated LanceDB index - .mimir/access.log # metadata-only access log + .ragmir/config.json # local config + .ragmir/sources.txt # optional extra source paths + .ragmir/raw/ # raw documents to ingest + .ragmir/storage/ # generated LanceDB index + .ragmir/access.log # metadata-only access log ``` -The package never ships project documents. `mimir setup` adds a `.mimir/` gitignore entry, so +The package never ships project documents. `ragmir setup` adds a `.ragmir/` gitignore entry, so generated indexes, agent files, raw documents, reports, models, audio, and access logs stay local to the target repository. -Legacy projects that already have `.kb/config.json` keep working. In that mode, Mimir preserves the +Legacy projects that already have `.kb/config.json` keep working. In that mode, Ragmir preserves the old defaults (`private/`, `.kb/storage`, `.kb/sources.txt`, `.kb/access.log`) and accepts existing -`KB_*` environment variables. New setup and docs use `.mimir/` and `MIMIR_*`. +`KB_*` environment variables. New setup and docs use `.ragmir/` and `RAGMIR_*`. ## Confidentiality Defaults -Mimir is designed for private repositories and sensitive local evidence. +Ragmir is designed for private repositories and sensitive local evidence. - Zero telemetry: no analytics or document content is sent to JCode Labs. -- No LLM generation in core: Mimir returns cited context for the agent/runtime you choose. +- No LLM generation in core: Ragmir returns cited context for the agent/runtime you choose. - Local-hash by default: no model runtime is required for the default retrieval path. - Transformers.js remote model loading is disabled by default. - Optional Transformers.js model downloads require an explicit preload command or @@ -687,7 +687,7 @@ Mimir is designed for private repositories and sensitive local evidence. - Redaction before indexing: common secrets and identifiers are redacted before chunks are embedded and stored. - Metadata-only access logs: query hashes and action metadata are logged, not raw queries. -- Metadata-only usage reports: `mimir usage-report --days 7` summarizes recent local activity +- Metadata-only usage reports: `ragmir usage-report --days 7` summarizes recent local activity without exposing query text or local paths. - MCP is read-focused and bounded by `mcpMaxTopK`. - Generated local state is ignored by Git. @@ -695,13 +695,13 @@ Mimir is designed for private repositories and sensitive local evidence. Run: ```bash -npx mimir security-audit --strict +npx ragmir security-audit --strict ``` Remove the generated vector index: ```bash -npx mimir destroy-index --yes +npx ragmir destroy-index --yes ``` `destroy-index` does not securely erase SSD or copy-on-write storage. For strong deletion @@ -712,7 +712,7 @@ read [`SECURITY-HARDENING.md`](./SECURITY-HARDENING.md). ## Supported Files -Mimir supports common text, document, data, config, log, and source-code files out of the box: +Ragmir supports common text, document, data, config, log, and source-code files out of the box: - Markdown: `.md`, `.mdx` - Text: `.txt`, `.text` @@ -753,18 +753,18 @@ Custom UTF-8 text extensions can be enabled without changing code: Or through: ```bash -MIMIR_INCLUDE_EXTENSIONS=".transcript,.evidence" npx mimir ingest +RAGMIR_INCLUDE_EXTENSIONS=".transcript,.evidence" npx ragmir ingest ``` -Audio/video files and formats that are not listed are not useful to Mimir as-is. They can still be +Audio/video files and formats that are not listed are not useful to Ragmir as-is. They can still be valuable source evidence, but they should be transcribed, converted, or exported to text/PDF/HTML -first. `mimir audit --unsupported` prints per-file recommendations for these skipped formats. +first. `ragmir audit --unsupported` prints per-file recommendations for these skipped formats. Scanned PDFs can use an explicit `pdfOcrCommand` wrapper when you accept running local OCR tooling. Standalone image files such as `.png`, `.jpg`, `.heic`, and `.tiff` stay unsupported by default, but can be indexed through an explicit local `imageOcrCommand` wrapper. Old `.doc` Word binaries stay unsupported by default, but can be indexed through an explicit local `legacyWordCommand` wrapper -when your workstation has a trusted extractor. If a supported file parses to no text, `mimir ingest ---json` reports it under `emptyTextFiles`. Mimir intentionally avoids pretending that every binary +when your workstation has a trusted extractor. If a supported file parses to no text, `ragmir ingest +--json` reports it under `emptyTextFiles`. Ragmir intentionally avoids pretending that every binary format can be indexed safely without extraction logic. Secret-like files such as `.env`, `.npmrc`, private keys, and certificates are skipped by default. @@ -777,20 +777,20 @@ under a source directory. ## Configuration Reference -Most users should start with `mimir setup` and let `mimir doctor` explain what is missing. Edit -`.mimir/config.json` only when you need to change source paths, retrieval mode, chunking, privacy +Most users should start with `ragmir setup` and let `ragmir doctor` explain what is missing. Edit +`.ragmir/config.json` only when you need to change source paths, retrieval mode, chunking, privacy limits, or local extractors. -Default `.mimir/config.json` for a fresh project: +Default `.ragmir/config.json` for a fresh project: ```json { - "rawDir": ".mimir/raw", - "storageDir": ".mimir/storage", - "sourcesFile": ".mimir/sources.txt", + "rawDir": ".ragmir/raw", + "storageDir": ".ragmir/storage", + "sourcesFile": ".ragmir/sources.txt", "sources": [], - "accessLogPath": ".mimir/access.log", - "embeddingModelPath": ".mimir/models", + "accessLogPath": ".ragmir/access.log", + "embeddingModelPath": ".ragmir/models", "tableName": "chunks", "embeddingProvider": "local-hash", "embeddingModel": "mixedbread-ai/mxbai-embed-xsmall-v1", @@ -822,14 +822,14 @@ Every field, its default, and what it controls: | Field | Default | Purpose | | --- | --- | --- | -| `rawDir` | `.mimir/raw` | Local corpus folder, indexed recursively. The primary place to drop documents. | +| `rawDir` | `.ragmir/raw` | Local corpus folder, indexed recursively. The primary place to drop documents. | | `sources` | `[]` | Extra file, directory, and glob paths (plus `!` exclusions) to index, resolved from the project root. See below. | -| `sourcesFile` | `.mimir/sources.txt` | Legacy one-path-per-line file; still read and merged with `sources` when present. | -| `storageDir` | `.mimir/storage` | LanceDB vector store location. | -| `accessLogPath` | `.mimir/access.log` | Query access log (stores hashes/metadata only). | -| `embeddingModelPath` | `.mimir/models` | Local cache for the Transformers.js embedding model. | +| `sourcesFile` | `.ragmir/sources.txt` | Legacy one-path-per-line file; still read and merged with `sources` when present. | +| `storageDir` | `.ragmir/storage` | LanceDB vector store location. | +| `accessLogPath` | `.ragmir/access.log` | Query access log (stores hashes/metadata only). | +| `embeddingModelPath` | `.ragmir/models` | Local cache for the Transformers.js embedding model. | | `tableName` | `chunks` | LanceDB table name. | -| `embeddingProvider` | `local-hash` | `local-hash` (offline lexical, not semantic) or `transformers` (semantic). Switching requires `mimir ingest --rebuild`. | +| `embeddingProvider` | `local-hash` | `local-hash` (offline lexical, not semantic) or `transformers` (semantic). Switching requires `ragmir ingest --rebuild`. | | `embeddingModel` | `mixedbread-ai/mxbai-embed-xsmall-v1` | Model used when `embeddingProvider` is `transformers`. | | `transformersAllowRemoteModels` | `false` | Allow downloading the embedding model at runtime. | | `redaction.enabled` | `true` | Strip secrets/PII before anything is embedded. | @@ -849,9 +849,9 @@ Every field, its default, and what it controls: ### Extra source paths (`sources`) -Mimir always indexes everything under `rawDir` (`.mimir/raw/`). To pull in files that live elsewhere — +Ragmir always indexes everything under `rawDir` (`.ragmir/raw/`). To pull in files that live elsewhere — sibling packages in a monorepo, a shared docs folder, a downloaded directory — add them straight to the -`sources` array in `.mimir/config.json`. No separate file is needed: +`sources` array in `.ragmir/config.json`. No separate file is needed: ```json { @@ -870,38 +870,38 @@ Each entry is one of: - a **glob** pattern — any entry containing `*`, `?`, `[`, or `{`; - an **exclusion** — starts with `!` and filters the glob matches. -> **Legacy `sources.txt`.** Paths listed one per line in `.mimir/sources.txt` are still read when the -> file exists, and `mimir sources add` / `mimir sources list` continue to manage it. Entries from both +> **Legacy `sources.txt`.** Paths listed one per line in `.ragmir/sources.txt` are still read when the +> file exists, and `ragmir sources add` / `ragmir sources list` continue to manage it. Entries from both > the `sources` array and `sources.txt` are merged, so existing projects keep working unchanged. New -> projects should prefer the `sources` array — `mimir init` no longer creates a `sources.txt`. +> projects should prefer the `sources` array — `ragmir init` no longer creates a `sources.txt`. Environment overrides: -- `MIMIR_RAW_DIR` -- `MIMIR_STORAGE_DIR` -- `MIMIR_SOURCES_FILE` -- `MIMIR_ACCESS_LOG_PATH` -- `MIMIR_EMBEDDING_PROVIDER` -- `MIMIR_EMBEDDING_MODEL` -- `MIMIR_EMBEDDING_MODEL_PATH` -- `MIMIR_TRANSFORMERS_ALLOW_REMOTE_MODELS` -- `MIMIR_REDACTION_ENABLED` -- `MIMIR_REDACTION_BUILT_IN` -- `MIMIR_ACCESS_LOG` -- `MIMIR_MCP_MAX_TOP_K` -- `MIMIR_TOP_K` -- `MIMIR_CHUNK_SIZE` -- `MIMIR_CHUNK_OVERLAP` -- `MIMIR_MAX_FILE_BYTES` -- `MIMIR_INGEST_CONCURRENCY` -- `MIMIR_EMBEDDING_BATCH_SIZE` -- `MIMIR_INCLUDE_EXTENSIONS` -- `MIMIR_PDF_OCR_COMMAND` as a JSON array, for example `["mimir-pdf-ocr","{input}"]` -- `MIMIR_PDF_OCR_TIMEOUT_MS` -- `MIMIR_IMAGE_OCR_COMMAND` as a JSON array, for example `["mimir-image-ocr","{input}"]` -- `MIMIR_IMAGE_OCR_TIMEOUT_MS` -- `MIMIR_LEGACY_WORD_COMMAND` as a JSON array, for example `["mimir-doc-text","{input}"]` -- `MIMIR_LEGACY_WORD_TIMEOUT_MS` +- `RAGMIR_RAW_DIR` +- `RAGMIR_STORAGE_DIR` +- `RAGMIR_SOURCES_FILE` +- `RAGMIR_ACCESS_LOG_PATH` +- `RAGMIR_EMBEDDING_PROVIDER` +- `RAGMIR_EMBEDDING_MODEL` +- `RAGMIR_EMBEDDING_MODEL_PATH` +- `RAGMIR_TRANSFORMERS_ALLOW_REMOTE_MODELS` +- `RAGMIR_REDACTION_ENABLED` +- `RAGMIR_REDACTION_BUILT_IN` +- `RAGMIR_ACCESS_LOG` +- `RAGMIR_MCP_MAX_TOP_K` +- `RAGMIR_TOP_K` +- `RAGMIR_CHUNK_SIZE` +- `RAGMIR_CHUNK_OVERLAP` +- `RAGMIR_MAX_FILE_BYTES` +- `RAGMIR_INGEST_CONCURRENCY` +- `RAGMIR_EMBEDDING_BATCH_SIZE` +- `RAGMIR_INCLUDE_EXTENSIONS` +- `RAGMIR_PDF_OCR_COMMAND` as a JSON array, for example `["ragmir-pdf-ocr","{input}"]` +- `RAGMIR_PDF_OCR_TIMEOUT_MS` +- `RAGMIR_IMAGE_OCR_COMMAND` as a JSON array, for example `["ragmir-image-ocr","{input}"]` +- `RAGMIR_IMAGE_OCR_TIMEOUT_MS` +- `RAGMIR_LEGACY_WORD_COMMAND` as a JSON array, for example `["ragmir-doc-text","{input}"]` +- `RAGMIR_LEGACY_WORD_TIMEOUT_MS` Legacy `KB_*` aliases remain accepted for existing automation. @@ -911,30 +911,30 @@ Legacy `KB_*` aliases remain accepted for existing automation. `imageOcrCommand` is also opt-in; image files are treated as supported only when it is configured. `legacyWordCommand` is opt-in; `.doc` files are treated as supported only when it is configured. External text commands are executed from the target project root without a shell, receive -`MIMIR_PDF_PATH`, `MIMIR_IMAGE_PATH`, or `MIMIR_LEGACY_WORD_PATH`, replace `{input}` placeholders +`RAGMIR_PDF_PATH`, `RAGMIR_IMAGE_PATH`, or `RAGMIR_LEGACY_WORD_PATH`, replace `{input}` placeholders with the source path, and must print UTF-8 text to stdout. ## Command And API Reference -Mimir ships two CLIs: +Ragmir ships two CLIs: -- `mimir`: the main local RAG, MCP, skills, security, and audio command. `kb` remains a legacy alias +- `ragmir`: the main local RAG, MCP, skills, security, and audio command. `kb` remains a legacy alias for compatibility. -- `mimir-tts`: the standalone text-to-speech renderer used by `mimir audio`. +- `ragmir-tts`: the standalone text-to-speech renderer used by `ragmir audio`. -Most users start with `mimir setup`, `mimir doctor`, `mimir ingest`, `mimir search`, `mimir ask`, -`mimir research`, and `mimir security-audit`. +Most users start with `ragmir setup`, `ragmir doctor`, `ragmir ingest`, `ragmir search`, `ragmir ask`, +`ragmir research`, and `ragmir security-audit`. -Use `mimir setup --semantic` during first setup, or `mimir models pull --enable` later, when a +Use `ragmir setup --semantic` during first setup, or `ragmir models pull --enable` later, when a one-time Transformers.js model download is acceptable and you want higher-quality semantic retrieval. -Run `mimir ingest --rebuild` after switching embedding provider or model. +Run `ragmir ingest --rebuild` after switching embedding provider or model. Full command table: [`docs/cli-reference.md`](./docs/cli-reference.md). The TypeScript API mirrors the CLI for applications and sidecars: ```ts -import { ask, ingest, search } from "@jcode.labs/mimir" +import { ask, ingest, search } from "@jcode.labs/ragmir" await ingest({ rebuild: true }) const results = await search("vendor invoice status") @@ -945,16 +945,16 @@ Full API reference: [`docs/api-reference.md`](./docs/api-reference.md). ## Troubleshooting And Validation -Use `mimir doctor` first. It is the shortest path to the next useful action: +Use `ragmir doctor` first. It is the shortest path to the next useful action: ```bash -npx mimir doctor +npx ragmir doctor ``` -Use `doctor --fix` when you want Mimir to repair safe setup issues automatically: +Use `doctor --fix` when you want Ragmir to repair safe setup issues automatically: ```bash -npx mimir doctor --fix +npx ragmir doctor --fix ``` Common fixes for empty indexes, weak search, strict security audit failures, and TTS setup live in @@ -966,7 +966,7 @@ npm package metadata, semantic-release wiring, and release artifacts. ## Dependency Footprint -Mimir can run retrieval without a model runtime. Some runtime dependencies remain because they own +Ragmir can run retrieval without a model runtime. Some runtime dependencies remain because they own core features: | Dependency | Why it remains | @@ -989,22 +989,22 @@ choose `local-hash`, while preserving richer parsing, MCP support, and optional ## Example Test Workspaces This repository ships two synthetic examples under -[`packages/mimir-core/examples`](./packages/mimir-core/examples). Both use the default local-hash +[`packages/ragmir-core/examples`](./packages/ragmir-core/examples). Both use the default local-hash retrieval mode, so they run without downloading an embedding or chat model, and neither uses private documents. -> Testing local changes: use the repository's own build, not `npx`. Inside this repo `npx mimir` +> Testing local changes: use the repository's own build, not `npx`. Inside this repo `npx ragmir` > resolves to the **published** npm package, not your working copy — so it would not exercise your > local edits. The examples below run the local `dist/` build instead. ### CLI workspace (`sovereign-rag-demo`) -[`sovereign-rag-demo`](./packages/mimir-core/examples/sovereign-rag-demo) drives the **CLI** to test +[`sovereign-rag-demo`](./packages/ragmir-core/examples/sovereign-rag-demo) drives the **CLI** to test ingestion, retrieval, `security-audit`, and custom text extensions. ```bash pnpm build -cd packages/mimir-core/examples/sovereign-rag-demo +cd packages/ragmir-core/examples/sovereign-rag-demo node ../../dist/cli.js security-audit node ../../dist/cli.js ingest node ../../dist/cli.js search "offline retrieval approval" @@ -1015,16 +1015,16 @@ node ../../dist/cli.js audit ### Library API demo (`library-api-demo`) -[`library-api-demo`](./packages/mimir-core/examples/library-api-demo) exercises the **library** API +[`library-api-demo`](./packages/ragmir-core/examples/library-api-demo) exercises the **library** API the way an external consumer would `import` it, but Node self-referencing resolves -`@jcode.labs/mimir` to the local build, never npm. It is the fast inner loop when developing Mimir +`@jcode.labs/ragmir` to the local build, never npm. It is the fast inner loop when developing Ragmir Core itself: ```bash pnpm example ``` -That builds Mimir Core, then runs `ingest -> search -> ask -> audit` through the public API against +That builds Ragmir Core, then runs `ingest -> search -> ask -> audit` through the public API against the reused synthetic corpus. ## Development And Release @@ -1039,17 +1039,17 @@ pnpm validate Useful filtered commands: ```bash -pnpm --filter @jcode.labs/mimir test -pnpm --filter @jcode.labs/mimir mcp:smoke -pnpm --filter @jcode.labs/mimir-tts test -pnpm --filter @jcode.labs/mimir-app build -pnpm --filter @jcode.labs/mimir-landing build -pnpm --filter @jcode.labs/mimir build -pnpm --filter @jcode.labs/mimir-tts build +pnpm --filter @jcode.labs/ragmir test +pnpm --filter @jcode.labs/ragmir mcp:smoke +pnpm --filter @jcode.labs/ragmir-tts test +pnpm --filter @jcode.labs/ragmir-app build +pnpm --filter @jcode.labs/ragmir-landing build +pnpm --filter @jcode.labs/ragmir build +pnpm --filter @jcode.labs/ragmir-tts build ``` -`packages/mimir-core/dist/` and `packages/mimir-tts/dist/` are committed. `packages/mimir-app/dist/` -and `packages/mimir-landing/dist/` are ignored build artifacts. After changing TypeScript sources in +`packages/ragmir-core/dist/` and `packages/ragmir-tts/dist/` are committed. `packages/ragmir-app/dist/` +and `packages/ragmir-landing/dist/` are ignored build artifacts. After changing TypeScript sources in published packages, run: ```bash @@ -1061,14 +1061,14 @@ CI checks that generated `dist/` files match the source. The root package is private and only orchestrates workspace tasks. npm publishing is handled by the protected `Release npm` GitHub Actions workflow on `main`. semantic-release derives the version from -Conventional Commits, prepares both package tarballs, publishes `@jcode.labs/mimir-tts` first, then -publishes `@jcode.labs/mimir`. +Conventional Commits, prepares both package tarballs, publishes `@jcode.labs/ragmir-tts` first, then +publishes `@jcode.labs/ragmir`. Build from source: ```bash -git clone git@github.com:jcode-works/jcode-mimir.git -cd jcode-mimir +git clone git@github.com:jcode-works/jcode-ragmir.git +cd jcode-ragmir pnpm install pnpm build ``` @@ -1076,14 +1076,14 @@ pnpm build Use a local checkout in another repository: ```bash -pnpm add -D file:../jcode-mimir/packages/mimir-core +pnpm add -D file:../jcode-ragmir/packages/ragmir-core ``` Create a local npm tarball: ```bash pnpm build -pnpm --dir packages/mimir-core pack +pnpm --dir packages/ragmir-core pack ``` ## License diff --git a/RELEASING.md b/RELEASING.md index 2dafce8..69c6caa 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,6 +1,6 @@ # Releasing -Mimir publishes to npm through a protected manual GitHub Actions workflow. +Ragmir publishes to npm through a protected manual GitHub Actions workflow. Semantic-release is intentionally not enabled: publishing must stay explicit, reviewed, and approved by Jean-Baptiste Thery through the protected `npm-publish` environment. @@ -11,8 +11,8 @@ and approved by Jean-Baptiste Thery through the protected `npm-publish` environm 2. Wait for the required CI checks to pass. 3. Merge only after approval and green checks. 4. Trigger the `Publish npm` workflow manually from `main`. -5. Enter the version already committed in `packages/mimir-core/package.json` and - `packages/mimir-tts/package.json`. +5. Enter the version already committed in `packages/ragmir-core/package.json` and + `packages/ragmir-tts/package.json`. 6. Approve the protected `npm-publish` environment when GitHub asks for review. The publish workflow refuses to run from any branch other than `main`, verifies that the diff --git a/SECURITY-HARDENING.md b/SECURITY-HARDENING.md index 7a2257c..07920a5 100644 --- a/SECURITY-HARDENING.md +++ b/SECURITY-HARDENING.md @@ -1,12 +1,12 @@ -# Mimir Security Hardening +# Ragmir Security Hardening -Mimir is a sovereign local RAG knowledge base for confidential project documents and datasets. It is +Ragmir is a sovereign local RAG knowledge base for confidential project documents and datasets. It is built to minimize data movement, but it is not a certified high-assurance system. ## Current Guarantees -- Zero telemetry: Mimir does not send usage analytics or document content to JCode Labs. -- Retrieval-only core: Mimir does not call a chat model or generate LLM answers. +- Zero telemetry: Ragmir does not send usage analytics or document content to JCode Labs. +- Retrieval-only core: Ragmir does not call a chat model or generate LLM answers. - No-model retrieval mode: `embeddingProvider: "local-hash"` can ingest, search, and return cited passages without a model server. - Optional semantic embeddings: `embeddingProvider: "transformers"` uses Transformers.js, with @@ -19,27 +19,27 @@ built to minimize data movement, but it is not a certified high-assurance system oversized, and secret-like skipped files. - Metadata-only access logs: access logs contain action metadata and query hashes, not raw queries or retrieved text. -- Generated local state is ignored by Git: `.mimir/` is ignored by default, while legacy `.kb/` and +- Generated local state is ignored by Git: `.ragmir/` is ignored by default, while legacy `.kb/` and `private/` paths are recognized when encountered. - MCP is read-focused: destructive tools are not exposed over MCP, and MCP retrieval is capped by `mcpMaxTopK`. -- Optional audio summaries use `mimir audio` / `@jcode.labs/mimir-tts`. Transformers.js WAV is the +- Optional audio summaries use `ragmir audio` / `@jcode.labs/ragmir-tts`. Transformers.js WAV is the default offline/confidential path and does not require Python, ffmpeg, Piper, XTTS, or a local TTS server. Remote TTS model downloads are disabled by default and must be explicitly allowed for a non-sensitive preload. Edge MP3 gives the highest quality only when online TTS is explicitly acceptable. -- Optional Markdown reports use the bundled `mimir-markdown-report` skill and should be written - under `.mimir/reports/` by default. +- Optional Markdown reports use the bundled `ragmir-markdown-report` skill and should be written + under `.ragmir/reports/` by default. - npm releases are published with provenance from the protected GitHub Actions workflow. - Release artifacts include a package tarball, SHA256 checksums, SBOM, and manifest. ## Threat Model -Mimir protects against accidental repository leaks, accidental built-in LLM usage, accidental online +Ragmir protects against accidental repository leaks, accidental built-in LLM usage, accidental online TTS usage when the offline path is requested, accidental secret indexing, and weak release traceability. -Mimir does not protect against a compromised local machine, malicious dependencies already present +Ragmir does not protect against a compromised local machine, malicious dependencies already present in the runtime, a user with filesystem access to the same checkout, or forensic recovery from an unencrypted disk. @@ -68,16 +68,16 @@ pnpm release:artifacts Move the generated tarballs from `release-artifacts/` into the offline environment and install them: ```bash -pnpm add -D ./jcode.labs-mimir-tts-.tgz ./jcode.labs-mimir-.tgz -pnpm exec mimir setup -pnpm exec mimir doctor --fix -pnpm exec mimir audit --unsupported +pnpm add -D ./jcode.labs-ragmir-tts-.tgz ./jcode.labs-ragmir-.tgz +pnpm exec ragmir setup +pnpm exec ragmir doctor --fix +pnpm exec ragmir audit --unsupported ``` For semantic embeddings, preload the Transformers.js-compatible embedding model files inside the offline environment under the configured `embeddingModelPath`. For audio, preload the TTS model -files under `.mimir/models/tts` and render with -`pnpm exec mimir audio --engine transformers --offline`. +files under `.ragmir/models/tts` and render with +`pnpm exec ragmir audio --engine transformers --offline`. ## Zero Network Posture @@ -95,7 +95,7 @@ Optional semantic config: { "embeddingProvider": "transformers", "embeddingModel": "mixedbread-ai/mxbai-embed-xsmall-v1", - "embeddingModelPath": ".mimir/models", + "embeddingModelPath": ".ragmir/models", "transformersAllowRemoteModels": false } ``` @@ -110,13 +110,13 @@ Transformers.js may download model files from Hugging Face during model loading. Run: ```bash -pnpm exec mimir security-audit --strict +pnpm exec ragmir security-audit --strict ``` Also run: ```bash -pnpm exec mimir audit --unsupported +pnpm exec ragmir audit --unsupported ``` This exposes local relative paths for files that were skipped because the extension is unsupported, @@ -150,7 +150,7 @@ Redaction changes the indexed text, not the raw files under `private/`. ## Ingestion Boundaries -Mimir indexes many text, document, Office/OpenDocument, PDF, EPUB, subtitle, notebook, mail, config, +Ragmir indexes many text, document, Office/OpenDocument, PDF, EPUB, subtitle, notebook, mail, config, and source-code formats. It does not silently ingest every binary file. Unsupported images, scans, audio/video, old proprietary Office binaries, and unknown formats must be converted, OCRed, or transcribed first. @@ -161,25 +161,25 @@ Default ingestion guardrails: - `ingestConcurrency`: four parse/chunk workers by default; - `embeddingBatchSize`: 32 chunks per embedding batch by default; - checksum-based stale detection for supported files; -- unsupported/skipped file reporting through `mimir ingest`, `mimir audit`, and - `mimir audit --unsupported`. +- unsupported/skipped file reporting through `ragmir ingest`, `ragmir audit`, and + `ragmir audit --unsupported`. These are configurable, but raising limits increases local memory and parsing risk. ## Optional Audio Summaries -`mimir install-skill` installs an optional `mimir-audio-summary` skill. It is designed for listenable -briefings from a local Mimir index. The default renderer is `mimir audio`, backed by -`@jcode.labs/mimir-tts`. +`ragmir install-skill` installs an optional `ragmir-audio-summary` skill. It is designed for listenable +briefings from a local Ragmir index. The default renderer is `ragmir audio`, backed by +`@jcode.labs/ragmir-tts`. Confidentiality defaults: - narration text is written to a temp file outside the repository; -- generated MP3 or WAV audio should be written under `.mimir/audio/`; -- `.mimir/` is ignored by Git; +- generated MP3 or WAV audio should be written under `.ragmir/audio/`; +- `.ragmir/` is ignored by Git; - Transformers.js WAV does not require Python, ffmpeg, Piper, XTTS, or a local TTS server; - Transformers remote model loading is disabled by default and requires `--allow-remote-models` for - a non-sensitive preload into `.mimir/models/tts`; + a non-sensitive preload into `.ragmir/models/tts`; - `--engine transformers --offline` keeps remote model loading disabled and requires preloaded model files. - Edge MP3 uses the online Edge TTS service through the external `edge-tts` CLI and should be used @@ -190,8 +190,8 @@ document. ## Optional Markdown Reports -`mimir install-skill` also installs `mimir-markdown-report`. Reports generated from private evidence -are derived confidential documents. Keep them under `.mimir/reports/` by default, cite source paths +`ragmir install-skill` also installs `ragmir-markdown-report`. Reports generated from private evidence +are derived confidential documents. Keep them under `.ragmir/reports/` by default, cite source paths and chunk numbers, and do not commit them unless the user explicitly asks for a sanitized tracked report. @@ -200,14 +200,14 @@ report. MCP gives an agent access to retrieved private context. Use it only for agents running under the same trust boundary as the repository. -Mimir MCP defaults: +Ragmir MCP defaults: - read-focused tools only; - no index deletion tool exposed over MCP; - bounded retrieval through `mcpMaxTopK`; - metadata-only access logging. -For team use, prefer one checkout per user or per role. Mimir does not implement RBAC. +For team use, prefer one checkout per user or per role. Ragmir does not implement RBAC. ## Release Verification @@ -215,13 +215,13 @@ The protected npm workflow runs validation, generates release artifacts, and pub workspace packages with provenance: ```bash -pnpm --dir packages/mimir-tts publish --access public --provenance --no-git-checks -pnpm --dir packages/mimir-core publish --access public --provenance --no-git-checks +pnpm --dir packages/ragmir-tts publish --access public --provenance --no-git-checks +pnpm --dir packages/ragmir-core publish --access public --provenance --no-git-checks ``` Release artifacts include: -- npm tarballs for `@jcode.labs/mimir-tts` and `@jcode.labs/mimir`; +- npm tarballs for `@jcode.labs/ragmir-tts` and `@jcode.labs/ragmir`; - `SHA256SUMS`; - CycloneDX SBOM; - `release-manifest.json`. @@ -240,5 +240,5 @@ shasum -a 256 -c SHA256SUMS ## External Audit Status -No external security audit has been completed yet. Treat Mimir as useful hardening for private +No external security audit has been completed yet. Treat Ragmir as useful hardening for private developer workflows, not as military-grade certified software. diff --git a/SECURITY.md b/SECURITY.md index 6c3d77d..0de83ea 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ ## Supported Versions -Only the latest published version of `@jcode.labs/mimir` receives security fixes. +Only the latest published version of `@jcode.labs/ragmir` receives security fixes. ## Reporting A Vulnerability @@ -17,6 +17,6 @@ or private document disclosure. ## Data Boundary -Mimir is designed to index local project documents. Raw project documents, -`.kb/`, `.mimir/`, environment files, credentials, customer records, and commercial validation notes +Ragmir is designed to index local project documents. Raw project documents, +`.kb/`, `.ragmir/`, environment files, credentials, customer records, and commercial validation notes must remain outside commits. diff --git a/context7.json b/context7.json index 8f6440e..eb6bd16 100644 --- a/context7.json +++ b/context7.json @@ -1,29 +1,29 @@ { "$schema": "https://context7.com/schema/context7.json", - "projectTitle": "Mimir", + "projectTitle": "Ragmir", "description": "Open-source, sovereign local RAG for confidential datasets and AI agents. TypeScript CLI, library, MCP server, and portable agent skills that index local files, store vectors with LanceDB, and return cited retrieval context.", "excludeFolders": [ "node_modules", - "packages/mimir-core/dist", - "packages/mimir-tts/dist", - "packages/mimir-app/dist", - "packages/mimir-app/src-tauri/target", - "packages/mimir-app/src-tauri/gen", - "packages/mimir-landing/dist", - "packages/mimir-landing/.astro", - "packages/mimir-core/examples", + "packages/ragmir-core/dist", + "packages/ragmir-tts/dist", + "packages/ragmir-app/dist", + "packages/ragmir-app/src-tauri/target", + "packages/ragmir-app/src-tauri/gen", + "packages/ragmir-landing/dist", + "packages/ragmir-landing/.astro", + "packages/ragmir-core/examples", "release-artifacts", "private", - ".mimir", + ".ragmir", ".gitnexus", ".git" ], "excludeFiles": ["CHANGELOG.md", "pnpm-lock.yaml"], "rules": [ - "Mimir Core returns cited retrieval context only; it does not synthesize answers itself.", + "Ragmir Core returns cited retrieval context only; it does not synthesize answers itself.", "The `local-hash` embedding provider (default) is a lexical sha256 embedding, not semantic; use `transformers` for semantic retrieval.", - "Switching `embeddingProvider` requires `mimir ingest --rebuild`, since the two providers produce incompatible vectors.", - "Run `mimir doctor --fix` after upgrading or misconfiguration to repair scaffolding, `.gitignore` entries, and the agent skill install.", - "Config resolves from the caller's working directory (`.mimir/config.json`), never from the package install path." + "Switching `embeddingProvider` requires `ragmir ingest --rebuild`, since the two providers produce incompatible vectors.", + "Run `ragmir doctor --fix` after upgrading or misconfiguration to repair scaffolding, `.gitignore` entries, and the agent skill install.", + "Config resolves from the caller's working directory (`.ragmir/config.json`), never from the package install path." ] } diff --git a/docs/agent-integration.md b/docs/agent-integration.md index a1dbb8b..e131f1e 100644 --- a/docs/agent-integration.md +++ b/docs/agent-integration.md @@ -1,101 +1,101 @@ # Agent Integration -Mimir ships with portable agent skills and a standard MCP server. +Ragmir ships with portable agent skills and a standard MCP server. -If `mimir setup` was not used, install the agent kit into a repository: +If `ragmir setup` was not used, install the agent kit into a repository: ```bash -npx mimir install-skill +npx ragmir install-skill ``` By default this writes helper files for every supported agent. To keep a repository focused on only the agents it uses, pass a comma-separated target list: ```bash -npx mimir setup --agents claude,codex -npx mimir install-skill --agents claude,codex +npx ragmir setup --agents claude,codex +npx ragmir install-skill --agents claude,codex ``` -If an agent must launch Mimir through a repository wrapper, generate the MCP helpers with that +If an agent must launch Ragmir through a repository wrapper, generate the MCP helpers with that command: ```bash -npx mimir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh +npx ragmir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh ``` This creates: ```plain text -.mimir/skills/mimir/SKILL.md -.mimir/skills/mimir-audio-summary/SKILL.md -.mimir/skills/mimir-markdown-report/SKILL.md -.mimir/skills/mimir-legal-dossier/SKILL.md -.mimir/mcp.json -.mimir/claude-mcp-server.json -.mimir/codex-mcp.toml -.mimir/kimi-mcp.json -.mimir/opencode.jsonc -.mimir/cline-mcp.json -.mimir/agent-setup.md -.mimir/README.md +.ragmir/skills/ragmir/SKILL.md +.ragmir/skills/ragmir-audio-summary/SKILL.md +.ragmir/skills/ragmir-markdown-report/SKILL.md +.ragmir/skills/ragmir-legal-dossier/SKILL.md +.ragmir/mcp.json +.ragmir/claude-mcp-server.json +.ragmir/codex-mcp.toml +.ragmir/kimi-mcp.json +.ragmir/opencode.jsonc +.ragmir/cline-mcp.json +.ragmir/agent-setup.md +.ragmir/README.md ``` -When `--agents` is used, Mimir keeps `.mimir/mcp.json`, the skill folders, and the shared guides, but +When `--agents` is used, Ragmir keeps `.ragmir/mcp.json`, the skill folders, and the shared guides, but only writes the selected agent helper files. Previously generated unselected helper files are -removed from `.mimir/`. +removed from `.ragmir/`. -Agents that support skill folders can load `.mimir/skills/mimir/` for deep local RAG usage. Load -`.mimir/skills/mimir-audio-summary/` only when an optional spoken summary is needed. Load -`.mimir/skills/mimir-markdown-report/` when the user asks for a cited Markdown report, dossier, -audit memo, or planning note. Load `.mimir/skills/mimir-legal-dossier/` when the user asks for a +Agents that support skill folders can load `.ragmir/skills/ragmir/` for deep local RAG usage. Load +`.ragmir/skills/ragmir-audio-summary/` only when an optional spoken summary is needed. Load +`.ragmir/skills/ragmir-markdown-report/` when the user asks for a cited Markdown report, dossier, +audit memo, or planning note. Load `.ragmir/skills/ragmir-legal-dossier/` when the user asks for a legal chronology, clause review, evidence table, or professional-review handoff. Other agents can -read the generated `.mimir/README.md` and use the MCP config snippet. +read the generated `.ragmir/README.md` and use the MCP config snippet. For native discovery in a specific agent, install only the agent you use: ```bash -npx mimir install-agent --agents claude -npx mimir install-agent --agents kimi -npx mimir install-agent --agents claude,codex,kimi,opencode,cline +npx ragmir install-agent --agents claude +npx ragmir install-agent --agents kimi +npx ragmir install-agent --agents claude,codex,kimi,opencode,cline ``` -By default, `install-agent` writes project-scope skill folders as links back to `.mimir/skills/`. +By default, `install-agent` writes project-scope skill folders as links back to `.ragmir/skills/`. That keeps one original version of every skill. Add `--scope user` for global installations, or `--mode copy` only when an agent/runtime cannot follow symlinked skill directories. | Agent | Project skill directory | Main MCP helper | | --- | --- | --- | -| Claude Code | `.claude/skills/` | `.mimir/claude-mcp-server.json` | -| Codex | `.codex/skills/` plus `skills.config` | `.mimir/codex-mcp.toml` | -| Kimi Code CLI | `.kimi/skills/` | `.mimir/kimi-mcp.json` | -| OpenCode | `.opencode/skills/` | `.mimir/opencode.jsonc` | -| Cline | `.cline/skills/` | `.mimir/cline-mcp.json` | +| Claude Code | `.claude/skills/` | `.ragmir/claude-mcp-server.json` | +| Codex | `.codex/skills/` plus `skills.config` | `.ragmir/codex-mcp.toml` | +| Kimi Code CLI | `.kimi/skills/` | `.ragmir/kimi-mcp.json` | +| OpenCode | `.opencode/skills/` | `.ragmir/opencode.jsonc` | +| Cline | `.cline/skills/` | `.ragmir/cline-mcp.json` | Start the MCP server from the repository root: ```bash -npx mimir serve-mcp +npx ragmir serve-mcp ``` For a repository-level protocol smoke test, run the synthetic demo client: ```bash -pnpm --filter @jcode.labs/mimir mcp:smoke +pnpm --filter @jcode.labs/ragmir mcp:smoke ``` MCP tools exposed: -- `mimir_status` -- `mimir_search` -- `mimir_ask` -- `mimir_research` -- `mimir_audit` -- `mimir_evaluate` -- `mimir_usage_report` -- `mimir_security_audit` +- `ragmir_status` +- `ragmir_search` +- `ragmir_ask` +- `ragmir_research` +- `ragmir_audit` +- `ragmir_evaluate` +- `ragmir_usage_report` +- `ragmir_security_audit` This MCP layer is the recommended way to let any compatible LLM or agent query the same local -knowledge base. The LLM does not need to know about LanceDB or the raw file layout; it asks Mimir for +knowledge base. The LLM does not need to know about LanceDB or the raw file layout; it asks Ragmir for ranked passages, cited context, audit-backed research reports, local recall gates, or metadata-only usage summaries and uses the returned citations. @@ -104,13 +104,13 @@ usage summaries and uses the returned citations. From the target repository root: ```bash -npx mimir setup --agents claude -npx mimir install-agent --agents claude -claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)" +npx ragmir setup --agents claude +npx ragmir install-agent --agents claude +claude mcp add-json --scope local ragmir "$(cat .ragmir/claude-mcp-server.json)" ``` -Claude Code provides the active project path to MCP servers through `CLAUDE_PROJECT_DIR`. Mimir uses -that value only when the server working directory does not already point at a configured Mimir +Claude Code provides the active project path to MCP servers through `CLAUDE_PROJECT_DIR`. Ragmir uses +that value only when the server working directory does not already point at a configured Ragmir project. This keeps subfolder knowledge bases inside larger workspaces from being overridden by the umbrella repository path. Keep the MCP scope local unless you intentionally want to share the server config. @@ -120,13 +120,13 @@ config. From the target repository root: ```bash -npx mimir setup --agents codex -npx mimir install-agent --agents codex -cat .mimir/codex-mcp.toml +npx ragmir setup --agents codex +npx ragmir install-agent --agents codex +cat .ragmir/codex-mcp.toml ``` Copy the printed TOML into `~/.codex/config.toml` or another trusted Codex config layer. The snippet -contains the repository `cwd`, the Mimir MCP server, and `skills.config` entries for the bundled +contains the repository `cwd`, the Ragmir MCP server, and `skills.config` entries for the bundled skills. ## Kimi Code CLI @@ -134,24 +134,24 @@ skills. From the target repository root: ```bash -npx mimir setup --agents kimi -npx mimir install-agent --agents kimi -kimi --mcp-config-file .mimir/kimi-mcp.json +npx ragmir setup --agents kimi +npx ragmir install-agent --agents kimi +kimi --mcp-config-file .ragmir/kimi-mcp.json ``` Kimi can discover project skills from `.kimi/skills/`. The MCP config can also be installed in Kimi's global MCP file if you intentionally want a global setup. If you prefer not to create a `.kimi/skills/` discovery folder, Kimi can also be launched directly with -`kimi --skills-dir .mimir/skills --mcp-config-file .mimir/kimi-mcp.json`. +`kimi --skills-dir .ragmir/skills --mcp-config-file .ragmir/kimi-mcp.json`. ## OpenCode From the target repository root: ```bash -npx mimir setup --agents opencode -npx mimir install-agent --agents opencode -cat .mimir/opencode.jsonc +npx ragmir setup --agents opencode +npx ragmir install-agent --agents opencode +cat .ragmir/opencode.jsonc ``` Copy or merge the generated snippet into the OpenCode config layer you use for the project. @@ -161,40 +161,40 @@ Copy or merge the generated snippet into the OpenCode config layer you use for t From the target repository root: ```bash -npx mimir setup --agents cline -npx mimir install-agent --agents cline -cat .mimir/cline-mcp.json +npx ragmir setup --agents cline +npx ragmir install-agent --agents cline +cat .ragmir/cline-mcp.json ``` Cline can discover project skills from `.cline/skills/`. Add the generated MCP JSON under `mcpServers` in Cline's MCP configuration when tool access is needed. -For other MCP clients that cannot set `cwd`, set `MIMIR_PROJECT_ROOT=/absolute/path/to/repository` -when launching `mimir serve-mcp`. `MIMIR_PROJECT_ROOT` always wins over `cwd` and agent-provided +For other MCP clients that cannot set `cwd`, set `RAGMIR_PROJECT_ROOT=/absolute/path/to/repository` +when launching `ragmir serve-mcp`. `RAGMIR_PROJECT_ROOT` always wins over `cwd` and agent-provided project environment variables. ## Agent Demo -From a repository that already ran `mimir setup` and has Mimir wired into the current agent, ask: +From a repository that already ran `ragmir setup` and has Ragmir wired into the current agent, ask: ```plain text -Use Mimir to audit the local evidence. First run mimir_status and mimir_audit. Then run -mimir_research for "release readiness and risks" and produce a cited Markdown report. Do not rely on -memory if Mimir does not contain enough evidence. +Use Ragmir to audit the local evidence. First run ragmir_status and ragmir_audit. Then run +ragmir_research for "release readiness and risks" and produce a cited Markdown report. Do not rely on +memory if Ragmir does not contain enough evidence. ``` Agents that support skill folders should also load: ```plain text -.mimir/skills/mimir/ -.mimir/skills/mimir-markdown-report/ +.ragmir/skills/ragmir/ +.ragmir/skills/ragmir-markdown-report/ ``` -The Markdown report skill writes reports under `.mimir/reports/` by default, which stays ignored by +The Markdown report skill writes reports under `.ragmir/reports/` by default, which stays ignored by Git. Print the bundled skill path from the installed package: ```bash -npx mimir skill-path +npx ragmir skill-path ``` diff --git a/docs/api-reference.md b/docs/api-reference.md index 7960d05..9ba81bf 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -1,9 +1,9 @@ -# Mimir Core API Reference +# Ragmir Core API Reference -This reference covers the public TypeScript API exported by `@jcode.labs/mimir`. It is for -developers embedding Mimir Core in local tools, scripts, desktop shells, MCP launchers, or tests. +This reference covers the public TypeScript API exported by `@jcode.labs/ragmir`. It is for +developers embedding Ragmir Core in local tools, scripts, desktop shells, MCP launchers, or tests. -Mimir Core does not call an LLM and does not write final generated answers. Retrieval APIs return +Ragmir Core does not call an LLM and does not write final generated answers. Retrieval APIs return cited local context; answer synthesis belongs to the agent or model runtime you choose around that context. @@ -12,11 +12,11 @@ context. Use named imports only: ```ts -import { addSourceEntries, ask, doctor, ingest, search, securityAudit } from "@jcode.labs/mimir" +import { addSourceEntries, ask, doctor, ingest, search, securityAudit } from "@jcode.labs/ragmir" ``` Most project-scoped functions accept an optional `cwd` pointing at the target workspace. If omitted, -Mimir resolves the project from `process.cwd()`. +Ragmir resolves the project from `process.cwd()`. ```ts await ingest({ cwd: "/path/to/local/workspace" }) @@ -27,18 +27,18 @@ const results = await search("offline approval", { cwd: "/path/to/local/workspac ### `initProject(cwd?)` -Creates the local Mimir scaffolding: +Creates the local Ragmir scaffolding: -- `.mimir/config.json` -- `.mimir/sources.txt` -- `.mimir/raw/` -- `.gitignore` entries for `.mimir/` +- `.ragmir/config.json` +- `.ragmir/sources.txt` +- `.ragmir/raw/` +- `.gitignore` entries for `.ragmir/` When a project already has legacy `.kb/config.json`, `initProject` preserves that config instead of creating a second active config. ```ts -import { initProject } from "@jcode.labs/mimir" +import { initProject } from "@jcode.labs/ragmir" const created = await initProject("/path/to/workspace") ``` @@ -53,7 +53,7 @@ warnings. Pass `semantic: true` to intentionally preload the configured Transfor model and switch the workspace to higher-quality semantic retrieval during setup. ```ts -import { setupProject } from "@jcode.labs/mimir" +import { setupProject } from "@jcode.labs/ragmir" const result = await setupProject({ cwd: "/path/to/workspace", ingest: true, semantic: true }) console.log(result.semantic?.model.embeddingModelPath) @@ -84,12 +84,12 @@ Useful result fields: ### `loadConfig(start?)` -Finds `.mimir/config.json` by walking upward from `start`, falls back to legacy `.kb/config.json` -when present, applies defaults and `MIMIR_*` environment overrides, and returns resolved absolute +Finds `.ragmir/config.json` by walking upward from `start`, falls back to legacy `.kb/config.json` +when present, applies defaults and `RAGMIR_*` environment overrides, and returns resolved absolute paths. Legacy `KB_*` aliases are still accepted. ```ts -import { loadConfig } from "@jcode.labs/mimir" +import { loadConfig } from "@jcode.labs/ragmir" const config = await loadConfig("/path/to/workspace/subdir") console.log(config.projectRoot) @@ -97,10 +97,10 @@ console.log(config.projectRoot) ### `listSourceEntries(cwd?)` -Reads `.mimir/sources.txt` and returns active non-comment entries. +Reads `.ragmir/sources.txt` and returns active non-comment entries. ```ts -import { listSourceEntries } from "@jcode.labs/mimir" +import { listSourceEntries } from "@jcode.labs/ragmir" const sources = await listSourceEntries("/path/to/workspace") console.log(sources.entries) @@ -108,11 +108,11 @@ console.log(sources.entries) ### `addSourceEntries(options)` -Adds paths, glob patterns, or `!` exclusion patterns to `.mimir/sources.txt` without duplicating -existing entries. This is the programmatic equivalent of `mimir sources add`. +Adds paths, glob patterns, or `!` exclusion patterns to `.ragmir/sources.txt` without duplicating +existing entries. This is the programmatic equivalent of `ragmir sources add`. ```ts -import { addSourceEntries } from "@jcode.labs/mimir" +import { addSourceEntries } from "@jcode.labs/ragmir" await addSourceEntries({ cwd: "/path/to/workspace", @@ -128,7 +128,7 @@ Discovers supported source files, parses them, redacts configured patterns, chun chunks, and writes the local LanceDB table. ```ts -import { ingest } from "@jcode.labs/mimir" +import { ingest } from "@jcode.labs/ragmir" const result = await ingest({ cwd: "/path/to/workspace" }) ``` @@ -148,7 +148,7 @@ that produced no indexable text, and per-file parsing errors. Compares supported files on disk with the current index. ```ts -import { audit } from "@jcode.labs/mimir" +import { audit } from "@jcode.labs/ragmir" const report = await audit("/path/to/workspace") ``` @@ -159,10 +159,10 @@ they are not treated as missing while their checksum remains unchanged. ### `search(query, options?)` -Returns ranked cited passages. Mimir combines vector candidates with bounded lexical scoring. +Returns ranked cited passages. Ragmir combines vector candidates with bounded lexical scoring. ```ts -import { search } from "@jcode.labs/mimir" +import { search } from "@jcode.labs/ragmir" const passages = await search("Who approved offline operation?", { cwd: "/path/to/workspace", @@ -174,7 +174,7 @@ Each `SearchResult` includes: | Field | Meaning | | --- | --- | -| `relativePath` | Source path relative to the Mimir project root. | +| `relativePath` | Source path relative to the Ragmir project root. | | `source` | Source category used by discovery. | | `chunkIndex` | Chunk number inside that source file. | | `text` | Retrieved redacted chunk text. | @@ -189,7 +189,7 @@ Returns retrieval context formatted for an agent or LLM, plus the same cited sou `search`. ```ts -import { ask } from "@jcode.labs/mimir" +import { ask } from "@jcode.labs/ragmir" const answer = await ask("What evidence supports the project timeline?", { cwd: "/path/to/workspace", @@ -206,7 +206,7 @@ security audit, generates multiple retrieval queries from the topic, merges cite source diagnostics, and optionally scans repository code-like files for matching terms. ```ts -import { compactResearchReport, research } from "@jcode.labs/mimir" +import { compactResearchReport, research } from "@jcode.labs/ragmir" const report = await research("release readiness and risks", { cwd: "/path/to/workspace", @@ -226,7 +226,7 @@ Use `compactResearchReport(report)` before sending results through a constrained Downloads or warms the configured Transformers.js embedding model into `embeddingModelPath`. ```ts -import { loadConfig, pullEmbeddingModel } from "@jcode.labs/mimir" +import { loadConfig, pullEmbeddingModel } from "@jcode.labs/ragmir" const config = await loadConfig("/path/to/workspace") await pullEmbeddingModel(config) @@ -237,7 +237,7 @@ This intentionally allows remote model loading for the bootstrap call. Keep ### `enableSemanticEmbeddings(cwd?)` -Switches the active Mimir config to the safe semantic path: +Switches the active Ragmir config to the safe semantic path: - `embeddingProvider: "transformers"` - existing or default `embeddingModel` @@ -245,14 +245,14 @@ Switches the active Mimir config to the safe semantic path: - `transformersAllowRemoteModels: false` ```ts -import { enableSemanticEmbeddings, ingest } from "@jcode.labs/mimir" +import { enableSemanticEmbeddings, ingest } from "@jcode.labs/ragmir" await enableSemanticEmbeddings("/path/to/workspace") await ingest({ cwd: "/path/to/workspace", rebuild: true }) ``` -The CLI shortcut `mimir models pull --enable` combines model preload with this config update. The -first-run CLI shortcut is `mimir setup --semantic`. +The CLI shortcut `ragmir models pull --enable` combines model preload with this config update. The +first-run CLI shortcut is `ragmir setup --semantic`. ## Readiness And Safety @@ -262,7 +262,7 @@ Returns a readiness report combining setup state, index freshness, security warn steps. ```ts -import { doctor } from "@jcode.labs/mimir" +import { doctor } from "@jcode.labs/ragmir" const report = await doctor("/path/to/workspace") if (!report.ready) { @@ -276,12 +276,12 @@ Returns local privacy posture: provider settings, redaction status, access-log b state Git ignore coverage, MCP bounds, and warnings. ```ts -import { securityAudit } from "@jcode.labs/mimir" +import { securityAudit } from "@jcode.labs/ragmir" const report = await securityAudit("/path/to/workspace") ``` -`accessLog.storesRawQueries` is always `false`. Mimir's access log stores query hashes and metadata, +`accessLog.storesRawQueries` is always `false`. Ragmir's access log stores query hashes and metadata, not raw query strings. ### `accessLogUsageReport(options?)` @@ -291,7 +291,7 @@ count, average result count, invalid-line count, and the latest event timestamp queries or local paths. ```ts -import { accessLogUsageReport } from "@jcode.labs/mimir" +import { accessLogUsageReport } from "@jcode.labs/ragmir" const report = await accessLogUsageReport({ cwd: "/path/to/workspace", days: 7 }) ``` @@ -301,7 +301,7 @@ const report = await accessLogUsageReport({ cwd: "/path/to/workspace", days: 7 } Applies built-in and custom redaction patterns to text before indexing. ```ts -import { loadConfig, redactText } from "@jcode.labs/mimir" +import { loadConfig, redactText } from "@jcode.labs/ragmir" const config = await loadConfig("/path/to/workspace") const redacted = redactText("contact: user@example.com", config) @@ -311,11 +311,11 @@ Returns `{ text, counts }`. ### `destroyIndex(cwd?)` -Deletes generated `.mimir/storage` index files, or the configured legacy storage directory when a +Deletes generated `.ragmir/storage` index files, or the configured legacy storage directory when a legacy project still uses `.kb/config.json`. ```ts -import { destroyIndex } from "@jcode.labs/mimir" +import { destroyIndex } from "@jcode.labs/ragmir" await destroyIndex("/path/to/workspace") ``` @@ -327,10 +327,10 @@ at-rest guarantees. ### `installSkill(options?)` -Installs the portable Mimir skill pack and MCP helper files under `.mimir/`. +Installs the portable Ragmir skill pack and MCP helper files under `.ragmir/`. ```ts -import { installSkill } from "@jcode.labs/mimir" +import { installSkill } from "@jcode.labs/ragmir" const result = await installSkill({ cwd: "/path/to/workspace" }) ``` @@ -340,18 +340,18 @@ agent kit without re-running full setup. The installed skills are: -- `mimir` -- `mimir-audio-summary` -- `mimir-markdown-report` -- `mimir-legal-dossier` +- `ragmir` +- `ragmir-audio-summary` +- `ragmir-markdown-report` +- `ragmir-legal-dossier` ### `installAgentSkills(options?)` -Creates native agent discovery folders for selected agents and links or copies the `.mimir/skills` +Creates native agent discovery folders for selected agents and links or copies the `.ragmir/skills` source. ```ts -import { installAgentSkills } from "@jcode.labs/mimir" +import { installAgentSkills } from "@jcode.labs/ragmir" await installAgentSkills({ cwd: "/path/to/workspace", @@ -368,7 +368,7 @@ Supported agents are exported as `SUPPORTED_AGENT_TARGETS`. Parses CLI-style comma-separated agent names into supported agent identifiers. ```ts -import { parseAgentTargets } from "@jcode.labs/mimir" +import { parseAgentTargets } from "@jcode.labs/ragmir" const agents = parseAgentTargets("claude,codex,kimi") ``` @@ -379,29 +379,29 @@ Starts the MCP stdio server. It is normally called by the CLI, not directly insi application process. ```ts -import { serveMcp } from "@jcode.labs/mimir" +import { serveMcp } from "@jcode.labs/ragmir" await serveMcp("/path/to/workspace") ``` -When `cwd` is omitted, the server resolves the root from `MIMIR_PROJECT_ROOT`, then from the current -working directory if it contains a Mimir config, then from agent-provided project environment such as +When `cwd` is omitted, the server resolves the root from `RAGMIR_PROJECT_ROOT`, then from the current +working directory if it contains a Ragmir config, then from agent-provided project environment such as `CLAUDE_PROJECT_DIR`, and finally from `process.cwd()`. MCP tools exposed by the server: | Tool | Input | | --- | --- | -| `mimir_status` | `{}` | -| `mimir_search` | `{ query: string, topK?: number, compact?: boolean }` | -| `mimir_ask` | `{ query: string, topK?: number }` | -| `mimir_research` | `{ query: string, topK?: number, includeCode?: boolean, compact?: boolean }` | -| `mimir_audit` | `{}` | -| `mimir_evaluate` | `{ goldenPath: string, topK?: number, failUnder?: number }` | -| `mimir_usage_report` | `{ days?: number }` | -| `mimir_security_audit` | `{}` | - -`topK` is bounded by `mcpMaxTopK` from config. `mimir_evaluate` also requires `goldenPath` to stay +| `ragmir_status` | `{}` | +| `ragmir_search` | `{ query: string, topK?: number, compact?: boolean }` | +| `ragmir_ask` | `{ query: string, topK?: number }` | +| `ragmir_research` | `{ query: string, topK?: number, includeCode?: boolean, compact?: boolean }` | +| `ragmir_audit` | `{}` | +| `ragmir_evaluate` | `{ goldenPath: string, topK?: number, failUnder?: number }` | +| `ragmir_usage_report` | `{ days?: number }` | +| `ragmir_security_audit` | `{}` | + +`topK` is bounded by `mcpMaxTopK` from config. `ragmir_evaluate` also requires `goldenPath` to stay inside the MCP project root. ## Package Manager Helpers @@ -410,14 +410,14 @@ inside the MCP project root. Detects `pnpm`, `npm`, `yarn`, or `bun` from package metadata and lockfiles. -### `mimirCommand(cwd, args)` +### `ragmirCommand(cwd, args)` -Builds the package-manager-specific command that runs `mimir`. +Builds the package-manager-specific command that runs `ragmir`. ```ts -import { mimirCommand } from "@jcode.labs/mimir" +import { ragmirCommand } from "@jcode.labs/ragmir" -const command = await mimirCommand("/path/to/workspace", ["doctor"]) +const command = await ragmirCommand("/path/to/workspace", ["doctor"]) console.log(command.display) ``` diff --git a/docs/app-distribution.md b/docs/app-distribution.md index 4553ace..964975b 100644 --- a/docs/app-distribution.md +++ b/docs/app-distribution.md @@ -1,6 +1,6 @@ # App Distribution -Mimir app releases are planned as direct downloads and sideloadable installers. Do not design the +Ragmir app releases are planned as direct downloads and sideloadable installers. Do not design the release path around App Store or Play Store review, hosted store accounts, or store license flows. ## Channels @@ -18,17 +18,17 @@ release path around App Store or Play Store review, hosted store accounts, or st Run native packaging explicitly from the app package: ```bash -pnpm --filter @jcode.labs/mimir-app tauri:build:macos -pnpm --filter @jcode.labs/mimir-app tauri:build:windows -pnpm --filter @jcode.labs/mimir-app tauri:build:linux -pnpm --filter @jcode.labs/mimir-app tauri:android:build +pnpm --filter @jcode.labs/ragmir-app tauri:build:macos +pnpm --filter @jcode.labs/ragmir-app tauri:build:windows +pnpm --filter @jcode.labs/ragmir-app tauri:build:linux +pnpm --filter @jcode.labs/ragmir-app tauri:android:build ``` Desktop bundles can also be built through the manual **Native App Build** GitHub Actions workflow. It uploads CI artifacts for macOS, Windows, and Linux, but it does not create a release, deploy, or publish. Public distribution still requires the signing and checksum steps below. -The root `pnpm build` intentionally validates only the frontend bundle for `packages/mimir-app`. +The root `pnpm build` intentionally validates only the frontend bundle for `packages/ragmir-app`. Native Tauri builds require the platform toolchain, Rust/Cargo, and the platform signing setup. The Android release script builds APK artifacts for sideload/direct distribution. iOS has no release script until a compliant non-store channel is selected. @@ -38,23 +38,23 @@ script until a compliant non-store channel is selected. Before publishing a public direct download: - Run `pnpm validate` from the repository root. -- Run `pnpm --filter @jcode.labs/mimir-app release:preflight -- --target ` +- Run `pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target ` on the matching release machine before building native artifacts. -- Run `pnpm --filter @jcode.labs/mimir-app release:preflight:smoke` after changing preflight logic; +- Run `pnpm --filter @jcode.labs/ragmir-app release:preflight:smoke` after changing preflight logic; it verifies supported targets, rejects iOS release packaging, and checks that secret-bearing environment values are reported only by variable name. -- Run `pnpm --filter @jcode.labs/mimir-app release:updater-guard` whenever Tauri updater config +- Run `pnpm --filter @jcode.labs/ragmir-app release:updater-guard` whenever Tauri updater config changes; `release:preflight` also runs the guard before native packaging. -- Run `pnpm --filter @jcode.labs/mimir-app release:updater-guard:smoke` after changing the guard +- Run `pnpm --filter @jcode.labs/ragmir-app release:updater-guard:smoke` after changing the guard logic; it verifies the disabled, placeholder, and fully configured updater paths with temporary synthetic config files. - Build the target platform artifact on the matching release machine or CI runner. - Sign macOS and Windows artifacts with release credentials that are never committed. -- Generate checksums with `pnpm --filter @jcode.labs/mimir-app release:checksums` and publish +- Generate checksums with `pnpm --filter @jcode.labs/ragmir-app release:checksums` and publish `SHA256SUMS` next to every downloadable artifact. - Generate a download manifest with - `pnpm --filter @jcode.labs/mimir-app release:manifest -- --target ` - after `SHA256SUMS`; publish `mimir-app-release.json` next to the artifacts so the static landing + `pnpm --filter @jcode.labs/ragmir-app release:manifest -- --target ` + after `SHA256SUMS`; publish `ragmir-app-release.json` next to the artifacts so the static landing or release page can render verified direct-download metadata without hardcoded file names. - Keep generated release artifacts under ignored output folders until an explicit release upload. - Keep app license private keys outside the repository; only the public license JWK may be injected @@ -64,7 +64,7 @@ Before publishing a public direct download: macOS direct downloads require Apple Developer signing and notarization before public release: -- Run `pnpm --filter @jcode.labs/mimir-app release:preflight -- --target macos`. +- Run `pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target macos`. - Install or import the Developer ID Application certificate into the release keychain. - Resolve the signing identity with `security find-identity -v -p codesigning`. - Pass the identity through `APPLE_SIGNING_IDENTITY` or the Tauri macOS signing config. @@ -74,7 +74,7 @@ macOS direct downloads require Apple Developer signing and notarization before p Windows direct downloads require Authenticode signing before public release: -- Run `pnpm --filter @jcode.labs/mimir-app release:preflight -- --target windows`. +- Run `pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target windows`. - Use an OV certificate first; EV is optional and mainly improves initial SmartScreen reputation. - Keep the certificate private key in the Windows certificate store, hardware token, or signing service, not in the repository. @@ -84,16 +84,16 @@ Windows direct downloads require Authenticode signing before public release: Linux artifacts do not use the same platform signing flow, but published checksums are still required for every AppImage and Debian package. Run -`pnpm --filter @jcode.labs/mimir-app release:preflight -- --target linux` on the Linux release +`pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target linux` on the Linux release machine before `tauri:build:linux`, or run the manual Native App Build workflow with target `linux` to produce Linux CI artifacts. -The manual Native App Build workflow generates `SHA256SUMS` and `mimir-app-release.json` inside the +The manual Native App Build workflow generates `SHA256SUMS` and `ragmir-app-release.json` inside the uploaded native bundle artifact. For local builds, run the checksum and manifest commands after the native build and before moving files to a public download surface. Android APK artifacts require an Android SDK and JDK on the release machine. Run -`pnpm --filter @jcode.labs/mimir-app release:preflight -- --target android` before +`pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target android` before `tauri:android:build`. ## Updater Policy @@ -103,7 +103,7 @@ with placeholder keys or fake endpoints. Enable it only after these inputs exist: -- A real updater signing keypair generated for Mimir app releases. +- A real updater signing keypair generated for Ragmir app releases. - The updater public key committed in Tauri config. - The private key supplied only through `TAURI_SIGNING_PRIVATE_KEY` or `TAURI_SIGNING_PRIVATE_KEY_PATH` in the release environment. diff --git a/docs/app-sidecar-architecture.md b/docs/app-sidecar-architecture.md index fd1b680..bf7568b 100644 --- a/docs/app-sidecar-architecture.md +++ b/docs/app-sidecar-architecture.md @@ -2,14 +2,14 @@ ## Decision -The Mimir app embeds Mimir Core through the existing `mimir` CLI/MCP surface, with a packaged -Node sidecar as the intended distribution path. Do not rewrite Mimir Core as Rust bindings for v1. +The Ragmir app embeds Ragmir Core through the existing `ragmir` CLI/MCP surface, with a packaged +Node sidecar as the intended distribution path. Do not rewrite Ragmir Core as Rust bindings for v1. ## Rationale -- Mimir Core already owns parsing, redaction, embeddings, LanceDB storage, query, MCP, and audit +- Ragmir Core already owns parsing, redaction, embeddings, LanceDB storage, query, MCP, and audit behavior. -- Reusing `mimir` keeps the MIT core and the app shell on the same tested implementation. +- Reusing `ragmir` keeps the MIT core and the app shell on the same tested implementation. - A Rust rewrite would duplicate LanceDB and Transformers.js integration risk before product demand is validated. - The app can keep a narrow native boundary: project selection, process execution, progress/status, @@ -17,21 +17,21 @@ Node sidecar as the intended distribution path. Do not rewrite Mimir Core as Rus ## Tauri Boundary -The current app uses a narrow custom Tauri command, `run_mimir_command`, implemented in -`packages/mimir-app/src-tauri/src/lib.rs`. It does not expose a general shell. The command accepts a -fixed enum of Mimir workflows, always prepends `--project-root `, always requests `--json`, and -executes the `mimir` binary from `PATH` or `MIMIR_CLI_BIN`. The native boundary rejects empty, +The current app uses a narrow custom Tauri command, `run_ragmir_command`, implemented in +`packages/ragmir-app/src-tauri/src/lib.rs`. It does not expose a general shell. The command accepts a +fixed enum of Ragmir workflows, always prepends `--project-root `, always requests `--json`, and +executes the `ragmir` binary from `PATH` or `RAGMIR_CLI_BIN`. The native boundary rejects empty, relative, or non-existent project roots before running the CLI. The future packaged sidecar path remains: -1. Build or package a platform-specific Mimir Core sidecar binary that exposes bounded `mimir` +1. Build or package a platform-specific Ragmir Core sidecar binary that exposes bounded `ragmir` workflows. -2. Add that binary to `bundle.externalBin` in `packages/mimir-app/src-tauri/tauri.conf.json`. +2. Add that binary to `bundle.externalBin` in `packages/ragmir-app/src-tauri/tauri.conf.json`. 3. Add `@tauri-apps/plugin-shell` on the frontend and `tauri-plugin-shell` on the Rust side only if the packaged sidecar needs the official shell-plugin path. 4. Grant only explicit sidecar permissions in - `packages/mimir-app/src-tauri/capabilities/default.json`. + `packages/ragmir-app/src-tauri/capabilities/default.json`. 5. Call the sidecar through `Command.sidecar(...)`, with a fixed command allowlist. Do not add `externalBin` before the actual sidecar binary exists for the native target triples. @@ -47,27 +47,27 @@ The app should start with a small allowlist: | Workflow | Sidecar command | | --- | --- | -| Readiness | `mimir doctor --json` | -| Safe repair | `mimir doctor --fix --json` | -| Status | `mimir status --json` | -| Ingest | `mimir ingest --json` | -| Force rebuild | `mimir ingest --rebuild --json` | -| Search | `mimir search "" --json` | -| Ask context | `mimir ask "" --json` | -| Privacy audit | `mimir security-audit --json` | -| Unsupported files | `mimir audit --unsupported --json` | -| Model preload | `mimir models pull --enable --json` | -| Audio report | `mimir audio "" --offline --json` | +| Readiness | `ragmir doctor --json` | +| Safe repair | `ragmir doctor --fix --json` | +| Status | `ragmir status --json` | +| Ingest | `ragmir ingest --json` | +| Force rebuild | `ragmir ingest --rebuild --json` | +| Search | `ragmir search "" --json` | +| Ask context | `ragmir ask "" --json` | +| Privacy audit | `ragmir security-audit --json` | +| Unsupported files | `ragmir audit --unsupported --json` | +| Model preload | `ragmir models pull --enable --json` | +| Audio report | `ragmir audio "" --offline --json` | The UI must pass an explicit project root for each selected knowledge base with -`mimir --project-root "" ...` and keep generated state inside that project (`.mimir/`) +`ragmir --project-root "" ...` and keep generated state inside that project (`.ragmir/`) unless the user intentionally chooses another local folder. -For audio reports, `run_mimir_command` writes the current retrieval report text under ignored -`.mimir/audio/` first, then passes that generated text file to `mimir audio --offline --json`. +For audio reports, `run_ragmir_command` writes the current retrieval report text under ignored +`.ragmir/audio/` first, then passes that generated text file to `ragmir audio --offline --json`. For watched folders, the app does not expose a broader filesystem watcher. It stores an opt-in flag -per registered local project and periodically calls the existing incremental `mimir ingest --json` +per registered local project and periodically calls the existing incremental `ragmir ingest --json` workflow through the same bounded command surface. The Google Drive connector is the same local path flow with a distinct source label: the user selects diff --git a/docs/cli-reference.md b/docs/cli-reference.md index 1c08b5c..5b9cdc5 100644 --- a/docs/cli-reference.md +++ b/docs/cli-reference.md @@ -1,67 +1,67 @@ # CLI Reference -Mimir ships two CLIs: +Ragmir ships two CLIs: -- `mimir`: the main local RAG, MCP, skills, security, and audio command. `kb` remains a legacy alias. -- `mimir-tts`: the standalone text-to-speech renderer used by `mimir audio`. +- `ragmir`: the main local RAG, MCP, skills, security, and audio command. `kb` remains a legacy alias. +- `ragmir-tts`: the standalone text-to-speech renderer used by `ragmir audio`. ## Main Workflow | Command | Use it when | | --- | --- | -| `mimir setup` | Initialize Mimir, install the agent kit, run doctor, and ingest when safe. | -| `mimir setup --semantic` | Run first setup and explicitly download the configured Transformers.js embedding model for higher-quality semantic retrieval. | -| `mimir init` | Create `.mimir/config.json` (with a `sources` array), `.mimir/raw/`, and Git ignore rules. | -| `mimir doctor` | Diagnose setup, index freshness, security warnings, and the next command to run. | -| `mimir doctor --fix` | Create missing scaffolding, install skills/MCP config, and update stale indexes when safe. | -| `mimir models pull` | Download the configured Transformers.js embedding model into `embeddingModelPath`. | -| `mimir models pull --enable` | Download the embedding model and switch Mimir config to safe Transformers embeddings. | -| `mimir sources add "../apps/*/docs/**/*.md"` | Add source paths, glob patterns, or `!` exclusions to `.mimir/sources.txt`. | -| `mimir sources list` | List active extra source entries from `.mimir/sources.txt`. | -| `mimir ingest` | Parse changed source files, redact, chunk, embed, and update the local LanceDB index. | -| `mimir ingest --rebuild` | Force a full re-index, required after switching embedding provider or model. | -| `mimir audit` | Check whether supported source files are missing from or stale in the index. | -| `mimir audit --unsupported` | List files skipped because they are unsupported, too large, or secret-like. | -| `mimir search ""` | Retrieve ranked passages without asking an LLM to write an answer. | -| `mimir ask ""` | Return cited retrieval context for an agent or trusted model runtime. | -| `mimir research ""` | Run audit, security, multi-query retrieval, source diagnostics, and lightweight code matching for broad agent tasks. | -| `mimir evaluate --golden golden-queries.json` | Measure retrieval recall against expected source paths. | -| `mimir security-audit` | Inspect privacy posture: telemetry, providers, redaction, Git ignore, MCP. | -| `mimir usage-report` | Summarize metadata-only local access-log activity for recent private dogfooding without query text or local paths. | -| `mimir status` | Print raw config paths, provider settings, and indexed chunk count. | +| `ragmir setup` | Initialize Ragmir, install the agent kit, run doctor, and ingest when safe. | +| `ragmir setup --semantic` | Run first setup and explicitly download the configured Transformers.js embedding model for higher-quality semantic retrieval. | +| `ragmir init` | Create `.ragmir/config.json` (with a `sources` array), `.ragmir/raw/`, and Git ignore rules. | +| `ragmir doctor` | Diagnose setup, index freshness, security warnings, and the next command to run. | +| `ragmir doctor --fix` | Create missing scaffolding, install skills/MCP config, and update stale indexes when safe. | +| `ragmir models pull` | Download the configured Transformers.js embedding model into `embeddingModelPath`. | +| `ragmir models pull --enable` | Download the embedding model and switch Ragmir config to safe Transformers embeddings. | +| `ragmir sources add "../apps/*/docs/**/*.md"` | Add source paths, glob patterns, or `!` exclusions to `.ragmir/sources.txt`. | +| `ragmir sources list` | List active extra source entries from `.ragmir/sources.txt`. | +| `ragmir ingest` | Parse changed source files, redact, chunk, embed, and update the local LanceDB index. | +| `ragmir ingest --rebuild` | Force a full re-index, required after switching embedding provider or model. | +| `ragmir audit` | Check whether supported source files are missing from or stale in the index. | +| `ragmir audit --unsupported` | List files skipped because they are unsupported, too large, or secret-like. | +| `ragmir search ""` | Retrieve ranked passages without asking an LLM to write an answer. | +| `ragmir ask ""` | Return cited retrieval context for an agent or trusted model runtime. | +| `ragmir research ""` | Run audit, security, multi-query retrieval, source diagnostics, and lightweight code matching for broad agent tasks. | +| `ragmir evaluate --golden golden-queries.json` | Measure retrieval recall against expected source paths. | +| `ragmir security-audit` | Inspect privacy posture: telemetry, providers, redaction, Git ignore, MCP. | +| `ragmir usage-report` | Summarize metadata-only local access-log activity for recent private dogfooding without query text or local paths. | +| `ragmir status` | Print raw config paths, provider settings, and indexed chunk count. | ## Agent Integration | Command | Use it when | | --- | --- | -| `mimir install-skill` | Copy portable agent skills and an MCP config snippet into `.mimir/`. | -| `mimir install-agent --agents ` | Expose Mimir skills in native Claude, Codex, Kimi, OpenCode, or Cline discovery folders. | -| `mimir skill-path` | Print the package-bundled skill path for agents that load installed package skills. | -| `mimir serve-mcp` | Start the MCP stdio server for compatible agents. | +| `ragmir install-skill` | Copy portable agent skills and an MCP config snippet into `.ragmir/`. | +| `ragmir install-agent --agents ` | Expose Ragmir skills in native Claude, Codex, Kimi, OpenCode, or Cline discovery folders. | +| `ragmir skill-path` | Print the package-bundled skill path for agents that load installed package skills. | +| `ragmir serve-mcp` | Start the MCP stdio server for compatible agents. | ## Maintenance And Safety | Command | Use it when | | --- | --- | -| `mimir destroy-index --yes` | Delete generated `.mimir/storage` index files. | -| `mimir security-audit --strict` | Fail the command when privacy warnings are present. | +| `ragmir destroy-index --yes` | Delete generated `.ragmir/storage` index files. | +| `ragmir security-audit --strict` | Fail the command when privacy warnings are present. | ## Audio | Command | Use it when | | --- | --- | -| `mimir audio --doctor` | Check TTS runtime readiness. | -| `mimir audio /tmp/preload.txt --engine transformers --allow-remote-models --model-path .mimir/models/tts --out .mimir/audio/preload-check.wav` | Preload the TTS model with non-sensitive text. | -| `mimir audio --engine transformers --offline --out .mimir/audio/name.wav` | Render a confidential/offline WAV. | -| `mimir audio --engine edge --out .mimir/audio/name.mp3` | Render a higher-quality online Edge MP3. | -| `mimir-tts doctor --json` | Inspect the standalone TTS package. | -| `mimir-tts render --offline --out .mimir/audio/name.wav` | Render directly through the TTS package. | +| `ragmir audio --doctor` | Check TTS runtime readiness. | +| `ragmir audio /tmp/preload.txt --engine transformers --allow-remote-models --model-path .ragmir/models/tts --out .ragmir/audio/preload-check.wav` | Preload the TTS model with non-sensitive text. | +| `ragmir audio --engine transformers --offline --out .ragmir/audio/name.wav` | Render a confidential/offline WAV. | +| `ragmir audio --engine edge --out .ragmir/audio/name.mp3` | Render a higher-quality online Edge MP3. | +| `ragmir-tts doctor --json` | Inspect the standalone TTS package. | +| `ragmir-tts render --offline --out .ragmir/audio/name.wav` | Render directly through the TTS package. | ## Important Options | Option | Applies to | Meaning | | --- | --- | --- | -| `--project-root ` | all project-scoped `mimir` commands | Run against a specific local workspace instead of the current directory. | +| `--project-root ` | all project-scoped `ragmir` commands | Run against a specific local workspace instead of the current directory. | | `--agents ` | `setup`, `install-skill`, `install-agent` | Select agent helpers or native skill folders: `all`, `claude`, `codex`, `kimi`, `opencode`, `cline`, or a comma-separated list. | | `--mcp-name ` | `setup`, `install-skill` | Set the MCP server name used in generated helper files. | | `--mcp-command ` | `setup`, `install-skill` | Use a repository wrapper or custom executable as the generated MCP stdio command. | @@ -70,15 +70,15 @@ Mimir ships two CLIs: | `--top-k ` | `search`, `ask`, `research`, `evaluate` | Number of passages to return or keep. | | `--fail-under ` | `evaluate` | Exit non-zero only when recall is below a threshold from `0` to `1`; without this option evaluation remains strict and fails on any miss. | | `--days ` | `usage-report` | Number of recent days to include in the metadata-only usage summary. | -| `--json` | `doctor`, `ingest`, `search`, `ask`, `research`, `evaluate`, `audit`, `usage-report`, `status`, `security-audit`, `audio --doctor`, `mimir-tts doctor` | Print machine-readable JSON. | +| `--json` | `doctor`, `ingest`, `search`, `ask`, `research`, `evaluate`, `audit`, `usage-report`, `status`, `security-audit`, `audio --doctor`, `ragmir-tts doctor` | Print machine-readable JSON. | | `--compact` | `search`, `research` | Return short snippets instead of full retrieved passages. | | `--no-code` | `research` | Skip the lightweight repository code scan. | | `--unsupported` | `audit` | List skipped file paths and reasons. | | `--strict` | `security-audit` | Exit non-zero when warnings exist. | -| `--offline` | `audio`, `mimir-tts render` | Disable remote model downloads and force the local Transformers.js path. | -| `--allow-remote-models` | `audio`, `mimir-tts render` | Explicitly allow model downloads for Transformers.js. | -| `--engine edge` | `audio`, `mimir-tts render` | Use online Edge TTS for MP3 output. | -| `--lang ` | `audio`, `mimir-tts render` | Select the TTS language; picks the offline model and Edge voice. Default `fr`. | +| `--offline` | `audio`, `ragmir-tts render` | Disable remote model downloads and force the local Transformers.js path. | +| `--allow-remote-models` | `audio`, `ragmir-tts render` | Explicitly allow model downloads for Transformers.js. | +| `--engine edge` | `audio`, `ragmir-tts render` | Use online Edge TTS for MP3 output. | +| `--lang ` | `audio`, `ragmir-tts render` | Select the TTS language; picks the offline model and Edge voice. Default `fr`. | See [`offline-tts-preload.md`](./offline-tts-preload.md) before using `--offline` on a fully air-gapped machine. @@ -90,29 +90,29 @@ For scanned/image-only PDFs, add a local wrapper that prints OCR text to stdout: ```json { - "pdfOcrCommand": ["mimir-pdf-ocr", "{input}"], + "pdfOcrCommand": ["ragmir-pdf-ocr", "{input}"], "pdfOcrTimeoutMs": 120000 } ``` -Or set `MIMIR_PDF_OCR_COMMAND` to a JSON array. Mimir only invokes it for PDFs where embedded-text +Or set `RAGMIR_PDF_OCR_COMMAND` to a JSON array. Ragmir only invokes it for PDFs where embedded-text extraction returns no text. When a supported document still yields no indexable text, -`mimir ingest --json` reports the relative paths under `emptyTextFiles`. +`ragmir ingest --json` reports the relative paths under `emptyTextFiles`. Standalone image files such as `.png`, `.jpg`, `.heic`, and `.tiff` are skipped by default. To index them directly, configure an explicit local image OCR wrapper: ```json { - "imageOcrCommand": ["mimir-image-ocr", "{input}"], + "imageOcrCommand": ["ragmir-image-ocr", "{input}"], "imageOcrTimeoutMs": 120000 } ``` -Or set `MIMIR_IMAGE_OCR_COMMAND` to a JSON array. Image files become supported only when this command +Or set `RAGMIR_IMAGE_OCR_COMMAND` to a JSON array. Image files become supported only when this command is configured. OCR commands are executed from the target project root without a shell, receive -`MIMIR_PDF_PATH` or `MIMIR_IMAGE_PATH`, replace `{input}` placeholders with the source path, and -must print UTF-8 text to stdout. Keep OCR tooling local for confidential documents. `mimir audit +`RAGMIR_PDF_PATH` or `RAGMIR_IMAGE_PATH`, replace `{input}` placeholders with the source path, and +must print UTF-8 text to stdout. Keep OCR tooling local for confidential documents. `ragmir audit --unsupported` prints per-file recommendations for image, audio, video, oversized, and secret-like skipped files. @@ -121,34 +121,34 @@ Word text extractor: ```json { - "legacyWordCommand": ["mimir-doc-text", "{input}"], + "legacyWordCommand": ["ragmir-doc-text", "{input}"], "legacyWordTimeoutMs": 120000 } ``` -Or set `MIMIR_LEGACY_WORD_COMMAND` to a JSON array. `.doc` files become supported only when this +Or set `RAGMIR_LEGACY_WORD_COMMAND` to a JSON array. `.doc` files become supported only when this command is configured. The command runs from the target project root without a shell, receives -`MIMIR_LEGACY_WORD_PATH`, may use `{input}` for the source path, and must print UTF-8 text to +`RAGMIR_LEGACY_WORD_PATH`, may use `{input}` for the source path, and must print UTF-8 text to stdout. Prefer local extraction or conversion for confidential documents. ## Retrieval Evaluation Gates -`mimir evaluate` expects a JSON golden query file with queries and expected relative source paths. +`ragmir evaluate` expects a JSON golden query file with queries and expected relative source paths. Use the default strict behavior for synthetic examples and release checks: ```bash -mimir evaluate --golden golden-queries.json +ragmir evaluate --golden golden-queries.json ``` For private dogfooding, keep the real corpus and golden query file outside Git or under an ignored local path, then choose an explicit recall threshold: ```bash -mimir --project-root /path/to/workspace evaluate --golden .mimir/evaluations/golden-queries.json --fail-under 0.8 --json +ragmir --project-root /path/to/workspace evaluate --golden .ragmir/evaluations/golden-queries.json --fail-under 0.8 --json ``` The JSON output includes `embeddingProvider` and `embeddingModel`. Use those fields when comparing a default local-hash run with a private Transformers semantic run. Legacy projects can still use `.kb/config.json`, `.kb/storage`, and `KB_*` environment aliases. -Fresh setup and docs use a single `.mimir/` project folder. +Fresh setup and docs use a single `.ragmir/` project folder. diff --git a/docs/commercial-distribution.md b/docs/commercial-distribution.md index 8c08d7d..5ee06e1 100644 --- a/docs/commercial-distribution.md +++ b/docs/commercial-distribution.md @@ -1,6 +1,6 @@ # Commercial Distribution -Mimir can be sold or supported commercially while the repository remains MIT open source. +Ragmir can be sold or supported commercially while the repository remains MIT open source. The commercial product boundary is distribution and service, not hidden source code in this repo. Official paid channels may provide signed builds, verified downloads, support, onboarding, update @@ -9,7 +9,7 @@ changed explicitly. ## Distribution -Distribute Mimir app builds through direct downloads and sideloadable installers: +Distribute Ragmir app builds through direct downloads and sideloadable installers: - macOS: signed and notarized `.dmg` / `.app` artifacts. - Windows: Authenticode-signed `.exe` / `.msi` artifacts. @@ -40,10 +40,10 @@ it uses synthetic fixtures and placeholder infrastructure IDs. Until official signed builds and a real payment path exist: -- present Mimir Core as the usable product; +- present Ragmir Core as the usable product; - describe the app as in development; - avoid active checkout URLs; -- avoid active direct-download URLs under real Mimir domains; +- avoid active direct-download URLs under real Ragmir domains; - avoid claiming automatic updates, notarized artifacts, or signed releases before they exist. Business validation data belongs in private systems, not in this repository. diff --git a/docs/fr-eu-sovereign-positioning.md b/docs/fr-eu-sovereign-positioning.md index c127b18..a1029f0 100644 --- a/docs/fr-eu-sovereign-positioning.md +++ b/docs/fr-eu-sovereign-positioning.md @@ -1,6 +1,6 @@ # FR/EU Sovereign Positioning -This document keeps Mimir's sovereignty, privacy, and legal-vertical positioning precise. It is +This document keeps Ragmir's sovereignty, privacy, and legal-vertical positioning precise. It is public product guidance, not legal advice or a compliance certificate. Sources checked on 2026-06-29: @@ -12,21 +12,21 @@ Sources checked on 2026-06-29: ## Core Position -Mimir is positioned as sovereign local retrieval for confidential dossiers: +Ragmir is positioned as sovereign local retrieval for confidential dossiers: - Documents stay in user-selected local folders. -- Indexes, reports, audio files, agent configs, and access logs stay under ignored local Mimir state. -- There is no hosted Mimir document store, no hosted vector database, and no product telemetry by +- Indexes, reports, audio files, agent configs, and access logs stay under ignored local Ragmir state. +- There is no hosted Ragmir document store, no hosted vector database, and no product telemetry by default. - Redaction runs before indexing. - Remote model downloads are explicit; confidential workflows should keep remote model loading disabled and use preloaded local models. - Retrieval returns cited passages and source paths; final professional conclusions remain outside - Mimir Core. -- Mimir Desktop is distributed through direct downloads and sideloadable installers, not App Store or + Ragmir Core. +- Ragmir Desktop is distributed through direct downloads and sideloadable installers, not App Store or Play Store listings. -This is stronger and more defensible than claiming generic "GDPR compliant AI". Mimir can help a +This is stronger and more defensible than claiming generic "GDPR compliant AI". Ragmir can help a customer reduce data exposure, but each organization still owns its own processing purpose, legal basis, retention, security controls, and professional obligations. @@ -35,7 +35,7 @@ basis, retention, security controls, and professional obligations. Use these claims in landing pages, sales calls, and documentation: - "Local-first retrieval for confidential documents." -- "No document upload to a hosted Mimir service." +- "No document upload to a hosted Ragmir service." - "No product telemetry by default." - "Metadata-only access logs; raw queries are not stored by default." - "Redaction before indexing." @@ -60,15 +60,15 @@ Do not use these claims unless a separate legal/security review proves them for ## GDPR-Oriented Product Evidence -Mimir should keep these evidence points easy to show during buyer review: +Ragmir should keep these evidence points easy to show during buyer review: -| GDPR-oriented theme | Mimir evidence | +| GDPR-oriented theme | Ragmir evidence | | --- | --- | | Purpose and minimization | Users choose explicit folders; unsupported files are reported; remote models require an explicit action. | -| Local control | Raw documents, indexes, reports, audio, and agent configs remain under local `.mimir/` state ignored by Git. | +| Local control | Raw documents, indexes, reports, audio, and agent configs remain under local `.ragmir/` state ignored by Git. | | Security and confidentiality | No hosted document store, no default telemetry, redaction before indexing, metadata-only access logs. | -| Transparency | CLI and app expose `mimir doctor`, `mimir audit`, `mimir audit --unsupported`, and `mimir security-audit`. | -| Retention | Users can delete generated `.mimir/` state locally; Mimir should not retain hosted copies. | +| Transparency | CLI and app expose `ragmir doctor`, `ragmir audit`, `ragmir audit --unsupported`, and `ragmir security-audit`. | +| Retention | Users can delete generated `.ragmir/` state locally; Ragmir should not retain hosted copies. | | Accountability | Public README, security hardening notes, source boundary, and reproducible local validation commands. | For support, if JCode ever receives customer documents, excerpts, logs, or screenshots that may @@ -77,7 +77,7 @@ repository and define access, retention, deletion, and customer approval before ## AI Act-Oriented Position -Mimir Core is a retrieval layer. It indexes local documents, searches them, and returns cited context. +Ragmir Core is a retrieval layer. It indexes local documents, searches them, and returns cited context. It does not train a general-purpose model, provide a hosted AI system, or automate legal decisions by default. @@ -90,7 +90,7 @@ Reassess the AI Act posture before shipping any of the following: - public claims that generated legal outputs are authoritative. If embedded generation ships later, keep human review explicit, label generated content clearly, and -document whether Mimir is acting as a provider of an AI system, a deployer tool, or only a local +document whether Ragmir is acting as a provider of an AI system, a deployer tool, or only a local interface over user-controlled models. ## Legal Vertical Packaging @@ -104,7 +104,7 @@ The legal vertical can be sold as workflow packaging, not legal judgment: - redaction and professional-review checklists; - French-language onboarding and support. -The `mimir-legal-dossier` skill must stay aligned with this boundary: it prepares structured, +The `ragmir-legal-dossier` skill must stay aligned with this boundary: it prepares structured, cited work products and flags professional-review items. It must not present conclusions as legal advice. diff --git a/docs/offline-tts-preload.md b/docs/offline-tts-preload.md index 483e715..e9b58ea 100644 --- a/docs/offline-tts-preload.md +++ b/docs/offline-tts-preload.md @@ -1,8 +1,8 @@ # Offline TTS Preload -`mimir audio` and `mimir-tts` disable remote model downloads by default. `--offline` keeps that +`ragmir audio` and `ragmir-tts` disable remote model downloads by default. `--offline` keeps that network posture explicit and only works after the Transformers.js TTS model has already been cached -under `.mimir/models/tts` or the path passed with `--model-path`. +under `.ragmir/models/tts` or the path passed with `--model-path`. Use this workflow when you want confidential audio summaries to render without network access. @@ -10,7 +10,7 @@ Use this workflow when you want confidential audio summaries to render without n - Preload with a short non-sensitive sentence while network access is acceptable. - Render confidential narration only after the offline check succeeds. -- Keep `.mimir/models/tts/` and `.mimir/audio/` untracked. +- Keep `.ragmir/models/tts/` and `.ragmir/audio/` untracked. - Do not use `--engine edge` for confidential content unless online TTS is explicitly acceptable. The preload step downloads public model files. It should not need to send narration text to a remote @@ -21,38 +21,38 @@ TTS service, but using synthetic text keeps the operation easy to audit. Create a synthetic input outside the repository: ```bash -printf 'Mimir offline speech preload check.' > /tmp/mimir-tts-preload.txt -mkdir -p .mimir/audio +printf 'Ragmir offline speech preload check.' > /tmp/ragmir-tts-preload.txt +mkdir -p .ragmir/audio ``` Preload the default Transformers.js model: ```bash -pnpm exec mimir audio /tmp/mimir-tts-preload.txt \ +pnpm exec ragmir audio /tmp/ragmir-tts-preload.txt \ --engine transformers \ --allow-remote-models \ - --model-path .mimir/models/tts \ - --out .mimir/audio/preload-check.wav + --model-path .ragmir/models/tts \ + --out .ragmir/audio/preload-check.wav ``` Then prove the cache works with remote loading disabled: ```bash -pnpm exec mimir audio /tmp/mimir-tts-preload.txt \ +pnpm exec ragmir audio /tmp/ragmir-tts-preload.txt \ --engine transformers \ --offline \ - --model-path .mimir/models/tts \ - --out .mimir/audio/offline-check.wav + --model-path .ragmir/models/tts \ + --out .ragmir/audio/offline-check.wav ``` After that, render confidential narration offline: ```bash -pnpm exec mimir audio /tmp/MIMIR-SUMMARY-project.txt \ +pnpm exec ragmir audio /tmp/RAGMIR-SUMMARY-project.txt \ --engine transformers \ --offline \ - --model-path .mimir/models/tts \ - --out .mimir/audio/project-summary.wav + --model-path .ragmir/models/tts \ + --out .ragmir/audio/project-summary.wav ``` ## Standalone TTS CLI @@ -60,25 +60,25 @@ pnpm exec mimir audio /tmp/MIMIR-SUMMARY-project.txt \ The standalone package uses the same model cache: ```bash -pnpm exec mimir-tts render /tmp/mimir-tts-preload.txt \ +pnpm exec ragmir-tts render /tmp/ragmir-tts-preload.txt \ --engine transformers \ --allow-remote-models \ - --model-path .mimir/models/tts \ - --out .mimir/audio/preload-check.wav + --model-path .ragmir/models/tts \ + --out .ragmir/audio/preload-check.wav -pnpm exec mimir-tts render /tmp/mimir-tts-preload.txt \ +pnpm exec ragmir-tts render /tmp/ragmir-tts-preload.txt \ --offline \ - --model-path .mimir/models/tts \ - --out .mimir/audio/offline-check.wav + --model-path .ragmir/models/tts \ + --out .ragmir/audio/offline-check.wav ``` ## Air-Gapped Machines If the target machine cannot touch the network: -1. Run the preload command on a trusted internet-connected machine with the same Mimir TTS version, +1. Run the preload command on a trusted internet-connected machine with the same Ragmir TTS version, model ID, and `--model-path`. -2. Copy the resulting `.mimir/models/tts/` directory to the target machine through an approved local +2. Copy the resulting `.ragmir/models/tts/` directory to the target machine through an approved local transfer path. 3. Run the offline check on the target machine before rendering real narration. @@ -89,6 +89,6 @@ Do not commit the model cache to Git or include it in npm packages. If offline render fails, check: - The preload and offline render use the same `--model`, `--model-path`, and package version. -- The target machine received the full `.mimir/models/tts/` directory. +- The target machine received the full `.ragmir/models/tts/` directory. - The output path ends with `.wav`; MP3 requires the online Edge TTS path. -- `MIMIR_TTS_MODEL_PATH` does not point to a different cache directory. +- `RAGMIR_TTS_MODEL_PATH` does not point to a different cache directory. diff --git a/docs/payment-webhook-architecture.md b/docs/payment-webhook-architecture.md index 2d92aac..717ce58 100644 --- a/docs/payment-webhook-architecture.md +++ b/docs/payment-webhook-architecture.md @@ -1,6 +1,6 @@ # Payment And License Webhook Architecture -Mimir Desktop uses direct downloads and sideloadable installers. Payments and license delivery must +Ragmir Desktop uses direct downloads and sideloadable installers. Payments and license delivery must therefore stay independent from App Store or Play Store account, review, receipt, and entitlement systems. @@ -15,8 +15,8 @@ this repository. of record. - Paddle remains the fallback if Lemon Squeezy cannot satisfy the final tax, payout, or license workflow. -- Mimir does not add a hosted document service for payment or activation. -- The app keeps local per-major license validation through `MIMIR1..` keys. +- Ragmir does not add a hosted document service for payment or activation. +- The app keeps local per-major license validation through `RAGMIR1..` keys. ## Hosted Components @@ -37,20 +37,20 @@ embeddings, vector rows, generated reports, generated audio, or MCP context. ## Event Flow -1. A public Mimir release page links to a Lemon Squeezy hosted checkout variant. +1. A public Ragmir release page links to a Lemon Squeezy hosted checkout variant. 2. Lemon Squeezy collects payment and tax details on the provider-hosted checkout. 3. Lemon Squeezy sends purchase, subscription, renewal, refund, and cancellation events to the webhook service. 4. The webhook verifies the event signature before any state change. -5. The webhook normalizes the event into the Mimir license payload model. -6. The webhook signs a `MIMIR1` license with a private key stored only in the hosted secret manager. +5. The webhook normalizes the event into the Ragmir license payload model. +6. The webhook signs a `RAGMIR1` license with a private key stored only in the hosted secret manager. 7. The customer receives the direct app download link plus the license key. 8. The installed app validates the license locally with the public JWK injected at build time through - `VITE_MIMIR_LICENSE_PUBLIC_KEY_JWK`. + `VITE_RAGMIR_LICENSE_PUBLIC_KEY_JWK`. ## License Mapping -| Provider event | Mimir license behavior | +| Provider event | Ragmir license behavior | | --- | --- | | One-time purchase | Issue a perpetual per-major license with the configured update window. | | Subscription created or renewed | Issue or refresh a license whose runtime and update windows follow the provider renewal date. | @@ -79,40 +79,40 @@ Only the public license verification JWK may be committed or injected into publi Until the webhook exists, use the offline adapter with exported provider JSON: ```bash -pnpm --filter @jcode.labs/mimir-app license:from-lemonsqueezy \ +pnpm --filter @jcode.labs/ragmir-app license:from-lemonsqueezy \ --event lemon-event.json \ - --private-key .mimir/license-private.jwk \ + --private-key .ragmir/license-private.jwk \ --major-version 0 \ --json ``` Keep exported provider JSON, private JWK files, generated licenses, and customer ledgers under -ignored local Mimir state or another private system. +ignored local Ragmir state or another private system. The adapter has a synthetic smoke test that generates a temporary local signing key and converts order plus subscription fixtures without provider credentials: ```bash -pnpm --filter @jcode.labs/mimir-app license:lemonsqueezy:smoke +pnpm --filter @jcode.labs/ragmir-app license:lemonsqueezy:smoke ``` ## Webhook Handler Package -`packages/mimir-license-webhook` contains the unpublished Cloudflare Worker handler for the future hosted +`packages/ragmir-license-webhook` contains the unpublished Cloudflare Worker handler for the future hosted path. It verifies Lemon Squeezy's `X-Signature` header against the raw request body, issues local -`MIMIR1` keys for eligible order/subscription events, and returns metadata-only records for -cancellation/refund-style events. It requires a KV-compatible `MIMIR_LICENSE_RECORDS` binding so +`RAGMIR1` keys for eligible order/subscription events, and returns metadata-only records for +cancellation/refund-style events. It requires a KV-compatible `RAGMIR_LICENSE_RECORDS` binding so duplicate webhook deliveries can return the stored response instead of signing a second license key. The package has a synthetic smoke test with generated local keys and no provider credentials: ```bash -pnpm --filter @jcode.labs/mimir-license-webhook smoke -pnpm --filter @jcode.labs/mimir-license-webhook cf:dry-run +pnpm --filter @jcode.labs/ragmir-license-webhook smoke +pnpm --filter @jcode.labs/ragmir-license-webhook cf:dry-run ``` This package is not a deployment target yet. Keep `LEMONSQUEEZY_WEBHOOK_SECRET`, -`MIMIR_LICENSE_PRIVATE_KEY_JWK`, KV record exports, customer data, order exports, and generated +`RAGMIR_LICENSE_PRIVATE_KEY_JWK`, KV record exports, customer data, order exports, and generated production licenses out of the repository and out of public build artifacts. ## Release Gates @@ -123,8 +123,8 @@ true: - real Lemon Squeezy product variants exist for the released offer; - a hosted checkout URL is linked from the release surface after the app is signed and packaged; - the webhook verifies provider signatures and is deployed with secrets outside the repository; -- a test-mode purchase issues a valid local `MIMIR1` license; +- a test-mode purchase issues a valid local `RAGMIR1` license; - duplicate webhook deliveries are idempotent; - refunds, cancellations, and subscription expirations update license metadata; -- the app download page publishes signed artifacts, `SHA256SUMS`, and `mimir-app-release.json`; +- the app download page publishes signed artifacts, `SHA256SUMS`, and `ragmir-app-release.json`; - no App Store, Play Store, or store entitlement path is required for purchase or activation. diff --git a/docs/source-boundary.md b/docs/source-boundary.md index 060da1d..545e90d 100644 --- a/docs/source-boundary.md +++ b/docs/source-boundary.md @@ -1,6 +1,6 @@ # Source Boundary -Mimir is a public MIT-licensed repository. Treat every tracked source file, package, workflow, +Ragmir is a public MIT-licensed repository. Treat every tracked source file, package, workflow, example, and document as visible, forkable, modifiable, and reusable by anyone under the MIT License. This repository must never describe tracked source as proprietary, closed source, source-available, @@ -11,9 +11,9 @@ source. The repository intentionally contains: -- Mimir Core: CLI, library, MCP server, bundled agent skills, and synthetic examples. -- Mimir TTS: optional audio rendering package. -- Mimir UI and landing source. +- Ragmir Core: CLI, library, MCP server, bundled agent skills, and synthetic examples. +- Ragmir TTS: optional audio rendering package. +- Ragmir UI and landing source. - The Tauri app shell source. - Direct-download release tooling, checksum tooling, manifest tooling, and updater guards. - The undeployed license webhook source and synthetic smoke tests. @@ -44,7 +44,7 @@ Bad boundaries for this repo: Local license validation can gate official signed builds, support, updates, and paid distribution channels. It cannot prevent a user from forking MIT source code. -If Mimir later needs truly proprietary source code, that code must live outside this MIT repository +If Ragmir later needs truly proprietary source code, that code must live outside this MIT repository or the licensing model must be changed deliberately before publication. ## Public-Repo Hygiene @@ -60,7 +60,7 @@ Keep the public repository limited to: Keep outside Git: - private documents and client corpora; -- `.mimir/`, `.pid`, raw reports, audio files, vector stores, and legacy `.kb/` state; +- `.ragmir/`, `.pid`, raw reports, audio files, vector stores, and legacy `.kb/` state; - API keys, webhook secrets, signing keys, certificates, and environment files; - customer names, emails, invoices, order exports, and support evidence; - internal pricing tests, pre-sales ledgers, interview notes, and GO/NO-GO records. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d06ea83..4ca1166 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -1,41 +1,41 @@ # Troubleshooting -Use `mimir doctor` first. It is the shortest path to the next useful action: +Use `ragmir doctor` first. It is the shortest path to the next useful action: ```bash -npx mimir doctor +npx ragmir doctor ``` -Use `doctor --fix` when you want Mimir to repair safe setup issues automatically: +Use `doctor --fix` when you want Ragmir to repair safe setup issues automatically: ```bash -npx mimir doctor --fix +npx ragmir doctor --fix ``` -## `mimir doctor` Says The Project Is Not Initialized +## `ragmir doctor` Says The Project Is Not Initialized Run: ```bash -npx mimir setup -npx mimir doctor +npx ragmir setup +npx ragmir doctor ``` -Commit only safe scaffolding if this is a real repository. Do not commit local Mimir state, env +Commit only safe scaffolding if this is a real repository. Do not commit local Ragmir state, env files, credentials, indexes, reports, audio, model caches, or raw documents. ## No Files Are Indexed -Check that supported files exist under `.mimir/raw/`: +Check that supported files exist under `.ragmir/raw/`: ```bash -find .mimir/raw -maxdepth 2 -type f -npx mimir ingest -npx mimir doctor +find .ragmir/raw -maxdepth 2 -type f +npx ragmir ingest +npx ragmir doctor ``` -If documents live elsewhere, add paths or glob patterns with `mimir sources add` or edit -`.mimir/sources.txt`. Relative entries resolve from the project root, and `!` excludes matched files: +If documents live elsewhere, add paths or glob patterns with `ragmir sources add` or edit +`.ragmir/sources.txt`. Relative entries resolve from the project root, and `!` excludes matched files: ```plain text ../apps/*/README.md @@ -46,27 +46,27 @@ If documents live elsewhere, add paths or glob patterns with `mimir sources add` If files exist but are not supported yet, inspect the skipped inventory: ```bash -npx mimir audit --unsupported +npx ragmir audit --unsupported ``` Then follow the per-file recommendation: convert unsupported binaries to a supported format, OCR/transcribe them, or add a safe custom UTF-8 text extension with `includeExtensions` / -`MIMIR_INCLUDE_EXTENSIONS`. +`RAGMIR_INCLUDE_EXTENSIONS`. ## Scanned PDFs Or Images Produce No Text -Mimir extracts embedded PDF text by default. For scanned/image-only PDFs, configure an explicit local +Ragmir extracts embedded PDF text by default. For scanned/image-only PDFs, configure an explicit local OCR wrapper that prints UTF-8 text to stdout: ```json { - "pdfOcrCommand": ["mimir-pdf-ocr", "{input}"], + "pdfOcrCommand": ["ragmir-pdf-ocr", "{input}"], "pdfOcrTimeoutMs": 120000 } ``` The command runs only when normal PDF extraction returns no text. It is executed without a shell, -receives `MIMIR_PDF_PATH`, and may use `{input}` in its arguments for the PDF path. Keep OCR tooling +receives `RAGMIR_PDF_PATH`, and may use `{input}` in its arguments for the PDF path. Keep OCR tooling local for confidential documents. Standalone image files such as `.png`, `.jpg`, `.heic`, and `.tiff` are skipped by default. To index @@ -74,16 +74,16 @@ them directly, configure an explicit local image OCR wrapper: ```json { - "imageOcrCommand": ["mimir-image-ocr", "{input}"], + "imageOcrCommand": ["ragmir-image-ocr", "{input}"], "imageOcrTimeoutMs": 120000 } ``` -The command runs from the target project root, receives `MIMIR_IMAGE_PATH`, may use `{input}` in its +The command runs from the target project root, receives `RAGMIR_IMAGE_PATH`, may use `{input}` in its arguments for the image path, and must print UTF-8 text to stdout. Images become supported only when `imageOcrCommand` is configured. -If ingestion finishes but a scanned PDF still has no text, `mimir ingest --json` lists it under +If ingestion finishes but a scanned PDF still has no text, `ragmir ingest --json` lists it under `emptyTextFiles`. If you do not want direct image OCR, OCR images to text or convert them to OCRed PDFs before ingesting. @@ -94,12 +94,12 @@ them to `.docx`, PDF, HTML, or text, or configure an explicit wrapper: ```json { - "legacyWordCommand": ["mimir-doc-text", "{input}"], + "legacyWordCommand": ["ragmir-doc-text", "{input}"], "legacyWordTimeoutMs": 120000 } ``` -The command runs from the target project root without a shell, receives `MIMIR_LEGACY_WORD_PATH`, +The command runs from the target project root without a shell, receives `RAGMIR_LEGACY_WORD_PATH`, may use `{input}` in its arguments for the source path, and must print UTF-8 text to stdout. `.doc` files become supported only when `legacyWordCommand` is configured. @@ -116,7 +116,7 @@ usually better than the default lexical/hash mode. { "embeddingProvider": "transformers", "embeddingModel": "mixedbread-ai/mxbai-embed-xsmall-v1", - "embeddingModelPath": ".mimir/models", + "embeddingModelPath": ".ragmir/models", "transformersAllowRemoteModels": false } ``` @@ -124,38 +124,38 @@ usually better than the default lexical/hash mode. When remote download is acceptable during first setup, use: ```bash -npx mimir setup --semantic +npx ragmir setup --semantic ``` Or preload the configured embedding model later: ```bash -npx mimir models pull --enable +npx ragmir models pull --enable ``` Switching providers requires a full re-ingest: ```bash -npx mimir ingest --rebuild -npx mimir doctor +npx ragmir ingest --rebuild +npx ragmir doctor ``` -## `mimir audit` Reports Missing Or Stale Files +## `ragmir audit` Reports Missing Or Stale Files Run: ```bash -npx mimir ingest -npx mimir audit +npx ragmir ingest +npx ragmir audit ``` Or let doctor perform the safe incremental update: ```bash -npx mimir doctor --fix +npx ragmir doctor --fix ``` -Mimir incrementally reuses unchanged indexed rows on normal `mimir ingest`. Use `mimir ingest --rebuild` +Ragmir incrementally reuses unchanged indexed rows on normal `ragmir ingest`. Use `ragmir ingest --rebuild` after switching embedding provider/model, after changing chunking settings, or when you want to discard and recreate the whole local index. @@ -163,7 +163,7 @@ discard and recreate the whole local index. Read the warning lines. Common causes: -- `.mimir/` is not ignored by Git. +- `.ragmir/` is not ignored by Git. - Legacy projects using `.kb/`, `private/`, or `private/**` are missing the matching legacy Git ignore entries. - Redaction was disabled. - Transformers.js remote model loading was enabled. @@ -171,8 +171,8 @@ Read the warning lines. Common causes: Run the safe repair command if Git ignore entries are missing: ```bash -npx mimir doctor --fix -npx mimir security-audit --strict +npx ragmir doctor --fix +npx ragmir security-audit --strict ``` ## MP3 Audio Fails Without `--engine edge` @@ -180,18 +180,18 @@ npx mimir security-audit --strict This is intentional. MP3 output uses online Edge TTS and requires explicit consent: ```bash -npx mimir audio /tmp/summary.txt \ +npx ragmir audio /tmp/summary.txt \ --engine edge \ - --out .mimir/audio/summary.mp3 + --out .ragmir/audio/summary.mp3 ``` For confidential or offline work, use WAV: ```bash -npx mimir audio /tmp/summary.txt \ +npx ragmir audio /tmp/summary.txt \ --engine transformers \ --offline \ - --out .mimir/audio/summary.wav + --out .ragmir/audio/summary.wav ``` ## Edge TTS Is Not Installed @@ -200,34 +200,34 @@ Install the external CLI: ```bash pipx install edge-tts -npx mimir audio --doctor +npx ragmir audio --doctor ``` Only use Edge TTS when sending narration text to the online service is acceptable. -## `mimir-tts --offline` Cannot Render +## `ragmir-tts --offline` Cannot Render -Offline rendering requires model files to already exist under `.mimir/models/tts` or the path passed +Offline rendering requires model files to already exist under `.ragmir/models/tts` or the path passed with `--model-path`. For a first online setup, use non-sensitive text: ```bash -printf 'Mimir offline speech preload check.' > /tmp/mimir-tts-preload.txt -npx mimir-tts render /tmp/mimir-tts-preload.txt \ +printf 'Ragmir offline speech preload check.' > /tmp/ragmir-tts-preload.txt +npx ragmir-tts render /tmp/ragmir-tts-preload.txt \ --engine transformers \ --allow-remote-models \ - --model-path .mimir/models/tts \ - --out .mimir/audio/preload-check.wav + --model-path .ragmir/models/tts \ + --out .ragmir/audio/preload-check.wav ``` Then reuse the cached files with: ```bash -npx mimir-tts render /tmp/mimir-tts-preload.txt \ +npx ragmir-tts render /tmp/ragmir-tts-preload.txt \ --offline \ - --model-path .mimir/models/tts \ - --out .mimir/audio/offline-check.wav + --model-path .ragmir/models/tts \ + --out .ragmir/audio/offline-check.wav ``` The full workflow is documented in [`offline-tts-preload.md`](./offline-tts-preload.md). diff --git a/llms.txt b/llms.txt index def594d..1b5898c 100644 --- a/llms.txt +++ b/llms.txt @@ -1,30 +1,30 @@ -# Mimir +# Ragmir -> Open-source local RAG library, CLI, and MCP server. Mimir indexes your specs, docs, and code +> Open-source local RAG library, CLI, and MCP server. Ragmir indexes your specs, docs, and code > locally and gives your AI agents only the useful cited passages, over MCP, without burning tokens > on your whole repo. It stays sovereign and offline by default, storing vectors locally with > LanceDB; answer synthesis stays with the calling agent or model. -Mimir Core (`@jcode.labs/mimir`, npm) ingests local files from the target repository, redacts -secrets and PII before anything is embedded, and serves cited passages through a CLI (`mimir ...`), -an MCP server (`mimir serve-mcp`), a TypeScript library, and portable skills for Claude Code, Codex, -Kimi Code CLI, OpenCode, and Cline. It does not perform LLM answer synthesis itself; `mimir ask` -returns cited passages only, and synthesis stays with the calling agent or model. Mimir TTS -(`@jcode.labs/mimir-tts`, npm) renders offline audio summaries. +Ragmir Core (`@jcode.labs/ragmir`, npm) ingests local files from the target repository, redacts +secrets and PII before anything is embedded, and serves cited passages through a CLI (`ragmir ...`), +an MCP server (`ragmir serve-mcp`), a TypeScript library, and portable skills for Claude Code, Codex, +Kimi Code CLI, OpenCode, and Cline. It does not perform LLM answer synthesis itself; `ragmir ask` +returns cited passages only, and synthesis stays with the calling agent or model. Ragmir TTS +(`@jcode.labs/ragmir-tts`, npm) renders offline audio summaries. ## Docs -- [README](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/README.md): overview, install, quick start, developer use cases, full CLI walkthrough -- [CLI reference](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/cli-reference.md): every `mimir` command and flag -- [API reference](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/api-reference.md): library exports and MCP tools -- [Agent integration](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/agent-integration.md): wiring Mimir into Claude Code, Codex, Kimi Code CLI, OpenCode, Cline -- [Troubleshooting](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/troubleshooting.md) -- [Contributing](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/CONTRIBUTING.md): dev setup (mise-pinned Node.js toolchain), pull request and Git Flow conventions +- [README](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/README.md): overview, install, quick start, developer use cases, full CLI walkthrough +- [CLI reference](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/docs/cli-reference.md): every `ragmir` command and flag +- [API reference](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/docs/api-reference.md): library exports and MCP tools +- [Agent integration](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/docs/agent-integration.md): wiring Ragmir into Claude Code, Codex, Kimi Code CLI, OpenCode, Cline +- [Troubleshooting](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/docs/troubleshooting.md) +- [Contributing](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/CONTRIBUTING.md): dev setup (mise-pinned Node.js toolchain), pull request and Git Flow conventions ## Optional -- [Source boundary](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/source-boundary.md): open-core split between Mimir Core and add-ons -- [Offline TTS preload](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/offline-tts-preload.md) -- [FR/EU sovereign positioning](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/fr-eu-sovereign-positioning.md) -- [Security hardening](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/SECURITY-HARDENING.md) -- [Security policy](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/SECURITY.md) +- [Source boundary](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/docs/source-boundary.md): open-core split between Ragmir Core and add-ons +- [Offline TTS preload](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/docs/offline-tts-preload.md) +- [FR/EU sovereign positioning](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/docs/fr-eu-sovereign-positioning.md) +- [Security hardening](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/SECURITY-HARDENING.md) +- [Security policy](https://raw.githubusercontent.com/jcode-works/jcode-ragmir/main/SECURITY.md) diff --git a/package.json b/package.json index e9c16e5..e3f9d87 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,29 @@ { - "name": "jcode-mimir", + "name": "jcode-ragmir", "version": "0.4.12", "private": true, - "description": "Monorepo for Mimir Core and open-source Mimir add-ons.", + "description": "Monorepo for Ragmir Core and open-source Ragmir add-ons.", "type": "module", "license": "MIT", "packageManager": "pnpm@11.9.0", "scripts": { "bootstrap": "mise install && pnpm install", "audit:security": "pnpm audit --audit-level moderate", - "build": "pnpm --filter @jcode.labs/mimir-ui build && pnpm --filter @jcode.labs/mimir-app build && pnpm --filter @jcode.labs/mimir-landing build && pnpm --filter @jcode.labs/mimir-license-webhook build && pnpm --filter @jcode.labs/mimir-tts build && pnpm --filter @jcode.labs/mimir build", - "check": "pnpm --filter @jcode.labs/mimir-ui check && pnpm --filter @jcode.labs/mimir-app check && pnpm --filter @jcode.labs/mimir-landing check && pnpm --filter @jcode.labs/mimir-license-webhook check && pnpm --filter @jcode.labs/mimir-tts check && pnpm --filter @jcode.labs/mimir check", + "build": "pnpm --filter @jcode.labs/ragmir-ui build && pnpm --filter @jcode.labs/ragmir-app build && pnpm --filter @jcode.labs/ragmir-landing build && pnpm --filter @jcode.labs/ragmir-license-webhook build && pnpm --filter @jcode.labs/ragmir-tts build && pnpm --filter @jcode.labs/ragmir build", + "check": "pnpm --filter @jcode.labs/ragmir-ui check && pnpm --filter @jcode.labs/ragmir-app check && pnpm --filter @jcode.labs/ragmir-landing check && pnpm --filter @jcode.labs/ragmir-license-webhook check && pnpm --filter @jcode.labs/ragmir-tts check && pnpm --filter @jcode.labs/ragmir check", "commitlint": "commitlint --from=HEAD~1 --to=HEAD --verbose", - "dev:app": "pnpm --filter @jcode.labs/mimir-app dev", - "dev:landing": "pnpm --filter @jcode.labs/mimir-landing dev", - "example": "pnpm --filter @jcode.labs/mimir build && node packages/mimir-core/examples/library-api-demo/run.mjs", + "dev:app": "pnpm --filter @jcode.labs/ragmir-app dev", + "dev:landing": "pnpm --filter @jcode.labs/ragmir-landing dev", + "example": "pnpm --filter @jcode.labs/ragmir build && node packages/ragmir-core/examples/library-api-demo/run.mjs", "format": "biome format --write .", "lint": "biome ci .", "lint:fix": "biome check --write .", - "package:check": "pnpm --filter @jcode.labs/mimir-tts package:check && pnpm --filter @jcode.labs/mimir package:check", + "package:check": "pnpm --filter @jcode.labs/ragmir-tts package:check && pnpm --filter @jcode.labs/ragmir package:check", "public:smoke": "node scripts/public-surface-smoke.mjs", "release:artifacts": "node scripts/release-artifacts.mjs", "release:semantic:smoke": "node scripts/semantic-release-smoke.mjs", - "smoke": "pnpm public:smoke && node scripts/smoke.mjs && pnpm --filter @jcode.labs/mimir mcp:smoke && pnpm --filter @jcode.labs/mimir-tts smoke && pnpm --filter @jcode.labs/mimir-app license:lemonsqueezy:smoke && pnpm --filter @jcode.labs/mimir-app release:preflight:smoke && pnpm --filter @jcode.labs/mimir-app release:updater-guard:smoke && pnpm --filter @jcode.labs/mimir-app release:checksums:smoke && pnpm --filter @jcode.labs/mimir-app release:manifest:smoke && pnpm --filter @jcode.labs/mimir-app release:bundle:verify:smoke && pnpm --filter @jcode.labs/mimir-license-webhook smoke && pnpm --filter @jcode.labs/mimir-license-webhook cf:dry-run", - "test": "pnpm --filter @jcode.labs/mimir-tts test && pnpm --filter @jcode.labs/mimir test", + "smoke": "pnpm public:smoke && node scripts/smoke.mjs && pnpm --filter @jcode.labs/ragmir mcp:smoke && pnpm --filter @jcode.labs/ragmir-tts smoke && pnpm --filter @jcode.labs/ragmir-app license:lemonsqueezy:smoke && pnpm --filter @jcode.labs/ragmir-app release:preflight:smoke && pnpm --filter @jcode.labs/ragmir-app release:updater-guard:smoke && pnpm --filter @jcode.labs/ragmir-app release:checksums:smoke && pnpm --filter @jcode.labs/ragmir-app release:manifest:smoke && pnpm --filter @jcode.labs/ragmir-app release:bundle:verify:smoke && pnpm --filter @jcode.labs/ragmir-license-webhook smoke && pnpm --filter @jcode.labs/ragmir-license-webhook cf:dry-run", + "test": "pnpm --filter @jcode.labs/ragmir-tts test && pnpm --filter @jcode.labs/ragmir test", "validate": "pnpm lint && pnpm audit:security && pnpm check && pnpm test && pnpm build && pnpm smoke && pnpm package:check && pnpm release:semantic:smoke && pnpm release:artifacts" }, "devDependencies": { diff --git a/packages/mimir-app/src-tauri/src/main.rs b/packages/mimir-app/src-tauri/src/main.rs deleted file mode 100644 index 59c1d4d..0000000 --- a/packages/mimir-app/src-tauri/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - mimir_app_lib::run() -} diff --git a/packages/mimir-core/README.md b/packages/mimir-core/README.md deleted file mode 100644 index de5ec3c..0000000 --- a/packages/mimir-core/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# Mimir Core Package - -`@jcode.labs/mimir` is Mimir Core, the technical core package for Mimir, an open-source local RAG -library, CLI, and MCP server. It indexes your specs, docs, and code locally and gives your AI agents -only the useful cited passages, over MCP, without burning tokens on your whole repo. - -**Full documentation:** https://github.com/jcode-works/jcode-mimir#readme - -This npm README is intentionally short because package READMEs are displayed separately on npm. The -GitHub root README is the canonical product documentation. - -## What It Does - -Mimir lets a Node.js repository keep a local knowledge base next to its private documents. It indexes -supported local files, stores the generated retrieval index in the target repository, and exposes the -same evidence through: - -- the `mimir` CLI (`kb` remains a legacy alias); -- a TypeScript library API; -- a local MCP stdio server for compatible AI agents; -- portable agent skills copied by `mimir setup`, including audio, Markdown-report, and legal-dossier - workflows. - -Mimir does not send documents to a hosted RAG service and does not generate final LLM answers in -core. It returns cited retrieval context so the agent or model you trust can write from local -evidence. - -## Use It For - -- private project, legal, operational, research, or institutional dossiers; -- codebase and architecture context retrieval; -- local-first agent workflows with bounded MCP access; -- cited summaries, audits, briefs, and decision support. - -## Install - -```bash -npm install --save-dev @jcode.labs/mimir -``` - -## Quick Start - -```bash -npx mimir setup -npx mimir install-agent --agents claude,codex,kimi,opencode,cline -npx mimir doctor --fix - -# Claude Code -claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)" - -# Codex -cat .mimir/codex-mcp.toml - -# Kimi Code CLI -kimi --mcp-config-file .mimir/kimi-mcp.json - -# OpenCode -cat .mimir/opencode.jsonc - -# Cline -cat .mimir/cline-mcp.json -``` - -Use `npx mimir setup --agents claude,codex --mcp-command ./scripts/serve-mcp.sh` when a -repository should generate only selected MCP helpers or launch through a local wrapper. - -By default, Mimir keeps local config, raw documents, generated indexes, access logs, models, reports, -audio, and agent helper files under a single ignored `.mimir/` project folder. It reports -unsupported/skipped files during ingestion and reports supported files that produced no extractable -text. `mimir setup` adds the matching Git ignore entry for local Mimir state. - -The primary workflow is agent-first: Claude Code, Codex, Kimi, OpenCode, Cline, or another -MCP-capable assistant asks Mimir for cited local context, then writes or reasons from those -citations. For terminal checks, use `npx mimir search "your question"` or -`npx mimir ask "your question"`. For broader implementation or review work, use -`npx mimir research "your topic" --compact` before asking the agent to synthesize. - -Run `npx mimir doctor --fix` later to repair missing setup or rebuild stale indexes. -For better semantic Q&A, run `npx mimir models pull --enable`, then run -`npx mimir ingest --rebuild`. - -## Entry Points - -- CLI: `mimir` -- Library import: `@jcode.labs/mimir` -- MCP server: `npx mimir serve-mcp` -- Bundled skills: `npx mimir setup` or `npx mimir install-skill` - -The public TypeScript API reference is maintained in the root repository at -[`docs/api-reference.md`](https://github.com/jcode-works/jcode-mimir/blob/main/docs/api-reference.md). - -## Main Agent Setup - -After `npx mimir setup`, use `npx mimir install-agent --agents claude`, `--agents kimi`, -`--agents cline`, or a comma-separated list for native agent skill discovery. Native agent folders -link back to `.mimir/skills/` by default so there is one original skill source. Mimir Core also -generates MCP helpers for Claude Code, Codex, Kimi, OpenCode, and Cline under `.mimir/`. See the -canonical GitHub README for the full agent demo. - -## License - -MIT (c) Jean-Baptiste Thery. diff --git a/packages/mimir-core/dist/defaults.d.ts.map b/packages/mimir-core/dist/defaults.d.ts.map deleted file mode 100644 index 25270e0..0000000 --- a/packages/mimir-core/dist/defaults.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,eAAO,MAAM,SAAS,WAAW,CAAA;AACjC,eAAO,MAAM,aAAa,QAAQ,CAAA;AAClC,eAAO,MAAM,kBAAkB,YAAY,CAAA;AAC3C,eAAO,MAAM,aAAa,eAAqB,CAAA;AAC/C,eAAO,MAAM,WAAW,uBAA6B,CAAA;AACrD,eAAO,MAAM,kBAAkB,oBAAiC,CAAA;AAChE,eAAO,MAAM,wBAAwB,kBAAwB,CAAA;AAE7D,eAAO,MAAM,sBAAsB,uBAAuB,CAAA;AAE1D,eAAO,MAAM,mBAAmB,UAM/B,CAAA;AAED,eAAO,MAAM,qBAAqB,YAAkB,CAAA;AACpD,eAAO,MAAM,yBAAyB,SAAsB,CAAA;AAC5D,eAAO,MAAM,8BAA8B,aAA2B,CAAA;AACtE,eAAO,MAAM,uCAAuC,eAA6B,CAAA;AAEjF,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,aAAa,CA+BtD,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,IAAI,CAAC,MAAM,EAAE,aAAa,CAM7D,CAAA"} \ No newline at end of file diff --git a/packages/mimir-core/dist/gitignore.d.ts b/packages/mimir-core/dist/gitignore.d.ts deleted file mode 100644 index 3731e9d..0000000 --- a/packages/mimir-core/dist/gitignore.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const MIMIR_GITIGNORE_ENTRIES: string[]; -export declare function ensureMimirGitignore(cwd?: string): Promise; -//# sourceMappingURL=gitignore.d.ts.map \ No newline at end of file diff --git a/packages/mimir-core/dist/gitignore.d.ts.map b/packages/mimir-core/dist/gitignore.d.ts.map deleted file mode 100644 index cc42123..0000000 --- a/packages/mimir-core/dist/gitignore.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../src/gitignore.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB,UAA0B,CAAA;AAE9D,wBAAsB,oBAAoB,CAAC,GAAG,SAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAyBhF"} \ No newline at end of file diff --git a/packages/mimir-core/dist/gitignore.js.map b/packages/mimir-core/dist/gitignore.js.map deleted file mode 100644 index 1e2a6d3..0000000 --- a/packages/mimir-core/dist/gitignore.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../src/gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,qBAAqB,CAAC,CAAA;AAE9D,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IAC9B,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;IACnD,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACtF,MAAM,YAAY,GAAG,IAAI,GAAG,CAC1B,OAAO;SACJ,KAAK,CAAC,OAAO,CAAC;SACd,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,OAAO,CAAC,CACnB,CAAA;IACD,MAAM,cAAc,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;IAE1F,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,cAAc,GAAG,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IACvF,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,cAAc,CAAC;SACtE,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC;SACpC,IAAI,CAAC,IAAI,CAAC,CAAA;IACb,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAA;IAChC,MAAM,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;IAEzD,MAAM,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC5C,OAAO,IAAI,CAAA;AACb,CAAC"} \ No newline at end of file diff --git a/packages/mimir-core/examples/sovereign-rag-demo/.gitignore b/packages/mimir-core/examples/sovereign-rag-demo/.gitignore deleted file mode 100644 index 1b13b2c..0000000 --- a/packages/mimir-core/examples/sovereign-rag-demo/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.mimir/ -!.mimir/ -!.mimir/config.json -!.mimir/sources.txt -.mimir/storage/ -.mimir/access.log -.mimir/models/ -.mimir/reports/ -.mimir/audio/ -node_modules/ -private/** diff --git a/packages/mimir-core/examples/sovereign-rag-demo/raw/facility-scan.heic b/packages/mimir-core/examples/sovereign-rag-demo/raw/facility-scan.heic deleted file mode 100644 index 29aebfb..0000000 --- a/packages/mimir-core/examples/sovereign-rag-demo/raw/facility-scan.heic +++ /dev/null @@ -1,3 +0,0 @@ -Synthetic placeholder for an unsupported scanned document format. - -Convert scans to OCR text or PDF before expecting Mimir to index their content. diff --git a/packages/mimir-core/skills/mimir/SKILL.md b/packages/mimir-core/skills/mimir/SKILL.md deleted file mode 100644 index a6f481f..0000000 --- a/packages/mimir-core/skills/mimir/SKILL.md +++ /dev/null @@ -1,366 +0,0 @@ ---- -name: mimir -description: Use this skill whenever a repository uses or should use Mimir, local-first RAG, private project knowledge, document ingestion, knowledge-base audit, or MCP access to project documents. Use it before answering from memory when the user asks about facts that may be present in private files, asks to ingest/query/audit documents, or wants Claude Code, Codex, Kimi, OpenCode, Cline, or another AI agent to use the same local knowledge base. ---- - -# Mimir - -Mimir is a sovereign local RAG knowledge base for confidential project documents and datasets. It -indexes files from the current repository, stores vectors locally, and exposes both a CLI and an MCP -server. - -Use this skill to help an AI agent work with a Mimir-enabled repository without leaking private documents or relying on stale memory. - -## Core Rule - -Treat the repository where the user is working as the source of truth. Mimir data belongs to that repository, not to the installed npm package. - -Default project layout: - -```plain text -.mimir/config.json # local Mimir config -.mimir/sources.txt # optional extra source paths -.mimir/raw/ # raw documents to ingest -.mimir/storage/ # generated local index -.mimir/access.log # metadata-only access log -.mimir/reports/ # generated local Markdown reports -``` - -## Data Safety - -- Do not commit raw documents, secrets, tax IDs, scans, bank documents, tokens, or generated vector stores. -- Keep `.mimir/` ignored by Git. Legacy projects using `private/`, `private/**`, or `.kb/` must keep those paths - ignored too. -- Treat `mimir search`, `mimir ask`, `mimir research`, and MCP results as sensitive because they can - contain private source passages even when redaction is enabled. -- Prefer summaries and citations over dumping long private passages into the chat. -- If the user asks for a high-stakes answer, identify which facts came from Mimir and which still require professional or official verification. - -## First Checks - -From the repository root: - -```bash -pnpm exec mimir doctor -``` - -If Mimir is installed but setup is incomplete or the index is stale: - -```bash -pnpm exec mimir doctor --fix -``` - -If Mimir is not installed: - -```bash -pnpm add -D @jcode.labs/mimir -pnpm exec mimir setup -# Optional: one-time model download for higher-quality semantic retrieval. -pnpm exec mimir setup --semantic -``` - -When the repository should expose only specific agent helpers or must launch MCP through a local -wrapper, generate the agent kit explicitly: - -```bash -pnpm exec mimir setup --agents claude,codex --mcp-command ./scripts/serve-mcp.sh -``` - -If the package manager is npm: - -```bash -npm install --save-dev @jcode.labs/mimir -npx mimir setup -# Optional: one-time model download for higher-quality semantic retrieval. -npx mimir setup --semantic -``` - -Use `status`, `audit`, and `security-audit` for deeper checks after `doctor` explains the current -state. Use `audit --unsupported` when files exist but may not have been indexed. - -## Agent Operating Loop - -Prefer the smallest command that answers the user's task: - -| Task | Preferred command or tool | -| --- | --- | -| Check whether Mimir is usable | `mimir doctor` or MCP `mimir_status` | -| Repair missing setup or stale index | `mimir doctor --fix` | -| Inspect skipped, duplicate, archive-like, or mirror-like sources | `mimir audit --unsupported` | -| Find exact source passages | `mimir search "" --compact` or MCP `mimir_search` with `compact: true` | -| Prepare a broad implementation, review, or planning answer | `mimir research "" --compact` or MCP `mimir_research` | -| Return deterministic cited context for a trusted model | `mimir ask ""` or MCP `mimir_ask` | -| Check local privacy posture | `mimir security-audit` or MCP `mimir_security_audit` | -| Validate recall against known expected files | `mimir evaluate --golden ` or MCP `mimir_evaluate` | - -## Provider Modes - -Default retrieval mode: - -```json -{ - "embeddingProvider": "local-hash" -} -``` - -This supports ingestion, search, MCP retrieval, and `mimir ask` with cited passages without a model -server. It is lexical/hash retrieval, not model-semantic search. Do not present it as equivalent to -semantic embeddings. - -Optional semantic embedding mode: - -```json -{ - "embeddingProvider": "transformers", - "embeddingModel": "mixedbread-ai/mxbai-embed-xsmall-v1", - "embeddingModelPath": ".mimir/models", - "transformersAllowRemoteModels": false -} -``` - -This uses Transformers.js for embeddings only. Keep `transformersAllowRemoteModels` false for -air-gapped or confidential work and preload model files under `embeddingModelPath`. Use the -first-run shortcut when a one-time download is acceptable: - -```bash -pnpm exec mimir setup --semantic -pnpm exec mimir ingest --rebuild -``` - -Or enable it later: - -```bash -pnpm exec mimir models pull --enable -pnpm exec mimir ingest --rebuild -``` - -## Ingestion Workflow - -After documents are added or changed: - -```bash -pnpm exec mimir doctor --fix -pnpm exec mimir audit -pnpm exec mimir audit --unsupported -pnpm exec mimir security-audit -pnpm exec mimir status -``` - -`mimir doctor --fix` updates the index only when supported files are present and the privacy posture -has no warnings. Normal `mimir ingest` reuses unchanged rows; use `mimir ingest --rebuild` after changing -embedding provider/model or chunking settings. `mimir ingest --json` reports `emptyTextFiles` when -supported files, typically scanned PDFs, produce no indexable text. `mimir doctor` should show -`ready=true` before relying on the index. The audit must show no missing or stale supported files, and -the security audit should not show warnings before relying on Mimir for sensitive work. - -Default retrieval is tuned for broader recall (`topK: 8`, `chunkOverlap: 200`). Keep MCP retrieval -bounded by `mcpMaxTopK`, and raise `--top-k` only when the first results are too narrow. - -For monorepos, keep raw confidential files local and list useful repo docs through `.mimir/sources.txt`. -Entries can be paths or glob patterns relative to the Mimir project root, with `!` exclusions: - -```plain text -../apps/*/README.md -../apps/*/docs/**/*.md -!../apps/**/node_modules/** -``` - -Use the CLI when you want agents or setup scripts to update the file without manual editing: - -```bash -pnpm exec mimir sources add "../apps/*/README.md" "../apps/*/docs/**/*.md" -pnpm exec mimir sources add "!../apps/**/node_modules/**" -pnpm exec mimir sources list -``` - -## Query Workflow - -Use search when you need exact source passages: - -```bash -pnpm exec mimir search "your query" -``` - -Use research when the user asks for broad context, implementation planning, review preparation, or a -cross-document audit: - -```bash -pnpm exec mimir research "your topic" --compact -``` - -`mimir research` runs audit and security checks, generates several related retrieval queries, merges -cited evidence, reports source diagnostics, and performs a lightweight repository code scan unless -`--no-code` is used. - -Use ask when you need cited context for the current agent or an external LLM: - -```bash -pnpm exec mimir ask "your question" -``` - -Ground answers in returned sources. If search results are weak, say that the current index does not -prove the point and ask for the missing document. `mimir ask` returns cited passages rather than LLM -synthesis. Use those passages as context for the current agent, or tell the user that generative -synthesis needs a trusted external LLM or model runtime. - -## Deep Research Workflow - -For broad summaries, audits, planning, or institutional dossiers, do not rely on one query. Build a -small retrieval plan first: - -- use `mimir research` as the first pass when available; -- check `mimir audit` and `mimir security-audit`; -- query the main topic; -- query names, dates, amounts, obligations, risks, decisions, and missing evidence separately; -- compare the strongest passages across files; -- ask a synthesis question only after search has found enough grounded context; -- cite source paths and chunk numbers in the answer when useful; -- explicitly say when the index does not prove a claim. - -For sensitive work, prefer the smallest useful `topK`; raise it only when the first results are too -thin. Do not dump large raw passages into the chat unless the user explicitly asks for extracts. - -## MCP Usage - -If the agent supports MCP, configure a server for the repository: - -```json -{ - "mcpServers": { - "mimir": { - "command": "pnpm", - "args": ["exec", "mimir", "serve-mcp"], - "cwd": "/absolute/path/to/the/repository" - } - } -} -``` - -Generated MCP helpers use the `mimir` server name by default. Use `mimir setup --mcp-name ` -or `mimir install-skill --mcp-name ` only when the repository needs a different stable MCP -key. - -For Claude Code, run this from the target repository root after `pnpm exec mimir setup`: - -```bash -claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)" -``` - -For Codex, copy `.mimir/codex-mcp.toml` into `~/.codex/config.toml` or another trusted Codex config -layer. It includes both the Mimir MCP server and `skills.config` entries. - -For Kimi Code CLI, run from the target repository root: - -```bash -kimi --mcp-config-file .mimir/kimi-mcp.json -``` - -For OpenCode, merge `.mimir/opencode.jsonc` into the OpenCode config layer used by the project. - -For Cline, add `.mimir/cline-mcp.json` under `mcpServers` in Cline's MCP configuration. - -For other MCP clients that cannot set `cwd`, set `MIMIR_PROJECT_ROOT=/absolute/path/to/repository` -when launching `mimir serve-mcp`. `MIMIR_PROJECT_ROOT` is the strongest signal; otherwise a -configured current working directory wins before agent-provided project environment variables. - -Available MCP tools: - -- `mimir_status`: show config and chunk count. -- `mimir_search`: retrieve source passages; set `compact: true` when the agent context is tight. -- `mimir_ask`: return cited retrieval context. -- `mimir_research`: run audit-backed multi-query retrieval with source diagnostics and optional code matches. -- `mimir_audit`: compare source files with the current index. -- `mimir_evaluate`: measure retrieval recall against a local golden query file. -- `mimir_usage_report`: summarize metadata-only local access-log activity without query text or local paths. -- `mimir_security_audit`: inspect local privacy, provider, redaction, MCP, and gitignore posture. - -Prefer MCP tools over shell commands when the agent runtime provides them. Use shell commands when MCP is unavailable. - -MCP is read-focused and intentionally does not expose index deletion. Use `pnpm exec mimir -destroy-index --yes` from the shell when the user explicitly wants to remove the generated index. - -## Optional Audio Summaries - -If the user asks for a listenable or TTS summary, load the optional -`.mimir/skills/mimir-audio-summary/` skill installed by `pnpm exec mimir setup`. - -The audio skill should: - -- gather evidence through Mimir first; -- write narration text only to a temp file outside the repository; -- render generated audio under `.mimir/audio/` by default; -- prefer offline TTS engines for confidential content. - -## Optional Markdown Reports - -If the user asks for a Markdown report, dossier, audit memo, planning note, or decision brief, load -the optional `.mimir/skills/mimir-markdown-report/` skill installed by `pnpm exec mimir setup`. - -The report skill should: - -- gather evidence through multiple Mimir searches first; -- cite source paths and chunk numbers; -- separate facts, inference, uncertainty, and missing evidence; -- write reports under `.mimir/reports/` by default; -- keep generated reports uncommitted unless the user explicitly wants a sanitized tracked report. - -## Installing This Skill Into A Repository - -Most repositories should run the full setup command: - -```bash -pnpm exec mimir setup -``` - -Use the lower-level skill installer only when Mimir is already initialized and you want to refresh -the local agent kit: - -```bash -pnpm exec mimir install-skill -pnpm exec mimir install-skill --agents claude,codex --mcp-command ./scripts/serve-mcp.sh -``` - -This creates: - -```plain text -.mimir/skills/mimir/SKILL.md -.mimir/skills/mimir-audio-summary/SKILL.md -.mimir/skills/mimir-markdown-report/SKILL.md -.mimir/skills/mimir-legal-dossier/SKILL.md -.mimir/mcp.json -.mimir/claude-mcp-server.json -.mimir/codex-mcp.toml -.mimir/kimi-mcp.json -.mimir/opencode.jsonc -.mimir/cline-mcp.json -.mimir/agent-setup.md -.mimir/README.md -``` - -When `--agents` is used, only the selected agent-specific MCP helpers are written, and stale -unselected helpers in `.mimir/` are removed. - -For native discovery, install only the agent the user uses: - -```bash -pnpm exec mimir install-agent --agents claude -pnpm exec mimir install-agent --agents kimi -pnpm exec mimir install-agent --agents claude,codex,kimi,opencode,cline -``` - -By default this writes project-scope skill folders such as `.claude/skills/`, `.kimi/skills/`, -`.opencode/skills/`, or `.cline/skills/` as links back to `.mimir/skills/`. That keeps one original -skill source. Add `--scope user` for global installs, or `--mode copy` only when an agent/runtime -cannot follow symlinked skill directories. - -Agents that understand skill folders can load `.mimir/skills/mimir/` directly when native discovery -is not installed. Other agents can read `.mimir/README.md` and `.mimir/mcp.json`. - -## Answer Style - -When answering from Mimir: - -- mention the source file paths and chunk/source labels when useful; -- distinguish facts found in documents from inference; -- keep operational/legal/financial claims conservative; -- recommend ingesting or providing missing documents when the index is incomplete. diff --git a/packages/mimir-landing/README.md b/packages/mimir-landing/README.md deleted file mode 100644 index 449a5ac..0000000 --- a/packages/mimir-landing/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Mimir Landing - -Unpublished Astro static landing package for the Mimir product surface. - -The visible product title stays `Mimir`. The technical core remains `Mimir Core` in developer-facing -metadata only. - -```bash -pnpm --filter @jcode.labs/mimir-landing dev -pnpm --filter @jcode.labs/mimir-landing build -pnpm --filter @jcode.labs/mimir-landing cf:dry-run -``` - -The landing presents the open-source Mimir Core package (local RAG that gives AI agents cited -passages over MCP without burning tokens), sovereign local retrieval, and a light teaser for the -future Tauri desktop client. It does not collect emails. - -Cloudflare Workers Static Assets configuration lives in [`wrangler.jsonc`](./wrangler.jsonc). The -canonical domain is `mimir.jcode.works`; it is the future direct-download release surface for Mimir -Desktop, not an App Store or Play Store destination. - -No PostHog or hosted document telemetry belongs here. If analytics are needed later, prefer -Cloudflare Web Analytics. diff --git a/packages/mimir-landing/public/og/mimir-og.png b/packages/mimir-landing/public/og/mimir-og.png deleted file mode 100644 index 9ab4eef..0000000 Binary files a/packages/mimir-landing/public/og/mimir-og.png and /dev/null differ diff --git a/packages/mimir-tts/dist/index.js.map b/packages/mimir-tts/dist/index.js.map deleted file mode 100644 index 5ca1934..0000000 --- a/packages/mimir-tts/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAA;AACrD,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAA;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAA;AAC/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAA;AAChD,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,CAAA;AACpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAA;AACtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAA;AACtC,MAAM,CAAC,MAAM,oBAAoB,GAAgB,IAAI,CAAA;AAKrD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA;AAGxD,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC7D,CAAC;AAED,0FAA0F;AAC1F,qEAAqE;AACrE,MAAM,qBAAqB,GAAgC;IACzD,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,iBAAiB;CACtB,CAAA;AACD,MAAM,sBAAsB,GAAgC;IAC1D,EAAE,EAAE,kBAAkB;IACtB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,kBAAkB;CACvB,CAAA;AA4ED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA4B;IAC7D,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;IACtD,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,CAAA;IACzC,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;IACrC,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IACzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAA;IAC3F,MAAM,SAAS,GAAG,cAAc,CAC9B,GAAG,EACH,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,sBAAsB,CAChF,CAAA;IACD,MAAM,UAAU,GAAG,cAAc,CAC/B,GAAG,EACH,OAAO,CAAC,UAAU,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,QAAQ,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAC9F,CAAA;IACD,MAAM,iBAAiB,GACrB,OAAO,CAAC,iBAAiB;QACzB,cAAc,CAAC,+BAA+B,EAAE,+BAA+B,CAAC,CAAA;IAElF,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAE1D,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,oBAAoB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QACvC,MAAM,KAAK,GACT,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,oBAAoB,CAAC,QAAQ,CAAC,CAAA;QACrF,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,iBAAiB,CAAA;QACjF,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,IAAI,eAAe,CAAA;QACxD,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,gBAAgB,CAAA;QAC/D,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;YAC9C,MAAM,IAAI,KAAK,CACb,oFAAoF,CACrF,CAAA;QACH,CAAC;QACD,MAAM,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAEjD,OAAO;YACL,UAAU;YACV,MAAM;YACN,QAAQ;YACR,YAAY,EAAE,KAAK;YACnB,KAAK;YACL,SAAS;YACT,iBAAiB;YACjB,KAAK;YACL,IAAI;YACJ,YAAY,EAAE,IAAI;YAClB,OAAO,EAAE,IAAI;SACd,CAAA;IACH,CAAC;IAED,oBAAoB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;IACvC,MAAM,WAAW,GACf,OAAO,CAAC,WAAW,IAAI,CAAC,MAAM,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAA;IAC5F,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;IACnE,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IAE7B,OAAO;QACL,UAAU;QACV,MAAM;QACN,QAAQ;QACR,YAAY,EAAE,KAAK;QACnB,KAAK;QACL,SAAS;QACT,iBAAiB;QACjB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI;QACpF,OAAO,EAAE,MAAM,CAAC,IAAI,YAAY,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;KACzE,CAAA;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI;QAC3B,aAAa,EAAE,kBAAkB;QACjC,eAAe,EAAE,oBAAoB;QACrC,SAAS,EAAE,CAAC,GAAG,aAAa,CAAC;QAC7B,YAAY,EAAE,iBAAiB;QAC/B,gBAAgB,EAAE,sBAAsB;QACxC,wBAAwB,EAAE,+BAA+B;QACzD,qBAAqB,EAAE,MAAM,qBAAqB,EAAE;QACpD,gBAAgB,EAAE,gBAAgB,EAAE;QACpC,gBAAgB,EAAE,kBAAkB;QACpC,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,KAAK;QACrB,YAAY,EAAE,YAAY;KAC3B,CAAA;AACH,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,OAA4B;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IAC/F,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;IAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACrE,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,SAAS,iBAAiB,CACxB,GAAW,EACX,QAA4B,EAC5B,MAAoB;IAEpB,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAA;IACzF,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,EAAE,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC,CAAA;AAC/D,CAAC;AAED,SAAS,cAAc,CAAC,GAAW,EAAE,KAAa;IAChD,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;AAClE,CAAC;AAED,SAAS,kBAAkB,CAAC,OAA4B;IACtD,MAAM,MAAM,GAAuB,EAAE,CAAA;IACrC,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC9B,MAAM,CAAC,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAA;IACvD,CAAC;IACD,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACtC,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;IAC9B,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AAC5D,CAAC;AAED,KAAK,UAAU,sBAAsB,CACnC,KAAa,EACb,SAAiB,EACjB,iBAA0B;IAE1B,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAA;IAC9D,YAAY,CAAC,GAAG,CAAC,cAAc,GAAG,SAAS,CAAA;IAC3C,YAAY,CAAC,GAAG,CAAC,QAAQ,GAAG,SAAS,CAAA;IACrC,YAAY,CAAC,GAAG,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;IAEtD,OAAO,CAAC,MAAM,YAAY,CAAC,QAAQ,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAA2B,CAAA;AACzF,CAAC;AAED,SAAS,aAAa,CAAC,OAA4B;IACjD,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,OAAO,cAAc,CAAA;IACvB,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,EAAE,IAAI,kBAAkB,CAAA;IACzE,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,cAAc,EAAE,CAAC;QACzD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IACnF,IAAI,YAAY,KAAK,KAAK,EAAE,CAAC;QAC3B,OAAO,cAAc,CAAA;IACvB,CAAC;IACD,IAAI,YAAY,KAAK,KAAK,EAAE,CAAC;QAC3B,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,gBAAgB,CAAA;IAC/D,OAAO,aAAa,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAA;AAClD,CAAC;AAED,SAAS,qBAAqB,CAAC,MAAkC;IAC/D,OAAO,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AAC1C,CAAC;AAED,SAAS,cAAc,CAAC,QAAgB;IACtC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAA;IACtD,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACzB,OAAO,KAAK,CAAA;IACd,CAAC;IACD,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACzB,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,oBAAoB,CAAC,QAAgB,EAAE,QAAsB;IACpE,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAA;IACvC,IAAI,MAAM,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CACb,OAAO,QAAQ,wBAAwB,MAAM,mBAAmB,QAAQ,QAAQ,CACjF,CAAA;IACH,CAAC;AACH,CAAC;AAED,SAAS,aAAa;IACpB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAA;IACxC,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,cAAc,EAAE,CAAC;QAC/D,OAAO,GAAG,CAAA;IACZ,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,QAAqB;IACvD,OAAO,qBAAqB,CAAC,QAAQ,CAAC,CAAA;AACxC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,QAAqB;IACxD,OAAO,sBAAsB,CAAC,QAAQ,CAAC,CAAA;AACzC,CAAC;AAED,SAAS,eAAe,CAAC,OAA4B;IACnD,OAAO,OAAO,CAAC,QAAQ,IAAI,eAAe,EAAE,IAAI,oBAAoB,CAAA;AACtE,CAAC;AAED,SAAS,eAAe;IACtB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,EAAE,CAAA;IACrD,OAAO,GAAG,KAAK,SAAS,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AAClE,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO,SAAS,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAA;AAC5E,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,OAA6B;IAC1D,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAA;IACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;IAChD,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAE/C,IAAI,CAAC;QACH,MAAM,UAAU,CAAC;YACf,QAAQ;YACR,QAAQ;YACR,SAAS;YACT,OAAO,CAAC,KAAK;YACb,UAAU,OAAO,CAAC,IAAI,EAAE;YACxB,eAAe;YACf,OAAO,CAAC,UAAU;SACnB,CAAC,CAAA;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACrD,CAAC;AACH,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,IAAc;IACtC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE;QACpC,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC;KACpC,CAAC,CAAA;IACF,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAE9D,MAAM,IAAI,GAAG,MAAM,IAAI,OAAO,CAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAChE,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QACzB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;IAEF,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAA;QAC5D,MAAM,IAAI,KAAK,CACb,MAAM;YACJ,CAAC,CAAC,kCAAkC,IAAI,KAAK,MAAM,EAAE;YACrD,CAAC,CAAC,kCAAkC,IAAI,GAAG,CAC9C,CAAA;IACH,CAAC;AACH,CAAC;AAED,KAAK,UAAU,qBAAqB;IAClC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAA;QACzC,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,IAAY,EAAE,QAAiB;IACrD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5C,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,KAAK,EAAE,CAAC;QACnD,OAAO,IAAI,CAAA;IACb,CAAC;IACD,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QACnD,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;IAClD,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,sBAAsB,CAAC,CAAC,CAAA;AAClG,CAAC"} \ No newline at end of file diff --git a/packages/mimir-ui/README.md b/packages/mimir-ui/README.md deleted file mode 100644 index 9629ab2..0000000 --- a/packages/mimir-ui/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Mimir UI - -Unpublished workspace package for shared Mimir React primitives and Tailwind theme tokens. - -It is adapted from the WorkoutGen UI/landing approach, but it contains Mimir-specific styling only: -no WorkoutGen copy, assets, analytics, CDN configuration, or secrets. - -Used by: - -- `@jcode.labs/mimir-landing` -- `@jcode.labs/mimir-app` - -```bash -pnpm --filter @jcode.labs/mimir-ui check -``` diff --git a/packages/mimir-app/README.md b/packages/ragmir-app/README.md similarity index 52% rename from packages/mimir-app/README.md rename to packages/ragmir-app/README.md index a509039..0e1f4e8 100644 --- a/packages/mimir-app/README.md +++ b/packages/ragmir-app/README.md @@ -1,57 +1,57 @@ -# Mimir App +# Ragmir App -Unpublished Tauri desktop/mobile shell for Mimir. +Unpublished Tauri desktop/mobile shell for Ragmir. Root `pnpm build` validates the Vite frontend bundle. Native desktop/mobile builds stay explicit: ```bash -pnpm --filter @jcode.labs/mimir-app tauri:dev -pnpm --filter @jcode.labs/mimir-app tauri:build -pnpm --filter @jcode.labs/mimir-app tauri:build:macos -pnpm --filter @jcode.labs/mimir-app tauri:build:windows -pnpm --filter @jcode.labs/mimir-app tauri:build:linux -pnpm --filter @jcode.labs/mimir-app tauri:ios:init -pnpm --filter @jcode.labs/mimir-app tauri:ios:dev -pnpm --filter @jcode.labs/mimir-app tauri:android:init -pnpm --filter @jcode.labs/mimir-app tauri:android:dev -pnpm --filter @jcode.labs/mimir-app tauri:android:build +pnpm --filter @jcode.labs/ragmir-app tauri:dev +pnpm --filter @jcode.labs/ragmir-app tauri:build +pnpm --filter @jcode.labs/ragmir-app tauri:build:macos +pnpm --filter @jcode.labs/ragmir-app tauri:build:windows +pnpm --filter @jcode.labs/ragmir-app tauri:build:linux +pnpm --filter @jcode.labs/ragmir-app tauri:ios:init +pnpm --filter @jcode.labs/ragmir-app tauri:ios:dev +pnpm --filter @jcode.labs/ragmir-app tauri:android:init +pnpm --filter @jcode.labs/ragmir-app tauri:android:dev +pnpm --filter @jcode.labs/ragmir-app tauri:android:build ``` Run a release-machine preflight before native packaging: ```bash -pnpm --filter @jcode.labs/mimir-app release:preflight -- --target macos -pnpm --filter @jcode.labs/mimir-app release:preflight -- --target windows -pnpm --filter @jcode.labs/mimir-app release:preflight -- --target linux -pnpm --filter @jcode.labs/mimir-app release:preflight -- --target android -pnpm --filter @jcode.labs/mimir-app release:preflight:smoke +pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target macos +pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target windows +pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target linux +pnpm --filter @jcode.labs/ragmir-app release:preflight -- --target android +pnpm --filter @jcode.labs/ragmir-app release:preflight:smoke ``` Generate checksums after a native bundle exists: ```bash -pnpm --filter @jcode.labs/mimir-app release:checksums -pnpm --filter @jcode.labs/mimir-app release:manifest -- --target macos +pnpm --filter @jcode.labs/ragmir-app release:checksums +pnpm --filter @jcode.labs/ragmir-app release:manifest -- --target macos ``` -`release:manifest` reads `SHA256SUMS` and writes `mimir-app-release.json` next to native artifacts +`release:manifest` reads `SHA256SUMS` and writes `ragmir-app-release.json` next to native artifacts so the static direct-download surface can render verified artifact metadata without hardcoded file names. -The app uses `@jcode.labs/mimir-ui` for shared styling and should keep privacy controls visible by +The app uses `@jcode.labs/ragmir-ui` for shared styling and should keep privacy controls visible by default. -Mimir Core integration is a bounded native Tauri command around the existing `mimir` CLI/MCP -surface. In local native runs, set `MIMIR_CLI_BIN` when the `mimir` binary is not on `PATH`. See +Ragmir Core integration is a bounded native Tauri command around the existing `ragmir` CLI/MCP +surface. In local native runs, set `RAGMIR_CLI_BIN` when the `ragmir` binary is not on `PATH`. See [`../../docs/app-sidecar-architecture.md`](../../docs/app-sidecar-architecture.md). -The current shell consumes JSON from `mimir doctor`, `mimir status`, `mimir ingest`, -`mimir ask`, `mimir security-audit`, `mimir models pull --enable`, and offline `mimir audio` for +The current shell consumes JSON from `ragmir doctor`, `ragmir status`, `ragmir ingest`, +`ragmir ask`, `ragmir security-audit`, `ragmir models pull --enable`, and offline `ragmir audio` for project status, cited retrieval, privacy posture, explicit semantic model setup, Markdown reports, and local audio report rendering. Registered projects can opt into watched-folder mode from the Projects view. This is a local polling -layer over incremental `mimir ingest`: it re-indexes the selected project every 5 minutes, stores the +layer over incremental `ragmir ingest`: it re-indexes the selected project every 5 minutes, stores the setting only in local app storage, and does not add a cloud connector or background daemon. Google Drive support is intentionally implemented as a local-sync connector: select the folder made @@ -78,9 +78,9 @@ repository. Generate a keypair into an ignored local folder: ```bash -pnpm --filter @jcode.labs/mimir-app license:keypair \ - --private-key .mimir/license-private.jwk \ - --public-key .mimir/license-public.jwk +pnpm --filter @jcode.labs/ragmir-app license:keypair \ + --private-key .ragmir/license-private.jwk \ + --public-key .ragmir/license-public.jwk ``` The command writes key files with owner-only permissions and does not print private key material. @@ -88,14 +88,14 @@ The command writes key files with owner-only permissions and does not print priv Build the app with the public JWK only: ```bash -VITE_MIMIR_LICENSE_PUBLIC_KEY_JWK="$(cat .mimir/license-public.jwk)" pnpm --filter @jcode.labs/mimir-app build +VITE_RAGMIR_LICENSE_PUBLIC_KEY_JWK="$(cat .ragmir/license-public.jwk)" pnpm --filter @jcode.labs/ragmir-app build ``` Issue a license key from the private JWK: ```bash -pnpm --filter @jcode.labs/mimir-app license:issue \ - --private-key .mimir/license-private.jwk \ +pnpm --filter @jcode.labs/ragmir-app license:issue \ + --private-key .ragmir/license-private.jwk \ --holder "Customer Name" \ --tier solo \ --major-version 0 @@ -105,9 +105,9 @@ Convert a Lemon Squeezy order/subscription JSON export or webhook payload into t license format: ```bash -pnpm --filter @jcode.labs/mimir-app license:from-lemonsqueezy \ +pnpm --filter @jcode.labs/ragmir-app license:from-lemonsqueezy \ --event lemon-event.json \ - --private-key .mimir/license-private.jwk \ + --private-key .ragmir/license-private.jwk \ --major-version 0 \ --json ``` diff --git a/packages/mimir-app/index.html b/packages/ragmir-app/index.html similarity index 92% rename from packages/mimir-app/index.html rename to packages/ragmir-app/index.html index ed1f073..a3a5b31 100644 --- a/packages/mimir-app/index.html +++ b/packages/ragmir-app/index.html @@ -4,7 +4,7 @@ - Mimir + Ragmir
diff --git a/packages/mimir-app/package.json b/packages/ragmir-app/package.json similarity index 92% rename from packages/mimir-app/package.json rename to packages/ragmir-app/package.json index 71bc4dd..269d416 100644 --- a/packages/mimir-app/package.json +++ b/packages/ragmir-app/package.json @@ -1,8 +1,8 @@ { - "name": "@jcode.labs/mimir-app", + "name": "@jcode.labs/ragmir-app", "version": "0.4.10", "private": true, - "description": "Cross-platform Mimir desktop and mobile shell built with Tauri.", + "description": "Cross-platform Ragmir desktop and mobile shell built with Tauri.", "type": "module", "license": "MIT", "scripts": { @@ -37,7 +37,7 @@ "tauri:ios:init": "tauri ios init" }, "dependencies": { - "@jcode.labs/mimir-ui": "workspace:*", + "@jcode.labs/ragmir-ui": "workspace:*", "@tauri-apps/api": "^2.10.0", "lucide-react": "^1.21.0", "react": "19.2.7", diff --git a/packages/mimir-app/public/favicon.svg b/packages/ragmir-app/public/favicon.svg similarity index 100% rename from packages/mimir-app/public/favicon.svg rename to packages/ragmir-app/public/favicon.svg diff --git a/packages/mimir-app/scripts/license-core.mjs b/packages/ragmir-app/scripts/license-core.mjs similarity index 91% rename from packages/mimir-app/scripts/license-core.mjs rename to packages/ragmir-app/scripts/license-core.mjs index 81d3986..20cb409 100644 --- a/packages/mimir-app/scripts/license-core.mjs +++ b/packages/ragmir-app/scripts/license-core.mjs @@ -1,18 +1,18 @@ import { randomUUID, webcrypto } from "node:crypto" import { readFile } from "node:fs/promises" -export const PRODUCT_ID = "mimir-desktop" -export const LICENSE_FORMAT = "MIMIR1" +export const PRODUCT_ID = "ragmir-desktop" +export const LICENSE_FORMAT = "RAGMIR1" export const LICENSE_TIERS = new Set(["solo", "team", "company"]) export async function readPrivateKey(values) { if (values["private-key"]) { return JSON.parse(await readFile(values["private-key"], "utf8")) } - if (process.env.MIMIR_LICENSE_PRIVATE_KEY_JWK) { - return JSON.parse(process.env.MIMIR_LICENSE_PRIVATE_KEY_JWK) + if (process.env.RAGMIR_LICENSE_PRIVATE_KEY_JWK) { + return JSON.parse(process.env.RAGMIR_LICENSE_PRIVATE_KEY_JWK) } - throw new Error("Provide --private-key or MIMIR_LICENSE_PRIVATE_KEY_JWK.") + throw new Error("Provide --private-key or RAGMIR_LICENSE_PRIVATE_KEY_JWK.") } export async function signLicensePayload(payload, privateKeyJwk) { diff --git a/packages/mimir-app/scripts/license-from-lemonsqueezy-smoke.mjs b/packages/ragmir-app/scripts/license-from-lemonsqueezy-smoke.mjs similarity index 91% rename from packages/mimir-app/scripts/license-from-lemonsqueezy-smoke.mjs rename to packages/ragmir-app/scripts/license-from-lemonsqueezy-smoke.mjs index c207b27..74e5eea 100644 --- a/packages/mimir-app/scripts/license-from-lemonsqueezy-smoke.mjs +++ b/packages/ragmir-app/scripts/license-from-lemonsqueezy-smoke.mjs @@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url" const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)) const CONVERTER_SCRIPT = join(SCRIPT_DIR, "license-from-lemonsqueezy.mjs") -const tempDir = await mkdtemp(join(tmpdir(), "mimir-lemonsqueezy-smoke-")) +const tempDir = await mkdtemp(join(tmpdir(), "ragmir-lemonsqueezy-smoke-")) try { const { privateKeyJwk, publicKeyJwk } = await generateKeyPair() @@ -90,7 +90,7 @@ async function assertLicenseOutput(output, publicKeyJwk, expected) { assertEqual(output.expiresAt ?? null, expected.expiresAt, "expiresAt") const payload = await verifyLicenseKey(output.licenseKey, publicKeyJwk) - assertEqual(payload.product, "mimir-desktop", "payload.product") + assertEqual(payload.product, "ragmir-desktop", "payload.product") assertEqual(payload.holder, "Synthetic Buyer", "payload.holder") assertEqual(payload.tier, expected.tier, "payload.tier") assertEqual(payload.licenseId, expected.licenseId, "payload.licenseId") @@ -99,8 +99,8 @@ async function assertLicenseOutput(output, publicKeyJwk, expected) { async function verifyLicenseKey(licenseKey, publicKeyJwk) { const parts = String(licenseKey).split(".") - if (parts.length !== 3 || parts[0] !== "MIMIR1") { - throw new Error("license key must use MIMIR1.payload.signature format") + if (parts.length !== 3 || parts[0] !== "RAGMIR1") { + throw new Error("license key must use RAGMIR1.payload.signature format") } const [, encodedPayload, encodedSignature] = parts @@ -137,8 +137,8 @@ function syntheticOrderEvent() { created_at: "2026-06-01T00:00:00.000Z", user_name: "Synthetic Buyer", user_email: "buyer@example.test", - product_name: "Mimir Desktop", - variant_name: "Mimir Desktop Solo", + product_name: "Ragmir Desktop", + variant_name: "Ragmir Desktop Solo", }, }, } @@ -156,10 +156,10 @@ function syntheticSubscriptionEvent() { renews_at: "2026-08-01T00:00:00.000Z", user_name: "Synthetic Buyer", user_email: "buyer@example.test", - product_name: "Mimir Desktop", - variant_name: "Mimir Desktop Team", + product_name: "Ragmir Desktop", + variant_name: "Ragmir Desktop Team", custom_data: { - mimir_tier: "team", + ragmir_tier: "team", }, }, }, diff --git a/packages/mimir-app/scripts/license-from-lemonsqueezy.mjs b/packages/ragmir-app/scripts/license-from-lemonsqueezy.mjs similarity index 98% rename from packages/mimir-app/scripts/license-from-lemonsqueezy.mjs rename to packages/ragmir-app/scripts/license-from-lemonsqueezy.mjs index 5ca4996..4ff3ffb 100644 --- a/packages/mimir-app/scripts/license-from-lemonsqueezy.mjs +++ b/packages/ragmir-app/scripts/license-from-lemonsqueezy.mjs @@ -142,7 +142,7 @@ function holderName(attributes) { } function inferTier(attributes) { - const explicitTier = stringValue(attributes.custom_data?.mimir_tier) + const explicitTier = stringValue(attributes.custom_data?.ragmir_tier) if (explicitTier) { return licenseTier(explicitTier) } diff --git a/packages/mimir-app/scripts/license-issue.mjs b/packages/ragmir-app/scripts/license-issue.mjs similarity index 100% rename from packages/mimir-app/scripts/license-issue.mjs rename to packages/ragmir-app/scripts/license-issue.mjs diff --git a/packages/mimir-app/scripts/license-keypair.mjs b/packages/ragmir-app/scripts/license-keypair.mjs similarity index 91% rename from packages/mimir-app/scripts/license-keypair.mjs rename to packages/ragmir-app/scripts/license-keypair.mjs index 1a97f67..d9abe6d 100644 --- a/packages/mimir-app/scripts/license-keypair.mjs +++ b/packages/ragmir-app/scripts/license-keypair.mjs @@ -9,8 +9,8 @@ const keyPair = await webcrypto.subtle.generateKey({ name: "ECDSA", namedCurve: ]) const privateKey = await webcrypto.subtle.exportKey("jwk", keyPair.privateKey) const publicKey = await webcrypto.subtle.exportKey("jwk", keyPair.publicKey) -const privateKeyPath = args["private-key"] ?? ".mimir/license-private.jwk" -const publicKeyPath = args["public-key"] ?? ".mimir/license-public.jwk" +const privateKeyPath = args["private-key"] ?? ".ragmir/license-private.jwk" +const publicKeyPath = args["public-key"] ?? ".ragmir/license-public.jwk" const writtenPrivateKey = await writeKey(privateKeyPath, JSON.stringify(privateKey, null, 2)) const writtenPublicKey = await writeKey(publicKeyPath, JSON.stringify(publicKey, null, 2)) diff --git a/packages/mimir-app/scripts/native-bundle-verify-smoke.mjs b/packages/ragmir-app/scripts/native-bundle-verify-smoke.mjs similarity index 75% rename from packages/mimir-app/scripts/native-bundle-verify-smoke.mjs rename to packages/ragmir-app/scripts/native-bundle-verify-smoke.mjs index d2a52f6..1fb1491 100644 --- a/packages/mimir-app/scripts/native-bundle-verify-smoke.mjs +++ b/packages/ragmir-app/scripts/native-bundle-verify-smoke.mjs @@ -8,7 +8,7 @@ const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)) const CHECKSUMS_SCRIPT = join(SCRIPT_DIR, "native-checksums.mjs") const MANIFEST_SCRIPT = join(SCRIPT_DIR, "native-release-manifest.mjs") const VERIFY_SCRIPT = join(SCRIPT_DIR, "native-bundle-verify.mjs") -const tempDir = await mkdtemp(join(tmpdir(), "mimir-native-bundle-verify-smoke-")) +const tempDir = await mkdtemp(join(tmpdir(), "ragmir-native-bundle-verify-smoke-")) try { for (const target of ["linux", "macos", "windows", "android"]) { @@ -32,7 +32,7 @@ try { const incompleteLinuxDir = join(tempDir, "incomplete-linux") await mkdir(incompleteLinuxDir, { recursive: true }) - await writeFile(join(incompleteLinuxDir, "Mimir_0.0.0.AppImage"), "synthetic appimage\n", "utf8") + await writeFile(join(incompleteLinuxDir, "Ragmir_0.0.0.AppImage"), "synthetic appimage\n", "utf8") runNode([CHECKSUMS_SCRIPT, "--artifacts-dir", incompleteLinuxDir]) runNode([MANIFEST_SCRIPT, "--artifacts-dir", incompleteLinuxDir, "--target", "linux"]) assertFails( @@ -47,26 +47,26 @@ try { async function writeTargetArtifacts(artifactsDir, target) { if (target === "linux") { - await writeFile(join(artifactsDir, "Mimir_0.0.0.AppImage"), "synthetic appimage\n", "utf8") - await writeFile(join(artifactsDir, "mimir_0.0.0_amd64.deb"), "synthetic deb\n", "utf8") + await writeFile(join(artifactsDir, "Ragmir_0.0.0.AppImage"), "synthetic appimage\n", "utf8") + await writeFile(join(artifactsDir, "ragmir_0.0.0_amd64.deb"), "synthetic deb\n", "utf8") return } if (target === "macos") { - await mkdir(join(artifactsDir, "Mimir.app", "Contents"), { recursive: true }) - await writeFile(join(artifactsDir, "Mimir_0.0.0.dmg"), "synthetic dmg\n", "utf8") + await mkdir(join(artifactsDir, "Ragmir.app", "Contents"), { recursive: true }) + await writeFile(join(artifactsDir, "Ragmir_0.0.0.dmg"), "synthetic dmg\n", "utf8") await writeFile( - join(artifactsDir, "Mimir.app", "Contents", "Info.plist"), + join(artifactsDir, "Ragmir.app", "Contents", "Info.plist"), "synthetic plist\n", "utf8", ) return } if (target === "windows") { - await writeFile(join(artifactsDir, "Mimir_0.0.0_x64-setup.exe"), "synthetic exe\n", "utf8") - await writeFile(join(artifactsDir, "Mimir_0.0.0_x64_en-US.msi"), "synthetic msi\n", "utf8") + await writeFile(join(artifactsDir, "Ragmir_0.0.0_x64-setup.exe"), "synthetic exe\n", "utf8") + await writeFile(join(artifactsDir, "Ragmir_0.0.0_x64_en-US.msi"), "synthetic msi\n", "utf8") return } - await writeFile(join(artifactsDir, "mimir-universal-release.apk"), "synthetic apk\n", "utf8") + await writeFile(join(artifactsDir, "ragmir-universal-release.apk"), "synthetic apk\n", "utf8") } function runNode(args) { diff --git a/packages/mimir-app/scripts/native-bundle-verify.mjs b/packages/ragmir-app/scripts/native-bundle-verify.mjs similarity index 96% rename from packages/mimir-app/scripts/native-bundle-verify.mjs rename to packages/ragmir-app/scripts/native-bundle-verify.mjs index 2c19c41..0529bd0 100644 --- a/packages/mimir-app/scripts/native-bundle-verify.mjs +++ b/packages/ragmir-app/scripts/native-bundle-verify.mjs @@ -8,7 +8,7 @@ const target = requiredTarget(args.target) const artifactsDir = path.resolve(args["artifacts-dir"] ?? "src-tauri/target/release/bundle") const checksumsPath = path.resolve(args.checksums ?? path.join(artifactsDir, "SHA256SUMS")) const manifestPath = path.resolve( - args.manifest ?? path.join(artifactsDir, "mimir-app-release.json"), + args.manifest ?? path.join(artifactsDir, "ragmir-app-release.json"), ) const checksumEntries = await readChecksums(checksumsPath) const manifest = JSON.parse(await readFile(manifestPath, "utf8")) @@ -24,7 +24,7 @@ const report = await verifyBundle({ if (args.json) { console.log(JSON.stringify(report, null, 2)) } else { - console.log(`Mimir native bundle verification: ${report.ok ? "ok" : "failed"}`) + console.log(`Ragmir native bundle verification: ${report.ok ? "ok" : "failed"}`) for (const check of report.checks) { console.log(`${check.ok ? "ok" : "missing"} ${check.label}: ${check.detail}`) } @@ -39,7 +39,7 @@ async function verifyBundle({ artifactsDir, checksumEntries, files, manifest, ta const manifestFiles = Array.isArray(manifest.files) ? manifest.files : [] const manifestMap = new Map(manifestFiles.map((entry) => [entry.file, entry])) const artifactFiles = files.filter( - (file) => file !== "SHA256SUMS" && file !== "mimir-app-release.json", + (file) => file !== "SHA256SUMS" && file !== "ragmir-app-release.json", ) const checks = [ { diff --git a/packages/mimir-app/scripts/native-checksums-smoke.mjs b/packages/ragmir-app/scripts/native-checksums-smoke.mjs similarity index 83% rename from packages/mimir-app/scripts/native-checksums-smoke.mjs rename to packages/ragmir-app/scripts/native-checksums-smoke.mjs index c71954e..e38a371 100644 --- a/packages/mimir-app/scripts/native-checksums-smoke.mjs +++ b/packages/ragmir-app/scripts/native-checksums-smoke.mjs @@ -7,16 +7,16 @@ import { fileURLToPath } from "node:url" const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)) const CHECKSUMS_SCRIPT = join(SCRIPT_DIR, "native-checksums.mjs") -const tempDir = await mkdtemp(join(tmpdir(), "mimir-native-checksums-smoke-")) +const tempDir = await mkdtemp(join(tmpdir(), "ragmir-native-checksums-smoke-")) const artifactsDir = join(tempDir, "bundle") const nestedDir = join(artifactsDir, "app") const manifestPath = join(artifactsDir, "SHA256SUMS") try { await mkdir(nestedDir, { recursive: true }) - await writeFile(join(artifactsDir, "mimir_0.0.0_amd64.deb"), "synthetic deb\n", "utf8") - await writeFile(join(artifactsDir, "Mimir_0.0.0.AppImage"), "synthetic appimage\n", "utf8") - await writeFile(join(nestedDir, "mimir"), "synthetic binary\n", "utf8") + await writeFile(join(artifactsDir, "ragmir_0.0.0_amd64.deb"), "synthetic deb\n", "utf8") + await writeFile(join(artifactsDir, "Ragmir_0.0.0.AppImage"), "synthetic appimage\n", "utf8") + await writeFile(join(nestedDir, "ragmir"), "synthetic binary\n", "utf8") await writeFile(manifestPath, "stale manifest should be replaced\n", "utf8") const result = spawnSync( @@ -38,7 +38,7 @@ try { const files = output.files.map((entry) => entry.file) assertEqual( JSON.stringify(files), - JSON.stringify(["app/mimir", "mimir_0.0.0_amd64.deb", "Mimir_0.0.0.AppImage"]), + JSON.stringify(["app/ragmir", "ragmir_0.0.0_amd64.deb", "Ragmir_0.0.0.AppImage"]), "sorted manifest files", ) assertEqual(files.includes("SHA256SUMS"), false, "manifest should not checksum itself") diff --git a/packages/mimir-app/scripts/native-checksums.mjs b/packages/ragmir-app/scripts/native-checksums.mjs similarity index 100% rename from packages/mimir-app/scripts/native-checksums.mjs rename to packages/ragmir-app/scripts/native-checksums.mjs diff --git a/packages/mimir-app/scripts/native-release-manifest-smoke.mjs b/packages/ragmir-app/scripts/native-release-manifest-smoke.mjs similarity index 82% rename from packages/mimir-app/scripts/native-release-manifest-smoke.mjs rename to packages/ragmir-app/scripts/native-release-manifest-smoke.mjs index 2af2579..8e99295 100644 --- a/packages/mimir-app/scripts/native-release-manifest-smoke.mjs +++ b/packages/ragmir-app/scripts/native-release-manifest-smoke.mjs @@ -8,14 +8,14 @@ import { fileURLToPath } from "node:url" const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)) const CHECKSUMS_SCRIPT = join(SCRIPT_DIR, "native-checksums.mjs") const MANIFEST_SCRIPT = join(SCRIPT_DIR, "native-release-manifest.mjs") -const tempDir = await mkdtemp(join(tmpdir(), "mimir-native-release-manifest-smoke-")) +const tempDir = await mkdtemp(join(tmpdir(), "ragmir-native-release-manifest-smoke-")) const artifactsDir = join(tempDir, "bundle") -const manifestPath = join(artifactsDir, "mimir-app-release.json") +const manifestPath = join(artifactsDir, "ragmir-app-release.json") try { await mkdir(artifactsDir, { recursive: true }) - await writeFile(join(artifactsDir, "mimir_0.0.0_amd64.deb"), "synthetic deb\n", "utf8") - await writeFile(join(artifactsDir, "Mimir_0.0.0.AppImage"), "synthetic appimage\n", "utf8") + await writeFile(join(artifactsDir, "ragmir_0.0.0_amd64.deb"), "synthetic deb\n", "utf8") + await writeFile(join(artifactsDir, "Ragmir_0.0.0.AppImage"), "synthetic appimage\n", "utf8") runNode([CHECKSUMS_SCRIPT, "--artifacts-dir", artifactsDir]) assertFails( @@ -26,7 +26,7 @@ try { "--target", "linux", "--base-url", - "http://downloads.example.invalid/mimir/linux", + "http://downloads.example.invalid/ragmir/linux", ], "--base-url must use HTTPS.", ) @@ -39,7 +39,7 @@ try { "--out", manifestPath, "--base-url", - "https://downloads.example.invalid/mimir/linux", + "https://downloads.example.invalid/ragmir/linux", "--generated-at", "2026-06-30T00:00:00.000Z", "--json", @@ -49,8 +49,8 @@ try { const manifest = output.manifest assertEqual(output.outputPath, manifestPath, "outputPath") assertEqual(manifest.schemaVersion, 1, "schemaVersion") - assertEqual(manifest.product, "Mimir", "product") - assertEqual(manifest.packageName, "@jcode.labs/mimir-app", "packageName") + assertEqual(manifest.product, "Ragmir", "product") + assertEqual(manifest.packageName, "@jcode.labs/ragmir-app", "packageName") assertEqual(manifest.target, "linux", "target") assertEqual(manifest.generatedAt, "2026-06-30T00:00:00.000Z", "generatedAt") assertEqual(manifest.files.length, 2, "files length") @@ -62,7 +62,7 @@ try { assertEqual(entry.sizeBytes, content.byteLength, `sizeBytes for ${entry.file}`) assertEqual( entry.downloadUrl, - `https://downloads.example.invalid/mimir/linux/${entry.file}`, + `https://downloads.example.invalid/ragmir/linux/${entry.file}`, `downloadUrl for ${entry.file}`, ) } diff --git a/packages/mimir-app/scripts/native-release-manifest.mjs b/packages/ragmir-app/scripts/native-release-manifest.mjs similarity index 96% rename from packages/mimir-app/scripts/native-release-manifest.mjs rename to packages/ragmir-app/scripts/native-release-manifest.mjs index 43fe733..49b8f56 100644 --- a/packages/mimir-app/scripts/native-release-manifest.mjs +++ b/packages/ragmir-app/scripts/native-release-manifest.mjs @@ -5,7 +5,7 @@ const VALID_TARGETS = new Set(["macos", "windows", "linux", "android"]) const args = parseArgs(process.argv.slice(2)) const artifactsDir = path.resolve(args["artifacts-dir"] ?? "src-tauri/target/release/bundle") const checksumsPath = path.resolve(args.checksums ?? path.join(artifactsDir, "SHA256SUMS")) -const outputPath = path.resolve(args.out ?? path.join(artifactsDir, "mimir-app-release.json")) +const outputPath = path.resolve(args.out ?? path.join(artifactsDir, "ragmir-app-release.json")) const target = requiredTarget(args.target) const generatedAt = args["generated-at"] ?? new Date().toISOString() const baseUrl = optionalHttpsBaseUrl(args["base-url"]) @@ -18,7 +18,7 @@ if (entries.length === 0) { const manifest = { schemaVersion: 1, - product: "Mimir", + product: "Ragmir", packageName: packageJson.name, version: packageJson.version, target, @@ -46,7 +46,7 @@ async function manifestEntries(root, checksums, output, baseUrl) { throw new Error(`Invalid checksum line: ${line}`) } const [, sha256, file] = match - if (file === outputRelative || file === "mimir-app-release.json") { + if (file === outputRelative || file === "ragmir-app-release.json") { continue } if (path.isAbsolute(file) || file.split("/").includes("..")) { diff --git a/packages/mimir-app/scripts/release-preflight-smoke.mjs b/packages/ragmir-app/scripts/release-preflight-smoke.mjs similarity index 98% rename from packages/mimir-app/scripts/release-preflight-smoke.mjs rename to packages/ragmir-app/scripts/release-preflight-smoke.mjs index 0345e56..a2006f2 100644 --- a/packages/mimir-app/scripts/release-preflight-smoke.mjs +++ b/packages/ragmir-app/scripts/release-preflight-smoke.mjs @@ -10,7 +10,7 @@ const SECRET_VALUES = [ "synthetic-apple-team-id", "synthetic-apple-signing-identity", "synthetic-windows-thumbprint", - "https://timestamp.example.invalid/mimir", + "https://timestamp.example.invalid/ragmir", "/tmp/synthetic-android-sdk", "/tmp/synthetic-java-home", ] @@ -100,7 +100,7 @@ function envForTarget(target) { if (target === "windows") { return { WINDOWS_CERTIFICATE_THUMBPRINT: "synthetic-windows-thumbprint", - WINDOWS_TIMESTAMP_URL: "https://timestamp.example.invalid/mimir", + WINDOWS_TIMESTAMP_URL: "https://timestamp.example.invalid/ragmir", } } if (target === "android") { diff --git a/packages/mimir-app/scripts/release-preflight.mjs b/packages/ragmir-app/scripts/release-preflight.mjs similarity index 98% rename from packages/mimir-app/scripts/release-preflight.mjs rename to packages/ragmir-app/scripts/release-preflight.mjs index eac4faf..2bb9a19 100644 --- a/packages/mimir-app/scripts/release-preflight.mjs +++ b/packages/ragmir-app/scripts/release-preflight.mjs @@ -13,7 +13,7 @@ const ok = checks.every((check) => check.ok) if (args.json) { console.log(JSON.stringify({ target, ok, checks }, null, 2)) } else { - console.log(`Mimir app release preflight: ${target}`) + console.log(`Ragmir app release preflight: ${target}`) for (const check of checks) { console.log(`${check.ok ? "ok" : "missing"} ${check.label}: ${check.detail}`) } diff --git a/packages/mimir-app/scripts/updater-guard-smoke.mjs b/packages/ragmir-app/scripts/updater-guard-smoke.mjs similarity index 92% rename from packages/mimir-app/scripts/updater-guard-smoke.mjs rename to packages/ragmir-app/scripts/updater-guard-smoke.mjs index 601a9c8..c18d13f 100644 --- a/packages/mimir-app/scripts/updater-guard-smoke.mjs +++ b/packages/ragmir-app/scripts/updater-guard-smoke.mjs @@ -6,12 +6,12 @@ import { fileURLToPath } from "node:url" const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)) const UPDATER_GUARD_SCRIPT = join(SCRIPT_DIR, "updater-guard.mjs") -const tempDir = await mkdtemp(join(tmpdir(), "mimir-updater-guard-smoke-")) +const tempDir = await mkdtemp(join(tmpdir(), "ragmir-updater-guard-smoke-")) try { const disabledConfig = join(tempDir, "updater-disabled.json") await writeJson(disabledConfig, { - productName: "Mimir", + productName: "Ragmir", version: "0.0.0", bundle: {}, plugins: {}, @@ -52,8 +52,8 @@ try { bundle: { createUpdaterArtifacts: true }, plugins: { updater: { - pubkey: "mimir-updater-public-key-for-smoke-test-0001", - endpoints: ["https://updates.example.invalid/mimir/latest.json"], + pubkey: "ragmir-updater-public-key-for-smoke-test-0001", + endpoints: ["https://updates.example.invalid/ragmir/latest.json"], }, }, }) diff --git a/packages/mimir-app/scripts/updater-guard.mjs b/packages/ragmir-app/scripts/updater-guard.mjs similarity index 98% rename from packages/mimir-app/scripts/updater-guard.mjs rename to packages/ragmir-app/scripts/updater-guard.mjs index b4b2557..723aecb 100644 --- a/packages/mimir-app/scripts/updater-guard.mjs +++ b/packages/ragmir-app/scripts/updater-guard.mjs @@ -24,7 +24,7 @@ const ok = checks.every((check) => check.ok) if (args.json) { console.log(JSON.stringify({ configPath, ok, checks }, null, 2)) } else { - console.log(`Mimir app updater config: ${ok ? "ok" : "needs attention"}`) + console.log(`Ragmir app updater config: ${ok ? "ok" : "needs attention"}`) for (const check of checks) { console.log(`${check.ok ? "ok" : "missing"} ${check.label}: ${check.detail}`) } diff --git a/packages/mimir-app/src-tauri/Cargo.toml b/packages/ragmir-app/src-tauri/Cargo.toml similarity index 78% rename from packages/mimir-app/src-tauri/Cargo.toml rename to packages/ragmir-app/src-tauri/Cargo.toml index 1dc53d5..21133a0 100644 --- a/packages/mimir-app/src-tauri/Cargo.toml +++ b/packages/ragmir-app/src-tauri/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "mimir-app" +name = "ragmir-app" version = "0.4.10" -description = "Mimir desktop and mobile shell" +description = "Ragmir desktop and mobile shell" authors = ["Jean-Baptiste Thery"] edition = "2021" license = "MIT" [lib] -name = "mimir_app_lib" +name = "ragmir_app_lib" crate-type = ["staticlib", "cdylib", "rlib"] [build-dependencies] diff --git a/packages/mimir-app/src-tauri/build.rs b/packages/ragmir-app/src-tauri/build.rs similarity index 100% rename from packages/mimir-app/src-tauri/build.rs rename to packages/ragmir-app/src-tauri/build.rs diff --git a/packages/mimir-app/src-tauri/capabilities/default.json b/packages/ragmir-app/src-tauri/capabilities/default.json similarity index 72% rename from packages/mimir-app/src-tauri/capabilities/default.json rename to packages/ragmir-app/src-tauri/capabilities/default.json index 13cae5e..545a6be 100644 --- a/packages/mimir-app/src-tauri/capabilities/default.json +++ b/packages/ragmir-app/src-tauri/capabilities/default.json @@ -1,7 +1,7 @@ { "$schema": "../gen/schemas/desktop-schema.json", "identifier": "default", - "description": "Default Mimir app capabilities.", + "description": "Default Ragmir app capabilities.", "windows": ["main"], "permissions": ["core:default"] } diff --git a/packages/mimir-app/src-tauri/src/lib.rs b/packages/ragmir-app/src-tauri/src/lib.rs similarity index 73% rename from packages/mimir-app/src-tauri/src/lib.rs rename to packages/ragmir-app/src-tauri/src/lib.rs index 17d6719..1a32376 100644 --- a/packages/mimir-app/src-tauri/src/lib.rs +++ b/packages/ragmir-app/src-tauri/src/lib.rs @@ -8,9 +8,9 @@ use std::{ #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] -struct MimirCommandRequest { +struct RagmirCommandRequest { project_root: String, - command: MimirCommandKind, + command: RagmirCommandKind, query: Option, text: Option, rebuild: Option, @@ -19,7 +19,7 @@ struct MimirCommandRequest { #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case")] -enum MimirCommandKind { +enum RagmirCommandKind { Doctor, DoctorFix, Status, @@ -34,14 +34,14 @@ enum MimirCommandKind { #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] -struct MimirCommandOutput { +struct RagmirCommandOutput { status: i32, stdout: String, stderr: String, } #[tauri::command] -fn run_mimir_command(request: MimirCommandRequest) -> Result { +fn run_ragmir_command(request: RagmirCommandRequest) -> Result { let project_root = request.project_root.trim(); if project_root.is_empty() { return Err("Project root is required.".into()); @@ -55,52 +55,52 @@ fn run_mimir_command(request: MimirCommandRequest) -> Result Result, String> { +fn ragmir_args(request: &RagmirCommandRequest, project_root: &str) -> Result, String> { let mut args = vec!["--project-root".into(), project_root.into()]; match request.command { - MimirCommandKind::Doctor => args.extend(["doctor".into(), "--json".into()]), - MimirCommandKind::DoctorFix => { + RagmirCommandKind::Doctor => args.extend(["doctor".into(), "--json".into()]), + RagmirCommandKind::DoctorFix => { args.extend(["doctor".into(), "--fix".into(), "--json".into()]) } - MimirCommandKind::Status => args.extend(["status".into(), "--json".into()]), - MimirCommandKind::Ingest => { + RagmirCommandKind::Status => args.extend(["status".into(), "--json".into()]), + RagmirCommandKind::Ingest => { args.extend(["ingest".into(), "--json".into()]); if request.rebuild.unwrap_or(false) { args.push("--rebuild".into()); } } - MimirCommandKind::Search => { + RagmirCommandKind::Search => { let query = required_query(request)?; args.extend(["search".into(), query, "--json".into()]); push_top_k(&mut args, request.top_k); } - MimirCommandKind::Ask => { + RagmirCommandKind::Ask => { let query = required_query(request)?; args.extend(["ask".into(), query, "--json".into()]); push_top_k(&mut args, request.top_k); } - MimirCommandKind::SecurityAudit => { + RagmirCommandKind::SecurityAudit => { args.extend(["security-audit".into(), "--json".into()]); } - MimirCommandKind::AuditUnsupported => { + RagmirCommandKind::AuditUnsupported => { args.extend(["audit".into(), "--unsupported".into(), "--json".into()]); } - MimirCommandKind::ModelsPull => { + RagmirCommandKind::ModelsPull => { args.extend([ "models".into(), "pull".into(), @@ -108,7 +108,7 @@ fn mimir_args(request: &MimirCommandRequest, project_root: &str) -> Result { + RagmirCommandKind::AudioSummary => { let text_file = write_audio_summary_text(request, project_root)?; args.extend(["audio".into(), text_file, "--offline".into(), "--json".into()]); } @@ -117,7 +117,7 @@ fn mimir_args(request: &MimirCommandRequest, project_root: &str) -> Result Result { +fn required_query(request: &RagmirCommandRequest) -> Result { let query = request.query.as_deref().unwrap_or("").trim(); if query.is_empty() { return Err("Query is required.".into()); @@ -125,7 +125,7 @@ fn required_query(request: &MimirCommandRequest) -> Result { Ok(query.into()) } -fn required_text(request: &MimirCommandRequest) -> Result { +fn required_text(request: &RagmirCommandRequest) -> Result { let text = request.text.as_deref().unwrap_or("").trim(); if text.is_empty() { return Err("Audio text is required.".into()); @@ -134,11 +134,11 @@ fn required_text(request: &MimirCommandRequest) -> Result { } fn write_audio_summary_text( - request: &MimirCommandRequest, + request: &RagmirCommandRequest, project_root: &str, ) -> Result { let text = required_text(request)?; - let audio_dir = PathBuf::from(project_root).join(".mimir").join("audio"); + let audio_dir = PathBuf::from(project_root).join(".ragmir").join("audio"); fs::create_dir_all(&audio_dir) .map_err(|error| format!("Unable to prepare audio dir: {error}"))?; @@ -160,7 +160,7 @@ fn push_top_k(args: &mut Vec, top_k: Option) { #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() - .invoke_handler(tauri::generate_handler![run_mimir_command]) + .invoke_handler(tauri::generate_handler![run_ragmir_command]) .run(tauri::generate_context!()) - .expect("error while running Mimir") + .expect("error while running Ragmir") } diff --git a/packages/ragmir-app/src-tauri/src/main.rs b/packages/ragmir-app/src-tauri/src/main.rs new file mode 100644 index 0000000..70ee45f --- /dev/null +++ b/packages/ragmir-app/src-tauri/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + ragmir_app_lib::run() +} diff --git a/packages/mimir-app/src-tauri/tauri.conf.json b/packages/ragmir-app/src-tauri/tauri.conf.json similarity index 80% rename from packages/mimir-app/src-tauri/tauri.conf.json rename to packages/ragmir-app/src-tauri/tauri.conf.json index ca3211b..3153f52 100644 --- a/packages/mimir-app/src-tauri/tauri.conf.json +++ b/packages/ragmir-app/src-tauri/tauri.conf.json @@ -1,8 +1,8 @@ { "$schema": "https://schema.tauri.app/config/2", - "productName": "Mimir", + "productName": "Ragmir", "version": "0.4.10", - "identifier": "works.jcode.mimir", + "identifier": "works.jcode.ragmir", "build": { "beforeDevCommand": "pnpm dev", "beforeBuildCommand": "pnpm build", @@ -12,7 +12,7 @@ "app": { "windows": [ { - "title": "Mimir", + "title": "Ragmir", "width": 1180, "height": 820, "minWidth": 390, @@ -35,6 +35,6 @@ "targets": "all", "category": "Productivity", "shortDescription": "Sovereign local RAG for confidential dossiers.", - "longDescription": "Mimir is a local-first document retrieval app for confidential dossiers and AI agents." + "longDescription": "Ragmir is a local-first document retrieval app for confidential dossiers and AI agents." } } diff --git a/packages/mimir-app/src/app.tsx b/packages/ragmir-app/src/app.tsx similarity index 95% rename from packages/mimir-app/src/app.tsx rename to packages/ragmir-app/src/app.tsx index 233a97f..e0cdd46 100644 --- a/packages/mimir-app/src/app.tsx +++ b/packages/ragmir-app/src/app.tsx @@ -9,7 +9,7 @@ import { Input, Progress, Textarea, -} from "@jcode.labs/mimir-ui" +} from "@jcode.labs/ragmir-ui" import { Activity, Brain, @@ -40,33 +40,33 @@ import { saveLicenseKey, validateLicenseKey, } from "./lib/license.js" -import { - type AskResult, - type DoctorReport, - runAsk, - runAudioSummary, - runDoctor, - runIngest, - runModelsPull, - runSecurityAudit, - runStatus, - type SecurityAuditReport, - type StatusReport, -} from "./lib/mimir-sidecar.js" import { createProject, joinProjectPath, loadActiveProjectId, loadProjects, - type MimirProject, normalizeProjectRoot, type ProjectSourceKind, type ProjectStatus, + type RagmirProject, removeProject, saveActiveProjectId, saveProjects, upsertProject, } from "./lib/project-registry.js" +import { + type AskResult, + type DoctorReport, + runAsk, + runAudioSummary, + runDoctor, + runIngest, + runModelsPull, + runSecurityAudit, + runStatus, + type SecurityAuditReport, + type StatusReport, +} from "./lib/ragmir-sidecar.js" type View = "projects" | "retrieval" | "privacy" | "license" @@ -79,12 +79,12 @@ const AUTO_INGEST_INTERVAL_MS = 5 * 60 * 1000 export function App(): React.JSX.Element { const [view, setView] = useState("projects") - const [projects, setProjects] = useState(() => loadProjects()) + const [projects, setProjects] = useState(() => loadProjects()) const [activeProjectId, setActiveProjectId] = useState(() => loadActiveProjectId()) const [projectRoot, setProjectRoot] = useState("") const [googleDriveRoot, setGoogleDriveRoot] = useState("") const [dropStatus, setDropStatus] = useState("Drop a folder or paste its local path.") - const [runtimeMessage, setRuntimeMessage] = useState("Native Mimir runtime is idle.") + const [runtimeMessage, setRuntimeMessage] = useState("Native Ragmir runtime is idle.") const [isRunning, setIsRunning] = useState(false) const [question, setQuestion] = useState("") const [askResult, setAskResult] = useState(null) @@ -96,7 +96,7 @@ export function App(): React.JSX.Element { const [isLicenseChecking, setIsLicenseChecking] = useState(false) const projectsRef = useRef(projects) const isRunningRef = useRef(isRunning) - const autoIngestRunnerRef = useRef<(project: MimirProject) => Promise>(async () => {}) + const autoIngestRunnerRef = useRef<(project: RagmirProject) => Promise>(async () => {}) const activeProject = projects.find((project) => project.id === activeProjectId) ?? null autoIngestRunnerRef.current = runAutoIngestProject @@ -252,7 +252,7 @@ export function App(): React.JSX.Element { setRuntimeMessage("License removed from local app storage.") } - async function handleRefreshProject(project: MimirProject): Promise { + async function handleRefreshProject(project: RagmirProject): Promise { await runProjectCommand("Refreshing project status", project, async () => { const [report, status] = await Promise.all([ runDoctor(project.projectRoot), @@ -266,7 +266,7 @@ export function App(): React.JSX.Element { }) } - async function handleRepairProject(project: MimirProject): Promise { + async function handleRepairProject(project: RagmirProject): Promise { await runProjectCommand("Running safe repair", project, async () => { const report = await runDoctor(project.projectRoot, true) const status = await runStatus(project.projectRoot) @@ -280,7 +280,7 @@ export function App(): React.JSX.Element { }) } - async function handleIngestProject(project: MimirProject): Promise { + async function handleIngestProject(project: RagmirProject): Promise { replaceProject({ ...project, status: "indexing", progress: Math.max(project.progress, 35) }) await runProjectCommand("Ingesting project documents", project, async () => { const ingestResult = await runIngest(project.projectRoot) @@ -296,7 +296,7 @@ export function App(): React.JSX.Element { }) } - async function runAutoIngestProject(project: MimirProject): Promise { + async function runAutoIngestProject(project: RagmirProject): Promise { const startedAt = new Date().toISOString() const watchedProject = { ...project, @@ -319,7 +319,7 @@ export function App(): React.JSX.Element { }) } - function handleToggleAutoIngest(project: MimirProject): void { + function handleToggleAutoIngest(project: RagmirProject): void { const autoIngestEnabled = !project.autoIngestEnabled replaceProject({ ...project, @@ -337,7 +337,7 @@ export function App(): React.JSX.Element { async function handleAskSubmit(event: FormEvent): Promise { event.preventDefault() if (!activeProject) { - setRuntimeMessage("Select a project before asking Mimir.") + setRuntimeMessage("Select a project before asking Ragmir.") return } @@ -422,7 +422,7 @@ export function App(): React.JSX.Element { async function runProjectCommand( label: string, - project: MimirProject, + project: RagmirProject, action: () => Promise, ): Promise { setIsRunning(true) @@ -431,16 +431,16 @@ export function App(): React.JSX.Element { await action() } catch (error) { replaceProject({ ...project, status: "needs-review", progress: project.progress }) - setRuntimeMessage(error instanceof Error ? error.message : "Native Mimir runtime failed.") + setRuntimeMessage(error instanceof Error ? error.message : "Native Ragmir runtime failed.") } finally { setIsRunning(false) } } function updateProjectFromDoctor( - project: MimirProject, + project: RagmirProject, report: DoctorReport, - updates: Partial> = {}, + updates: Partial> = {}, ): void { replaceProject({ ...project, @@ -455,7 +455,7 @@ export function App(): React.JSX.Element { }) } - function replaceProject(project: MimirProject): void { + function replaceProject(project: RagmirProject): void { setProjects((currentProjects) => currentProjects.map((entry) => (entry.id === project.id ? project : entry)), ) @@ -470,7 +470,7 @@ export function App(): React.JSX.Element {