@agentshouse/mdruntime 0.1.0-c03e7b79830dd → 0.1.0-c069136dcb4e8
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 +10 -8
- package/dist/adapter.d.ts +47 -48
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +2 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +28 -4
- package/dist/binary.d.ts +0 -5
- package/dist/binary.d.ts.map +1 -1
- package/dist/binary.js +1 -1
- package/dist/bootstrap.d.ts +16 -8
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +142 -94
- package/dist/change-set.d.ts +1 -7
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +1 -4
- package/dist/client.d.ts +6 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +54 -7
- package/dist/collection.d.ts +5 -3
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +24 -19
- package/dist/compile.d.ts +6 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +94 -33
- package/dist/connection.d.ts +8 -7
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1160 -1174
- package/dist/conversation.d.ts +6 -9
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +191 -121
- package/dist/durability.d.ts +1 -5
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +5 -0
- package/dist/entry.d.ts +1 -0
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +1 -1
- package/dist/file.d.ts +2 -11
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +6 -4
- package/dist/fulltext.d.ts +27 -0
- package/dist/fulltext.d.ts.map +1 -0
- package/dist/fulltext.js +370 -0
- package/dist/host.d.ts +3 -4
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +42 -18
- package/dist/identity.d.ts +0 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +0 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +2 -1
- package/dist/media.d.ts +8 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +218 -0
- package/dist/memory.d.ts +5 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +96 -38
- package/dist/messages.d.ts +28 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +90 -0
- package/dist/model.d.ts +6 -1
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +7 -10
- package/dist/observation.d.ts +1 -0
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +1 -1
- package/dist/outcome.d.ts +13 -6
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +16 -5
- package/dist/overlay.js +1 -1
- package/dist/paths.d.ts +1 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +4 -0
- package/dist/query.d.ts +10 -1
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +12 -1
- package/dist/reach.d.ts +8 -3
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +69 -46
- package/dist/readiness.d.ts +14 -15
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +2 -8
- package/dist/recovery.d.ts +1 -0
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +26 -0
- package/dist/refresh.d.ts +9 -4
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +64 -30
- package/dist/replica.d.ts +5 -5
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +4 -7
- package/dist/room-draft.d.ts +18 -2
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +73 -6
- package/dist/rows.d.ts +15 -6
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +102 -74
- package/dist/save.d.ts +2 -0
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +13 -7
- package/dist/search.d.ts +11 -43
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +0 -296
- package/dist/shared.d.ts +0 -1
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +0 -10
- package/dist/status.d.ts +4 -3
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +3 -1
- package/dist/store.d.ts +23 -58
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +37 -272
- package/dist/stored.d.ts +10 -23
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +217 -218
- package/dist/tables.d.ts +51 -46
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +94 -53
- package/dist/transfer.d.ts +0 -5
- package/dist/transfer.d.ts.map +1 -1
- package/dist/validation.d.ts +3 -4
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +35 -96
- package/dist/wire.d.ts +5 -5
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +2 -2
- package/dist/words.d.ts +19 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.js +156 -0
- package/package.json +11 -19
- package/AGENTS.md +0 -312
- package/dist/chat/acts.d.ts +0 -33
- package/dist/chat/acts.d.ts.map +0 -1
- package/dist/chat/acts.js +0 -36
- package/dist/chat/context.d.ts +0 -3
- package/dist/chat/context.d.ts.map +0 -1
- package/dist/chat/context.js +0 -10
- package/dist/chat/earlier.d.ts +0 -10
- package/dist/chat/earlier.d.ts.map +0 -1
- package/dist/chat/earlier.js +0 -54
- package/dist/chat/house.d.ts +0 -25
- package/dist/chat/house.d.ts.map +0 -1
- package/dist/chat/house.js +0 -38
- package/dist/chat/input.d.ts +0 -11
- package/dist/chat/input.d.ts.map +0 -1
- package/dist/chat/input.js +0 -92
- package/dist/chat/kit.d.ts +0 -61
- package/dist/chat/kit.d.ts.map +0 -1
- package/dist/chat/kit.js +0 -123
- package/dist/chat/lasting.d.ts +0 -6
- package/dist/chat/lasting.d.ts.map +0 -1
- package/dist/chat/lasting.js +0 -19
- package/dist/chat/list.d.ts +0 -28
- package/dist/chat/list.d.ts.map +0 -1
- package/dist/chat/list.js +0 -103
- package/dist/chat/markdown.d.ts +0 -21
- package/dist/chat/markdown.d.ts.map +0 -1
- package/dist/chat/markdown.js +0 -246
- package/dist/chat/message.d.ts +0 -7
- package/dist/chat/message.d.ts.map +0 -1
- package/dist/chat/message.js +0 -244
- package/dist/chat/messages.d.ts +0 -30
- package/dist/chat/messages.d.ts.map +0 -1
- package/dist/chat/messages.js +0 -198
- package/dist/chat/name.d.ts +0 -7
- package/dist/chat/name.d.ts.map +0 -1
- package/dist/chat/name.js +0 -37
- package/dist/chat/opened.d.ts +0 -12
- package/dist/chat/opened.d.ts.map +0 -1
- package/dist/chat/opened.js +0 -19
- package/dist/chat/overlay.d.ts +0 -32
- package/dist/chat/overlay.d.ts.map +0 -1
- package/dist/chat/overlay.js +0 -103
- package/dist/chat/parts.d.ts +0 -58
- package/dist/chat/parts.d.ts.map +0 -1
- package/dist/chat/parts.js +0 -120
- package/dist/chat/pieces.d.ts +0 -62
- package/dist/chat/pieces.d.ts.map +0 -1
- package/dist/chat/pieces.js +0 -1110
- package/dist/chat/process.d.ts +0 -20
- package/dist/chat/process.d.ts.map +0 -1
- package/dist/chat/process.js +0 -32
- package/dist/chat/provider.d.ts +0 -70
- package/dist/chat/provider.d.ts.map +0 -1
- package/dist/chat/provider.js +0 -635
- package/dist/chat/question.d.ts +0 -9
- package/dist/chat/question.d.ts.map +0 -1
- package/dist/chat/question.js +0 -69
- package/dist/chat/questions.d.ts +0 -31
- package/dist/chat/questions.d.ts.map +0 -1
- package/dist/chat/questions.js +0 -111
- package/dist/chat/read.d.ts +0 -5
- package/dist/chat/read.d.ts.map +0 -1
- package/dist/chat/read.js +0 -13
- package/dist/chat/ready.d.ts +0 -37
- package/dist/chat/ready.d.ts.map +0 -1
- package/dist/chat/ready.js +0 -93
- package/dist/chat/room-file.d.ts +0 -8
- package/dist/chat/room-file.d.ts.map +0 -1
- package/dist/chat/room-file.js +0 -72
- package/dist/chat/steady.d.ts +0 -3
- package/dist/chat/steady.d.ts.map +0 -1
- package/dist/chat/steady.js +0 -26
- package/dist/chat/style.d.ts +0 -4
- package/dist/chat/style.d.ts.map +0 -1
- package/dist/chat/style.js +0 -306
- package/dist/chat.d.ts +0 -15
- package/dist/chat.d.ts.map +0 -1
- package/dist/chat.js +0 -8
- package/dist/reads.d.ts +0 -11
- package/dist/reads.d.ts.map +0 -1
- package/dist/reads.js +0 -98
package/dist/store.js
CHANGED
|
@@ -1,123 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { composedOf } from './collection.js';
|
|
2
2
|
import { binaryLocalId } from './identity.js';
|
|
3
|
-
const DATABASE = 'mdruntime';
|
|
4
|
-
const CONVERSATIONS = 'conversations';
|
|
5
|
-
const MESSAGES = 'messages';
|
|
6
3
|
const FILE = '\u0000file';
|
|
7
|
-
export const STORE_SCHEMA = 26;
|
|
8
|
-
const STORES = [
|
|
9
|
-
[CONVERSATIONS, { keyPath: 'conversation' }],
|
|
10
|
-
[MESSAGES, { keyPath: ['conversation', 'identity'] }],
|
|
11
|
-
];
|
|
12
|
-
const READ_BATCH = 256;
|
|
13
|
-
const MESSAGE_INDEXES = [
|
|
14
|
-
['conversation', 'conversation'],
|
|
15
|
-
['position', ['conversation', 'position']],
|
|
16
|
-
['turn', ['conversation', 'turn']],
|
|
17
|
-
];
|
|
18
|
-
function settled(request) {
|
|
19
|
-
return new Promise((resolve, reject) => {
|
|
20
|
-
request.onsuccess = () => resolve(request.result);
|
|
21
|
-
request.onerror = () => reject(request.error);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
const turns = new Map();
|
|
25
|
-
function idle(database) {
|
|
26
|
-
return turns.get(database.name) ?? Promise.resolve();
|
|
27
|
-
}
|
|
28
|
-
export function transacted(database, stores, mode, work) {
|
|
29
|
-
let release = () => { };
|
|
30
|
-
const turn = new Promise((resolve) => {
|
|
31
|
-
release = resolve;
|
|
32
|
-
});
|
|
33
|
-
const before = idle(database);
|
|
34
|
-
const queued = before.then(() => turn);
|
|
35
|
-
turns.set(database.name, queued);
|
|
36
|
-
void queued.then(() => {
|
|
37
|
-
if (turns.get(database.name) === queued)
|
|
38
|
-
turns.delete(database.name);
|
|
39
|
-
});
|
|
40
|
-
return before.then(() => {
|
|
41
|
-
let transaction;
|
|
42
|
-
try {
|
|
43
|
-
transaction = database.transaction(stores, mode);
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
release();
|
|
47
|
-
throw error;
|
|
48
|
-
}
|
|
49
|
-
const committed = new Promise((resolve, reject) => {
|
|
50
|
-
transaction.oncomplete = () => {
|
|
51
|
-
release();
|
|
52
|
-
resolve();
|
|
53
|
-
};
|
|
54
|
-
transaction.onabort = () => {
|
|
55
|
-
release();
|
|
56
|
-
reject(transaction.error);
|
|
57
|
-
};
|
|
58
|
-
transaction.onerror = () => reject(transaction.error);
|
|
59
|
-
});
|
|
60
|
-
let value;
|
|
61
|
-
try {
|
|
62
|
-
value = work(transaction);
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
void committed.catch(() => { });
|
|
66
|
-
transaction.abort();
|
|
67
|
-
throw error;
|
|
68
|
-
}
|
|
69
|
-
return Promise.all([value, committed]).then(([held]) => held);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
function accepted({ conversation: _held, ...message }) {
|
|
73
|
-
return message;
|
|
74
|
-
}
|
|
75
|
-
function removeDatabase(name) {
|
|
76
|
-
return new Promise((resolve, reject) => {
|
|
77
|
-
const removal = indexedDB.deleteDatabase(name);
|
|
78
|
-
removal.onsuccess = () => resolve();
|
|
79
|
-
removal.onerror = () => reject(removal.error);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
export async function endRuntimeStore(database, holder) {
|
|
83
|
-
await removeDatabase(DATABASE);
|
|
84
|
-
return database.ask({ kind: 'authored.end', holder: holder ?? null });
|
|
85
|
-
}
|
|
86
|
-
export function openDatabase(name, version, upgrade) {
|
|
87
|
-
return new Promise((resolve, reject) => {
|
|
88
|
-
const opening = indexedDB.open(name, version);
|
|
89
|
-
opening.onupgradeneeded = (event) => upgrade(opening, event.oldVersion);
|
|
90
|
-
opening.onsuccess = () => resolve(opening.result);
|
|
91
|
-
opening.onerror = () => {
|
|
92
|
-
if (opening.error?.name !== 'VersionError') {
|
|
93
|
-
reject(opening.error);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
removeDatabase(name)
|
|
97
|
-
.then(() => openDatabase(name, version, upgrade))
|
|
98
|
-
.then(resolve, reject);
|
|
99
|
-
};
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
function openConversations() {
|
|
103
|
-
return openDatabase(DATABASE, STORE_SCHEMA, (opening, oldVersion) => {
|
|
104
|
-
const database = opening.result;
|
|
105
|
-
if (oldVersion < STORE_SCHEMA) {
|
|
106
|
-
for (const name of [...database.objectStoreNames])
|
|
107
|
-
database.deleteObjectStore(name);
|
|
108
|
-
}
|
|
109
|
-
for (const [name, parameters] of STORES) {
|
|
110
|
-
if (database.objectStoreNames.contains(name))
|
|
111
|
-
continue;
|
|
112
|
-
database.createObjectStore(name, parameters);
|
|
113
|
-
}
|
|
114
|
-
const messages = opening.transaction.objectStore(MESSAGES);
|
|
115
|
-
for (const [name, keyPath] of MESSAGE_INDEXES) {
|
|
116
|
-
if (!messages.indexNames.contains(name))
|
|
117
|
-
messages.createIndex(name, keyPath);
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
4
|
function batchFiles(batch) {
|
|
122
5
|
return batch.changes.flatMap((change) => (change.kind === 'binary' ? [change.localId] : []));
|
|
123
6
|
}
|
|
@@ -127,7 +10,7 @@ function draftFiles(drafts) {
|
|
|
127
10
|
function roomDraftRow(record) {
|
|
128
11
|
return { path: record.path, record: JSON.stringify(record), files: draftFiles([record]) };
|
|
129
12
|
}
|
|
130
|
-
function authoredRows({ locator, queue, founded, saved, roomDrafts, consumedRoomDrafts
|
|
13
|
+
function authoredRows({ locator, queue, founded, saved, roomDrafts, consumedRoomDrafts }, held) {
|
|
131
14
|
return {
|
|
132
15
|
locator,
|
|
133
16
|
...(queue === undefined
|
|
@@ -161,14 +44,6 @@ function authoredRows({ locator, queue, founded, saved, roomDrafts, consumedRoom
|
|
|
161
44
|
}),
|
|
162
45
|
...(roomDrafts === undefined ? {} : { roomDrafts: roomDrafts.map(roomDraftRow) }),
|
|
163
46
|
...(consumedRoomDrafts === undefined ? {} : { consumedRoomDrafts }),
|
|
164
|
-
...(accepted === undefined
|
|
165
|
-
? {}
|
|
166
|
-
: {
|
|
167
|
-
amendments: accepted.map(({ id, roomVersion }) => ({
|
|
168
|
-
id,
|
|
169
|
-
amendment: JSON.stringify({ accepted: roomVersion }),
|
|
170
|
-
})),
|
|
171
|
-
}),
|
|
172
47
|
};
|
|
173
48
|
}
|
|
174
49
|
function marked(value) {
|
|
@@ -206,8 +81,7 @@ async function filed(value, read) {
|
|
|
206
81
|
function json(value, fallback) {
|
|
207
82
|
return value === undefined ? fallback : JSON.parse(value);
|
|
208
83
|
}
|
|
209
|
-
export
|
|
210
|
-
const database = await openConversations();
|
|
84
|
+
export function openRuntimeStore(fenced, authored) {
|
|
211
85
|
const keys = new WeakMap();
|
|
212
86
|
const read = async (key, type) => {
|
|
213
87
|
const blob = await authored.ask({ kind: 'authored.file', key, type });
|
|
@@ -239,7 +113,7 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
239
113
|
return {
|
|
240
114
|
async opened() {
|
|
241
115
|
const held = await authored.ask({ kind: 'replica.open' });
|
|
242
|
-
const
|
|
116
|
+
const unindexed = new Set(held.keys.flatMap(({ key, rederiving, searching }) => rederiving === null && searching === null ? [] : [key]));
|
|
243
117
|
const overlaid = new Map();
|
|
244
118
|
for (const { key, path } of held.overlaid) {
|
|
245
119
|
const paths = overlaid.get(key) ?? new Set();
|
|
@@ -253,13 +127,7 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
253
127
|
locator,
|
|
254
128
|
{ ...JSON.parse(record), key },
|
|
255
129
|
])),
|
|
256
|
-
|
|
257
|
-
.filter(({ locator }) => !fenced(locator))
|
|
258
|
-
.map(({ locator, key, record }) => [
|
|
259
|
-
locator,
|
|
260
|
-
{ ...JSON.parse(record), key },
|
|
261
|
-
])),
|
|
262
|
-
unprepared,
|
|
130
|
+
unindexed,
|
|
263
131
|
overlaid,
|
|
264
132
|
erasing: held.erasing.length > 0,
|
|
265
133
|
orphans: held.orphans,
|
|
@@ -272,6 +140,7 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
272
140
|
app,
|
|
273
141
|
value: JSON.parse(value),
|
|
274
142
|
})),
|
|
143
|
+
conversationList: json(held.facts.conversationList, null),
|
|
275
144
|
};
|
|
276
145
|
},
|
|
277
146
|
counts(rooms) {
|
|
@@ -292,37 +161,36 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
292
161
|
referrers(key, view, targets, kinds) {
|
|
293
162
|
return authored.ask({ kind: 'replica.referrers', key, view, targets, kinds });
|
|
294
163
|
},
|
|
295
|
-
walk(key, view, after, bytes) {
|
|
296
|
-
return authored.ask({ kind: 'replica.walk', key, view, after, bytes });
|
|
297
|
-
},
|
|
298
164
|
files(key, view, after, limit) {
|
|
299
165
|
return authored.ask({ kind: 'replica.files', key, view, after, limit });
|
|
300
166
|
},
|
|
167
|
+
folders(key, view, paths) {
|
|
168
|
+
return authored.ask({ kind: 'replica.folders', key, view, paths });
|
|
169
|
+
},
|
|
301
170
|
typedWithin(key, view, roots, within) {
|
|
302
171
|
return authored.ask({ kind: 'replica.typedWithin', key, view, roots, within });
|
|
303
172
|
},
|
|
304
|
-
|
|
305
|
-
return authored.ask({ kind: 'replica.
|
|
173
|
+
search(ask) {
|
|
174
|
+
return authored.ask({ kind: 'replica.search', ...ask });
|
|
306
175
|
},
|
|
307
|
-
async stage(record, composition, page
|
|
176
|
+
async stage(record, composition, page) {
|
|
308
177
|
if (fenced(record.locator))
|
|
309
178
|
return null;
|
|
310
|
-
const { key: _key, ...kept } = record;
|
|
311
179
|
return authored.ask({
|
|
312
180
|
kind: 'replica.stage',
|
|
313
181
|
locator: record.locator,
|
|
314
182
|
transfer: record.transfer,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
composition,
|
|
183
|
+
key: record.key,
|
|
184
|
+
fingerprint: composedOf(composition).fingerprint,
|
|
318
185
|
entries: page.entries,
|
|
319
186
|
folders: page.folders,
|
|
320
187
|
});
|
|
321
188
|
},
|
|
322
|
-
async refresh(key, page) {
|
|
189
|
+
async refresh(key, composition, page) {
|
|
323
190
|
await authored.ask({
|
|
324
191
|
kind: 'replica.refresh',
|
|
325
192
|
key,
|
|
193
|
+
composed: composedOf(composition),
|
|
326
194
|
entries: page.entries,
|
|
327
195
|
removals: page.removals,
|
|
328
196
|
folders: page.folders,
|
|
@@ -336,7 +204,7 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
336
204
|
const kept = whole ? writes : writes.filter(({ locator }) => !fenced(locator));
|
|
337
205
|
const refused = whole ? kept.find(({ locator }) => fenced(locator)) : undefined;
|
|
338
206
|
if (refused !== undefined) {
|
|
339
|
-
return { fenced: refused.locator, counts: {}, changed: {},
|
|
207
|
+
return { fenced: refused.locator, counts: {}, changed: {}, indexed: {} };
|
|
340
208
|
}
|
|
341
209
|
for (const room of rooms)
|
|
342
210
|
change(room.key);
|
|
@@ -361,17 +229,24 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
361
229
|
async erase(locator, limit) {
|
|
362
230
|
return (await authored.ask({ kind: 'replica.erase', locator, limit })).remaining;
|
|
363
231
|
},
|
|
364
|
-
async abandon(locator
|
|
232
|
+
async abandon(locator) {
|
|
365
233
|
if (fenced(locator))
|
|
366
|
-
return
|
|
367
|
-
|
|
234
|
+
return;
|
|
235
|
+
await authored.ask({ kind: 'replica.abandon', locator });
|
|
368
236
|
},
|
|
369
237
|
async release(key) {
|
|
370
238
|
await authored.ask({ kind: 'replica.release', key });
|
|
371
239
|
},
|
|
372
|
-
async rederive(key,
|
|
240
|
+
async rederive(key, composition, bytes, ms, floor) {
|
|
373
241
|
change(key);
|
|
374
|
-
return
|
|
242
|
+
return authored.ask({
|
|
243
|
+
kind: 'replica.rederive',
|
|
244
|
+
key,
|
|
245
|
+
composed: composedOf(composition),
|
|
246
|
+
bytes,
|
|
247
|
+
ms,
|
|
248
|
+
floor,
|
|
249
|
+
});
|
|
375
250
|
},
|
|
376
251
|
async fact(name, value) {
|
|
377
252
|
await authored.ask({ kind: 'replica.fact', name, value: JSON.stringify(value) });
|
|
@@ -417,110 +292,22 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
417
292
|
});
|
|
418
293
|
},
|
|
419
294
|
conversations() {
|
|
420
|
-
return
|
|
421
|
-
const records = await settled(transaction.objectStore(CONVERSATIONS).getAll());
|
|
422
|
-
const held = new Map(records.map(({ conversation, read, partial }) => [
|
|
423
|
-
conversation,
|
|
424
|
-
{ conversation, read, partial: partial === true },
|
|
425
|
-
]));
|
|
426
|
-
const keys = transaction.objectStore(MESSAGES).index('conversation');
|
|
427
|
-
await new Promise((resolve, reject) => {
|
|
428
|
-
const cursor = keys.openKeyCursor(null, 'nextunique');
|
|
429
|
-
cursor.onerror = () => reject(cursor.error);
|
|
430
|
-
cursor.onsuccess = () => {
|
|
431
|
-
const at = cursor.result;
|
|
432
|
-
if (at === null) {
|
|
433
|
-
resolve();
|
|
434
|
-
return;
|
|
435
|
-
}
|
|
436
|
-
const conversation = at.key;
|
|
437
|
-
if (!held.has(conversation)) {
|
|
438
|
-
held.set(conversation, { conversation, read: undefined, partial: true });
|
|
439
|
-
}
|
|
440
|
-
at.continue();
|
|
441
|
-
};
|
|
442
|
-
});
|
|
443
|
-
return [...held.values()];
|
|
444
|
-
});
|
|
295
|
+
return authored.ask({ kind: 'conversation.held' });
|
|
445
296
|
},
|
|
446
|
-
async keepMessages(
|
|
447
|
-
await
|
|
448
|
-
const stored = transaction.objectStore(MESSAGES);
|
|
449
|
-
for (const message of messages) {
|
|
450
|
-
stored.put({ ...message, conversation });
|
|
451
|
-
}
|
|
452
|
-
if (read !== undefined) {
|
|
453
|
-
transaction.objectStore(CONVERSATIONS).put({
|
|
454
|
-
conversation,
|
|
455
|
-
read: read.at,
|
|
456
|
-
...(read.partial ? { partial: true } : {}),
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
});
|
|
297
|
+
async keepMessages(write) {
|
|
298
|
+
await authored.ask({ kind: 'conversation.keep', ...write });
|
|
460
299
|
},
|
|
461
300
|
messageWindow(conversation, limit, before) {
|
|
462
|
-
return
|
|
463
|
-
const index = transaction.objectStore(MESSAGES).index('position');
|
|
464
|
-
const range = IDBKeyRange.bound([conversation], [conversation, before?.[0] ?? []]);
|
|
465
|
-
const latest = [];
|
|
466
|
-
let more = false;
|
|
467
|
-
await new Promise((resolve, reject) => {
|
|
468
|
-
const cursor = index.openCursor(range, 'prev');
|
|
469
|
-
cursor.onerror = () => reject(cursor.error);
|
|
470
|
-
cursor.onsuccess = () => {
|
|
471
|
-
const at = cursor.result;
|
|
472
|
-
if (at === null) {
|
|
473
|
-
resolve();
|
|
474
|
-
return;
|
|
475
|
-
}
|
|
476
|
-
const record = at.value;
|
|
477
|
-
if (!precedes(record, before)) {
|
|
478
|
-
at.continue();
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
if (latest.length === limit) {
|
|
482
|
-
more = true;
|
|
483
|
-
resolve();
|
|
484
|
-
return;
|
|
485
|
-
}
|
|
486
|
-
latest.push(accepted(record));
|
|
487
|
-
at.continue();
|
|
488
|
-
};
|
|
489
|
-
});
|
|
490
|
-
return { messages: latest.reverse(), more };
|
|
491
|
-
});
|
|
301
|
+
return authored.ask({ kind: 'conversation.window', conversation, limit, before });
|
|
492
302
|
},
|
|
493
303
|
messageCount(conversation) {
|
|
494
|
-
return
|
|
495
|
-
},
|
|
496
|
-
async messagesAfter(conversation, identity) {
|
|
497
|
-
const range = identity === null
|
|
498
|
-
? IDBKeyRange.bound([conversation], [conversation, []])
|
|
499
|
-
: IDBKeyRange.bound([conversation, identity], [conversation, []], true);
|
|
500
|
-
const held = await transacted(database, MESSAGES, 'readonly', (transaction) => settled(transaction.objectStore(MESSAGES).getAll(range, READ_BATCH)));
|
|
501
|
-
return held.map(accepted);
|
|
502
|
-
},
|
|
503
|
-
async messageIdentities(conversation) {
|
|
504
|
-
const found = await transacted(database, MESSAGES, 'readonly', (transaction) => settled(transaction.objectStore(MESSAGES).index('conversation').getAllKeys(conversation)));
|
|
505
|
-
return found.map((key) => key[1]);
|
|
304
|
+
return authored.ask({ kind: 'conversation.count', conversation });
|
|
506
305
|
},
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
return held > 0;
|
|
306
|
+
turnArrived(conversation, turn) {
|
|
307
|
+
return authored.ask({ kind: 'conversation.turn', conversation, turn });
|
|
510
308
|
},
|
|
511
309
|
async dropConversations(conversations) {
|
|
512
|
-
await authored.ask({ kind: '
|
|
513
|
-
await transacted(database, [CONVERSATIONS, MESSAGES], 'readwrite', (transaction) => {
|
|
514
|
-
const messages = transaction.objectStore(MESSAGES);
|
|
515
|
-
for (const conversation of conversations) {
|
|
516
|
-
transaction.objectStore(CONVERSATIONS).delete(conversation);
|
|
517
|
-
const held = messages.index('conversation').getAllKeys(conversation);
|
|
518
|
-
held.onsuccess = () => {
|
|
519
|
-
for (const key of held.result)
|
|
520
|
-
messages.delete(key);
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
});
|
|
310
|
+
await authored.ask({ kind: 'conversation.drop', conversations });
|
|
524
311
|
},
|
|
525
312
|
async chatDrafts() {
|
|
526
313
|
const records = await authored.ask({ kind: 'authored.chatDrafts' });
|
|
@@ -574,25 +361,6 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
574
361
|
fences() {
|
|
575
362
|
return authored.ask({ kind: 'authored.fences' });
|
|
576
363
|
},
|
|
577
|
-
receivedHeads() {
|
|
578
|
-
return authored.ask({ kind: 'replica.received' });
|
|
579
|
-
},
|
|
580
|
-
receivedParts(key, count) {
|
|
581
|
-
return authored.ask({ kind: 'replica.receivedParts', key, count });
|
|
582
|
-
},
|
|
583
|
-
async keepReceived(key, head, part) {
|
|
584
|
-
await authored.ask({
|
|
585
|
-
kind: 'replica.receive',
|
|
586
|
-
key,
|
|
587
|
-
head: JSON.stringify(head),
|
|
588
|
-
...(part === undefined
|
|
589
|
-
? {}
|
|
590
|
-
: { part: { index: part.index, value: JSON.stringify(part.value) } }),
|
|
591
|
-
});
|
|
592
|
-
},
|
|
593
|
-
async dropReceived(keys) {
|
|
594
|
-
await authored.ask({ kind: 'replica.unreceive', keys });
|
|
595
|
-
},
|
|
596
364
|
generation() {
|
|
597
365
|
return fact('generation');
|
|
598
366
|
},
|
|
@@ -602,8 +370,5 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
602
370
|
file(key, type) {
|
|
603
371
|
return authored.ask({ kind: 'authored.file', key, type });
|
|
604
372
|
},
|
|
605
|
-
close() {
|
|
606
|
-
void idle(database).then(() => database.close());
|
|
607
|
-
},
|
|
608
373
|
};
|
|
609
374
|
}
|
package/dist/stored.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { HeadChange } from './adapter.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type Composed, type Composition } from './collection.js';
|
|
3
3
|
import type { HeldBinary } from './overlay.js';
|
|
4
|
-
import type { SearchedDocument } from './search.js';
|
|
5
4
|
import type { Connection } from './tables.js';
|
|
6
5
|
export declare const REPLICA_TABLES: readonly string[];
|
|
7
6
|
export type View = 'confirmed' | 'visible' | 'refreshed';
|
|
@@ -35,6 +34,7 @@ export type HeldKey = {
|
|
|
35
34
|
readonly locator: string;
|
|
36
35
|
readonly transfer: string;
|
|
37
36
|
readonly rederiving: number | null;
|
|
37
|
+
readonly searching: number | null;
|
|
38
38
|
};
|
|
39
39
|
export type ReplicaOpened = {
|
|
40
40
|
readonly rooms: readonly {
|
|
@@ -42,11 +42,6 @@ export type ReplicaOpened = {
|
|
|
42
42
|
readonly key: number;
|
|
43
43
|
readonly record: string;
|
|
44
44
|
}[];
|
|
45
|
-
readonly transfers: readonly {
|
|
46
|
-
readonly locator: string;
|
|
47
|
-
readonly key: number;
|
|
48
|
-
readonly record: string;
|
|
49
|
-
}[];
|
|
50
45
|
readonly keys: readonly HeldKey[];
|
|
51
46
|
readonly facts: Readonly<Record<string, string>>;
|
|
52
47
|
readonly presentation: readonly {
|
|
@@ -72,7 +67,7 @@ export type RoomCommit = {
|
|
|
72
67
|
readonly from: number | null;
|
|
73
68
|
};
|
|
74
69
|
readonly refreshed?: true;
|
|
75
|
-
readonly
|
|
70
|
+
readonly composed: Composed;
|
|
76
71
|
readonly confirmed?: {
|
|
77
72
|
readonly set: readonly StoredEntry[];
|
|
78
73
|
readonly removed: readonly string[];
|
|
@@ -85,29 +80,24 @@ export type RoomCommit = {
|
|
|
85
80
|
export type Committed = {
|
|
86
81
|
readonly counts: Readonly<Record<string, number>>;
|
|
87
82
|
readonly changed: Readonly<Record<string, readonly string[] | null>>;
|
|
88
|
-
readonly
|
|
83
|
+
readonly indexed: Readonly<Record<string, boolean>>;
|
|
89
84
|
};
|
|
90
85
|
export type CountedRoom = {
|
|
91
86
|
readonly key: number;
|
|
92
87
|
readonly roots: readonly string[];
|
|
93
88
|
};
|
|
94
|
-
export type Walked = {
|
|
95
|
-
readonly entries: readonly HeldEntry[];
|
|
96
|
-
readonly next: string | null;
|
|
97
|
-
};
|
|
98
|
-
export declare function fingerprint(composition: Composition): string;
|
|
99
89
|
export declare function entered(connection: Connection, locator: string, composition: Composition, rows: readonly StoredEntry[]): number;
|
|
100
90
|
export declare function stage(connection: Connection, request: {
|
|
101
91
|
readonly locator: string;
|
|
102
92
|
readonly transfer: string;
|
|
103
|
-
readonly record: string | null;
|
|
104
93
|
readonly key: number | null;
|
|
105
|
-
readonly
|
|
94
|
+
readonly fingerprint: string;
|
|
106
95
|
readonly entries: readonly StoredEntry[];
|
|
107
96
|
readonly folders: readonly string[];
|
|
108
97
|
}): number;
|
|
109
98
|
export declare function refreshing(connection: Connection, request: {
|
|
110
99
|
readonly key: number;
|
|
100
|
+
readonly composed: Composed;
|
|
111
101
|
readonly entries: readonly StoredEntry[];
|
|
112
102
|
readonly removals: readonly string[];
|
|
113
103
|
readonly folders: readonly string[];
|
|
@@ -117,27 +107,24 @@ export declare function unrefresh(connection: Connection, key: number): null;
|
|
|
117
107
|
export declare function counts(connection: Connection, rooms: readonly CountedRoom[]): number[];
|
|
118
108
|
export declare function commit(connection: Connection, rooms: readonly RoomCommit[]): Committed;
|
|
119
109
|
export declare function fenceRooms(connection: Connection, locators: readonly string[]): null;
|
|
120
|
-
export declare function abandon(connection: Connection, locator: string
|
|
110
|
+
export declare function abandon(connection: Connection, locator: string): null;
|
|
121
111
|
export declare function release(connection: Connection, key: number): null;
|
|
122
112
|
export declare function erase(connection: Connection, locator: string | null, limit: number): {
|
|
123
113
|
readonly remaining: boolean;
|
|
124
114
|
};
|
|
125
|
-
export declare function rederive(connection: Connection, key: number,
|
|
115
|
+
export declare function rederive(connection: Connection, key: number, composed: Composed, bytes: number, ms: number, floor: number): {
|
|
126
116
|
readonly done: boolean;
|
|
117
|
+
readonly text: number;
|
|
127
118
|
};
|
|
128
119
|
export declare function entries(connection: Connection, key: number, view: View, list: readonly string[]): HeldEntry[];
|
|
129
120
|
export declare function typed(connection: Connection, key: number, view: View, list: readonly string[]): TypedEntry[];
|
|
130
121
|
export declare function referrers(connection: Connection, key: number, view: View, targets: readonly string[], kinds: readonly string[]): Referrer[];
|
|
131
|
-
export declare function walk(connection: Connection, key: number, view: View, after: string | null, bytes: number): Walked;
|
|
132
122
|
export declare function files(connection: Connection, key: number, view: View, after: string | null, limit: number): {
|
|
133
123
|
readonly path: string;
|
|
134
124
|
readonly revision: string;
|
|
135
125
|
}[];
|
|
126
|
+
export declare function folders(connection: Connection, key: number, view: View, list: readonly string[]): string[];
|
|
136
127
|
export declare function typedWithin(connection: Connection, key: number, view: View, roots: readonly string[], within: boolean): boolean;
|
|
137
|
-
export declare function searched(connection: Connection, key: number, locator: string, after: string | null, limit: number, only: readonly string[] | null): {
|
|
138
|
-
readonly documents: readonly SearchedDocument[];
|
|
139
|
-
readonly next: string | null;
|
|
140
|
-
};
|
|
141
128
|
export declare function opened(connection: Connection): ReplicaOpened;
|
|
142
129
|
export declare function ended(connection: Connection): void;
|
|
143
130
|
//# sourceMappingURL=stored.d.ts.map
|
package/dist/stored.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stored.d.ts","sourceRoot":"","sources":["../src/stored.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stored.d.ts","sourceRoot":"","sources":["../src/stored.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAc,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAE1D,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAgB3C,CAAC;AAoBF,MAAM,MAAM,IAAI,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,C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