You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/pi-plugin/README.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ npx @cortexkit/magic-context@latest setup --harness pi
34
34
35
35
This handles everything for you:
36
36
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
38
38
3. Prompts you for historian, dreamer, sidekick, and embedding model choices
39
39
4. Warns about provider-specific gotchas (e.g. GitHub Copilot reasoning models need an explicit `thinking_level`)
40
40
@@ -44,7 +44,7 @@ If you'd rather register the Pi extension package directly with Pi (skipping the
44
44
pi install npm:@cortexkit/pi-magic-context
45
45
```
46
46
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).
48
48
49
49
To check installation health later:
50
50
@@ -102,7 +102,7 @@ The host's agent directory still controls session discovery and relative `pi.sub
102
102
}
103
103
```
104
104
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.
106
106
107
107
---
108
108
@@ -141,15 +141,15 @@ Storage failures are fatal — Magic Context will refuse to register hooks rathe
141
141
142
142
## Cross-harness coherence
143
143
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:
145
145
146
146
```
147
147
WARN embedding model mismatch detected for project ...:
148
148
stored vectors use "openai-compatible:Qwen/Qwen3-Embedding-8B" but Pi is configured with "local:Xenova/all-MiniLM-L6-v2".
149
149
Cross-harness search will return zero results until vectors are re-embedded.
150
150
```
151
151
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.
153
153
154
154
---
155
155
@@ -160,8 +160,10 @@ Easiest fix: configure `embedding` once in `~/.pi/agent/magic-context.jsonc` (Pi
160
160
|`ctx_search`| n/a | Search memories + raw session history; returns ranked results with previews |
|`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 |
163
165
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.
0 commit comments