@cortexkit/opencode-magic-context 0.49.86 → 0.49.89
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-fnyxaahs.js → announcement-4ynkaf0d.js} +2 -2
- package/dist/auto-search-worker.js +13 -7
- package/dist/chunk-embedding-write-worker.js +7 -7
- package/dist/{compartment-chunk-embedding-ymc9mtwv.js → compartment-chunk-embedding-fey2bsyf.js} +3 -1
- package/dist/{conflict-warning-hook-a0wrnzch.js → conflict-warning-hook-kbq6ppjf.js} +2 -2
- package/dist/{context-xesm7rj3.js → context-grdg1k2k.js} +132 -52
- package/dist/{derive-budgets-90869322.js → derive-budgets-hzzq71rm.js} +2 -2
- package/dist/{embedding-backfill-v6sw58m8.js → embedding-backfill-qjkaee9s.js} +8 -8
- package/dist/{v2/embedding-cache-mgyr73ef.js → embedding-cache-zn4r1c31.js} +5 -1
- package/dist/embedding-worker.js +2 -2
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +1 -0
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/token-budget.d.ts +8 -3
- package/dist/features/magic-context/dreamer/token-budget.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-cache.d.ts +7 -0
- package/dist/features/magic-context/memory/embedding-cache.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +6 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/tool-definition-tokens.d.ts +2 -0
- package/dist/features/magic-context/tool-definition-tokens.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-worker-probe.fixture.d.ts +2 -0
- package/dist/hooks/magic-context/auto-search-worker-probe.fixture.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp-carry.d.ts +4 -0
- package/dist/hooks/magic-context/compartment-runner-recomp-carry.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts +8 -2
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/dropped-input-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-fail-closed.d.ts +2 -0
- package/dist/hooks/magic-context/emergency-fail-closed.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +3 -5
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts +11 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +1 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-s8ks5nz4.js → index-2pdgy88n.js} +5 -5
- package/dist/{index-7j2zv9nm.js → index-2qsca7h7.js} +47 -11
- package/dist/{index-1bqkqde0.js → index-39rzef89.js} +9 -7
- package/dist/{index-snbpdpa3.js → index-3pdknr07.js} +4 -4
- package/dist/{index-c5tmzym6.js → index-5df2fw5b.js} +108 -13
- package/dist/{index-7svecf3m.js → index-5pgyqgmx.js} +1 -1
- package/dist/{index-xrnhxkz7.js → index-60wnwcwz.js} +1 -1
- package/dist/{index-k50xhjw1.js → index-60x5d68t.js} +1 -1
- package/dist/{index-4ntnt8ee.js → index-61knrt52.js} +1 -1
- package/dist/{index-g6hfh4h4.js → index-6zewd2n5.js} +14 -8
- package/dist/{index-70cv85b0.js → index-78t37mcq.js} +2 -2
- package/dist/{index-stx8zd81.js → index-83qd3n7s.js} +2 -2
- package/dist/{index-nny4gm06.js → index-9d3qgwq0.js} +2 -2
- package/dist/{index-jjvbk92s.js → index-9emdjcb5.js} +1 -1
- package/dist/{index-05bm2ndp.js → index-chpzb6xy.js} +1 -1
- package/dist/{index-2kf73btc.js → index-cr483vx6.js} +1 -1
- package/dist/{index-d0rtbv0f.js → index-dk3hy2a2.js} +21 -14
- package/dist/{index-gxdc95cp.js → index-g0mb2kb4.js} +585 -82
- package/dist/{index-w6v4dw5f.js → index-h9hybzr5.js} +5 -5
- package/dist/{index-1pf5qrx4.js → index-jzfsnbmm.js} +3 -3
- package/dist/{index-jrj95cce.js → index-m6dnydf8.js} +9 -2
- package/dist/{index-xccywqdj.js → index-mrjat4eq.js} +77 -14
- package/dist/{index-022w6314.js → index-n1ty0vd3.js} +116 -512
- package/dist/{index-ttk3trse.js → index-q7msfgwz.js} +311 -111
- package/dist/{index-e32b3x4n.js → index-qfcjrnpe.js} +7 -6
- package/dist/{v2/server-4dhv7mqz.js → index-qjwpqvnf.js} +48 -1
- package/dist/{index-3dtzyred.js → index-r4y0dczp.js} +1 -1
- package/dist/{index-4w5rx7de.js → index-tt0vs4x5.js} +2 -2
- package/dist/{index-k0tb2z28.js → index-w51n3576.js} +2 -2
- package/dist/{index-25nktq8n.js → index-wmb2mcdw.js} +7 -7
- package/dist/{index-zmqx48vt.js → index-xsqw8kbd.js} +1 -1
- package/dist/{index-fzgyvsb1.js → index-y14pawe1.js} +3 -0
- package/dist/{index-798s7c8s.js → index-zxhev8ze.js} +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -59
- package/dist/{message-index-bounded-6fr624zf.js → message-index-bounded-r1qys471.js} +4 -4
- package/dist/migration-worker.js +5 -5
- package/dist/plugin/messages-transform.d.ts +3 -4
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/refusal-notice.d.ts +3 -0
- package/dist/plugin/refusal-notice.d.ts.map +1 -0
- package/dist/{project-embedding-registry-q80scexh.js → project-embedding-registry-m3fp1pa4.js} +7 -7
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-6wedfths.js → read-session-chunk-xv9f0wgb.js} +3 -3
- package/dist/{recomp-orchestrator-7ecg8ryx.js → recomp-orchestrator-dgyb394j.js} +23 -23
- package/dist/{render-yqp7q79f.js → render-d014e603.js} +12 -12
- package/dist/{rpc-notifications-t9q0ynq7.js → rpc-notifications-ta2zsxpq.js} +1 -1
- package/dist/{search-bw22d7zc.js → search-9gceftb9.js} +18 -18
- package/dist/{search-archive-r4h96j2z.js → search-archive-gybn6q7s.js} +5 -5
- package/dist/{send-session-notification-7x518gew.js → send-session-notification-gzxz88vq.js} +1 -1
- package/dist/shared/assistant-message-extractor.d.ts +2 -0
- package/dist/shared/assistant-message-extractor.d.ts.map +1 -1
- package/dist/shared/prompt-async-transport.d.ts.map +1 -1
- package/dist/shared/recomp-outcome.d.ts +4 -0
- package/dist/shared/recomp-outcome.d.ts.map +1 -0
- package/dist/shared/rpc-notifications.d.ts +1 -1
- package/dist/shared/rpc-notifications.d.ts.map +1 -1
- package/dist/shared/storage-permissions.d.ts +16 -2
- package/dist/shared/storage-permissions.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +4 -1
- package/dist/shared/user-facing-codes.d.ts.map +1 -1
- package/dist/{storage-memory-e6a7mb0k.js → storage-memory-hhrvfw0x.js} +2 -2
- package/dist/{storage-tags-y2mrb8e6.js → storage-tags-f1ftvjpw.js} +2 -2
- package/dist/{transform-postprocess-phase-t99yj9vt.js → transform-postprocess-phase-34k1zwsy.js} +24 -24
- package/dist/v2/auto-search-worker.js +13 -7
- package/dist/v2/chunk-embedding-write-worker.js +7 -7
- package/dist/v2/{compartment-chunk-embedding-x6qw6mjk.js → compartment-chunk-embedding-knt2468v.js} +3 -1
- package/dist/v2/{context-k8sx1nyy.js → context-8bzydxfy.js} +227 -70
- package/dist/v2/{derive-budgets-ecjy1aqh.js → derive-budgets-hr4qqrnv.js} +3 -3
- package/dist/v2/{embedding-backfill-k8kqnwfq.js → embedding-backfill-0ar1bm97.js} +8 -8
- package/dist/{embedding-cache-mgyr73ef.js → v2/embedding-cache-zn4r1c31.js} +5 -1
- package/dist/v2/embedding-worker.js +2 -2
- package/dist/v2/fold/native-replay.d.ts +3 -1
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/hidden-child-record.d.ts +1 -0
- package/dist/v2/hidden-child-record.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-jqy7283g.js → message-index-bounded-b07r9cjv.js} +4 -4
- package/dist/v2/migration-worker.js +5 -5
- package/dist/v2/{project-embedding-registry-2jp1antr.js → project-embedding-registry-gx2waee8.js} +7 -7
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-n3nhfvd7.js → read-session-chunk-38wdy8nd.js} +3 -3
- package/dist/v2/{recomp-orchestrator-ssde9ft1.js → recomp-orchestrator-wq7gbkqa.js} +24 -24
- package/dist/v2/{render-fezgh7pa.js → render-2dan17xc.js} +12 -12
- package/dist/v2/{rpc-notifications-t9q0ynq7.js → rpc-notifications-ta2zsxpq.js} +1 -1
- package/dist/v2/{search-archive-zz1kza50.js → search-archive-89hdy0a2.js} +5 -5
- package/dist/v2/{search-m251amra.js → search-nyqykx7q.js} +17 -17
- package/dist/v2/{send-session-notification-p52rhjzy.js → send-session-notification-zazaxxpf.js} +1 -1
- package/dist/v2/{server-4wwwm2ya.js → server-09h2vyvs.js} +5 -5
- package/dist/v2/{server-r2es6zt7.js → server-0tv6kytx.js} +108 -13
- package/dist/v2/{server-rz4snd3x.js → server-1rrmxhd1.js} +1 -1
- package/dist/v2/{server-wdq85mxj.js → server-6250cxzs.js} +14 -8
- package/dist/v2/{server-xa8fefhw.js → server-96nm9vk4.js} +1 -1
- package/dist/v2/{server-jjvbk92s.js → server-9emdjcb5.js} +1 -1
- package/dist/v2/{server-ap81bk3c.js → server-9n2qgk29.js} +1 -1
- package/dist/v2/{server-ps6rz88g.js → server-a85j3kam.js} +2 -2
- package/dist/v2/{server-y31y6gws.js → server-add0j5n3.js} +9 -7
- package/dist/v2/{server-97w51d8n.js → server-b0a9h3ds.js} +3 -3
- package/dist/v2/{server-2k8tkbhz.js → server-c7awk5s2.js} +10 -4
- package/dist/v2/{server-hn8b7sfe.js → server-dgjqvpgd.js} +5 -5
- package/dist/v2/{server-fsw8kbng.js → server-dtcwkdqj.js} +314 -114
- package/dist/v2/{server-mbkwcwgw.js → server-f7tzvmzs.js} +2 -2
- package/dist/v2/{server-n5zr7190.js → server-fb5hvvfc.js} +77 -14
- package/dist/v2/{server-w7mpvkpj.js → server-fn4ky6mn.js} +1 -1
- package/dist/v2/{server-3p6b0qya.js → server-gqkdfdvw.js} +1 -1
- package/dist/v2/{server-cwtehwbb.js → server-j4jjtdc5.js} +1 -1
- package/dist/v2/{server-b93f0bqh.js → server-pjk9spbf.js} +1 -1
- package/dist/v2/{server-s15knz0w.js → server-pmws7we9.js} +1 -1
- package/dist/{index-4dhv7mqz.js → v2/server-qjwpqvnf.js} +48 -1
- package/dist/v2/{server-a2f1bhyj.js → server-stjy5dxv.js} +9 -2
- package/dist/v2/{server-ssg29wjg.js → server-ta4h0fch.js} +21 -14
- package/dist/v2/{server-e2k9mt86.js → server-tj65pgvg.js} +1 -1
- package/dist/v2/{server-brgandk4.js → server-vy0beygw.js} +2 -2
- package/dist/v2/{server-fzgyvsb1.js → server-y14pawe1.js} +3 -0
- package/dist/v2/{server-8pdfmc27.js → server-y17r5ryz.js} +4 -4
- package/dist/v2/{server-sxfbjdye.js → server-yx0nyj1q.js} +2 -2
- package/dist/v2/server.js +6 -6
- package/dist/v2/{storage-memory-e6a7mb0k.js → storage-memory-hhrvfw0x.js} +2 -2
- package/dist/v2/{storage-tags-xq81zgt2.js → storage-tags-pmw33chf.js} +2 -2
- package/dist/v2/{v2-archive-reader-e2w39c3p.js → v2-archive-reader-gh1jghf7.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-eg5b1p89.js → wrapup-orchestrator-2h7ayss9.js} +24 -24
- package/dist/{v2-archive-reader-8dsngf2j.js → v2-archive-reader-8158kyfd.js} +1 -1
- package/dist/{wrapup-orchestrator-nmk6yf7f.js → wrapup-orchestrator-ct59br0c.js} +24 -24
- package/package.json +1 -1
- package/src/shared/assistant-message-extractor.test.ts +22 -0
- package/src/shared/assistant-message-extractor.ts +13 -0
- package/src/shared/model-suggestion-retry.test.ts +43 -12
- package/src/shared/prompt-async-transport.test.ts +275 -8
- package/src/shared/prompt-async-transport.ts +41 -2
- package/src/shared/recomp-outcome.ts +8 -0
- package/src/shared/reusable-worker.fixture.ts +15 -3
- package/src/shared/reusable-worker.test.ts +20 -10
- package/src/shared/rpc-notifications.ts +4 -1
- package/src/shared/sqlite-foreground-wait.test.ts +2 -2
- package/src/shared/startup-maintenance-policy.test.ts +4 -2
- package/src/shared/storage-permissions-startup.test.ts +296 -6
- package/src/shared/storage-permissions.ts +143 -18
- package/src/shared/user-facing-codes.ts +5 -2
- package/src/tui/dialogs/status-dialog.tsx +3 -0
- package/src/tui/slots/sidebar-content.tsx +6 -2
- package/src/tui-compiled/dialogs/status-dialog.tsx +12 -0
- package/src/tui-compiled/slots/sidebar-content.tsx +7 -2
|
@@ -3,18 +3,19 @@ import {
|
|
|
3
3
|
} from "./index-ywrz4wy2.js";
|
|
4
4
|
import {
|
|
5
5
|
clearEmergencyRecovery
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-60wnwcwz.js";
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-h9hybzr5.js";
|
|
11
11
|
import {
|
|
12
|
+
pausedRecompReason,
|
|
12
13
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
14
|
+
} from "./index-q7msfgwz.js";
|
|
14
15
|
import {
|
|
15
16
|
renderUserFacingFailure,
|
|
16
17
|
userFacingFailureCode
|
|
17
|
-
} from "./index-
|
|
18
|
+
} from "./index-39rzef89.js";
|
|
18
19
|
|
|
19
20
|
// src/hooks/magic-context/recomp-orchestrator.ts
|
|
20
21
|
function resolveLiveModelKey(liveSessionState, sessionId) {
|
|
@@ -22,7 +23,7 @@ function resolveLiveModelKey(liveSessionState, sessionId) {
|
|
|
22
23
|
return model ? `${model.providerID}/${model.modelID}` : undefined;
|
|
23
24
|
}
|
|
24
25
|
function isRecompFailure2(message) {
|
|
25
|
-
return /—\s*(Failed|Skipped)/.test(message);
|
|
26
|
+
return /—\s*(Failed|Skipped|Paused)/.test(message);
|
|
26
27
|
}
|
|
27
28
|
function isRecompSkip2(message) {
|
|
28
29
|
return /—\s*Skipped|already mutating compartment state|already running/i.test(message);
|
|
@@ -129,7 +130,7 @@ async function runManagedRecomp2(ctx, sessionId, options) {
|
|
|
129
130
|
clearEmergencyRecovery(ctx.db, sessionId);
|
|
130
131
|
} catch {}
|
|
131
132
|
}
|
|
132
|
-
setRecompTerminal2(ctx.liveSessionState, sessionId, terminalPhase, extractRecompReason2(message));
|
|
133
|
+
setRecompTerminal2(ctx.liveSessionState, sessionId, terminalPhase, pausedRecompReason(message) === null ? extractRecompReason2(message) : message);
|
|
133
134
|
return message;
|
|
134
135
|
} catch (error) {
|
|
135
136
|
const failure = renderUserFacingFailure("recomp_unavailable");
|
|
@@ -72,6 +72,41 @@ function getMemoryEmbedCoverage(db, projectPath, modelId) {
|
|
|
72
72
|
var DEFAULT_EMBEDDING_CACHE_TTL_MS = 60000;
|
|
73
73
|
var projectEmbeddingCache = new Map;
|
|
74
74
|
var embeddingCacheTtlMs = DEFAULT_EMBEDDING_CACHE_TTL_MS;
|
|
75
|
+
var keptWorkerCaches = new WeakMap;
|
|
76
|
+
function keepWorkerMemoryEmbeddings2(db) {
|
|
77
|
+
keptWorkerCaches.set(db, {
|
|
78
|
+
entries: new Map,
|
|
79
|
+
lastBackgroundReloadAt: -Infinity
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function readDataVersion(db, cache) {
|
|
83
|
+
cache.version ??= db.prepare("PRAGMA data_version");
|
|
84
|
+
return Number(cache.version.get().data_version);
|
|
85
|
+
}
|
|
86
|
+
function loadKeptWorkerEntry(db, cache, projectPath, modelId, version, loadedAt) {
|
|
87
|
+
const embeddings = loadAllEmbeddings(db, projectPath, modelId);
|
|
88
|
+
cache.entries.set(projectPath, {
|
|
89
|
+
projectPath,
|
|
90
|
+
modelId,
|
|
91
|
+
version,
|
|
92
|
+
loadedAt,
|
|
93
|
+
embeddings
|
|
94
|
+
});
|
|
95
|
+
return embeddings;
|
|
96
|
+
}
|
|
97
|
+
function maintainKeptWorkerMemoryEmbeddings2(db) {
|
|
98
|
+
const cache = keptWorkerCaches.get(db);
|
|
99
|
+
const now = Date.now();
|
|
100
|
+
if (!cache?.entries.size || now - cache.lastBackgroundReloadAt < DEFAULT_EMBEDDING_CACHE_TTL_MS)
|
|
101
|
+
return;
|
|
102
|
+
const version = readDataVersion(db, cache);
|
|
103
|
+
for (const entry of cache.entries.values()) {
|
|
104
|
+
if (entry.version === version || now - entry.loadedAt < DEFAULT_EMBEDDING_CACHE_TTL_MS)
|
|
105
|
+
continue;
|
|
106
|
+
cache.lastBackgroundReloadAt = now;
|
|
107
|
+
loadKeptWorkerEntry(db, cache, entry.projectPath, entry.modelId, version, now);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
75
110
|
function cacheKey(projectPath, modelId) {
|
|
76
111
|
return `${projectPath}\x00${modelId}`;
|
|
77
112
|
}
|
|
@@ -87,6 +122,18 @@ function getValidCacheEntry(projectPath, modelId) {
|
|
|
87
122
|
return entry;
|
|
88
123
|
}
|
|
89
124
|
function getProjectEmbeddings2(db, projectPath, modelId) {
|
|
125
|
+
const kept = keptWorkerCaches.get(db);
|
|
126
|
+
if (kept) {
|
|
127
|
+
const now = Date.now();
|
|
128
|
+
const cached = kept.entries.get(projectPath);
|
|
129
|
+
const entry = cached?.modelId === modelId ? cached : undefined;
|
|
130
|
+
if (entry && now - entry.loadedAt < DEFAULT_EMBEDDING_CACHE_TTL_MS)
|
|
131
|
+
return entry.embeddings;
|
|
132
|
+
const version = readDataVersion(db, kept);
|
|
133
|
+
if (entry?.version === version)
|
|
134
|
+
return entry.embeddings;
|
|
135
|
+
return loadKeptWorkerEntry(db, kept, projectPath, modelId, version, now);
|
|
136
|
+
}
|
|
90
137
|
const cached = getValidCacheEntry(projectPath, modelId);
|
|
91
138
|
if (cached) {
|
|
92
139
|
return cached.embeddings;
|
|
@@ -128,4 +175,4 @@ function setEmbeddingCacheTtlForTests2(ttlMs) {
|
|
|
128
175
|
embeddingCacheTtlMs = Math.max(0, Math.floor(ttlMs));
|
|
129
176
|
}
|
|
130
177
|
|
|
131
|
-
export { saveEmbeddingIfHashMatches, getMemoryEmbedCoverage, getProjectEmbeddings2, peekProjectEmbeddings2, invalidateProject2, invalidateMemory2, resetEmbeddingCacheForTests2, setEmbeddingCacheTtlForTests2 };
|
|
178
|
+
export { saveEmbeddingIfHashMatches, getMemoryEmbedCoverage, keepWorkerMemoryEmbeddings2, maintainKeptWorkerMemoryEmbeddings2, getProjectEmbeddings2, peekProjectEmbeddings2, invalidateProject2, invalidateMemory2, resetEmbeddingCacheForTests2, setEmbeddingCacheTtlForTests2 };
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ensureColumn,
|
|
9
9
|
healAllNullColumns,
|
|
10
10
|
installV95PerfSchema
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-m6dnydf8.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveOpenCodeDbPath,
|
|
14
14
|
openCodeDbPathExists,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
normalizeStoredProjectPath,
|
|
22
22
|
storedPathBelongsToIdentity
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-5pgyqgmx.js";
|
|
24
24
|
import {
|
|
25
25
|
logSlowWriteTransaction
|
|
26
26
|
} from "./index-m0pwswv9.js";
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
readSearchBackfillCursor2,
|
|
11
11
|
writeSearchBackfillCursor2,
|
|
12
12
|
embedItemsWindowBounded2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-2pdgy88n.js";
|
|
14
14
|
import {
|
|
15
15
|
saveEmbeddingIfHashMatches
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-qjwpqvnf.js";
|
|
17
17
|
|
|
18
18
|
// src/features/magic-context/memory/embedding-backfill.ts
|
|
19
19
|
var SEARCH_BACKFILL_LIMIT = 50;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getCompartments,
|
|
10
10
|
getLastCompartmentEndMessage,
|
|
11
11
|
requestPendingMaterialization
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-h9hybzr5.js";
|
|
13
13
|
import {
|
|
14
14
|
inRootAsyncContext2
|
|
15
15
|
} from "./index-gzy5w8ya.js";
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
releaseWrapupInProgress,
|
|
21
21
|
getHistorianFailureState,
|
|
22
22
|
clearEmergencyRecovery
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-60wnwcwz.js";
|
|
24
24
|
import {
|
|
25
25
|
prepareRawSessionOrdinals2
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-2qsca7h7.js";
|
|
27
27
|
import {
|
|
28
28
|
pushNotification2
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-y14pawe1.js";
|
|
30
30
|
import {
|
|
31
31
|
describeBoundaryDiagnostics,
|
|
32
32
|
resolveWrapupProtectedTailBoundary,
|
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
getActiveCompartmentRun,
|
|
36
36
|
markActiveCompartmentRunPublished,
|
|
37
37
|
registerActiveCompartmentRun
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-q7msfgwz.js";
|
|
39
39
|
import {
|
|
40
40
|
sendStatusNotification2
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-6zewd2n5.js";
|
|
42
42
|
import {
|
|
43
43
|
setRecompStarting2,
|
|
44
44
|
setRecompTerminal2
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-qfcjrnpe.js";
|
|
46
46
|
|
|
47
47
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
48
48
|
import * as crypto from "node:crypto";
|
|
@@ -17,13 +17,16 @@ function notificationMatchesSink(notification, sink) {
|
|
|
17
17
|
}
|
|
18
18
|
function pushLiveNotification2(type, payload, sessionId) {
|
|
19
19
|
const notification = { id: nextNotificationId++, type, payload, sessionId };
|
|
20
|
+
let delivered = false;
|
|
20
21
|
for (const sink of sinks) {
|
|
21
22
|
if (sink.sessionId !== sessionId)
|
|
22
23
|
continue;
|
|
23
24
|
try {
|
|
24
25
|
sink.send(notification);
|
|
26
|
+
delivered = true;
|
|
25
27
|
} catch {}
|
|
26
28
|
}
|
|
29
|
+
return delivered;
|
|
27
30
|
}
|
|
28
31
|
function pushNotification2(type, payload, sessionId, options) {
|
|
29
32
|
const notification = { id: nextNotificationId++, type, payload, sessionId };
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./index-q7q6qp1f.js";
|
|
17
17
|
import {
|
|
18
18
|
scheduleAfterBootQuiet
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-5pgyqgmx.js";
|
|
20
20
|
import {
|
|
21
21
|
cleanSearchText,
|
|
22
22
|
hintKeywordRelevance,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
clearIndexedMessages,
|
|
29
29
|
indexSingleMessage,
|
|
30
30
|
indexMessagesAfterOrdinal
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-chpzb6xy.js";
|
|
32
32
|
|
|
33
33
|
// src/features/magic-context/message-index-async.ts
|
|
34
34
|
var indexCancellations = new Map;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAuHvE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAojCpC,QAAA,MAAM,MAAM,EAAE,YAAY,GAAG;IAAE,KAAK,EAAE,OAAO,KAAK,CAAA;CAIjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
recordToolParameters,
|
|
5
5
|
createDroppedInputToolExecuteBeforeHook,
|
|
6
6
|
readRawSessionMessages2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-2qsca7h7.js";
|
|
8
8
|
import {
|
|
9
9
|
setHarness2
|
|
10
10
|
} from "./index-pavzsdc6.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
checkCompactionMarkerConsistency,
|
|
59
59
|
clearInjectionCache,
|
|
60
60
|
clearNoteNudgeTriggerOnly
|
|
61
|
-
} from "./index-
|
|
61
|
+
} from "./index-q7msfgwz.js";
|
|
62
62
|
import"./index-sd3egckz.js";
|
|
63
63
|
import"./index-gqf8r04r.js";
|
|
64
64
|
import {
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
ensureStorageDirectorySync,
|
|
67
67
|
writeStorageFileSync,
|
|
68
68
|
writeStorageFileAtomicSync
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-5df2fw5b.js";
|
|
70
70
|
import {
|
|
71
71
|
hasTrustedAbsoluteWall,
|
|
72
72
|
refreshModelLimitsFromApi,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
deriveHistorianChunkTokens2,
|
|
76
76
|
resolveKnownHistorianContextLimit2,
|
|
77
77
|
resolveHistorianContextLimit2
|
|
78
|
-
} from "./index-
|
|
78
|
+
} from "./index-xsqw8kbd.js";
|
|
79
79
|
import {
|
|
80
80
|
buildDreamTaskRuntimeConfigs2,
|
|
81
81
|
userMemoryCollectionEnabled2,
|
|
@@ -96,16 +96,6 @@ import {
|
|
|
96
96
|
startDreamScheduleTimer,
|
|
97
97
|
createDreamTimerModuleClient,
|
|
98
98
|
ensureProjectRegisteredFromOpenCodeDirectory,
|
|
99
|
-
recordOpenCodeProvenInputFloor,
|
|
100
|
-
resolveOpenCodeProvenInputFloor,
|
|
101
|
-
resolveContextWindowGeometry,
|
|
102
|
-
resolveContextLimit,
|
|
103
|
-
WRAPUP_WINDOW_UNAVAILABLE,
|
|
104
|
-
resolveOpenCodeWrapupWindow,
|
|
105
|
-
resolveExecuteThresholdDetail,
|
|
106
|
-
resolveModelKey,
|
|
107
|
-
resolveSessionId,
|
|
108
|
-
createScheduler,
|
|
109
99
|
describeStorageUnavailability,
|
|
110
100
|
resolveSessionCacheTtl,
|
|
111
101
|
runEmbedHistoryDrain,
|
|
@@ -130,6 +120,7 @@ import {
|
|
|
130
120
|
clearTransformDecisionSession,
|
|
131
121
|
scheduleOpenCodeTransformDecisionWrite,
|
|
132
122
|
maybeDeliverChannel2,
|
|
123
|
+
StorageBusyRefusalError,
|
|
133
124
|
rustWrapupHistorianFields,
|
|
134
125
|
clearMessageTokensCache,
|
|
135
126
|
createTransform,
|
|
@@ -152,7 +143,7 @@ import {
|
|
|
152
143
|
parameterDescriptionsFor,
|
|
153
144
|
MagicContextRpcServer,
|
|
154
145
|
applyHiddenSubagentTemperature
|
|
155
|
-
} from "./index-
|
|
146
|
+
} from "./index-n1ty0vd3.js";
|
|
156
147
|
import {
|
|
157
148
|
resolveOpenCodeDbPath,
|
|
158
149
|
openCodeDbPathExists,
|
|
@@ -179,13 +170,13 @@ import {
|
|
|
179
170
|
beginBootQuietPeriod,
|
|
180
171
|
bootQuietRemainingMs,
|
|
181
172
|
scheduleAfterBootQuiet
|
|
182
|
-
} from "./index-
|
|
173
|
+
} from "./index-5pgyqgmx.js";
|
|
183
174
|
import {
|
|
184
175
|
BoundedSessionMap,
|
|
185
176
|
deleteTemporalDecision,
|
|
186
177
|
recordToolDefinition,
|
|
187
178
|
getCurrentToolSetHash
|
|
188
|
-
} from "./index-
|
|
179
|
+
} from "./index-m6dnydf8.js";
|
|
189
180
|
import {
|
|
190
181
|
observeSessionActivity,
|
|
191
182
|
backfillSessionActivity,
|
|
@@ -204,10 +195,10 @@ import {
|
|
|
204
195
|
dropServedRecord,
|
|
205
196
|
registerLkgPersistence,
|
|
206
197
|
dropSlot
|
|
207
|
-
} from "./index-
|
|
198
|
+
} from "./index-h9hybzr5.js";
|
|
208
199
|
import {
|
|
209
200
|
recordSessionProjectIdentity
|
|
210
|
-
} from "./index-
|
|
201
|
+
} from "./index-r4y0dczp.js";
|
|
211
202
|
import"./index-fb3zxn06.js";
|
|
212
203
|
import {
|
|
213
204
|
startBootDeadline,
|
|
@@ -218,7 +209,7 @@ import {
|
|
|
218
209
|
openDatabaseAsync,
|
|
219
210
|
isDatabasePersisted,
|
|
220
211
|
getDatabasePersistenceError
|
|
221
|
-
} from "./index-
|
|
212
|
+
} from "./index-mrjat4eq.js";
|
|
222
213
|
import {
|
|
223
214
|
registerExitAbort,
|
|
224
215
|
unregisterExitAbort
|
|
@@ -229,7 +220,7 @@ import {
|
|
|
229
220
|
forgetRawSessionOrdinalWatermark2
|
|
230
221
|
} from "./index-q7q6qp1f.js";
|
|
231
222
|
import"./index-s32f8y67.js";
|
|
232
|
-
import"./index-
|
|
223
|
+
import"./index-tt0vs4x5.js";
|
|
233
224
|
import"./index-fr0wbhdn.js";
|
|
234
225
|
import {
|
|
235
226
|
preloadTokenizer
|
|
@@ -238,7 +229,7 @@ import"./index-pxnzyvjc.js";
|
|
|
238
229
|
import {
|
|
239
230
|
getDefaultSubcConnectionFile,
|
|
240
231
|
SubcModuleTransport
|
|
241
|
-
} from "./index-
|
|
232
|
+
} from "./index-dk3hy2a2.js";
|
|
242
233
|
import"./index-qt1qqasc.js";
|
|
243
234
|
import"./index-e6ncz7a6.js";
|
|
244
235
|
import {
|
|
@@ -249,7 +240,7 @@ import {
|
|
|
249
240
|
import {
|
|
250
241
|
sendCommandResult2,
|
|
251
242
|
sendStatusNotification2
|
|
252
|
-
} from "./index-
|
|
243
|
+
} from "./index-6zewd2n5.js";
|
|
253
244
|
import {
|
|
254
245
|
detectConflicts,
|
|
255
246
|
resolveCompactionForBoot
|
|
@@ -257,7 +248,7 @@ import {
|
|
|
257
248
|
import {
|
|
258
249
|
sendConflictWarning2,
|
|
259
250
|
cleanupConflictWarnings2
|
|
260
|
-
} from "./index-
|
|
251
|
+
} from "./index-83qd3n7s.js";
|
|
261
252
|
import"./index-1zx87sdm.js";
|
|
262
253
|
import {
|
|
263
254
|
stripPersistedAssistantText,
|
|
@@ -288,7 +279,7 @@ import {
|
|
|
288
279
|
isAnthropicFamilyRoute,
|
|
289
280
|
deleteTagsByMessageId2,
|
|
290
281
|
getMaxTagNumberBySession2
|
|
291
|
-
} from "./index-
|
|
282
|
+
} from "./index-60wnwcwz.js";
|
|
292
283
|
import {
|
|
293
284
|
resolveHistorianModel2,
|
|
294
285
|
resolveOpenCodeAgentOverrides2,
|
|
@@ -298,25 +289,35 @@ import {
|
|
|
298
289
|
getEmbedDrainUiStatus,
|
|
299
290
|
clearEmbedSessionState
|
|
300
291
|
} from "./index-2amn2s73.js";
|
|
301
|
-
import"./index-
|
|
292
|
+
import"./index-3pdknr07.js";
|
|
302
293
|
import {
|
|
303
294
|
deleteIndexedMessage
|
|
304
|
-
} from "./index-
|
|
295
|
+
} from "./index-chpzb6xy.js";
|
|
305
296
|
import"./index-1y4y98r1.js";
|
|
306
|
-
import"./index-
|
|
297
|
+
import"./index-61knrt52.js";
|
|
307
298
|
import {
|
|
308
299
|
pushNotification2
|
|
309
|
-
} from "./index-
|
|
310
|
-
import"./index-
|
|
300
|
+
} from "./index-y14pawe1.js";
|
|
301
|
+
import"./index-60x5d68t.js";
|
|
311
302
|
import {
|
|
312
303
|
getEmbeddingCoverageStatus2
|
|
313
|
-
} from "./index-
|
|
314
|
-
import"./index-
|
|
315
|
-
import"./index-
|
|
316
|
-
import"./index-
|
|
317
|
-
import"./index-
|
|
304
|
+
} from "./index-2pdgy88n.js";
|
|
305
|
+
import"./index-qjwpqvnf.js";
|
|
306
|
+
import"./index-39rzef89.js";
|
|
307
|
+
import"./index-w51n3576.js";
|
|
308
|
+
import"./index-9emdjcb5.js";
|
|
318
309
|
import"./index-832w615x.js";
|
|
319
310
|
import {
|
|
311
|
+
recordOpenCodeProvenInputFloor,
|
|
312
|
+
resolveOpenCodeProvenInputFloor,
|
|
313
|
+
resolveContextWindowGeometry,
|
|
314
|
+
resolveContextLimit,
|
|
315
|
+
WRAPUP_WINDOW_UNAVAILABLE,
|
|
316
|
+
resolveOpenCodeWrapupWindow,
|
|
317
|
+
resolveExecuteThresholdDetail,
|
|
318
|
+
resolveModelKey,
|
|
319
|
+
resolveSessionId,
|
|
320
|
+
createScheduler,
|
|
320
321
|
createTagger,
|
|
321
322
|
cavemanWordRulesForLanguage,
|
|
322
323
|
setCtxReduceRegisteredGlobally,
|
|
@@ -325,25 +326,25 @@ import {
|
|
|
325
326
|
armBindingRecoverySafely,
|
|
326
327
|
collectForeignTextParts,
|
|
327
328
|
resetDegradedCacheCount2
|
|
328
|
-
} from "./index-
|
|
329
|
+
} from "./index-g0mb2kb4.js";
|
|
329
330
|
import {
|
|
330
331
|
scheduleClearAndReindex
|
|
331
|
-
} from "./index-
|
|
332
|
+
} from "./index-zxhev8ze.js";
|
|
332
333
|
import {
|
|
333
334
|
runManagedRecomp2
|
|
334
|
-
} from "./index-
|
|
335
|
+
} from "./index-qfcjrnpe.js";
|
|
335
336
|
import {
|
|
336
337
|
isValidSemver,
|
|
337
338
|
compareSemverCore
|
|
338
|
-
} from "./index-
|
|
339
|
+
} from "./index-cr483vx6.js";
|
|
339
340
|
import"./index-fmsr7v69.js";
|
|
340
341
|
import {
|
|
341
342
|
runManagedWrapup2
|
|
342
|
-
} from "./index-
|
|
343
|
-
import"./index-
|
|
343
|
+
} from "./index-wmb2mcdw.js";
|
|
344
|
+
import"./index-78t37mcq.js";
|
|
344
345
|
import"./index-52x68mj4.js";
|
|
345
|
-
import"./index-
|
|
346
|
-
import"./index-
|
|
346
|
+
import"./index-jzfsnbmm.js";
|
|
347
|
+
import"./index-9d3qgwq0.js";
|
|
347
348
|
import {
|
|
348
349
|
isDreamerRunnable,
|
|
349
350
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8205,7 +8206,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8205
8206
|
// package.json
|
|
8206
8207
|
var package_default = {
|
|
8207
8208
|
name: "@cortexkit/opencode-magic-context",
|
|
8208
|
-
version: "0.49.
|
|
8209
|
+
version: "0.49.89",
|
|
8209
8210
|
type: "module",
|
|
8210
8211
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8211
8212
|
main: "dist/index.js",
|
|
@@ -11820,6 +11821,21 @@ function disableNativeAutoCompaction(config) {
|
|
|
11820
11821
|
return true;
|
|
11821
11822
|
}
|
|
11822
11823
|
|
|
11824
|
+
// src/plugin/refusal-notice.ts
|
|
11825
|
+
async function sendOpenCodeRefusal(client, sessionId, message, refusal) {
|
|
11826
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-gzxz88vq.js"));
|
|
11827
|
+
const storageBusy = refusal instanceof StorageBusyRefusalError;
|
|
11828
|
+
const toast = { toastDurationMs: 15000 };
|
|
11829
|
+
const delivery = await sendStatusNotification(client, sessionId, message, storageBusy ? toast : { ...toast, toastTitle: "Magic Context", toastVariant: "error", liveOnly: true });
|
|
11830
|
+
if (delivery === "skipped") {
|
|
11831
|
+
sessionLog2(sessionId, "refusal notice skipped: no terminal viewing the session", refusal.name);
|
|
11832
|
+
}
|
|
11833
|
+
if (storageBusy) {
|
|
11834
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-34k1zwsy.js"));
|
|
11835
|
+
await abortSessionFailClosed(client, sessionId);
|
|
11836
|
+
}
|
|
11837
|
+
}
|
|
11838
|
+
|
|
11823
11839
|
// src/plugin/stale-build-notice.ts
|
|
11824
11840
|
function bindStaleBuildNotice(client, moduleUrl, harness = "opencode") {
|
|
11825
11841
|
registerStalePluginBuildHost({
|
|
@@ -12085,7 +12101,7 @@ async function setup(context) {
|
|
|
12085
12101
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12086
12102
|
log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
|
|
12087
12103
|
}
|
|
12088
|
-
const { registerContext } = await import("./context-
|
|
12104
|
+
const { registerContext } = await import("./context-grdg1k2k.js");
|
|
12089
12105
|
setHarness2("opencode2");
|
|
12090
12106
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12091
12107
|
const duties = await registerContext(context);
|
|
@@ -12164,7 +12180,7 @@ var server = async (ctx) => {
|
|
|
12164
12180
|
if (hasBannerEntries)
|
|
12165
12181
|
setTimeout(async () => {
|
|
12166
12182
|
try {
|
|
12167
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12183
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-gzxz88vq.js"));
|
|
12168
12184
|
const clientWithSessions = ctx.client;
|
|
12169
12185
|
const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
|
|
12170
12186
|
const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
|
|
@@ -12182,7 +12198,7 @@ var server = async (ctx) => {
|
|
|
12182
12198
|
log2(`[magic-context] opencode_db_missing path=${openCodeDbResolution.path} source=${openCodeDbResolution.source}`);
|
|
12183
12199
|
setTimeout(async () => {
|
|
12184
12200
|
try {
|
|
12185
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12201
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-gzxz88vq.js"));
|
|
12186
12202
|
const clientWithSessions = ctx.client;
|
|
12187
12203
|
const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
|
|
12188
12204
|
const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
|
|
@@ -12455,12 +12471,12 @@ var server = async (ctx) => {
|
|
|
12455
12471
|
{
|
|
12456
12472
|
const fence = getSchemaFenceRejection();
|
|
12457
12473
|
if (fence) {
|
|
12458
|
-
importPluginModule(() => import("./conflict-warning-hook-
|
|
12474
|
+
importPluginModule(() => import("./conflict-warning-hook-kbq6ppjf.js")).then(({ sendSchemaFenceWarning }) => sendSchemaFenceWarning(ctx.client, ctx.directory, fence)).catch((error) => log2("[magic-context] schema-fence warning unavailable:", error));
|
|
12459
12475
|
}
|
|
12460
12476
|
}
|
|
12461
12477
|
const serverUrl = ctx.serverUrl;
|
|
12462
12478
|
const serverUrlStr = serverUrl instanceof URL ? serverUrl.toString().replace(/\/$/, "") : typeof serverUrl === "string" ? serverUrl.replace(/\/$/, "") : undefined;
|
|
12463
|
-
importPluginModule(() => import("./send-session-notification-
|
|
12479
|
+
importPluginModule(() => import("./send-session-notification-gzxz88vq.js")).then(({ setNotificationServerUrl }) => {
|
|
12464
12480
|
setNotificationServerUrl(serverUrlStr);
|
|
12465
12481
|
}).catch((error) => log2("[magic-context] notification transport unavailable:", error));
|
|
12466
12482
|
if (conflictResult?.hasConflict) {
|
|
@@ -12474,7 +12490,7 @@ var server = async (ctx) => {
|
|
|
12474
12490
|
}
|
|
12475
12491
|
if (pluginConfig.enabled && !conflictResult?.hasConflict) {
|
|
12476
12492
|
setTimeout(() => {
|
|
12477
|
-
importPluginModule(() => import("./announcement-
|
|
12493
|
+
importPluginModule(() => import("./announcement-4ynkaf0d.js")).then(({
|
|
12478
12494
|
shouldShowAnnouncement,
|
|
12479
12495
|
ANNOUNCEMENT_VERSION,
|
|
12480
12496
|
ANNOUNCEMENT_FEATURES,
|
|
@@ -12483,7 +12499,7 @@ var server = async (ctx) => {
|
|
|
12483
12499
|
}) => {
|
|
12484
12500
|
if (!shouldShowAnnouncement())
|
|
12485
12501
|
return;
|
|
12486
|
-
return importPluginModule(() => import("./conflict-warning-hook-
|
|
12502
|
+
return importPluginModule(() => import("./conflict-warning-hook-kbq6ppjf.js")).then(({ sendStartupAnnouncement }) => sendStartupAnnouncement(ctx.client, ctx.directory, ANNOUNCEMENT_VERSION, ANNOUNCEMENT_FEATURES, ANNOUNCEMENT_FOOTER, markAnnouncementSeen));
|
|
12487
12503
|
}).catch(() => {});
|
|
12488
12504
|
}, 8000);
|
|
12489
12505
|
}
|
|
@@ -12556,14 +12572,7 @@ var server = async (ctx) => {
|
|
|
12556
12572
|
internalChildSessions: liveSessionState.internalChildSessions,
|
|
12557
12573
|
tryReopenStorage,
|
|
12558
12574
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12559
|
-
|
|
12560
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-7x518gew.js"));
|
|
12561
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-t99yj9vt.js"));
|
|
12562
|
-
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12563
|
-
toastDurationMs: 15000
|
|
12564
|
-
});
|
|
12565
|
-
await abortSessionFailClosed(ctx.client, sessionId);
|
|
12566
|
-
}
|
|
12575
|
+
onRefusal: (sessionId, message, refusal) => sendOpenCodeRefusal(ctx.client, sessionId, message, refusal)
|
|
12567
12576
|
}),
|
|
12568
12577
|
"experimental.chat.system.transform": async (input, output) => {
|
|
12569
12578
|
await magicContextRuntime.magicContext?.["experimental.chat.system.transform"]?.(input, output);
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-gzy5w8ya.js";
|
|
6
6
|
import"./index-1zx87sdm.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-60wnwcwz.js";
|
|
8
8
|
import"./index-5vsk2cpp.js";
|
|
9
9
|
import"./index-pavzsdc6.js";
|
|
10
10
|
import"./index-ywrz4wy2.js";
|
|
11
11
|
import"./index-z4p0ry94.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-m6dnydf8.js";
|
|
13
13
|
import"./index-6nqz8hsz.js";
|
|
14
14
|
import"./index-v0p37hm2.js";
|
|
15
15
|
import"./index-96ztjvkn.js";
|
|
@@ -17,7 +17,7 @@ import"./index-1d042x6w.js";
|
|
|
17
17
|
import"./index-q7q6qp1f.js";
|
|
18
18
|
import"./index-58e3y90n.js";
|
|
19
19
|
import"./index-x40zr813.js";
|
|
20
|
-
import"./index-
|
|
20
|
+
import"./index-2qsca7h7.js";
|
|
21
21
|
import {
|
|
22
22
|
MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
23
23
|
messageIndexSkipKey,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
markMessageIndexDirty,
|
|
26
26
|
getIndexableContent,
|
|
27
27
|
indexSingleMessage
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-chpzb6xy.js";
|
|
29
29
|
import"./index-s32f8y67.js";
|
|
30
30
|
import"./index-m0pwswv9.js";
|
|
31
31
|
|
package/dist/migration-worker.js
CHANGED
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
import"./index-fr0wbhdn.js";
|
|
11
11
|
import {
|
|
12
12
|
runMigrationsWithRetry
|
|
13
|
-
} from "./index-
|
|
14
|
-
import"./index-
|
|
13
|
+
} from "./index-tt0vs4x5.js";
|
|
14
|
+
import"./index-m6dnydf8.js";
|
|
15
15
|
import"./index-58e3y90n.js";
|
|
16
16
|
import"./index-gqf8r04r.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
17
|
+
import"./index-5df2fw5b.js";
|
|
18
|
+
import"./index-5pgyqgmx.js";
|
|
19
19
|
import"./index-fb3zxn06.js";
|
|
20
20
|
import {
|
|
21
21
|
setSqlitePragmaConfig,
|
|
22
22
|
initializeDatabase
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-mrjat4eq.js";
|
|
24
24
|
import"./index-wh9fxds5.js";
|
|
25
25
|
import"./index-v0p37hm2.js";
|
|
26
26
|
import"./index-96ztjvkn.js";
|
|
@@ -42,9 +42,8 @@ export declare function tryMessagesTransformLkgReplay(args: {
|
|
|
42
42
|
* Error handling is tiered:
|
|
43
43
|
*
|
|
44
44
|
* - **FailClosedBlockingError / EmergencyFailClosedError / RawFallbackContextLimitError /
|
|
45
|
-
* AssistantTerminalRetryError**: Intentional loud aborts. Rethrown so the
|
|
46
|
-
*
|
|
47
|
-
* provider-rejected raw prompt.
|
|
45
|
+
* AssistantTerminalRetryError**: Intentional loud aborts. Rethrown so the turn does not
|
|
46
|
+
* silently fall through to native compaction or a provider-rejected raw prompt.
|
|
48
47
|
*
|
|
49
48
|
* - **SQLITE_BUSY / SQLITE_LOCKED**: Try validated LKG before backing off on
|
|
50
49
|
* writer acquisition. Replay or refuse; never retry the mutating transform.
|
|
@@ -87,7 +86,7 @@ export declare function createMessagesTransformHandler(args: {
|
|
|
87
86
|
* error it raises is converted to passthrough here.
|
|
88
87
|
*/
|
|
89
88
|
compactionOff?: boolean;
|
|
90
|
-
|
|
89
|
+
onRefusal?: (sessionId: string, message: string, refusal: Error) => Promise<void>;
|
|
91
90
|
/** Fit saved messages against the host's current tools and paired system prompt. */
|
|
92
91
|
replayFits?: (messages: MessageLike[]) => boolean;
|
|
93
92
|
/** Validate and restore host-owned prompt segments before adopting replayed messages. */
|