@equationalapplications/core-llm-wiki 9.18.0 → 9.18.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/{chunk-FX4J6MLA.mjs → chunk-HH2BH2HS.mjs} +11 -11
- package/dist/chunk-HH2BH2HS.mjs.map +1 -0
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-FX4J6MLA.mjs.map +0 -1
|
@@ -10236,6 +10236,14 @@ var DEFAULT_MAX_TOTAL_CHARS = 5e6;
|
|
|
10236
10236
|
function limitOr(value, fallback) {
|
|
10237
10237
|
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? Math.floor(value) : fallback;
|
|
10238
10238
|
}
|
|
10239
|
+
function listStoredSourcesSql(prefix) {
|
|
10240
|
+
return `SELECT d.source_ref, d.source_hash, d.char_count, d.created_at,
|
|
10241
|
+
(SELECT COUNT(*) FROM ${prefix}source_passages p
|
|
10242
|
+
WHERE p.document_id = d.id AND +p.entity_id = d.entity_id) AS passage_count
|
|
10243
|
+
FROM ${prefix}source_documents d
|
|
10244
|
+
WHERE d.entity_id = ?
|
|
10245
|
+
ORDER BY d.source_ref COLLATE BINARY`;
|
|
10246
|
+
}
|
|
10239
10247
|
var SourceStoreService = class {
|
|
10240
10248
|
constructor(db, prefix, options, jobManager) {
|
|
10241
10249
|
this.db = db;
|
|
@@ -10314,15 +10322,7 @@ var SourceStoreService = class {
|
|
|
10314
10322
|
}
|
|
10315
10323
|
/** Spec §4/§7: full store listing, including sources stored with no ingest. */
|
|
10316
10324
|
async listStoredSources(entityId) {
|
|
10317
|
-
const rows = await this.db.getAllAsync(
|
|
10318
|
-
`SELECT d.source_ref, d.source_hash, d.char_count, d.created_at,
|
|
10319
|
-
(SELECT COUNT(*) FROM ${this.prefix}source_passages p
|
|
10320
|
-
WHERE p.entity_id = d.entity_id AND p.document_id = d.id) AS passage_count
|
|
10321
|
-
FROM ${this.prefix}source_documents d
|
|
10322
|
-
WHERE d.entity_id = ?
|
|
10323
|
-
ORDER BY d.source_ref COLLATE BINARY`,
|
|
10324
|
-
[entityId]
|
|
10325
|
-
);
|
|
10325
|
+
const rows = await this.db.getAllAsync(listStoredSourcesSql(this.prefix), [entityId]);
|
|
10326
10326
|
return rows.map((r) => ({
|
|
10327
10327
|
sourceRef: r.source_ref,
|
|
10328
10328
|
sourceHash: r.source_hash,
|
|
@@ -12578,5 +12578,5 @@ var WriteService = class {
|
|
|
12578
12578
|
};
|
|
12579
12579
|
|
|
12580
12580
|
export { BaseRepository, CLASSIFIER_MAX_CHOICES, CURRENT_SCHEMA_VERSION, CheckpointIncompleteError, DEFAULT_CHUNK_OVERLAP, DEFAULT_MAX_CHUNK_LENGTH, DEFAULT_MAX_EMBED_CHARS, DEFAULT_TYPING_MIN_CONFIDENCE, DiagnosticBuffer, EMBED_CHARS_CEILING, EdgeRepository, EmbeddingService, EraseStepError, FTS5_DRAIN_CHUNK, FTS5_REBUILD_SNAPSHOT_KEY, FTS5_REBUILD_WM_KEY, FTS5_RECLAIM_MERGE_PAGES, FTS5_RETIRED_COUNTER_KEY, FTS5_RETIRED_TABLES_KEY, FTS5_STATE_KEY, FTS5_SWEEP_CURSOR_KEY, HEAL_ANCHORS_PER_CANDIDATE, HEAL_BATCH_SIZE, HEAL_MAX_FACT_BODY_CHARS_L3, HEAL_MAX_TASKS, HEAL_RECHECK_MS, HOOK_TIMEOUT_MARKER, ImportExportService, IngestionService, JobManager, MAX_EMBED_ATTEMPTS, MIGRATIONS, MaintenanceService, MetadataRepository, ONTOLOGY_ABSTAIN_SENTINEL, ONTOLOGY_BACKFILL_BATCH_SIZE, ONTOLOGY_BACKFILL_MAX_PROMPT_CHARS, ONTOLOGY_BACKFILL_RECHECK_MS, ONTOLOGY_BACKFILL_SYSTEM_PROMPT, PromptService, PrunePartialFailureError, RetrievalService, SearchService, SourceStoreService, TemporalService, UnavailableIndexStrategy, UsageMeter, VectorRemovalRepository, VectorRemovalService, WikiBusyError, WikiDraftNotFound, WikiDuplicateHashError, WikiExternalDeletionError, WikiGraphNodeOwnershipConflict, WikiIngestEmptyError, WikiInvalidReadOptions, WikiMigrationRequiredError, WikiParseError, WikiSearchUnavailableError, WikiSourceRefHashCollision, WikiStrictOntologyViolation, WikiSupersedeError, WikiTransactionError, WriteService, __privateAdd, __privateGet, __privateSet, assertEntityId, assertEpochMs, canEngageIngestTyping, canEngageWriteTyping, chunkText, configureRandomSource, createEntriesDeletedIndex, createEventsForgottenIndex, createLegacySourceTypeIndex, createdAtValue, detectSchemaVersion, drainChunkSql, drainHiSql, edgeTripleAllowed, emitDiagnostic, emptyManifest, entityDrainChunkSql, entityDrainHiSql, entitySummaryMetaKey, extractSqliteCode, factTokenCost, fts5LedgerDropSql, fts5PendingIndexesDdl, fts5TablesDdl, fts5TriggerNames, fts5TriggersDdl, generateId, idDrainChunkSql, idReindexChunkSql, isLiveAt, isReservedAbstainSlug, isRetiredTableName, isUsableDate, isWikiSearchUnavailableError, liveAtSql, nodeTypeReceipts, normalizeSourceHash, normalizeSourceRef, normalizeTitleKey, packFactsByBudget, parseEmbedding, parseJsonArray, parseJsonObject, parseStoredDerivedEvents, parseStoredSourcePointer, passageFtsTablesDdl, passageFtsTriggerNames, passageFtsTriggersDdl, probePendingWork, readRebuildProgress, reanchorRebuildFingerprint, resolveContextBudget, resolveContextBudgetOrThrow, resolveDefaultChunkLength, resolveEdgeDefinitions, resolveEdgesMinConfidence, resolveGrounding, resolveHealScreenMinConfidence, resolveLibrarianStrategy, resolveMaxPromptChars, resolveNodeType, resolveNodeTypeMatch, resolveResolveMinConfidence, resolveSystemOneEdges, resolveSystemOneHealScreen, resolveSystemOneResolve, resolveSystemOneTypeOnIngest, resolveSystemOneTypeOnWrite, resolveSystemOneTyping, resolveTypingMinConfidence, retiredTableName, runSourceRefNormalize, safeSlice, serializeDerivedEvents, serializeSourcePointer, setupDatabase, shouldEmitOntologyReceipt, sweepChunkSql, sweepHiSql, typeSatisfies, validUsage, validateDerivedEventsValue, validateInlineEdges, validateManifest, validateSourcePointerValue, warnChangedDefaultsOnce, warnOnce, windowChunkSql, windowHiSql, writeNormalizeStamp, writeRebuildStart };
|
|
12581
|
-
//# sourceMappingURL=chunk-
|
|
12582
|
-
//# sourceMappingURL=chunk-
|
|
12581
|
+
//# sourceMappingURL=chunk-HH2BH2HS.mjs.map
|
|
12582
|
+
//# sourceMappingURL=chunk-HH2BH2HS.mjs.map
|