# Senrelay · 续境 (ContextCore) > Senrelay (open-source repository `ContextCore`) is a free, MIT-licensed, local-first macOS workbench and loopback service (`127.0.0.1:8420`) for cross-agent conversation relay (`/contextcore`), companion source-linked auto-memory, and unified multi-host AI coding assistant configuration management. Senrelay (续境) runs natively on macOS 14.0+ (Sonoma or later, Apple Silicon `arm64`) as `Senrelay.app` or from source via Python 3.11+ and Node 22/24 LTS. Pricing: **$0 (free and open source under the MIT License)**. > **Package Disambiguation**: Install the macOS app via `brew install --cask qingsongcui/tap/senrelay` or GitHub Releases (`Senrelay-macOS.zip`). Do **NOT** run `pip install contextcore`—the PyPI package of that name is an unrelated third-party project. ## Core Capabilities - **Cross-Agent Conversation Relay (`/contextcore`)**: Type `/contextcore` (or say "接着做" / "接力" / "continue" / "relay") inside any of the 6 core context hosts—Claude Code, Codex, Cursor, Antigravity, Oh My Pi (OMP), or OpenCode—to list numbered recent cross-host conversation candidates with source agent, project, title, and summary. Selecting only a candidate number loads context with `must_not_execute=true` so the new agent briefs status and awaits instructions; attaching a concrete task continues execution immediately. - **Companion Source-Linked Auto-Memory**: Companion MCP tools and Skills capture structured memories across six categories (Preferences, Background, Constraints, Tasks, Lessons, References) with exact conversation-turn or document provenance and a brief `💡` receipt, plus core-rule pinning (`📌`), conflict inbox review, version rollback, `AGENTS.md` handbook preview, and multi-format document imports (Markdown, TXT, JSON, PDF, DOCX, DOC). - **Unified Multi-Host Configuration Management**: Switch across 6 core context hosts and 9 extended configuration hosts from a permanent top bar, run One-Click Connect, apply provider presets, test endpoint latency, isolate API keys in macOS Keychain, and sync MCP servers, Skills, and system prompts with automatic rollback snapshots and external-edit Diff protection. ## System Requirements & Privacy Boundaries - **Platform & Pricing**: macOS 14.0+ on Apple Silicon (`arm64`) · Public Beta `v1.0.0-beta.1` · Free (`$0`, MIT License). - **Quick Install**: `brew install --cask qingsongcui/tap/senrelay` (first launch for ad-hoc signed bundle: `xattr -cr /Applications/Senrelay.app`). - **Privacy & Storage**: Loopback-only HTTP/MCP service (`127.0.0.1:8420`, dev `127.0.0.1:18420`), local SQLite + FTS5 full-text search (`~/Library/Application Support/ContextCore`, directory mode `0700`, DB mode `0600`), online SQLite backups (`contextcore backup`), and macOS Keychain secret isolation. No mandatory cloud account or background cloud upload. ## Resources - [English Homepage](https://senrelay.com/en/): Static English product overview, host capability matrix, and FAQ. - [Chinese Homepage (中文首页)](https://senrelay.com/): Primary Simplified Chinese product overview and interactive walkthrough. - [English Setup & Workflow Guide](https://senrelay.com/en/guide.html): Homebrew Cask install, first launch (`xattr -cr`), source build, and daily workflows. - [Chinese Setup & Workflow Guide (中文运行指南)](https://senrelay.com/guide.html): 本地安装、首次启动、源码运行与三大工作流指南。 - [Extended LLM Reference](https://senrelay.com/llms-full.txt): Complete 6-point relay specification, 6+9 host support matrix, CLI commands, and bilingual FAQ. - [GitHub Repository](https://github.com/qingsongcui/ContextCore): Source code, architecture contracts, and automated verification gates. - [Release v1.0.0-beta.1](https://github.com/qingsongcui/ContextCore/releases/tag/v1.0.0-beta.1): Prebuilt `Senrelay-macOS.zip` and `SHA256SUMS`. - [License](https://github.com/qingsongcui/ContextCore/blob/main/LICENSE): MIT License. ## 6-Point Cross-Agent Relay Pack Specification When `/contextcore` loads a selected conversation across Claude Code, Codex, Cursor, Antigravity, OMP, or OpenCode, it assembles a structured 6-point relay pack backed by recent verbatim transcript turns: 1. **01 — Project & Task Goal**: What the session is building and what is explicitly out of scope. 2. **02 — Current Progress**: Completed work vs remaining items. 3. **03 — Confirmed Decisions & Constraints**: Chosen architecture and boundaries that must not be altered. 4. **04 — Working Scene & Evidence**: Linked original conversation turns, project records, and imported documents. 5. **05 — Blockers & Open Questions**: Unresolved issues and assumptions requiring verification. 6. **06 — Next Action Plan**: Exact resume point and verification criteria. **Execution Safety Contract**: - **Number-only reply** (e.g. `1`): Sets `must_not_execute=true`; the target agent summarizes the handoff state and waits for your next prompt without editing files or running destructive commands. - **Number + task reply** (e.g. `1, finish the unit tests`): Loads the 6-point pack and executes the requested follow-up task directly. ## Host Support Matrix (6 Core Context Hosts + 9 Extended Configuration Hosts) Senrelay strictly separates configuration file writes, synthetic/local tests, and live host process reloads: | Tier | Host | Surface | Session Capture, Auto-Memory & `/contextcore` Relay | Config Management Scope | |---|---|---|---|---| | Core Context Host | Claude Code | CLI | Supported | Providers, MCP (`~/.claude.json`), Skills, prompts, snapshots & diff guard | | Core Context Host | Codex | Desktop / CLI | Supported (surfaces tracked separately) | Providers, MCP (`~/.codex/config.toml`), Skills, prompts, snapshots & diff guard | | Core Context Host | Cursor | IDE / CLI | Supported (surfaces tracked separately) | Providers, MCP, Skills, rules, snapshots & diff guard | | Core Context Host | Antigravity | Desktop | Supported (separate from `agy` CLI) | Providers, MCP, Skills, rules, snapshots & diff guard | | Core Context Host | OMP (Oh My Pi) | CLI | Supported (separate from `Pi`) | Providers, MCP, Skills, prompts, snapshots & diff guard | | Core Context Host | OpenCode | CLI | Supported | Providers, MCP, Skills, prompts, snapshots & diff guard | | Extended Config Host | Claude Desktop | Desktop | Not supported (config only) | Declared MCP JSON path; direct remote MCP & model activation rejected as unverified | | Extended Config Host | Gemini CLI | CLI | Not supported (config only) | Declared `.gemini/settings.json` MCP path; model activation rejected as unverified | | Extended Config Host | Grok Build | CLI | Not supported (config only) | Native TOML MCP entry; changing global default model unsupported | | Extended Config Host | Kimi Code | CLI | Not supported (config only) | Renders MCP & appends provider without altering existing default (requires context window) | | Extended Config Host | MiniMax Code | CLI | Not supported (config only) | Maps MCP entry & writes provider keeping native default; rejects over-long prompts | | Extended Config Host | Pi | CLI | Not supported (config only; separate from OMP) | Renders MCP & provider; refuses to rewrite existing JSON5 | | Extended Config Host | Hermes | CLI | Not supported (config only) | Renders YAML MCP & named provider; supports activation preview | | Extended Config Host | OpenClaw | CLI | Not supported (config only) | Writes provider JSON5 preserving comments; native MCP sync unsupported | | Extended Config Host | agy | CLI | Not supported (config only; separate from Antigravity Desktop) | Renders MCP; provider credentials stay in process env/private profile | ## Installation, Source Development & CLI Reference ### 1. macOS App Bundle (Homebrew Cask or Release Archive) ```bash # Option A: Homebrew Cask brew install --cask qingsongcui/tap/senrelay # Option B: Manual Senrelay-macOS.zip first launch (ad-hoc signed, macOS 14.0+ arm64) mv Senrelay.app /Applications/ xattr -cr /Applications/Senrelay.app ``` ### 2. Run from Source (Repository Root) ```bash # Never run "pip install contextcore" from PyPI (unrelated third-party package). python3.12 -m venv app/backend/.venv app/backend/.venv/bin/python -m pip install -e 'app/backend[test]' npm --prefix app/frontend ci --ignore-scripts npm --prefix app/frontend run build app/backend/.venv/bin/contextcore serve --host 127.0.0.1 --port 18420 --data-dir "$HOME/.contextcore/dev-data" --frontend-dir app/frontend/dist-staging ``` ### 3. Backup & Lifecycle - Default data directory: `~/Library/Application Support/ContextCore` (`0700` directory permissions, `0600` SQLite database files). - Online backup command: `contextcore backup`. - Closing the macOS window (`Cmd+W`) keeps the background service alive on `127.0.0.1:8420`; use Settings or `contextcore stop` to stop the daemon explicitly. ## Frequently Asked Questions (EN / 中文) ### 1. How do I hand off a coding session from Claude Code to Cursor or Codex? / 如何在不同 AI 编程助手间无缝接力对话? Connect your hosts once via **Agent Management → One-Click Connect**. When switching assistants, type `/contextcore` (or "接力" / "continue") in the target agent. It queries local authorized histories and lists numbered recent sessions. Reply `1` to load context (`must_not_execute=true`) and get a status summary without modifying files, or `1, finish the unit tests` to continue immediately. ### 2. How is implicit auto-memory triggered during chats? / 隐式自动记忆是如何触发的? During everyday chats, companion MCP tools and Skills capture preferences, architectural decisions, constraints, milestones, and lessons learned as structured records linked to exact source turns, returning a brief `💡` receipt. Conflicting updates route to Pending Conflicts, and you can pin `📌` core rules or preview `AGENTS.md` anytime. ### 3. How does multi-host MCP and Skills sync avoid overwriting manual config edits? / 跨宿主同步如何防止覆盖手改配置? Every configuration write records ownership hashes and an automatic rollback snapshot. If a target host file (`~/.claude.json`, `~/.codex/config.toml`, Cursor MCP config, etc.) was modified externally, Senrelay pauses auto-apply and opens a side-by-side Diff confirmation modal instead of silently overwriting user changes. ### 4. Will changing one assistant affect my other assistants? / 修改单个宿主会影响其他助手吗? Never silently. You can configure a single host independently or explicitly select multiple hosts to sync shared MCP servers, Skills, and prompts, with full diff preview and one-click snapshot rollback. ### 5. Where are conversations, memories, and API keys stored? / 会话记录与 API Key 存储在哪里? All session indexes, versioned memories, imported documents, and config snapshots stay in your local Mac SQLite + FTS5 database (`0600` permissions). Provider API keys live separately in macOS Keychain and are stripped from configuration exports by default. ### 6. Can I install ContextCore via `pip install contextcore`? / 可以用 `pip install contextcore` 安装吗? No. The `contextcore` package on public PyPI is an unrelated third-party project. Install Senrelay on macOS via `brew install --cask qingsongcui/tap/senrelay`, download `Senrelay-macOS.zip` from `https://github.com/qingsongcui/ContextCore/releases/tag/v1.0.0-beta.1`, or clone `https://github.com/qingsongcui/ContextCore` and run `pip install -e 'app/backend[test]'`.