@cavelang/store 0.27.14 → 0.29.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/Authors.md +5 -0
- package/License.md +6 -0
- package/README.md +121 -14
- package/dist/src/adapter-entry.d.ts +9 -0
- package/dist/src/adapter-entry.d.ts.map +1 -0
- package/dist/src/adapter-entry.js +7 -0
- package/dist/src/adapter-entry.js.map +1 -0
- package/dist/src/adapter.d.ts +51 -0
- package/dist/src/adapter.d.ts.map +1 -0
- package/dist/src/adapter.js +3 -0
- package/dist/src/adapter.js.map +1 -0
- package/dist/src/backup.d.ts +23 -0
- package/dist/src/backup.d.ts.map +1 -0
- package/dist/src/backup.js +164 -0
- package/dist/src/backup.js.map +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/node-adapter-entry.d.ts +3 -0
- package/dist/src/node-adapter-entry.d.ts.map +1 -0
- package/dist/src/node-adapter-entry.js +3 -0
- package/dist/src/node-adapter-entry.js.map +1 -0
- package/dist/src/node-adapter.d.ts +4 -0
- package/dist/src/node-adapter.d.ts.map +1 -0
- package/dist/src/node-adapter.js +20 -0
- package/dist/src/node-adapter.js.map +1 -0
- package/dist/src/open.d.ts +3 -18
- package/dist/src/open.d.ts.map +1 -1
- package/dist/src/open.js +4 -52
- package/dist/src/open.js.map +1 -1
- package/dist/src/provenance.d.ts +24 -0
- package/dist/src/provenance.d.ts.map +1 -0
- package/dist/src/provenance.js +75 -0
- package/dist/src/provenance.js.map +1 -0
- package/dist/src/query-sql.d.ts +45 -0
- package/dist/src/query-sql.d.ts.map +1 -0
- package/dist/src/query-sql.js +77 -0
- package/dist/src/query-sql.js.map +1 -0
- package/dist/src/record.d.ts +29 -0
- package/dist/src/record.d.ts.map +1 -0
- package/dist/src/record.js +50 -0
- package/dist/src/record.js.map +1 -0
- package/dist/src/resolve.d.ts +2 -2
- package/dist/src/resolve.d.ts.map +1 -1
- package/dist/src/resolve.js +0 -0
- package/dist/src/resolve.js.map +1 -1
- package/dist/src/runtime.d.ts +16 -0
- package/dist/src/runtime.d.ts.map +1 -0
- package/dist/src/runtime.js +43 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/schema.d.ts +10 -6
- package/dist/src/schema.d.ts.map +1 -1
- package/dist/src/schema.js +111 -9
- package/dist/src/schema.js.map +1 -1
- package/dist/src/sensitivity.d.ts +24 -0
- package/dist/src/sensitivity.d.ts.map +1 -0
- package/dist/src/sensitivity.js +34 -0
- package/dist/src/sensitivity.js.map +1 -0
- package/dist/src/store.d.ts +37 -13
- package/dist/src/store.d.ts.map +1 -1
- package/dist/src/store.js +107 -72
- package/dist/src/store.js.map +1 -1
- package/package.json +25 -6
- package/src/adapter-entry.ts +18 -0
- package/src/adapter.ts +57 -0
- package/src/backup.ts +188 -0
- package/src/index.ts +8 -0
- package/src/node-adapter-entry.ts +3 -0
- package/src/node-adapter.ts +23 -0
- package/src/open.ts +7 -80
- package/src/provenance.ts +109 -0
- package/src/query-sql.ts +99 -0
- package/src/record.ts +82 -0
- package/src/resolve.ts +0 -0
- package/src/runtime.ts +78 -0
- package/src/schema.ts +135 -10
- package/src/sensitivity.ts +42 -0
- package/src/store.ts +134 -80
package/dist/src/schema.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export const ddl = `
|
|
1
|
+
/** Ordered, transactional storage schema migrations (spec §13). */
|
|
2
|
+
import * as Provenance from "./provenance.js";
|
|
3
|
+
export const currentVersion = 1;
|
|
4
|
+
const ddlBeforeFts = `
|
|
6
5
|
CREATE TABLE IF NOT EXISTS cave_claim (
|
|
7
6
|
id TEXT PRIMARY KEY, -- UUIDv7
|
|
8
7
|
tx TEXT NOT NULL, -- UUIDv7, lexicographic = transaction order
|
|
@@ -47,6 +46,15 @@ CREATE TABLE IF NOT EXISTS cave_context (
|
|
|
47
46
|
CREATE INDEX IF NOT EXISTS idx_cave_context ON cave_context (context);
|
|
48
47
|
CREATE INDEX IF NOT EXISTS idx_cave_context_claim ON cave_context (claim_id, context);
|
|
49
48
|
|
|
49
|
+
CREATE TABLE IF NOT EXISTS cave_provenance (
|
|
50
|
+
claim_id TEXT NOT NULL,
|
|
51
|
+
dimension TEXT NOT NULL CHECK (dimension IN ('actor', 'source', 'run', 'domain')),
|
|
52
|
+
value TEXT NOT NULL,
|
|
53
|
+
PRIMARY KEY (claim_id, dimension, value),
|
|
54
|
+
FOREIGN KEY (claim_id) REFERENCES cave_claim(id)
|
|
55
|
+
);
|
|
56
|
+
CREATE INDEX IF NOT EXISTS idx_cave_provenance_lookup ON cave_provenance (dimension, value, claim_id);
|
|
57
|
+
|
|
50
58
|
CREATE TABLE IF NOT EXISTS cave_tag (
|
|
51
59
|
claim_id TEXT NOT NULL,
|
|
52
60
|
key TEXT NOT NULL,
|
|
@@ -67,12 +75,106 @@ CREATE INDEX IF NOT EXISTS idx_cave_edge_parent ON cave_edge (parent_id);
|
|
|
67
75
|
CREATE INDEX IF NOT EXISTS idx_cave_edge_child ON cave_edge (child_id);
|
|
68
76
|
CREATE INDEX IF NOT EXISTS idx_cave_edge_role ON cave_edge (role);
|
|
69
77
|
|
|
70
|
-
|
|
78
|
+
`;
|
|
79
|
+
const ftsDdl = (fullText) => `
|
|
80
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS cave_fts USING ${fullText}(
|
|
71
81
|
claim_id, subject, verb, object, attribute, value_text, comment, raw_line
|
|
72
82
|
);
|
|
73
83
|
`;
|
|
74
|
-
/**
|
|
75
|
-
export const
|
|
76
|
-
|
|
84
|
+
/** Default Node/FTS5 schema SQL retained for callers that inspect the DDL. */
|
|
85
|
+
export const ddl = ddlBeforeFts + ftsDdl('fts5');
|
|
86
|
+
const ddlFor = (capabilities) => ddlBeforeFts + ftsDdl(capabilities.fullText);
|
|
87
|
+
const migrations = [
|
|
88
|
+
{
|
|
89
|
+
version: 1,
|
|
90
|
+
up: (db, capabilities) => {
|
|
91
|
+
db.exec(ddlFor(capabilities));
|
|
92
|
+
Provenance.backfill(db);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
const versionOf = (db) => db.prepare('PRAGMA user_version').get().user_version;
|
|
97
|
+
const requiredTables = [
|
|
98
|
+
'cave_claim', 'cave_context', 'cave_provenance', 'cave_tag', 'cave_edge', 'cave_fts'
|
|
99
|
+
];
|
|
100
|
+
const requiredIndexes = [
|
|
101
|
+
'idx_cave_claim_key_tx', 'idx_cave_subject', 'idx_cave_verb', 'idx_cave_object',
|
|
102
|
+
'idx_cave_attribute', 'idx_cave_conf', 'idx_cave_context', 'idx_cave_context_claim',
|
|
103
|
+
'idx_cave_provenance_lookup', 'idx_cave_tag_key', 'idx_cave_tag_claim',
|
|
104
|
+
'idx_cave_edge_parent', 'idx_cave_edge_child', 'idx_cave_edge_role'
|
|
105
|
+
];
|
|
106
|
+
const requiredColumns = {
|
|
107
|
+
cave_claim: [
|
|
108
|
+
'id', 'tx', 'subject', 'verb', 'negated', 'object', 'attribute', 'value_text',
|
|
109
|
+
'value_num', 'value_unit', 'value_approx', 'delta_text', 'delta_num', 'delta_unit',
|
|
110
|
+
'sigma_level', 'conf', 'importance', 'comment', 'raw_line', 'claim_key'
|
|
111
|
+
],
|
|
112
|
+
cave_context: ['claim_id', 'context'],
|
|
113
|
+
cave_provenance: ['claim_id', 'dimension', 'value'],
|
|
114
|
+
cave_tag: ['claim_id', 'key', 'value'],
|
|
115
|
+
cave_edge: ['parent_id', 'role', 'child_id'],
|
|
116
|
+
cave_fts: ['claim_id', 'subject', 'verb', 'object', 'attribute', 'value_text', 'comment', 'raw_line']
|
|
117
|
+
};
|
|
118
|
+
export const validate = (db, version, schema = 'main') => {
|
|
119
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(schema)) {
|
|
120
|
+
throw new Error(`CAVE: invalid SQLite schema name ${JSON.stringify(schema)}`);
|
|
121
|
+
}
|
|
122
|
+
const objects = new Map(db.prepare(`SELECT name, type FROM ${schema}.sqlite_schema WHERE name LIKE 'cave_%' OR name LIKE 'idx_cave_%'`)
|
|
123
|
+
.all().map(row => [row.name, row.type]));
|
|
124
|
+
const problems = [
|
|
125
|
+
...requiredTables.flatMap(name => objects.has(name) ? [] : [`missing table ${name}`]),
|
|
126
|
+
...requiredIndexes.flatMap(name => objects.get(name) === 'index' ? [] : [`missing index ${name}`]),
|
|
127
|
+
...Object.entries(requiredColumns).flatMap(([table, required]) => {
|
|
128
|
+
if (!objects.has(table)) {
|
|
129
|
+
return [];
|
|
130
|
+
}
|
|
131
|
+
const columns = new Set(db.prepare(`PRAGMA ${schema}.table_info(${table})`).all().map(row => row.name));
|
|
132
|
+
return required.flatMap(column => columns.has(column) ? [] : [`missing column ${table}.${column}`]);
|
|
133
|
+
})
|
|
134
|
+
];
|
|
135
|
+
if (problems.length > 0) {
|
|
136
|
+
throw new Error(`CAVE: schema version ${version} is incompatible: ${problems.join(', ')}`);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Upgrade every supported older version in order. Each step owns one SQLite
|
|
141
|
+
* transaction, including its `user_version` update, so interruption leaves
|
|
142
|
+
* either the old version or the complete next version and reopen can resume.
|
|
143
|
+
*/
|
|
144
|
+
export const init = (db, capabilities = {
|
|
145
|
+
transactions: { immediate: true, savepoints: true },
|
|
146
|
+
fullText: 'fts5',
|
|
147
|
+
}) => {
|
|
148
|
+
let version = versionOf(db);
|
|
149
|
+
if (version > currentVersion) {
|
|
150
|
+
throw new Error(`CAVE: schema version ${version} is newer than this runtime supports (${currentVersion}); upgrade CAVE`);
|
|
151
|
+
}
|
|
152
|
+
for (const migration of migrations) {
|
|
153
|
+
if (migration.version <= version) {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
if (migration.version !== version + 1) {
|
|
157
|
+
throw new Error(`CAVE: no schema migration path from version ${version} to ${migration.version}`);
|
|
158
|
+
}
|
|
159
|
+
db.exec('BEGIN IMMEDIATE');
|
|
160
|
+
try {
|
|
161
|
+
migration.up(db, capabilities);
|
|
162
|
+
db.exec(`PRAGMA user_version = ${migration.version}`);
|
|
163
|
+
validate(db, migration.version);
|
|
164
|
+
db.exec('COMMIT');
|
|
165
|
+
version = migration.version;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
try {
|
|
169
|
+
db.exec('ROLLBACK');
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
// SQLite may already have rolled back a failed statement.
|
|
173
|
+
}
|
|
174
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
175
|
+
throw new Error(`CAVE: schema migration ${version} -> ${migration.version} failed: ${detail}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
validate(db, version);
|
|
77
179
|
};
|
|
78
180
|
//# sourceMappingURL=schema.js.map
|
package/dist/src/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAGnE,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAA;AAE/B,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EpB,CAAA;AAED,MAAM,MAAM,GAAG,CAAC,QAAkC,EAAU,EAAE,CAAC;oDACX,QAAQ;;;CAG3D,CAAA;AAED,8EAA8E;AAC9E,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAEhD,MAAM,MAAM,GA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QACV,CAAC;QACD,IAAI,SAAS,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,+CAA+C,OAAO,OAAO,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;QACnG,CAAC;QACD,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;QAC1B,IAAI,CAAC;YACH,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,YAAY,CAAC,CAAA;YAC9B,EAAE,CAAC,IAAI,CAAC,yBAAyB,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;YACrD,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;YAC/B,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACjB,OAAO,GAAG,SAAS,CAAC,OAAO,CAAA;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC;gBACH,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YACrB,CAAC;YAAC,MAAM,CAAC;gBACP,0DAA0D;YAC5D,CAAC;YACD,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACrE,MAAM,IAAI,KAAK,CAAC,0BAA0B,OAAO,OAAO,SAAS,CAAC,OAAO,YAAY,MAAM,EAAE,CAAC,CAAA;QAChG,CAAC;IACH,CAAC;IACD,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;AACvB,CAAC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sensitivity labels and row visibility (spec §9.7).
|
|
3
|
+
*
|
|
4
|
+
* Claims opt into a level with `#sensitivity:<level>`. Unlabelled rows are
|
|
5
|
+
* `internal`; malformed, flat, or unknown labels fail closed as `restricted`.
|
|
6
|
+
* Several labels on one row resolve to the most restrictive one.
|
|
7
|
+
*/
|
|
8
|
+
export declare const levels: readonly ["public", "internal", "confidential", "restricted"];
|
|
9
|
+
export type Level = (typeof levels)[number];
|
|
10
|
+
export declare const defaultLevel: Level;
|
|
11
|
+
export declare const defaultMaximum: Level;
|
|
12
|
+
export declare const parse: (value: string) => undefined | Level;
|
|
13
|
+
export declare const rank: (level: Level) => number;
|
|
14
|
+
/**
|
|
15
|
+
* SQL predicate that allows rows at or below `maximum`. `alias` must be a
|
|
16
|
+
* trusted SQL identifier supplied by CAVE code, never user input.
|
|
17
|
+
*/
|
|
18
|
+
export declare const sql: (alias: string, maximum?: Level) => string;
|
|
19
|
+
/** Most restrictive recognized label; malformed labels are `restricted`. */
|
|
20
|
+
export declare const ofTags: (tags: readonly {
|
|
21
|
+
key: string;
|
|
22
|
+
value?: null | string;
|
|
23
|
+
}[]) => Level;
|
|
24
|
+
//# sourceMappingURL=sensitivity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sensitivity.d.ts","sourceRoot":"","sources":["../../src/sensitivity.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,MAAM,+DAAgE,CAAA;AACnF,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3C,eAAO,MAAM,YAAY,EAAE,KAAkB,CAAA;AAC7C,eAAO,MAAM,cAAc,EAAE,KAAkB,CAAA;AAE/C,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,KAAG,SAAS,GAAG,KACY,CAAA;AAE9D,eAAO,MAAM,IAAI,GAAI,OAAO,KAAK,KAAG,MAA+B,CAAA;AAEnE;;;GAGG;AACH,eAAO,MAAM,GAAG,GAAI,OAAO,MAAM,EAAE,UAAS,KAAsB,KAAG,MAGoD,CAAA;AAEzH,4EAA4E;AAC5E,eAAO,MAAM,MAAM,GAAI,MAAM,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;CAAE,EAAE,KAAG,KAYhF,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sensitivity labels and row visibility (spec §9.7).
|
|
3
|
+
*
|
|
4
|
+
* Claims opt into a level with `#sensitivity:<level>`. Unlabelled rows are
|
|
5
|
+
* `internal`; malformed, flat, or unknown labels fail closed as `restricted`.
|
|
6
|
+
* Several labels on one row resolve to the most restrictive one.
|
|
7
|
+
*/
|
|
8
|
+
export const levels = ['public', 'internal', 'confidential', 'restricted'];
|
|
9
|
+
export const defaultLevel = 'internal';
|
|
10
|
+
export const defaultMaximum = 'internal';
|
|
11
|
+
export const parse = (value) => levels.includes(value) ? value : undefined;
|
|
12
|
+
export const rank = (level) => levels.indexOf(level);
|
|
13
|
+
/**
|
|
14
|
+
* SQL predicate that allows rows at or below `maximum`. `alias` must be a
|
|
15
|
+
* trusted SQL identifier supplied by CAVE code, never user input.
|
|
16
|
+
*/
|
|
17
|
+
export const sql = (alias, maximum = defaultMaximum) => `COALESCE((SELECT MAX(CASE s.value ` +
|
|
18
|
+
`WHEN 'public' THEN 0 WHEN 'internal' THEN 1 WHEN 'confidential' THEN 2 WHEN 'restricted' THEN 3 ELSE 3 END) ` +
|
|
19
|
+
`FROM cave_tag s WHERE s.claim_id = ${alias}.id AND s.key = 'sensitivity'), ${rank(defaultLevel)}) <= ${rank(maximum)}`;
|
|
20
|
+
/** Most restrictive recognized label; malformed labels are `restricted`. */
|
|
21
|
+
export const ofTags = (tags) => {
|
|
22
|
+
let effective;
|
|
23
|
+
for (const tag of tags) {
|
|
24
|
+
if (tag.key !== 'sensitivity') {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
const level = tag.value === undefined || tag.value === null ? 'restricted' : parse(tag.value) ?? 'restricted';
|
|
28
|
+
if (effective === undefined || rank(level) > rank(effective)) {
|
|
29
|
+
effective = level;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return effective ?? defaultLevel;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=sensitivity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sensitivity.js","sourceRoot":"","sources":["../../src/sensitivity.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,CAAU,CAAA;AAGnF,MAAM,CAAC,MAAM,YAAY,GAAU,UAAU,CAAA;AAC7C,MAAM,CAAC,MAAM,cAAc,GAAU,UAAU,CAAA;AAE/C,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAqB,EAAE,CACxD,MAAM,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC,CAAC,CAAC,KAAc,CAAC,CAAC,CAAC,SAAS,CAAA;AAE9D,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAY,EAAU,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,KAAa,EAAE,UAAiB,cAAc,EAAU,EAAE,CAC5E,oCAAoC;IACpC,8GAA8G;IAC9G,sCAAsC,KAAK,mCAAmC,IAAI,CAAC,YAAY,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;AAEzH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAuD,EAAS,EAAE;IACvF,IAAI,SAA4B,CAAA;IAChC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,GAAG,CAAC,GAAG,KAAK,aAAa,EAAE,CAAC;YAC9B,SAAQ;QACV,CAAC;QACD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,YAAY,CAAA;QAC7G,IAAI,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7D,SAAS,GAAG,KAAK,CAAA;QACnB,CAAC;IACH,CAAC;IACD,OAAO,SAAS,IAAI,YAAY,CAAA;AAClC,CAAC,CAAA"}
|
package/dist/src/store.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The CAVE store (spec §13) — append-only claim persistence on the Node.js
|
|
3
|
-
*
|
|
3
|
+
* through an explicit synchronous SQLite adapter.
|
|
4
4
|
*
|
|
5
5
|
* - one row per fact, canonical direction; inverses are query-time views
|
|
6
6
|
* over existing indexes, never materialized rows (spec §13.3);
|
|
7
7
|
* - current belief = latest tx per claim key (spec §9.1, §13.5);
|
|
8
8
|
* - the verb registry is rebuilt from stored in-band declaration claims on
|
|
9
|
-
* open, so a reopened database keeps its inverse vocabulary;
|
|
9
|
+
* open, so a reopened database keeps its inverse and lifecycle vocabulary;
|
|
10
10
|
* - full-text search over subjects, objects, values, comments and raw
|
|
11
11
|
* lines via FTS5;
|
|
12
|
-
* - appends
|
|
12
|
+
* - appends record actor provenance and keep compatibility stamps (spec §9.5): pass `source` and every
|
|
13
13
|
* claim without a `src:` context gets `@src:<actor>` — applied before the
|
|
14
14
|
* claim key is computed, so different actors keep separate belief series;
|
|
15
15
|
* - contradiction resolution (spec §26): coexisting series about one fact
|
|
@@ -17,11 +17,14 @@
|
|
|
17
17
|
* confidence and tx — `resolvedBeliefs`, `contested`, and the `resolve`
|
|
18
18
|
* traversal opt-in.
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
21
|
-
import { Claim } from '@cavelang/core';
|
|
20
|
+
import { Claim, Context } from '@cavelang/core';
|
|
22
21
|
import * as Canonical from '@cavelang/canonical';
|
|
22
|
+
import type { Adapter } from './adapter.ts';
|
|
23
23
|
import * as Resolve from './resolve.ts';
|
|
24
24
|
import * as Row from './row.ts';
|
|
25
|
+
import * as Sensitivity from './sensitivity.ts';
|
|
26
|
+
import * as Provenance from './provenance.ts';
|
|
27
|
+
import * as Record from './record.ts';
|
|
25
28
|
export type IngestResult = {
|
|
26
29
|
/** ids of the batch's claim rows, in document order — for a row skipped as already present (`ids` replay, spec §28.1), the existing id. */
|
|
27
30
|
readonly ids: readonly string[];
|
|
@@ -33,7 +36,8 @@ export type IngestResult = {
|
|
|
33
36
|
};
|
|
34
37
|
export type AppendOptions = {
|
|
35
38
|
/**
|
|
36
|
-
* Actor provenance (spec §9.5):
|
|
39
|
+
* Actor provenance (spec §9.5): record actor `<source>` and stamp
|
|
40
|
+
* `@src:<source>` on every appended
|
|
37
41
|
* claim that carries no `src:` context — e.g. `cli`, `agent/claude-code`,
|
|
38
42
|
* `ingest/93a01c626b3f`. Applied before the claim key is computed, so the
|
|
39
43
|
* stamp is part of claim identity; claims that already name a source keep
|
|
@@ -42,15 +46,23 @@ export type AppendOptions = {
|
|
|
42
46
|
*/
|
|
43
47
|
readonly source?: string;
|
|
44
48
|
/**
|
|
45
|
-
* Lifecycle
|
|
49
|
+
* Lifecycle ownership (spec §9.5.1): record run `<source>` and stamp
|
|
50
|
+
* `@src:<source>` even when the
|
|
46
51
|
* claim already names a source. Connect records, rule conclusions and
|
|
47
|
-
* action effects are found for retraction and attribution by their
|
|
48
|
-
*
|
|
49
|
-
* kept (multi-source rows resolve per §26.3). The exact stamp context
|
|
52
|
+
* action effects are found for retraction and attribution by their run,
|
|
53
|
+
* so an authored `src:` context must not displace it — both contexts are
|
|
54
|
+
* kept for compatibility (multi-source rows resolve per §26.3). The exact stamp context
|
|
50
55
|
* is never duplicated. Without this flag an authored source suppresses
|
|
51
56
|
* the stamp.
|
|
52
57
|
*/
|
|
53
58
|
readonly lifecycle?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Additional structured contexts applied to every row before keying. Used
|
|
61
|
+
* by connectors to attach source spans without rewriting generated text.
|
|
62
|
+
*/
|
|
63
|
+
readonly contexts?: readonly Context.t[];
|
|
64
|
+
/** Explicit provenance dimensions; compact contexts remain unchanged. */
|
|
65
|
+
readonly provenance?: Provenance.Input;
|
|
54
66
|
/**
|
|
55
67
|
* Explicit row identity (spec §28.1), index-aligned with the result's
|
|
56
68
|
* claims: a claim with an id here is replayed under it — inserted with
|
|
@@ -109,13 +121,17 @@ export declare const defaultDbPath: () => string;
|
|
|
109
121
|
* already stored; pass `Canonical.Registry.empty` for a declaration-free
|
|
110
122
|
* start.
|
|
111
123
|
*/
|
|
112
|
-
export declare const open: (path?: string, options?: {
|
|
124
|
+
export declare const open: (adapter: Adapter, path?: string, options?: {
|
|
113
125
|
registry?: Canonical.Registry.t;
|
|
114
126
|
}) => {
|
|
115
|
-
/**
|
|
116
|
-
|
|
127
|
+
/** Adapter that owns this database connection and its capabilities. */
|
|
128
|
+
adapter: Adapter;
|
|
129
|
+
/** Raw adapter database handle — used by `@cavelang/query`; treat as read-only. */
|
|
130
|
+
db: import("./adapter.ts").Database;
|
|
117
131
|
/** Current verb registry (input registry + stored + ingested declarations). */
|
|
118
132
|
registry: () => Canonical.Registry.t;
|
|
133
|
+
/** Configured registry before any in-band declarations are applied. */
|
|
134
|
+
baseRegistry: () => Canonical.Registry.t;
|
|
119
135
|
/**
|
|
120
136
|
* Rebuilds the registry from the base plus stored declarations — after
|
|
121
137
|
* rows arrive outside `ingest`/`insertResult` (a §28 merge writes
|
|
@@ -198,6 +214,12 @@ export declare const open: (path?: string, options?: {
|
|
|
198
214
|
byTag(key: string, value?: string): Row.t[];
|
|
199
215
|
/** Rows carrying a context (spec §13.5), newest first. */
|
|
200
216
|
byContext(context: string): Row.t[];
|
|
217
|
+
/** Rows carrying one explicit provenance dimension, newest first. */
|
|
218
|
+
byProvenance(dimension: Provenance.Dimension, value: string): Row.t[];
|
|
219
|
+
/** Explicit actor, physical source, lifecycle run, and domain metadata. */
|
|
220
|
+
provenanceOf: (row: Row.t | string) => Provenance.t;
|
|
221
|
+
/** Map a database-shaped row to the stable `cave.claim/v1` contract. */
|
|
222
|
+
recordOf: (row: Row.t) => Record.t;
|
|
201
223
|
/** Members of a topic — forward `CONTAINS` traversal (spec §11.2). */
|
|
202
224
|
topicMembers(topic: string, options_?: TraverseOptions): string[];
|
|
203
225
|
/** Topics containing an entity — the inverse `CONTAINS` read (spec §11.2). */
|
|
@@ -212,6 +234,7 @@ export declare const open: (path?: string, options?: {
|
|
|
212
234
|
search(query: string, options_?: {
|
|
213
235
|
raw?: boolean;
|
|
214
236
|
limit?: number;
|
|
237
|
+
maxSensitivity?: Sensitivity.Level;
|
|
215
238
|
}): Row.t[];
|
|
216
239
|
/**
|
|
217
240
|
* Appends edges between *existing* claim rows (spec §13.2) — the
|
|
@@ -249,6 +272,7 @@ export declare const open: (path?: string, options?: {
|
|
|
249
272
|
exportText(options_?: {
|
|
250
273
|
current?: boolean;
|
|
251
274
|
tx?: boolean;
|
|
275
|
+
maxSensitivity?: Sensitivity.Level;
|
|
252
276
|
}): string;
|
|
253
277
|
close(): void;
|
|
254
278
|
};
|
package/dist/src/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAqB,MAAM,gBAAgB,CAAA;AAClE,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC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