@cortexkit/opencode-magic-context 0.49.0 → 0.49.2
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/dist/{announcement-fp14dw0n.js → announcement-hdbkt8v5.js} +1 -1
- package/dist/auto-search-worker.js +3 -3
- package/dist/config/{mural-model-deprecation.d.ts → deprecated-config.d.ts} +4 -1
- package/dist/config/deprecated-config.d.ts.map +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +2 -2
- package/dist/config/schema/magic-context.d.ts +4 -4
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-kzx4dmk1.js → conflict-warning-hook-asnt6hfc.js} +3 -3
- package/dist/{context-nj5f293n.js → context-tfyhtdcs.js} +111 -45
- package/dist/{derive-budgets-qz5rrr08.js → derive-budgets-j4ry8j8n.js} +1 -1
- package/dist/{embedding-backfill-aetxv1vt.js → embedding-backfill-wyc3ykyf.js} +7 -7
- package/dist/embedding-worker-process.js +30 -0
- package/dist/embedding-worker.js +5 -5
- package/dist/features/magic-context/dreamer/task-registry.d.ts +2 -3
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts +8 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-process.d.ts +2 -0
- package/dist/features/magic-context/memory/embedding-worker-process.d.ts.map +1 -0
- package/dist/features/magic-context/memory/onnx-telemetry.d.ts +3 -0
- package/dist/features/magic-context/memory/onnx-telemetry.d.ts.map +1 -0
- package/dist/features/magic-context/overflow-detection.d.ts +1 -2
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts +1 -0
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +1 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +1 -0
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts +3 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-persist.d.ts +8 -14
- package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts +62 -0
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts +38 -0
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-replay.d.ts +3 -1
- package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
- package/dist/hooks/magic-context/opaque-thinking.d.ts +12 -0
- package/dist/hooks/magic-context/opaque-thinking.d.ts.map +1 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts +2 -2
- package/dist/hooks/magic-context/pending-materialization.d.ts +8 -0
- package/dist/hooks/magic-context/pending-materialization.d.ts.map +1 -0
- package/dist/hooks/magic-context/read-session-db.d.ts +3 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +1 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/strip-content.d.ts +5 -2
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-date-refresh.d.ts +29 -0
- package/dist/hooks/magic-context/system-date-refresh.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-dates.d.ts +6 -0
- package/dist/hooks/magic-context/system-prompt-dates.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-delivery.d.ts +47 -0
- package/dist/hooks/magic-context/system-prompt-delivery.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +4 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +8 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +2 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +6 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-9qjqq45k.js → index-0pjvpfkf.js} +21 -1
- package/dist/index-6m7rdv7y.js +733 -0
- package/dist/{index-1r0k9js3.js → index-6tfxmc4n.js} +10 -10
- package/dist/{index-gzcmtmar.js → index-7w18gg78.js} +25 -1
- package/dist/{index-nm6a8xpd.js → index-att4bfan.js} +1 -1
- package/dist/{index-ezmszwbd.js → index-eypn4ba6.js} +7 -4
- package/dist/{index-ha87j7a8.js → index-fdtkt5r1.js} +6 -6
- package/dist/{index-kp5qe690.js → index-fg00p1cg.js} +38 -36
- package/dist/{index-1bc61ans.js → index-fvnzcnww.js} +44 -1
- package/dist/index-gbmqa9x9.js +1170 -0
- package/dist/{index-pxwp2hjk.js → index-gzky5rva.js} +30 -53
- package/dist/{index-kq57tdf0.js → index-k6xvbj2e.js} +255 -1075
- package/dist/{index-0w56v4fm.js → index-mw7c950g.js} +1 -1
- package/dist/{index-1g30axtz.js → index-p0n5ryq8.js} +82 -900
- package/dist/{index-b7mv1jx3.js → index-p1hnwfd8.js} +1 -1
- package/dist/{index-peshmj6h.js → index-r2zcs71c.js} +6 -4
- package/dist/{index-kmpvemph.js → index-rafsaxac.js} +2 -2
- package/dist/{index-stbr4ce6.js → index-s7fc0fkn.js} +1 -1
- package/dist/{index-hj2q50k0.js → index-sfhndpcb.js} +463 -6
- package/dist/index-sv0bb7vg.js +6972 -0
- package/dist/{index-57mrqed8.js → index-w23dh319.js} +17 -258
- package/dist/{index-9rt53q79.js → index-xgrwmj82.js} +1 -1
- package/dist/{index-h2py7207.js → index-xnanvj3w.js} +765 -1255
- package/dist/{index-2jcbj7r1.js → index-zfzdpeq2.js} +2269 -3802
- package/dist/{index-s4j7t92z.js → index-zg8yq4ya.js} +29 -744
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +209 -61
- package/dist/{message-index-bounded-h0mrd4pr.js → message-index-bounded-hqktkhdy.js} +7 -6
- package/dist/migration-worker.js +6 -5
- package/dist/plugin/hooks/create-session-hooks.d.ts +3 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{project-embedding-registry-rtt0djyb.js → project-embedding-registry-0gv3h6y8.js} +6 -6
- package/dist/raw-ordinal-warmup-worker.js +1 -1
- package/dist/{read-session-chunk-ty89v75e.js → read-session-chunk-5mh0bh8y.js} +5 -4
- package/dist/{recomp-orchestrator-4f1yyd1q.js → recomp-orchestrator-kpkhkjhq.js} +20 -19
- package/dist/{search-pz4f4wge.js → search-p9w39qv4.js} +15 -14
- package/dist/{send-session-notification-38cd5dqt.js → send-session-notification-xffh3bbe.js} +2 -2
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/storage-file-mutex.d.ts +9 -0
- package/dist/shared/storage-file-mutex.d.ts.map +1 -0
- package/dist/shared/storage-permissions.d.ts +6 -0
- package/dist/shared/storage-permissions.d.ts.map +1 -1
- package/dist/shared/window-geometry.d.ts +9 -66
- package/dist/shared/window-geometry.d.ts.map +1 -1
- package/dist/standalone-plugin-marker.d.ts +8 -0
- package/dist/standalone-plugin-marker.d.ts.map +1 -0
- package/dist/tools/ctx-reduce/constants.d.ts +1 -2
- package/dist/tools/ctx-reduce/constants.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/tools.d.ts +1 -1
- package/dist/tools/ctx-reduce/tools.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-tck4g20s.js → transform-postprocess-phase-481j5a7z.js} +20 -19
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/{context-crbt6p1y.js → context-gsdtha5v.js} +873 -2122
- package/dist/v2/{derive-budgets-fgej9j46.js → derive-budgets-enckmg7y.js} +2 -2
- package/dist/v2/{embedding-backfill-ph1qfyn3.js → embedding-backfill-dbvjbcmm.js} +8 -9
- package/dist/v2/embedding-worker-process.js +29 -0
- package/dist/v2/embedding-worker.js +3 -4
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/copied-tag-notation.d.ts +19 -0
- package/dist/v2/hooks/copied-tag-notation.d.ts.map +1 -0
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/system-prompt-response.d.ts +5 -0
- package/dist/v2/hooks/system-prompt-response.d.ts.map +1 -0
- package/dist/v2/{message-index-bounded-xwqdywxg.js → message-index-bounded-p6v0n8qh.js} +8 -7
- package/dist/v2/migration-worker.js +6 -5
- package/dist/v2/{project-embedding-registry-d6m7tyxr.js → project-embedding-registry-nyq7z8y6.js} +7 -8
- package/dist/v2/raw-ordinal-warmup-worker.js +2 -2
- package/dist/v2/{read-session-chunk-8p5mdryx.js → read-session-chunk-fhyfe4qa.js} +6 -5
- package/dist/v2/{recomp-orchestrator-ckfgt6wq.js → recomp-orchestrator-5xy7w136.js} +22 -22
- package/dist/v2/{search-ym8rehhz.js → search-j7bakcwa.js} +17 -17
- package/dist/v2/{send-session-notification-5m0yapqx.js → send-session-notification-f6v698r5.js} +2 -2
- package/dist/v2/{server-jvxzm1jy.js → server-1fszbabv.js} +28 -28
- package/dist/v2/{server-3j4d00kf.js → server-2htmbqbv.js} +25 -1
- package/dist/v2/{server-c5rrgrcd.js → server-4c7jt8gq.js} +25 -1
- package/dist/v2/{server-ycw9qqcy.js → server-4enr7s6x.js} +1 -1
- package/dist/v2/{server-v4mewb78.js → server-6tcrjfw8.js} +1 -1
- package/dist/v2/{server-x4hscabv.js → server-7spkq1y6.js} +2257 -3746
- package/dist/v2/{server-sa8jvrfc.js → server-7vkj6zhb.js} +29 -744
- package/dist/v2/{server-xwz4dqh9.js → server-8xmq9h3f.js} +30 -53
- package/dist/v2/{server-1tk82krw.js → server-bgzy0phk.js} +463 -6
- package/dist/v2/server-c7n2ftng.js +6860 -0
- package/dist/v2/server-cvgn49tr.js +733 -0
- package/dist/v2/{server-zm570tr2.js → server-cw6521wn.js} +232 -7
- package/dist/v2/{server-pj4pjv02.js → server-czb2rkpk.js} +21 -1
- package/dist/v2/{server-19zjmn02.js → server-d6g4whc2.js} +20 -14
- package/dist/v2/{server-1bc61ans.js → server-fvnzcnww.js} +44 -1
- package/dist/v2/{server-w32kmdez.js → server-kh958yj8.js} +3 -3
- package/dist/v2/{server-q4ph9bwn.js → server-mqvtz7wz.js} +7 -7
- package/dist/v2/{server-2s6ayq3t.js → server-ras2sxnc.js} +133 -13
- package/dist/v2/{server-ss95ky04.js → server-s2st631p.js} +1 -1
- package/dist/v2/{server-2s9qz6n7.js → server-t528t8qm.js} +1 -1
- package/dist/v2/{server-8k2agx29.js → server-vb7pbd9p.js} +17 -258
- package/dist/v2/{server-zp53y8js.js → server-zbxjj2mz.js} +2 -2
- package/dist/v2/server.d.ts.map +1 -1
- package/dist/v2/server.js +149 -5
- package/dist/v2/{storage-tags-8vw924zn.js → storage-tags-5yxrvkaf.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-a7efxaax.js → wrapup-orchestrator-yem5422s.js} +28 -28
- package/dist/{wrapup-orchestrator-barbc6h9.js → wrapup-orchestrator-xvrr27ws.js} +21 -20
- package/package.json +4 -4
- package/src/config/{mural-model-deprecation.ts → deprecated-config.ts} +19 -0
- package/src/config/index.test.ts +15 -37
- package/src/config/index.ts +2 -3
- package/src/config/project-security.ts +3 -3
- package/src/config/schema/magic-context.ts +11 -7
- package/src/features/magic-context/dreamer/task-registry.ts +2 -3
- package/src/shared/models-dev-cache.ts +1 -7
- package/src/shared/sqlite-640-review.test.ts +5 -1
- package/src/shared/storage-file-mutex-review.test.ts +162 -0
- package/src/shared/storage-file-mutex.ts +130 -0
- package/src/shared/storage-permissions.ts +46 -0
- package/src/shared/window-geometry.test.ts +102 -236
- package/src/shared/window-geometry.ts +23 -413
- package/dist/config/mural-model-deprecation.d.ts.map +0 -1
- package/dist/index-2jgwttpt.js +0 -3269
- package/dist/index-mfkzp7qj.js +0 -229
- package/dist/v2/server-4ez8mntn.js +0 -3213
- package/dist/v2/server-mfkzp7qj.js +0 -229
- package/src/shared/__fixtures__/window-overlay.v1.json +0 -337
- /package/dist/{index-2pp04pmg.js → index-69vas84q.js} +0 -0
- /package/dist/v2/{index-2pp04pmg.js → index-69vas84q.js} +0 -0
package/dist/v2/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadPluginConfigDetailed
|
|
3
|
-
} from "./server-
|
|
3
|
+
} from "./server-d6g4whc2.js";
|
|
4
4
|
import {
|
|
5
5
|
setHarness2
|
|
6
6
|
} from "./server-pavzsdc6.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
log2,
|
|
10
10
|
flushLogger2
|
|
11
11
|
} from "./server-t4k4qexw.js";
|
|
12
|
-
import"./server-
|
|
12
|
+
import"./server-vb7pbd9p.js";
|
|
13
13
|
import {
|
|
14
14
|
string,
|
|
15
15
|
unknown,
|
|
@@ -18,8 +18,7 @@ import {
|
|
|
18
18
|
union,
|
|
19
19
|
tuple,
|
|
20
20
|
record
|
|
21
|
-
} from "./server-
|
|
22
|
-
import"./server-mfkzp7qj.js";
|
|
21
|
+
} from "./server-cw6521wn.js";
|
|
23
22
|
import {
|
|
24
23
|
pushNotification2
|
|
25
24
|
} from "./server-x8a7jmkh.js";
|
|
@@ -7868,6 +7867,132 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
7868
7867
|
removeBlankLines
|
|
7869
7868
|
};
|
|
7870
7869
|
});
|
|
7870
|
+
// package.json
|
|
7871
|
+
var package_default = {
|
|
7872
|
+
name: "@cortexkit/opencode-magic-context",
|
|
7873
|
+
version: "0.49.2",
|
|
7874
|
+
type: "module",
|
|
7875
|
+
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
7876
|
+
main: "dist/index.js",
|
|
7877
|
+
types: "dist/index.d.ts",
|
|
7878
|
+
author: "ualtinok",
|
|
7879
|
+
license: "MIT",
|
|
7880
|
+
keywords: [
|
|
7881
|
+
"opencode",
|
|
7882
|
+
"plugin",
|
|
7883
|
+
"context",
|
|
7884
|
+
"memory",
|
|
7885
|
+
"ai",
|
|
7886
|
+
"llm",
|
|
7887
|
+
"prompt-caching",
|
|
7888
|
+
"session-history"
|
|
7889
|
+
],
|
|
7890
|
+
repository: {
|
|
7891
|
+
type: "git",
|
|
7892
|
+
url: "https://github.com/cortexkit/magic-context",
|
|
7893
|
+
directory: "packages/plugin"
|
|
7894
|
+
},
|
|
7895
|
+
files: [
|
|
7896
|
+
"dist",
|
|
7897
|
+
"index.js",
|
|
7898
|
+
"tui.js",
|
|
7899
|
+
"src/tui",
|
|
7900
|
+
"src/tui-compiled",
|
|
7901
|
+
"src/v2/tui",
|
|
7902
|
+
"src/shared",
|
|
7903
|
+
"src/config",
|
|
7904
|
+
"src/agents",
|
|
7905
|
+
"src/features/magic-context/dreamer/cron.ts",
|
|
7906
|
+
"src/features/magic-context/dreamer/task-registry.ts",
|
|
7907
|
+
"README.md"
|
|
7908
|
+
],
|
|
7909
|
+
scripts: {
|
|
7910
|
+
build: "bun ../../scripts/check-bun.mjs && tsc -p ../retina-local-fs/tsconfig.build.json && bun run build:tui && bun ../../scripts/clean-dist-chunks.mjs dist index.js transformers-web.js transformers-node-wasm.js && bun build src/features/magic-context/memory/transformers-web-entry.ts --outfile dist/transformers-web.js --target browser --format esm --external onnxruntime-web && bun scripts/build-transformers-node-wasm.ts dist && bun build src/index.ts src/features/magic-context/memory/embedding-worker.ts src/features/magic-context/memory/embedding-worker-process.ts src/features/magic-context/migration-worker.ts src/hooks/magic-context/auto-search-worker.ts src/hooks/magic-context/raw-ordinal-warmup-worker.ts --outdir dist --entry-naming '[name].[ext]' --target node --format esm --splitting --external @opencode-ai/plugin --external onnxruntime-node --external onnxruntime-web --external sharp --external bun:ffi --external bun:sqlite --external node:sqlite && bun run build:v2 && tsc --emitDeclarationOnly",
|
|
7911
|
+
"build:v2": "bun ../../scripts/clean-dist-chunks.mjs dist/v2 server.js embedding-worker.js embedding-worker-process.js migration-worker.js && bun build src/features/magic-context/memory/transformers-web-entry.ts --outfile dist/v2/transformers-web.js --target browser --format esm --external onnxruntime-web && bun scripts/build-transformers-node-wasm.ts dist/v2 && bun build src/v2/server.ts src/features/magic-context/memory/embedding-worker.ts src/features/magic-context/memory/embedding-worker-process.ts src/features/magic-context/migration-worker.ts src/hooks/magic-context/auto-search-worker.ts src/hooks/magic-context/raw-ordinal-warmup-worker.ts --outdir dist/v2 --entry-naming '[name].[ext]' --target node --format esm --splitting --external @opencode/plugin --external onnxruntime-node --external onnxruntime-web --external sharp --external bun:ffi --external bun:sqlite --external node:sqlite",
|
|
7912
|
+
"build:tui": "bun scripts/build-tui.ts",
|
|
7913
|
+
"check:tui-compiled": 'git diff --exit-code -- src/tui-compiled && test -z "$(git status --porcelain -- src/tui-compiled)"',
|
|
7914
|
+
"check:transformers-node-wasm": "bun scripts/verify-transformers-node-wasm.ts",
|
|
7915
|
+
typecheck: "tsc -p ../retina-local-fs/tsconfig.build.json && tsc --noEmit && tsc -p tsconfig.scripts.json",
|
|
7916
|
+
test: "bun ../../scripts/check-bun.mjs && bun install --frozen-lockfile && BUN_JSC_useOMGJIT=0 bun test --parallel=4 --timeout 30000",
|
|
7917
|
+
"test:serial": "bun install --frozen-lockfile && BUN_JSC_useOMGJIT=0 bun test --timeout 30000",
|
|
7918
|
+
"test:parallel:probe": "bun scripts/verify-parallel-db-isolation.ts",
|
|
7919
|
+
lint: "bun ../../scripts/check-bun.mjs && biome check .",
|
|
7920
|
+
"lint:fix": "biome check --write .",
|
|
7921
|
+
format: "biome format --write .",
|
|
7922
|
+
"format:check": "biome format .",
|
|
7923
|
+
clean: "bun ../../scripts/clean-dist-chunks.mjs dist index.js embedding-worker.js embedding-worker-process.js migration-worker.js transformers-web.js transformers-node-wasm.js && bun ../../scripts/clean-dist-chunks.mjs dist/v2 server.js embedding-worker.js embedding-worker-process.js migration-worker.js transformers-web.js transformers-node-wasm.js",
|
|
7924
|
+
prepublishOnly: "bun run build && bun run check:tui-compiled"
|
|
7925
|
+
},
|
|
7926
|
+
"//check:tui-compiled": "Check drift on output already generated by build or build:tui; this check never regenerates files. CI and prepublishOnly build first.",
|
|
7927
|
+
"//test": "Only test runs disable JSC's optimizing WebAssembly tier so per-file isolation does not pay its compilation cost on every file. This is not a production setting and does not change host process engine options.",
|
|
7928
|
+
dependencies: {
|
|
7929
|
+
"@cortexkit/subc-client": "0.11.1",
|
|
7930
|
+
"@jitl/quickjs-singlefile-cjs-release-asyncify": "0.32.0",
|
|
7931
|
+
"@opencode-ai/plugin": "^1.17.11",
|
|
7932
|
+
"@opencode-ai/sdk": "^1.17.11",
|
|
7933
|
+
"ai-tokenizer": "^1.0.6",
|
|
7934
|
+
"comment-json": "^5.0.0",
|
|
7935
|
+
"jsonc-parser": "^3.3.1",
|
|
7936
|
+
"onnxruntime-web": "1.26.0-dev.20260416-b7804b056c",
|
|
7937
|
+
"quickjs-emscripten": "^0.32.0",
|
|
7938
|
+
zod: "^4.1.8"
|
|
7939
|
+
},
|
|
7940
|
+
optionalDependencies: {
|
|
7941
|
+
"onnxruntime-node": "1.30.0",
|
|
7942
|
+
sharp: "^0.35.0"
|
|
7943
|
+
},
|
|
7944
|
+
devDependencies: {
|
|
7945
|
+
"@opentui/core": "^0.4.2",
|
|
7946
|
+
"@opentui/solid": "^0.4.2",
|
|
7947
|
+
"solid-js": "1.9.12",
|
|
7948
|
+
"@opencode/plugin": "2.0.22",
|
|
7949
|
+
"@opencode/ai": "2.0.22",
|
|
7950
|
+
"@opencode/cli": "2.0.22",
|
|
7951
|
+
"@opencode/client": "2.0.22",
|
|
7952
|
+
effect: "4.0.0-rc.112",
|
|
7953
|
+
"@ai-sdk/anthropic": "3.0.82",
|
|
7954
|
+
ai: "6.0.168",
|
|
7955
|
+
"@huggingface/transformers": "^4.3.0",
|
|
7956
|
+
"@ai-sdk/openai-compatible": "2.0.41",
|
|
7957
|
+
"@biomejs/biome": "^2.5.1",
|
|
7958
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
7959
|
+
"@types/bun": "^1.3.10",
|
|
7960
|
+
"@types/node": "^22.20.0",
|
|
7961
|
+
"bun-types": "^1.3.10",
|
|
7962
|
+
typescript: "^5.8.0"
|
|
7963
|
+
},
|
|
7964
|
+
exports: {
|
|
7965
|
+
".": {
|
|
7966
|
+
types: "./dist/index.d.ts",
|
|
7967
|
+
import: "./dist/index.js"
|
|
7968
|
+
},
|
|
7969
|
+
"./tui": {
|
|
7970
|
+
types: "./src/tui/index.tsx",
|
|
7971
|
+
import: "./src/tui/entry.mjs"
|
|
7972
|
+
}
|
|
7973
|
+
},
|
|
7974
|
+
"oc-plugin": [
|
|
7975
|
+
"server",
|
|
7976
|
+
"tui"
|
|
7977
|
+
],
|
|
7978
|
+
peerDependencies: {
|
|
7979
|
+
"@opencode-ai/plugin": ">=1.15.0",
|
|
7980
|
+
"@opentui/core": ">=0.4.2",
|
|
7981
|
+
"@opentui/solid": ">=0.4.2",
|
|
7982
|
+
"solid-js": "^1.9.12"
|
|
7983
|
+
},
|
|
7984
|
+
peerDependenciesMeta: {
|
|
7985
|
+
"@opentui/core": {
|
|
7986
|
+
optional: true
|
|
7987
|
+
},
|
|
7988
|
+
"@opentui/solid": {
|
|
7989
|
+
optional: true
|
|
7990
|
+
},
|
|
7991
|
+
"solid-js": {
|
|
7992
|
+
optional: true
|
|
7993
|
+
}
|
|
7994
|
+
}
|
|
7995
|
+
};
|
|
7871
7996
|
|
|
7872
7997
|
// src/plugin/stale-build-notice.ts
|
|
7873
7998
|
function bindStaleBuildNotice(client, moduleUrl, harness = "opencode") {
|
|
@@ -7886,6 +8011,24 @@ function bindStaleBuildNotice(client, moduleUrl, harness = "opencode") {
|
|
|
7886
8011
|
});
|
|
7887
8012
|
}
|
|
7888
8013
|
|
|
8014
|
+
// src/standalone-plugin-marker.ts
|
|
8015
|
+
var markerSymbol = Symbol.for("cortexkit.standalone-plugins");
|
|
8016
|
+
function registerStandalonePluginMarker(version) {
|
|
8017
|
+
try {
|
|
8018
|
+
const globals = globalThis;
|
|
8019
|
+
let registry = globals[markerSymbol];
|
|
8020
|
+
if (registry === undefined) {
|
|
8021
|
+
registry = new Map;
|
|
8022
|
+
globals[markerSymbol] = registry;
|
|
8023
|
+
}
|
|
8024
|
+
registry.set("magic-context", { version });
|
|
8025
|
+
} catch (error) {
|
|
8026
|
+
try {
|
|
8027
|
+
log2("could not register the standalone plugin marker", error);
|
|
8028
|
+
} catch {}
|
|
8029
|
+
}
|
|
8030
|
+
}
|
|
8031
|
+
|
|
7889
8032
|
// src/v2/hooks/update-check.ts
|
|
7890
8033
|
import { existsSync, readFileSync } from "node:fs";
|
|
7891
8034
|
import { dirname, join as join2 } from "node:path";
|
|
@@ -8031,6 +8174,7 @@ function startUpdateChecks(context, check = (signal) => {
|
|
|
8031
8174
|
}
|
|
8032
8175
|
|
|
8033
8176
|
// src/v2/server.ts
|
|
8177
|
+
registerStandalonePluginMarker(package_default.version);
|
|
8034
8178
|
function isOpenCode2HostContext(context) {
|
|
8035
8179
|
if (typeof context !== "object" || context === null)
|
|
8036
8180
|
return false;
|
|
@@ -8042,7 +8186,7 @@ async function setup(context) {
|
|
|
8042
8186
|
log2("v2 setup() called on a host without session.hook; v1 server lane owns this host, v2 lane inert");
|
|
8043
8187
|
return async () => {};
|
|
8044
8188
|
}
|
|
8045
|
-
const { registerContext } = await import("./context-
|
|
8189
|
+
const { registerContext } = await import("./context-gsdtha5v.js");
|
|
8046
8190
|
setHarness2("opencode2");
|
|
8047
8191
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
8048
8192
|
const duties = await registerContext(context);
|
|
@@ -2,7 +2,7 @@ import"./server-pavzsdc6.js";
|
|
|
2
2
|
import {
|
|
3
3
|
sessionLog2
|
|
4
4
|
} from "./server-t4k4qexw.js";
|
|
5
|
-
import"./server-
|
|
5
|
+
import"./server-cvgn49tr.js";
|
|
6
6
|
import {
|
|
7
7
|
COMPARTMENT_LEASE_RENEWAL_MS,
|
|
8
8
|
acquireCompartmentLease,
|
|
@@ -10,12 +10,6 @@ import {
|
|
|
10
10
|
releaseCompartmentLeaseBestEffort,
|
|
11
11
|
getCompartments,
|
|
12
12
|
getLastCompartmentEndMessage,
|
|
13
|
-
getWrapupInProgressState,
|
|
14
|
-
acquireWrapupInProgress,
|
|
15
|
-
updateWrapupInProgress,
|
|
16
|
-
releaseWrapupInProgress,
|
|
17
|
-
getHistorianFailureState,
|
|
18
|
-
clearEmergencyRecovery,
|
|
19
13
|
describeBoundaryDiagnostics,
|
|
20
14
|
resolveWrapupProtectedTailBoundary,
|
|
21
15
|
hasRunnableCompartmentWindow,
|
|
@@ -25,46 +19,52 @@ import {
|
|
|
25
19
|
registerActiveCompartmentRun,
|
|
26
20
|
setRecompStarting2,
|
|
27
21
|
setRecompTerminal2
|
|
28
|
-
} from "./server-
|
|
22
|
+
} from "./server-7spkq1y6.js";
|
|
29
23
|
import"./server-kzns2hbz.js";
|
|
30
24
|
import"./server-hb6xhh9q.js";
|
|
31
25
|
import"./server-kb9nn0a0.js";
|
|
32
|
-
import"./server-
|
|
33
|
-
import"./server-
|
|
34
|
-
import"./server-
|
|
26
|
+
import"./server-2htmbqbv.js";
|
|
27
|
+
import"./server-s2st631p.js";
|
|
28
|
+
import"./server-bgzy0phk.js";
|
|
29
|
+
import {
|
|
30
|
+
getWrapupInProgressState,
|
|
31
|
+
acquireWrapupInProgress,
|
|
32
|
+
updateWrapupInProgress,
|
|
33
|
+
releaseWrapupInProgress,
|
|
34
|
+
getHistorianFailureState,
|
|
35
|
+
clearEmergencyRecovery,
|
|
36
|
+
prepareRawSessionOrdinals2
|
|
37
|
+
} from "./server-c7n2ftng.js";
|
|
35
38
|
import"./server-6byqfbqf.js";
|
|
39
|
+
import"./server-7vkj6zhb.js";
|
|
36
40
|
import"./server-1zx87sdm.js";
|
|
37
|
-
import"./server-
|
|
38
|
-
import"./server-
|
|
41
|
+
import"./server-4c7jt8gq.js";
|
|
42
|
+
import"./server-cw6521wn.js";
|
|
39
43
|
import"./server-7h861yms.js";
|
|
40
44
|
import"./server-2ra6pwf3.js";
|
|
41
|
-
import"./server-
|
|
42
|
-
import {
|
|
43
|
-
prepareRawSessionOrdinals2
|
|
44
|
-
} from "./server-4ez8mntn.js";
|
|
45
|
+
import"./server-czb2rkpk.js";
|
|
45
46
|
import"./server-7ekna9zs.js";
|
|
46
47
|
import"./server-fr0wbhdn.js";
|
|
47
|
-
import"./server-
|
|
48
|
-
import"./server-
|
|
49
|
-
import"./server-
|
|
48
|
+
import"./server-6tcrjfw8.js";
|
|
49
|
+
import"./server-8xmq9h3f.js";
|
|
50
|
+
import"./server-1fszbabv.js";
|
|
50
51
|
import"./server-fb3zxn06.js";
|
|
51
|
-
import"./server-
|
|
52
|
-
import"./server-zp53y8js.js";
|
|
52
|
+
import"./server-zbxjj2mz.js";
|
|
53
53
|
import {
|
|
54
54
|
pushNotification2
|
|
55
55
|
} from "./server-x8a7jmkh.js";
|
|
56
56
|
import"./server-qt1qqasc.js";
|
|
57
57
|
import"./server-4dhv7mqz.js";
|
|
58
|
-
import"./server-
|
|
59
|
-
import"./server-
|
|
58
|
+
import"./server-ras2sxnc.js";
|
|
59
|
+
import"./server-kh958yj8.js";
|
|
60
60
|
import"./server-7jzrrxap.js";
|
|
61
|
-
import"./server-
|
|
62
|
-
import"./server-
|
|
63
|
-
import"./server-
|
|
61
|
+
import"./server-d6g4whc2.js";
|
|
62
|
+
import"./server-vb7pbd9p.js";
|
|
63
|
+
import"./server-t528t8qm.js";
|
|
64
64
|
import"./server-676xw7at.js";
|
|
65
65
|
import {
|
|
66
66
|
sendStatusNotification2
|
|
67
|
-
} from "./server-
|
|
67
|
+
} from "./server-4enr7s6x.js";
|
|
68
68
|
import"./server-3t0q2cqx.js";
|
|
69
69
|
|
|
70
70
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runManagedWrapup2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
3
|
+
} from "./index-6tfxmc4n.js";
|
|
4
|
+
import"./index-eypn4ba6.js";
|
|
5
|
+
import"./index-zfzdpeq2.js";
|
|
6
|
+
import"./index-rafsaxac.js";
|
|
7
|
+
import"./index-sfhndpcb.js";
|
|
8
|
+
import"./index-r2zcs71c.js";
|
|
9
9
|
import"./index-7jzrrxap.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
import"./index-fg00p1cg.js";
|
|
11
|
+
import"./index-p1hnwfd8.js";
|
|
12
12
|
import"./index-4dhv7mqz.js";
|
|
13
|
+
import"./index-w23dh319.js";
|
|
13
14
|
import"./index-sd3egckz.js";
|
|
14
|
-
import"./index-
|
|
15
|
+
import"./index-xgrwmj82.js";
|
|
15
16
|
import"./index-qt1qqasc.js";
|
|
16
|
-
import"./index-
|
|
17
|
+
import"./index-x8a7jmkh.js";
|
|
17
18
|
import"./index-tqf7yg27.js";
|
|
18
|
-
import"./index-
|
|
19
|
+
import"./index-gbmqa9x9.js";
|
|
19
20
|
import"./index-vkbqdnkj.js";
|
|
20
|
-
import"./index-
|
|
21
|
+
import"./index-zg8yq4ya.js";
|
|
21
22
|
import"./index-fb3zxn06.js";
|
|
22
|
-
import"./index-
|
|
23
|
+
import"./index-att4bfan.js";
|
|
24
|
+
import"./index-6m7rdv7y.js";
|
|
23
25
|
import"./index-fr0wbhdn.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
26
|
+
import"./index-gzky5rva.js";
|
|
27
|
+
import"./index-7w18gg78.js";
|
|
28
|
+
import"./index-sv0bb7vg.js";
|
|
27
29
|
import"./index-nydv6g8r.js";
|
|
28
|
-
import"./index-9qjqq45k.js";
|
|
29
|
-
import"./index-h5zfkjyk.js";
|
|
30
30
|
import"./index-1zx87sdm.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-0pjvpfkf.js";
|
|
32
|
+
import"./index-h5zfkjyk.js";
|
|
33
|
+
import"./index-k6xvbj2e.js";
|
|
32
34
|
import"./index-h2wc01qk.js";
|
|
33
35
|
import"./index-1bt88epp.js";
|
|
34
36
|
import"./index-58e3y90n.js";
|
|
@@ -38,7 +40,6 @@ import"./index-kb9nn0a0.js";
|
|
|
38
40
|
import"./index-nsjyysj0.js";
|
|
39
41
|
import"./index-0sahzkwr.js";
|
|
40
42
|
import"./index-pavzsdc6.js";
|
|
41
|
-
import"./index-x8a7jmkh.js";
|
|
42
43
|
export {
|
|
43
44
|
runManagedWrapup2 as runManagedWrapup
|
|
44
45
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/opencode-magic-context",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"README.md"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "bun ../../scripts/check-bun.mjs && tsc -p ../retina-local-fs/tsconfig.build.json && bun run build:tui && bun ../../scripts/clean-dist-chunks.mjs dist index.js transformers-web.js transformers-node-wasm.js && bun build src/features/magic-context/memory/transformers-web-entry.ts --outfile dist/transformers-web.js --target browser --format esm --external onnxruntime-web && bun scripts/build-transformers-node-wasm.ts dist && bun build src/index.ts src/features/magic-context/memory/embedding-worker.ts src/features/magic-context/migration-worker.ts src/hooks/magic-context/auto-search-worker.ts src/hooks/magic-context/raw-ordinal-warmup-worker.ts --outdir dist --entry-naming '[name].[ext]' --target node --format esm --splitting --external @opencode-ai/plugin --external onnxruntime-node --external onnxruntime-web --external sharp --external bun:sqlite --external node:sqlite && bun run build:v2 && tsc --emitDeclarationOnly",
|
|
41
|
-
"build:v2": "bun ../../scripts/clean-dist-chunks.mjs dist/v2 server.js embedding-worker.js migration-worker.js && bun build src/features/magic-context/memory/transformers-web-entry.ts --outfile dist/v2/transformers-web.js --target browser --format esm --external onnxruntime-web && bun scripts/build-transformers-node-wasm.ts dist/v2 && bun build src/v2/server.ts src/features/magic-context/memory/embedding-worker.ts src/features/magic-context/migration-worker.ts src/hooks/magic-context/auto-search-worker.ts src/hooks/magic-context/raw-ordinal-warmup-worker.ts --outdir dist/v2 --entry-naming '[name].[ext]' --target node --format esm --splitting --external @opencode/plugin --external onnxruntime-node --external onnxruntime-web --external sharp --external bun:sqlite --external node:sqlite",
|
|
40
|
+
"build": "bun ../../scripts/check-bun.mjs && tsc -p ../retina-local-fs/tsconfig.build.json && bun run build:tui && bun ../../scripts/clean-dist-chunks.mjs dist index.js transformers-web.js transformers-node-wasm.js && bun build src/features/magic-context/memory/transformers-web-entry.ts --outfile dist/transformers-web.js --target browser --format esm --external onnxruntime-web && bun scripts/build-transformers-node-wasm.ts dist && bun build src/index.ts src/features/magic-context/memory/embedding-worker.ts src/features/magic-context/memory/embedding-worker-process.ts src/features/magic-context/migration-worker.ts src/hooks/magic-context/auto-search-worker.ts src/hooks/magic-context/raw-ordinal-warmup-worker.ts --outdir dist --entry-naming '[name].[ext]' --target node --format esm --splitting --external @opencode-ai/plugin --external onnxruntime-node --external onnxruntime-web --external sharp --external bun:ffi --external bun:sqlite --external node:sqlite && bun run build:v2 && tsc --emitDeclarationOnly",
|
|
41
|
+
"build:v2": "bun ../../scripts/clean-dist-chunks.mjs dist/v2 server.js embedding-worker.js embedding-worker-process.js migration-worker.js && bun build src/features/magic-context/memory/transformers-web-entry.ts --outfile dist/v2/transformers-web.js --target browser --format esm --external onnxruntime-web && bun scripts/build-transformers-node-wasm.ts dist/v2 && bun build src/v2/server.ts src/features/magic-context/memory/embedding-worker.ts src/features/magic-context/memory/embedding-worker-process.ts src/features/magic-context/migration-worker.ts src/hooks/magic-context/auto-search-worker.ts src/hooks/magic-context/raw-ordinal-warmup-worker.ts --outdir dist/v2 --entry-naming '[name].[ext]' --target node --format esm --splitting --external @opencode/plugin --external onnxruntime-node --external onnxruntime-web --external sharp --external bun:ffi --external bun:sqlite --external node:sqlite",
|
|
42
42
|
"build:tui": "bun scripts/build-tui.ts",
|
|
43
43
|
"check:tui-compiled": "git diff --exit-code -- src/tui-compiled && test -z \"$(git status --porcelain -- src/tui-compiled)\"",
|
|
44
44
|
"check:transformers-node-wasm": "bun scripts/verify-transformers-node-wasm.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"lint:fix": "biome check --write .",
|
|
51
51
|
"format": "biome format --write .",
|
|
52
52
|
"format:check": "biome format .",
|
|
53
|
-
"clean": "bun ../../scripts/clean-dist-chunks.mjs dist index.js embedding-worker.js migration-worker.js transformers-web.js transformers-node-wasm.js && bun ../../scripts/clean-dist-chunks.mjs dist/v2 server.js embedding-worker.js migration-worker.js transformers-web.js transformers-node-wasm.js",
|
|
53
|
+
"clean": "bun ../../scripts/clean-dist-chunks.mjs dist index.js embedding-worker.js embedding-worker-process.js migration-worker.js transformers-web.js transformers-node-wasm.js && bun ../../scripts/clean-dist-chunks.mjs dist/v2 server.js embedding-worker.js embedding-worker-process.js migration-worker.js transformers-web.js transformers-node-wasm.js",
|
|
54
54
|
"prepublishOnly": "bun run build && bun run check:tui-compiled"
|
|
55
55
|
},
|
|
56
56
|
"//check:tui-compiled": "Check drift on output already generated by build or build:tui; this check never regenerates files. CI and prepublishOnly build first.",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
export const MURAL_MODEL_DEPRECATION_WARNING =
|
|
9
9
|
"mural.model is deprecated and ignored; compress-cues now uses the dreamer model for each harness, like every other dreamer task. To override it, set dreamer.opencode.tasks.compress-cues.model (or the pi/omp equivalent). This key no longer does anything; remove it.";
|
|
10
10
|
|
|
11
|
+
export const WINDOW_OVERLAY_PATH_DEPRECATION_WARNING =
|
|
12
|
+
"models.window_overlay_path is deprecated and ignored; Fusiform no longer publishes window-overlay data, so this setting no longer changes model window geometry. Remove this key.";
|
|
13
|
+
|
|
11
14
|
/**
|
|
12
15
|
* Pushes the deprecation warning when the config still sets `mural.model`.
|
|
13
16
|
* Call it after the legacy experimental migration so the pre-graduation
|
|
@@ -22,3 +25,19 @@ export function warnDeprecatedMuralModel(
|
|
|
22
25
|
warnings.push(MURAL_MODEL_DEPRECATION_WARNING);
|
|
23
26
|
}
|
|
24
27
|
}
|
|
28
|
+
|
|
29
|
+
/** Pushes one warning when a config still sets the retired Fusiform path. */
|
|
30
|
+
export function warnDeprecatedWindowOverlayPath(
|
|
31
|
+
config: Record<string, unknown>,
|
|
32
|
+
warnings: string[],
|
|
33
|
+
): void {
|
|
34
|
+
const models = config.models;
|
|
35
|
+
if (
|
|
36
|
+
typeof models === "object" &&
|
|
37
|
+
models !== null &&
|
|
38
|
+
Object.hasOwn(models, "window_overlay_path") &&
|
|
39
|
+
!warnings.includes(WINDOW_OVERLAY_PATH_DEPRECATION_WARNING)
|
|
40
|
+
) {
|
|
41
|
+
warnings.push(WINDOW_OVERLAY_PATH_DEPRECATION_WARNING);
|
|
42
|
+
}
|
|
43
|
+
}
|
package/src/config/index.test.ts
CHANGED
|
@@ -8,12 +8,10 @@ import { resolveDreamerTaskModel, resolveHistorianModel } from "../shared/model-
|
|
|
8
8
|
import { Database } from "../shared/sqlite";
|
|
9
9
|
import { createTestTempDir, createTestTempDirFromPath } from "../shared/test-temp-dir";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "../shared/window-geometry";
|
|
11
|
+
MURAL_MODEL_DEPRECATION_WARNING,
|
|
12
|
+
WINDOW_OVERLAY_PATH_DEPRECATION_WARNING,
|
|
13
|
+
} from "./deprecated-config";
|
|
15
14
|
import { loadPluginConfig, loadPluginConfigDetailed } from "./index";
|
|
16
|
-
import { MURAL_MODEL_DEPRECATION_WARNING } from "./mural-model-deprecation";
|
|
17
15
|
import { resolveConfigProfile } from "./profiles";
|
|
18
16
|
import { getProtectedTokensTierOverrides } from "./project-security";
|
|
19
17
|
import { REMOVED_AGENT_CONFIG_WARNING } from "./removed-agent-config";
|
|
@@ -123,39 +121,19 @@ function loadWithUserAndProjectConfig(
|
|
|
123
121
|
}
|
|
124
122
|
}
|
|
125
123
|
|
|
126
|
-
describe("loadPluginConfig — Fusiform
|
|
127
|
-
it("
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
writeFileSync(
|
|
133
|
-
overlayPath,
|
|
134
|
-
JSON.stringify({
|
|
135
|
-
schema: "fusiform-window-overlay/v1",
|
|
136
|
-
generated_at: "2026-09-01T00:00:00Z",
|
|
137
|
-
minted_provider_ids: [],
|
|
138
|
-
cells: [{ provider_id: "hunt-provider", model_id: modelId, facts: {} }],
|
|
139
|
-
}),
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
try {
|
|
143
|
-
writeOverlay("before-rewrite");
|
|
144
|
-
loadWithUserConfig(configText);
|
|
145
|
-
expect(getWindowOverlay()?.cells[0]?.model_id).toBe("before-rewrite");
|
|
146
|
-
|
|
147
|
-
writeOverlay("after-rewrite");
|
|
148
|
-
expect(getWindowOverlay()?.cells[0]?.model_id).toBe("before-rewrite");
|
|
149
|
-
|
|
150
|
-
loadWithUserConfig(configText);
|
|
151
|
-
expect(getWindowOverlay()?.cells[0]?.model_id).toBe("before-rewrite");
|
|
124
|
+
describe("loadPluginConfig — retired Fusiform window path", () => {
|
|
125
|
+
it("parses the old key but warns once that it is ignored", () => {
|
|
126
|
+
const path = "/tmp/retired-fusiform-window.json";
|
|
127
|
+
const config = loadWithUserConfig(
|
|
128
|
+
JSON.stringify({ models: { window_overlay_path: path } }),
|
|
129
|
+
);
|
|
152
130
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
131
|
+
expect(config.models?.window_overlay_path).toBe(path);
|
|
132
|
+
const warnings = config.configWarnings?.filter((message) =>
|
|
133
|
+
message.includes("models.window_overlay_path"),
|
|
134
|
+
);
|
|
135
|
+
expect(warnings).toHaveLength(1);
|
|
136
|
+
expect(warnings?.[0]).toContain(WINDOW_OVERLAY_PATH_DEPRECATION_WARNING);
|
|
159
137
|
});
|
|
160
138
|
});
|
|
161
139
|
|
package/src/config/index.ts
CHANGED
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
import { log } from "../shared/logger";
|
|
15
15
|
import { setOutputReserveConfig } from "../shared/models-dev-cache";
|
|
16
16
|
import type { PromptSurfaceConfig } from "../shared/prompt-surface";
|
|
17
|
-
import { setWindowOverlayPath } from "../shared/window-geometry";
|
|
18
17
|
import { isCompactionEnabled, migrateLegacyAgentEnabledInMemory } from "./agent-disable";
|
|
18
|
+
import { warnDeprecatedMuralModel, warnDeprecatedWindowOverlayPath } from "./deprecated-config";
|
|
19
19
|
import {
|
|
20
20
|
cortexKitProjectConfigBasePath,
|
|
21
21
|
cortexKitUserConfigBasePath,
|
|
@@ -25,7 +25,6 @@ import {
|
|
|
25
25
|
} from "./migrate-config-location";
|
|
26
26
|
import { migrateDreamerV2 } from "./migrate-dreamer-v2";
|
|
27
27
|
import { migrateLegacyExperimental } from "./migrate-experimental";
|
|
28
|
-
import { warnDeprecatedMuralModel } from "./mural-model-deprecation";
|
|
29
28
|
import { resolveConfigProfile } from "./profiles";
|
|
30
29
|
import {
|
|
31
30
|
attachProtectedTokensTierOverrides,
|
|
@@ -439,6 +438,7 @@ export function parsePluginConfig(
|
|
|
439
438
|
preMigrationWarnings,
|
|
440
439
|
);
|
|
441
440
|
warnDeprecatedMuralModel(migratedExperimental, preMigrationWarnings);
|
|
441
|
+
warnDeprecatedWindowOverlayPath(migratedExperimental, preMigrationWarnings);
|
|
442
442
|
// Dreamer v2: convert the legacy v1 dreamer shape (window schedule, tasks
|
|
443
443
|
// array, user_memories/pin_key_files blocks) into the per-task `tasks` record.
|
|
444
444
|
// Runs AFTER migrate-experimental so experimental.user_memories (already
|
|
@@ -872,7 +872,6 @@ export function loadPluginConfigDetailed(
|
|
|
872
872
|
if (profileResolution.activeProfile) config.profile = profileResolution.activeProfile;
|
|
873
873
|
if (applyRuntimeGlobals) {
|
|
874
874
|
setOutputReserveConfig(config.output_reserve);
|
|
875
|
-
setWindowOverlayPath(config.models?.window_overlay_path);
|
|
876
875
|
}
|
|
877
876
|
const leafValidationWarnings = [...(config.configWarnings ?? [])];
|
|
878
877
|
if (config.configWarnings?.length) {
|
|
@@ -327,8 +327,8 @@ function makeProjectThresholdWarning(field: string, reason: string): string {
|
|
|
327
327
|
* - `debug_rpc` — a repo must not enable process heap capture or memory diagnostics.
|
|
328
328
|
* - `allow_home_project` — only the user may opt a home-directory session
|
|
329
329
|
* into a durable project identity.
|
|
330
|
-
* - `output_reserve`
|
|
331
|
-
*
|
|
330
|
+
* - `output_reserve` — only the user may change process-wide window geometry.
|
|
331
|
+
* The deprecated `models.window_overlay_path` field is ignored at every tier.
|
|
332
332
|
* - `language`: a repo must not inject prompt text through a user preference.
|
|
333
333
|
* - `sqlite` — `sqlite.cache_size_mb` / `mmap_size_mb` become PRAGMAs on the
|
|
334
334
|
* process-global shared DB handle (one connection across every project in the
|
|
@@ -425,7 +425,7 @@ export function stripUnsafeProjectConfigFields(projectRaw: Record<string, unknow
|
|
|
425
425
|
if (isPlainObject(models) && "window_overlay_path" in models) {
|
|
426
426
|
delete models.window_overlay_path;
|
|
427
427
|
warnings.push(
|
|
428
|
-
"Ignoring models.window_overlay_path from project config (
|
|
428
|
+
"Ignoring models.window_overlay_path from project config (deprecated; this setting no longer changes model window geometry).",
|
|
429
429
|
);
|
|
430
430
|
}
|
|
431
431
|
|
|
@@ -792,7 +792,7 @@ const BaseEmbeddingConfigSchema = z
|
|
|
792
792
|
.enum(["auto", "native", "wasm"])
|
|
793
793
|
.default("auto")
|
|
794
794
|
.describe(
|
|
795
|
-
"Local provider only: ONNX runtime selection. 'auto' uses native under Node and uses WASM under Bun versions before 1.4.0, where Bun's NAPI teardown race can panic on quit; native is restored automatically on Bun 1.4.0+. Inference runs in a dedicated worker. On Bun before 1.4.0, even explicit 'native' uses WASM because native worker teardown can crash the process. Set 'wasm' to avoid loading the native addon on newer hosts too.",
|
|
795
|
+
"Local provider only: ONNX runtime selection. 'auto' uses native under Node and uses WASM under Bun versions before 1.4.0, where Bun's NAPI teardown race can panic on quit; native is restored automatically on Bun 1.4.0+. Inference runs in a dedicated worker after disabling POSIX telemetry in the native process environment. Compiled Bun hosts and hosts without a verified in-process opt-out use a subprocess instead. Windows native ONNX emits OS-controlled ETW diagnostics, not direct uploads. On Bun before 1.4.0, even explicit 'native' uses WASM because native worker teardown can crash the process. Set 'wasm' to avoid loading the native addon on newer hosts too.",
|
|
796
796
|
),
|
|
797
797
|
local_dtype: z
|
|
798
798
|
.enum([
|
|
@@ -953,8 +953,8 @@ export interface MagicContextConfig {
|
|
|
953
953
|
prompt_surface: PromptSurfaceConfig;
|
|
954
954
|
/** User-only output-token reservation override. Zero disables reservation. */
|
|
955
955
|
output_reserve?: number | { default: number; [modelKey: string]: number };
|
|
956
|
-
/**
|
|
957
|
-
models?: { window_overlay_path?:
|
|
956
|
+
/** Deprecated user-only window metadata path; parsed only so loaders can warn and ignore it. */
|
|
957
|
+
models?: { window_overlay_path?: unknown };
|
|
958
958
|
/** TUI toast lifetime in milliseconds for Magic Context notifications. Default: 5000. */
|
|
959
959
|
toast_duration_ms?: number;
|
|
960
960
|
execute_threshold_percentage: number | { default: number; [modelKey: string]: number };
|
|
@@ -1220,12 +1220,16 @@ export const MagicContextConfigSchema = z
|
|
|
1220
1220
|
),
|
|
1221
1221
|
models: z
|
|
1222
1222
|
.object({
|
|
1223
|
-
window_overlay_path: z
|
|
1223
|
+
window_overlay_path: z
|
|
1224
|
+
.unknown()
|
|
1225
|
+
.optional()
|
|
1226
|
+
.describe(
|
|
1227
|
+
"Deprecated: ignored. Fusiform no longer publishes window-overlay data, so this setting no longer changes model window geometry. Remove this key.",
|
|
1228
|
+
)
|
|
1229
|
+
.meta({ deprecated: true }),
|
|
1224
1230
|
})
|
|
1225
1231
|
.optional()
|
|
1226
|
-
.describe(
|
|
1227
|
-
"User-only Fusiform window-overlay settings. The path defaults to <dataDir>/fusiform/window-overlay.json.",
|
|
1228
|
-
),
|
|
1232
|
+
.describe("Deprecated user-only Fusiform window-overlay settings; ignored."),
|
|
1229
1233
|
toast_duration_ms: z
|
|
1230
1234
|
.number()
|
|
1231
1235
|
.min(0)
|
|
@@ -35,10 +35,9 @@ export function availableDreamTasks(smartNotesEnabled = true): DreamTaskName[] {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
/** Prompt-token ceilings
|
|
38
|
+
/** Prompt-token ceilings leave headroom for repeated tool-loop prompt sends.
|
|
39
39
|
* Completed Gemini run usage predicts 20-memory mapping/verification batches
|
|
40
|
-
* at about 70% of their
|
|
41
|
-
* (docs/reports/verify-token-budget-2026-09-30.md); curate and other tasks retain
|
|
40
|
+
* at about 70% of their ceiling; curate and other tasks retain
|
|
42
41
|
* their separate allowances. */
|
|
43
42
|
export const DREAM_TOOL_LOOP_TOKEN_BUDGETS = {
|
|
44
43
|
"map-memories": 2_500_000,
|
|
@@ -33,12 +33,7 @@ import { getHarness } from "./harness";
|
|
|
33
33
|
import { modelRefLookupOrder } from "./harness-provider-map";
|
|
34
34
|
import { sessionLog } from "./logger";
|
|
35
35
|
import { writeStorageFileAtomicSync } from "./storage-permissions";
|
|
36
|
-
import {
|
|
37
|
-
deriveWindowGeometry,
|
|
38
|
-
getWindowOverlay,
|
|
39
|
-
resolveWindowOverlayFacts,
|
|
40
|
-
type WindowGeometryResult,
|
|
41
|
-
} from "./window-geometry";
|
|
36
|
+
import { deriveWindowGeometry, type WindowGeometryResult } from "./window-geometry";
|
|
42
37
|
|
|
43
38
|
interface OpencodeClientLike {
|
|
44
39
|
config: {
|
|
@@ -515,7 +510,6 @@ export function getSdkWindowGeometry(
|
|
|
515
510
|
output: metadata.outputLimit,
|
|
516
511
|
},
|
|
517
512
|
{
|
|
518
|
-
overlay: resolveWindowOverlayFacts(providerID, modelID, getWindowOverlay()),
|
|
519
513
|
outputReserveOverride: resolveOutputReserve(providerID, modelID),
|
|
520
514
|
harness: options?.harness ?? "opencode",
|
|
521
515
|
contextCap:
|