@agentshouse/mdruntime 0.1.0-c2e8a6f99866d → 0.1.0-c2ef9303a058d
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 +11 -9
- package/dist/adapter.d.ts +95 -67
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +5 -11
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +36 -47
- 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 +17 -9
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +143 -94
- package/dist/chain.d.ts +2 -1
- package/dist/chain.d.ts.map +1 -1
- 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 +15 -12
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +56 -8
- package/dist/collection.d.ts +7 -4
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +24 -19
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +117 -243
- package/dist/connection.d.ts +14 -12
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1466 -1431
- package/dist/context.d.ts +2 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/{chat/context.js → context.js} +1 -4
- package/dist/conversation.d.ts +18 -15
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +273 -185
- package/dist/durability.d.ts +6 -4
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +5 -0
- package/dist/entry.d.ts +3 -2
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +17 -8
- package/dist/file.d.ts +2 -11
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +6 -4
- package/dist/host.d.ts +3 -7
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +55 -38
- package/dist/identity.d.ts +0 -2
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +0 -6
- package/dist/index.d.ts +15 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/job.d.ts +14 -0
- package/dist/job.d.ts.map +1 -0
- package/dist/job.js +28 -0
- package/dist/live.d.ts +2 -1
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +9 -5
- 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 +12 -6
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +209 -101
- package/dist/messages.d.ts +28 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +89 -0
- package/dist/model.d.ts +8 -8
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +7 -13
- package/dist/observation.d.ts +3 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +8 -3
- 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 -206
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +3 -494
- package/dist/reach.d.ts +14 -9
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +84 -72
- package/dist/react.d.ts +3 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/readiness.d.ts +14 -17
- 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 +10 -4
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +88 -30
- package/dist/replica.d.ts +11 -8
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +30 -15
- package/dist/room-draft.d.ts +22 -5
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +131 -51
- package/dist/rows.d.ts +18 -16
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +45 -153
- 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 +12 -95
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +10 -349
- 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 +25 -62
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +43 -282
- package/dist/stored.d.ts +12 -26
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +189 -226
- package/dist/tables.d.ts +55 -48
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +107 -57
- 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 +39 -97
- package/dist/windows.d.ts +1 -12
- package/dist/windows.d.ts.map +1 -1
- package/dist/windows.js +2 -75
- package/dist/wire.d.ts +14 -9
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +5 -3
- package/package.json +14 -18
- 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/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 }) => (rederiving === 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,8 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
272
140
|
app,
|
|
273
141
|
value: JSON.parse(value),
|
|
274
142
|
})),
|
|
143
|
+
conversationList: json(held.facts.conversationList, null),
|
|
144
|
+
conversationCursor: json(held.facts.conversationCursor, null),
|
|
275
145
|
};
|
|
276
146
|
},
|
|
277
147
|
counts(rooms) {
|
|
@@ -289,40 +159,36 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
289
159
|
typed(key, view, paths) {
|
|
290
160
|
return authored.ask({ kind: 'replica.typed', key, view, paths });
|
|
291
161
|
},
|
|
292
|
-
referrers(key, view, targets
|
|
293
|
-
return authored.ask({ kind: 'replica.referrers', key, view, targets
|
|
294
|
-
},
|
|
295
|
-
walk(key, view, after, bytes) {
|
|
296
|
-
return authored.ask({ kind: 'replica.walk', key, view, after, bytes });
|
|
162
|
+
referrers(key, view, targets) {
|
|
163
|
+
return authored.ask({ kind: 'replica.referrers', key, view, targets });
|
|
297
164
|
},
|
|
298
165
|
files(key, view, after, limit) {
|
|
299
166
|
return authored.ask({ kind: 'replica.files', key, view, after, limit });
|
|
300
167
|
},
|
|
168
|
+
folders(key, view, paths) {
|
|
169
|
+
return authored.ask({ kind: 'replica.folders', key, view, paths });
|
|
170
|
+
},
|
|
301
171
|
typedWithin(key, view, roots, within) {
|
|
302
172
|
return authored.ask({ kind: 'replica.typedWithin', key, view, roots, within });
|
|
303
173
|
},
|
|
304
|
-
|
|
305
|
-
return authored.ask({ kind: 'replica.searched', key, locator, after, limit, paths });
|
|
306
|
-
},
|
|
307
|
-
async stage(record, composition, page, key, last) {
|
|
174
|
+
async stage(record, composition, page) {
|
|
308
175
|
if (fenced(record.locator))
|
|
309
176
|
return null;
|
|
310
|
-
const { key: _key, ...kept } = record;
|
|
311
177
|
return authored.ask({
|
|
312
178
|
kind: 'replica.stage',
|
|
313
179
|
locator: record.locator,
|
|
314
180
|
transfer: record.transfer,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
composition,
|
|
181
|
+
key: record.key,
|
|
182
|
+
fingerprint: composedOf(composition).fingerprint,
|
|
318
183
|
entries: page.entries,
|
|
319
184
|
folders: page.folders,
|
|
320
185
|
});
|
|
321
186
|
},
|
|
322
|
-
async refresh(key, page) {
|
|
187
|
+
async refresh(key, composition, page) {
|
|
323
188
|
await authored.ask({
|
|
324
189
|
kind: 'replica.refresh',
|
|
325
190
|
key,
|
|
191
|
+
composed: composedOf(composition),
|
|
326
192
|
entries: page.entries,
|
|
327
193
|
removals: page.removals,
|
|
328
194
|
folders: page.folders,
|
|
@@ -332,25 +198,23 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
332
198
|
async unrefresh(key) {
|
|
333
199
|
await authored.ask({ kind: 'replica.unrefresh', key });
|
|
334
200
|
},
|
|
335
|
-
async commit({ rooms, writes = [], files = [], whole = false
|
|
201
|
+
async commit({ rooms, writes = [], files = [], whole = false }) {
|
|
336
202
|
const kept = whole ? writes : writes.filter(({ locator }) => !fenced(locator));
|
|
337
203
|
const refused = whole ? kept.find(({ locator }) => fenced(locator)) : undefined;
|
|
338
204
|
if (refused !== undefined) {
|
|
339
|
-
return { fenced: refused.locator, counts: {}, changed: {},
|
|
205
|
+
return { fenced: refused.locator, counts: {}, changed: {}, indexed: {} };
|
|
340
206
|
}
|
|
341
207
|
for (const room of rooms)
|
|
342
208
|
change(room.key);
|
|
343
209
|
const committed = await authored.ask({
|
|
344
210
|
kind: 'replica.commit',
|
|
345
|
-
...(kept.length === 0 && files.length === 0
|
|
211
|
+
...(kept.length === 0 && files.length === 0
|
|
346
212
|
? {}
|
|
347
|
-
: { authored: { writes: rows(kept), files, whole
|
|
213
|
+
: { authored: { writes: rows(kept), files, whole } }),
|
|
348
214
|
rooms: rooms.filter(({ locator }) => !fenced(locator)),
|
|
349
215
|
});
|
|
350
216
|
if (committed.fenced === null || !whole)
|
|
351
217
|
noted(kept);
|
|
352
|
-
for (const locator of discards)
|
|
353
|
-
queued.delete(locator);
|
|
354
218
|
return committed;
|
|
355
219
|
},
|
|
356
220
|
async fence(locators) {
|
|
@@ -361,17 +225,24 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
361
225
|
async erase(locator, limit) {
|
|
362
226
|
return (await authored.ask({ kind: 'replica.erase', locator, limit })).remaining;
|
|
363
227
|
},
|
|
364
|
-
async abandon(locator
|
|
228
|
+
async abandon(locator) {
|
|
365
229
|
if (fenced(locator))
|
|
366
|
-
return
|
|
367
|
-
|
|
230
|
+
return;
|
|
231
|
+
await authored.ask({ kind: 'replica.abandon', locator });
|
|
368
232
|
},
|
|
369
233
|
async release(key) {
|
|
370
234
|
await authored.ask({ kind: 'replica.release', key });
|
|
371
235
|
},
|
|
372
|
-
async rederive(key,
|
|
236
|
+
async rederive(key, composition, bytes, ms, floor) {
|
|
373
237
|
change(key);
|
|
374
|
-
return
|
|
238
|
+
return authored.ask({
|
|
239
|
+
kind: 'replica.rederive',
|
|
240
|
+
key,
|
|
241
|
+
composed: composedOf(composition),
|
|
242
|
+
bytes,
|
|
243
|
+
ms,
|
|
244
|
+
floor,
|
|
245
|
+
});
|
|
375
246
|
},
|
|
376
247
|
async fact(name, value) {
|
|
377
248
|
await authored.ask({ kind: 'replica.fact', name, value: JSON.stringify(value) });
|
|
@@ -417,110 +288,22 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
417
288
|
});
|
|
418
289
|
},
|
|
419
290
|
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
|
-
});
|
|
291
|
+
return authored.ask({ kind: 'conversation.held' });
|
|
445
292
|
},
|
|
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
|
-
});
|
|
460
|
-
},
|
|
461
|
-
messageWindow(conversation, limit, before) {
|
|
462
|
-
return transacted(database, MESSAGES, 'readonly', async (transaction) => {
|
|
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
|
-
});
|
|
293
|
+
async keepMessages(write) {
|
|
294
|
+
await authored.ask({ kind: 'conversation.keep', ...write });
|
|
492
295
|
},
|
|
493
|
-
|
|
494
|
-
return
|
|
296
|
+
messageWindow(conversation, limit, before, phrase = null) {
|
|
297
|
+
return authored.ask({ kind: 'conversation.window', conversation, limit, before, phrase });
|
|
495
298
|
},
|
|
496
|
-
|
|
497
|
-
|
|
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);
|
|
299
|
+
messageCount(conversation, phrase = null) {
|
|
300
|
+
return authored.ask({ kind: 'conversation.count', conversation, phrase });
|
|
502
301
|
},
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
return found.map((key) => key[1]);
|
|
506
|
-
},
|
|
507
|
-
async turnArrived(conversation, turn) {
|
|
508
|
-
const held = await transacted(database, MESSAGES, 'readonly', (transaction) => settled(transaction.objectStore(MESSAGES).index('turn').count([conversation, turn])));
|
|
509
|
-
return held > 0;
|
|
302
|
+
turnArrived(conversation, turn) {
|
|
303
|
+
return authored.ask({ kind: 'conversation.turn', conversation, turn });
|
|
510
304
|
},
|
|
511
305
|
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
|
-
});
|
|
306
|
+
await authored.ask({ kind: 'conversation.drop', conversations });
|
|
524
307
|
},
|
|
525
308
|
async chatDrafts() {
|
|
526
309
|
const records = await authored.ask({ kind: 'authored.chatDrafts' });
|
|
@@ -574,25 +357,6 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
574
357
|
fences() {
|
|
575
358
|
return authored.ask({ kind: 'authored.fences' });
|
|
576
359
|
},
|
|
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
360
|
generation() {
|
|
597
361
|
return fact('generation');
|
|
598
362
|
},
|
|
@@ -602,8 +366,5 @@ export async function openRuntimeStore(fenced, authored) {
|
|
|
602
366
|
file(key, type) {
|
|
603
367
|
return authored.ask({ kind: 'authored.file', key, type });
|
|
604
368
|
},
|
|
605
|
-
close() {
|
|
606
|
-
void idle(database).then(() => database.close());
|
|
607
|
-
},
|
|
608
369
|
};
|
|
609
370
|
}
|
package/dist/stored.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { HeadChange } from './adapter.js';
|
|
2
|
-
import type
|
|
1
|
+
import type { SavedFacts, HeadChange } from './adapter.js';
|
|
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';
|
|
@@ -13,6 +12,7 @@ export type StoredEntry = {
|
|
|
13
12
|
readonly fileId: string | null;
|
|
14
13
|
readonly change: HeadChange | null;
|
|
15
14
|
readonly written: string | null;
|
|
15
|
+
readonly facts: SavedFacts | null;
|
|
16
16
|
};
|
|
17
17
|
export type OverlayEntry = StoredEntry & {
|
|
18
18
|
readonly present: boolean;
|
|
@@ -28,7 +28,6 @@ export type TypedEntry = {
|
|
|
28
28
|
export type Referrer = {
|
|
29
29
|
readonly path: string;
|
|
30
30
|
readonly target: string;
|
|
31
|
-
readonly kind: string;
|
|
32
31
|
};
|
|
33
32
|
export type HeldKey = {
|
|
34
33
|
readonly key: number;
|
|
@@ -42,11 +41,6 @@ export type ReplicaOpened = {
|
|
|
42
41
|
readonly key: number;
|
|
43
42
|
readonly record: string;
|
|
44
43
|
}[];
|
|
45
|
-
readonly transfers: readonly {
|
|
46
|
-
readonly locator: string;
|
|
47
|
-
readonly key: number;
|
|
48
|
-
readonly record: string;
|
|
49
|
-
}[];
|
|
50
44
|
readonly keys: readonly HeldKey[];
|
|
51
45
|
readonly facts: Readonly<Record<string, string>>;
|
|
52
46
|
readonly presentation: readonly {
|
|
@@ -72,7 +66,7 @@ export type RoomCommit = {
|
|
|
72
66
|
readonly from: number | null;
|
|
73
67
|
};
|
|
74
68
|
readonly refreshed?: true;
|
|
75
|
-
readonly
|
|
69
|
+
readonly composed: Composed;
|
|
76
70
|
readonly confirmed?: {
|
|
77
71
|
readonly set: readonly StoredEntry[];
|
|
78
72
|
readonly removed: readonly string[];
|
|
@@ -85,29 +79,24 @@ export type RoomCommit = {
|
|
|
85
79
|
export type Committed = {
|
|
86
80
|
readonly counts: Readonly<Record<string, number>>;
|
|
87
81
|
readonly changed: Readonly<Record<string, readonly string[] | null>>;
|
|
88
|
-
readonly
|
|
82
|
+
readonly indexed: Readonly<Record<string, boolean>>;
|
|
89
83
|
};
|
|
90
84
|
export type CountedRoom = {
|
|
91
85
|
readonly key: number;
|
|
92
86
|
readonly roots: readonly string[];
|
|
93
87
|
};
|
|
94
|
-
export type Walked = {
|
|
95
|
-
readonly entries: readonly HeldEntry[];
|
|
96
|
-
readonly next: string | null;
|
|
97
|
-
};
|
|
98
|
-
export declare function fingerprint(composition: Composition): string;
|
|
99
88
|
export declare function entered(connection: Connection, locator: string, composition: Composition, rows: readonly StoredEntry[]): number;
|
|
100
89
|
export declare function stage(connection: Connection, request: {
|
|
101
90
|
readonly locator: string;
|
|
102
91
|
readonly transfer: string;
|
|
103
|
-
readonly record: string | null;
|
|
104
92
|
readonly key: number | null;
|
|
105
|
-
readonly
|
|
93
|
+
readonly fingerprint: string;
|
|
106
94
|
readonly entries: readonly StoredEntry[];
|
|
107
95
|
readonly folders: readonly string[];
|
|
108
96
|
}): number;
|
|
109
97
|
export declare function refreshing(connection: Connection, request: {
|
|
110
98
|
readonly key: number;
|
|
99
|
+
readonly composed: Composed;
|
|
111
100
|
readonly entries: readonly StoredEntry[];
|
|
112
101
|
readonly removals: readonly string[];
|
|
113
102
|
readonly folders: readonly string[];
|
|
@@ -117,27 +106,24 @@ export declare function unrefresh(connection: Connection, key: number): null;
|
|
|
117
106
|
export declare function counts(connection: Connection, rooms: readonly CountedRoom[]): number[];
|
|
118
107
|
export declare function commit(connection: Connection, rooms: readonly RoomCommit[]): Committed;
|
|
119
108
|
export declare function fenceRooms(connection: Connection, locators: readonly string[]): null;
|
|
120
|
-
export declare function abandon(connection: Connection, locator: string
|
|
109
|
+
export declare function abandon(connection: Connection, locator: string): null;
|
|
121
110
|
export declare function release(connection: Connection, key: number): null;
|
|
122
111
|
export declare function erase(connection: Connection, locator: string | null, limit: number): {
|
|
123
112
|
readonly remaining: boolean;
|
|
124
113
|
};
|
|
125
|
-
export declare function rederive(connection: Connection, key: number,
|
|
114
|
+
export declare function rederive(connection: Connection, key: number, composed: Composed, bytes: number, ms: number, floor: number): {
|
|
126
115
|
readonly done: boolean;
|
|
116
|
+
readonly text: number;
|
|
127
117
|
};
|
|
128
118
|
export declare function entries(connection: Connection, key: number, view: View, list: readonly string[]): HeldEntry[];
|
|
129
119
|
export declare function typed(connection: Connection, key: number, view: View, list: readonly string[]): TypedEntry[];
|
|
130
|
-
export declare function referrers(connection: Connection, key: number, view: View, targets: readonly string[]
|
|
131
|
-
export declare function walk(connection: Connection, key: number, view: View, after: string | null, bytes: number): Walked;
|
|
120
|
+
export declare function referrers(connection: Connection, key: number, view: View, targets: readonly string[]): Referrer[];
|
|
132
121
|
export declare function files(connection: Connection, key: number, view: View, after: string | null, limit: number): {
|
|
133
122
|
readonly path: string;
|
|
134
123
|
readonly revision: string;
|
|
135
124
|
}[];
|
|
125
|
+
export declare function folders(connection: Connection, key: number, view: View, list: readonly string[]): string[];
|
|
136
126
|
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
127
|
export declare function opened(connection: Connection): ReplicaOpened;
|
|
142
128
|
export declare function ended(connection: Connection): void;
|
|
143
129
|
//# 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":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"stored.d.ts","sourceRoot":"","sources":["../src/stored.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAc,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9E,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,EAiB3C,CAAC;AAmBF,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,GAA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