@equationalapplications/core-llm-wiki 9.4.0 → 9.4.3
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-T75YZCVX.mjs → chunk-TRLMWC5G.mjs} +18 -7
- package/dist/chunk-TRLMWC5G.mjs.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{testing-C2HwksLd.d.mts → testing-BVY5P6BS.d.mts} +2 -1
- package/dist/{testing-C2HwksLd.d.ts → testing-BVY5P6BS.d.ts} +2 -1
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +16 -5
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-T75YZCVX.mjs.map +0 -1
|
@@ -39,10 +39,13 @@ var SQLITE_RESULT_CODE_NAMES = {
|
|
|
39
39
|
27: "SQLITE_NOTICE",
|
|
40
40
|
28: "SQLITE_WARNING",
|
|
41
41
|
// Extended result codes (https://sqlite.org/rescode.html#extended_result_code_list).
|
|
42
|
-
// 2067 = SQLITE_CONSTRAINT_UNIQUE —
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
42
|
+
// 2067 = SQLITE_CONSTRAINT_UNIQUE — a UNIQUE index rejecting an INSERT/UPDATE.
|
|
43
|
+
// better-sqlite3 / node:sqlite enable extended result codes and report it
|
|
44
|
+
// directly. expo-sqlite never emits it (as of expo-sqlite 58.0.14, per
|
|
45
|
+
// #403): it leaves extended result codes off
|
|
46
|
+
// and surfaces the same failure as the primary code 19 with the
|
|
47
|
+
// "UNIQUE constraint failed" message text, which `extractSqliteCode` below
|
|
48
|
+
// refines back to this name (#403).
|
|
46
49
|
2067: "SQLITE_CONSTRAINT_UNIQUE",
|
|
47
50
|
// 267 = SQLITE_CORRUPT_VTAB — a corrupt FTS5 shadow table (ftsCorruptionClass).
|
|
48
51
|
267: "SQLITE_CORRUPT_VTAB",
|
|
@@ -58,7 +61,13 @@ function extractSqliteCode(err) {
|
|
|
58
61
|
if (typeof code === "string" && code.startsWith("SQLITE_")) return code;
|
|
59
62
|
if (typeof message === "string") {
|
|
60
63
|
const m = /^Error code (\d+):/.exec(message);
|
|
61
|
-
if (m)
|
|
64
|
+
if (m) {
|
|
65
|
+
const n = Number(m[1]);
|
|
66
|
+
if (n === 19 && message.includes("UNIQUE constraint failed")) {
|
|
67
|
+
return nameForSqliteResultCode(2067);
|
|
68
|
+
}
|
|
69
|
+
return nameForSqliteResultCode(n);
|
|
70
|
+
}
|
|
62
71
|
}
|
|
63
72
|
return void 0;
|
|
64
73
|
}
|
|
@@ -3675,6 +3684,8 @@ var TemporalService = class {
|
|
|
3675
3684
|
if (repl.superseded_by != null) throw new WikiSupersedeError("already_superseded");
|
|
3676
3685
|
const { predecessors } = await this.entryRepo.findSupersessionChainIds(entityId, oldId, HISTORY_MAX_DEPTH, tx);
|
|
3677
3686
|
if (predecessors.some((r) => r.id === newId)) throw new WikiSupersedeError("cycle");
|
|
3687
|
+
const start = old.valid_from ?? old.created_at;
|
|
3688
|
+
if (t <= start) throw new WikiSupersedeError("invalid_interval");
|
|
3678
3689
|
await this.entryRepo.setTemporal(oldId, entityId, { valid_to: t, superseded_by: newId, superseded_at: now }, tx);
|
|
3679
3690
|
if (repl.valid_from == null) {
|
|
3680
3691
|
await this.entryRepo.setTemporal(newId, entityId, { valid_from: t }, tx);
|
|
@@ -10695,5 +10706,5 @@ var WriteService = class {
|
|
|
10695
10706
|
};
|
|
10696
10707
|
|
|
10697
10708
|
export { BaseRepository, CURRENT_SCHEMA_VERSION, CheckpointIncompleteError, DEFAULT_CHUNK_OVERLAP, DEFAULT_MAX_CHUNK_LENGTH, DEFAULT_MAX_EMBED_CHARS, 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_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, chunkText, configureRandomSource, createLegacySourceTypeIndex, createdAtValue, detectSchemaVersion, drainChunkSql, drainHiSql, edgeTripleAllowed, emitDiagnostic, emptyManifest, entityDrainChunkSql, entityDrainHiSql, entitySummaryMetaKey, extractSqliteCode, factTokenCost, fts5LedgerDropSql, fts5PendingIndexesDdl, fts5TablesDdl, fts5TriggerNames, fts5TriggersDdl, generateId, idDrainChunkSql, idReindexChunkSql, isLiveAt, isRetiredTableName, isUsableDate, isWikiSearchUnavailableError, liveAtSql, normalizeSourceHash, normalizeSourceRef, normalizeTitleKey, packFactsByBudget, parseEmbedding, parseJsonArray, parseJsonObject, parseStoredSourcePointer, passageFtsTablesDdl, passageFtsTriggerNames, passageFtsTriggersDdl, probePendingWork, readRebuildProgress, reanchorRebuildFingerprint, resolveEdgeDefinitions, resolveGrounding, resolveLibrarianStrategy, resolveNodeType, retiredTableName, runSourceRefNormalize, safeSlice, serializeSourcePointer, setupDatabase, sweepChunkSql, sweepHiSql, typeSatisfies, validateInlineEdges, validateManifest, validateSourcePointerValue, warnChangedDefaultsOnce, windowChunkSql, windowHiSql, writeNormalizeStamp, writeRebuildStart };
|
|
10698
|
-
//# sourceMappingURL=chunk-
|
|
10699
|
-
//# sourceMappingURL=chunk-
|
|
10709
|
+
//# sourceMappingURL=chunk-TRLMWC5G.mjs.map
|
|
10710
|
+
//# sourceMappingURL=chunk-TRLMWC5G.mjs.map
|