@cortexkit/opencode-magic-context 0.41.1 → 0.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/announcement-3c1vertn.js +14 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +756 -4
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/conflict-warning-hook-z5sd697e.js +16 -0
- package/dist/derive-budgets-901a0pk0.js +11 -0
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +4 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-lease.d.ts +6 -0
- package/dist/features/magic-context/compartment-lease.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/curate-memory-safety.d.ts +21 -0
- package/dist/features/magic-context/dreamer/curate-memory-safety.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-prompts.d.ts +1 -6
- package/dist/features/magic-context/dreamer/task-prompts.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-failure.d.ts +10 -2
- package/dist/features/magic-context/memory/embedding-failure.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts +7 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/onnxruntime-node-wasm-shim.d.ts +3 -0
- package/dist/features/magic-context/memory/onnxruntime-node-wasm-shim.d.ts.map +1 -0
- package/dist/features/magic-context/memory/sharp-wasm-shim.d.ts +2 -0
- package/dist/features/magic-context/memory/sharp-wasm-shim.d.ts.map +1 -0
- package/dist/features/magic-context/memory/transformers-node-wasm-entry.d.ts +3 -0
- package/dist/features/magic-context/memory/transformers-node-wasm-entry.d.ts.map +1 -0
- package/dist/features/magic-context/message-fts-rowid-map.d.ts +28 -0
- package/dist/features/magic-context/message-fts-rowid-map.d.ts.map +1 -0
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/overflow-detection.d.ts +15 -2
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +20 -2
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +30 -14
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts +3 -2
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta.d.ts +2 -2
- package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
- package/dist/features/magic-context/storage-schema-helpers.d.ts.map +1 -1
- package/dist/features/magic-context/storage-session-tables.d.ts +9 -1
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/features/magic-context/storage-subagent-invocations.d.ts +3 -2
- package/dist/features/magic-context/storage-subagent-invocations.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +19 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +2 -2
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/subagent-token-capture.d.ts +2 -1
- package/dist/features/magic-context/subagent-token-capture.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts +6 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts +2 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts +4 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/format-embed-failure.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts +3 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +4 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +6 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/live-session-state.d.ts +3 -1
- package/dist/hooks/magic-context/live-session-state.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts +2 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +11 -4
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts +6 -1
- package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +15 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +19 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts +6 -0
- package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
- package/dist/hooks/magic-context/sentinel.d.ts +18 -53
- package/dist/hooks/magic-context/sentinel.d.ts.map +1 -1
- package/dist/hooks/magic-context/strip-content.d.ts +12 -5
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-id-fallback.d.ts +3 -1
- package/dist/hooks/magic-context/tag-id-fallback.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +57 -2
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +1 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-z893kjyt.js → index-0bycg0np.js} +90 -26
- package/dist/{index-1yh8g550.js → index-22jkk6wg.js} +2 -15
- package/dist/{index-dmvy29z0.js → index-3wzdwt6p.js} +11 -15
- package/dist/{index-d1mxrd3p.js → index-7k55qm8a.js} +17 -12
- package/dist/{index-4x691bz5.js → index-dkv2dn46.js} +5 -2
- package/dist/{index-2d4kf2ve.js → index-dn1rwpd8.js} +16 -11
- package/dist/{index-rgdqj8nj.js → index-e7vx3byk.js} +1 -1
- package/dist/{index-szf8w1p5.js → index-fmsr7v69.js} +2 -2
- package/dist/{index-d62ypazr.js → index-jdxxq8cz.js} +6 -11
- package/dist/{index-9j3tx8hy.js → index-may8skc8.js} +6 -25
- package/dist/{index-eq9wr75c.js → index-npx8vhmy.js} +57 -108
- package/dist/{index-zwjhba2r.js → index-q264erdp.js} +122 -41
- package/dist/{index-b9j85d29.js → index-raatkvw5.js} +49 -11
- package/dist/{index-9xexf8s7.js → index-rn7gafjr.js} +1 -9
- package/dist/index-v6t0tg85.js +13 -0
- package/dist/{index-dh0vfghk.js → index-vmmjdpc0.js} +2594 -11271
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3414 -2620
- package/dist/model-resolution-dxatzjde.js +12 -0
- package/dist/{index-dynqfgx1.js → module-asyncify-2EFITU5U-rkqjhjxd.js} +69 -8
- package/dist/plugin/boot-deadline.d.ts +47 -0
- package/dist/plugin/boot-deadline.d.ts.map +1 -0
- package/dist/plugin/conflict-warning-hook.d.ts +10 -0
- package/dist/plugin/conflict-warning-hook.d.ts.map +1 -1
- package/dist/plugin/dream-timer.d.ts +4 -0
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +4 -2
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/prompt-context-5y5ms8f9.js +6 -0
- package/dist/recomp-orchestrator-f5m2wk74.js +19 -0
- package/dist/rpc-notifications-4amf6mf4.js +14 -0
- package/dist/{index-vnz6jvdc.js → safe-notification-target-q9z81zt3.js} +4 -3
- package/dist/send-session-notification-hdh02wy9.js +16 -0
- package/dist/shared/conflict-detector.d.ts +3 -1
- package/dist/shared/conflict-detector.d.ts.map +1 -1
- package/dist/shared/harness.d.ts +3 -3
- package/dist/shared/harness.d.ts.map +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/model-resolution.d.ts +3 -3
- package/dist/shared/model-resolution.d.ts.map +1 -1
- package/dist/shared/prompt-surface-runtime.d.ts +2 -2
- package/dist/shared/prompt-surface-runtime.d.ts.map +1 -1
- package/dist/shared/rpc-utils.d.ts +3 -1
- package/dist/shared/rpc-utils.d.ts.map +1 -1
- package/dist/shared/summarize-child-stderr.d.ts +2 -0
- package/dist/shared/summarize-child-stderr.d.ts.map +1 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/transcript.d.ts +2 -1
- package/dist/shared/transcript.d.ts.map +1 -1
- package/dist/shared/window-geometry.d.ts +2 -0
- package/dist/shared/window-geometry.d.ts.map +1 -1
- package/dist/storage-meta-session-3rxx9ekm.js +20 -0
- package/dist/task-config-hnv93r7p.js +9 -0
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-memory/types.d.ts +2 -0
- package/dist/tools/ctx-memory/types.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/tools.d.ts.map +1 -1
- package/dist/transformers-node-wasm.js +25676 -0
- package/dist/transformers-web.js +72 -72
- package/dist/{transformers.node-b1wa0hgx.js → transformers.node-dpmf3wpx.js} +74 -74
- package/package.json +4 -3
- package/src/config/index.test.ts +69 -0
- package/src/config/latch-permanence-guard.test.ts +5 -0
- package/src/config/project-security.hostile-matrix.test.ts +78 -9
- package/src/config/project-security.ts +4 -3
- package/src/config/schema/magic-context.test.ts +64 -0
- package/src/config/schema/magic-context.ts +100 -6
- package/src/shared/conflict-detector.test.ts +24 -0
- package/src/shared/conflict-detector.ts +25 -7
- package/src/shared/harness.ts +3 -3
- package/src/shared/index.ts +1 -0
- package/src/shared/model-resolution.test.ts +78 -13
- package/src/shared/model-resolution.ts +14 -5
- package/src/shared/prompt-surface-runtime.ts +3 -3
- package/src/shared/rpc-utils.test.ts +246 -5
- package/src/shared/rpc-utils.ts +340 -49
- package/src/shared/summarize-child-stderr.test.ts +55 -0
- package/src/shared/summarize-child-stderr.ts +33 -0
- package/src/shared/tag-transcript.ts +11 -0
- package/src/shared/transcript.ts +3 -1
- package/src/shared/window-geometry.ts +9 -0
- package/dist/announcement-3g9xg433.js +0 -18
- package/dist/conflict-warning-hook-rf17b6et.js +0 -17
- package/dist/derive-budgets-bb7mrpzs.js +0 -14
- package/dist/emscripten-module-49k43zfy.js +0 -507
- package/dist/emscripten-module-ex4v0x4z.js +0 -606
- package/dist/emscripten-module-jfs3d1dq.js +0 -1536
- package/dist/emscripten-module-ss4g4spn.js +0 -4563
- package/dist/ffi-bbm9vkfa.js +0 -92
- package/dist/ffi-kb5r0x1j.js +0 -92
- package/dist/ffi-qnrt0y78.js +0 -80
- package/dist/ffi-yx2hpf4p.js +0 -80
- package/dist/index-8sseka65.js +0 -251
- package/dist/index-ss632za9.js +0 -77
- package/dist/model-resolution-6w6wzw18.js +0 -17
- package/dist/module-ES6BEMUI-1yjdz59c.js +0 -14
- package/dist/module-asyncify-2EFITU5U-fdkx4fhy.js +0 -9
- package/dist/prompt-context-29qkb28f.js +0 -7
- package/dist/recomp-orchestrator-w7xg48e3.js +0 -34
- package/dist/rpc-notifications-1ffm755w.js +0 -17
- package/dist/safe-notification-target-2a8py95v.js +0 -11
- package/dist/send-session-notification-bw7eex6w.js +0 -20
- package/dist/storage-meta-session-gr4zn7sq.js +0 -21
- package/dist/task-config-gv6s04fp.js +0 -18
- /package/dist/{index-37yzyeca.js → index-3fe78beq.js} +0 -0
- /package/dist/{index-8mtsfhyg.js → index-jfpk81yt.js} +0 -0
- /package/dist/{index-2wchnyk6.js → index-kby1sng5.js} +0 -0
package/README.md
CHANGED
|
@@ -154,11 +154,17 @@ per-harness **after** form for all new configuration.
|
|
|
154
154
|
"pi": {
|
|
155
155
|
"model": "provider/model-id",
|
|
156
156
|
"thinking_level": "medium"
|
|
157
|
+
},
|
|
158
|
+
"omp": {
|
|
159
|
+
"model": "opencode/provider-model-id",
|
|
160
|
+
"thinking_level": "auto"
|
|
157
161
|
}
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
164
|
```
|
|
161
165
|
|
|
166
|
+
OMP uses Pi-native `thinking_level` qualifiers. If `historian.omp` or `dreamer.omp` is absent, OMP falls back to the matching `pi` block, so existing Pi-compatible configurations need no migration. An explicit OMP block is authoritative even when it omits a model.
|
|
167
|
+
|
|
162
168
|
User-level config is `~/.config/cortexkit/magic-context.jsonc` on macOS/Linux and `%USERPROFILE%\.config\cortexkit\magic-context.jsonc` on Windows (or `$XDG_CONFIG_HOME/cortexkit/magic-context.jsonc` when set). OpenCode Desktop users can use the dashboard's config editor or hand-edit that file; Desktop does not include the CLI setup wizard.
|
|
163
169
|
|
|
164
170
|
**Pi:** `npx @cortexkit/magic-context@latest setup --harness pi` (requires Pi `>= 0.74.0`). The Pi extension shares the same database as OpenCode; project memories and embeddings pool across both.
|
|
@@ -323,9 +329,9 @@ It reads directly from Magic Context's SQLite database. No extra server, no API.
|
|
|
323
329
|
|
|
324
330
|
## Configuration
|
|
325
331
|
|
|
326
|
-
Settings live in `magic-context.jsonc`. Most settings have sensible defaults, but the active harness's historian model (`historian.opencode.model` or `historian.
|
|
332
|
+
Settings live in `magic-context.jsonc`. Most settings have sensible defaults, but the active harness's historian model (`historian.opencode.model`, `historian.pi.model`, or `historian.omp.model`) is required for history compacting; project config merges on top of user-wide settings. For the full reference — cache TTL tuning, per-model execute thresholds, historian and dreamer model selection, embedding providers, memory settings, and prompt-surface presets (`full`/`light`) — see **[CONFIGURATION.md](./CONFIGURATION.md)** or the **[configuration reference on docs.cortexkit.io](https://docs.cortexkit.io/magic-context/reference/configuration/)**.
|
|
327
333
|
|
|
328
|
-
> **Note on per-model settings (OpenCode/Pi):** settings that route per model — like `prompt_surface.models` — apply to the injected guidance block. Tool descriptions are registered once per process by the current (v1) plugin API and follow the default preset; per-model tool descriptions arrive with the OpenCode v2 plugin API once the SDK stabilizes ([#260](https://github.com/cortexkit/magic-context/issues/260)).
|
|
334
|
+
> **Note on per-model settings (OpenCode/Pi/OMP):** settings that route per model — like `prompt_surface.models` — apply to the injected guidance block. Tool descriptions are registered once per process by the current (v1) plugin API and follow the default preset; per-model tool descriptions arrive with the OpenCode v2 plugin API once the SDK stabilizes ([#260](https://github.com/cortexkit/magic-context/issues/260)).
|
|
329
335
|
|
|
330
336
|
**Config locations** (one shared CortexKit location, project overrides user):
|
|
331
337
|
1. `<project-root>/.cortexkit/magic-context.jsonc`
|
|
@@ -351,7 +357,7 @@ If your personal repositories use one hidden-agent model set and work repositori
|
|
|
351
357
|
{ "profile": "work" }
|
|
352
358
|
```
|
|
353
359
|
|
|
354
|
-
This is the work-repositories-versus-personal-repositories setup requested by kagbodji. Profiles overlay only hidden-agent model selection, preserve base settings that they do not mention, and are defined only in user config. A project can select a known user profile but cannot supply its contents. See [CONFIGURATION.md](./CONFIGURATION.md#per-repository-model-profiles) for the full OpenCode/Pi example, fallback behavior, and trust boundary.
|
|
360
|
+
This is the work-repositories-versus-personal-repositories setup requested by kagbodji. Profiles overlay only hidden-agent model selection, preserve base settings that they do not mention, and are defined only in user config. A project can select a known user profile but cannot supply its contents. See [CONFIGURATION.md](./CONFIGURATION.md#per-repository-model-profiles) for the full OpenCode/Pi/OMP example, fallback behavior, and trust boundary.
|
|
355
361
|
|
|
356
362
|
---
|
|
357
363
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ANNOUNCEMENT_VERSION2,
|
|
3
|
+
ANNOUNCEMENT_FEATURES2,
|
|
4
|
+
ANNOUNCEMENT_FOOTER2,
|
|
5
|
+
markAnnouncementSeen2,
|
|
6
|
+
shouldShowAnnouncement2
|
|
7
|
+
} from "./index-3wzdwt6p.js";
|
|
8
|
+
export {
|
|
9
|
+
ANNOUNCEMENT_FEATURES2 as ANNOUNCEMENT_FEATURES,
|
|
10
|
+
ANNOUNCEMENT_FOOTER2 as ANNOUNCEMENT_FOOTER,
|
|
11
|
+
ANNOUNCEMENT_VERSION2 as ANNOUNCEMENT_VERSION,
|
|
12
|
+
markAnnouncementSeen2 as markAnnouncementSeen,
|
|
13
|
+
shouldShowAnnouncement2 as shouldShowAnnouncement
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-security.d.ts","sourceRoot":"","sources":["../../src/config/project-security.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-security.d.ts","sourceRoot":"","sources":["../../src/config/project-security.ts"],"names":[],"mappings":"AA8PA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAkP5F;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAAC,IAAI,EAAE;IACrD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,iBAAiB,EAAE;QACf,4BAA4B,CAAC,EAAE,OAAO,CAAC;QACvC,wBAAwB,CAAC,EAAE,OAAO,CAAC;KACtC,CAAC;CACL,GAAG,MAAM,EAAE,CA+IX;AA2BD,wBAAgB,mCAAmC,CAC/C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,MAAM,EAAE,CAsCV"}
|