Skip to content

Add Oh My Pi (omp) integration: client entry + extension for deterministic read/write paths - #4

Open
asuan-dev wants to merge 1 commit into
MaxFreedomPollard:mainfrom
asuan-dev:feat/omp-integration
Open

Add Oh My Pi (omp) integration: client entry + extension for deterministic read/write paths#4
asuan-dev wants to merge 1 commit into
MaxFreedomPollard:mainfrom
asuan-dev:feat/omp-integration

Conversation

@asuan-dev

Copy link
Copy Markdown

Summary

Adds first-class support for Oh My Pi (omp), a local-first coding agent with a full MCP client and an extension system. omp was missing from clients.py (so integrate omp / integrate --all did not cover it) and had no documented wiring or deterministic write/read path.

Changes

  1. src/compartment/clients.py — new omp client entry (writes ~/.omp/agent/mcp.json, stdio, standard mcpServers root; aliases oh-my-pi). ~/.omp/mcp.json noted as fallback path.
  2. integrations/omp/extension.ts — omp extension giving the deterministic paths the MCP entry alone cannot provide:
    • before_agent_start: recalls project memory into a DATA block (automatic read)
    • context: buffers user turns; flushed to the vault at session_shutdown and pre-compaction (automatic write, dedup + caps)
    • session.compacting: injects recalled memory into the compaction context so summaries do not drop prior decisions
    • memory_search / memory_store registered as tools, MCP-independent
    • All vault access via the compartment CLI — offline, no new dependencies, silent on failure (never blocks the agent loop)
  3. docs/INTEGRATIONS.md — omp section.
  4. tests/test_clients.py — omp entry test (resolve, path, snippet shape).

Why an extension (not just MCP)

omp has a first-class hook/extension subsystem (pi.on("tool_result" | "context" | "session.compacting" | ...)). The extension mirrors the Claude Code integration experience: automatic recall at session start and a write path that does not depend on model discretion. The MCP entry works alongside it and shares the same vault.

Validation

  • pytest tests/ — 731 passed, 8 skipped (usearch optional dep installed to verify the parity test), 0 failed
  • compartment integrate omp entry resolves: compartment --vault <vault> --caller omp serve
  • Extension transpiles cleanly with Bun (same runtime omp uses to load extensions)

Notes

  • Extension install: cp integrations/omp/extension.ts ~/.omp/agent/extensions/compartment.ts (auto-discovered on next omp start).
  • omp also ships its own local memory backend (Mnemopi); Compartment complements it with encryption, deterministic ranking, and cross-agent sharing. The two can coexist.

@asuan-dev
asuan-dev force-pushed the feat/omp-integration branch 2 times, most recently from c2968f9 to e2e5ddf Compare August 9, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant