Skip to content

Commit 829f218

Browse files
LynricsyWineFoxDev
andcommitted
docs(pi): 📝 correct shared config and tool surface
Co-authored-by: Wine Fox <fox@ling.plus>
1 parent f9448ac commit 829f218

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

packages/pi-plugin/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ npx @cortexkit/magic-context@latest setup --harness pi
3434

3535
This handles everything for you:
3636
1. Adds `npm:@cortexkit/pi-magic-context` to Pi's `packages` array in `~/.pi/agent/settings.json` (the same place `pi install` writes to)
37-
2. Creates `~/.pi/agent/magic-context.jsonc` with defaults
37+
2. Creates `~/.config/cortexkit/magic-context.jsonc` with defaults
3838
3. Prompts you for historian, dreamer, sidekick, and embedding model choices
3939
4. Warns about provider-specific gotchas (e.g. GitHub Copilot reasoning models need an explicit `thinking_level`)
4040

@@ -44,7 +44,7 @@ If you'd rather register the Pi extension package directly with Pi (skipping the
4444
pi install npm:@cortexkit/pi-magic-context
4545
```
4646

47-
This adds the extension to `~/.pi/agent/settings.json` but won't write `magic-context.jsonc` for you — you'll need to create it manually (see Configuration below).
47+
This adds the extension to `~/.pi/agent/settings.json` but won't write `magic-context.jsonc` for you — create the shared config manually at `~/.config/cortexkit/magic-context.jsonc` (see Configuration below).
4848

4949
To check installation health later:
5050

@@ -102,7 +102,7 @@ The host's agent directory still controls session discovery and relative `pi.sub
102102
}
103103
```
104104

105-
For the full configuration reference (including dreamer, sidekick, auto-search, and experimental features), see [CONFIGURATION.md](https://github.com/cortexkit/magic-context/blob/master/CONFIGURATION.md) in the main repository — the schema is shared between both plugins.
105+
For the full configuration reference (including dreamer, sidekick, auto-search, and experimental features), see [CONFIGURATION.md](https://github.com/cortexkit/magic-context/blob/master/CONFIGURATION.md) in the main repository — OpenCode, Pi, and OMP share the same schema.
106106

107107
---
108108

@@ -141,15 +141,15 @@ Storage failures are fatal — Magic Context will refuse to register hooks rathe
141141

142142
## Cross-harness coherence
143143

144-
For semantic search to work across harnesses, both plugins must use the **same embedding model**. Magic Context detects mismatch on Pi startup and warns:
144+
For semantic search to work across harnesses, every host must use the **same embedding model**. Magic Context detects a mismatch on Pi or OMP startup and warns:
145145

146146
```
147147
WARN embedding model mismatch detected for project ...:
148148
stored vectors use "openai-compatible:Qwen/Qwen3-Embedding-8B" but Pi is configured with "local:Xenova/all-MiniLM-L6-v2".
149149
Cross-harness search will return zero results until vectors are re-embedded.
150150
```
151151

152-
Easiest fix: configure `embedding` once in `~/.pi/agent/magic-context.jsonc` (Pi) and `~/.config/opencode/magic-context.jsonc` (OpenCode) with identical settings.
152+
Configure `embedding` once in the shared `~/.config/cortexkit/magic-context.jsonc`; OpenCode, Pi, and OMP all read it. Use `$cwd/.cortexkit/magic-context.jsonc` only when that project intentionally needs an override.
153153

154154
---
155155

@@ -160,8 +160,10 @@ Easiest fix: configure `embedding` once in `~/.pi/agent/magic-context.jsonc` (Pi
160160
| `ctx_search` | n/a | Search memories + raw session history; returns ranked results with previews |
161161
| `ctx_memory` | `write`, `delete` | Manage project memories explicitly (most writes happen via dreamer instead) |
162162
| `ctx_note` | `read`, `write`, `update`, `dismiss` | Defer intentions for later — surfaced via note nudges at work boundaries |
163+
| `ctx_expand` | `start`/`end`, `message`, `verbose` | Recover complete messages or expand a compressed conversation range |
164+
| `ctx_reduce` | `drop` | Queue tagged turns for cache-safe removal from the live context |
163165

164-
`ctx_expand` and `ctx_reduce` from the OpenCode plugin are **intentionally not exposed on Pi** — they depend on raw OpenCode message ordinals, while Pi has its own message identity model. Drops still happen automatically via threshold-driven historian; you don't need an explicit `ctx_reduce` to trigger reduction.
166+
`ctx_note`, `ctx_expand`, and `ctx_reduce` are session-scoped and are exposed in primary Pi/OMP sessions. Magic Context omits them only from ephemeral `--no-session` child processes, where they would otherwise target the hidden child session.
165167

166168
---
167169

0 commit comments

Comments
 (0)