@velvetmonkey/vault-core 2.0.134 → 2.0.135
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/sqlite.d.ts +1 -1
- package/dist/sqlite.js +18 -1
- package/package.json +1 -1
package/dist/sqlite.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export interface StateDb {
|
|
|
75
75
|
close: () => void;
|
|
76
76
|
}
|
|
77
77
|
/** Current schema version - bump when schema changes */
|
|
78
|
-
export declare const SCHEMA_VERSION =
|
|
78
|
+
export declare const SCHEMA_VERSION = 31;
|
|
79
79
|
/** State database filename */
|
|
80
80
|
export declare const STATE_DB_FILENAME = "state.db";
|
|
81
81
|
/** Directory for flywheel state */
|
package/dist/sqlite.js
CHANGED
|
@@ -16,7 +16,7 @@ import * as path from 'path';
|
|
|
16
16
|
// Constants
|
|
17
17
|
// =============================================================================
|
|
18
18
|
/** Current schema version - bump when schema changes */
|
|
19
|
-
export const SCHEMA_VERSION =
|
|
19
|
+
export const SCHEMA_VERSION = 31;
|
|
20
20
|
/** State database filename */
|
|
21
21
|
export const STATE_DB_FILENAME = 'state.db';
|
|
22
22
|
/** Directory for flywheel state */
|
|
@@ -440,6 +440,21 @@ CREATE TABLE IF NOT EXISTS retrieval_cooccurrence (
|
|
|
440
440
|
);
|
|
441
441
|
CREATE INDEX IF NOT EXISTS idx_retcooc_notes ON retrieval_cooccurrence(note_a, note_b);
|
|
442
442
|
CREATE INDEX IF NOT EXISTS idx_retcooc_ts ON retrieval_cooccurrence(timestamp);
|
|
443
|
+
|
|
444
|
+
-- Deferred proactive linking queue (v31)
|
|
445
|
+
CREATE TABLE IF NOT EXISTS proactive_queue (
|
|
446
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
447
|
+
note_path TEXT NOT NULL,
|
|
448
|
+
entity TEXT NOT NULL,
|
|
449
|
+
score REAL NOT NULL,
|
|
450
|
+
confidence TEXT NOT NULL,
|
|
451
|
+
queued_at INTEGER NOT NULL,
|
|
452
|
+
expires_at INTEGER NOT NULL,
|
|
453
|
+
status TEXT NOT NULL DEFAULT 'pending',
|
|
454
|
+
applied_at INTEGER,
|
|
455
|
+
UNIQUE(note_path, entity)
|
|
456
|
+
);
|
|
457
|
+
CREATE INDEX IF NOT EXISTS idx_pq_status ON proactive_queue(status, expires_at);
|
|
443
458
|
`;
|
|
444
459
|
// =============================================================================
|
|
445
460
|
// Database Initialization
|
|
@@ -583,6 +598,8 @@ function initSchema(db) {
|
|
|
583
598
|
// (created by SCHEMA_SQL above via CREATE TABLE IF NOT EXISTS)
|
|
584
599
|
// v29: index on wikilink_feedback(note_path) for temporal analysis queries
|
|
585
600
|
// (created by SCHEMA_SQL above via CREATE INDEX IF NOT EXISTS)
|
|
601
|
+
// v31: proactive_queue table (deferred proactive linking)
|
|
602
|
+
// (created by SCHEMA_SQL above via CREATE TABLE IF NOT EXISTS)
|
|
586
603
|
// v30: token economics columns on tool_invocations
|
|
587
604
|
if (currentVersion < 30) {
|
|
588
605
|
const hasResponseTokens = db.prepare(`SELECT COUNT(*) as cnt FROM pragma_table_info('tool_invocations') WHERE name = 'response_tokens'`).get();
|
package/package.json
CHANGED