@cortexkit/opencode-magic-context 0.49.97 → 0.49.99
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-8nj2jd87.js → announcement-p2xjv6cp.js} +4 -5
- package/dist/auto-search-worker.js +5 -5
- package/dist/chunk-embedding-write-worker.js +15 -16
- package/dist/{compaction-marker-candidates-a4b0anvv.js → compaction-marker-candidates-2apg7ewt.js} +2 -3
- package/dist/compaction-marker-candidates-worker.js +1 -1
- package/dist/{compartment-chunk-embedding-re2cw7y3.js → compartment-chunk-embedding-gnemmf79.js} +7 -8
- package/dist/{conflict-warning-hook-wcq55y61.js → conflict-warning-hook-x1ynwzwz.js} +7 -8
- package/dist/{context-br04s0b6.js → context-z77a2jpx.js} +377 -60
- package/dist/{derive-budgets-g1sy72e8.js → derive-budgets-vbv0fwsd.js} +4 -5
- package/dist/embedding-backfill-79br4kk6.js +28 -0
- package/dist/embedding-worker-process.js +1 -2
- package/dist/embedding-worker.js +6 -7
- package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-probe.d.ts +10 -9
- package/dist/features/magic-context/memory/embedding-probe.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-response-slots.d.ts +13 -0
- package/dist/features/magic-context/memory/embedding-response-slots.d.ts.map +1 -0
- package/dist/features/magic-context/storage-native-replay.d.ts +2 -0
- package/dist/features/magic-context/storage-native-replay.d.ts.map +1 -1
- package/dist/{history-owner-74826t4n.js → history-owner-8dj31nyf.js} +2 -3
- package/dist/hooks/magic-context/apply-operations.d.ts +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-flush.d.ts +1 -1
- package/dist/hooks/magic-context/execute-flush.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +2 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-tbdy1hk0.js → index-0wj3jr8n.js} +6 -6
- package/dist/{index-j4dcjb8t.js → index-1vv1ka4a.js} +4 -4
- package/dist/{index-zfx7mtqa.js → index-2m3t73wk.js} +1 -1
- package/dist/{index-3fhb0j32.js → index-34xvre52.js} +223 -5
- package/dist/{index-pkxkeezb.js → index-4qc8d9by.js} +17 -17
- package/dist/{index-mmf6e740.js → index-507a56zb.js} +7 -7
- package/dist/{index-qdjxrbnr.js → index-5nf2a14a.js} +52 -45
- package/dist/{index-w9hxgntq.js → index-5xrj3zp4.js} +5 -5
- package/dist/{index-kj4bprep.js → index-61a853ky.js} +4 -4
- package/dist/{index-zmgp0tr6.js → index-74w347am.js} +3 -3
- package/dist/{index-hp46xe93.js → index-8hhmv0ff.js} +6 -6
- package/dist/{index-c205x7xd.js → index-8k9qpyjf.js} +1 -1
- package/dist/{index-tqtpgnhr.js → index-9awtk18w.js} +1 -1
- package/dist/{index-h7kta6cn.js → index-9eqt7755.js} +3 -3
- package/dist/{index-x49x59ar.js → index-9q7wzca8.js} +23 -25
- package/dist/{index-880a24vd.js → index-ab86c21b.js} +1 -1
- package/dist/{index-3n4j5rqc.js → index-abhmtj00.js} +1 -1
- package/dist/{index-tr4ep2ej.js → index-ajmy0v5j.js} +31 -0
- package/dist/{index-dj64gzg5.js → index-cayqdwf9.js} +2 -2
- package/dist/{index-0sqhg9nf.js → index-dnxnj42p.js} +12 -12
- package/dist/{index-0bjj9yf3.js → index-e6s2jpr8.js} +2 -2
- package/dist/{index-8v1brm5n.js → index-em72jhc0.js} +11 -11
- package/dist/{index-910gahfb.js → index-esym6cw4.js} +6 -8
- package/dist/{index-7sdns2ww.js → index-fd3hkyk1.js} +2 -2
- package/dist/{index-fgw241hh.js → index-gcf2x04k.js} +2 -2
- package/dist/{index-89xg64wb.js → index-geph2sa6.js} +2 -2
- package/dist/{index-45qgkg8j.js → index-h1qh9n8b.js} +2 -2
- package/dist/{index-9jvxq5rt.js → index-h1xvt8fw.js} +4 -4
- package/dist/{index-0ve29s6f.js → index-hbqxxb2n.js} +1 -1
- package/dist/{index-dnpcv1rg.js → index-hyvxmz3e.js} +4 -4
- package/dist/{index-hedgz8an.js → index-jsbgw33b.js} +1 -1
- package/dist/{index-mgy7g740.js → index-kjdys7e2.js} +1 -1
- package/dist/{index-e6ay1gez.js → index-mfx7hzyc.js} +2 -2
- package/dist/{index-7m2tnk8q.js → index-mhdavdd4.js} +31 -28
- package/dist/{index-r1d45dsr.js → index-nyjztqyj.js} +3 -3
- package/dist/{index-azkfw78y.js → index-qxzk5s30.js} +1 -1
- package/dist/{index-6mryx739.js → index-t7st85f5.js} +1 -1
- package/dist/{index-89bkkgcn.js → index-tyjx0dwz.js} +4 -4
- package/dist/{index-k34hc455.js → index-vdzd98ry.js} +2 -2
- package/dist/{index-hj78hvhm.js → index-vegw385y.js} +2 -2
- package/dist/{index-w7n7qkpf.js → index-w6kcwhhj.js} +4 -4
- package/dist/{index-xcej5kpt.js → index-xbna9akt.js} +5 -5
- package/dist/{index-cpbr0xvk.js → index-xtv4d4hv.js} +2 -2
- package/dist/{index-zkjx8gq3.js → index-xw608ytx.js} +11 -11
- package/dist/{index-jzrvdqb8.js → index-y5f5yg5a.js} +1 -1
- package/dist/index.js +55 -56
- package/dist/{logger-nmb2508f.js → logger-dgtrf43g.js} +1 -2
- package/dist/{message-fts-rowid-map-vcatdan0.js → message-fts-rowid-map-cfq59g6g.js} +4 -5
- package/dist/{message-index-bounded-abhwe610.js → message-index-bounded-6y7p974x.js} +10 -11
- package/dist/{message-time-backfill-zc5rsvhv.js → message-time-backfill-av870n4c.js} +2 -3
- package/dist/migration-worker.js +12 -13
- package/dist/plugin/rpc-handlers.d.ts +1 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{project-embedding-registry-e566q4bg.js → project-embedding-registry-xy8dcdys.js} +13 -14
- package/dist/raw-ordinal-warmup-worker.js +8 -8
- package/dist/{read-session-chunk-sde0wym3.js → read-session-chunk-9ejnbe07.js} +8 -9
- package/dist/{read-session-raw-trhdgc9z.js → read-session-raw-pgc9gxtn.js} +2 -3
- package/dist/{recomp-orchestrator-dapm3e4v.js → recomp-orchestrator-9k91tkyx.js} +32 -33
- package/dist/render-9712q3gp.js +42 -0
- package/dist/{safe-notification-target-54ns7dv9.js → safe-notification-target-01j8km9e.js} +2 -3
- package/dist/{search-archive-4bbn3ztv.js → search-archive-5jr011gc.js} +11 -12
- package/dist/{search-11aw8wpq.js → search-yhaxy3e6.js} +25 -26
- package/dist/{send-session-notification-gxrj4w1r.js → send-session-notification-tfhs4dbc.js} +5 -6
- package/dist/shared/rpc-types.d.ts +5 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/status-view-check.d.ts.map +1 -1
- package/dist/shared/status-view.d.ts +8 -0
- package/dist/shared/status-view.d.ts.map +1 -1
- package/dist/shared/transcript.d.ts +1 -1
- package/dist/shared/transcript.d.ts.map +1 -1
- package/dist/{storage-tags-jq0c0zsn.js → storage-tags-vd3sgd4s.js} +5 -6
- package/dist/{store-29ksp6vy.js → store-235fjtsn.js} +6 -4
- package/dist/{store-reader-dgh3ssxx.js → store-reader-01e8t5j0.js} +4 -1
- package/dist/{transform-postprocess-phase-1xrjg6be.js → transform-postprocess-phase-mf5js6cs.js} +33 -34
- package/dist/v2/auto-search-worker.js +5 -5
- package/dist/v2/checkpoint-instruction-status.d.ts +13 -0
- package/dist/v2/checkpoint-instruction-status.d.ts.map +1 -0
- package/dist/v2/chunk-embedding-write-worker.js +15 -16
- package/dist/v2/{compaction-marker-candidates-6nypmsr3.js → compaction-marker-candidates-3rxg3f1e.js} +2 -3
- package/dist/v2/compaction-marker-candidates-worker.js +1 -1
- package/dist/v2/{compartment-chunk-embedding-jthtfhcd.js → compartment-chunk-embedding-6v74y2r3.js} +7 -8
- package/dist/v2/{context-43r0mzkp.js → context-4fej2dzv.js} +390 -69
- package/dist/v2/{derive-budgets-wj0q7s7d.js → derive-budgets-9237wmq5.js} +5 -6
- package/dist/v2/embedding-backfill-nhgp8znm.js +28 -0
- package/dist/v2/embedding-worker-process.js +1 -2
- package/dist/v2/embedding-worker.js +6 -7
- package/dist/v2/fold/idle.d.ts +11 -1
- package/dist/v2/fold/idle.d.ts.map +1 -1
- package/dist/v2/fold/instruction-supersession.d.ts +22 -1
- package/dist/v2/fold/instruction-supersession.d.ts.map +1 -1
- package/dist/v2/fold/native-replay-v3.d.ts +1 -0
- package/dist/v2/fold/native-replay-v3.d.ts.map +1 -1
- package/dist/v2/fold/native-replay.d.ts +73 -0
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/{history-owner-8pd5ax3n.js → history-owner-k4gx50a0.js} +2 -3
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{logger-58jfese9.js → logger-0ys28353.js} +1 -2
- package/dist/v2/{message-fts-rowid-map-ax4vk78j.js → message-fts-rowid-map-88x2zbyj.js} +4 -5
- package/dist/v2/{message-index-bounded-qh794qxx.js → message-index-bounded-wj5rs9az.js} +10 -11
- package/dist/v2/{message-time-backfill-yj773saf.js → message-time-backfill-5p4vwd79.js} +2 -3
- package/dist/v2/migration-worker.js +12 -13
- package/dist/v2/{project-embedding-registry-z05xvckg.js → project-embedding-registry-qz9x79kn.js} +13 -14
- package/dist/v2/raw-ordinal-warmup-worker.js +8 -8
- package/dist/v2/{read-session-chunk-8tn2dbn1.js → read-session-chunk-89ep8br4.js} +8 -9
- package/dist/v2/{read-session-raw-ywebck9q.js → read-session-raw-seh1kcvp.js} +2 -3
- package/dist/v2/recomp-orchestrator-9wap1z1d.js +68 -0
- package/dist/v2/render-bzzypsgy.js +42 -0
- package/dist/v2/{safe-notification-target-zrwbh6k7.js → safe-notification-target-3e2rq2ys.js} +2 -3
- package/dist/v2/{search-archive-8zqsf9e6.js → search-archive-4yr4hw2m.js} +11 -12
- package/dist/v2/{search-35cz80x0.js → search-ymm2crs3.js} +24 -25
- package/dist/v2/{send-session-notification-8x146x5y.js → send-session-notification-vtnk598k.js} +5 -6
- package/dist/v2/{server-vj0xbbrc.js → server-0b3ms151.js} +2 -2
- package/dist/v2/{server-r3h4fy4k.js → server-1bks09js.js} +5 -5
- package/dist/v2/{server-nnh81jqy.js → server-2ek9exbe.js} +6 -8
- package/dist/v2/{server-63ree5ns.js → server-2xng77ch.js} +1 -1
- package/dist/v2/{server-2sare4qg.js → server-3mb205v9.js} +4 -4
- package/dist/v2/{server-n34vzyfm.js → server-3qeqa3b6.js} +1 -1
- package/dist/v2/{server-av3p9c8k.js → server-54nc921b.js} +1 -1
- package/dist/v2/{server-2qvnr3t7.js → server-5zx51pm4.js} +1 -1
- package/dist/v2/{server-vsx9tsks.js → server-62t1852h.js} +11 -11
- package/dist/v2/{server-svccj9rd.js → server-6mq43ear.js} +4 -4
- package/dist/v2/{server-1fnsfm3a.js → server-6r3b0re0.js} +24 -26
- package/dist/v2/{server-db91dxwc.js → server-7861dnm3.js} +6 -6
- package/dist/v2/{server-6qax5pds.js → server-7c5p0bh1.js} +2 -2
- package/dist/v2/{server-z5cv5wm5.js → server-7wpw3wc6.js} +31 -28
- package/dist/v2/{server-11ra1pmx.js → server-8xgs110k.js} +4 -4
- package/dist/v2/{server-40vdz8sf.js → server-98xd6j4r.js} +2 -2
- package/dist/v2/{server-k3ntgf6n.js → server-b5eg9ct6.js} +2 -2
- package/dist/v2/{server-2cq3e1c1.js → server-b65sqz7y.js} +4 -4
- package/dist/v2/{server-ganavh75.js → server-bhr92yb4.js} +2 -2
- package/dist/v2/{server-4yrvbnnm.js → server-bzebqckc.js} +2 -2
- package/dist/v2/{server-rt8t6s2a.js → server-cc58mckk.js} +2 -2
- package/dist/v2/{server-xekyjy4w.js → server-d0h1gjz2.js} +6 -6
- package/dist/v2/{server-73bqw5c0.js → server-d46xewmt.js} +1 -1
- package/dist/v2/{server-rr5c0xcg.js → server-d4h86y7v.js} +2 -2
- package/dist/v2/{server-7tj8yzrv.js → server-e14d7ebh.js} +2 -2
- package/dist/v2/{server-gh2w75fn.js → server-e8ybwfv8.js} +3 -3
- package/dist/v2/{server-zemnpv92.js → server-ghk96d57.js} +4 -4
- package/dist/v2/{server-j1gxs1gj.js → server-h95cdc30.js} +1 -1
- package/dist/v2/{server-5t4nzfpt.js → server-j09jx1n9.js} +1 -1
- package/dist/v2/{server-n33hyq9t.js → server-jrs4gny6.js} +2 -2
- package/dist/v2/{server-7h4gwphm.js → server-pqgnjf38.js} +3 -3
- package/dist/v2/{server-379fd3n7.js → server-rbxtp4sm.js} +1 -1
- package/dist/v2/{server-2wz6y46g.js → server-sfffm587.js} +1 -1
- package/dist/v2/{server-bx5k66qc.js → server-vgy98kcd.js} +1 -1
- package/dist/v2/{server-kzrrdjp5.js → server-xc7t2r4k.js} +223 -5
- package/dist/v2/{server-z2nv8jdv.js → server-xn7fpv2b.js} +12 -12
- package/dist/v2/{server-tq523gj6.js → server-yacpgq4s.js} +1 -1
- package/dist/v2/{server-vtkbxzw1.js → server-ysg14rv1.js} +31 -0
- package/dist/v2/{server-qjjky07w.js → server-zedjjdc5.js} +11 -11
- package/dist/v2/server.js +8 -9
- package/dist/v2/{storage-tags-pcenytad.js → storage-tags-8kktww54.js} +5 -6
- package/dist/v2/{store-gx19qc3a.js → store-0kjfynwp.js} +6 -4
- package/dist/v2/{store-reader-qt2msa8z.js → store-reader-w0srb18d.js} +4 -1
- package/dist/v2/store-reader.d.ts +1 -0
- 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-hvdyz30c.js → v2-archive-reader-veyqp15a.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-0d4ceff3.js → wrapup-orchestrator-89cg7p41.js} +33 -34
- package/dist/{v2-archive-reader-qs24chs6.js → v2-archive-reader-3s332fn7.js} +1 -1
- package/dist/wrapup-orchestrator-41rt7etq.js +55 -0
- package/package.json +2 -2
- package/src/shared/rpc-types.ts +6 -0
- package/src/shared/status-view-check.ts +11 -0
- package/src/shared/status-view.ts +24 -1
- package/src/shared/tag-transcript.ts +5 -4
- package/src/shared/test-preload-leak-scan.test.ts +56 -0
- package/src/shared/transcript.ts +1 -1
- package/src/v2/tui/index.ts +8 -1
- package/src/v2/tui/status-dialog-fallback.test.ts +21 -0
- package/dist/embedding-backfill-pdymqbnh.js +0 -29
- package/dist/index-dt7cyqfe.js +0 -223
- package/dist/render-6vmqzcem.js +0 -43
- package/dist/v2/embedding-backfill-16b16m38.js +0 -29
- package/dist/v2/recomp-orchestrator-vzygyqwn.js +0 -69
- package/dist/v2/render-9b5dxp9e.js +0 -43
- package/dist/v2/server-dt7cyqfe.js +0 -223
- package/dist/wrapup-orchestrator-v1mhjw55.js +0 -56
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokens
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-2m3t73wk.js";
|
|
4
4
|
import {
|
|
5
5
|
getHarness2
|
|
6
6
|
} from "./index-pavzsdc6.js";
|
|
7
7
|
import {
|
|
8
|
+
sanitizeDiagnosticText,
|
|
8
9
|
log2
|
|
9
|
-
} from "./index-
|
|
10
|
-
import {
|
|
11
|
-
sanitizeDiagnosticText
|
|
12
|
-
} from "./index-dt7cyqfe.js";
|
|
10
|
+
} from "./index-34xvre52.js";
|
|
13
11
|
import {
|
|
14
12
|
SYNAPSE_DEFAULT_MODEL,
|
|
15
13
|
isSynapseEmbeddingTruncated,
|
|
16
14
|
getSynapseBatchRequestKey,
|
|
17
15
|
SynapseEmbeddingProvider
|
|
18
|
-
} from "./index-
|
|
16
|
+
} from "./index-gcf2x04k.js";
|
|
19
17
|
import {
|
|
20
18
|
inRootAsyncContext2,
|
|
21
19
|
getSqliteDatabasePath2
|
|
@@ -43,7 +41,7 @@ import {
|
|
|
43
41
|
countSessionCompartmentEmbedCoverage2,
|
|
44
42
|
countSessionCompartmentEmbedCoveragePolite2,
|
|
45
43
|
countUnembeddedSessionCompartmentsPolite2
|
|
46
|
-
} from "./index-
|
|
44
|
+
} from "./index-1vv1ka4a.js";
|
|
47
45
|
import {
|
|
48
46
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
49
47
|
} from "./index-r3f85n7y.js";
|
|
@@ -56,7 +54,7 @@ import {
|
|
|
56
54
|
getEmbeddingProviderIdentity,
|
|
57
55
|
dominantEmbeddingFailure,
|
|
58
56
|
LocalEmbeddingProvider
|
|
59
|
-
} from "./index-
|
|
57
|
+
} from "./index-nyjztqyj.js";
|
|
60
58
|
import {
|
|
61
59
|
embedPauseBySession,
|
|
62
60
|
activeEmbeddingSessions,
|
|
@@ -67,7 +65,7 @@ import {
|
|
|
67
65
|
} from "./index-2amn2s73.js";
|
|
68
66
|
import {
|
|
69
67
|
setBootQuietPeriodForTests
|
|
70
|
-
} from "./index-
|
|
68
|
+
} from "./index-vegw385y.js";
|
|
71
69
|
import {
|
|
72
70
|
isEmbeddingHostBusy2
|
|
73
71
|
} from "./index-qt1qqasc.js";
|
|
@@ -78,7 +76,7 @@ import {
|
|
|
78
76
|
acquireGitSweepLease,
|
|
79
77
|
renewGitSweepLease,
|
|
80
78
|
releaseGitSweepLease
|
|
81
|
-
} from "./index-
|
|
79
|
+
} from "./index-fd3hkyk1.js";
|
|
82
80
|
import {
|
|
83
81
|
saveEmbeddingIfHashMatches,
|
|
84
82
|
getMemoryEmbedCoverage,
|
|
@@ -89,7 +87,7 @@ import {
|
|
|
89
87
|
} from "./index-8ajstryz.js";
|
|
90
88
|
import {
|
|
91
89
|
logSlowWriteTransaction
|
|
92
|
-
} from "./index-
|
|
90
|
+
} from "./index-9awtk18w.js";
|
|
93
91
|
|
|
94
92
|
// src/features/magic-context/memory/embedding-openai.ts
|
|
95
93
|
import { createHash } from "node:crypto";
|
|
@@ -124,6 +122,27 @@ async function withQueryEmbeddingDeadline(embed, signal) {
|
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
|
|
125
|
+
// src/features/magic-context/memory/embedding-response-slots.ts
|
|
126
|
+
var INVALID_EMBEDDING_INDEX_MESSAGE = "response data[].index values were missing, duplicated or out of range";
|
|
127
|
+
function responseSlots(items, inputCount) {
|
|
128
|
+
if (items.every((item) => item?.index === undefined)) {
|
|
129
|
+
return items.map((_, position) => position);
|
|
130
|
+
}
|
|
131
|
+
const slots = [];
|
|
132
|
+
const seen = new Set;
|
|
133
|
+
for (const item of items) {
|
|
134
|
+
if (!item || typeof item !== "object")
|
|
135
|
+
return null;
|
|
136
|
+
const index = item.index === undefined ? 0 : item.index;
|
|
137
|
+
if (typeof index !== "number" || !Number.isInteger(index) || index < 0 || index >= inputCount || seen.has(index)) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
seen.add(index);
|
|
141
|
+
slots.push(index);
|
|
142
|
+
}
|
|
143
|
+
return slots;
|
|
144
|
+
}
|
|
145
|
+
|
|
127
146
|
// src/features/magic-context/memory/embedding-ssrf.ts
|
|
128
147
|
var METADATA_HOSTNAMES = new Set(["metadata.google.internal", "metadata.goog"]);
|
|
129
148
|
var IPV6_METADATA_HOSTS = new Set(["fd00:ec2::254"]);
|
|
@@ -178,22 +197,6 @@ function blockedEmbeddingEndpointReason(endpoint) {
|
|
|
178
197
|
}
|
|
179
198
|
|
|
180
199
|
// src/features/magic-context/memory/embedding-openai.ts
|
|
181
|
-
function responseSlots(items, inputCount) {
|
|
182
|
-
if (items.every((item) => item?.index === undefined)) {
|
|
183
|
-
return items.map((_, position) => position);
|
|
184
|
-
}
|
|
185
|
-
const slots = [];
|
|
186
|
-
const seen = new Set;
|
|
187
|
-
for (const item of items) {
|
|
188
|
-
const index = item?.index;
|
|
189
|
-
if (typeof index !== "number" || !Number.isInteger(index) || index < 0 || index >= inputCount || seen.has(index)) {
|
|
190
|
-
return null;
|
|
191
|
-
}
|
|
192
|
-
seen.add(index);
|
|
193
|
-
slots.push(index);
|
|
194
|
-
}
|
|
195
|
-
return slots;
|
|
196
|
-
}
|
|
197
200
|
function capEmbeddingInput(input, maxInputTokens, purpose) {
|
|
198
201
|
const ratio = purpose === "query" ? CHUNK_WINDOW_SAFETY_RATIO2 : 1;
|
|
199
202
|
const budget = Math.max(1, Math.floor(maxInputTokens * ratio));
|
|
@@ -490,7 +493,7 @@ class OpenAICompatibleEmbeddingProvider {
|
|
|
490
493
|
}
|
|
491
494
|
const slots = responseSlots(body.data, texts.length);
|
|
492
495
|
if (!slots) {
|
|
493
|
-
const failure = this.failure("invalid_envelope",
|
|
496
|
+
const failure = this.failure("invalid_envelope", INVALID_EMBEDDING_INDEX_MESSAGE, false);
|
|
494
497
|
log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
|
|
495
498
|
this.recordFailure(requestStartedAt, isProbe, failure);
|
|
496
499
|
return Array.from({ length: texts.length }, () => null);
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-r3f85n7y.js";
|
|
4
4
|
import {
|
|
5
5
|
getSynapseLaneIdentity
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-gcf2x04k.js";
|
|
7
7
|
import {
|
|
8
8
|
getHarness2
|
|
9
9
|
} from "./index-pavzsdc6.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
importPluginModule,
|
|
13
13
|
log2,
|
|
14
14
|
flushLogger2
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-34xvre52.js";
|
|
16
16
|
import {
|
|
17
17
|
inRootAsyncContext2
|
|
18
18
|
} from "./index-gzy5w8ya.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
writeStorageFileAsync,
|
|
23
23
|
writeStorageFileHandleAsync,
|
|
24
24
|
createStorageFileHandleAsync
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-t7st85f5.js";
|
|
26
26
|
import {
|
|
27
27
|
computeNormalizedHash
|
|
28
28
|
} from "./index-2bvekkfy.js";
|
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
removeNestedBlocks,
|
|
7
7
|
hasMeaningfulUserText2,
|
|
8
8
|
extractTexts2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-2m3t73wk.js";
|
|
10
10
|
import {
|
|
11
11
|
cleanUserText2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-8hhmv0ff.js";
|
|
13
13
|
import {
|
|
14
14
|
recordMessageFtsRowid2,
|
|
15
15
|
recordIndexedMessageTime2,
|
|
16
16
|
messageFtsOrdinalRangeIsMapped2,
|
|
17
17
|
deleteUnmappedMessageFtsRows2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-geph2sa6.js";
|
|
19
19
|
import {
|
|
20
20
|
logSlowWriteTransaction
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-9awtk18w.js";
|
|
22
22
|
|
|
23
23
|
// src/features/magic-context/compression-depth-storage.ts
|
|
24
24
|
var incrementDepthStatements = new WeakMap;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./index-pavzsdc6.js";
|
|
5
5
|
import {
|
|
6
6
|
log2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-34xvre52.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveOpenCodeDbPath,
|
|
10
10
|
assertOpenCodeStoreGeneration,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
forgetRawSessionOrdinalWatermark2,
|
|
21
21
|
forgetRawSessionSummaryRows2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-jsbgw33b.js";
|
|
23
23
|
import {
|
|
24
24
|
closeQuietly
|
|
25
25
|
} from "./index-8ajstryz.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getMagicContextStorageDir,
|
|
3
3
|
log2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-34xvre52.js";
|
|
5
5
|
import {
|
|
6
6
|
writeStorageFileAtomicSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-t7st85f5.js";
|
|
8
8
|
import {
|
|
9
9
|
inRootAsyncContext2
|
|
10
10
|
} from "./index-gzy5w8ya.js";
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
tokenCountUsesByteBound,
|
|
11
11
|
estimateTokens,
|
|
12
12
|
createTokenCountMemo
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-2m3t73wk.js";
|
|
14
14
|
import {
|
|
15
15
|
getHarness2
|
|
16
16
|
} from "./index-pavzsdc6.js";
|
|
17
17
|
import {
|
|
18
18
|
sessionLog2
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-34xvre52.js";
|
|
20
20
|
import {
|
|
21
21
|
tagIdentityRevisionKey,
|
|
22
22
|
tagOrderConstraintIndex,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
getToolDefinitionMeasurementSignature,
|
|
26
26
|
getMeasuredToolDefinitionTokens,
|
|
27
27
|
getSessionToolDefinitionTokens
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-xtv4d4hv.js";
|
|
29
29
|
import {
|
|
30
30
|
resolveModelConfigValue,
|
|
31
31
|
DEFAULT_PROTECTED_TOOLS,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
} from "./index-avwt563y.js";
|
|
45
45
|
import {
|
|
46
46
|
logSlowWriteTransaction
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-9awtk18w.js";
|
|
48
48
|
|
|
49
49
|
// src/shared/record-type-guard.ts
|
|
50
50
|
function isRecord(value) {
|
|
@@ -137,11 +137,11 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
137
137
|
{ createV2RecoveryAttachments }
|
|
138
138
|
] = await Promise.all([
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
|
-
import("./store-reader-
|
|
141
|
-
import("./store-
|
|
142
|
-
import("./read-session-chunk-
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
140
|
+
import("./store-reader-01e8t5j0.js"),
|
|
141
|
+
import("./store-235fjtsn.js"),
|
|
142
|
+
import("./read-session-chunk-9ejnbe07.js"),
|
|
143
|
+
import("./render-9712q3gp.js"),
|
|
144
|
+
import("./search-archive-5jr011gc.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./index-gzy5w8ya.js";
|
|
14
14
|
import {
|
|
15
15
|
scheduleAfterBootQuiet
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-vegw385y.js";
|
|
17
17
|
import {
|
|
18
18
|
getHarness2,
|
|
19
19
|
harnessOwnsOpenCodeStore2
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
importPluginModule,
|
|
25
25
|
writeForwardedLogLine2,
|
|
26
26
|
log2
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-34xvre52.js";
|
|
28
28
|
import {
|
|
29
29
|
isOwnRpcServerRecord,
|
|
30
30
|
isPidAlive,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
parseRpcPortFile,
|
|
36
36
|
inspectProcessesAsync,
|
|
37
37
|
inspectWindowsProcessesSync
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-abhmtj00.js";
|
|
39
39
|
import {
|
|
40
40
|
configureContextDatabasePragmas2
|
|
41
41
|
} from "./index-fb3zxn06.js";
|
|
@@ -46,16 +46,16 @@ import {
|
|
|
46
46
|
copyStorageFileSync,
|
|
47
47
|
copyStorageTreeSync,
|
|
48
48
|
tightenStorageTreeSync
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-t7st85f5.js";
|
|
50
50
|
import {
|
|
51
51
|
attachFailClosedBlockingProcessEvidence
|
|
52
|
-
} from "./index-
|
|
52
|
+
} from "./index-8k9qpyjf.js";
|
|
53
53
|
import {
|
|
54
54
|
reuseWorker
|
|
55
55
|
} from "./index-96ztjvkn.js";
|
|
56
56
|
import {
|
|
57
57
|
startMessageFtsRowidMapBackfill2
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-geph2sa6.js";
|
|
59
59
|
import {
|
|
60
60
|
LKG_SLOT_CHUNKS_DDL,
|
|
61
61
|
SESSION_REPLAY_DECISIONS_DDL,
|
|
@@ -65,14 +65,14 @@ import {
|
|
|
65
65
|
hasPendingMigrations,
|
|
66
66
|
getMainThreadMigrationBodyCount,
|
|
67
67
|
runMigrations
|
|
68
|
-
} from "./index-
|
|
68
|
+
} from "./index-hyvxmz3e.js";
|
|
69
69
|
import {
|
|
70
70
|
installTagIdentityRevisionTrigger,
|
|
71
71
|
ensureColumn,
|
|
72
72
|
installV95PerfSchema,
|
|
73
73
|
setDatabase,
|
|
74
74
|
loadToolDefinitionMeasurements
|
|
75
|
-
} from "./index-
|
|
75
|
+
} from "./index-xtv4d4hv.js";
|
|
76
76
|
import {
|
|
77
77
|
resolveOpenCodeDbPath,
|
|
78
78
|
hasV1MessageTables
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
} from "./index-8ajstryz.js";
|
|
86
86
|
import {
|
|
87
87
|
logSlowWriteTransaction
|
|
88
|
-
} from "./index-
|
|
88
|
+
} from "./index-9awtk18w.js";
|
|
89
89
|
|
|
90
90
|
// src/features/magic-context/storage-db.ts
|
|
91
91
|
import {
|
|
@@ -1084,8 +1084,8 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1084
1084
|
state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
|
|
1085
1085
|
if (signal.aborted || !readsOpenCodeStore)
|
|
1086
1086
|
return;
|
|
1087
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1088
|
-
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-
|
|
1087
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-9ejnbe07.js"));
|
|
1088
|
+
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-av870n4c.js"));
|
|
1089
1089
|
if (signal.aborted)
|
|
1090
1090
|
return;
|
|
1091
1091
|
await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
|