@agentshouse/mdruntime 0.1.0-c7f1d9323e816 → 0.1.0-c8ca66ac9e99d
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/AGENTS.md +149 -103
- package/README.md +13 -3
- package/dist/adapter.d.ts +42 -14
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attempt.d.ts +16 -0
- package/dist/attempt.d.ts.map +1 -0
- package/dist/attempt.js +70 -0
- package/dist/binary.d.ts +23 -0
- package/dist/binary.d.ts.map +1 -0
- package/dist/binary.js +8 -0
- package/dist/bootstrap.d.ts +17 -5
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +88 -38
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +19 -12
- package/dist/change.d.ts +15 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +26 -1
- package/dist/chat/acts.d.ts +34 -0
- package/dist/chat/acts.d.ts.map +1 -0
- package/dist/chat/acts.js +36 -0
- package/dist/chat/context.d.ts +3 -0
- package/dist/chat/context.d.ts.map +1 -0
- package/dist/chat/context.js +10 -0
- package/dist/chat/input.d.ts +9 -0
- package/dist/chat/input.d.ts.map +1 -0
- package/dist/chat/input.js +99 -0
- package/dist/chat/kit.d.ts +60 -0
- package/dist/chat/kit.d.ts.map +1 -0
- package/dist/chat/kit.js +123 -0
- package/dist/chat/lasting.d.ts +6 -0
- package/dist/chat/lasting.d.ts.map +1 -0
- package/dist/chat/lasting.js +19 -0
- package/dist/chat/list.d.ts +26 -0
- package/dist/chat/list.d.ts.map +1 -0
- package/dist/chat/list.js +62 -0
- package/dist/chat/markdown.d.ts +20 -0
- package/dist/chat/markdown.d.ts.map +1 -0
- package/dist/chat/markdown.js +188 -0
- package/dist/chat/message.d.ts +6 -0
- package/dist/chat/message.d.ts.map +1 -0
- package/dist/chat/message.js +192 -0
- package/dist/chat/messages.d.ts +21 -0
- package/dist/chat/messages.d.ts.map +1 -0
- package/dist/chat/messages.js +151 -0
- package/dist/chat/name.d.ts +6 -0
- package/dist/chat/name.d.ts.map +1 -0
- package/dist/chat/name.js +37 -0
- package/dist/chat/opened.d.ts +11 -0
- package/dist/chat/opened.d.ts.map +1 -0
- package/dist/chat/opened.js +17 -0
- package/dist/chat/overlay.d.ts +31 -0
- package/dist/chat/overlay.d.ts.map +1 -0
- package/dist/chat/overlay.js +97 -0
- package/dist/chat/parts.d.ts +57 -0
- package/dist/chat/parts.d.ts.map +1 -0
- package/dist/chat/parts.js +119 -0
- package/dist/chat/process.d.ts +20 -0
- package/dist/chat/process.d.ts.map +1 -0
- package/dist/chat/process.js +32 -0
- package/dist/chat/provider.d.ts +63 -0
- package/dist/chat/provider.d.ts.map +1 -0
- package/dist/chat/provider.js +645 -0
- package/dist/chat/question.d.ts +9 -0
- package/dist/chat/question.d.ts.map +1 -0
- package/dist/chat/question.js +80 -0
- package/dist/chat/questions.d.ts +31 -0
- package/dist/chat/questions.d.ts.map +1 -0
- package/dist/chat/questions.js +111 -0
- package/dist/chat/read.d.ts +5 -0
- package/dist/chat/read.d.ts.map +1 -0
- package/dist/chat/read.js +13 -0
- package/dist/chat/ready.d.ts +33 -0
- package/dist/chat/ready.d.ts.map +1 -0
- package/dist/chat/ready.js +91 -0
- package/dist/chat/style.d.ts +4 -0
- package/dist/chat/style.d.ts.map +1 -0
- package/dist/chat/style.js +302 -0
- package/dist/chat.d.ts +14 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +8 -0
- package/dist/client.d.ts +13 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +61 -15
- package/dist/collection.d.ts +6 -11
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +56 -19
- package/dist/connection.d.ts +20 -9
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +421 -131
- package/dist/conversation.d.ts +11 -3
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +47 -7
- package/dist/expectation.d.ts +21 -0
- package/dist/expectation.d.ts.map +1 -0
- package/dist/expectation.js +70 -0
- package/dist/failure.d.ts +13 -0
- package/dist/failure.d.ts.map +1 -0
- package/dist/failure.js +19 -0
- package/dist/host.d.ts +2 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +12 -12
- package/dist/identity.d.ts +3 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +13 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/memory.d.ts +3 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +53 -20
- package/dist/model.d.ts +3 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/open.d.ts +2 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/open.js +1 -0
- package/dist/outcome.d.ts +28 -3
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +41 -1
- package/dist/overlay.d.ts +14 -3
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +75 -37
- package/dist/query.d.ts +4 -0
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +3 -0
- package/dist/reach.d.ts +2 -0
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +43 -19
- package/dist/react.d.ts +24 -16
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +8 -6
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +9 -2
- package/dist/refresh.d.ts +10 -0
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +42 -38
- package/dist/replica.d.ts +7 -4
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +74 -54
- package/dist/room-draft.d.ts +26 -9
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +132 -23
- package/dist/rows.d.ts +5 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +10 -2
- package/dist/save.d.ts +27 -1
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +340 -33
- package/dist/search.d.ts +3 -2
- package/dist/search.d.ts.map +1 -1
- package/dist/status.d.ts +2 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +0 -8
- package/dist/store.d.ts +34 -11
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +298 -163
- package/dist/wire.d.ts +6 -3
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +14 -2
- package/package.json +22 -14
- package/dist/attachment.d.ts +0 -3
- package/dist/attachment.d.ts.map +0 -1
- package/dist/attachment.js +0 -8
package/dist/store.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { sameChange } from './overlay.js';
|
|
1
|
+
import { sameBinary, sameChange } from './overlay.js';
|
|
2
2
|
const DATABASE = 'mdruntime';
|
|
3
|
+
const AUTHORED = 'mdruntime-authored';
|
|
3
4
|
const ROOMS = 'rooms';
|
|
4
5
|
const DOCUMENTS = 'documents';
|
|
5
|
-
const
|
|
6
|
-
const
|
|
6
|
+
const BINARY_FILES = 'binaryFiles';
|
|
7
|
+
const TRANSFERS = 'transfers';
|
|
7
8
|
const PENDING_CHANGES = 'pendingChanges';
|
|
8
9
|
const DECLARATIONS = 'declarations';
|
|
9
10
|
const ROOM_DRAFTS = 'roomDrafts';
|
|
@@ -11,9 +12,22 @@ const PRESENTATION = 'presentation';
|
|
|
11
12
|
const CONVERSATIONS = 'conversations';
|
|
12
13
|
const MESSAGES = 'messages';
|
|
13
14
|
const CHAT_DRAFTS = 'chatDrafts';
|
|
15
|
+
const QUEUES = 'queues';
|
|
16
|
+
const FACTS = 'facts';
|
|
14
17
|
const CURRENT = 'current';
|
|
15
18
|
const MEMBER = 'member';
|
|
16
|
-
|
|
19
|
+
const GENERATION = 'generation';
|
|
20
|
+
const HOLDER = 'holder';
|
|
21
|
+
export const STORE_SCHEMA = 23;
|
|
22
|
+
export const AUTHORED_SCHEMA = 1;
|
|
23
|
+
const AUTHORED_STORES = [
|
|
24
|
+
[QUEUES, { keyPath: 'locator' }],
|
|
25
|
+
[PENDING_CHANGES, { keyPath: ['locator', 'id'] }],
|
|
26
|
+
[ROOM_DRAFTS, { keyPath: ['locator', 'path'] }],
|
|
27
|
+
[CHAT_DRAFTS, { keyPath: 'conversation' }],
|
|
28
|
+
[FACTS, undefined],
|
|
29
|
+
];
|
|
30
|
+
const READ_BATCH = 256;
|
|
17
31
|
function settled(request) {
|
|
18
32
|
return new Promise((resolve, reject) => {
|
|
19
33
|
request.onsuccess = () => resolve(request.result);
|
|
@@ -29,7 +43,6 @@ function completed(transaction) {
|
|
|
29
43
|
}
|
|
30
44
|
const EMPTY_DECLARATIONS = {
|
|
31
45
|
lastCompleted: null,
|
|
32
|
-
generation: null,
|
|
33
46
|
providerLimits: [],
|
|
34
47
|
capabilities: [],
|
|
35
48
|
};
|
|
@@ -57,9 +70,102 @@ function amendPending(database, locator, id, amendment) {
|
|
|
57
70
|
};
|
|
58
71
|
return completed(transaction);
|
|
59
72
|
}
|
|
60
|
-
function roomRecord(record
|
|
61
|
-
const { documents,
|
|
62
|
-
return
|
|
73
|
+
function roomRecord(record) {
|
|
74
|
+
const { documents, binaries, revisions, changes, written, ...room } = record;
|
|
75
|
+
return room;
|
|
76
|
+
}
|
|
77
|
+
function chatDraftRecord(record) {
|
|
78
|
+
return { ...record, revision: record.revision ?? '' };
|
|
79
|
+
}
|
|
80
|
+
function underTransfer(locator, transfer, after) {
|
|
81
|
+
return after === undefined
|
|
82
|
+
? IDBKeyRange.bound([locator, transfer], [locator, transfer, []])
|
|
83
|
+
: IDBKeyRange.bound([locator, transfer, after], [locator, transfer, []], true);
|
|
84
|
+
}
|
|
85
|
+
function underRoom(locator) {
|
|
86
|
+
return IDBKeyRange.bound([locator], [locator, []]);
|
|
87
|
+
}
|
|
88
|
+
async function readTransfer(store, locator, transfer, receive) {
|
|
89
|
+
let range = underTransfer(locator, transfer);
|
|
90
|
+
for (;;) {
|
|
91
|
+
const batch = await settled(store.getAll(range, READ_BATCH));
|
|
92
|
+
for (const record of batch)
|
|
93
|
+
receive(record);
|
|
94
|
+
if (batch.length < READ_BATCH)
|
|
95
|
+
return;
|
|
96
|
+
range = underTransfer(locator, transfer, batch[batch.length - 1].path);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function emptyLayer() {
|
|
100
|
+
return { documents: {}, binaries: {}, revisions: {}, changes: {}, written: {} };
|
|
101
|
+
}
|
|
102
|
+
async function readLayer(transaction, locator, transfer) {
|
|
103
|
+
const layer = emptyLayer();
|
|
104
|
+
const head = (held) => {
|
|
105
|
+
if (held.revision !== null)
|
|
106
|
+
layer.revisions[held.path] = held.revision;
|
|
107
|
+
if (held.change !== null)
|
|
108
|
+
layer.changes[held.path] = held.change;
|
|
109
|
+
};
|
|
110
|
+
await readTransfer(transaction.objectStore(DOCUMENTS), locator, transfer, (document) => {
|
|
111
|
+
layer.documents[document.path] = document.content;
|
|
112
|
+
if (document.written !== null)
|
|
113
|
+
layer.written[document.path] = document.written;
|
|
114
|
+
head(document);
|
|
115
|
+
});
|
|
116
|
+
await readTransfer(transaction.objectStore(BINARY_FILES), locator, transfer, (file) => {
|
|
117
|
+
layer.binaries[file.path] = file.binary;
|
|
118
|
+
head(file);
|
|
119
|
+
});
|
|
120
|
+
return layer;
|
|
121
|
+
}
|
|
122
|
+
function documentRecord(locator, transfer, layer, path) {
|
|
123
|
+
return {
|
|
124
|
+
locator,
|
|
125
|
+
transfer,
|
|
126
|
+
path,
|
|
127
|
+
content: layer.documents[path],
|
|
128
|
+
revision: layer.revisions[path] ?? null,
|
|
129
|
+
change: layer.changes[path] ?? null,
|
|
130
|
+
written: layer.written[path] ?? null,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function binaryFileRecord(locator, transfer, layer, path) {
|
|
134
|
+
return {
|
|
135
|
+
locator,
|
|
136
|
+
transfer,
|
|
137
|
+
path,
|
|
138
|
+
revision: layer.revisions[path] ?? null,
|
|
139
|
+
change: layer.changes[path] ?? null,
|
|
140
|
+
binary: layer.binaries[path],
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function writeLayer(transaction, locator, transfer, next, base) {
|
|
144
|
+
const documents = transaction.objectStore(DOCUMENTS);
|
|
145
|
+
for (const path of Object.keys(base?.documents ?? {})) {
|
|
146
|
+
if (next.documents[path] === undefined)
|
|
147
|
+
documents.delete([locator, transfer, path]);
|
|
148
|
+
}
|
|
149
|
+
for (const [path, content] of Object.entries(next.documents)) {
|
|
150
|
+
if (base?.documents[path] === content &&
|
|
151
|
+
base.revisions[path] === next.revisions[path] &&
|
|
152
|
+
base.written[path] === next.written[path] &&
|
|
153
|
+
sameChange(base.changes[path], next.changes[path]))
|
|
154
|
+
continue;
|
|
155
|
+
documents.put(documentRecord(locator, transfer, next, path));
|
|
156
|
+
}
|
|
157
|
+
const files = transaction.objectStore(BINARY_FILES);
|
|
158
|
+
for (const path of Object.keys(base?.binaries ?? {})) {
|
|
159
|
+
if (next.binaries[path] === undefined)
|
|
160
|
+
files.delete([locator, transfer, path]);
|
|
161
|
+
}
|
|
162
|
+
for (const path of Object.keys(next.binaries)) {
|
|
163
|
+
if (!sameBinary(base?.binaries[path], next.binaries[path]) ||
|
|
164
|
+
base?.revisions[path] !== next.revisions[path] ||
|
|
165
|
+
!sameChange(base?.changes[path], next.changes[path])) {
|
|
166
|
+
files.put(binaryFileRecord(locator, transfer, next, path));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
63
169
|
}
|
|
64
170
|
function removeRoomEntries(store, locator) {
|
|
65
171
|
const keys = store.getAllKeys();
|
|
@@ -70,177 +176,157 @@ function removeRoomEntries(store, locator) {
|
|
|
70
176
|
}
|
|
71
177
|
};
|
|
72
178
|
}
|
|
73
|
-
|
|
179
|
+
function removeDatabase(name) {
|
|
74
180
|
return new Promise((resolve, reject) => {
|
|
75
|
-
const removal = indexedDB.deleteDatabase(
|
|
181
|
+
const removal = indexedDB.deleteDatabase(name);
|
|
76
182
|
removal.onsuccess = () => resolve();
|
|
77
183
|
removal.onerror = () => reject(removal.error);
|
|
78
184
|
});
|
|
79
185
|
}
|
|
80
|
-
export async function
|
|
186
|
+
export async function authoredHolder() {
|
|
187
|
+
const authored = await openAuthored();
|
|
188
|
+
try {
|
|
189
|
+
const transaction = authored.transaction(FACTS, 'readonly');
|
|
190
|
+
const held = transaction.objectStore(FACTS).get(HOLDER);
|
|
191
|
+
await completed(transaction);
|
|
192
|
+
return typeof held.result === 'string' ? held.result : null;
|
|
193
|
+
}
|
|
194
|
+
finally {
|
|
195
|
+
authored.close();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
export async function authoredBy(holder) {
|
|
199
|
+
const authored = await openAuthored();
|
|
200
|
+
try {
|
|
201
|
+
const transaction = authored.transaction(FACTS, 'readwrite');
|
|
202
|
+
const facts = transaction.objectStore(FACTS);
|
|
203
|
+
const held = facts.get(HOLDER);
|
|
204
|
+
let owned = true;
|
|
205
|
+
held.onsuccess = () => {
|
|
206
|
+
if (held.result === undefined)
|
|
207
|
+
facts.put(holder, HOLDER);
|
|
208
|
+
else
|
|
209
|
+
owned = held.result === holder;
|
|
210
|
+
};
|
|
211
|
+
await completed(transaction);
|
|
212
|
+
return owned;
|
|
213
|
+
}
|
|
214
|
+
finally {
|
|
215
|
+
authored.close();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
export async function removeRuntimeStore(holder) {
|
|
219
|
+
await removeDatabase(DATABASE);
|
|
220
|
+
if (holder !== undefined && (await authoredBy(holder)))
|
|
221
|
+
return true;
|
|
222
|
+
await removeDatabase(AUTHORED);
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
function openReplica() {
|
|
81
226
|
const opening = indexedDB.open(DATABASE, STORE_SCHEMA);
|
|
82
227
|
opening.onupgradeneeded = () => {
|
|
83
228
|
const database = opening.result;
|
|
84
229
|
for (const name of [...database.objectStoreNames])
|
|
85
230
|
database.deleteObjectStore(name);
|
|
86
231
|
database.createObjectStore(ROOMS, { keyPath: 'locator' });
|
|
87
|
-
database.createObjectStore(DOCUMENTS, { keyPath: ['locator', 'path'] });
|
|
88
|
-
database.createObjectStore(
|
|
89
|
-
database.createObjectStore(
|
|
90
|
-
database.createObjectStore(PENDING_CHANGES, { keyPath: ['locator', 'id'] });
|
|
232
|
+
database.createObjectStore(DOCUMENTS, { keyPath: ['locator', 'transfer', 'path'] });
|
|
233
|
+
database.createObjectStore(BINARY_FILES, { keyPath: ['locator', 'transfer', 'path'] });
|
|
234
|
+
database.createObjectStore(TRANSFERS, { keyPath: 'locator' });
|
|
91
235
|
database.createObjectStore(DECLARATIONS);
|
|
92
|
-
database.createObjectStore(ROOM_DRAFTS, { keyPath: ['locator', 'path'] });
|
|
93
236
|
database.createObjectStore(PRESENTATION, { keyPath: 'app' });
|
|
94
237
|
database.createObjectStore(CONVERSATIONS, { keyPath: 'conversation' });
|
|
95
238
|
const messages = database.createObjectStore(MESSAGES, {
|
|
96
239
|
keyPath: ['conversation', 'identity'],
|
|
97
240
|
});
|
|
98
241
|
messages.createIndex('conversation', 'conversation');
|
|
99
|
-
database.createObjectStore(CHAT_DRAFTS, { keyPath: 'conversation' });
|
|
100
242
|
};
|
|
101
|
-
|
|
243
|
+
return settled(opening);
|
|
244
|
+
}
|
|
245
|
+
function openAuthored() {
|
|
246
|
+
const opening = indexedDB.open(AUTHORED, AUTHORED_SCHEMA);
|
|
247
|
+
opening.onupgradeneeded = () => {
|
|
248
|
+
const database = opening.result;
|
|
249
|
+
for (const [name, parameters] of AUTHORED_STORES) {
|
|
250
|
+
if (!database.objectStoreNames.contains(name))
|
|
251
|
+
database.createObjectStore(name, parameters);
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
return settled(opening);
|
|
255
|
+
}
|
|
256
|
+
export async function openRuntimeStore() {
|
|
257
|
+
const authored = await openAuthored();
|
|
258
|
+
const database = await openReplica().catch((error) => {
|
|
259
|
+
authored.close();
|
|
260
|
+
throw error;
|
|
261
|
+
});
|
|
102
262
|
return {
|
|
103
263
|
async all() {
|
|
104
|
-
const transaction = database.transaction([ROOMS, DOCUMENTS,
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
settled(transaction.objectStore(ATTACHMENTS).getAll()),
|
|
110
|
-
]);
|
|
111
|
-
const byRoom = new Map();
|
|
112
|
-
for (const { order, ...room } of rooms) {
|
|
113
|
-
byRoom.set(room.locator, {
|
|
114
|
-
...room,
|
|
115
|
-
documents: {},
|
|
116
|
-
revisions: {},
|
|
117
|
-
changes: {},
|
|
118
|
-
written: {},
|
|
119
|
-
binaryTargets: [],
|
|
120
|
-
attachments: [],
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
const head = (room, held) => {
|
|
124
|
-
if (held.revision !== null) {
|
|
125
|
-
room.revisions[held.path] = held.revision;
|
|
126
|
-
}
|
|
127
|
-
if (held.change !== null) {
|
|
128
|
-
room.changes[held.path] = held.change;
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
for (const document of documents) {
|
|
132
|
-
const room = byRoom.get(document.locator);
|
|
133
|
-
if (room === undefined)
|
|
134
|
-
continue;
|
|
135
|
-
room.documents[document.path] = document.content;
|
|
136
|
-
if (document.written !== null) {
|
|
137
|
-
room.written[document.path] = document.written;
|
|
138
|
-
}
|
|
139
|
-
head(room, document);
|
|
140
|
-
}
|
|
141
|
-
for (const target of targets) {
|
|
142
|
-
const room = byRoom.get(target.locator);
|
|
143
|
-
if (room === undefined)
|
|
144
|
-
continue;
|
|
145
|
-
room.binaryTargets.push(target.path);
|
|
146
|
-
head(room, target);
|
|
147
|
-
}
|
|
148
|
-
for (const { locator, ...attachment } of attachments) {
|
|
149
|
-
const room = byRoom.get(locator);
|
|
150
|
-
if (room === undefined)
|
|
151
|
-
continue;
|
|
152
|
-
room.attachments.push(attachment);
|
|
153
|
-
}
|
|
154
|
-
return [...byRoom.values()];
|
|
155
|
-
},
|
|
156
|
-
async write({ next, previous, queue, previousQueue, saved, roomDrafts, consumedRoomDrafts }) {
|
|
157
|
-
const transaction = database.transaction([ROOMS, DOCUMENTS, BINARY_TARGETS, ATTACHMENTS, PENDING_CHANGES, ROOM_DRAFTS], 'readwrite');
|
|
158
|
-
transaction.objectStore(ROOMS).put(roomRecord(next, queue));
|
|
159
|
-
const documents = transaction.objectStore(DOCUMENTS);
|
|
160
|
-
for (const path of Object.keys(previous?.documents ?? {})) {
|
|
161
|
-
if (next.documents[path] === undefined)
|
|
162
|
-
documents.delete([next.locator, path]);
|
|
163
|
-
}
|
|
164
|
-
for (const [path, content] of Object.entries(next.documents)) {
|
|
165
|
-
if (previous?.documents[path] === content &&
|
|
166
|
-
previous.revisions[path] === next.revisions[path] &&
|
|
167
|
-
previous.written[path] === next.written[path] &&
|
|
168
|
-
sameChange(previous.changes[path], next.changes[path]))
|
|
169
|
-
continue;
|
|
170
|
-
documents.put({
|
|
171
|
-
locator: next.locator,
|
|
172
|
-
path,
|
|
173
|
-
content,
|
|
174
|
-
revision: next.revisions[path] ?? null,
|
|
175
|
-
change: next.changes[path] ?? null,
|
|
176
|
-
written: next.written[path] ?? null,
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
const targets = transaction.objectStore(BINARY_TARGETS);
|
|
180
|
-
const beforeTargets = new Set(previous?.binaryTargets ?? []);
|
|
181
|
-
const afterTargets = new Set(next.binaryTargets);
|
|
182
|
-
for (const path of beforeTargets) {
|
|
183
|
-
if (!afterTargets.has(path))
|
|
184
|
-
targets.delete([next.locator, path]);
|
|
264
|
+
const transaction = database.transaction([ROOMS, DOCUMENTS, BINARY_FILES], 'readonly');
|
|
265
|
+
const rooms = await settled(transaction.objectStore(ROOMS).getAll());
|
|
266
|
+
const records = [];
|
|
267
|
+
for (const room of rooms) {
|
|
268
|
+
records.push({ ...room, ...(await readLayer(transaction, room.locator, room.transfer)) });
|
|
185
269
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
const attachments = transaction.objectStore(ATTACHMENTS);
|
|
199
|
-
const held = new Map((previous?.attachments ?? []).map((attachment) => [attachment.reference, attachment]));
|
|
200
|
-
const declared = new Set(next.attachments.map((attachment) => attachment.reference));
|
|
201
|
-
for (const reference of held.keys()) {
|
|
202
|
-
if (!declared.has(reference))
|
|
203
|
-
attachments.delete([next.locator, reference]);
|
|
204
|
-
}
|
|
205
|
-
for (const attachment of next.attachments) {
|
|
206
|
-
if (held.get(attachment.reference) === attachment)
|
|
207
|
-
continue;
|
|
208
|
-
attachments.put({ ...attachment, locator: next.locator });
|
|
209
|
-
}
|
|
210
|
-
if (previousQueue !== undefined) {
|
|
211
|
-
const pending = transaction.objectStore(PENDING_CHANGES);
|
|
212
|
-
const before = new Set(previousQueue.map((batch) => batch.id));
|
|
270
|
+
return records;
|
|
271
|
+
},
|
|
272
|
+
async keepAuthored({ locator, queue, saved, roomDrafts, consumedRoomDrafts }) {
|
|
273
|
+
const transaction = authored.transaction([QUEUES, PENDING_CHANGES, ROOM_DRAFTS], 'readwrite');
|
|
274
|
+
const order = transaction.objectStore(QUEUES);
|
|
275
|
+
const pending = transaction.objectStore(PENDING_CHANGES);
|
|
276
|
+
const held = order.get(locator);
|
|
277
|
+
held.onsuccess = () => {
|
|
278
|
+
const before = new Set(held.result?.order ?? []);
|
|
213
279
|
const after = new Set(queue.map((batch) => batch.id));
|
|
280
|
+
if (queue.length === 0)
|
|
281
|
+
order.delete(locator);
|
|
282
|
+
else
|
|
283
|
+
order.put({ locator, order: [...after] });
|
|
214
284
|
for (const id of before) {
|
|
215
285
|
if (!after.has(id))
|
|
216
|
-
pending.delete([
|
|
286
|
+
pending.delete([locator, id]);
|
|
217
287
|
}
|
|
218
288
|
for (const batch of queue) {
|
|
219
289
|
if (!before.has(batch.id)) {
|
|
220
290
|
pending.put({
|
|
221
|
-
locator
|
|
291
|
+
locator,
|
|
222
292
|
id: batch.id,
|
|
223
293
|
batch,
|
|
224
|
-
drafts: saved ?? [],
|
|
294
|
+
drafts: saved?.get(batch.id) ?? [],
|
|
225
295
|
submission: { state: 'waiting' },
|
|
226
296
|
lost: false,
|
|
227
297
|
});
|
|
228
298
|
}
|
|
229
299
|
}
|
|
230
|
-
}
|
|
300
|
+
};
|
|
231
301
|
const draftStore = transaction.objectStore(ROOM_DRAFTS);
|
|
232
302
|
for (const path of consumedRoomDrafts ?? [])
|
|
233
|
-
draftStore.delete([
|
|
303
|
+
draftStore.delete([locator, path]);
|
|
234
304
|
for (const record of roomDrafts ?? [])
|
|
235
305
|
draftStore.put(record);
|
|
236
306
|
await completed(transaction);
|
|
237
307
|
},
|
|
308
|
+
async write({ next, previous, stored }) {
|
|
309
|
+
if (next === previous)
|
|
310
|
+
return;
|
|
311
|
+
const transaction = database.transaction([ROOMS, DOCUMENTS, BINARY_FILES, TRANSFERS], 'readwrite');
|
|
312
|
+
transaction.objectStore(ROOMS).put(roomRecord(next));
|
|
313
|
+
const moved = previous?.transfer !== next.transfer;
|
|
314
|
+
if (moved && previous !== null) {
|
|
315
|
+
const range = underTransfer(previous.locator, previous.transfer);
|
|
316
|
+
transaction.objectStore(DOCUMENTS).delete(range);
|
|
317
|
+
transaction.objectStore(BINARY_FILES).delete(range);
|
|
318
|
+
}
|
|
319
|
+
if (moved)
|
|
320
|
+
transaction.objectStore(TRANSFERS).delete(next.locator);
|
|
321
|
+
writeLayer(transaction, next.locator, next.transfer, next, moved ? (stored ?? null) : previous);
|
|
322
|
+
await completed(transaction);
|
|
323
|
+
},
|
|
238
324
|
async revokeModels(records) {
|
|
239
325
|
const transaction = database.transaction(ROOMS, 'readwrite');
|
|
240
326
|
const rooms = transaction.objectStore(ROOMS);
|
|
241
327
|
const revoked = { status: 'unavailable', reason: 'revoked' };
|
|
242
|
-
for (const
|
|
243
|
-
rooms.put(roomRecord({ ...record, model: revoked, selectionModel: revoked }
|
|
328
|
+
for (const record of records) {
|
|
329
|
+
rooms.put(roomRecord({ ...record, model: revoked, selectionModel: revoked }));
|
|
244
330
|
}
|
|
245
331
|
await completed(transaction);
|
|
246
332
|
},
|
|
@@ -274,34 +360,34 @@ export async function openRuntimeStore() {
|
|
|
274
360
|
await completed(transaction);
|
|
275
361
|
},
|
|
276
362
|
async queues() {
|
|
277
|
-
const transaction =
|
|
278
|
-
const [
|
|
279
|
-
settled(transaction.objectStore(
|
|
363
|
+
const transaction = authored.transaction([QUEUES, PENDING_CHANGES], 'readonly');
|
|
364
|
+
const [queues, pending] = await Promise.all([
|
|
365
|
+
settled(transaction.objectStore(QUEUES).getAll()),
|
|
280
366
|
settled(transaction.objectStore(PENDING_CHANGES).getAll()),
|
|
281
367
|
]);
|
|
282
368
|
const byId = new Map(pending.map((record) => [`${record.locator}\0${record.id}`, record]));
|
|
283
|
-
return
|
|
284
|
-
locator:
|
|
285
|
-
pending:
|
|
286
|
-
const record = byId.get(`${
|
|
369
|
+
return queues.map((queue) => ({
|
|
370
|
+
locator: queue.locator,
|
|
371
|
+
pending: queue.order.map((id) => {
|
|
372
|
+
const record = byId.get(`${queue.locator}\0${id}`);
|
|
287
373
|
if (record === undefined)
|
|
288
|
-
throw new Error(`Missing Pending Change ${
|
|
374
|
+
throw new Error(`Missing Pending Change ${queue.locator}/${id}`);
|
|
289
375
|
const { batch, drafts, submission, lost, upload, accepted } = record;
|
|
290
376
|
return { batch, state: { drafts, submission, lost, upload, accepted } };
|
|
291
377
|
}),
|
|
292
378
|
}));
|
|
293
379
|
},
|
|
294
380
|
submit(locator, id, submission, lost) {
|
|
295
|
-
return amendPending(
|
|
381
|
+
return amendPending(authored, locator, id, { submission, lost });
|
|
296
382
|
},
|
|
297
383
|
accept(locator, id, roomVersion) {
|
|
298
|
-
return amendPending(
|
|
384
|
+
return amendPending(authored, locator, id, { accepted: roomVersion });
|
|
299
385
|
},
|
|
300
386
|
keepUpload(locator, id, upload) {
|
|
301
|
-
return amendPending(
|
|
387
|
+
return amendPending(authored, locator, id, { upload });
|
|
302
388
|
},
|
|
303
389
|
async roomDrafts() {
|
|
304
|
-
const transaction =
|
|
390
|
+
const transaction = authored.transaction(ROOM_DRAFTS, 'readonly');
|
|
305
391
|
return settled(transaction.objectStore(ROOM_DRAFTS).getAll());
|
|
306
392
|
},
|
|
307
393
|
async presentation() {
|
|
@@ -331,7 +417,12 @@ export async function openRuntimeStore() {
|
|
|
331
417
|
return [...held.values()];
|
|
332
418
|
},
|
|
333
419
|
async keepMessages({ conversation, messages, read, sealed }) {
|
|
334
|
-
|
|
420
|
+
if (sealed === true) {
|
|
421
|
+
const sealing = authored.transaction(CHAT_DRAFTS, 'readwrite');
|
|
422
|
+
sealing.objectStore(CHAT_DRAFTS).delete(conversation);
|
|
423
|
+
await completed(sealing);
|
|
424
|
+
}
|
|
425
|
+
const transaction = database.transaction([CONVERSATIONS, MESSAGES], 'readwrite');
|
|
335
426
|
const stored = transaction.objectStore(MESSAGES);
|
|
336
427
|
for (const message of messages) {
|
|
337
428
|
stored.put({ ...message, conversation });
|
|
@@ -341,16 +432,17 @@ export async function openRuntimeStore() {
|
|
|
341
432
|
.objectStore(CONVERSATIONS)
|
|
342
433
|
.put({ conversation, read });
|
|
343
434
|
}
|
|
344
|
-
if (sealed === true)
|
|
345
|
-
transaction.objectStore(CHAT_DRAFTS).delete(conversation);
|
|
346
435
|
await completed(transaction);
|
|
347
436
|
},
|
|
348
437
|
async dropConversations(conversations) {
|
|
349
|
-
const
|
|
438
|
+
const drafts = authored.transaction(CHAT_DRAFTS, 'readwrite');
|
|
439
|
+
for (const conversation of conversations)
|
|
440
|
+
drafts.objectStore(CHAT_DRAFTS).delete(conversation);
|
|
441
|
+
await completed(drafts);
|
|
442
|
+
const transaction = database.transaction([CONVERSATIONS, MESSAGES], 'readwrite');
|
|
350
443
|
const messages = transaction.objectStore(MESSAGES);
|
|
351
444
|
for (const conversation of conversations) {
|
|
352
445
|
transaction.objectStore(CONVERSATIONS).delete(conversation);
|
|
353
|
-
transaction.objectStore(CHAT_DRAFTS).delete(conversation);
|
|
354
446
|
const keys = messages.index('conversation').getAllKeys(conversation);
|
|
355
447
|
keys.onsuccess = () => {
|
|
356
448
|
for (const key of keys.result)
|
|
@@ -360,46 +452,89 @@ export async function openRuntimeStore() {
|
|
|
360
452
|
await completed(transaction);
|
|
361
453
|
},
|
|
362
454
|
async chatDrafts() {
|
|
363
|
-
const transaction =
|
|
364
|
-
|
|
455
|
+
const transaction = authored.transaction(CHAT_DRAFTS, 'readonly');
|
|
456
|
+
const held = await settled(transaction.objectStore(CHAT_DRAFTS).getAll());
|
|
457
|
+
return held.map(chatDraftRecord);
|
|
365
458
|
},
|
|
366
459
|
async keepChatDraft(record) {
|
|
367
|
-
const transaction =
|
|
460
|
+
const transaction = authored.transaction(CHAT_DRAFTS, 'readwrite');
|
|
368
461
|
transaction.objectStore(CHAT_DRAFTS).put(record);
|
|
369
462
|
await completed(transaction);
|
|
370
463
|
},
|
|
371
464
|
async dropChatDraft(conversation) {
|
|
372
|
-
const transaction =
|
|
465
|
+
const transaction = authored.transaction(CHAT_DRAFTS, 'readwrite');
|
|
373
466
|
transaction.objectStore(CHAT_DRAFTS).delete(conversation);
|
|
374
467
|
await completed(transaction);
|
|
375
468
|
},
|
|
376
469
|
async keepRoomDraft(record) {
|
|
377
|
-
const transaction =
|
|
470
|
+
const transaction = authored.transaction(ROOM_DRAFTS, 'readwrite');
|
|
378
471
|
transaction.objectStore(ROOM_DRAFTS).put(record);
|
|
379
472
|
await completed(transaction);
|
|
380
473
|
},
|
|
381
474
|
async discardRoomDraft(locator, path) {
|
|
382
|
-
const transaction =
|
|
475
|
+
const transaction = authored.transaction(ROOM_DRAFTS, 'readwrite');
|
|
383
476
|
transaction.objectStore(ROOM_DRAFTS).delete([locator, path]);
|
|
384
477
|
await completed(transaction);
|
|
385
478
|
},
|
|
386
479
|
async dropRooms(locators) {
|
|
387
|
-
const
|
|
480
|
+
const work = authored.transaction([QUEUES, PENDING_CHANGES, ROOM_DRAFTS], 'readwrite');
|
|
388
481
|
for (const locator of locators) {
|
|
389
|
-
|
|
390
|
-
for (const name of [
|
|
391
|
-
removeRoomEntries(
|
|
482
|
+
work.objectStore(QUEUES).delete(locator);
|
|
483
|
+
for (const name of [PENDING_CHANGES, ROOM_DRAFTS]) {
|
|
484
|
+
removeRoomEntries(work.objectStore(name), locator);
|
|
392
485
|
}
|
|
393
486
|
}
|
|
487
|
+
await completed(work);
|
|
488
|
+
const transaction = database.transaction([ROOMS, DOCUMENTS, BINARY_FILES, TRANSFERS], 'readwrite');
|
|
489
|
+
for (const locator of locators) {
|
|
490
|
+
transaction.objectStore(ROOMS).delete(locator);
|
|
491
|
+
transaction.objectStore(TRANSFERS).delete(locator);
|
|
492
|
+
transaction.objectStore(DOCUMENTS).delete(underRoom(locator));
|
|
493
|
+
transaction.objectStore(BINARY_FILES).delete(underRoom(locator));
|
|
494
|
+
}
|
|
495
|
+
await completed(transaction);
|
|
496
|
+
},
|
|
497
|
+
async transfers() {
|
|
498
|
+
const transaction = database.transaction(TRANSFERS, 'readonly');
|
|
499
|
+
return settled(transaction.objectStore(TRANSFERS).getAll());
|
|
500
|
+
},
|
|
501
|
+
staged(record) {
|
|
502
|
+
const transaction = database.transaction([DOCUMENTS, BINARY_FILES], 'readonly');
|
|
503
|
+
return readLayer(transaction, record.locator, record.transfer);
|
|
504
|
+
},
|
|
505
|
+
async stage(record, page) {
|
|
506
|
+
const transaction = database.transaction([TRANSFERS, DOCUMENTS, BINARY_FILES], 'readwrite');
|
|
507
|
+
writeLayer(transaction, record.locator, record.transfer, page, null);
|
|
508
|
+
transaction.objectStore(TRANSFERS).put(record);
|
|
509
|
+
await completed(transaction);
|
|
510
|
+
},
|
|
511
|
+
async abandon(locator) {
|
|
512
|
+
const transaction = database.transaction([TRANSFERS, DOCUMENTS, BINARY_FILES], 'readwrite');
|
|
513
|
+
const transfers = transaction.objectStore(TRANSFERS);
|
|
514
|
+
const held = transfers.get(locator);
|
|
515
|
+
held.onsuccess = () => {
|
|
516
|
+
const record = held.result;
|
|
517
|
+
if (record === undefined)
|
|
518
|
+
return;
|
|
519
|
+
transfers.delete(locator);
|
|
520
|
+
const range = underTransfer(locator, record.transfer);
|
|
521
|
+
transaction.objectStore(DOCUMENTS).delete(range);
|
|
522
|
+
transaction.objectStore(BINARY_FILES).delete(range);
|
|
523
|
+
};
|
|
394
524
|
await completed(transaction);
|
|
395
525
|
},
|
|
396
526
|
async generation() {
|
|
397
|
-
|
|
527
|
+
const transaction = authored.transaction(FACTS, 'readonly');
|
|
528
|
+
const held = await settled(transaction.objectStore(FACTS).get(GENERATION));
|
|
529
|
+
return held ?? null;
|
|
398
530
|
},
|
|
399
|
-
rememberGeneration(value) {
|
|
400
|
-
|
|
531
|
+
async rememberGeneration(value) {
|
|
532
|
+
const transaction = authored.transaction(FACTS, 'readwrite');
|
|
533
|
+
transaction.objectStore(FACTS).put(value, GENERATION);
|
|
534
|
+
await completed(transaction);
|
|
401
535
|
},
|
|
402
536
|
close() {
|
|
537
|
+
authored.close();
|
|
403
538
|
database.close();
|
|
404
539
|
},
|
|
405
540
|
};
|
package/dist/wire.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ConnectionRefusal } from './connection.js';
|
|
2
|
+
import type { Described } from './failure.js';
|
|
2
3
|
export type RuntimePort = {
|
|
3
4
|
postMessage(message: unknown): void;
|
|
4
5
|
addEventListener(type: 'message' | 'close', listener: (event: {
|
|
@@ -14,6 +15,8 @@ declare const MEMBERS: {
|
|
|
14
15
|
readonly types: 'within';
|
|
15
16
|
readonly save: 'within';
|
|
16
17
|
readonly history: 'within';
|
|
18
|
+
readonly 'binaryFile.read': 'within';
|
|
19
|
+
readonly 'binaryFile.readReference': 'within';
|
|
17
20
|
readonly call: 'actions';
|
|
18
21
|
readonly reached: 'within';
|
|
19
22
|
readonly log: 'whole';
|
|
@@ -51,6 +54,7 @@ declare const TOPICS: {
|
|
|
51
54
|
readonly presentation: 'app';
|
|
52
55
|
readonly conversation: 'within';
|
|
53
56
|
readonly conversations: 'within';
|
|
57
|
+
readonly agents: 'within';
|
|
54
58
|
};
|
|
55
59
|
export declare const WIRE_REACH: {
|
|
56
60
|
readonly members: Readonly<Record<string, WireReach>>;
|
|
@@ -78,11 +82,10 @@ export type WireAnswer = {
|
|
|
78
82
|
kind: 'result';
|
|
79
83
|
id: number;
|
|
80
84
|
value: unknown;
|
|
81
|
-
} | {
|
|
85
|
+
} | ({
|
|
82
86
|
kind: 'failure';
|
|
83
87
|
id: number;
|
|
84
|
-
|
|
85
|
-
} | {
|
|
88
|
+
} & Described) | {
|
|
86
89
|
kind: 'event';
|
|
87
90
|
id: number;
|
|
88
91
|
value: unknown;
|
package/dist/wire.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"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"}
|