@agentshouse/mdruntime 0.1.0-ccbb89b0ca151 → 0.1.0-ccc0e3407f107
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 +1 -1
- package/dist/adapter.d.ts +74 -57
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +3 -10
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +29 -47
- package/dist/bootstrap.d.ts +11 -18
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +85 -108
- package/dist/chain.d.ts +2 -1
- package/dist/chain.d.ts.map +1 -1
- package/dist/client.d.ts +9 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -1
- package/dist/collection.d.ts +7 -4
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +23 -17
- package/dist/compile.d.ts +1 -6
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +91 -270
- package/dist/connection.d.ts +10 -9
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1009 -1063
- package/dist/context.d.ts +2 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +7 -0
- package/dist/conversation.d.ts +16 -13
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +229 -155
- package/dist/durability.d.ts +6 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/entry.d.ts +3 -2
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +17 -8
- package/dist/host.d.ts +3 -7
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +22 -27
- 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 +11 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- 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 +10 -7
- package/dist/media.d.ts +1 -1
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +27 -4
- package/dist/memory.d.ts +11 -5
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +167 -84
- package/dist/messages.d.ts +2 -2
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +15 -16
- package/dist/model.d.ts +8 -8
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +6 -12
- 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 +0 -3
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +3 -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 +4 -209
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +3 -505
- package/dist/reach.d.ts +9 -8
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +37 -48
- package/dist/react.d.ts +3 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/readiness.d.ts +3 -17
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +4 -10
- 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 +7 -5
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +29 -5
- package/dist/replica.d.ts +10 -8
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +29 -14
- package/dist/room-draft.d.ts +21 -5
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +98 -51
- package/dist/rows.d.ts +14 -21
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +48 -184
- package/dist/save.d.ts +2 -0
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +20 -12
- package/dist/search.d.ts +12 -63
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +9 -52
- 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 +21 -34
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +34 -77
- package/dist/stored.d.ts +11 -34
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +158 -241
- package/dist/tables.d.ts +23 -48
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +29 -66
- 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 +42 -100
- 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 +9 -4
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +3 -1
- package/package.json +2 -2
- package/dist/fulltext.d.ts +0 -27
- package/dist/fulltext.d.ts.map +0 -1
- package/dist/fulltext.js +0 -368
- package/dist/reads.d.ts +0 -11
- package/dist/reads.d.ts.map +0 -1
- package/dist/reads.js +0 -100
- package/dist/words.d.ts +0 -19
- package/dist/words.d.ts.map +0 -1
- package/dist/words.js +0 -150
package/dist/reach.js
CHANGED
|
@@ -6,7 +6,6 @@ import { failure, lockedRoom, ROOM_LOCKED, undeclared, UNREADABLE, } from './out
|
|
|
6
6
|
import { beneath } from './paths.js';
|
|
7
7
|
import { moveTarget, readParts, staleWrite, } from './room-draft.js';
|
|
8
8
|
import { documentKey } from './rows.js';
|
|
9
|
-
import { undeclaredSearch } from './search.js';
|
|
10
9
|
const UNHELD_TYPES = { collection: modelTypes(NO_MODEL), typedSelection: null };
|
|
11
10
|
function unconversed(name) {
|
|
12
11
|
return () => Promise.resolve(undeclared(name));
|
|
@@ -14,13 +13,12 @@ function unconversed(name) {
|
|
|
14
13
|
const NO_CONVERSATION = {
|
|
15
14
|
list: () => Promise.resolve([]),
|
|
16
15
|
read: (conversation) => Promise.resolve(unheldView(conversation)),
|
|
17
|
-
create: unconversed('
|
|
18
|
-
send: unconversed('
|
|
19
|
-
answer: unconversed('
|
|
20
|
-
interrupt: unconversed('
|
|
21
|
-
kill: unconversed('
|
|
22
|
-
|
|
23
|
-
delete: unconversed('conversation.delete'),
|
|
16
|
+
create: unconversed('conversations/create'),
|
|
17
|
+
send: unconversed('conversations/send'),
|
|
18
|
+
answer: unconversed('conversations/interaction/answer'),
|
|
19
|
+
interrupt: unconversed('conversations/interrupt'),
|
|
20
|
+
kill: unconversed('conversations/kill'),
|
|
21
|
+
delete: unconversed('conversations/delete'),
|
|
24
22
|
};
|
|
25
23
|
const NO_CHAT_DRAFT = {
|
|
26
24
|
write: () => Promise.resolve(),
|
|
@@ -30,17 +28,15 @@ const NO_CHAT_DRAFT = {
|
|
|
30
28
|
function areasOf(reach) {
|
|
31
29
|
return reach.areas ?? [];
|
|
32
30
|
}
|
|
33
|
-
function typedAreas(reach, room) {
|
|
34
|
-
return areasOf(reach).filter((area) => area.room === room && area.types.length > 0);
|
|
35
|
-
}
|
|
36
31
|
function fenced(reach, room, path) {
|
|
37
|
-
return areasOf(reach).some((area) => area.room === room &&
|
|
32
|
+
return areasOf(reach).some((area) => area.room === room &&
|
|
33
|
+
beneath(area.path, path) &&
|
|
34
|
+
!area.open.some((open) => beneath(open, path)));
|
|
38
35
|
}
|
|
39
36
|
export function holds(reach, room) {
|
|
40
37
|
return (reach === null ||
|
|
41
38
|
reach.rooms.includes(room) ||
|
|
42
|
-
reach.documents.some((document) => document.room === room)
|
|
43
|
-
typedAreas(reach, room).length > 0);
|
|
39
|
+
reach.documents.some((document) => document.room === room));
|
|
44
40
|
}
|
|
45
41
|
function wholly(reach, room) {
|
|
46
42
|
return reach === null || reach.rooms.includes(room);
|
|
@@ -50,12 +46,9 @@ export function governs(reach, room) {
|
|
|
50
46
|
return { collection: true, selection: room.typedSelection !== null };
|
|
51
47
|
}
|
|
52
48
|
const selected = (path) => room.typedSelection?.roots.some((root) => beneath(root, path)) ?? false;
|
|
53
|
-
const paths =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.map(({ path }) => path),
|
|
57
|
-
...typedAreas(reach, room.locator).map(({ path }) => path),
|
|
58
|
-
];
|
|
49
|
+
const paths = reach.documents
|
|
50
|
+
.filter((document) => document.room === room.locator)
|
|
51
|
+
.map(({ path }) => path);
|
|
59
52
|
return { collection: paths.some((path) => !selected(path)), selection: paths.some(selected) };
|
|
60
53
|
}
|
|
61
54
|
function covers(reach, room, path) {
|
|
@@ -76,7 +69,7 @@ export function planReach(reach) {
|
|
|
76
69
|
...new Set(reach.documents.map(({ room, path }) => documentKey(room, path))),
|
|
77
70
|
].sort(),
|
|
78
71
|
areas: areasOf(reach)
|
|
79
|
-
.map(({ room, path,
|
|
72
|
+
.map(({ room, path, open }) => ({ room, path, open: [...new Set(open)].sort() }))
|
|
80
73
|
.sort((left, right) => documentKey(left.room, left.path) < documentKey(right.room, right.path) ? -1 : 1),
|
|
81
74
|
};
|
|
82
75
|
}
|
|
@@ -126,7 +119,8 @@ function savedWithin(reach, room, result) {
|
|
|
126
119
|
function statusWithin(reach, status) {
|
|
127
120
|
return {
|
|
128
121
|
...status,
|
|
129
|
-
attentionRequired: status.attentionRequired.filter((entry) =>
|
|
122
|
+
attentionRequired: status.attentionRequired.filter((entry) => covers(reach, entry.room, entry.path)),
|
|
123
|
+
unsent: status.unsent.filter((change) => covers(reach, change.room, change.path)),
|
|
130
124
|
};
|
|
131
125
|
}
|
|
132
126
|
function queueWithin(reach, room, entries) {
|
|
@@ -143,13 +137,13 @@ function queueWithin(reach, room, entries) {
|
|
|
143
137
|
});
|
|
144
138
|
}
|
|
145
139
|
function unreached(room) {
|
|
146
|
-
return runtimeError('room
|
|
140
|
+
return runtimeError('unknown-room', `Unknown Room ${room}`);
|
|
147
141
|
}
|
|
148
142
|
function lockedError(room) {
|
|
149
143
|
return runtimeError(ROOM_LOCKED, `${room} is locked until House confirms its access`, true);
|
|
150
144
|
}
|
|
151
145
|
function deviceUnreached() {
|
|
152
|
-
return runtimeError('device-unreached', 'Only the panel
|
|
146
|
+
return runtimeError('device-unreached', 'Only the panel reaches this device');
|
|
153
147
|
}
|
|
154
148
|
const ATTACH_REQUIRED = 'attach-required';
|
|
155
149
|
function attachRequired() {
|
|
@@ -158,10 +152,9 @@ function attachRequired() {
|
|
|
158
152
|
function carriesFile(parts) {
|
|
159
153
|
return parts !== null && typeof parts === 'object' && Object.hasOwn(parts, 'file');
|
|
160
154
|
}
|
|
161
|
-
export function narrowed(runtime, given,
|
|
155
|
+
export function narrowed(runtime, given, port) {
|
|
162
156
|
const { md, watch } = runtime;
|
|
163
157
|
let reach = given;
|
|
164
|
-
let port = told;
|
|
165
158
|
const open = new Set();
|
|
166
159
|
function following(begin, locking = false) {
|
|
167
160
|
let stop = begin();
|
|
@@ -185,9 +178,9 @@ export function narrowed(runtime, given, told) {
|
|
|
185
178
|
};
|
|
186
179
|
const unlocked = (entries) => entries.filter((entry) => !runtime.locked(entry.room));
|
|
187
180
|
const intoLocked = (held) => held.some((move) => move?.room !== undefined && runtime.locked(move.room));
|
|
188
|
-
const within = (topic, input, deliver) => {
|
|
181
|
+
const within = (topic, input, deliver, fail) => {
|
|
189
182
|
if (topic === 'rooms') {
|
|
190
|
-
return following(() => watch(topic, input, (rooms) => deliver(roomsWithin(reach, rooms))));
|
|
183
|
+
return following(() => watch(topic, input, (rooms) => deliver(roomsWithin(reach, rooms)), fail));
|
|
191
184
|
}
|
|
192
185
|
if (topic === 'readiness') {
|
|
193
186
|
return following(() => runtime.watchReadiness(port, reach, deliver));
|
|
@@ -196,10 +189,10 @@ export function narrowed(runtime, given, told) {
|
|
|
196
189
|
return following(() => watch(topic, input, (status) => {
|
|
197
190
|
const within = statusWithin(reach, status);
|
|
198
191
|
deliver({ ...within, attentionRequired: unlocked(within.attentionRequired) });
|
|
199
|
-
}), true);
|
|
192
|
+
}, fail), true);
|
|
200
193
|
}
|
|
201
194
|
if (topic === 'room-drafts') {
|
|
202
|
-
return following(() => watch(topic, input, (drafts) => deliver(unlocked(draftsWithin(reach, drafts)))), true);
|
|
195
|
+
return following(() => watch(topic, input, (drafts) => deliver(unlocked(draftsWithin(reach, drafts))), fail), true);
|
|
203
196
|
}
|
|
204
197
|
if (topic === 'queue') {
|
|
205
198
|
const room = input[0];
|
|
@@ -208,7 +201,7 @@ export function narrowed(runtime, given, told) {
|
|
|
208
201
|
deliver([]);
|
|
209
202
|
return () => { };
|
|
210
203
|
}
|
|
211
|
-
return watch(topic, input, (entries) => deliver(queueWithin(reach, room, entries)));
|
|
204
|
+
return watch(topic, input, (entries) => deliver(queueWithin(reach, room, entries)), fail);
|
|
212
205
|
}, true);
|
|
213
206
|
}
|
|
214
207
|
if (topic === 'query') {
|
|
@@ -241,6 +234,9 @@ export function narrowed(runtime, given, told) {
|
|
|
241
234
|
const stop = runtime.watchPlan(current, (message) => {
|
|
242
235
|
if (open)
|
|
243
236
|
heard(message);
|
|
237
|
+
}, (error) => {
|
|
238
|
+
if (open)
|
|
239
|
+
fail(error);
|
|
244
240
|
});
|
|
245
241
|
return () => {
|
|
246
242
|
open = false;
|
|
@@ -251,7 +247,7 @@ export function narrowed(runtime, given, told) {
|
|
|
251
247
|
if (topic === 'conversation') {
|
|
252
248
|
return following(() => {
|
|
253
249
|
if (conversing(reach))
|
|
254
|
-
return watch(topic, input, deliver);
|
|
250
|
+
return watch(topic, input, deliver, fail);
|
|
255
251
|
deliver(unheldView(input[0]));
|
|
256
252
|
return () => { };
|
|
257
253
|
});
|
|
@@ -259,12 +255,12 @@ export function narrowed(runtime, given, told) {
|
|
|
259
255
|
if (topic === 'conversations' || topic === 'agents') {
|
|
260
256
|
return following(() => {
|
|
261
257
|
if (conversing(reach))
|
|
262
|
-
return watch(topic, input, deliver);
|
|
258
|
+
return watch(topic, input, deliver, fail);
|
|
263
259
|
deliver([]);
|
|
264
260
|
return () => { };
|
|
265
261
|
});
|
|
266
262
|
}
|
|
267
|
-
return watch(topic, input, deliver);
|
|
263
|
+
return watch(topic, input, deliver, fail);
|
|
268
264
|
};
|
|
269
265
|
const files = new Map();
|
|
270
266
|
let handed = 0;
|
|
@@ -281,14 +277,12 @@ export function narrowed(runtime, given, told) {
|
|
|
281
277
|
const chatDraft = () => (conversing(reach) ? md.chatDraft : NO_CHAT_DRAFT);
|
|
282
278
|
const view = {
|
|
283
279
|
...md,
|
|
284
|
-
rooms: () => roomsWithin(reach,
|
|
280
|
+
rooms: () => md.rooms().then((rooms) => roomsWithin(reach, rooms)),
|
|
285
281
|
query: ((input) => {
|
|
286
282
|
const plan = runtime.plan(input, reach);
|
|
287
283
|
return Promise.resolve(unlocking(plan.rooms) ?? runtime.query({ ...plan, locked: runtime.lockedRooms() }));
|
|
288
284
|
}),
|
|
289
|
-
search: (input) =>
|
|
290
|
-
? runtime.search(input, reach, runtime.lockedRooms())
|
|
291
|
-
: Promise.resolve(undeclaredSearch()),
|
|
285
|
+
search: (input) => runtime.search(input, reach),
|
|
292
286
|
types(room) {
|
|
293
287
|
if (holds(reach, room) && runtime.locked(room))
|
|
294
288
|
throw lockedError(room);
|
|
@@ -296,8 +290,7 @@ export function narrowed(runtime, given, told) {
|
|
|
296
290
|
return md.types(room);
|
|
297
291
|
if (!holds(reach, room))
|
|
298
292
|
return structuredClone(UNHELD_TYPES);
|
|
299
|
-
|
|
300
|
-
return typesWithin(reach, listed, md.types(room));
|
|
293
|
+
return typesWithin(reach, runtime.room(room), md.types(room));
|
|
301
294
|
},
|
|
302
295
|
async save(room, roomDrafts, writtenBy) {
|
|
303
296
|
if (!holds(reach, room))
|
|
@@ -322,7 +315,7 @@ export function narrowed(runtime, given, told) {
|
|
|
322
315
|
}
|
|
323
316
|
if (runtime.locked(room))
|
|
324
317
|
return { outcome: 'refused', code: ROOM_LOCKED, retryable: true };
|
|
325
|
-
const held = parts.map(({ parts: one }) => readParts(one).move);
|
|
318
|
+
const held = parts.map(({ path, parts: one }) => readParts(one, path).move);
|
|
326
319
|
if (parts.some(({ path }, at) => !covers(reach, room, path) || !moves(reach, room, held[at]))) {
|
|
327
320
|
throw unreached(room);
|
|
328
321
|
}
|
|
@@ -377,6 +370,8 @@ export function narrowed(runtime, given, told) {
|
|
|
377
370
|
(await md.reached(room, roomVersion, path)),
|
|
378
371
|
log: () => (reach === null ? md.log() : ''),
|
|
379
372
|
cleanUp: () => (reach === null ? md.cleanUp() : Promise.reject(deviceUnreached())),
|
|
373
|
+
unsent: () => (reach === null ? md.unsent() : Promise.reject(deviceUnreached())),
|
|
374
|
+
reset: () => (reach === null ? md.reset() : Promise.reject(deviceUnreached())),
|
|
380
375
|
roomDraft: {
|
|
381
376
|
list: () => md.roomDraft.list().then((drafts) => unlocked(draftsWithin(reach, drafts))),
|
|
382
377
|
async read(room, path) {
|
|
@@ -390,7 +385,7 @@ export function narrowed(runtime, given, told) {
|
|
|
390
385
|
try {
|
|
391
386
|
if (reach !== null && carriesFile(parts))
|
|
392
387
|
throw attachRequired();
|
|
393
|
-
const move = readParts(parts).move;
|
|
388
|
+
const move = readParts(parts, path).move;
|
|
394
389
|
if (!covers(reach, room, path) || !moves(reach, room, move))
|
|
395
390
|
throw unreached(room);
|
|
396
391
|
if (runtime.locked(room))
|
|
@@ -421,7 +416,6 @@ export function narrowed(runtime, given, told) {
|
|
|
421
416
|
answer: (id, answer) => conversation().answer(id, answer),
|
|
422
417
|
interrupt: (id) => conversation().interrupt(id),
|
|
423
418
|
kill: (id) => conversation().kill(id),
|
|
424
|
-
cancel: (id, turn) => conversation().cancel(id, turn),
|
|
425
419
|
delete: (id) => conversation().delete(id),
|
|
426
420
|
},
|
|
427
421
|
chatDraft: {
|
|
@@ -439,10 +433,5 @@ export function narrowed(runtime, given, told) {
|
|
|
439
433
|
for (const restart of [...open])
|
|
440
434
|
restart();
|
|
441
435
|
},
|
|
442
|
-
facts(next) {
|
|
443
|
-
port = next;
|
|
444
|
-
for (const restart of [...open])
|
|
445
|
-
restart();
|
|
446
|
-
},
|
|
447
436
|
};
|
|
448
437
|
}
|
package/dist/react.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { DocumentQuery, GroupQuery } from '@agentshouse/mdmodel';
|
|
1
2
|
import type { MdRuntimeClient } from './client.js';
|
|
2
3
|
import type { AppRoom, ConnectionRefusal, SavedRoomDraft, SaveResult } from './connection.js';
|
|
3
4
|
import type { Member, ServiceMode } from './adapter.js';
|
|
4
5
|
import type { ConversationAgent, ConversationEntry, ConversationOptions, ConversationView } from './conversation.js';
|
|
5
6
|
import { type RuntimeError } from './failure.js';
|
|
6
7
|
import type { QueueEntry } from './outcome.js';
|
|
7
|
-
import type {
|
|
8
|
+
import type { DocumentResult, GroupResult, PendingResult } from './query.js';
|
|
8
9
|
import type { Readiness } from './readiness.js';
|
|
9
10
|
import type { RoomDraft, RoomDraftParts } from './room-draft.js';
|
|
10
11
|
import type { SyncStatus } from './status.js';
|
|
@@ -23,6 +24,7 @@ export declare function useObserve(client: Client, topic: 'storage-loss'): Obser
|
|
|
23
24
|
export declare function useObserve(client: Client, topic: 'sync-status'): Observed<SyncStatus>;
|
|
24
25
|
export declare function useObserve(client: Client, topic: 'service-mode'): Observed<ServiceMode>;
|
|
25
26
|
export declare function useObserve(client: Client, topic: 'member'): Observed<Member | null>;
|
|
27
|
+
export declare function useObserve(client: Client, topic: 'authority-changes'): Observed<number>;
|
|
26
28
|
export declare function useObserve(client: Client, topic: 'query', query: DocumentQuery): Observed<DocumentResult | PendingResult>;
|
|
27
29
|
export declare function useObserve(client: Client, topic: 'query', query: GroupQuery): Observed<GroupResult | PendingResult>;
|
|
28
30
|
export declare function useObserve(client: Client, topic: 'queue', locator: string): Observed<readonly QueueEntry[]>;
|
package/dist/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MA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AAO,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACpF,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,cAAc,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACvF,CAAC;AAMF,wBAAgB,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CA8BvD"}
|
package/dist/readiness.d.ts
CHANGED
|
@@ -1,46 +1,33 @@
|
|
|
1
1
|
import type { Open } from './open.js';
|
|
2
2
|
export type CodeAvailability = Open<'stored' | 'absent'>;
|
|
3
|
-
export type RoomPreparation = Open<'complete' | 'acquiring' | 'preparing' | '
|
|
3
|
+
export type RoomPreparation = Open<'complete' | 'acquiring' | 'preparing' | 'unadmitted'>;
|
|
4
4
|
export type RoomCoverage = {
|
|
5
5
|
readonly room: string;
|
|
6
6
|
readonly state: RoomPreparation;
|
|
7
7
|
};
|
|
8
8
|
export type ConversationCoverage = Open<'complete' | 'acquiring' | 'undeclared'>;
|
|
9
|
-
export type SearchObligation = Open<'required' | 'unused'>;
|
|
10
9
|
export type TargetCoverage = {
|
|
11
10
|
readonly complete: boolean;
|
|
12
11
|
readonly listed: boolean;
|
|
13
12
|
readonly rooms: readonly RoomCoverage[];
|
|
14
13
|
readonly conversations: ConversationCoverage;
|
|
15
|
-
readonly search: SearchObligation;
|
|
16
14
|
};
|
|
17
15
|
export type Persistence = Open<'granted' | 'denied' | 'unavailable'>;
|
|
18
16
|
export type Durability = Open<'persistent' | 'best-effort'>;
|
|
19
17
|
export type ConnectionAvailability = Open<'connected' | 'connecting' | 'unreachable'>;
|
|
20
18
|
export type HouseOutcome = Open<'open' | 'write-halted' | 'refused'>;
|
|
21
19
|
export type Space = Open<'full'>;
|
|
22
|
-
export type
|
|
23
|
-
readonly room: string;
|
|
24
|
-
readonly name: string;
|
|
25
|
-
readonly file: string;
|
|
26
|
-
readonly rule: string;
|
|
27
|
-
readonly location: string | null;
|
|
28
|
-
};
|
|
29
|
-
export type InstallationStep = Open<'listing' | 'downloading' | 'writing' | 'replaying'>;
|
|
30
|
-
export type InstallationPause = Open<'hidden'>;
|
|
20
|
+
export type InstallationStep = Open<'downloading' | 'writing' | 'replaying'>;
|
|
31
21
|
export type InstallationAmount = {
|
|
32
22
|
readonly done: number;
|
|
33
23
|
readonly total: number;
|
|
34
24
|
};
|
|
35
25
|
export type Installation = {
|
|
36
26
|
readonly step: InstallationStep | null;
|
|
37
|
-
readonly paused: InstallationPause | null;
|
|
38
27
|
readonly rooms: InstallationAmount;
|
|
39
|
-
readonly parts: InstallationAmount;
|
|
40
28
|
readonly bytes: InstallationAmount;
|
|
41
|
-
readonly received: InstallationAmount;
|
|
42
29
|
};
|
|
43
|
-
export type ReadinessStatus = Open<'preparing' | 'paused' | '
|
|
30
|
+
export type ReadinessStatus = Open<'preparing' | 'paused' | 'ready' | 'lost'>;
|
|
44
31
|
export type Readiness = {
|
|
45
32
|
readonly status: ReadinessStatus;
|
|
46
33
|
readonly ready: boolean;
|
|
@@ -53,7 +40,6 @@ export type Readiness = {
|
|
|
53
40
|
readonly house: HouseOutcome;
|
|
54
41
|
readonly space: Space | null;
|
|
55
42
|
readonly installation: Installation;
|
|
56
|
-
readonly refused: readonly RefusedRoom[];
|
|
57
43
|
readonly lost: boolean;
|
|
58
44
|
};
|
|
59
45
|
export type ReadinessFacts = Omit<Readiness, 'status' | 'ready' | 'usable' | 'durability' | 'coverage'> & {
|
package/dist/readiness.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,Q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,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B,CAAC;AAIF,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,CA2B5D"}
|
package/dist/readiness.js
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
const COMPLETE_ROOMS = new Set(['complete', 'unadmitted']);
|
|
2
|
-
const SETTLED_ROOMS = new Set([...COMPLETE_ROOMS, 'refused']);
|
|
3
2
|
export function readinessOf(facts) {
|
|
4
3
|
const { established, coverage: held, ...reported } = facts;
|
|
5
4
|
const settledConversations = held.conversations === 'complete' || held.conversations === 'undeclared';
|
|
6
5
|
const complete = held.listed &&
|
|
7
6
|
settledConversations &&
|
|
8
7
|
held.rooms.every((room) => COMPLETE_ROOMS.has(room.state));
|
|
9
|
-
const settled = held.listed &&
|
|
10
|
-
settledConversations &&
|
|
11
|
-
held.rooms.every((room) => SETTLED_ROOMS.has(room.state));
|
|
12
8
|
const coverage = { ...held, complete };
|
|
13
9
|
const stored = facts.code === 'stored';
|
|
14
10
|
const ready = stored && complete;
|
|
15
11
|
const usable = stored && (ready || established);
|
|
16
12
|
const status = ready
|
|
17
13
|
? 'ready'
|
|
18
|
-
: facts.space !== null
|
|
14
|
+
: facts.space !== null
|
|
19
15
|
? 'paused'
|
|
20
|
-
:
|
|
21
|
-
? '
|
|
22
|
-
:
|
|
23
|
-
? 'lost'
|
|
24
|
-
: 'preparing';
|
|
16
|
+
: facts.lost && !established
|
|
17
|
+
? 'lost'
|
|
18
|
+
: 'preparing';
|
|
25
19
|
return {
|
|
26
20
|
...reported,
|
|
27
21
|
coverage,
|
package/dist/recovery.d.ts
CHANGED
|
@@ -21,5 +21,6 @@ export type Recovery = {
|
|
|
21
21
|
retire(): Promise<void>;
|
|
22
22
|
};
|
|
23
23
|
export declare function retryDelay(tries: number, firstMs?: number, maxMs?: number): number;
|
|
24
|
+
export declare function untilAnswered<T>(ask: () => Promise<T>, signal: AbortSignal, answered?: (answer: T) => boolean): Promise<T>;
|
|
24
25
|
export declare function createRecovery(options?: RecoveryOptions): Recovery;
|
|
25
26
|
//# sourceMappingURL=recovery.d.ts.map
|
package/dist/recovery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recovery.d.ts","sourceRoot":"","sources":["../src/recovery.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClF,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACnC,MAA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QAAQ,CAAC;IACnC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB,CAAC;AAsBF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,SAAW,EAAE,KAAK,SAAS,GAAG,MAAM,CAGpF;AAED,wBAAsB,aAAa,CAAC,CAAC,EACnC,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACrB,MAAM,EAAE,WAAW,EACnB,QAAQ,GAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAoB,GAC5C,OAAO,CAAC,CAAC,CAAC,CAsBZ;AAwKD,wBAAgB,cAAc,CAAC,OAAO,GAAE,eAAoB,GAAG,QAAQ,CAStE"}
|
package/dist/recovery.js
CHANGED
|
@@ -7,6 +7,32 @@ export function retryDelay(tries, firstMs = FIRST_MS, maxMs = MAX_MS) {
|
|
|
7
7
|
const longest = Math.min(maxMs, firstMs * 2 ** tries);
|
|
8
8
|
return longest / 2 + (Math.random() * longest) / 2;
|
|
9
9
|
}
|
|
10
|
+
export async function untilAnswered(ask, signal, answered = () => true) {
|
|
11
|
+
for (let tries = 0;; tries += 1) {
|
|
12
|
+
try {
|
|
13
|
+
const answer = await ask();
|
|
14
|
+
if (answered(answer) || signal.aborted)
|
|
15
|
+
return answer;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
if (signal.aborted)
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
await new Promise((resume) => {
|
|
22
|
+
const stop = () => {
|
|
23
|
+
clearTimeout(again);
|
|
24
|
+
resume();
|
|
25
|
+
};
|
|
26
|
+
// A read that failed is asked again on the doubling backoff, so its asker is answered once the failure clears.
|
|
27
|
+
const again = setTimeout(() => {
|
|
28
|
+
signal.removeEventListener('abort', stop);
|
|
29
|
+
resume();
|
|
30
|
+
}, retryDelay(tries));
|
|
31
|
+
signal.addEventListener('abort', stop, { once: true });
|
|
32
|
+
});
|
|
33
|
+
signal.throwIfAborted();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
10
36
|
function owner(backoff, inFlight, release = () => { }) {
|
|
11
37
|
const intents = new Map();
|
|
12
38
|
const children = new Set();
|
package/dist/refresh.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AdapterFailure, Authorization, RefreshPage, RetryableRefusal } from './adapter.js';
|
|
2
|
-
import type {
|
|
1
|
+
import type { AdapterFailure, Authorization, RefreshPage, RefreshRequest, RefreshResult, RetryableRefusal } from './adapter.js';
|
|
2
|
+
import type { Remodel } from './bootstrap.js';
|
|
3
3
|
import type { ReplicaRecord } from './replica.js';
|
|
4
4
|
import type { RefreshedPage } from './store.js';
|
|
5
5
|
import type { HeldEntry, StoredEntry } from './tables.js';
|
|
@@ -13,13 +13,15 @@ export type Advancement = {
|
|
|
13
13
|
} | {
|
|
14
14
|
kind: 'beyond-horizon';
|
|
15
15
|
} | RetryableRefusal | Unconfirmed | AdapterFailure;
|
|
16
|
+
export type Refresher = (authorization: Authorization, request: RefreshRequest) => Promise<RefreshResult>;
|
|
16
17
|
export type Refreshing = {
|
|
17
|
-
turn():
|
|
18
|
+
turn(): void;
|
|
18
19
|
prior(paths: readonly string[]): Promise<ReadonlyMap<string, HeldEntry>>;
|
|
20
|
+
later(paths: readonly string[], roomVersion: string): Promise<ReadonlySet<string>>;
|
|
19
21
|
stage(page: RefreshedPage): Promise<boolean>;
|
|
20
22
|
};
|
|
21
|
-
type PageContent = Pick<RefreshPage, 'documents' | 'revisions' | 'fileIds' | 'changes' | 'binaryFiles'>;
|
|
23
|
+
type PageContent = Pick<RefreshPage, 'documents' | 'facts' | 'revisions' | 'fileIds' | 'changes' | 'binaryFiles'>;
|
|
22
24
|
export declare function pageEntries(page: PageContent, removals: readonly string[], roomVersion: string, prior: (paths: readonly string[]) => Promise<ReadonlyMap<string, HeldEntry>>): Promise<StoredEntry[]>;
|
|
23
|
-
export declare function advancement(
|
|
25
|
+
export declare function advancement(refresh: Refresher, authorization: Authorization, held: ReplicaRecord, remodel: Remodel, continuing: () => boolean, staging: Refreshing): Promise<Advancement>;
|
|
24
26
|
export {};
|
|
25
27
|
//# sourceMappingURL=refresh.d.ts.map
|
package/dist/refresh.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../src/refresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../src/refresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,cAAc,EACd,aAAa,EACb,gBAAgB,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAG9D,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAAE,GACzE;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,GAC1B,gBAAgB,GAChB,WAAW,GACX,cAAc,CAAC;AAEnB,MAAM,MAAM,SAAS,GAAG,CACtB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,cAAc,KACpB,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IACzE,KAAK,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,KAAK,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9C,CAAC;AASF,KAAK,WAAW,GAAG,IAAI,CACrB,WAAW,EACX,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAC5E,CAAC;AAqFF,wBAAsB,WAAW,CAC/B,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,GAC3E,OAAO,CAAC,WAAW,EAAE,CAAC,CAKxB;AA+CD,wBAAsB,WAAW,CAC/B,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,OAAO,EACzB,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,WAAW,CAAC,CA8CtB"}
|
package/dist/refresh.js
CHANGED
|
@@ -45,6 +45,7 @@ function* entering(page, roomVersion, listed, prior) {
|
|
|
45
45
|
entries.push({
|
|
46
46
|
path,
|
|
47
47
|
content: page.documents[path],
|
|
48
|
+
facts: page.facts[path] ?? null,
|
|
48
49
|
binary: null,
|
|
49
50
|
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
50
51
|
fileId: page.fileIds?.[path] ?? null,
|
|
@@ -57,6 +58,7 @@ function* entering(page, roomVersion, listed, prior) {
|
|
|
57
58
|
entries.push({
|
|
58
59
|
path,
|
|
59
60
|
content: null,
|
|
61
|
+
facts: null,
|
|
60
62
|
binary: { state: 'accepted', ...page.binaryFiles[path] },
|
|
61
63
|
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
62
64
|
fileId: page.fileIds?.[path] ?? null,
|
|
@@ -85,7 +87,29 @@ export async function pageEntries(page, removals, roomVersion, prior) {
|
|
|
85
87
|
const held = listed.asked.length === 0 ? new Map() : await prior(listed.asked);
|
|
86
88
|
return stepped(entering(page, roomVersion, listed, held));
|
|
87
89
|
}
|
|
88
|
-
|
|
90
|
+
function without(named, kept) {
|
|
91
|
+
return Object.fromEntries(Object.entries(named).filter(([path]) => !kept.has(path)));
|
|
92
|
+
}
|
|
93
|
+
function unwritten(page, kept) {
|
|
94
|
+
if (kept.size === 0)
|
|
95
|
+
return page;
|
|
96
|
+
return {
|
|
97
|
+
...page,
|
|
98
|
+
documents: without(page.documents, kept),
|
|
99
|
+
facts: without(page.facts, kept),
|
|
100
|
+
revisions: without(page.revisions, kept),
|
|
101
|
+
...(page.fileIds === undefined ? {} : { fileIds: without(page.fileIds, kept) }),
|
|
102
|
+
changes: without(page.changes, kept),
|
|
103
|
+
binaryFiles: without(page.binaryFiles, kept),
|
|
104
|
+
removals: page.removals.filter((path) => !kept.has(path)),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
async function pageOf(answered, roomVersion, staging) {
|
|
108
|
+
const page = unwritten(answered, await staging.later([
|
|
109
|
+
...Object.keys(answered.documents),
|
|
110
|
+
...Object.keys(answered.binaryFiles),
|
|
111
|
+
...answered.removals,
|
|
112
|
+
], roomVersion));
|
|
89
113
|
return {
|
|
90
114
|
entries: await pageEntries(page, page.removals, roomVersion, (paths) => staging.prior(paths)),
|
|
91
115
|
removals: page.removals,
|
|
@@ -93,13 +117,13 @@ async function pageOf(page, roomVersion, staging) {
|
|
|
93
117
|
folderRemovals: page.folderRemovals ?? [],
|
|
94
118
|
};
|
|
95
119
|
}
|
|
96
|
-
export async function advancement(
|
|
120
|
+
export async function advancement(refresh, authorization, held, remodel, continuing, staging) {
|
|
97
121
|
const locator = held.locator;
|
|
98
122
|
const fromRoomVersion = held.roomVersion;
|
|
99
|
-
|
|
123
|
+
staging.turn();
|
|
100
124
|
if (!continuing())
|
|
101
125
|
return unconfirmed;
|
|
102
|
-
const first = await
|
|
126
|
+
const first = await refresh(authorization, {
|
|
103
127
|
locator,
|
|
104
128
|
selection: held.replica.selection,
|
|
105
129
|
fromRoomVersion,
|
|
@@ -124,7 +148,7 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
124
148
|
await staging.turn();
|
|
125
149
|
if (!continuing())
|
|
126
150
|
return unconfirmed;
|
|
127
|
-
const page = await
|
|
151
|
+
const page = await refresh(authorization, {
|
|
128
152
|
locator,
|
|
129
153
|
selection: held.replica.selection,
|
|
130
154
|
fromRoomVersion,
|
package/dist/replica.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type TypedPath } from '@agentshouse/mdmodel';
|
|
2
|
+
import type { BootstrapInventory, SavedFacts, MutationResult, OperationScopes, ReplicaAdmission, TypedSelection } from './adapter.js';
|
|
2
3
|
import { type ChangeBatch, type Precondition } from './change.js';
|
|
3
4
|
import { type Collection, type Composition } from './collection.js';
|
|
4
|
-
import type
|
|
5
|
+
import { type ModelState } from './model.js';
|
|
5
6
|
import { type Layer } from './overlay.js';
|
|
6
7
|
import type { HeldEntry, OverlayEntry, StoredEntry } from './tables.js';
|
|
7
8
|
export type ReplicaRecord = {
|
|
@@ -15,7 +16,7 @@ export type ReplicaRecord = {
|
|
|
15
16
|
readonly providerOwnedPaths: readonly string[];
|
|
16
17
|
readonly roomVersion: string;
|
|
17
18
|
readonly transfer: string;
|
|
18
|
-
readonly inventory: BootstrapInventory
|
|
19
|
+
readonly inventory: BootstrapInventory;
|
|
19
20
|
readonly key: number;
|
|
20
21
|
};
|
|
21
22
|
export type HeldReplica = {
|
|
@@ -31,15 +32,16 @@ export type VisibleLayer = Layer & {
|
|
|
31
32
|
};
|
|
32
33
|
export type Slice = Layer & {
|
|
33
34
|
readonly written: Readonly<Record<string, string>>;
|
|
35
|
+
readonly facts: Readonly<Record<string, SavedFacts>>;
|
|
34
36
|
readonly held: ReadonlySet<string>;
|
|
35
37
|
};
|
|
36
|
-
export declare function compositionOf(record: Pick<ReplicaRecord, 'model' | 'typedSelection'>, builtIn: ModelState): Composition;
|
|
37
|
-
export declare function sameMembership(record: Pick<ReplicaRecord, 'typedSelection'>, other: Pick<ReplicaRecord, 'typedSelection'>): boolean;
|
|
38
|
+
export declare function compositionOf(record: Pick<ReplicaRecord, 'model' | 'typedSelection'>, builtIn: ModelState, typedPaths: readonly TypedPath[]): Composition;
|
|
38
39
|
export declare function storedRecord(record: ReplicaRecord): string;
|
|
39
40
|
export declare function slicing(entries: readonly HeldEntry[], paths: Iterable<string>): Generator<number, Slice, void>;
|
|
41
|
+
export type LayerEntry = Omit<StoredEntry, 'facts'>;
|
|
40
42
|
export declare function entryAt(layer: Layer & {
|
|
41
43
|
readonly written?: Readonly<Record<string, string>>;
|
|
42
|
-
}, path: string):
|
|
44
|
+
}, path: string): LayerEntry | null;
|
|
43
45
|
export declare function slicingWith(slice: Slice, set: readonly StoredEntry[], removed: readonly string[]): Generator<number, Slice, void>;
|
|
44
46
|
export declare function touchedBy(queue: readonly ChangeBatch[]): Set<string>;
|
|
45
47
|
export declare function movedBy(queue: readonly ChangeBatch[], locator: string): Set<string>;
|
|
@@ -48,7 +50,7 @@ export type Replayed = {
|
|
|
48
50
|
readonly touched: ReadonlySet<string>;
|
|
49
51
|
};
|
|
50
52
|
export declare function replaying(confirmed: Slice, queue: readonly ChangeBatch[], locator: string, composition: Composition): Generator<number, Replayed, void>;
|
|
51
|
-
export declare function overlayOf(visible:
|
|
53
|
+
export declare function overlayOf(visible: VisibleLayer, touched: Iterable<string>): Generator<number, OverlayEntry[], void>;
|
|
52
54
|
export declare function holds(layer: Layer, preconditions: readonly Precondition[]): boolean;
|
|
53
55
|
export declare function landed(batch: ChangeBatch, confirmed: Layer, current?: Readonly<Record<string, string>>): boolean;
|
|
54
56
|
export type Standing = {
|
|
@@ -64,6 +66,6 @@ export type Returned = {
|
|
|
64
66
|
readonly removed: readonly string[];
|
|
65
67
|
};
|
|
66
68
|
export declare function returnedPaths(submitted: ChangeBatch, accepted: Accepted): Set<string>;
|
|
67
|
-
export declare function returning(confirmed: Slice, submitted: ChangeBatch, accepted: Accepted, writtenAt: string): Generator<number, Returned, void>;
|
|
69
|
+
export declare function returning(confirmed: Slice, submitted: ChangeBatch, accepted: Accepted, writtenAt: string, composition: Composition): Generator<number, Returned, void>;
|
|
68
70
|
export {};
|
|
69
71
|
//# sourceMappingURL=replica.d.ts.map
|
package/dist/replica.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EAEV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAmC,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAiD,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAGzF,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGxE,MAAM,MAAM,aAAa,GAAG;IAC1B,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