Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OmniContext

OmniContext is a local-first desktop context engine.

It watches your folders, ingests text files, normalizes/chunks content, stores semantic + lexical indexes, and lets you search/preview context in a Slint UI. It also builds agent-safe context bundles that respect permissions.

Daily-use app connectors (local-first)

OmniContext now ships local connectors for common daily workflows:

  • filesystem (custom folders)
  • obsidian
  • notion
  • logseq
  • vscode
  • slack_export
  • gmail_export
  • calendar_export
  • slack_api (official Slack API sync)
  • gmail_api (official Gmail API sync)

Network behavior is locked down:

  • Local/export connectors never require network.
  • API connectors are disabled by default.
  • API connectors only use network during explicit authorized sync/auth flows.
  • Query/search/context bundle paths stay local-only (LanceDB + Tantivy + local metadata).

What the app does

  • Ingest local files (.md, .txt, .rs, .ts, .json, .toml, .yaml, .yml, .csv, .ics, .eml, .mbox)
  • Store searchable memory in:
    • LanceDB (semantic vectors)
    • Tantivy (lexical BM25)
    • Automerge CRDT docs
  • Run hybrid search (WRR fusion: semantic + lexical)
  • Build token-budgeted context bundles with permission filtering
  • Write append-only audit logs for connector fetches and context retrieval

Workspace crates

  • omnict-app: desktop entrypoint
  • omnict-ui: Slint UI + core API adapter
  • omnict-core: orchestrator, config, lifecycle, audit logging
  • omnict-memory: Tantivy + LanceDB hybrid search
  • omnict-ingest: ingestion state machine + embedder bridge + metadata store
  • omnict-crdt: Automerge-backed content/state updates
  • omnict-mcp: MCP host + connector runtimes + WASM runner
  • omnict-connectors: built-in filesystem connector (+ wasm ABI exports)
  • omnict-models: shared domain model types
  • omnict-config: config schema + migration + validation
  • omnict-audit: typed append-only audit writer

Quick start

  1. Build
cargo build --workspace --all-features
  1. Run desktop app
cargo run -p omnict-app
  1. In the UI
  • Open Settings
  • Add a folder path
  • Enable the connectors you use daily
  • For gmail_api / slack_api, enable connector + network authorization toggles
  • Click Apply
  • Use connector actions:
    • Auth Start
    • Auth Complete (paste code/token)
    • Sync Now
    • Clear Cache (removes local indexed items for that connector and resets cursor)
  1. Search from the command palette and preview a result.

Example

Given a folder with:

  • roadmap.md: "Q2 roadmap includes agent permissions and audit logging"
  • notes.md: "context bundle token budget discussion"

Searching audit logging roadmap returns roadmap.md near the top. Selecting the result loads full preview content.

For app connectors:

  • Enable obsidian and vscode
  • Keep filesystem enabled for project folders
  • Search for meeting notes api migration
  • You will get matches merged from your Obsidian vault notes + VSCode config/snippets + local files.

For cloud API connectors:

  • Enable gmail_api or slack_api
  • Authorize once (tokens stored in OS keychain via keyring)
  • Run sync
  • Search works locally, including when offline after sync

Connector roots

By default, app connectors use common local directories under your home folder (for example ~/Documents/Notion or ~/Library/Application Support/Code/User).

You can override connector roots with env vars (comma-separated paths):

  • OMNICTX_OBSIDIAN_ROOTS
  • OMNICTX_NOTION_ROOTS
  • OMNICTX_LOGSEQ_ROOTS
  • OMNICTX_VSCODE_ROOTS
  • OMNICTX_SLACK_EXPORT_ROOTS
  • OMNICTX_GMAIL_EXPORT_ROOTS
  • OMNICTX_CALENDAR_EXPORT_ROOTS
  • OMNICTX_FILESYSTEM_ROOTS

API connector env vars:

  • Gmail:
    • OMNICTX_GMAIL_CLIENT_ID
    • OMNICTX_GMAIL_SCOPE (optional)
    • OMNICTX_GMAIL_DEVICE_URL (optional override)
    • OMNICTX_GMAIL_TOKEN_URL (optional override)
    • OMNICTX_GMAIL_API_BASE (optional override)
  • Slack:
    • OMNICTX_SLACK_CLIENT_ID (optional for OAuth-code flow)
    • OMNICTX_SLACK_CLIENT_SECRET (optional for OAuth-code flow)
    • OMNICTX_SLACK_SCOPE (optional)
    • OMNICTX_SLACK_AUTH_URL (optional override)
    • OMNICTX_SLACK_TOKEN_URL (optional override)
    • OMNICTX_SLACK_API_BASE (optional override)

Config migration notes

~/.omnicontext/config.json now uses typed connector settings:

{
  "chunk_size": 1000,
  "overlap": 150,
  "vector_weight": 0.65,
  "lexical_weight": 0.35,
  "max_token_budget": 12000,
  "connectors": {
    "filesystem": {
      "enabled": true,
      "mode": "local_export",
      "roots": [],
      "sync_interval_secs": null,
      "network_authorized": false
    },
    "gmail_api": {
      "enabled": false,
      "mode": "cloud_api",
      "roots": [],
      "sync_interval_secs": 300,
      "network_authorized": false
    }
  }
}

Legacy bool maps are still deserialized for backward compatibility and auto-merged with new defaults.

Local storage contract

~/.omnicontext/ now enforces:

  • lancedb/
  • tantivy/
  • crdt/
  • meta.db (redb backend)
  • config.json
  • audit.log
  • snapshots/

ONNX local embeddings (optional)

Default provider in config is deterministic for development/tests. To enable ONNX local embeddings, set embedding.provider to onnx_local and provide embedding.model_dir in ~/.omnicontext/config.json.

Required files in model_dir:

  • model.onnx
  • tokenizer.json
  • config.json
  • special_tokens_map.json
  • tokenizer_config.json

Quality gates

cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test --workspace --all-targets --all-features
cargo build --workspace --all-features
./scripts/check_layering.sh

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages