sensemaking 0.19.2 → 0.21.0
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/README.md +0 -1
- package/dist/cjs/chunk/extract.d.cts +1 -0
- package/dist/cjs/chunk/extract.d.ts +1 -0
- package/dist/cjs/chunk/extract.js +23 -5
- package/dist/cjs/chunk/extract.js.map +1 -1
- package/dist/cjs/chunk/index.d.cts +1 -1
- package/dist/cjs/chunk/index.d.ts +1 -1
- package/dist/cjs/chunk/index.js +3 -0
- package/dist/cjs/chunk/index.js.map +1 -1
- package/dist/cjs/config/access.d.cts +0 -1
- package/dist/cjs/config/access.d.ts +0 -1
- package/dist/cjs/config/access.js +10 -17
- package/dist/cjs/config/access.js.map +1 -1
- package/dist/cjs/config/index.d.cts +1 -1
- package/dist/cjs/config/index.d.ts +1 -1
- package/dist/cjs/config/index.js +0 -3
- package/dist/cjs/config/index.js.map +1 -1
- package/dist/cjs/config/types.d.cts +0 -3
- package/dist/cjs/config/types.d.ts +0 -3
- package/dist/cjs/config/types.js.map +1 -1
- package/dist/cjs/config/validate.js +6 -24
- package/dist/cjs/config/validate.js.map +1 -1
- package/dist/cjs/errors.d.cts +1 -1
- package/dist/cjs/errors.d.ts +1 -1
- package/dist/cjs/errors.js.map +1 -1
- package/dist/cjs/features/links.js +4 -5
- package/dist/cjs/features/links.js.map +1 -1
- package/dist/cjs/features/sections.js +4 -1
- package/dist/cjs/features/sections.js.map +1 -1
- package/dist/cjs/scan/pool.d.cts +15 -0
- package/dist/cjs/scan/pool.d.ts +15 -0
- package/dist/cjs/scan/pool.js +263 -0
- package/dist/cjs/scan/pool.js.map +1 -0
- package/dist/cjs/scan/reparse.d.cts +2 -0
- package/dist/cjs/scan/reparse.d.ts +2 -0
- package/dist/cjs/scan/reparse.js +15 -76
- package/dist/cjs/scan/reparse.js.map +1 -1
- package/dist/cjs/store/builder.d.cts +19 -0
- package/dist/cjs/store/builder.d.ts +19 -0
- package/dist/cjs/store/builder.js +618 -0
- package/dist/cjs/store/builder.js.map +1 -0
- package/dist/cjs/store/duckdb/lexical.d.cts +1 -0
- package/dist/cjs/store/duckdb/lexical.d.ts +1 -0
- package/dist/cjs/store/duckdb/lexical.js +21 -5
- package/dist/cjs/store/duckdb/lexical.js.map +1 -1
- package/dist/cjs/store/duckdb/open.d.cts +9 -8
- package/dist/cjs/store/duckdb/open.d.ts +9 -8
- package/dist/cjs/store/duckdb/open.js +77 -123
- package/dist/cjs/store/duckdb/open.js.map +1 -1
- package/dist/cjs/store/duckdb/reconcile.js +34 -5
- package/dist/cjs/store/duckdb/reconcile.js.map +1 -1
- package/dist/cjs/store/duckdb/store.d.cts +1 -2
- package/dist/cjs/store/duckdb/store.d.ts +1 -2
- package/dist/cjs/store/duckdb/store.js +1 -26
- package/dist/cjs/store/duckdb/store.js.map +1 -1
- package/dist/cjs/store/embed-scope.d.cts +2 -0
- package/dist/cjs/store/embed-scope.d.ts +2 -0
- package/dist/cjs/store/embed-scope.js +85 -0
- package/dist/cjs/store/embed-scope.js.map +1 -0
- package/dist/cjs/store/feature-scope.d.cts +8 -0
- package/dist/cjs/store/feature-scope.d.ts +8 -0
- package/dist/cjs/store/feature-scope.js +107 -0
- package/dist/cjs/store/feature-scope.js.map +1 -0
- package/dist/cjs/store/index.d.cts +8 -3
- package/dist/cjs/store/index.d.ts +8 -3
- package/dist/cjs/store/index.js +36 -7
- package/dist/cjs/store/index.js.map +1 -1
- package/dist/cjs/store/open.d.cts +15 -0
- package/dist/cjs/store/open.d.ts +15 -0
- package/dist/cjs/store/open.js +608 -0
- package/dist/cjs/store/open.js.map +1 -0
- package/dist/cjs/store/preset-scope.d.cts +3 -0
- package/dist/cjs/store/preset-scope.d.ts +3 -0
- package/dist/cjs/store/preset-scope.js +293 -0
- package/dist/cjs/store/preset-scope.js.map +1 -0
- package/dist/cjs/store/reconcile.d.cts +2 -1
- package/dist/cjs/store/reconcile.d.ts +2 -1
- package/dist/cjs/store/reconcile.js +175 -179
- package/dist/cjs/store/reconcile.js.map +1 -1
- package/dist/cjs/store/{sqlite/signature.d.cts → signature.d.cts} +0 -3
- package/dist/cjs/store/{sqlite/signature.d.ts → signature.d.ts} +0 -3
- package/dist/cjs/store/signature.js +164 -0
- package/dist/cjs/store/signature.js.map +1 -0
- package/dist/cjs/store/sqlite/lexical.d.cts +1 -1
- package/dist/cjs/store/sqlite/lexical.d.ts +1 -1
- package/dist/cjs/store/sqlite/lexical.js +2 -2
- package/dist/cjs/store/sqlite/lexical.js.map +1 -1
- package/dist/cjs/store/sqlite/open.d.cts +8 -9
- package/dist/cjs/store/sqlite/open.d.ts +8 -9
- package/dist/cjs/store/sqlite/open.js +82 -311
- package/dist/cjs/store/sqlite/open.js.map +1 -1
- package/dist/cjs/store/sqlite/reconcile.d.cts +1 -1
- package/dist/cjs/store/sqlite/reconcile.d.ts +1 -1
- package/dist/cjs/store/sqlite/reconcile.js +78 -16
- package/dist/cjs/store/sqlite/reconcile.js.map +1 -1
- package/dist/cjs/store/sqlite/sql-functions.d.cts +1 -1
- package/dist/cjs/store/sqlite/sql-functions.d.ts +1 -1
- package/dist/cjs/store/sqlite/sql-functions.js +3 -3
- package/dist/cjs/store/sqlite/sql-functions.js.map +1 -1
- package/dist/cjs/store/sqlite/store.d.cts +1 -2
- package/dist/cjs/store/sqlite/store.d.ts +1 -2
- package/dist/cjs/store/sqlite/store.js +2 -15
- package/dist/cjs/store/sqlite/store.js.map +1 -1
- package/dist/cjs/store/turso/open.d.cts +6 -11
- package/dist/cjs/store/turso/open.d.ts +6 -11
- package/dist/cjs/store/turso/open.js +85 -171
- package/dist/cjs/store/turso/open.js.map +1 -1
- package/dist/cjs/store/turso/reconcile.d.cts +2 -0
- package/dist/cjs/store/turso/reconcile.d.ts +2 -0
- package/dist/cjs/store/turso/reconcile.js +88 -8
- package/dist/cjs/store/turso/reconcile.js.map +1 -1
- package/dist/cjs/store/turso/store.d.cts +1 -2
- package/dist/cjs/store/turso/store.d.ts +1 -2
- package/dist/cjs/store/turso/store.js +1 -13
- package/dist/cjs/store/turso/store.js.map +1 -1
- package/dist/cjs/store/types.d.cts +16 -6
- package/dist/cjs/store/types.d.ts +16 -6
- package/dist/cjs/store/types.js.map +1 -1
- package/dist/cjs/text/strip.js +3 -6
- package/dist/cjs/text/strip.js.map +1 -1
- package/dist/cjs/watch.js +28 -16
- package/dist/cjs/watch.js.map +1 -1
- package/dist/esm/chunk/extract.d.ts +1 -0
- package/dist/esm/chunk/extract.js +10 -2
- package/dist/esm/chunk/extract.js.map +1 -1
- package/dist/esm/chunk/index.d.ts +1 -1
- package/dist/esm/chunk/index.js +1 -1
- package/dist/esm/chunk/index.js.map +1 -1
- package/dist/esm/config/access.d.ts +0 -1
- package/dist/esm/config/access.js +12 -17
- package/dist/esm/config/access.js.map +1 -1
- package/dist/esm/config/index.d.ts +1 -1
- package/dist/esm/config/index.js +1 -1
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/config/types.d.ts +0 -3
- package/dist/esm/config/types.js.map +1 -1
- package/dist/esm/config/validate.js +6 -22
- package/dist/esm/config/validate.js.map +1 -1
- package/dist/esm/errors.d.ts +1 -1
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/features/links.js +3 -4
- package/dist/esm/features/links.js.map +1 -1
- package/dist/esm/features/sections.js +4 -1
- package/dist/esm/features/sections.js.map +1 -1
- package/dist/esm/scan/pool.d.ts +15 -0
- package/dist/esm/scan/pool.js +77 -0
- package/dist/esm/scan/pool.js.map +1 -0
- package/dist/esm/scan/reparse.d.ts +2 -0
- package/dist/esm/scan/reparse.js +11 -58
- package/dist/esm/scan/reparse.js.map +1 -1
- package/dist/esm/store/builder.d.ts +19 -0
- package/dist/esm/store/builder.js +163 -0
- package/dist/esm/store/builder.js.map +1 -0
- package/dist/esm/store/duckdb/lexical.d.ts +1 -0
- package/dist/esm/store/duckdb/lexical.js +22 -9
- package/dist/esm/store/duckdb/lexical.js.map +1 -1
- package/dist/esm/store/duckdb/open.d.ts +9 -8
- package/dist/esm/store/duckdb/open.js +36 -58
- package/dist/esm/store/duckdb/open.js.map +1 -1
- package/dist/esm/store/duckdb/reconcile.js +15 -3
- package/dist/esm/store/duckdb/reconcile.js.map +1 -1
- package/dist/esm/store/duckdb/store.d.ts +1 -2
- package/dist/esm/store/duckdb/store.js +2 -11
- package/dist/esm/store/duckdb/store.js.map +1 -1
- package/dist/esm/store/embed-scope.d.ts +2 -0
- package/dist/esm/store/embed-scope.js +28 -0
- package/dist/esm/store/embed-scope.js.map +1 -0
- package/dist/esm/store/feature-scope.d.ts +8 -0
- package/dist/esm/store/feature-scope.js +49 -0
- package/dist/esm/store/feature-scope.js.map +1 -0
- package/dist/esm/store/index.d.ts +8 -3
- package/dist/esm/store/index.js +22 -7
- package/dist/esm/store/index.js.map +1 -1
- package/dist/esm/store/open.d.ts +15 -0
- package/dist/esm/store/open.js +187 -0
- package/dist/esm/store/open.js.map +1 -0
- package/dist/esm/store/preset-scope.d.ts +3 -0
- package/dist/esm/store/preset-scope.js +77 -0
- package/dist/esm/store/preset-scope.js.map +1 -0
- package/dist/esm/store/reconcile.d.ts +2 -1
- package/dist/esm/store/reconcile.js +33 -6
- package/dist/esm/store/reconcile.js.map +1 -1
- package/dist/esm/store/{sqlite/signature.d.ts → signature.d.ts} +0 -3
- package/dist/esm/store/signature.js +37 -0
- package/dist/esm/store/signature.js.map +1 -0
- package/dist/esm/store/sqlite/lexical.d.ts +1 -1
- package/dist/esm/store/sqlite/lexical.js +4 -4
- package/dist/esm/store/sqlite/lexical.js.map +1 -1
- package/dist/esm/store/sqlite/open.d.ts +8 -9
- package/dist/esm/store/sqlite/open.js +41 -147
- package/dist/esm/store/sqlite/open.js.map +1 -1
- package/dist/esm/store/sqlite/reconcile.d.ts +1 -1
- package/dist/esm/store/sqlite/reconcile.js +14 -14
- package/dist/esm/store/sqlite/reconcile.js.map +1 -1
- package/dist/esm/store/sqlite/sql-functions.d.ts +1 -1
- package/dist/esm/store/sqlite/sql-functions.js +3 -3
- package/dist/esm/store/sqlite/sql-functions.js.map +1 -1
- package/dist/esm/store/sqlite/store.d.ts +1 -2
- package/dist/esm/store/sqlite/store.js +3 -9
- package/dist/esm/store/sqlite/store.js.map +1 -1
- package/dist/esm/store/turso/open.d.ts +6 -11
- package/dist/esm/store/turso/open.js +34 -78
- package/dist/esm/store/turso/open.js.map +1 -1
- package/dist/esm/store/turso/reconcile.d.ts +2 -0
- package/dist/esm/store/turso/reconcile.js +18 -3
- package/dist/esm/store/turso/reconcile.js.map +1 -1
- package/dist/esm/store/turso/store.d.ts +1 -2
- package/dist/esm/store/turso/store.js +2 -7
- package/dist/esm/store/turso/store.js.map +1 -1
- package/dist/esm/store/types.d.ts +16 -6
- package/dist/esm/store/types.js.map +1 -1
- package/dist/esm/text/strip.js +3 -4
- package/dist/esm/text/strip.js.map +1 -1
- package/dist/esm/watch.js +5 -3
- package/dist/esm/watch.js.map +1 -1
- package/package.json +4 -3
- package/schema.json +0 -11
- package/dist/cjs/store/sqlite/signature.js +0 -380
- package/dist/cjs/store/sqlite/signature.js.map +0 -1
- package/dist/esm/store/sqlite/signature.js +0 -58
- package/dist/esm/store/sqlite/signature.js.map +0 -1
|
@@ -19,7 +19,6 @@ _export(exports, {
|
|
|
19
19
|
return sqliteDialect;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
var _indexts = require("../../config/index.js");
|
|
23
22
|
var _errorsts = require("../../errors.js");
|
|
24
23
|
var _segmentts = require("../../text/segment.js");
|
|
25
24
|
var _sharedts = require("../shared.js");
|
|
@@ -154,21 +153,20 @@ function _ts_generator(thisArg, body) {
|
|
|
154
153
|
// SQLite's compile-time SQLITE_MAX_COLUMN, default 2000 (https://www.sqlite.org/limits.html).
|
|
155
154
|
var MAX_FRONTMATTER_COLUMNS = 2000;
|
|
156
155
|
var INSERT_CONTENT_SQL = 'INSERT INTO content (rowid, title, summary, text, "path", title_seg, summary_seg, text_seg) VALUES ((SELECT rowid FROM frontmatter WHERE "path" = ?), ?, ?, ?, ?, ?, ?, ?)';
|
|
157
|
-
function contentRow(doc
|
|
156
|
+
function contentRow(doc) {
|
|
158
157
|
return [
|
|
159
158
|
doc.relPath,
|
|
160
159
|
doc.search.title,
|
|
161
160
|
doc.search.summary,
|
|
162
161
|
doc.search.text,
|
|
163
162
|
doc.relPath,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
(0, _segmentts.segmentField)(doc.search.title),
|
|
164
|
+
(0, _segmentts.segmentField)(doc.search.summary),
|
|
165
|
+
(0, _segmentts.segmentField)(doc.search.text)
|
|
167
166
|
];
|
|
168
167
|
}
|
|
169
|
-
function reconcileContent(conn, touched, docs, _delta,
|
|
168
|
+
function reconcileContent(conn, touched, docs, _delta, _cfg) {
|
|
170
169
|
return _async_to_generator(function() {
|
|
171
|
-
var segmenting;
|
|
172
170
|
return _ts_generator(this, function(_state) {
|
|
173
171
|
switch(_state.label){
|
|
174
172
|
case 0:
|
|
@@ -192,19 +190,85 @@ function reconcileContent(conn, touched, docs, _delta, cfg) {
|
|
|
192
190
|
3,
|
|
193
191
|
4
|
|
194
192
|
];
|
|
195
|
-
// A non-default tokenizer means the tree has chosen its own scheme; a phrase query over
|
|
196
|
-
// grapheme runs would be nonsense against trigram, so the sidecars stay empty.
|
|
197
|
-
segmenting = (0, _indexts.contentTokenize)(cfg) === undefined;
|
|
198
193
|
return [
|
|
199
194
|
4,
|
|
200
|
-
conn.runBatch(INSERT_CONTENT_SQL, docs.map(
|
|
201
|
-
|
|
202
|
-
|
|
195
|
+
conn.runBatch(INSERT_CONTENT_SQL, docs.map(contentRow))
|
|
196
|
+
];
|
|
197
|
+
case 3:
|
|
198
|
+
_state.sent();
|
|
199
|
+
_state.label = 4;
|
|
200
|
+
case 4:
|
|
201
|
+
return [
|
|
202
|
+
2
|
|
203
|
+
];
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
})();
|
|
207
|
+
}
|
|
208
|
+
// SQLite's ADD COLUMN is metadata-only, so a loop costs nothing extra over one statement.
|
|
209
|
+
function addColumns(conn, names) {
|
|
210
|
+
return _async_to_generator(function() {
|
|
211
|
+
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, name, err;
|
|
212
|
+
return _ts_generator(this, function(_state) {
|
|
213
|
+
switch(_state.label){
|
|
214
|
+
case 0:
|
|
215
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
216
|
+
_state.label = 1;
|
|
217
|
+
case 1:
|
|
218
|
+
_state.trys.push([
|
|
219
|
+
1,
|
|
220
|
+
6,
|
|
221
|
+
7,
|
|
222
|
+
8
|
|
223
|
+
]);
|
|
224
|
+
_iterator = names[Symbol.iterator]();
|
|
225
|
+
_state.label = 2;
|
|
226
|
+
case 2:
|
|
227
|
+
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
228
|
+
3,
|
|
229
|
+
5
|
|
230
|
+
];
|
|
231
|
+
name = _step.value;
|
|
232
|
+
return [
|
|
233
|
+
4,
|
|
234
|
+
conn.exec("ALTER TABLE frontmatter ADD COLUMN ".concat((0, _sharedts.quoteIdent)(name)))
|
|
203
235
|
];
|
|
204
236
|
case 3:
|
|
205
237
|
_state.sent();
|
|
206
238
|
_state.label = 4;
|
|
207
239
|
case 4:
|
|
240
|
+
_iteratorNormalCompletion = true;
|
|
241
|
+
return [
|
|
242
|
+
3,
|
|
243
|
+
2
|
|
244
|
+
];
|
|
245
|
+
case 5:
|
|
246
|
+
return [
|
|
247
|
+
3,
|
|
248
|
+
8
|
|
249
|
+
];
|
|
250
|
+
case 6:
|
|
251
|
+
err = _state.sent();
|
|
252
|
+
_didIteratorError = true;
|
|
253
|
+
_iteratorError = err;
|
|
254
|
+
return [
|
|
255
|
+
3,
|
|
256
|
+
8
|
|
257
|
+
];
|
|
258
|
+
case 7:
|
|
259
|
+
try {
|
|
260
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
261
|
+
_iterator.return();
|
|
262
|
+
}
|
|
263
|
+
} finally{
|
|
264
|
+
if (_didIteratorError) {
|
|
265
|
+
throw _iteratorError;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return [
|
|
269
|
+
7
|
|
270
|
+
];
|
|
271
|
+
case 8:
|
|
208
272
|
return [
|
|
209
273
|
2
|
|
210
274
|
];
|
|
@@ -223,9 +287,7 @@ var sqliteDialect = {
|
|
|
223
287
|
throw new _errorsts.SenseError('COLUMN_LIMIT', "frontmatter would need ".concat(count, " columns, crossing SQLite's compile-time SQLITE_MAX_COLUMN limit (default ").concat(MAX_FRONTMATTER_COLUMNS, "; see https://www.sqlite.org/limits.html). Narrow the presets' include globs so fewer/other files are indexed, or fix whatever is generating unbounded frontmatter keys."));
|
|
224
288
|
}
|
|
225
289
|
},
|
|
226
|
-
|
|
227
|
-
return '';
|
|
228
|
-
},
|
|
290
|
+
addColumns: addColumns,
|
|
229
291
|
reconcileContent: reconcileContent,
|
|
230
292
|
recordDuration: _sharedts.recordReconcileDuration
|
|
231
293
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/sensemaking/src/store/sqlite/reconcile.ts"],"sourcesContent":["import type { Config } from '../../config/index.ts';\nimport {
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/sensemaking/src/store/sqlite/reconcile.ts"],"sourcesContent":["import type { Config } from '../../config/index.ts';\nimport { SenseError } from '../../errors.ts';\nimport type { ReconcileDelta } from '../../features/types.ts';\nimport type { ParsedDoc } from '../../scan/index.ts';\nimport { segmentField } from '../../text/segment.ts';\nimport { quoteIdent, recordReconcileDuration } from '../shared.ts';\nimport { BEGIN_WRITE } from '../transaction.ts';\nimport type { Connection, ReconcileDialect } from '../types.ts';\n\n// This store's dialect (types.ts's ReconcileDialect) for the shared orchestration in\n// store/reconcile.ts. content is FTS5-virtual with \"_seg\" sidecars for lexical.ts.\n\n// SQLite's compile-time SQLITE_MAX_COLUMN, default 2000 (https://www.sqlite.org/limits.html).\nconst MAX_FRONTMATTER_COLUMNS = 2000;\n\n// Shared by reconcileContent() and the tokenize-only rebuild in open.ts, so both prepare the\n// same literal instead of two copies drifting apart.\nexport const INSERT_CONTENT_SQL = `INSERT INTO content (rowid, title, summary, text, \"path\", title_seg, summary_seg, text_seg) VALUES ((SELECT rowid FROM frontmatter WHERE \"path\" = ?), ?, ?, ?, ?, ?, ?, ?)`;\n\n// A single content row's param tuple, matching INSERT_CONTENT_SQL's placeholder order.\n// Assumes the frontmatter row for doc.relPath already exists (rowid subquery).\nexport function contentRow(doc: ParsedDoc): unknown[] {\n return [doc.relPath, doc.search.title, doc.search.summary, doc.search.text, doc.relPath, segmentField(doc.search.title), segmentField(doc.search.summary), segmentField(doc.search.text)];\n}\n\nasync function reconcileContent(conn: Connection, touched: string[], docs: ParsedDoc[], _delta: ReconcileDelta, _cfg: Config): Promise<void> {\n // FTS5 has no upsert, so delete-before-insert, coupled to the frontmatter rowid (indexed via\n // its PRIMARY KEY) rather than the UNINDEXED `path` column, which a per-row DELETE would scan to find.\n // `touched` already covers a path a concurrent reconcile turned out to have created first --\n // see reconcile.ts's post-lock revalidation, which folds such paths in before calling here.\n if (touched.length > 0)\n await conn.runBatch(\n 'DELETE FROM content WHERE rowid = (SELECT rowid FROM frontmatter WHERE \"path\" = ?)',\n touched.map((p) => [p])\n );\n\n if (docs.length > 0) await conn.runBatch(INSERT_CONTENT_SQL, docs.map(contentRow));\n}\n\n// SQLite's ADD COLUMN is metadata-only, so a loop costs nothing extra over one statement.\nasync function addColumns(conn: Connection, names: string[]): Promise<void> {\n for (const name of names) await conn.exec(`ALTER TABLE frontmatter ADD COLUMN ${quoteIdent(name)}`);\n}\n\nexport const sqliteDialect: ReconcileDialect = {\n beginMode: () => BEGIN_WRITE,\n checkColumnLimit(count) {\n // Fence before ALTERing: SQLite's own failure past this point is a raw\n // \"too many columns on sqlite_altertab_frontmatter\" with no indication of the boundary or the levers.\n if (count > MAX_FRONTMATTER_COLUMNS) {\n throw new SenseError(\n 'COLUMN_LIMIT',\n `frontmatter would need ${count} columns, crossing SQLite's compile-time SQLITE_MAX_COLUMN limit (default ${MAX_FRONTMATTER_COLUMNS}; see https://www.sqlite.org/limits.html). Narrow the presets' include globs so fewer/other files are indexed, or fix whatever is generating unbounded frontmatter keys.`\n );\n }\n },\n addColumns,\n reconcileContent,\n recordDuration: recordReconcileDuration,\n};\n"],"names":["INSERT_CONTENT_SQL","contentRow","sqliteDialect","MAX_FRONTMATTER_COLUMNS","doc","relPath","search","title","summary","text","segmentField","reconcileContent","conn","touched","docs","_delta","_cfg","length","runBatch","map","p","addColumns","names","name","exec","quoteIdent","beginMode","BEGIN_WRITE","checkColumnLimit","count","SenseError","recordDuration","recordReconcileDuration"],"mappings":";;;;;;;;;;;QAiBaA;eAAAA;;QAIGC;eAAAA;;QAuBHC;eAAAA;;;wBA3Cc;yBAGE;wBACuB;6BACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG5B,qFAAqF;AACrF,mFAAmF;AAEnF,8FAA8F;AAC9F,IAAMC,0BAA0B;AAIzB,IAAMH,qBAAqB;AAI3B,SAASC,WAAWG,GAAc;IACvC,OAAO;QAACA,IAAIC,OAAO;QAAED,IAAIE,MAAM,CAACC,KAAK;QAAEH,IAAIE,MAAM,CAACE,OAAO;QAAEJ,IAAIE,MAAM,CAACG,IAAI;QAAEL,IAAIC,OAAO;QAAEK,IAAAA,uBAAY,EAACN,IAAIE,MAAM,CAACC,KAAK;QAAGG,IAAAA,uBAAY,EAACN,IAAIE,MAAM,CAACE,OAAO;QAAGE,IAAAA,uBAAY,EAACN,IAAIE,MAAM,CAACG,IAAI;KAAE;AAC3L;AAEA,SAAeE,iBAAiBC,IAAgB,EAAEC,OAAiB,EAAEC,IAAiB,EAAEC,MAAsB,EAAEC,IAAY;;;;;yBAKtHH,CAAAA,QAAQI,MAAM,GAAG,CAAA,GAAjBJ;;;;oBACF;;wBAAMD,KAAKM,QAAQ,CACjB,sFACAL,QAAQM,GAAG,CAAC,SAACC;mCAAM;gCAACA;6BAAE;;;;oBAFxB;;;yBAKEN,CAAAA,KAAKG,MAAM,GAAG,CAAA,GAAdH;;;;oBAAiB;;wBAAMF,KAAKM,QAAQ,CAAClB,oBAAoBc,KAAKK,GAAG,CAAClB;;;oBAAjD;;;;;;;;IACvB;;AAEA,0FAA0F;AAC1F,SAAeoB,WAAWT,IAAgB,EAAEU,KAAe;;YACpD,2BAAA,mBAAA,gBAAA,WAAA,OAAMC;;;;oBAAN,kCAAA,2BAAA;;;;;;;;;oBAAA,YAAcD;;;2BAAd,6BAAA,QAAA;;;;oBAAMC,OAAN;oBAAqB;;wBAAMX,KAAKY,IAAI,CAAC,AAAC,sCAAsD,OAAjBC,IAAAA,oBAAU,EAACF;;;oBAAjE;;;oBAArB;;;;;;;;;;;;oBAAA;oBAAA;;;;;;;6BAAA,6BAAA;4BAAA;;;4BAAA;kCAAA;;;;;;;;;;;;IACP;;AAEO,IAAMrB,gBAAkC;IAC7CwB,WAAW,SAAXA;eAAiBC,0BAAW;;IAC5BC,kBAAAA,SAAAA,iBAAiBC,KAAK;QACpB,uEAAuE;QACvE,sGAAsG;QACtG,IAAIA,QAAQ1B,yBAAyB;YACnC,MAAM,IAAI2B,oBAAU,CAClB,gBACA,AAAC,0BAA2G3B,OAAlF0B,OAAM,8EAAoG,OAAxB1B,yBAAwB;QAExI;IACF;IACAkB,YAAAA;IACAV,kBAAAA;IACAoB,gBAAgBC,iCAAuB;AACzC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
export declare function registerFunctions(db: DatabaseSync
|
|
2
|
+
export declare function registerFunctions(db: DatabaseSync): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
export declare function registerFunctions(db: DatabaseSync
|
|
2
|
+
export declare function registerFunctions(db: DatabaseSync): void;
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "registerFunctions", {
|
|
|
10
10
|
});
|
|
11
11
|
var _segmentts = require("../../text/segment.js");
|
|
12
12
|
var _sqlfunctionsts = require("../sql-functions.js");
|
|
13
|
-
function registerFunctions(db
|
|
13
|
+
function registerFunctions(db) {
|
|
14
14
|
db.function('has', {
|
|
15
15
|
deterministic: true,
|
|
16
16
|
varargs: false
|
|
@@ -20,13 +20,13 @@ function registerFunctions(db, segmenting) {
|
|
|
20
20
|
varargs: true
|
|
21
21
|
}, _sqlfunctionsts.basenameImpl);
|
|
22
22
|
// Raw `content MATCH '<unspaced text>'` cannot be rewritten behind the author's back and matches
|
|
23
|
-
// nothing, so the same transform is available to hand-written SQL by name.
|
|
23
|
+
// nothing, so the same transform is available to hand-written SQL by name.
|
|
24
24
|
db.function('segment', {
|
|
25
25
|
deterministic: true,
|
|
26
26
|
varargs: false
|
|
27
27
|
}, function(terms) {
|
|
28
28
|
var text = terms === null || terms === undefined ? '' : String(terms);
|
|
29
|
-
return
|
|
29
|
+
return (0, _segmentts.segmentMatch)(text);
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
/* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/sensemaking/src/store/sqlite/sql-functions.ts"],"sourcesContent":["import type { DatabaseSync } from 'node:sqlite';\nimport { segmentMatch } from '../../text/segment.ts';\nimport { basenameImpl, hasImpl } from '../sql-functions.ts';\n\nexport function registerFunctions(db: DatabaseSync
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/sensemaking/src/store/sqlite/sql-functions.ts"],"sourcesContent":["import type { DatabaseSync } from 'node:sqlite';\nimport { segmentMatch } from '../../text/segment.ts';\nimport { basenameImpl, hasImpl } from '../sql-functions.ts';\n\nexport function registerFunctions(db: DatabaseSync): void {\n db.function('has', { deterministic: true, varargs: false }, hasImpl);\n\n db.function('basename', { deterministic: true, varargs: true }, basenameImpl);\n\n // Raw `content MATCH '<unspaced text>'` cannot be rewritten behind the author's back and matches\n // nothing, so the same transform is available to hand-written SQL by name.\n db.function('segment', { deterministic: true, varargs: false }, (terms: unknown): string => {\n const text = terms === null || terms === undefined ? '' : String(terms);\n return segmentMatch(text);\n });\n}\n"],"names":["registerFunctions","db","function","deterministic","varargs","hasImpl","basenameImpl","terms","text","undefined","String","segmentMatch"],"mappings":";;;;+BAIgBA;;;eAAAA;;;yBAHa;8BACS;AAE/B,SAASA,kBAAkBC,EAAgB;IAChDA,GAAGC,QAAQ,CAAC,OAAO;QAAEC,eAAe;QAAMC,SAAS;IAAM,GAAGC,uBAAO;IAEnEJ,GAAGC,QAAQ,CAAC,YAAY;QAAEC,eAAe;QAAMC,SAAS;IAAK,GAAGE,4BAAY;IAE5E,iGAAiG;IACjG,2EAA2E;IAC3EL,GAAGC,QAAQ,CAAC,WAAW;QAAEC,eAAe;QAAMC,SAAS;IAAM,GAAG,SAACG;QAC/D,IAAMC,OAAOD,UAAU,QAAQA,UAAUE,YAAY,KAAKC,OAAOH;QACjE,OAAOI,IAAAA,uBAAY,EAACH;IACtB;AACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { Config } from '../../config/index.js';
|
|
3
2
|
import type { Capability, Connection, Store } from '../types.js';
|
|
4
3
|
export declare const CAPABILITIES: ReadonlySet<Capability>;
|
|
5
|
-
export declare function createStore(db: DatabaseSync, conn: Connection
|
|
4
|
+
export declare function createStore(db: DatabaseSync, conn: Connection): Store;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import type { Config } from '../../config/index.js';
|
|
3
2
|
import type { Capability, Connection, Store } from '../types.js';
|
|
4
3
|
export declare const CAPABILITIES: ReadonlySet<Capability>;
|
|
5
|
-
export declare function createStore(db: DatabaseSync, conn: Connection
|
|
4
|
+
export declare function createStore(db: DatabaseSync, conn: Connection): Store;
|
|
@@ -16,14 +16,11 @@ _export(exports, {
|
|
|
16
16
|
return createStore;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
var _indexts = require("../../config/index.js");
|
|
20
|
-
var _reconcilets = require("../reconcile.js");
|
|
21
19
|
var _sharedts = require("../shared.js");
|
|
22
20
|
var _transactionts = require("../transaction.js");
|
|
23
21
|
var _vectorsts = require("../vectors.js");
|
|
24
22
|
var _fieldStatsts = require("./fieldStats.js");
|
|
25
23
|
var _lexicalts = require("./lexical.js");
|
|
26
|
-
var _reconcilets1 = require("./reconcile.js");
|
|
27
24
|
var _vectorsts1 = require("./vectors.js");
|
|
28
25
|
function _array_like_to_array(arr, len) {
|
|
29
26
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -371,7 +368,7 @@ var CAPABILITIES = new Set([
|
|
|
371
368
|
'vectors',
|
|
372
369
|
'sql-functions'
|
|
373
370
|
]);
|
|
374
|
-
function createStore(db, conn
|
|
371
|
+
function createStore(db, conn) {
|
|
375
372
|
return {
|
|
376
373
|
name: 'sqlite',
|
|
377
374
|
capabilities: CAPABILITIES,
|
|
@@ -431,16 +428,6 @@ function createStore(db, conn, cfg, baseDir) {
|
|
|
431
428
|
});
|
|
432
429
|
})();
|
|
433
430
|
},
|
|
434
|
-
reconcile: function reconcile() {
|
|
435
|
-
return _async_to_generator(function() {
|
|
436
|
-
return _ts_generator(this, function(_state) {
|
|
437
|
-
return [
|
|
438
|
-
2,
|
|
439
|
-
(0, _reconcilets.reconcile)(conn, cfg, baseDir, _reconcilets1.sqliteDialect)
|
|
440
|
-
];
|
|
441
|
-
});
|
|
442
|
-
})();
|
|
443
|
-
},
|
|
444
431
|
docs: {
|
|
445
432
|
columns: function columns() {
|
|
446
433
|
return _async_to_generator(function() {
|
|
@@ -479,7 +466,7 @@ function createStore(db, conn, cfg, baseDir) {
|
|
|
479
466
|
return _ts_generator(this, function(_state) {
|
|
480
467
|
return [
|
|
481
468
|
2,
|
|
482
|
-
(0, _lexicalts.queryLexical)(conn, terms, opts
|
|
469
|
+
(0, _lexicalts.queryLexical)(conn, terms, opts)
|
|
483
470
|
];
|
|
484
471
|
});
|
|
485
472
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/sensemaking/src/store/sqlite/store.ts"],"sourcesContent":["import type { DatabaseSync } from 'node:sqlite';\nimport
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/ai/sensemaking/src/store/sqlite/store.ts"],"sourcesContent":["import type { DatabaseSync } from 'node:sqlite';\nimport { getColumns } from '../shared.ts';\nimport { withTransaction } from '../transaction.ts';\nimport type { Capability, Connection, Statement, Store, VectorWriteRow } from '../types.ts';\nimport { hasVectorRow, pendingRows } from '../vectors.ts';\nimport { fieldStats } from './fieldStats.ts';\nimport { queryLexical } from './lexical.ts';\nimport { scanCandidates, scanSimilar, writeVectorBatch } from './vectors.ts';\n\nexport const CAPABILITIES: ReadonlySet<Capability> = new Set(['phrases', 'snippets', 'watch-concurrency', 'lexical', 'vectors', 'sql-functions']);\n\n// Wraps the synchronous DatabaseSync connection in the async Store interface, sharing one\n// Connection instance (conn) with the builder's own reconcile call so transaction depth is tracked against the same object everywhere.\nexport function createStore(db: DatabaseSync, conn: Connection): Store {\n return {\n name: 'sqlite',\n capabilities: CAPABILITIES,\n async exec(sql: string): Promise<void> {\n await conn.exec(sql);\n },\n async prepare(sql: string): Promise<Statement> {\n return conn.prepare(sql);\n },\n async runBatch(sql: string, paramRows: unknown[][]): Promise<void> {\n await conn.runBatch(sql, paramRows);\n },\n async transaction<T>(fn: () => Promise<T>): Promise<T> {\n return withTransaction(conn, fn);\n },\n docs: {\n async columns() {\n return [...(await getColumns(conn))];\n },\n async fieldStats(columns, scopeWhere) {\n return fieldStats(conn, columns, scopeWhere);\n },\n },\n lexical: {\n async query(terms, opts) {\n return queryLexical(conn, terms, opts);\n },\n },\n vectors: {\n async pending() {\n return pendingRows(conn);\n },\n async writeVectors(rows: VectorWriteRow[]) {\n await writeVectorBatch(conn, rows);\n },\n async candidates(qv, storeDims, fetch, allowed) {\n return scanCandidates(conn, qv, storeDims, fetch, allowed);\n },\n async similar(path, opts) {\n return scanSimilar(conn, path, opts);\n },\n async hasVector(path) {\n return hasVectorRow(conn, path);\n },\n },\n async engineStatus() {\n // Read back rather than recomputed: this is what open() actually set (3x the largest\n // recorded reconcile, floored at 30s, capped at 10min), not a value re-derived here.\n const row = db.prepare('PRAGMA busy_timeout').get() as { timeout: number };\n return { busy_timeout: `${row.timeout}ms (derived: 3x the largest reconcile this cache has recorded, floored at 30000ms)` };\n },\n raw: {\n async prepare(sql: string) {\n const stmt = db.prepare(sql);\n stmt.setReadBigInts(true); // int64 past 2^53 arrives as BigInt instead of throwing at step time\n return {\n columns: () => stmt.columns(),\n // sense sql streams through an async iterator wrapping the sync iterate().\n iterate: async function* (...params: unknown[]) {\n yield* stmt.iterate(...(params as Parameters<typeof stmt.iterate>));\n },\n };\n },\n },\n async close() {\n db.close();\n },\n };\n}\n"],"names":["CAPABILITIES","createStore","Set","db","conn","name","capabilities","exec","sql","prepare","runBatch","paramRows","transaction","fn","withTransaction","docs","columns","getColumns","fieldStats","scopeWhere","lexical","query","terms","opts","queryLexical","vectors","pending","pendingRows","writeVectors","rows","writeVectorBatch","candidates","qv","storeDims","fetch","allowed","scanCandidates","similar","path","scanSimilar","hasVector","hasVectorRow","engineStatus","row","get","busy_timeout","timeout","raw","stmt","setReadBigInts","iterate","params","close"],"mappings":"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"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
+
import type { Database } from '@tursodatabase/database';
|
|
1
2
|
import type { ResolvedConfig } from '../../config/index.js';
|
|
2
|
-
import type {
|
|
3
|
+
import type { OpenResult } from '../open.js';
|
|
4
|
+
import type { OpenDialect } from '../types.js';
|
|
3
5
|
export declare const DB_FILENAME = "cache.turso.db";
|
|
4
|
-
export declare const SCHEMA_VERSION = "
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
cfg: ResolvedConfig;
|
|
8
|
-
dbPath: string;
|
|
9
|
-
parsed: number;
|
|
10
|
-
warnings: string[];
|
|
11
|
-
}
|
|
12
|
-
export declare const CONTENT_FTS_DDL: readonly ["CREATE INDEX IF NOT EXISTS content_fts ON content USING fts (title, summary, text) WITH (weights = 'title=10.0,summary=5.0,text=1.0')", "CREATE INDEX IF NOT EXISTS content_fts_ngram ON content USING fts (title_ngram, summary_ngram, text_ngram) WITH (tokenizer='ngram', weights='title_ngram=10.0,summary_ngram=5.0,text_ngram=1.0')"];
|
|
13
|
-
export declare const CONTENT_FTS_NAMES: readonly ["content_fts", "content_fts_ngram"];
|
|
6
|
+
export declare const SCHEMA_VERSION = "4";
|
|
7
|
+
export type { OpenResult };
|
|
8
|
+
export declare const tursoOpenDialect: OpenDialect<Database>;
|
|
14
9
|
export declare function openTurso(cfg: ResolvedConfig): Promise<OpenResult>;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
+
import type { Database } from '@tursodatabase/database';
|
|
1
2
|
import type { ResolvedConfig } from '../../config/index.js';
|
|
2
|
-
import type {
|
|
3
|
+
import type { OpenResult } from '../open.js';
|
|
4
|
+
import type { OpenDialect } from '../types.js';
|
|
3
5
|
export declare const DB_FILENAME = "cache.turso.db";
|
|
4
|
-
export declare const SCHEMA_VERSION = "
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
cfg: ResolvedConfig;
|
|
8
|
-
dbPath: string;
|
|
9
|
-
parsed: number;
|
|
10
|
-
warnings: string[];
|
|
11
|
-
}
|
|
12
|
-
export declare const CONTENT_FTS_DDL: readonly ["CREATE INDEX IF NOT EXISTS content_fts ON content USING fts (title, summary, text) WITH (weights = 'title=10.0,summary=5.0,text=1.0')", "CREATE INDEX IF NOT EXISTS content_fts_ngram ON content USING fts (title_ngram, summary_ngram, text_ngram) WITH (tokenizer='ngram', weights='title_ngram=10.0,summary_ngram=5.0,text_ngram=1.0')"];
|
|
13
|
-
export declare const CONTENT_FTS_NAMES: readonly ["content_fts", "content_fts_ngram"];
|
|
6
|
+
export declare const SCHEMA_VERSION = "4";
|
|
7
|
+
export type { OpenResult };
|
|
8
|
+
export declare const tursoOpenDialect: OpenDialect<Database>;
|
|
14
9
|
export declare function openTurso(cfg: ResolvedConfig): Promise<OpenResult>;
|