@cortexkit/opencode-magic-context 0.49.81 → 0.49.82
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/auto-search-worker.js +3 -3
- package/dist/chunk-embedding-write-worker.js +4 -4
- package/dist/{conflict-warning-hook-8s8r0c0v.js → conflict-warning-hook-a0wrnzch.js} +2 -2
- package/dist/{context-359s1ncq.js → context-00f1hdz2.js} +251 -29
- package/dist/{embedding-backfill-0tvprmrn.js → embedding-backfill-k994xdas.js} +4 -4
- package/dist/features/magic-context/memory/identity-merge-command.d.ts +4 -0
- package/dist/features/magic-context/memory/identity-merge-command.d.ts.map +1 -0
- package/dist/features/magic-context/memory/project-binding-notice.d.ts +5 -0
- package/dist/features/magic-context/memory/project-binding-notice.d.ts.map +1 -0
- package/dist/features/magic-context/memory/project-identity.d.ts +1 -0
- package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -1
- package/dist/features/magic-context/storage-clone.d.ts +17 -0
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -1
- package/dist/features/magic-context/store-generation-rebase.d.ts +13 -0
- package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts +1 -7
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/stored-compartment-gaps.d.ts +16 -0
- package/dist/hooks/magic-context/stored-compartment-gaps.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform.d.ts +1 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-m4q6ptgz.js → index-2xhzmwf6.js} +4 -4
- package/dist/{index-jhhkb4jv.js → index-2ygw6q5s.js} +1 -1
- package/dist/{index-v0epndb8.js → index-93rezfvc.js} +22 -2
- package/dist/{index-1rx9bfrk.js → index-b2787fk6.js} +111 -40
- package/dist/{index-tebcx987.js → index-bd34njzg.js} +1 -1
- package/dist/{index-zpd4pxnp.js → index-dg5jvh9r.js} +6 -6
- package/dist/{index-6athgjba.js → index-e21n48yd.js} +34 -2
- package/dist/{index-726b5jh5.js → index-eptthgkw.js} +5 -5
- package/dist/{index-9554nr2q.js → index-fgy6hnr3.js} +6 -1
- package/dist/{index-tzy5h4x6.js → index-fpqdbb67.js} +1 -1
- package/dist/{v2/server-x8a7jmkh.js → index-fzgyvsb1.js} +15 -4
- package/dist/{index-1sq1krqw.js → index-g6hfh4h4.js} +4 -4
- package/dist/{index-wwzamy3j.js → index-hz1xdb15.js} +3 -3
- package/dist/{index-6sckwxjj.js → index-jvr9ba9y.js} +151 -37
- package/dist/{index-m6rkq3t4.js → index-rnyaa7cj.js} +1 -1
- package/dist/{index-yfn52pb6.js → index-shpyv8gq.js} +2 -2
- package/dist/{index-7jefmy0g.js → index-stx8zd81.js} +2 -2
- package/dist/{index-jg7sbt3v.js → index-vpw46557.js} +1 -1
- package/dist/{index-xx05vta0.js → index-w2wpx7t5.js} +1 -1
- package/dist/{index-177yv84k.js → index-w8dcjt7f.js} +1 -1
- package/dist/{index-ma258g0g.js → index-wxxcfpxh.js} +5 -5
- package/dist/{index-xsdaz3mq.js → index-x8qgqnym.js} +30 -11
- package/dist/{index-aawwdt26.js → index-zvane1rq.js} +2 -2
- package/dist/index.js +31 -31
- package/dist/migration-worker.js +3 -3
- package/dist/plugin/rpc-handlers.d.ts +2 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{project-embedding-registry-sw4z2ptg.js → project-embedding-registry-y3z36mjy.js} +3 -3
- package/dist/raw-ordinal-warmup-worker.js +2 -2
- package/dist/{recomp-orchestrator-ar3xw3f4.js → recomp-orchestrator-fjdp3t1d.js} +14 -14
- package/dist/{render-bjxgkrk6.js → render-c9fjwrad.js} +6 -6
- package/dist/{rpc-notifications-3hed126v.js → rpc-notifications-t9q0ynq7.js} +3 -1
- package/dist/{search-z56487n8.js → search-1jejx5cx.js} +9 -9
- package/dist/{search-archive-p3jhx9wc.js → search-archive-s2jas2jb.js} +2 -2
- package/dist/{send-session-notification-ykvt5k2s.js → send-session-notification-7x518gew.js} +1 -1
- package/dist/shared/prompt-surface-runtime.d.ts +1 -1
- package/dist/shared/rpc-notifications.d.ts +8 -3
- package/dist/shared/rpc-notifications.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +4 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/status-summary.d.ts +2 -0
- package/dist/shared/status-summary.d.ts.map +1 -1
- package/dist/shared/status-view-check.d.ts.map +1 -1
- package/dist/shared/status-view.d.ts +1 -0
- package/dist/shared/status-view.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +5 -0
- package/dist/shared/user-facing-codes.d.ts.map +1 -1
- package/dist/{store-8trkpmtx.js → store-ggrq9e14.js} +6 -2
- package/dist/{store-reader-3eh1s1m8.js → store-reader-tr64nxyy.js} +1 -1
- package/dist/tools/ctx-memory/constants.d.ts +1 -1
- package/dist/tools/ctx-memory/constants.d.ts.map +1 -1
- package/dist/tools/light-descriptions.d.ts +1 -1
- package/dist/tools/light-descriptions.d.ts.map +1 -1
- package/dist/tools/parameter-descriptions.d.ts +6 -6
- package/dist/tools/parameter-descriptions.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-6kyqctnq.js → transform-postprocess-phase-p2egg02g.js} +15 -15
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/chunk-embedding-write-worker.js +4 -4
- package/dist/v2/{context-dpe94zcx.js → context-gwkgh0wd.js} +368 -43
- package/dist/v2/{embedding-backfill-qnaswpmb.js → embedding-backfill-hjvjxp7d.js} +4 -4
- package/dist/v2/fork-inheritance.d.ts +25 -17
- package/dist/v2/fork-inheritance.d.ts.map +1 -1
- package/dist/v2/hidden-child-native.d.ts +6 -6
- package/dist/v2/hidden-child-native.d.ts.map +1 -1
- package/dist/v2/hidden-child-record.d.ts +21 -3
- package/dist/v2/hidden-child-record.d.ts.map +1 -1
- package/dist/v2/hidden-child-sweep.d.ts +1 -1
- package/dist/v2/hidden-child-sweep.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts +1 -0
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hidden-run-holder.d.ts +16 -0
- package/dist/v2/hidden-run-holder.d.ts.map +1 -0
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/dream-timer.d.ts +5 -7
- package/dist/v2/hooks/dream-timer.d.ts.map +1 -1
- package/dist/v2/hooks/fork-history-status.d.ts +10 -0
- package/dist/v2/hooks/fork-history-status.d.ts.map +1 -0
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -1
- package/dist/v2/hooks/store.d.ts +4 -0
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/hooks/types.d.ts +5 -26
- package/dist/v2/hooks/types.d.ts.map +1 -1
- package/dist/v2/migration-worker.js +3 -3
- package/dist/v2/{project-embedding-registry-52f2jept.js → project-embedding-registry-mzsvyads.js} +3 -3
- package/dist/v2/raw-ordinal-warmup-worker.js +2 -2
- package/dist/v2/{recomp-orchestrator-7t6fkpbb.js → recomp-orchestrator-jn39mxh0.js} +13 -13
- package/dist/v2/{render-hwqk0d8t.js → render-q2aj9bgy.js} +6 -6
- package/dist/v2/{rpc-notifications-3hed126v.js → rpc-notifications-t9q0ynq7.js} +3 -1
- package/dist/v2/{search-eftsvbg7.js → search-9xn6ds9x.js} +8 -8
- package/dist/v2/{search-archive-mdxzvgpm.js → search-archive-fj59gjv1.js} +2 -2
- package/dist/v2/{send-session-notification-8g4r97bp.js → send-session-notification-p52rhjzy.js} +1 -1
- package/dist/v2/{server-ma9jwnas.js → server-1cn3kryt.js} +4 -4
- package/dist/v2/{server-34pvhvxt.js → server-1efjj215.js} +22 -2
- package/dist/v2/{server-jn4pktdk.js → server-2ktxmtbd.js} +1 -1
- package/dist/v2/{server-zw1e3wq5.js → server-2w1rdttn.js} +1 -1
- package/dist/v2/{server-jtq03rkb.js → server-4z964n1c.js} +1 -1
- package/dist/v2/{server-pxdpwycq.js → server-53n8hv5q.js} +6 -6
- package/dist/v2/{server-rbtx6q5v.js → server-569he5mh.js} +1 -1
- package/dist/v2/{server-rthnpmbp.js → server-5yfq912a.js} +34 -2
- package/dist/v2/{server-mhrgymcs.js → server-68q80y27.js} +2 -2
- package/dist/v2/{server-afsz3cmx.js → server-bt546axy.js} +1 -1
- package/dist/v2/{server-dhdn8mwq.js → server-c8mqs0v5.js} +30 -11
- package/dist/{index-x8a7jmkh.js → v2/server-fzgyvsb1.js} +15 -4
- package/dist/v2/{server-76v5y7zm.js → server-g1a0nhtk.js} +2 -2
- package/dist/v2/{server-25qtxt4d.js → server-gx1s06dx.js} +6 -1
- package/dist/v2/{server-x8ksqcw7.js → server-pejjj0nv.js} +1 -1
- package/dist/v2/{server-a1zp7exh.js → server-vt6nj2hn.js} +106 -35
- package/dist/v2/{server-qjff96a6.js → server-wdq85mxj.js} +4 -4
- package/dist/v2/server.js +3 -3
- package/dist/v2/{store-m3zny7q2.js → store-qdgzd38f.js} +6 -2
- package/dist/v2/{store-reader-yaxtdy6f.js → store-reader-83tka051.js} +1 -1
- package/dist/v2/store-reader.d.ts +15 -8
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/tui/index.d.ts +1 -1
- package/dist/v2/tui/index.d.ts.map +1 -1
- package/dist/v2/{v2-archive-reader-p89x05hj.js → v2-archive-reader-9z8z97db.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-c0bwb0wa.js → wrapup-orchestrator-vd5zfp3v.js} +13 -13
- package/dist/{v2-archive-reader-vzmzb245.js → v2-archive-reader-r0xpxsb1.js} +1 -1
- package/dist/{wrapup-orchestrator-548q5y55.js → wrapup-orchestrator-k29zqfp9.js} +15 -15
- package/package.json +1 -1
- package/src/agents/smart-notes-dreamer-gate.golden.json +169 -169
- package/src/shared/prompt-surface-a1-golden.md +8 -7
- package/src/shared/rpc-notifications.test.ts +29 -0
- package/src/shared/rpc-notifications.ts +24 -5
- package/src/shared/rpc-types.ts +4 -0
- package/src/shared/status-summary.ts +9 -1
- package/src/shared/status-view-check.ts +2 -0
- package/src/shared/status-view.test.ts +9 -0
- package/src/shared/status-view.ts +4 -0
- package/src/shared/user-facing-codes.ts +5 -0
- package/src/tui/slots/sidebar-content.tsx +11 -5
- package/src/tui-compiled/slots/sidebar-content.tsx +191 -176
- package/src/v2/tui/index.ts +7 -2
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
enqueueShadowEmbeddingItems2,
|
|
39
39
|
getProjectEmbeddingSnapshot2,
|
|
40
40
|
embedItemsForProject2
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-shpyv8gq.js";
|
|
42
42
|
import {
|
|
43
43
|
recordEmbeddingMeasurement
|
|
44
44
|
} from "./index-2amn2s73.js";
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
sanitizeFtsQuery,
|
|
55
55
|
searchMemoriesFTS,
|
|
56
56
|
searchMemoriesFTSUnion
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-fgy6hnr3.js";
|
|
58
58
|
import {
|
|
59
59
|
ModuleMemoryAuthorityError2,
|
|
60
60
|
getMemoriesByProject2,
|
|
@@ -71,10 +71,10 @@ import {
|
|
|
71
71
|
withMemoryHintContent,
|
|
72
72
|
autoSearchRelevance,
|
|
73
73
|
recordAutoSearchLane
|
|
74
|
-
} from "./index-
|
|
74
|
+
} from "./index-rnyaa7cj.js";
|
|
75
75
|
import {
|
|
76
76
|
ensureMemoryEmbeddings2
|
|
77
|
-
} from "./index-
|
|
77
|
+
} from "./index-w8dcjt7f.js";
|
|
78
78
|
import {
|
|
79
79
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
80
80
|
withMessageFtsSessionFilter
|
|
@@ -88,11 +88,11 @@ import {
|
|
|
88
88
|
expandWorkspaceIdentitySetWithAliases,
|
|
89
89
|
resolveStoredPathWorkspaceIdentity,
|
|
90
90
|
sourceNameForMemory
|
|
91
|
-
} from "./index-
|
|
91
|
+
} from "./index-w2wpx7t5.js";
|
|
92
92
|
import {
|
|
93
93
|
getNotes,
|
|
94
94
|
getActivePrimers
|
|
95
|
-
} from "./index-
|
|
95
|
+
} from "./index-bd34njzg.js";
|
|
96
96
|
import {
|
|
97
97
|
isKnownAutocommit
|
|
98
98
|
} from "./index-8ajstryz.js";
|
|
@@ -439,7 +439,7 @@ class V2StoreReader2 {
|
|
|
439
439
|
const order = columns.has("time_updated") ? "time_updated DESC, id DESC" : "id DESC";
|
|
440
440
|
const page = this.prepare(`SELECT id, COALESCE(directory, '') AS directory FROM session_v2
|
|
441
441
|
WHERE parent_id IS NULL${archived}
|
|
442
|
-
AND COALESCE(json_extract(metadata, '$.magic_context'), '')
|
|
442
|
+
AND COALESCE(json_extract(metadata, '$.magic_context'), '') NOT IN ('hidden-run', 'background-holder')
|
|
443
443
|
ORDER BY ${order} LIMIT ? OFFSET ?`);
|
|
444
444
|
const pageSize = 500;
|
|
445
445
|
for (let offset = 0;; offset += pageSize) {
|
|
@@ -460,7 +460,7 @@ class V2StoreReader2 {
|
|
|
460
460
|
WHERE session_id = session_v2.id AND type = 'user'
|
|
461
461
|
) AS time FROM session_v2
|
|
462
462
|
WHERE parent_id IS NULL
|
|
463
|
-
AND COALESCE(json_extract(metadata, '$.magic_context'), '')
|
|
463
|
+
AND COALESCE(json_extract(metadata, '$.magic_context'), '') NOT IN ('hidden-run', 'background-holder')
|
|
464
464
|
AND id IN (${chunk.map(() => "?").join(",")})`).all(...chunk);
|
|
465
465
|
for (const row of rows)
|
|
466
466
|
if (row.time !== null)
|
|
@@ -746,6 +746,38 @@ class V2StoreReader2 {
|
|
|
746
746
|
return this.prepare(`SELECT id, type, seq, time_created FROM session_message
|
|
747
747
|
WHERE session_id = ? AND seq <= ? ORDER BY seq ASC`).all(sessionID, throughSeq);
|
|
748
748
|
}
|
|
749
|
+
matchingForkBodies(parentID, forkID, throughSeq) {
|
|
750
|
+
const matchParts = this.hasPartTable() ? `
|
|
751
|
+
AND NOT EXISTS (
|
|
752
|
+
SELECT ordinal, type, call_id, data FROM session_part WHERE message_id = p.id
|
|
753
|
+
EXCEPT SELECT ordinal, type, call_id, data FROM session_part WHERE message_id = f.id
|
|
754
|
+
) AND NOT EXISTS (
|
|
755
|
+
SELECT ordinal, type, call_id, data FROM session_part WHERE message_id = f.id
|
|
756
|
+
EXCEPT SELECT ordinal, type, call_id, data FROM session_part WHERE message_id = p.id
|
|
757
|
+
)` : "";
|
|
758
|
+
const rows = this.prepare(`SELECT p.id AS parentId, f.id AS forkId FROM session_message p JOIN session_message f ON f.seq = p.seq
|
|
759
|
+
WHERE p.session_id = ? AND f.session_id = ? AND p.seq <= ?
|
|
760
|
+
AND p.type = f.type AND p.time_created = f.time_created AND p.data = f.data${matchParts}`).all(parentID, forkID, throughSeq);
|
|
761
|
+
return new Map(rows.map(({ parentId, forkId }) => [parentId, forkId]));
|
|
762
|
+
}
|
|
763
|
+
*iterateRawMessageRange(sessionID, from, to) {
|
|
764
|
+
if (!Number.isSafeInteger(from) || !Number.isSafeInteger(to) || from < 1 || to < from)
|
|
765
|
+
return;
|
|
766
|
+
let anchor;
|
|
767
|
+
for (let after = from - 1;after < to; after += 1) {
|
|
768
|
+
const [row] = this.messagePage(sessionID, after, 1, to, anchor);
|
|
769
|
+
if (!row)
|
|
770
|
+
return;
|
|
771
|
+
anchor = { id: row.id, timeCreated: row.time_created ?? 0 };
|
|
772
|
+
yield row;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
messageCountAndNewestId(sessionID) {
|
|
776
|
+
const row = this.prepare(`SELECT COUNT(*) AS count, (
|
|
777
|
+
SELECT id FROM session_message WHERE session_id = ? ORDER BY seq DESC LIMIT 1
|
|
778
|
+
) AS newestId FROM session_message WHERE session_id = ?`).get(sessionID, sessionID);
|
|
779
|
+
return [row.count, row.newestId];
|
|
780
|
+
}
|
|
749
781
|
latestSequenceForIds(sessionID, ids) {
|
|
750
782
|
let latest = -1;
|
|
751
783
|
for (let offset = 0;offset < ids.length; offset += 500) {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getCompartments,
|
|
10
10
|
getLastCompartmentEndMessage,
|
|
11
11
|
requestPendingMaterialization
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-x8qgqnym.js";
|
|
13
13
|
import {
|
|
14
14
|
inRootAsyncContext2
|
|
15
15
|
} from "./index-gzy5w8ya.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./index-2q0t43fy.js";
|
|
27
27
|
import {
|
|
28
28
|
pushNotification2
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-fzgyvsb1.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-b2787fk6.js";
|
|
39
39
|
import {
|
|
40
40
|
sendStatusNotification2
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-g6hfh4h4.js";
|
|
42
42
|
import {
|
|
43
43
|
setRecompStarting2,
|
|
44
44
|
setRecompTerminal2
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-hz1xdb15.js";
|
|
46
46
|
|
|
47
47
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
48
48
|
import * as crypto from "node:crypto";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
OpenAICompatibleEmbeddingProvider,
|
|
23
23
|
embedTextForProject2
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-shpyv8gq.js";
|
|
25
25
|
import {
|
|
26
26
|
saveEmbeddingIfHashMatches
|
|
27
27
|
} from "./index-4dhv7mqz.js";
|
|
@@ -51,6 +51,11 @@ var USER_FACING_FAILURES = {
|
|
|
51
51
|
sentence: "History compression is paused because this session's saved summaries no longer line up with its messages.",
|
|
52
52
|
action: "Run /ctx-recomp to rebuild them."
|
|
53
53
|
},
|
|
54
|
+
fork_history_gap: {
|
|
55
|
+
code: "MC-H09",
|
|
56
|
+
sentence: "This fork's saved history has a gap.",
|
|
57
|
+
action: "Run /ctx-recomp to rebuild its history."
|
|
58
|
+
},
|
|
54
59
|
history_boundary_unresolved: {
|
|
55
60
|
code: "MC-H04",
|
|
56
61
|
sentence: "This request was not sent: it is larger than the model's context window, and Magic Context could not cut the already-summarized history out of it.",
|
|
@@ -737,4 +737,4 @@ function setBootQuietPeriodForTests(startAtMs) {
|
|
|
737
737
|
bootQuietUntilMs = startAtMs === null ? 0 : startAtMs + BOOT_QUIET_MS;
|
|
738
738
|
}
|
|
739
739
|
|
|
740
|
-
export { pruneMissingProjectIdentities, setHomeProjectPermission, shouldSkipHomeProjectMemory, ProjectIdentityError, resolveProjectIdentityStrict, takeDubiousOwnershipProjectIdentityWarning, isUserHomeDirectory, resolveProjectIdentity, directoryHasGitMetadata, describeUnresolvedProjectIdentity, isUsableProjectIdentity, resolveProjectIdentityForSession, normalizeStoredProjectPath, storedPathBelongsToIdentity, beginBootQuietPeriod, bootQuietRemainingMs, scheduleAfterBootQuiet, setBootQuietPeriodForTests };
|
|
740
|
+
export { pruneMissingProjectIdentities, setHomeProjectPermission, shouldSkipHomeProjectMemory, ProjectIdentityError, directoryFallback, resolveProjectIdentityStrict, takeDubiousOwnershipProjectIdentityWarning, isUserHomeDirectory, resolveProjectIdentity, directoryHasGitMetadata, describeUnresolvedProjectIdentity, isUsableProjectIdentity, resolveProjectIdentityForSession, normalizeStoredProjectPath, storedPathBelongsToIdentity, beginBootQuietPeriod, bootQuietRemainingMs, scheduleAfterBootQuiet, setBootQuietPeriodForTests };
|
|
@@ -15,9 +15,20 @@ function notificationMatchesSink(notification, sink) {
|
|
|
15
15
|
return notification.sessionId === sink.sessionId;
|
|
16
16
|
return sink.protocol !== 2;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function pushLiveNotification2(type, payload, sessionId) {
|
|
19
19
|
const notification = { id: nextNotificationId++, type, payload, sessionId };
|
|
20
|
-
|
|
20
|
+
for (const sink of sinks) {
|
|
21
|
+
if (sink.sessionId !== sessionId)
|
|
22
|
+
continue;
|
|
23
|
+
try {
|
|
24
|
+
sink.send(notification);
|
|
25
|
+
} catch {}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function pushNotification2(type, payload, sessionId, options) {
|
|
29
|
+
const notification = { id: nextNotificationId++, type, payload, sessionId };
|
|
30
|
+
if (!options?.liveOnly)
|
|
31
|
+
queue.push(notification);
|
|
21
32
|
for (const sink of sinks) {
|
|
22
33
|
if (!notificationMatchesSink(notification, sink))
|
|
23
34
|
continue;
|
|
@@ -25,7 +36,7 @@ function pushNotification2(type, payload, sessionId) {
|
|
|
25
36
|
sink.send(notification);
|
|
26
37
|
} catch {}
|
|
27
38
|
}
|
|
28
|
-
if (queue.length > 100) {
|
|
39
|
+
if (!options?.liveOnly && queue.length > 100) {
|
|
29
40
|
const reservedIds = new Set;
|
|
30
41
|
const reservedScopes = new Set;
|
|
31
42
|
for (let i = queue.length - 1;i >= 0 && reservedScopes.size < 25; i -= 1) {
|
|
@@ -101,4 +112,4 @@ function isTuiConnected2(sessionId) {
|
|
|
101
112
|
return false;
|
|
102
113
|
}
|
|
103
114
|
|
|
104
|
-
export { registerNotificationSink2, pushNotification2, acknowledgeNotifications2, __resetNotificationStateForTests2, drainNotifications2, isTuiConnected2 };
|
|
115
|
+
export { registerNotificationSink2, pushLiveNotification2, pushNotification2, acknowledgeNotifications2, __resetNotificationStateForTests2, drainNotifications2, isTuiConnected2 };
|
|
@@ -53,11 +53,11 @@ async function trySendTuiToast(sessionId, text, params, forcePersist) {
|
|
|
53
53
|
const message = text.length > 200 ? `${text.slice(0, 200)}…` : text;
|
|
54
54
|
const toastVariant = inferToastVariant(text);
|
|
55
55
|
const duration = params.toastDurationMs ?? 5000;
|
|
56
|
-
const { isTuiConnected: checkTui } = await importPluginModule(() => import("./rpc-notifications-
|
|
56
|
+
const { isTuiConnected: checkTui } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
|
|
57
57
|
if (!checkTui(sessionId))
|
|
58
58
|
return false;
|
|
59
59
|
try {
|
|
60
|
-
const { pushNotification } = await importPluginModule(() => import("./rpc-notifications-
|
|
60
|
+
const { pushNotification } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
|
|
61
61
|
pushNotification("toast", {
|
|
62
62
|
title,
|
|
63
63
|
message,
|
|
@@ -286,7 +286,7 @@ async function sendCommandResult2(client, sessionId, text, params) {
|
|
|
286
286
|
if (shouldHoldIgnoredNotification(sessionId)) {
|
|
287
287
|
return sendIgnoredMessage2(client, sessionId, text, params);
|
|
288
288
|
}
|
|
289
|
-
const { isTuiConnected } = await importPluginModule(() => import("./rpc-notifications-
|
|
289
|
+
const { isTuiConnected } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
|
|
290
290
|
if (isTuiConnected(sessionId))
|
|
291
291
|
return sendIgnoredMessage2(client, sessionId, text, params);
|
|
292
292
|
const session = client?.session;
|
|
@@ -386,7 +386,7 @@ function observeIgnoredNotificationEvent2(event) {
|
|
|
386
386
|
}
|
|
387
387
|
async function sendStatusNotification2(_client, sessionId, text, params) {
|
|
388
388
|
try {
|
|
389
|
-
const { pushNotification } = await importPluginModule(() => import("./rpc-notifications-
|
|
389
|
+
const { pushNotification } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
|
|
390
390
|
pushNotification("toast", {
|
|
391
391
|
title: extractToastTitle(text),
|
|
392
392
|
message: text,
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-x8qgqnym.js";
|
|
11
11
|
import {
|
|
12
12
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-b2787fk6.js";
|
|
14
14
|
import {
|
|
15
15
|
renderUserFacingFailure,
|
|
16
16
|
userFacingFailureCode
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-fgy6hnr3.js";
|
|
18
18
|
|
|
19
19
|
// src/hooks/magic-context/recomp-orchestrator.ts
|
|
20
20
|
function resolveLiveModelKey(liveSessionState, sessionId) {
|