@remnic/core 9.62.0 → 9.62.1
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/access-admin-ops-surface.js +11 -11
- package/dist/access-authorization-probe.js +12 -12
- package/dist/access-boundary.js +11 -11
- package/dist/access-cli.js +43 -43
- package/dist/access-extraction-force-flush.js +11 -11
- package/dist/access-http-query.js +11 -11
- package/dist/access-http.js +20 -20
- package/dist/access-identity-continuity-surface.js +11 -11
- package/dist/access-lcm-surface.js +11 -11
- package/dist/access-mcp.js +16 -16
- package/dist/access-namespace-preflight.js +11 -11
- package/dist/access-observe-write-surface.js +11 -11
- package/dist/access-operations-batch.js +12 -12
- package/dist/access-operations.js +15 -15
- package/dist/access-recall-concurrency.js +11 -11
- package/dist/access-recall-response.js +11 -11
- package/dist/access-recall-surface.js +11 -11
- package/dist/access-service.js +11 -11
- package/dist/access-surface-catalog.js +13 -13
- package/dist/active-memory-bridge.js +2 -2
- package/dist/active-recall.js +3 -3
- package/dist/briefing.js +4 -4
- package/dist/causal-consolidation.js +5 -5
- package/dist/{chunk-KAB7TZN3.js → chunk-3G6YU5YD.js} +2 -2
- package/dist/{chunk-XD4VGLDL.js → chunk-3XG4QEA2.js} +35 -31
- package/dist/chunk-3XG4QEA2.js.map +1 -0
- package/dist/{chunk-HEEEMJ26.js → chunk-4E67XCT2.js} +3 -3
- package/dist/{chunk-H32ANIFP.js → chunk-4G45LJJP.js} +2 -2
- package/dist/{chunk-4XAVQLBR.js → chunk-4Y2RHVCV.js} +2 -2
- package/dist/{chunk-S3B3UIQ3.js → chunk-67MKNKJQ.js} +2 -2
- package/dist/{chunk-PA5OPZX2.js → chunk-75U2FR7U.js} +2 -2
- package/dist/{chunk-I67HKRBF.js → chunk-7JAXC526.js} +2 -2
- package/dist/{chunk-3GPBFDXH.js → chunk-7PVTOZR4.js} +2 -2
- package/dist/{chunk-DSA47WBN.js → chunk-BHO3IVAN.js} +2 -2
- package/dist/{chunk-MYZ4NA43.js → chunk-DYDACAK2.js} +2 -2
- package/dist/{chunk-4JGSG7QN.js → chunk-ETCVSZLG.js} +2 -2
- package/dist/{chunk-EIQFIJDM.js → chunk-EU74U4GT.js} +2 -2
- package/dist/{chunk-L33N3BCA.js → chunk-GZRDOVQN.js} +2 -2
- package/dist/{chunk-AWRJBAIH.js → chunk-HKYNBEL4.js} +6 -6
- package/dist/{chunk-MJ4UGUR6.js → chunk-IIRK5V5Z.js} +2 -2
- package/dist/{chunk-2RIDW23Y.js → chunk-IXJ5U6ZL.js} +8 -8
- package/dist/{chunk-QRKYABS6.js → chunk-JDJOAL4B.js} +2 -2
- package/dist/{chunk-GN7HO2LA.js → chunk-JF6YSHJM.js} +7 -7
- package/dist/{chunk-D5HDJWNN.js → chunk-JLMH5YMU.js} +3 -3
- package/dist/{chunk-FW73HN33.js → chunk-K4WIUTNH.js} +2 -2
- package/dist/{chunk-TE4MKFT2.js → chunk-KCFZOSR6.js} +4 -4
- package/dist/{chunk-VWDTV6SH.js → chunk-KYI3CM42.js} +2 -2
- package/dist/{chunk-CIA6ZUBA.js → chunk-LAM6UDFV.js} +2 -2
- package/dist/{chunk-W4Q54HM3.js → chunk-LLLY5IBK.js} +2 -2
- package/dist/{chunk-CM4SZZBN.js → chunk-MJFDJTDC.js} +2 -2
- package/dist/{chunk-VOELBUS4.js → chunk-NXH34IPL.js} +2 -2
- package/dist/{chunk-MU3TPZOV.js → chunk-PBH2Z2NY.js} +2 -2
- package/dist/chunk-PJKTFXE2.js +119 -0
- package/dist/chunk-PJKTFXE2.js.map +1 -0
- package/dist/{chunk-G3YBWFUC.js → chunk-QN7XQEIT.js} +34 -17
- package/dist/chunk-QN7XQEIT.js.map +1 -0
- package/dist/{chunk-HQBVQICL.js → chunk-QNMNNFKD.js} +2 -2
- package/dist/{chunk-EGW4O32Z.js → chunk-QRA3XVJX.js} +7 -4
- package/dist/chunk-QRA3XVJX.js.map +1 -0
- package/dist/{chunk-L4DLLKPN.js → chunk-SZ4HFZKB.js} +2 -2
- package/dist/{chunk-N4OYPGZS.js → chunk-TLUSSS2F.js} +2 -2
- package/dist/{chunk-N4EPIKSY.js → chunk-U27G4E5G.js} +3 -3
- package/dist/{chunk-W3Y6FYRK.js → chunk-UIRU3MIJ.js} +2 -2
- package/dist/{chunk-URN7XWGC.js → chunk-WANOCU3K.js} +2 -2
- package/dist/{chunk-XDK6ZFLL.js → chunk-WTMG5GAK.js} +2 -2
- package/dist/{chunk-C3R732UY.js → chunk-XIABRKF6.js} +37 -32
- package/dist/chunk-XIABRKF6.js.map +1 -0
- package/dist/{chunk-D4OCJSLV.js → chunk-YDPAE2RD.js} +2 -2
- package/dist/{chunk-FQSDU634.js → chunk-YG56A6XY.js} +2 -2
- package/dist/{chunk-XBR5BAKW.js → chunk-YSUSUZR4.js} +3 -3
- package/dist/{chunk-YUIBXMZY.js → chunk-ZJKLGS76.js} +2 -2
- package/dist/cli.js +32 -32
- package/dist/compounding/engine.js +4 -4
- package/dist/config.js +3 -3
- package/dist/connectors/codex-materialize-runner.js +4 -4
- package/dist/connectors/index.js +4 -4
- package/dist/convergence-refresh.js +6 -6
- package/dist/corpus-watermark.js +6 -6
- package/dist/entity-retrieval.js +4 -4
- package/dist/external-wiki-access.js +12 -12
- package/dist/extraction-source-grounding.js +3 -3
- package/dist/extraction.js +7 -7
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +56 -43
- package/dist/maintenance/memory-governance.js +4 -4
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +4 -4
- package/dist/maintenance/rebuild-memory-projection.js +5 -5
- package/dist/namespaces/migrate.js +5 -5
- package/dist/namespaces/storage.js +4 -4
- package/dist/operator-doctor-corpus.js +7 -7
- package/dist/operator-toolkit.js +12 -12
- package/dist/orchestration/maintenance.js +9 -9
- package/dist/orchestrator.js +43 -43
- package/dist/provenance.js +2 -2
- package/dist/resume-bundles.js +4 -4
- package/dist/semantic-consolidation.js +5 -5
- package/dist/semantic-rule-promotion.js +4 -4
- package/dist/semantic-rule-verifier.js +4 -4
- package/dist/source-agent-qualifier.js +6 -6
- package/dist/storage.js +3 -3
- package/dist/support-passport/index.js +14 -14
- package/dist/verified-recall.js +4 -4
- package/dist/whitespace.d.ts +26 -1
- package/dist/whitespace.js +11 -3
- package/package.json +2 -2
- package/src/cli.ts +14 -13
- package/src/entity-retrieval.ts +4 -7
- package/src/harmonic-construction.test.ts +187 -2
- package/src/harmonic-retrieval.ts +54 -32
- package/src/index.ts +3 -4
- package/src/orchestration/recall-section-coordinator.ts +20 -14
- package/src/whitespace.test.ts +178 -0
- package/src/whitespace.ts +119 -0
- package/dist/chunk-6MKAMLQL.js +0 -16
- package/dist/chunk-6MKAMLQL.js.map +0 -1
- package/dist/chunk-C3R732UY.js.map +0 -1
- package/dist/chunk-EGW4O32Z.js.map +0 -1
- package/dist/chunk-G3YBWFUC.js.map +0 -1
- package/dist/chunk-XD4VGLDL.js.map +0 -1
- /package/dist/{chunk-KAB7TZN3.js.map → chunk-3G6YU5YD.js.map} +0 -0
- /package/dist/{chunk-HEEEMJ26.js.map → chunk-4E67XCT2.js.map} +0 -0
- /package/dist/{chunk-H32ANIFP.js.map → chunk-4G45LJJP.js.map} +0 -0
- /package/dist/{chunk-4XAVQLBR.js.map → chunk-4Y2RHVCV.js.map} +0 -0
- /package/dist/{chunk-S3B3UIQ3.js.map → chunk-67MKNKJQ.js.map} +0 -0
- /package/dist/{chunk-PA5OPZX2.js.map → chunk-75U2FR7U.js.map} +0 -0
- /package/dist/{chunk-I67HKRBF.js.map → chunk-7JAXC526.js.map} +0 -0
- /package/dist/{chunk-3GPBFDXH.js.map → chunk-7PVTOZR4.js.map} +0 -0
- /package/dist/{chunk-DSA47WBN.js.map → chunk-BHO3IVAN.js.map} +0 -0
- /package/dist/{chunk-MYZ4NA43.js.map → chunk-DYDACAK2.js.map} +0 -0
- /package/dist/{chunk-4JGSG7QN.js.map → chunk-ETCVSZLG.js.map} +0 -0
- /package/dist/{chunk-EIQFIJDM.js.map → chunk-EU74U4GT.js.map} +0 -0
- /package/dist/{chunk-L33N3BCA.js.map → chunk-GZRDOVQN.js.map} +0 -0
- /package/dist/{chunk-AWRJBAIH.js.map → chunk-HKYNBEL4.js.map} +0 -0
- /package/dist/{chunk-MJ4UGUR6.js.map → chunk-IIRK5V5Z.js.map} +0 -0
- /package/dist/{chunk-2RIDW23Y.js.map → chunk-IXJ5U6ZL.js.map} +0 -0
- /package/dist/{chunk-QRKYABS6.js.map → chunk-JDJOAL4B.js.map} +0 -0
- /package/dist/{chunk-GN7HO2LA.js.map → chunk-JF6YSHJM.js.map} +0 -0
- /package/dist/{chunk-D5HDJWNN.js.map → chunk-JLMH5YMU.js.map} +0 -0
- /package/dist/{chunk-FW73HN33.js.map → chunk-K4WIUTNH.js.map} +0 -0
- /package/dist/{chunk-TE4MKFT2.js.map → chunk-KCFZOSR6.js.map} +0 -0
- /package/dist/{chunk-VWDTV6SH.js.map → chunk-KYI3CM42.js.map} +0 -0
- /package/dist/{chunk-CIA6ZUBA.js.map → chunk-LAM6UDFV.js.map} +0 -0
- /package/dist/{chunk-W4Q54HM3.js.map → chunk-LLLY5IBK.js.map} +0 -0
- /package/dist/{chunk-CM4SZZBN.js.map → chunk-MJFDJTDC.js.map} +0 -0
- /package/dist/{chunk-VOELBUS4.js.map → chunk-NXH34IPL.js.map} +0 -0
- /package/dist/{chunk-MU3TPZOV.js.map → chunk-PBH2Z2NY.js.map} +0 -0
- /package/dist/{chunk-HQBVQICL.js.map → chunk-QNMNNFKD.js.map} +0 -0
- /package/dist/{chunk-L4DLLKPN.js.map → chunk-SZ4HFZKB.js.map} +0 -0
- /package/dist/{chunk-N4OYPGZS.js.map → chunk-TLUSSS2F.js.map} +0 -0
- /package/dist/{chunk-N4EPIKSY.js.map → chunk-U27G4E5G.js.map} +0 -0
- /package/dist/{chunk-W3Y6FYRK.js.map → chunk-UIRU3MIJ.js.map} +0 -0
- /package/dist/{chunk-URN7XWGC.js.map → chunk-WANOCU3K.js.map} +0 -0
- /package/dist/{chunk-XDK6ZFLL.js.map → chunk-WTMG5GAK.js.map} +0 -0
- /package/dist/{chunk-D4OCJSLV.js.map → chunk-YDPAE2RD.js.map} +0 -0
- /package/dist/{chunk-FQSDU634.js.map → chunk-YG56A6XY.js.map} +0 -0
- /package/dist/{chunk-XBR5BAKW.js.map → chunk-YSUSUZR4.js.map} +0 -0
- /package/dist/{chunk-YUIBXMZY.js.map → chunk-ZJKLGS76.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
ActivityStore,
|
|
15
15
|
MaintenanceScheduler
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KCFZOSR6.js";
|
|
17
17
|
import {
|
|
18
18
|
runPeerProfileReasoner
|
|
19
19
|
} from "./chunk-I74SUMNI.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
CompoundingEngine,
|
|
34
34
|
defaultTierMigrationCycleBudget
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-JDJOAL4B.js";
|
|
36
36
|
import {
|
|
37
37
|
SharedContextManager
|
|
38
38
|
} from "./chunk-VI637ILW.js";
|
|
@@ -159,7 +159,7 @@ import {
|
|
|
159
159
|
} from "./chunk-XXSOVESA.js";
|
|
160
160
|
import {
|
|
161
161
|
ExtractionEngine
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-JLMH5YMU.js";
|
|
163
163
|
import {
|
|
164
164
|
parseMemoryActionEligibilityContext
|
|
165
165
|
} from "./chunk-WFLBP5GC.js";
|
|
@@ -195,7 +195,7 @@ import {
|
|
|
195
195
|
buildEntityRecallSection,
|
|
196
196
|
entityRecentTranscriptLookbackHours,
|
|
197
197
|
readRecentEntityTranscriptEntries
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-QRA3XVJX.js";
|
|
199
199
|
import {
|
|
200
200
|
formatDaySummaryMemories
|
|
201
201
|
} from "./chunk-J6QIAYNR.js";
|
|
@@ -207,14 +207,14 @@ import {
|
|
|
207
207
|
} from "./chunk-DFEODULB.js";
|
|
208
208
|
import {
|
|
209
209
|
refreshConvergedNamespaces
|
|
210
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-QNMNNFKD.js";
|
|
211
211
|
import {
|
|
212
212
|
builtInConnectorPackageSpecifier,
|
|
213
213
|
ensureBuiltInWearableConnectors,
|
|
214
214
|
getWearableConnector,
|
|
215
215
|
listWearableConnectors,
|
|
216
216
|
screenCandidateFact
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-3XG4QEA2.js";
|
|
218
218
|
import {
|
|
219
219
|
normalizeReplaySessionKey
|
|
220
220
|
} from "./chunk-AJVLDJU6.js";
|
|
@@ -224,14 +224,14 @@ import {
|
|
|
224
224
|
import {
|
|
225
225
|
compareVerifiedEpisodeResults,
|
|
226
226
|
searchVerifiedEpisodes
|
|
227
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-IIRK5V5Z.js";
|
|
228
228
|
import {
|
|
229
229
|
ThreadingManager
|
|
230
230
|
} from "./chunk-OJP3N7UK.js";
|
|
231
231
|
import {
|
|
232
232
|
compareVerifiedSemanticRuleResults,
|
|
233
233
|
searchVerifiedSemanticRules
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-WANOCU3K.js";
|
|
235
235
|
import {
|
|
236
236
|
searchWorkProductLedgerEntries
|
|
237
237
|
} from "./chunk-WT6UL3UA.js";
|
|
@@ -244,18 +244,18 @@ import {
|
|
|
244
244
|
import {
|
|
245
245
|
runNamespaceMaintenanceFanout,
|
|
246
246
|
summarizeNamespaceMaintenanceHealth
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-IXJ5U6ZL.js";
|
|
248
248
|
import {
|
|
249
249
|
NamespaceCatalog,
|
|
250
250
|
planNamespaceMaintenance
|
|
251
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-TLUSSS2F.js";
|
|
252
252
|
import {
|
|
253
253
|
isAboveImportanceThreshold,
|
|
254
254
|
scoreImportance
|
|
255
255
|
} from "./chunk-JXS5PDQ7.js";
|
|
256
256
|
import {
|
|
257
257
|
searchHarmonicRetrieval
|
|
258
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-QN7XQEIT.js";
|
|
259
259
|
import {
|
|
260
260
|
EXTRACTION_JUDGE_VERDICT_CATEGORY,
|
|
261
261
|
recordJudgeVerdict
|
|
@@ -286,7 +286,7 @@ import {
|
|
|
286
286
|
materializeAfterSemanticConsolidation,
|
|
287
287
|
parseConsolidationResponse,
|
|
288
288
|
parseOperatorAwareConsolidationResponse
|
|
289
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-DYDACAK2.js";
|
|
290
290
|
import {
|
|
291
291
|
BootstrapEngine
|
|
292
292
|
} from "./chunk-MYVPLJOO.js";
|
|
@@ -304,7 +304,7 @@ import {
|
|
|
304
304
|
} from "./chunk-6TBIWIAG.js";
|
|
305
305
|
import {
|
|
306
306
|
detectMeetings
|
|
307
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-BHO3IVAN.js";
|
|
308
308
|
import {
|
|
309
309
|
compileCorrectionRule,
|
|
310
310
|
correctionsFilePath,
|
|
@@ -329,7 +329,7 @@ import {
|
|
|
329
329
|
} from "./chunk-KD3QD3A5.js";
|
|
330
330
|
import {
|
|
331
331
|
MeetingsInputError
|
|
332
|
-
} from "./chunk-
|
|
332
|
+
} from "./chunk-JF6YSHJM.js";
|
|
333
333
|
import {
|
|
334
334
|
WearablesInputError,
|
|
335
335
|
describeErrorForOperator
|
|
@@ -350,7 +350,7 @@ import {
|
|
|
350
350
|
filterRecallCandidates,
|
|
351
351
|
isGenericRecallExcludedPath,
|
|
352
352
|
isTopLevelArchivePath
|
|
353
|
-
} from "./chunk-
|
|
353
|
+
} from "./chunk-HKYNBEL4.js";
|
|
354
354
|
import {
|
|
355
355
|
importCapsule
|
|
356
356
|
} from "./chunk-QYN5PXDZ.js";
|
|
@@ -401,7 +401,7 @@ import {
|
|
|
401
401
|
} from "./chunk-7ZNJN5WZ.js";
|
|
402
402
|
import {
|
|
403
403
|
NamespaceStorageRouter
|
|
404
|
-
} from "./chunk-
|
|
404
|
+
} from "./chunk-67MKNKJQ.js";
|
|
405
405
|
import {
|
|
406
406
|
GraphIndex
|
|
407
407
|
} from "./chunk-YMOPYG3K.js";
|
|
@@ -457,7 +457,7 @@ import {
|
|
|
457
457
|
} from "./chunk-HXXGZ4KV.js";
|
|
458
458
|
import {
|
|
459
459
|
buildChainFollowupGenerator
|
|
460
|
-
} from "./chunk-
|
|
460
|
+
} from "./chunk-UIRU3MIJ.js";
|
|
461
461
|
import {
|
|
462
462
|
QmdResultResolver,
|
|
463
463
|
StorageManager,
|
|
@@ -476,7 +476,7 @@ import {
|
|
|
476
476
|
reconstructFusionInputs,
|
|
477
477
|
selfDeps,
|
|
478
478
|
serializeFusionDay
|
|
479
|
-
} from "./chunk-
|
|
479
|
+
} from "./chunk-ZJKLGS76.js";
|
|
480
480
|
import {
|
|
481
481
|
bodyIsEscaped,
|
|
482
482
|
decodeTranscriptBody,
|
|
@@ -581,6 +581,10 @@ import {
|
|
|
581
581
|
import {
|
|
582
582
|
parseOriginClass
|
|
583
583
|
} from "./chunk-6Q3ZTEF6.js";
|
|
584
|
+
import {
|
|
585
|
+
graphemeUnits,
|
|
586
|
+
truncateGraphemeSafe
|
|
587
|
+
} from "./chunk-PJKTFXE2.js";
|
|
584
588
|
import {
|
|
585
589
|
createBoundedCoreSectionRunner,
|
|
586
590
|
createRecallSectionMetricRecorder
|
|
@@ -2442,7 +2446,7 @@ var RecallSectionCoordinator = class {
|
|
|
2442
2446
|
let finalContent = trimmed;
|
|
2443
2447
|
if (maxChars === 0) return false;
|
|
2444
2448
|
if (!options.atomic && typeof maxChars === "number" && finalContent.length > maxChars) {
|
|
2445
|
-
finalContent = sectionId === "profile" ? this.truncateProfileToBoundary(finalContent, maxChars) : `${finalContent
|
|
2449
|
+
finalContent = sectionId === "profile" ? this.truncateProfileToBoundary(finalContent, maxChars) : `${truncateGraphemeSafe(finalContent, maxChars)}
|
|
2446
2450
|
|
|
2447
2451
|
...(trimmed)
|
|
2448
2452
|
`;
|
|
@@ -2470,27 +2474,28 @@ var RecallSectionCoordinator = class {
|
|
|
2470
2474
|
const contentLimit = maxChars - suffix.length;
|
|
2471
2475
|
if (contentLimit <= 0) {
|
|
2472
2476
|
const boundary2 = content.lastIndexOf("\n", maxChars);
|
|
2473
|
-
|
|
2477
|
+
const clipped2 = boundary2 > 0 ? content.slice(0, boundary2) : truncateGraphemeSafe(content, maxChars);
|
|
2478
|
+
return clipped2.trimEnd();
|
|
2474
2479
|
}
|
|
2475
2480
|
const boundary = content.lastIndexOf("\n", contentLimit);
|
|
2476
|
-
const
|
|
2477
|
-
return `${
|
|
2481
|
+
const clipped = boundary > 0 ? content.slice(0, boundary) : truncateGraphemeSafe(content, contentLimit);
|
|
2482
|
+
return `${clipped.trimEnd()}${suffix}`;
|
|
2478
2483
|
}
|
|
2479
2484
|
truncateRecallSectionToBudget(content, maxChars, maxTokens) {
|
|
2480
2485
|
if (maxChars <= 0 || maxTokens === 0) return "";
|
|
2481
2486
|
const suffix = "\n\n...(memory context trimmed)";
|
|
2482
|
-
const charBounded = content.length <= maxChars ? content : maxChars <= suffix.length ? content
|
|
2487
|
+
const charBounded = content.length <= maxChars ? content : maxChars <= suffix.length ? truncateGraphemeSafe(content, maxChars) : `${truncateGraphemeSafe(content, maxChars - suffix.length)}${suffix}`;
|
|
2483
2488
|
if (maxTokens === void 0 || estimateTokenCount(charBounded) <= maxTokens) {
|
|
2484
2489
|
return charBounded;
|
|
2485
2490
|
}
|
|
2486
2491
|
const markerFits = maxChars > suffix.length && estimateTokenCount(suffix) <= maxTokens;
|
|
2487
|
-
const tokenSource = content.length > maxChars ? content
|
|
2488
|
-
const
|
|
2492
|
+
const tokenSource = content.length > maxChars ? truncateGraphemeSafe(content, maxChars) : content;
|
|
2493
|
+
const units = graphemeUnits(tokenSource);
|
|
2489
2494
|
let low = 0;
|
|
2490
|
-
let high =
|
|
2495
|
+
let high = units.length;
|
|
2491
2496
|
while (low < high) {
|
|
2492
2497
|
const mid = Math.ceil((low + high) / 2);
|
|
2493
|
-
const prefix2 =
|
|
2498
|
+
const prefix2 = units.slice(0, mid).join("");
|
|
2494
2499
|
const candidate = markerFits ? `${prefix2}${suffix}` : prefix2;
|
|
2495
2500
|
if (candidate.length <= maxChars && estimateTokenCount(candidate) <= maxTokens) {
|
|
2496
2501
|
low = mid;
|
|
@@ -2500,19 +2505,19 @@ var RecallSectionCoordinator = class {
|
|
|
2500
2505
|
}
|
|
2501
2506
|
if (markerFits && low === 0) {
|
|
2502
2507
|
low = 0;
|
|
2503
|
-
high =
|
|
2508
|
+
high = units.length;
|
|
2504
2509
|
while (low < high) {
|
|
2505
2510
|
const mid = Math.ceil((low + high) / 2);
|
|
2506
|
-
const prefix2 =
|
|
2511
|
+
const prefix2 = units.slice(0, mid).join("");
|
|
2507
2512
|
if (prefix2.length <= maxChars && estimateTokenCount(prefix2) <= maxTokens) {
|
|
2508
2513
|
low = mid;
|
|
2509
2514
|
} else {
|
|
2510
2515
|
high = mid - 1;
|
|
2511
2516
|
}
|
|
2512
2517
|
}
|
|
2513
|
-
return
|
|
2518
|
+
return units.slice(0, low).join("");
|
|
2514
2519
|
}
|
|
2515
|
-
const prefix =
|
|
2520
|
+
const prefix = units.slice(0, low).join("");
|
|
2516
2521
|
return markerFits ? `${prefix}${suffix}` : prefix;
|
|
2517
2522
|
}
|
|
2518
2523
|
getRecallBudgetChars(override) {
|
|
@@ -27196,4 +27201,4 @@ export {
|
|
|
27196
27201
|
blendGraphExpandedRecallScore,
|
|
27197
27202
|
Orchestrator
|
|
27198
27203
|
};
|
|
27199
|
-
//# sourceMappingURL=chunk-
|
|
27204
|
+
//# sourceMappingURL=chunk-XIABRKF6.js.map
|