@cortexkit/pi-magic-context 0.49.18 → 0.49.20
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 +53 -10
- package/dist/chunk-embedding-write-worker.js +29 -22
- package/dist/{compaction-marker-candidates-wjzqbspm.js → compaction-marker-candidates-fnm47jat.js} +3 -3
- package/dist/compaction-marker-candidates-worker.js +2 -2
- package/dist/compartment-chunk-embedding-81qesfjs.js +64 -0
- package/dist/embedding-backfill-56e871c6.js +24 -0
- package/dist/embedding-worker-process.js +2 -2
- package/dist/embedding-worker.js +5 -5
- package/dist/historian-calibration-extension.js +1 -1
- package/dist/index-54wmg4rj.js +82 -0
- package/dist/{index-xnch62s6.js → index-5n5zxs8e.js} +314 -127
- package/dist/{index-gdjv1nnd.js → index-5vgt1zeh.js} +6 -7
- package/dist/{index-qpq6w67c.js → index-6kb2xpw7.js} +2 -2
- package/dist/{index-d43hmn31.js → index-af9t637y.js} +68 -16
- package/dist/{index-z2rkv0mb.js → index-b8am7tns.js} +4 -4
- package/dist/{index-rhprywn6.js → index-bttctq07.js} +23 -5
- package/dist/{index-e1rza8gp.js → index-dzem6gn9.js} +1 -1
- package/dist/{index-2mmy81qt.js → index-e19qtjj0.js} +468 -18
- package/dist/{index-7bqrfyny.js → index-fgs78jyd.js} +12 -15
- package/dist/{index-d4dt19md.js → index-hqw0rt9k.js} +1 -1
- package/dist/{index-rrwv9y2k.js → index-hws5f0z9.js} +1 -1
- package/dist/{index-f18ec69t.js → index-jn44h81p.js} +1 -1
- package/dist/{index-xxn1tpnv.js → index-jt0g3hn0.js} +45 -28
- package/dist/{index-d8gc0112.js → index-jxjr7kz9.js} +3 -3
- package/dist/{index-4bv5bttd.js → index-kqb3d8bs.js} +9 -5
- package/dist/{index-gp928w10.js → index-mtvvhcw4.js} +10 -10
- package/dist/{index-1kcfwk9c.js → index-my0dn413.js} +1 -1
- package/dist/{index-apgwdby5.js → index-n4wyxcgr.js} +1 -1
- package/dist/{index-g7p75667.js → index-p63nwn5v.js} +2 -2
- package/dist/{index-svgkv4g2.js → index-qerzchrs.js} +2 -2
- package/dist/{index-vktahpdj.js → index-rfyvax95.js} +9 -3
- package/dist/{index-yygsh681.js → index-rgfb753z.js} +3 -3
- package/dist/{index-d21pdr8v.js → index-tb3d9trm.js} +2 -2
- package/dist/{index-vmcgew7x.js → index-v2epyzbm.js} +75 -57
- package/dist/{index-fvjthct0.js → index-vdy273xw.js} +107 -20
- package/dist/{index-jrap43gc.js → index-w1avzkdt.js} +1 -1
- package/dist/{index-r9f4f6s1.js → index-zhwwp8zz.js} +64 -8
- package/dist/index.js +1119 -247
- package/dist/{logger-dygt96rn.js → logger-shetp43v.js} +1 -1
- package/dist/{message-fts-rowid-map-cvpy2dmb.js → message-fts-rowid-map-bpexnsdj.js} +6 -5
- package/dist/{message-index-bounded-g9hgresf.js → message-index-bounded-d4r3weh0.js} +14 -13
- package/dist/{message-index-74qdqmq7.js → message-index-mvag9crh.js} +14 -13
- package/dist/{message-time-backfill-ssshbdy8.js → message-time-backfill-kc10yrcj.js} +3 -3
- package/dist/migration-worker.js +12 -11
- package/dist/{project-embedding-registry-vf1ncptn.js → project-embedding-registry-cfrg952x.js} +13 -12
- package/dist/raw-ordinal-warmup-worker.js +136 -101
- package/dist/{read-session-chunk-chepqmw5.js → read-session-chunk-7g4zvpd8.js} +9 -8
- package/dist/{read-session-raw-9s3xn7fc.js → read-session-raw-0fsjh10f.js} +4 -3
- package/dist/{safe-notification-target-2rkvkmw8.js → safe-notification-target-zcpchea6.js} +2 -2
- package/dist/search-archive-qbhp7e89.js +21 -0
- package/dist/{search-6ztbx25v.js → search-hp4g3g9v.js} +22 -21
- package/dist/{sqlite-fsp0sf3r.js → sqlite-d67n6dtr.js} +1 -1
- package/dist/{storage-memory-yxxc5v4n.js → storage-memory-9g882j7a.js} +2 -2
- package/dist/{storage-tags-1kets0q8.js → storage-tags-m2qcp1g2.js} +7 -5
- package/dist/subagent-entry.js +26 -25
- package/dist/tag-snapshot-worker-pi.js +66 -55
- package/package.json +1 -1
- package/dist/embedding-backfill-vwag34t0.js +0 -23
- package/dist/search-archive-jg4a1kcx.js +0 -20
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./index-135e8hvg.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-fgs78jyd.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureColumn,
|
|
9
9
|
healAllNullColumns,
|
|
10
10
|
installV95PerfSchema
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-w1avzkdt.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveOpenCodeDbPath,
|
|
14
14
|
openCodeDbPathExists,
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
} from "./index-8976mezv.js";
|
|
17
17
|
import {
|
|
18
18
|
Database2
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-hws5f0z9.js";
|
|
20
20
|
import {
|
|
21
21
|
normalizeStoredProjectPath,
|
|
22
22
|
storedPathBelongsToIdentity
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-p63nwn5v.js";
|
|
24
24
|
import {
|
|
25
25
|
logSlowWriteTransaction
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-hqw0rt9k.js";
|
|
27
27
|
|
|
28
28
|
// ../plugin/src/features/magic-context/migrations.ts
|
|
29
29
|
import { isMainThread } from "node:worker_threads";
|
|
@@ -2764,8 +2764,7 @@ var MIGRATIONS = [
|
|
|
2764
2764
|
up(db) {
|
|
2765
2765
|
const memoriesPresent = tableExists4(db, "memories");
|
|
2766
2766
|
const notesPresent = tableExists4(db, "notes");
|
|
2767
|
-
const
|
|
2768
|
-
const privilegeCheck = typeof native.function === "function" || typeof native.createFunction === "function" ? "mc_privileged_writer() = 0" : "COALESCE((SELECT enabled FROM context_privilege_state WHERE id = 1), 0) = 0";
|
|
2767
|
+
const privilegeCheck = authorityPrivilegeCheck();
|
|
2769
2768
|
if (memoriesPresent) {
|
|
2770
2769
|
db.exec(`
|
|
2771
2770
|
DROP TRIGGER IF EXISTS memories_authority_guard_insert;
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./index-399p688g.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-fgs78jyd.js";
|
|
7
7
|
import {
|
|
8
8
|
inRootAsyncContext2,
|
|
9
9
|
getSqliteDatabasePath2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-hws5f0z9.js";
|
|
11
11
|
|
|
12
12
|
// ../plugin/src/features/magic-context/compaction-marker-candidates.ts
|
|
13
13
|
import { existsSync, realpathSync } from "node:fs";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
inRootAsyncContext2,
|
|
6
6
|
isTransientSqliteError2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-hws5f0z9.js";
|
|
8
8
|
import {
|
|
9
9
|
PROMOTABLE_CATEGORIES,
|
|
10
10
|
CATEGORY_DEFAULT_TTL
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
sanitizeDiagnosticText,
|
|
15
15
|
log2,
|
|
16
16
|
sessionLog2
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-fgs78jyd.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveWorkspaceShareCategories,
|
|
20
20
|
resolveWorkspaceIdentitySet,
|
|
@@ -22,17 +22,19 @@ import {
|
|
|
22
22
|
resolveStoredPathWorkspaceIdentity,
|
|
23
23
|
sourceNameForMemory,
|
|
24
24
|
managedAuthorityNoteRow
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-5vgt1zeh.js";
|
|
26
26
|
import {
|
|
27
27
|
isKnownAutocommit
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-w1avzkdt.js";
|
|
29
29
|
import {
|
|
30
30
|
SubcClient
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-jxjr7kz9.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
buildCanonicalChunkTextFromFts2,
|
|
34
|
+
loadCompartmentChunkEmbeddingsForSearch2,
|
|
35
|
+
peekCompartmentChunkSearchPool2,
|
|
36
|
+
warmCompartmentChunkSearchPool2
|
|
37
|
+
} from "./index-5n5zxs8e.js";
|
|
36
38
|
import {
|
|
37
39
|
recordEmbeddingMeasurement,
|
|
38
40
|
saveCommitEmbedding,
|
|
@@ -50,7 +52,7 @@ import {
|
|
|
50
52
|
getProjectEmbeddingSnapshot2,
|
|
51
53
|
embedTextForProject2,
|
|
52
54
|
embedItemsForProject2
|
|
53
|
-
} from "./index-
|
|
55
|
+
} from "./index-v2epyzbm.js";
|
|
54
56
|
import {
|
|
55
57
|
saveEmbeddingIfHashMatches,
|
|
56
58
|
getProjectEmbeddings2
|
|
@@ -60,7 +62,7 @@ import {
|
|
|
60
62
|
isEmbeddingEnabled,
|
|
61
63
|
embedText,
|
|
62
64
|
ensureMemoryEmbeddings2
|
|
63
|
-
} from "./index-
|
|
65
|
+
} from "./index-b8am7tns.js";
|
|
64
66
|
import {
|
|
65
67
|
getMemorySelectColumns2,
|
|
66
68
|
isMemoryRow2,
|
|
@@ -74,13 +76,13 @@ import {
|
|
|
74
76
|
getMemoryById2,
|
|
75
77
|
updateMemorySeenCount2,
|
|
76
78
|
updateMemoryRetrievalCount2
|
|
77
|
-
} from "./index-
|
|
79
|
+
} from "./index-dzem6gn9.js";
|
|
78
80
|
import {
|
|
79
81
|
cleanSearchText,
|
|
80
82
|
keywordRelevance,
|
|
81
83
|
matchedSearchSnippet,
|
|
82
84
|
getIndexedMessageCorpusSize2
|
|
83
|
-
} from "./index-
|
|
85
|
+
} from "./index-vdy273xw.js";
|
|
84
86
|
import {
|
|
85
87
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
86
88
|
withMessageFtsSessionFilter
|
|
@@ -2218,7 +2220,7 @@ Reason: ${row.reason}` : ""}`;
|
|
|
2218
2220
|
case "compartment": {
|
|
2219
2221
|
title = hit.title;
|
|
2220
2222
|
location = `compartment ${hit.compartmentId} ${hit.sessionId} @${hit.startOrdinal}-${hit.endOrdinal}`;
|
|
2221
|
-
body =
|
|
2223
|
+
body = buildCanonicalChunkTextFromFts2(db, hit.sessionId, hit.startOrdinal, hit.endOrdinal) ?? "";
|
|
2222
2224
|
break;
|
|
2223
2225
|
}
|
|
2224
2226
|
}
|
|
@@ -3157,10 +3159,42 @@ function searchNotes(args) {
|
|
|
3157
3159
|
}));
|
|
3158
3160
|
}
|
|
3159
3161
|
async function searchCompartmentChunks(args) {
|
|
3160
|
-
if (
|
|
3162
|
+
if (args.limit <= 0 || !args.modelId || args.modelId === "off") {
|
|
3163
|
+
if (args.timings)
|
|
3164
|
+
args.timings.chunkPool = "off";
|
|
3161
3165
|
return [];
|
|
3166
|
+
}
|
|
3167
|
+
if (!args.queryEmbedding) {
|
|
3168
|
+
if (args.timings)
|
|
3169
|
+
args.timings.chunkPool = "no-vector";
|
|
3170
|
+
if (args.warmOnly)
|
|
3171
|
+
warmCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId);
|
|
3172
|
+
return [];
|
|
3173
|
+
}
|
|
3162
3174
|
const cutoff = args.maxOrdinal != null && args.maxOrdinal >= 0 ? args.maxOrdinal : null;
|
|
3163
|
-
|
|
3175
|
+
let rows;
|
|
3176
|
+
if (args.warmOnly) {
|
|
3177
|
+
const warm = peekCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId, args.dateRange);
|
|
3178
|
+
if (warm === null) {
|
|
3179
|
+
if (args.timings)
|
|
3180
|
+
args.timings.chunkPool = "cold";
|
|
3181
|
+
warmCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId);
|
|
3182
|
+
return [];
|
|
3183
|
+
}
|
|
3184
|
+
if (args.timings)
|
|
3185
|
+
args.timings.chunkPool = "warm";
|
|
3186
|
+
rows = warm;
|
|
3187
|
+
} else {
|
|
3188
|
+
try {
|
|
3189
|
+
rows = await loadCompartmentChunkEmbeddingsForSearch2(args.db, args.sessionId, args.projectPath, args.modelId, args.dateRange, args.signal);
|
|
3190
|
+
} catch (error) {
|
|
3191
|
+
if (args.signal?.aborted)
|
|
3192
|
+
return [];
|
|
3193
|
+
throw error;
|
|
3194
|
+
}
|
|
3195
|
+
if (args.timings)
|
|
3196
|
+
args.timings.chunkPool = "loaded";
|
|
3197
|
+
}
|
|
3164
3198
|
if (rows.length === 0)
|
|
3165
3199
|
return [];
|
|
3166
3200
|
const byCompartment = new Map;
|
|
@@ -3485,6 +3519,8 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3485
3519
|
if (options.signal?.aborted)
|
|
3486
3520
|
return [];
|
|
3487
3521
|
const messageProbes = options.explicitSearch ? extractLiteralProbes(trimmedQuery) : [];
|
|
3522
|
+
const timings = options.stepTimings;
|
|
3523
|
+
let stepStartedAt = performance.now();
|
|
3488
3524
|
let messageResults = [];
|
|
3489
3525
|
if (runMessages) {
|
|
3490
3526
|
const messageRequest = {
|
|
@@ -3511,8 +3547,13 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3511
3547
|
messageResults = outcome.results.filter((result) => result.messageId !== options.excludeMessageId);
|
|
3512
3548
|
if (lanes)
|
|
3513
3549
|
lanes.message_fts = (outcome.laneResults ?? outcome.results).slice(0, 25);
|
|
3550
|
+
if (timings)
|
|
3551
|
+
timings.messageMs = performance.now() - stepStartedAt;
|
|
3514
3552
|
}
|
|
3553
|
+
stepStartedAt = performance.now();
|
|
3515
3554
|
const capturedQuery = await queryEmbeddingPromise;
|
|
3555
|
+
if (timings && needsEmbedding)
|
|
3556
|
+
timings.vectorWaitMs = performance.now() - stepStartedAt;
|
|
3516
3557
|
if (options.signal?.aborted)
|
|
3517
3558
|
return [];
|
|
3518
3559
|
const embeddingSnapshot = getProjectEmbeddingSnapshot2(projectPath);
|
|
@@ -3522,6 +3563,9 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3522
3563
|
const workspace = resolveSearchWorkspaceContext(db, projectPath);
|
|
3523
3564
|
const embeddingModelId = queryContract?.modelId ?? options.embeddingModelIdOverride ?? embeddingSnapshot?.modelId;
|
|
3524
3565
|
const chunkModelId = queryContract?.chunkModelId ?? options.chunkModelIdOverride ?? embeddingSnapshot?.chunkModelId;
|
|
3566
|
+
stepStartedAt = performance.now();
|
|
3567
|
+
if (timings)
|
|
3568
|
+
timings.chunkPool = "off";
|
|
3525
3569
|
const compartmentResults = runCompartmentChunks ? await searchCompartmentChunks({
|
|
3526
3570
|
db,
|
|
3527
3571
|
sessionId,
|
|
@@ -3530,8 +3574,14 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3530
3574
|
limit: lanes ? Math.max(tierLimit, 25) : tierLimit,
|
|
3531
3575
|
maxOrdinal: options.maxMessageOrdinal,
|
|
3532
3576
|
modelId: chunkModelId && chunkModelId !== "off" ? chunkModelId : null,
|
|
3533
|
-
dateRange
|
|
3577
|
+
dateRange,
|
|
3578
|
+
warmOnly: options.chunkPoolWarmOnly,
|
|
3579
|
+
signal: options.signal,
|
|
3580
|
+
timings
|
|
3534
3581
|
}) : [];
|
|
3582
|
+
if (timings && runCompartmentChunks)
|
|
3583
|
+
timings.chunkMs = performance.now() - stepStartedAt;
|
|
3584
|
+
stepStartedAt = performance.now();
|
|
3535
3585
|
if (lanes)
|
|
3536
3586
|
lanes.chunk_vector = compartmentResults.slice(0, 25);
|
|
3537
3587
|
const messageLikeResults = mergeMessageAndCompartmentResults({
|
|
@@ -3587,6 +3637,8 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3587
3637
|
dateRange
|
|
3588
3638
|
})) : Promise.resolve([])
|
|
3589
3639
|
]);
|
|
3640
|
+
if (timings)
|
|
3641
|
+
timings.otherLanesMs = performance.now() - stepStartedAt;
|
|
3590
3642
|
if (options.diagnostics) {
|
|
3591
3643
|
options.diagnostics.suppressedVisibleMemoryIds = memoryOutcome.suppressedVisibleIds;
|
|
3592
3644
|
}
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "./index-bxmf4dhr.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-fgs78jyd.js";
|
|
7
7
|
import {
|
|
8
8
|
isSynapseEmbeddingTruncated,
|
|
9
9
|
SynapseEmbeddingProvider
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-jxjr7kz9.js";
|
|
11
11
|
import {
|
|
12
12
|
LocalEmbeddingProvider
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-e19qtjj0.js";
|
|
14
14
|
import {
|
|
15
15
|
OpenAICompatibleEmbeddingProvider,
|
|
16
16
|
getProjectEmbeddingSnapshot2,
|
|
17
17
|
embedBatchForProject2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-v2epyzbm.js";
|
|
19
19
|
import {
|
|
20
20
|
isEmbeddingHostBusy2
|
|
21
21
|
} from "./index-9p40dgkm.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokens
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-my0dn413.js";
|
|
4
4
|
import {
|
|
5
5
|
getHarness2
|
|
6
6
|
} from "./index-0h2mkab2.js";
|
|
7
7
|
import {
|
|
8
8
|
sessionLog2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-fgs78jyd.js";
|
|
10
10
|
import {
|
|
11
11
|
getTagIdentityWriteGeneration2,
|
|
12
12
|
getSqliteDatabasePath2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-hws5f0z9.js";
|
|
14
14
|
import {
|
|
15
15
|
jsonHashSink,
|
|
16
16
|
tagOrderConstraintIndex,
|
|
17
17
|
tagIdentityRevisionKey
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-w1avzkdt.js";
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_PROTECTED_TOOLS,
|
|
21
21
|
normalizeProtectedToolName,
|
|
@@ -3172,6 +3172,24 @@ function getActiveTagsBySession2(db, sessionId) {
|
|
|
3172
3172
|
const rows = getActiveTagsBySessionStatement(db).all(sessionId).filter(isTagRow);
|
|
3173
3173
|
return rows.map(toTagEntry);
|
|
3174
3174
|
}
|
|
3175
|
+
function getTailHygieneTags2(db, sessionId) {
|
|
3176
|
+
const active = getActiveTagsBySession2(db, sessionId);
|
|
3177
|
+
let orphanStatement = getNullOwnerToolTagsBySessionStatements.get(db);
|
|
3178
|
+
if (!orphanStatement) {
|
|
3179
|
+
orphanStatement = db.prepare(`SELECT ${TAG_SELECT_COLUMNS2} FROM tags
|
|
3180
|
+
WHERE session_id = ? AND type = 'tool' AND tool_owner_message_id IS NULL
|
|
3181
|
+
ORDER BY tag_number ASC, id ASC`);
|
|
3182
|
+
getNullOwnerToolTagsBySessionStatements.set(db, orphanStatement);
|
|
3183
|
+
}
|
|
3184
|
+
const seen = new Set(active.map((tag) => `${tag.tagNumber}\x00${tag.messageId}\x00${tag.type}`));
|
|
3185
|
+
for (const row of orphanStatement.all(sessionId).filter(isTagRow)) {
|
|
3186
|
+
const orphan = toTagEntry(row);
|
|
3187
|
+
const key = `${orphan.tagNumber}\x00${orphan.messageId}\x00${orphan.type}`;
|
|
3188
|
+
if (!seen.has(key))
|
|
3189
|
+
active.push(orphan);
|
|
3190
|
+
}
|
|
3191
|
+
return active;
|
|
3192
|
+
}
|
|
3175
3193
|
function getTagsForPendingOperations2(db, sessionId, pendingTagNumbers, protectedCount, recentToolWindow) {
|
|
3176
3194
|
const byNumber = new Map;
|
|
3177
3195
|
for (const tag of getTagsByNumbers2(db, sessionId, pendingTagNumbers)) {
|
|
@@ -3385,4 +3403,4 @@ function deleteToolTagsByOwner(db, sessionId, ownerMsgId) {
|
|
|
3385
3403
|
return getDeleteToolTagsByOwnerStatement(db).all(sessionId, ownerMsgId).length;
|
|
3386
3404
|
}
|
|
3387
3405
|
|
|
3388
|
-
export { UNKNOWN_FIT_RATIO, resolveDecisionCalibration, hasMeasuredDecisionCalibration, providerMass, localBudget, calibrationForModelKey, historyLocalBudget, adoptedProtectedToolsPolicy, protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, rememberCurrentToolOutputCount, currentReclaimableToolOutputCount, isRecord, TEXT_TAG_IDENTITY_MARKER, PI_FALLBACK_PREFIXES_JSON, contentTagOwnerMessageId, TailHygieneJsonMemo, piJsonHash, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, TODO_STATUSES, TODO_PRIORITIES, TITLE_DONE_STATUSES, normalizeTodoStateJson, buildSyntheticTodoPart, stripChannel1ReminderSpans, compareMeasuredTailPrefix, formatTailHygienePrefixMismatch, freezeTailHygieneMeasurement, effectiveTailHygiene, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, decideChannel1, evaluateChannel2, buildChannel2Reminder, buildChannel1Reminder, planEmergencyDrop, measureEmergencyTag, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, getPendingOpsCount, clearPendingOps, removePendingOp, updateTagByteSize2, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, updateTagInputByteSize2, updateTagTokenCount2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, scanTagOwnerSummary2, scanTagOwnerDelta2, updateTagInputTokenCount2, tagTokenCountIsNull2, backfillTagTokenCounts2, normalizeTagSnapshotRow2, insertTag2, updateTagStatus2, markTagDropped2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, PiTagIdentityConflictError2, getPiMessageTagCandidates2, findPiTagIdentityConflict2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
|
|
3406
|
+
export { UNKNOWN_FIT_RATIO, resolveDecisionCalibration, hasMeasuredDecisionCalibration, providerMass, localBudget, calibrationForModelKey, historyLocalBudget, adoptedProtectedToolsPolicy, protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, rememberCurrentToolOutputCount, currentReclaimableToolOutputCount, isRecord, TEXT_TAG_IDENTITY_MARKER, PI_FALLBACK_PREFIXES_JSON, contentTagOwnerMessageId, TailHygieneJsonMemo, piJsonHash, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, TODO_STATUSES, TODO_PRIORITIES, TITLE_DONE_STATUSES, normalizeTodoStateJson, buildSyntheticTodoPart, stripChannel1ReminderSpans, compareMeasuredTailPrefix, formatTailHygienePrefixMismatch, freezeTailHygieneMeasurement, effectiveTailHygiene, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, decideChannel1, evaluateChannel2, buildChannel2Reminder, buildChannel1Reminder, planEmergencyDrop, measureEmergencyTag, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, getPendingOpsCount, clearPendingOps, removePendingOp, updateTagByteSize2, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, updateTagInputByteSize2, updateTagTokenCount2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, scanTagOwnerSummary2, scanTagOwnerDelta2, updateTagInputTokenCount2, tagTokenCountIsNull2, backfillTagTokenCounts2, normalizeTagSnapshotRow2, insertTag2, updateTagStatus2, markTagDropped2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, PiTagIdentityConflictError2, getPiMessageTagCandidates2, findPiTagIdentityConflict2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTailHygieneTags2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
|