@cortexkit/pi-magic-context 0.49.20 → 0.49.22
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 +6 -6
- package/dist/chunk-embedding-write-worker.js +9 -9
- package/dist/{compaction-marker-candidates-fnm47jat.js → compaction-marker-candidates-p1kqkqhq.js} +2 -2
- package/dist/compaction-marker-candidates-worker.js +2 -2
- package/dist/{compartment-chunk-embedding-81qesfjs.js → compartment-chunk-embedding-y01m95c2.js} +5 -5
- package/dist/{embedding-backfill-56e871c6.js → embedding-backfill-2vh6m3bg.js} +11 -11
- package/dist/embedding-worker-process.js +1 -1
- package/dist/embedding-worker.js +4 -4
- package/dist/{index-dzem6gn9.js → index-29nw7n1r.js} +1 -1
- package/dist/{index-jt0g3hn0.js → index-2bx7ge3x.js} +60 -18
- package/dist/{index-hws5f0z9.js → index-2qtx0q6h.js} +213 -4
- package/dist/{index-5vgt1zeh.js → index-3c3ztwgc.js} +2 -2
- package/dist/{index-rgfb753z.js → index-579m1751.js} +2 -2
- package/dist/{index-kqb3d8bs.js → index-5j6vwg4z.js} +148 -11
- package/dist/{index-6kb2xpw7.js → index-6wdwv3a6.js} +1 -1
- package/dist/{index-rfyvax95.js → index-at6py2k3.js} +1 -1
- package/dist/{index-bxmf4dhr.js → index-ccanzg8p.js} +2367 -1243
- package/dist/{index-mtvvhcw4.js → index-dbgg6hsf.js} +24 -10
- package/dist/{index-af9t637y.js → index-ftvm2acc.js} +121 -38
- package/dist/{index-zhwwp8zz.js → index-gqjxy2p7.js} +14 -4
- package/dist/{index-jxjr7kz9.js → index-gwxaz0z5.js} +2 -4
- package/dist/{index-p63nwn5v.js → index-hxp6q5f8.js} +1 -1
- package/dist/{index-qerzchrs.js → index-j3pz3a1b.js} +1 -1
- package/dist/{index-bttctq07.js → index-n8e5e9fp.js} +6 -3
- package/dist/{index-b8am7tns.js → index-pe5gz5c4.js} +4 -4
- package/dist/{index-tb3d9trm.js → index-st4gwt64.js} +1 -1
- package/dist/{index-5n5zxs8e.js → index-vx6f7wff.js} +2 -2
- package/dist/{index-v2epyzbm.js → index-w1twp2kp.js} +9 -7
- package/dist/{index-vdy273xw.js → index-wgmhk91m.js} +10 -4
- package/dist/{index-e19qtjj0.js → index-wqpjhx1p.js} +35 -4
- package/dist/index.js +239 -209
- package/dist/{message-fts-rowid-map-bpexnsdj.js → message-fts-rowid-map-59y476bk.js} +3 -3
- package/dist/{message-index-mvag9crh.js → message-index-3snxf11x.js} +9 -9
- package/dist/{message-index-bounded-d4r3weh0.js → message-index-bounded-4ngt600v.js} +9 -9
- package/dist/{message-time-backfill-kc10yrcj.js → message-time-backfill-e3r8ddh1.js} +1 -1
- package/dist/migration-worker.js +6 -6
- package/dist/{project-embedding-registry-cfrg952x.js → project-embedding-registry-hfyzs654.js} +10 -10
- package/dist/raw-ordinal-warmup-worker.js +8 -8
- package/dist/{read-session-chunk-7g4zvpd8.js → read-session-chunk-5dmc77q2.js} +5 -5
- package/dist/{read-session-raw-0fsjh10f.js → read-session-raw-yxv2fv34.js} +2 -2
- package/dist/{search-archive-qbhp7e89.js → search-archive-3daj5ttc.js} +6 -6
- package/dist/{search-hp4g3g9v.js → search-jhfh3tsj.js} +17 -17
- package/dist/{sqlite-d67n6dtr.js → sqlite-v89bj0yy.js} +7 -1
- package/dist/{storage-memory-9g882j7a.js → storage-memory-0ndn65fm.js} +2 -2
- package/dist/{storage-tags-m2qcp1g2.js → storage-tags-r48vxthe.js} +2 -2
- package/dist/subagent-entry.js +22 -21
- package/dist/tag-snapshot-worker-pi.js +8 -8
- package/package.json +5 -2
|
@@ -24,15 +24,15 @@ var [
|
|
|
24
24
|
{ Database, registerSqliteDiagnosticSink },
|
|
25
25
|
{ log }
|
|
26
26
|
] = await Promise.all([
|
|
27
|
-
import("./embedding-backfill-
|
|
27
|
+
import("./embedding-backfill-2vh6m3bg.js"),
|
|
28
28
|
import("./embedding-cache-7rp4gqzr.js"),
|
|
29
|
-
import("./storage-memory-
|
|
30
|
-
import("./project-embedding-registry-
|
|
31
|
-
import("./search-
|
|
32
|
-
import("./compartment-chunk-embedding-
|
|
29
|
+
import("./storage-memory-0ndn65fm.js"),
|
|
30
|
+
import("./project-embedding-registry-hfyzs654.js"),
|
|
31
|
+
import("./search-jhfh3tsj.js"),
|
|
32
|
+
import("./compartment-chunk-embedding-y01m95c2.js"),
|
|
33
33
|
import("./embedding-activity-ew6dshfd.js"),
|
|
34
34
|
import("./harness-9872e0ym.js"),
|
|
35
|
-
import("./sqlite-
|
|
35
|
+
import("./sqlite-v89bj0yy.js"),
|
|
36
36
|
import("./logger-shetp43v.js")
|
|
37
37
|
]);
|
|
38
38
|
setHarness(input.harness);
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-0h2mkab2.js";
|
|
4
4
|
import {
|
|
5
5
|
Database2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-2qtx0q6h.js";
|
|
7
7
|
import {
|
|
8
8
|
configureContextDatabasePragmas2
|
|
9
9
|
} from "./index-fapenpch.js";
|
|
@@ -13,29 +13,29 @@ import {
|
|
|
13
13
|
} from "./index-54wmg4rj.js";
|
|
14
14
|
import"./index-my0dn413.js";
|
|
15
15
|
import"./index-fgs78jyd.js";
|
|
16
|
-
import"./index-
|
|
16
|
+
import"./index-gwxaz0z5.js";
|
|
17
17
|
import"./index-399p688g.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
18
|
+
import"./index-at6py2k3.js";
|
|
19
|
+
import"./index-579m1751.js";
|
|
20
20
|
import {
|
|
21
21
|
replaceCompartmentChunkEmbeddings2,
|
|
22
22
|
recordChunkEmbedBackoff2,
|
|
23
23
|
loadUnembeddedSessionChunkCandidates2,
|
|
24
24
|
countUnembeddedSessionCompartments2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-vx6f7wff.js";
|
|
26
26
|
import {
|
|
27
27
|
recordSessionProjectIdentity,
|
|
28
28
|
acquireGitSweepLease,
|
|
29
29
|
renewGitSweepLease,
|
|
30
30
|
releaseGitSweepLease
|
|
31
|
-
} from "./index-
|
|
32
|
-
import"./index-
|
|
31
|
+
} from "./index-j3pz3a1b.js";
|
|
32
|
+
import"./index-hxp6q5f8.js";
|
|
33
33
|
import"./index-n4wyxcgr.js";
|
|
34
34
|
import {
|
|
35
35
|
LATEST_SUPPORTED_VERSION,
|
|
36
36
|
enforceSchemaFence
|
|
37
|
-
} from "./index-
|
|
38
|
-
import"./index-
|
|
37
|
+
} from "./index-dbgg6hsf.js";
|
|
38
|
+
import"./index-3c3ztwgc.js";
|
|
39
39
|
import"./index-w1avzkdt.js";
|
|
40
40
|
import"./index-135e8hvg.js";
|
|
41
41
|
import"./index-8976mezv.js";
|
package/dist/{compaction-marker-candidates-fnm47jat.js → compaction-marker-candidates-p1kqkqhq.js}
RENAMED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
readMarkerCandidateBasis2,
|
|
5
5
|
prepareMarkerCandidateBasis2,
|
|
6
6
|
scanMarkerCandidateSnapshot2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-6wdwv3a6.js";
|
|
8
8
|
import"./index-399p688g.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-2qtx0q6h.js";
|
|
10
10
|
import"./index-fgs78jyd.js";
|
|
11
11
|
import"./index-0h2mkab2.js";
|
|
12
12
|
export {
|
|
@@ -5,8 +5,8 @@ if (!port)
|
|
|
5
5
|
throw new Error("marker candidate worker requires a parent port");
|
|
6
6
|
port.postMessage({ kind: "accepted" });
|
|
7
7
|
var [{ Database }, { scanMarkerCandidateSnapshot }] = await Promise.all([
|
|
8
|
-
import("./sqlite-
|
|
9
|
-
import("./compaction-marker-candidates-
|
|
8
|
+
import("./sqlite-v89bj0yy.js"),
|
|
9
|
+
import("./compaction-marker-candidates-p1kqkqhq.js")
|
|
10
10
|
]);
|
|
11
11
|
var input = workerData;
|
|
12
12
|
var db;
|
package/dist/{compartment-chunk-embedding-81qesfjs.js → compartment-chunk-embedding-y01m95c2.js}
RENAMED
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
countSessionCompartmentEmbedCoverage2,
|
|
25
25
|
countSessionCompartmentEmbedCoveragePolite2,
|
|
26
26
|
countUnembeddedSessionCompartmentsPolite2
|
|
27
|
-
} from "./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
27
|
+
} from "./index-vx6f7wff.js";
|
|
28
|
+
import"./index-gwxaz0z5.js";
|
|
29
|
+
import"./index-579m1751.js";
|
|
30
|
+
import"./index-at6py2k3.js";
|
|
31
31
|
import"./index-399p688g.js";
|
|
32
32
|
import"./index-hqw0rt9k.js";
|
|
33
33
|
import"./index-my0dn413.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-2qtx0q6h.js";
|
|
35
35
|
import"./index-fgs78jyd.js";
|
|
36
36
|
import"./index-0h2mkab2.js";
|
|
37
37
|
import"./index-54wmg4rj.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureMemoryEmbeddings2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
3
|
+
} from "./index-pe5gz5c4.js";
|
|
4
|
+
import"./index-w1twp2kp.js";
|
|
5
5
|
import"./index-9p40dgkm.js";
|
|
6
6
|
import"./index-yhzhdp3m.js";
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
7
|
+
import"./index-j3pz3a1b.js";
|
|
8
|
+
import"./index-vx6f7wff.js";
|
|
9
|
+
import"./index-wqpjhx1p.js";
|
|
10
|
+
import"./index-gwxaz0z5.js";
|
|
11
|
+
import"./index-ccanzg8p.js";
|
|
12
|
+
import"./index-hxp6q5f8.js";
|
|
13
|
+
import"./index-579m1751.js";
|
|
14
|
+
import"./index-at6py2k3.js";
|
|
15
15
|
import"./index-399p688g.js";
|
|
16
16
|
import"./index-hqw0rt9k.js";
|
|
17
17
|
import"./index-my0dn413.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-2qtx0q6h.js";
|
|
19
19
|
import"./index-fgs78jyd.js";
|
|
20
20
|
import"./index-0h2mkab2.js";
|
|
21
21
|
import"./index-54wmg4rj.js";
|
package/dist/embedding-worker.js
CHANGED
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
6
|
} from "./index-fgs78jyd.js";
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
import"./index-ccanzg8p.js";
|
|
8
|
+
import"./index-gwxaz0z5.js";
|
|
9
9
|
import"./index-my0dn413.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-2qtx0q6h.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveLocalEmbeddingWorkerRuntime,
|
|
13
13
|
getLocalEmbeddingNativeMemoryStats,
|
|
14
14
|
LocalEmbeddingProvider
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-wqpjhx1p.js";
|
|
16
16
|
import {
|
|
17
17
|
setStoragePrivatePermissionEnforcement
|
|
18
18
|
} from "./index-81nthk8j.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
PER_HARNESS_MODEL_KEYS,
|
|
31
31
|
ConfigProfilesSchema,
|
|
32
32
|
MagicContextConfigSchema
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-ccanzg8p.js";
|
|
34
34
|
import {
|
|
35
35
|
MERGED_REASONING_PARTS_PREFIX,
|
|
36
36
|
decodeMergedReasoningParts,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
visitRawSessionMessages2,
|
|
68
68
|
readRawSessionMessageById2,
|
|
69
69
|
readSessionChunk2
|
|
70
|
-
} from "./index-
|
|
70
|
+
} from "./index-gqjxy2p7.js";
|
|
71
71
|
import {
|
|
72
72
|
isRecord,
|
|
73
73
|
providerVisibleMessage,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
getTagNumberByMessageId2,
|
|
82
82
|
getTagsBySession2,
|
|
83
83
|
getTagById2
|
|
84
|
-
} from "./index-
|
|
84
|
+
} from "./index-n8e5e9fp.js";
|
|
85
85
|
import {
|
|
86
86
|
estimateTokens
|
|
87
87
|
} from "./index-my0dn413.js";
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
Database2,
|
|
91
91
|
withSqliteBackgroundWriter2,
|
|
92
92
|
withoutSqliteTransformPass2
|
|
93
|
-
} from "./index-
|
|
93
|
+
} from "./index-2qtx0q6h.js";
|
|
94
94
|
import {
|
|
95
95
|
stableStringify,
|
|
96
96
|
closeQuietly,
|
|
@@ -109,21 +109,21 @@ import {
|
|
|
109
109
|
V2StoreReader,
|
|
110
110
|
deleteSessionScopedRows,
|
|
111
111
|
getLastIndexedOrdinal2
|
|
112
|
-
} from "./index-
|
|
112
|
+
} from "./index-wgmhk91m.js";
|
|
113
113
|
import {
|
|
114
114
|
resolveOpenCodeDbPath,
|
|
115
115
|
assertOpenCodeStoreGeneration
|
|
116
116
|
} from "./index-8976mezv.js";
|
|
117
117
|
import {
|
|
118
118
|
noteRawSessionSummaryRowWritten2
|
|
119
|
-
} from "./index-
|
|
119
|
+
} from "./index-at6py2k3.js";
|
|
120
120
|
import {
|
|
121
121
|
SubcClient,
|
|
122
122
|
connectionFileExists,
|
|
123
123
|
SYNAPSE_DEFAULT_MODEL,
|
|
124
124
|
toSynapseLaneDescriptor,
|
|
125
125
|
SynapseEmbeddingProvider
|
|
126
|
-
} from "./index-
|
|
126
|
+
} from "./index-gwxaz0z5.js";
|
|
127
127
|
import {
|
|
128
128
|
invalidateAutoEmbedSession,
|
|
129
129
|
drainBackgroundBatches,
|
|
@@ -136,10 +136,10 @@ import {
|
|
|
136
136
|
unregisterProjectEmbedding2,
|
|
137
137
|
getProjectEmbeddingSnapshot2,
|
|
138
138
|
embedTextForProject2
|
|
139
|
-
} from "./index-
|
|
139
|
+
} from "./index-w1twp2kp.js";
|
|
140
140
|
import {
|
|
141
141
|
getErrorMessage
|
|
142
|
-
} from "./index-
|
|
142
|
+
} from "./index-dbgg6hsf.js";
|
|
143
143
|
import {
|
|
144
144
|
V2_MEMORY_CATEGORIES,
|
|
145
145
|
CATEGORY_PRIORITY,
|
|
@@ -153,13 +153,13 @@ import {
|
|
|
153
153
|
expandWorkspaceIdentitySetWithAliases,
|
|
154
154
|
resolveStoredPathWorkspaceIdentity,
|
|
155
155
|
storedPathBelongsToWorkspace
|
|
156
|
-
} from "./index-
|
|
156
|
+
} from "./index-3c3ztwgc.js";
|
|
157
157
|
import {
|
|
158
158
|
directoryHasGitMetadata,
|
|
159
159
|
resolveProjectIdentityForSession,
|
|
160
160
|
normalizeStoredProjectPath,
|
|
161
161
|
storedPathBelongsToIdentity
|
|
162
|
-
} from "./index-
|
|
162
|
+
} from "./index-hxp6q5f8.js";
|
|
163
163
|
import {
|
|
164
164
|
getNoteByIdInScope,
|
|
165
165
|
getNotes,
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
resolveMemoriesByIdsForSearch2,
|
|
176
176
|
unifiedSearch2,
|
|
177
177
|
formatSearchResults2
|
|
178
|
-
} from "./index-
|
|
178
|
+
} from "./index-ftvm2acc.js";
|
|
179
179
|
import {
|
|
180
180
|
computeCueContentHash,
|
|
181
181
|
getMuralCueState,
|
|
@@ -191,22 +191,22 @@ import {
|
|
|
191
191
|
supersededMemory2,
|
|
192
192
|
mergeMemoryStats2,
|
|
193
193
|
archiveMemory2
|
|
194
|
-
} from "./index-
|
|
194
|
+
} from "./index-29nw7n1r.js";
|
|
195
195
|
import {
|
|
196
196
|
saveEmbedding,
|
|
197
197
|
invalidateMemory2
|
|
198
198
|
} from "./index-yhzhdp3m.js";
|
|
199
199
|
import {
|
|
200
200
|
preflightLocalEmbeddingPooling
|
|
201
|
-
} from "./index-
|
|
201
|
+
} from "./index-wqpjhx1p.js";
|
|
202
202
|
import {
|
|
203
203
|
isMarkerCandidateBasisCurrent2,
|
|
204
204
|
invalidateMarkerCandidateBasis2,
|
|
205
205
|
readMarkerCandidateBasis2
|
|
206
|
-
} from "./index-
|
|
206
|
+
} from "./index-6wdwv3a6.js";
|
|
207
207
|
import {
|
|
208
208
|
renderSearchArchive2
|
|
209
|
-
} from "./index-
|
|
209
|
+
} from "./index-st4gwt64.js";
|
|
210
210
|
import {
|
|
211
211
|
computeNormalizedHash
|
|
212
212
|
} from "./index-9x1f96r8.js";
|
|
@@ -1946,6 +1946,17 @@ function stripUnsafeProjectConfigFields(projectRaw) {
|
|
|
1946
1946
|
warnings.push(`Ignoring ${field} from project config (security: daemon routing and developer-only embedding traffic are user-level settings).`);
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
|
+
if ("rerank" in projectRaw) {
|
|
1950
|
+
const rerank = projectRaw.rerank;
|
|
1951
|
+
const off = isPlainObject(rerank) && rerank.provider === "off";
|
|
1952
|
+
const removed = !isPlainObject(rerank) || Object.keys(rerank).some((key) => key !== "provider") || !off;
|
|
1953
|
+
if (off)
|
|
1954
|
+
projectRaw.rerank = { provider: "off" };
|
|
1955
|
+
else
|
|
1956
|
+
delete projectRaw.rerank;
|
|
1957
|
+
if (removed)
|
|
1958
|
+
warnings.push("Ignoring rerank settings from project config (security: projects may only set rerank.provider to off; hosted routing, credentials and limits are user-level only).");
|
|
1959
|
+
}
|
|
1949
1960
|
const embedding = projectRaw.embedding;
|
|
1950
1961
|
if (isPlainObject(embedding)) {
|
|
1951
1962
|
const removed = [];
|
|
@@ -9995,6 +10006,24 @@ async function ensureProjectRegisteredFromPiDirectory(directory, db, options = {
|
|
|
9995
10006
|
}
|
|
9996
10007
|
}
|
|
9997
10008
|
|
|
10009
|
+
// src/omp-mentions.ts
|
|
10010
|
+
function neutralizeOmpMentions(text) {
|
|
10011
|
+
return text.replace(/(^|[\s([{<"'`])@/g, "$1@");
|
|
10012
|
+
}
|
|
10013
|
+
function restoreOmpMentions(value) {
|
|
10014
|
+
if (typeof value === "string")
|
|
10015
|
+
return value.replaceAll("@", "@");
|
|
10016
|
+
if (Array.isArray(value))
|
|
10017
|
+
return value.map(restoreOmpMentions);
|
|
10018
|
+
if (value !== null && typeof value === "object") {
|
|
10019
|
+
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [
|
|
10020
|
+
key,
|
|
10021
|
+
restoreOmpMentions(entry)
|
|
10022
|
+
]));
|
|
10023
|
+
}
|
|
10024
|
+
return value;
|
|
10025
|
+
}
|
|
10026
|
+
|
|
9998
10027
|
// src/pi-harness-kind.ts
|
|
9999
10028
|
import { existsSync as existsSync8, readFileSync as readFileSync8, realpathSync as realpathSync2 } from "node:fs";
|
|
10000
10029
|
import { dirname as dirname5, join as join5, parse as parse2, resolve as resolve3 } from "node:path";
|
|
@@ -12966,6 +12995,7 @@ function createCtxSearchTool(deps) {
|
|
|
12966
12995
|
};
|
|
12967
12996
|
}
|
|
12968
12997
|
}
|
|
12998
|
+
let rerankSkipped = "";
|
|
12969
12999
|
const results = await unifiedSearch2(deps.db, sessionId, projectIdentity, query, {
|
|
12970
13000
|
limit: normalizeLimit2(params.limit),
|
|
12971
13001
|
memoryEnabled,
|
|
@@ -12983,14 +13013,19 @@ function createCtxSearchTool(deps) {
|
|
|
12983
13013
|
gitRepositoryAvailable: directoryHasGitMetadata(ctx.cwd),
|
|
12984
13014
|
explicitSearch: true,
|
|
12985
13015
|
rerankConnectionFile: deps.rerankConnectionFile,
|
|
13016
|
+
rerankConfig: deps.rerankConfig,
|
|
12986
13017
|
signal,
|
|
13018
|
+
onRerankSkipped: (line) => {
|
|
13019
|
+
rerankSkipped = line;
|
|
13020
|
+
},
|
|
12987
13021
|
...dateRange
|
|
12988
13022
|
});
|
|
12989
13023
|
return {
|
|
12990
13024
|
content: [
|
|
12991
13025
|
{
|
|
12992
13026
|
type: "text",
|
|
12993
|
-
text: formatSearchResults2(query, results, sessionId, diagnostics)
|
|
13027
|
+
text: formatSearchResults2(query, results, sessionId, diagnostics) + (rerankSkipped ? `
|
|
13028
|
+
${rerankSkipped}` : "")
|
|
12994
13029
|
}
|
|
12995
13030
|
],
|
|
12996
13031
|
details: undefined
|
|
@@ -13548,12 +13583,18 @@ function registerMagicContextTools(pi, opts) {
|
|
|
13548
13583
|
});
|
|
13549
13584
|
const registration = promptSurfaceRuntime.resolveRegistration(opts.promptSurface);
|
|
13550
13585
|
const smartNotesAvailable = opts.smartNotesEnabled !== false && opts.dreamerEnabled !== false;
|
|
13586
|
+
const restoreChildMentions = process.env.MAGIC_CONTEXT_PI_SUBAGENT === "1" && resolvePiHarnessKind() === "omp";
|
|
13551
13587
|
const surfaceTool = (definition) => {
|
|
13552
13588
|
const parameters = structuredClone(definition.parameters);
|
|
13553
13589
|
applyJsonSchemaParameterDescriptions(definition.name, parameters, registration.preset, smartNotesAvailable ? opts.smartNotesEnabled : false);
|
|
13554
13590
|
return setOmpEssentialLoadMode(throwReturnedToolErrors({
|
|
13555
13591
|
...definition,
|
|
13556
13592
|
parameters,
|
|
13593
|
+
execute: (...args) => {
|
|
13594
|
+
if (restoreChildMentions)
|
|
13595
|
+
args[1] = restoreOmpMentions(args[1]);
|
|
13596
|
+
return definition.execute(...args);
|
|
13597
|
+
},
|
|
13557
13598
|
description: definition.name === "ctx_note" && !smartNotesAvailable ? withoutSmartNoteText(registration.preset === "light" ? CTX_NOTE_LIGHT_DESCRIPTION : definition.description) : registration.descriptionFor(definition.name, definition.description)
|
|
13558
13599
|
}));
|
|
13559
13600
|
};
|
|
@@ -13564,6 +13605,7 @@ function registerMagicContextTools(pi, opts) {
|
|
|
13564
13605
|
embeddingEnabled: opts.embeddingEnabled,
|
|
13565
13606
|
gitCommitsEnabled: opts.gitCommitsEnabled,
|
|
13566
13607
|
rerankConnectionFile: opts.rerankConnectionFile,
|
|
13608
|
+
rerankConfig: opts.rerankConfig,
|
|
13567
13609
|
resolveProjectIdentity
|
|
13568
13610
|
})));
|
|
13569
13611
|
if (opts.memoryToolEnabled !== false) {
|
|
@@ -13607,4 +13649,4 @@ function registerMagicContextTools(pi, opts) {
|
|
|
13607
13649
|
}
|
|
13608
13650
|
}
|
|
13609
13651
|
|
|
13610
|
-
export { COMPACTION_ENABLED_PATH, isDreamerRunnable, isCompactionEnabled, formatConfigParseStatusLine, formatConfigParseNotice, claimConfigParseFailuresOnce, parseJsoncRecovering, detectConfigFile, OPENCODE_OUTPUT_CAP, MIN_PLAUSIBLE_CONTEXT_LIMIT, catalogOutputReserve, deriveWindowGeometry, hasTrustedAbsoluteWall, applyProvenInputFloor, formatWindowDerivationLine, formatWindowSource, isSaneLimit, resolveOutputReserve, getSdkWindowGeometry, getSdkContextLimit, getSdkOutputLimit, getSdkInputLimit, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, migrateMagicContextConfigLocations, getProtectedTokensTierOverrides, rememberUnpublishedAutoSearchNoHint, getUnpublishedAutoSearchNoHint, forgetUnpublishedAutoSearchNoHint, registerAutoSearchWork, cancelAutoSearchWork, readSessionMeta, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, retryPendingSessionCleanups, retryPendingRustSessionCleanupsForProject, COMPARTMENT_LEASE_RENEWAL_MS, acquireCompartmentLease, renewCompartmentLease, releaseCompartmentLease, releaseCompartmentLeaseBestEffort, isCompartmentLeaseHeld, isNoContentCompartment, HAS_COMPARTMENT_CONTENT_SQL, queueM0Mutation, getMaxM0MutationId, getCompartments, getLastCompartmentEndMessage, getLastCompartmentEndMessageId, getCompartmentsByEndMessageId, appendCompartments, saveRecompStagingPass, getRecompStaging, clearRecompStaging, getRecompPartialRange, setRecompPartialRange, escapeXmlAttr, escapeXmlContent, getUncoveredCompartmentEndThrough, isPartialCompartmentEnd, readProjectDocsCanonical, providerResponseFailed, isSuccessfulProviderCompletion, requestPendingMaterialization, pendingMaterializationOrigin, hasPendingMaterializationOrigin, clearPendingMaterialization, recordSystemRefreshOwnership, recordSystemPromptForRequest, recordHeldHeadForRequest, bindSystemPromptResponse, acknowledgeSystemPromptDelivery, deferDeliveredSystemRefresh, clearSystemPromptDelivery, saveLkgSlotToDb, loadPersistedLkgSlot, drainStaleLkgSlots, createDbLkgPersistence, replayLkg, registerLkgPersistence, LKG_SNAPSHOT_ARRAY, LKG_SNAPSHOT_OBJECT, LKG_SNAPSHOT_KEY, LKG_SNAPSHOT_STRING, LKG_SNAPSHOT_NUMBER, LKG_SNAPSHOT_BOOLEAN, LKG_SNAPSHOT_NULL, LKG_SNAPSHOT_UNDEFINED, contentSnapshotValue, signatureForFields, lkgContentFields, lkgContentDigestFromFields, isLegacyLkgDigest, legacyLkgDigestFromFields, lkgFieldsMatchDigest, exactReusablePrefix, incrementalLkgContentDigests, lkgSlotRejection, captureSlot, getInMemorySlot, getSlot, dropSlot, TOOL_SWEEP_SCOPED_MARKER, encodePiContentDecision, decodePiContentDecision, getPiContentDecisions, freezePiContentDecision, getNativeReplayState, saveNativeToolInputs, addNativeReasoningIds, copySessionStateForClone, externalHistorianFailureReason, subprocessExitHistorianFailureReason, countHistorianRuns, recordHistorianRun, summarizeImportance, tallyFactsByCategory, queueMemoryMutation, getMemoryMutationsForRender, getMemoryMutationsForRenderByProjects, getMaxMemoryMutationId, getMaxMemoryMutationIdForProjects, GLOBAL_USER_PROFILE_PROJECT_PATH, getProjectState, bumpProjectUserProfileVersion, saveSourceContent, getSourceContents, recordSubagentInvocation, getLatestHistorianInvocationId, noteTouchedAt, noteNudgePickIndex, formatNoteNudge, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, SYNTH_USER_ID_PREFIX, resolvePiStableId, resolvePiRealStableId, isPiContentFallbackId, isPiIndexFallbackId, piContentFallbackIds, readPiSessionSnapshot, readPiSessionMessages, readPiSessionMessagePage, findRestartModelSeedFromBranch, iterateEntriesToRawMessageRange, iterateAsyncEntriesToRawMessageRange, convertEntriesToRawMessages, convertPiAssistantEntryById, convertEntriesToRawMessagePage, countPiRawMessages, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getTaskScheduleState, getFailingDreamTasks, getSkippedDreamTasks, getMostRecentTaskRunAt, pruneNonCanonicalTaskRows, deleteTaskScheduleRowsForProject, seedTaskScheduleState, writeTaskScheduleState, isRetrospectiveWindowProcessed, recordRetrospectiveWindowProcessed, curateCategoryForMemoryCategory, peekCurateCategoryScope, beginCurateCategoryRun, curateTaskStateAfterSuccess, MEMORY_MURAL_BLOCK, buildMagicContextSection, resolveMuralWire, updateCompactionMarkerAfterPublication, COMPARTMENT_RENDER_EPOCH, MEMORY_RENDER_FORMAT_EPOCH, encodeCachedM0UpgradeIdentity, decodeCachedM0UpgradeIdentity, withCachedM0MemoryIds, readCachedM0MemoryIds, renderBudgetIdentityChanged, renderedBudgetSnapshot, renderedBudgetShrinkReason, DEFAULT_HISTORY_BUDGET_TOKENS, renderCompartmentAtTier, renderDecayedCompartments, extractM0Block, TEMPORAL_MARKER_PATTERN, TEMPORAL_MARKER_REPLAY_PATTERN, temporalMarkerPrefix, renderUserProfileContent, clearInjectionCache, getVisibleMemoryIds, orderHistorianMemories, renderHistorianMemoryBlock, DEFAULT_MEMORY_BUDGET_TOKENS, DEFAULT_USER_PROFILE_BUDGET_TOKENS, trimMemoriesToBudgetV2, trimWorkspaceMemoriesToBudgetV2, trimUserMemoriesToBudget, renderMemoryBlockV2, stripMemoryMuralBlock, resetPrefixTrimFallbackState, isDirectiveShapedProjectRule, takeCurateSafetyRefusalCount, wakePlaneStatus, loadPiConfig, loadPiConfigDetailed, unregisterPiProjectEmbeddings, ensureProjectRegisteredFromPiDirectory, resolvePiHarnessDetection, resolvePiHarnessKind, resolvePiOrdinalAlignment, piRawOrdinalOffsetSource, resolvePiOrdinalAlignmentForContext, isPiOrdinalAlignmentUnanchored, clearPiOrdinalAlignmentSession, rememberTodowriteToolCallTodos, parseTodos, setTodoSnapshot, registerTodoOverlay, registerTodoStateLifecycle, syncCtxMemoryToolEnabled, registerMagicContextTools };
|
|
13652
|
+
export { COMPACTION_ENABLED_PATH, isDreamerRunnable, isCompactionEnabled, formatConfigParseStatusLine, formatConfigParseNotice, claimConfigParseFailuresOnce, parseJsoncRecovering, detectConfigFile, OPENCODE_OUTPUT_CAP, MIN_PLAUSIBLE_CONTEXT_LIMIT, catalogOutputReserve, deriveWindowGeometry, hasTrustedAbsoluteWall, applyProvenInputFloor, formatWindowDerivationLine, formatWindowSource, isSaneLimit, resolveOutputReserve, getSdkWindowGeometry, getSdkContextLimit, getSdkOutputLimit, getSdkInputLimit, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, migrateMagicContextConfigLocations, getProtectedTokensTierOverrides, rememberUnpublishedAutoSearchNoHint, getUnpublishedAutoSearchNoHint, forgetUnpublishedAutoSearchNoHint, registerAutoSearchWork, cancelAutoSearchWork, readSessionMeta, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, retryPendingSessionCleanups, retryPendingRustSessionCleanupsForProject, COMPARTMENT_LEASE_RENEWAL_MS, acquireCompartmentLease, renewCompartmentLease, releaseCompartmentLease, releaseCompartmentLeaseBestEffort, isCompartmentLeaseHeld, isNoContentCompartment, HAS_COMPARTMENT_CONTENT_SQL, queueM0Mutation, getMaxM0MutationId, getCompartments, getLastCompartmentEndMessage, getLastCompartmentEndMessageId, getCompartmentsByEndMessageId, appendCompartments, saveRecompStagingPass, getRecompStaging, clearRecompStaging, getRecompPartialRange, setRecompPartialRange, escapeXmlAttr, escapeXmlContent, getUncoveredCompartmentEndThrough, isPartialCompartmentEnd, readProjectDocsCanonical, providerResponseFailed, isSuccessfulProviderCompletion, requestPendingMaterialization, pendingMaterializationOrigin, hasPendingMaterializationOrigin, clearPendingMaterialization, recordSystemRefreshOwnership, recordSystemPromptForRequest, recordHeldHeadForRequest, bindSystemPromptResponse, acknowledgeSystemPromptDelivery, deferDeliveredSystemRefresh, clearSystemPromptDelivery, saveLkgSlotToDb, loadPersistedLkgSlot, drainStaleLkgSlots, createDbLkgPersistence, replayLkg, registerLkgPersistence, LKG_SNAPSHOT_ARRAY, LKG_SNAPSHOT_OBJECT, LKG_SNAPSHOT_KEY, LKG_SNAPSHOT_STRING, LKG_SNAPSHOT_NUMBER, LKG_SNAPSHOT_BOOLEAN, LKG_SNAPSHOT_NULL, LKG_SNAPSHOT_UNDEFINED, contentSnapshotValue, signatureForFields, lkgContentFields, lkgContentDigestFromFields, isLegacyLkgDigest, legacyLkgDigestFromFields, lkgFieldsMatchDigest, exactReusablePrefix, incrementalLkgContentDigests, lkgSlotRejection, captureSlot, getInMemorySlot, getSlot, dropSlot, TOOL_SWEEP_SCOPED_MARKER, encodePiContentDecision, decodePiContentDecision, getPiContentDecisions, freezePiContentDecision, getNativeReplayState, saveNativeToolInputs, addNativeReasoningIds, copySessionStateForClone, externalHistorianFailureReason, subprocessExitHistorianFailureReason, countHistorianRuns, recordHistorianRun, summarizeImportance, tallyFactsByCategory, queueMemoryMutation, getMemoryMutationsForRender, getMemoryMutationsForRenderByProjects, getMaxMemoryMutationId, getMaxMemoryMutationIdForProjects, GLOBAL_USER_PROFILE_PROJECT_PATH, getProjectState, bumpProjectUserProfileVersion, saveSourceContent, getSourceContents, recordSubagentInvocation, getLatestHistorianInvocationId, noteTouchedAt, noteNudgePickIndex, formatNoteNudge, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, SYNTH_USER_ID_PREFIX, resolvePiStableId, resolvePiRealStableId, isPiContentFallbackId, isPiIndexFallbackId, piContentFallbackIds, readPiSessionSnapshot, readPiSessionMessages, readPiSessionMessagePage, findRestartModelSeedFromBranch, iterateEntriesToRawMessageRange, iterateAsyncEntriesToRawMessageRange, convertEntriesToRawMessages, convertPiAssistantEntryById, convertEntriesToRawMessagePage, countPiRawMessages, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getTaskScheduleState, getFailingDreamTasks, getSkippedDreamTasks, getMostRecentTaskRunAt, pruneNonCanonicalTaskRows, deleteTaskScheduleRowsForProject, seedTaskScheduleState, writeTaskScheduleState, isRetrospectiveWindowProcessed, recordRetrospectiveWindowProcessed, curateCategoryForMemoryCategory, peekCurateCategoryScope, beginCurateCategoryRun, curateTaskStateAfterSuccess, MEMORY_MURAL_BLOCK, buildMagicContextSection, resolveMuralWire, updateCompactionMarkerAfterPublication, COMPARTMENT_RENDER_EPOCH, MEMORY_RENDER_FORMAT_EPOCH, encodeCachedM0UpgradeIdentity, decodeCachedM0UpgradeIdentity, withCachedM0MemoryIds, readCachedM0MemoryIds, renderBudgetIdentityChanged, renderedBudgetSnapshot, renderedBudgetShrinkReason, DEFAULT_HISTORY_BUDGET_TOKENS, renderCompartmentAtTier, renderDecayedCompartments, extractM0Block, TEMPORAL_MARKER_PATTERN, TEMPORAL_MARKER_REPLAY_PATTERN, temporalMarkerPrefix, renderUserProfileContent, clearInjectionCache, getVisibleMemoryIds, orderHistorianMemories, renderHistorianMemoryBlock, DEFAULT_MEMORY_BUDGET_TOKENS, DEFAULT_USER_PROFILE_BUDGET_TOKENS, trimMemoriesToBudgetV2, trimWorkspaceMemoriesToBudgetV2, trimUserMemoriesToBudget, renderMemoryBlockV2, stripMemoryMuralBlock, resetPrefixTrimFallbackState, isDirectiveShapedProjectRule, takeCurateSafetyRefusalCount, wakePlaneStatus, loadPiConfig, loadPiConfigDetailed, unregisterPiProjectEmbeddings, ensureProjectRegisteredFromPiDirectory, neutralizeOmpMentions, restoreOmpMentions, resolvePiHarnessDetection, resolvePiHarnessKind, resolvePiOrdinalAlignment, piRawOrdinalOffsetSource, resolvePiOrdinalAlignmentForContext, isPiOrdinalAlignmentUnanchored, clearPiOrdinalAlignmentSession, rememberTodowriteToolCallTodos, parseTodos, setTodoSnapshot, registerTodoOverlay, registerTodoStateLifecycle, syncCtxMemoryToolEnabled, registerMagicContextTools };
|