mirror of
https://github.com/mksglu/context-mode.git
synced 2026-09-19 03:27:16 +08:00
755697c7ca
The OMP adapter and README were written from secondary sources and
diverged from the actual oh-my-pi runtime. Verified against
can1357/oh-my-pi v3.20.1 by cloning the repo into refs/platforms/
and reading source line-by-line:
- Env var: OMP_PROCESSING_AGENT_DIR → PI_CODING_AGENT_DIR
Source: packages/utils/src/dirs.ts:193
`let dirs = new DirResolver(process.env.PI_CODING_AGENT_DIR);`
No `OMP_*` runtime env exists; `OMP_*` keys are only mirrored
to `PI_*` from .env files (packages/utils/src/env.ts:38-41),
not from process.env.
- MCP config filename: mcp_config.json → mcp.json
Source: packages/utils/src/dirs.ts:455-459 (getMCPConfigPath)
docs/mcp-config.md:17-18 ("User: ~/.omp/agent/mcp.json")
Both user-scope (~/.omp/agent/mcp.json) and project-scope
(.omp/mcp.json) are documented loading paths.
- Instruction file: PI.md → SYSTEM.md (+ AGENTS.md)
Source: packages/coding-agent/src/main.ts:394-402 reads
.omp/SYSTEM.md (project) and ~/.omp/agent/SYSTEM.md
(global).
packages/coding-agent/src/discovery/agents-md.ts:25-29
also auto-discovers AGENTS.md walking up from cwd.
Zero `PI.md` matches in the upstream repo — the previous
naming was speculative.
- Hook surface: "no hook support" framing → MCP-only delivery
Source: packages/coding-agent/src/extensibility/hooks/types.ts:695
(`export interface HookAPI`)
packages/coding-agent/examples/hooks/auto-commit-on-exit.ts
(`pi.on("session_shutdown", ...)`)
OMP DOES expose pre/post tool-call hooks. Our adapter still
delivers via MCP only — but as our scoping choice, not OMP's
limitation. Wiring OMP-native hooks is future work.
Also creates the missing `configs/omp/` shipped artifacts:
- configs/omp/SYSTEM.md (routing rules; the file the README's
`cp` step now actually has to copy from)
- configs/omp/mcp.json (MCP config snippet, parity with antigravity)
README.md OMP section rewritten to match other adapters' format —
no link, no "isolated storage under" prose in the title; install
flow is JSON config + SYSTEM.md copy + restart.
Tests updated and passing (77 OMP + detect tests, full suite
baseline preserved at 13 pre-existing flakes, 0 net new).
8 lines
86 B
JSON
8 lines
86 B
JSON
{
|
|
"mcpServers": {
|
|
"context-mode": {
|
|
"command": "context-mode"
|
|
}
|
|
}
|
|
}
|