@agentshouse/mdruntime 0.1.0-c1db74d14e5fa → 0.1.0-c1ffd2bc60355
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 +268 -251
- package/README.md +9 -8
- package/dist/adapter.d.ts +76 -40
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +4 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +13 -3
- 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 +26 -7
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +148 -78
- package/dist/chain.d.ts +11 -0
- package/dist/chain.d.ts.map +1 -0
- package/dist/chain.js +64 -0
- package/dist/change-set.d.ts +9 -16
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +11 -88
- package/dist/change.d.ts +31 -1
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +10 -1
- package/dist/chat/earlier.d.ts +10 -0
- package/dist/chat/earlier.d.ts.map +1 -0
- package/dist/chat/earlier.js +54 -0
- package/dist/chat/house.d.ts +25 -0
- package/dist/chat/house.d.ts.map +1 -0
- package/dist/chat/house.js +38 -0
- package/dist/chat/input.d.ts +3 -1
- package/dist/chat/input.d.ts.map +1 -1
- package/dist/chat/input.js +11 -18
- package/dist/chat/kit.d.ts +2 -1
- package/dist/chat/kit.d.ts.map +1 -1
- package/dist/chat/kit.js +3 -3
- package/dist/chat/list.d.ts +3 -1
- package/dist/chat/list.d.ts.map +1 -1
- package/dist/chat/list.js +47 -6
- package/dist/chat/markdown.d.ts +2 -2
- package/dist/chat/markdown.d.ts.map +1 -1
- package/dist/chat/markdown.js +80 -39
- package/dist/chat/message.d.ts +1 -0
- package/dist/chat/message.d.ts.map +1 -1
- package/dist/chat/message.js +73 -11
- package/dist/chat/messages.d.ts +15 -1
- package/dist/chat/messages.d.ts.map +1 -1
- package/dist/chat/messages.js +82 -23
- package/dist/chat/name.d.ts +1 -0
- package/dist/chat/name.d.ts.map +1 -1
- package/dist/chat/name.js +1 -1
- package/dist/chat/opened.d.ts +1 -0
- package/dist/chat/opened.d.ts.map +1 -1
- package/dist/chat/opened.js +2 -0
- package/dist/chat/overlay.d.ts +1 -0
- package/dist/chat/overlay.d.ts.map +1 -1
- package/dist/chat/overlay.js +11 -5
- package/dist/chat/parts.d.ts +1 -0
- package/dist/chat/parts.d.ts.map +1 -1
- package/dist/chat/parts.js +3 -2
- package/dist/chat/pieces.d.ts +62 -0
- package/dist/chat/pieces.d.ts.map +1 -0
- package/dist/chat/pieces.js +1110 -0
- package/dist/chat/provider.d.ts +9 -2
- package/dist/chat/provider.d.ts.map +1 -1
- package/dist/chat/provider.js +121 -106
- package/dist/chat/question.d.ts +1 -1
- package/dist/chat/question.d.ts.map +1 -1
- package/dist/chat/question.js +7 -18
- package/dist/chat/ready.d.ts +5 -1
- package/dist/chat/ready.d.ts.map +1 -1
- package/dist/chat/ready.js +7 -5
- package/dist/chat/room-file.d.ts +8 -0
- package/dist/chat/room-file.d.ts.map +1 -0
- package/dist/chat/room-file.js +72 -0
- package/dist/chat/steady.d.ts +3 -0
- package/dist/chat/steady.d.ts.map +1 -0
- package/dist/chat/steady.js +26 -0
- package/dist/chat/style.d.ts.map +1 -1
- package/dist/chat/style.js +6 -1
- package/dist/chat.d.ts +3 -2
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +2 -2
- package/dist/client.d.ts +15 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +47 -8
- package/dist/collection.d.ts +6 -19
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +30 -287
- package/dist/compile.d.ts +16 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +721 -0
- package/dist/connection.d.ts +25 -12
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +2615 -946
- package/dist/conversation.d.ts +18 -3
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +341 -107
- package/dist/digest.d.ts +7 -0
- package/dist/digest.d.ts.map +1 -0
- package/dist/digest.js +113 -0
- package/dist/durability.d.ts +3 -5
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +5 -0
- package/dist/entry.d.ts +3 -1
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +18 -23
- package/dist/file.d.ts +2 -10
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +3 -120
- package/dist/fulltext.d.ts +27 -0
- package/dist/fulltext.d.ts.map +1 -0
- package/dist/fulltext.js +368 -0
- package/dist/host.d.ts +10 -8
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +95 -18
- package/dist/identity.d.ts +0 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +0 -3
- package/dist/index.d.ts +15 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/live.d.ts +22 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +123 -0
- package/dist/memory.d.ts +8 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +43 -25
- package/dist/messages.d.ts +28 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +90 -0
- package/dist/model.d.ts +3 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +1 -1
- package/dist/name.d.ts +4 -0
- package/dist/name.d.ts.map +1 -0
- package/dist/name.js +122 -0
- package/dist/observation.d.ts +14 -0
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +93 -3
- package/dist/opened.d.ts +22 -0
- package/dist/opened.d.ts.map +1 -0
- package/dist/opened.js +107 -0
- package/dist/outcome.d.ts +34 -4
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +25 -0
- package/dist/overlay.d.ts +3 -5
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +95 -156
- package/dist/query.d.ts +33 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +48 -7
- package/dist/reach.d.ts +6 -5
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +170 -62
- package/dist/react.d.ts +3 -3
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +7 -17
- package/dist/readiness.d.ts +20 -9
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +6 -6
- package/dist/reads.d.ts +11 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +100 -0
- package/dist/recovery.d.ts +2 -2
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +8 -7
- package/dist/refresh.d.ts +16 -15
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +112 -45
- package/dist/replica.d.ts +57 -33
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +295 -177
- package/dist/room-draft.d.ts +17 -2
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +65 -25
- package/dist/rows.d.ts +29 -29
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +113 -62
- package/dist/save.d.ts +51 -14
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +518 -180
- package/dist/search.d.ts +32 -43
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +37 -168
- package/dist/seed.d.ts +16 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +75 -0
- package/dist/shared.d.ts +8 -3
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +129 -66
- package/dist/store.d.ts +99 -88
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +335 -641
- package/dist/stored.d.ts +145 -0
- package/dist/stored.d.ts.map +1 -0
- package/dist/stored.js +567 -0
- package/dist/tables.d.ts +354 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +624 -0
- package/dist/turn.d.ts +5 -3
- package/dist/turn.d.ts.map +1 -1
- package/dist/turn.js +51 -21
- package/dist/validation.d.ts +30 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +162 -0
- package/dist/windows.d.ts +22 -0
- package/dist/windows.d.ts.map +1 -0
- package/dist/windows.js +89 -0
- package/dist/wire.d.ts +163 -33
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +54 -32
- package/dist/words.d.ts +19 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.js +150 -0
- package/package.json +11 -5
- package/dist/acquisition.d.ts +0 -14
- package/dist/acquisition.d.ts.map +0 -1
- package/dist/acquisition.js +0 -24
- package/dist/read-side.d.ts +0 -25
- package/dist/read-side.d.ts.map +0 -1
- package/dist/read-side.js +0 -639
package/dist/reads.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
function declaredAs(declaration) {
|
|
2
|
+
if (declaration === null || typeof declaration !== 'object')
|
|
3
|
+
return declaration;
|
|
4
|
+
const { roomVersion: _version, ...declared } = declaration;
|
|
5
|
+
return declared;
|
|
6
|
+
}
|
|
7
|
+
function sameHeld(one, other) {
|
|
8
|
+
return one === other;
|
|
9
|
+
}
|
|
10
|
+
function failed(answer) {
|
|
11
|
+
return answer?.kind === 'transport-uncertainty';
|
|
12
|
+
}
|
|
13
|
+
function continues(answer) {
|
|
14
|
+
const page = answer;
|
|
15
|
+
return page?.kind === 'net-advancement' && page.pageToken !== undefined;
|
|
16
|
+
}
|
|
17
|
+
export function doorReads(adapter, declaration, generation) {
|
|
18
|
+
const reading = new Map();
|
|
19
|
+
const taken = new Map();
|
|
20
|
+
let carrying = false;
|
|
21
|
+
function joined(read, authorization, request, ask) {
|
|
22
|
+
const key = `${read} ${request.locator} ${request.pageToken ?? ''}`;
|
|
23
|
+
const { held, received, ...named } = request;
|
|
24
|
+
const asked = JSON.stringify([declaredAs(declaration(request.locator)), named]);
|
|
25
|
+
const asking = generation();
|
|
26
|
+
const current = reading.get(key);
|
|
27
|
+
if (current !== undefined &&
|
|
28
|
+
current.authorization === authorization &&
|
|
29
|
+
current.asked === asked &&
|
|
30
|
+
sameHeld(current.held, held) &&
|
|
31
|
+
current.received === received &&
|
|
32
|
+
(!current.settled || current.holder < asking)) {
|
|
33
|
+
if (current.settled && !current.continued)
|
|
34
|
+
reading.delete(key);
|
|
35
|
+
else
|
|
36
|
+
current.holder = Math.max(current.holder, asking);
|
|
37
|
+
if (current.from === asking)
|
|
38
|
+
return current.answer;
|
|
39
|
+
const again = () => joined(read, authorization, request, ask);
|
|
40
|
+
return current.answer.then((answer) => {
|
|
41
|
+
if (failed(answer))
|
|
42
|
+
return again();
|
|
43
|
+
taken.set(request.locator, (taken.get(request.locator) ?? 0) + 1);
|
|
44
|
+
return answer;
|
|
45
|
+
}, again);
|
|
46
|
+
}
|
|
47
|
+
const answer = ask();
|
|
48
|
+
const sent = {
|
|
49
|
+
locator: request.locator,
|
|
50
|
+
authorization,
|
|
51
|
+
asked,
|
|
52
|
+
held,
|
|
53
|
+
received,
|
|
54
|
+
answer,
|
|
55
|
+
from: asking,
|
|
56
|
+
holder: asking,
|
|
57
|
+
settled: false,
|
|
58
|
+
continued: false,
|
|
59
|
+
};
|
|
60
|
+
reading.set(key, sent);
|
|
61
|
+
const settled = (result, kept) => {
|
|
62
|
+
sent.settled = true;
|
|
63
|
+
sent.continued = kept && read === 'refresh' && continues(result);
|
|
64
|
+
if (reading.get(key) !== sent)
|
|
65
|
+
return;
|
|
66
|
+
const live = sent.holder === generation();
|
|
67
|
+
if (!kept || (live ? !sent.continued : !carrying))
|
|
68
|
+
reading.delete(key);
|
|
69
|
+
};
|
|
70
|
+
answer.then((result) => settled(result, !failed(result)), () => settled(null, false));
|
|
71
|
+
return answer;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
bootstrap: (authorization, request) => joined('bootstrap', authorization, request, () => adapter.bootstrap(authorization, request)),
|
|
75
|
+
refresh: (authorization, request) => joined('refresh', authorization, request, () => adapter.refresh(authorization, request)),
|
|
76
|
+
reached: (locator, roomVersion, target) => adapter.reached(locator, roomVersion, target),
|
|
77
|
+
carried: (locator) => taken.get(locator) ?? 0,
|
|
78
|
+
finished(locator, turn) {
|
|
79
|
+
for (const [key, held] of reading) {
|
|
80
|
+
if (held.locator !== locator || !held.settled || held.holder !== turn)
|
|
81
|
+
continue;
|
|
82
|
+
if (turn === generation() || !carrying)
|
|
83
|
+
reading.delete(key);
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
opened() {
|
|
87
|
+
carrying = true;
|
|
88
|
+
},
|
|
89
|
+
applied() {
|
|
90
|
+
carrying = false;
|
|
91
|
+
for (const [key, held] of reading) {
|
|
92
|
+
if (held.settled && held.holder !== generation())
|
|
93
|
+
reading.delete(key);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
lost() {
|
|
97
|
+
reading.clear();
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
package/dist/recovery.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type AttemptOptions = {
|
|
|
8
8
|
};
|
|
9
9
|
export type RecoveryOptions = {
|
|
10
10
|
readonly firstMs?: number;
|
|
11
|
-
readonly
|
|
11
|
+
readonly maxMs?: number;
|
|
12
12
|
readonly attempts?: number;
|
|
13
13
|
readonly inFlight?: number;
|
|
14
14
|
};
|
|
@@ -20,6 +20,6 @@ export type Recovery = {
|
|
|
20
20
|
scope(inFlight?: number): Recovery;
|
|
21
21
|
retire(): Promise<void>;
|
|
22
22
|
};
|
|
23
|
-
export declare function retryDelay(tries: number, firstMs?: number,
|
|
23
|
+
export declare function retryDelay(tries: number, firstMs?: number, maxMs?: number): number;
|
|
24
24
|
export declare function createRecovery(options?: RecoveryOptions): Recovery;
|
|
25
25
|
//# 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,CAA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I,IAAI,CAAC;IACf,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,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;AAwKD,wBAAgB,cAAc,CAAC,OAAO,GAAE,eAAoB,GAAG,QAAQ,CAStE"}
|
package/dist/recovery.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// A first retry waits about a second, so a passing failure clears before the next attempt.
|
|
2
2
|
const FIRST_MS = 1_000;
|
|
3
3
|
// Waits stop doubling at half a minute, so work resumes soon after a long failure ends.
|
|
4
|
-
const
|
|
4
|
+
const MAX_MS = 30_000;
|
|
5
5
|
const ATTEMPTS = 8;
|
|
6
|
-
export function retryDelay(tries, firstMs = FIRST_MS,
|
|
7
|
-
const
|
|
8
|
-
return
|
|
6
|
+
export function retryDelay(tries, firstMs = FIRST_MS, maxMs = MAX_MS) {
|
|
7
|
+
const longest = Math.min(maxMs, firstMs * 2 ** tries);
|
|
8
|
+
return longest / 2 + (Math.random() * longest) / 2;
|
|
9
9
|
}
|
|
10
10
|
function owner(backoff, inFlight, release = () => { }) {
|
|
11
11
|
const intents = new Map();
|
|
@@ -84,7 +84,8 @@ function owner(backoff, inFlight, release = () => { }) {
|
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
if (result === 'again') {
|
|
87
|
-
|
|
87
|
+
// The next attempt waits the doubling backoff, up to its maximum.
|
|
88
|
+
const delay = retryDelay(intent.tries - 1, backoff.firstMs, backoff.maxMs);
|
|
88
89
|
wait(key, intent, Date.now() + delay, false);
|
|
89
90
|
}
|
|
90
91
|
else
|
|
@@ -135,7 +136,7 @@ function owner(backoff, inFlight, release = () => { }) {
|
|
|
135
136
|
wait(key, intent, options.at, true);
|
|
136
137
|
else if (options.again === true) {
|
|
137
138
|
intent.tries = 1;
|
|
138
|
-
wait(key, intent, Date.now() + retryDelay(0, backoff.firstMs, backoff.
|
|
139
|
+
wait(key, intent, Date.now() + retryDelay(0, backoff.firstMs, backoff.maxMs), false);
|
|
139
140
|
}
|
|
140
141
|
else
|
|
141
142
|
launch(key, intent);
|
|
@@ -191,7 +192,7 @@ function owner(backoff, inFlight, release = () => { }) {
|
|
|
191
192
|
export function createRecovery(options = {}) {
|
|
192
193
|
return owner({
|
|
193
194
|
firstMs: options.firstMs ?? FIRST_MS,
|
|
194
|
-
|
|
195
|
+
maxMs: options.maxMs ?? MAX_MS,
|
|
195
196
|
attempts: options.attempts ?? ATTEMPTS,
|
|
196
197
|
}, options.inFlight ?? Infinity);
|
|
197
198
|
}
|
package/dist/refresh.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Remodel } from './bootstrap.js';
|
|
3
|
-
import {
|
|
4
|
-
import type {
|
|
5
|
-
import {
|
|
1
|
+
import type { AdapterFailure, Authorization, RefreshPage, RetryableRefusal } from './adapter.js';
|
|
2
|
+
import type { Reads, Remodel } from './bootstrap.js';
|
|
3
|
+
import type { ReplicaRecord } from './replica.js';
|
|
4
|
+
import type { RefreshedPage } from './store.js';
|
|
5
|
+
import type { HeldEntry, StoredEntry } from './tables.js';
|
|
6
|
+
import { type Unconfirmed } from './transfer.js';
|
|
6
7
|
export type Advancement = {
|
|
7
8
|
kind: 'still-current';
|
|
8
9
|
} | {
|
|
9
10
|
kind: 'advanced';
|
|
10
11
|
record: ReplicaRecord;
|
|
12
|
+
changed: ReadonlySet<string>;
|
|
11
13
|
} | {
|
|
12
14
|
kind: 'beyond-horizon';
|
|
13
15
|
} | RetryableRefusal | Unconfirmed | AdapterFailure;
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export
|
|
23
|
-
export declare function refreshRoom(adapter: Adapter, authorization: Authorization, confirmed: ConfirmedLayer, remodel: Remodel, continuing: () => boolean): Promise<RefreshOutcome>;
|
|
16
|
+
export type Refreshing = {
|
|
17
|
+
turn(): Promise<void>;
|
|
18
|
+
prior(paths: readonly string[]): Promise<ReadonlyMap<string, HeldEntry>>;
|
|
19
|
+
stage(page: RefreshedPage): Promise<boolean>;
|
|
20
|
+
};
|
|
21
|
+
type PageContent = Pick<RefreshPage, 'documents' | 'revisions' | 'fileIds' | 'changes' | 'binaryFiles'>;
|
|
22
|
+
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(adapter: Reads, authorization: Authorization, held: ReplicaRecord, remodel: Remodel, continuing: () => boolean, staging: Refreshing): Promise<Advancement>;
|
|
24
|
+
export {};
|
|
24
25
|
//# 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,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACrD,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,OA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,104 @@
|
|
|
1
|
-
import { acceptedBinaries } from './overlay.js';
|
|
2
|
-
import { readStaged } from './replica.js';
|
|
3
|
-
import { drafted, settled } from './shared.js';
|
|
4
1
|
import { unconfirmed } from './transfer.js';
|
|
5
|
-
|
|
2
|
+
import { ROW_WEIGHT, stepped, yielded } from './turn.js';
|
|
3
|
+
function* listing(page, removals) {
|
|
4
|
+
const removed = new Set();
|
|
5
|
+
for (const path of removals) {
|
|
6
|
+
removed.add(path);
|
|
7
|
+
yield ROW_WEIGHT;
|
|
8
|
+
}
|
|
9
|
+
const documents = [];
|
|
10
|
+
const binaries = [];
|
|
11
|
+
const asked = [];
|
|
12
|
+
const written = new Set();
|
|
13
|
+
for (const [kept, named] of [
|
|
14
|
+
[documents, page.documents],
|
|
15
|
+
[binaries, page.binaryFiles],
|
|
16
|
+
]) {
|
|
17
|
+
for (const path of Object.keys(named)) {
|
|
18
|
+
yield ROW_WEIGHT;
|
|
19
|
+
if (removed.has(path))
|
|
20
|
+
continue;
|
|
21
|
+
kept.push(path);
|
|
22
|
+
written.add(path);
|
|
23
|
+
if (page.revisions[path] === undefined)
|
|
24
|
+
asked.push(path);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const others = [];
|
|
28
|
+
const seen = new Set();
|
|
29
|
+
for (const named of [page.revisions, page.fileIds ?? {}, page.changes]) {
|
|
30
|
+
for (const path of Object.keys(named)) {
|
|
31
|
+
yield ROW_WEIGHT;
|
|
32
|
+
if (seen.has(path))
|
|
33
|
+
continue;
|
|
34
|
+
seen.add(path);
|
|
35
|
+
if (!written.has(path) && !removed.has(path))
|
|
36
|
+
others.push(path);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return { documents, binaries, others, asked: [...asked, ...others] };
|
|
40
|
+
}
|
|
41
|
+
function* entering(page, roomVersion, listed, prior) {
|
|
42
|
+
const entries = [];
|
|
43
|
+
for (const path of listed.documents) {
|
|
44
|
+
yield ROW_WEIGHT;
|
|
45
|
+
entries.push({
|
|
46
|
+
path,
|
|
47
|
+
content: page.documents[path],
|
|
48
|
+
binary: null,
|
|
49
|
+
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
50
|
+
fileId: page.fileIds?.[path] ?? null,
|
|
51
|
+
change: page.changes[path] ?? null,
|
|
52
|
+
written: roomVersion,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
for (const path of listed.binaries) {
|
|
56
|
+
yield ROW_WEIGHT;
|
|
57
|
+
entries.push({
|
|
58
|
+
path,
|
|
59
|
+
content: null,
|
|
60
|
+
binary: { state: 'accepted', ...page.binaryFiles[path] },
|
|
61
|
+
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
62
|
+
fileId: page.fileIds?.[path] ?? null,
|
|
63
|
+
change: page.changes[path] ?? null,
|
|
64
|
+
written: null,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
for (const path of listed.others) {
|
|
68
|
+
yield ROW_WEIGHT;
|
|
69
|
+
const held = prior.get(path);
|
|
70
|
+
if (held === undefined)
|
|
71
|
+
continue;
|
|
72
|
+
const { type: _type, ...kept } = held;
|
|
73
|
+
entries.push({
|
|
74
|
+
...kept,
|
|
75
|
+
revision: page.revisions[path] ?? held.revision,
|
|
76
|
+
fileId: page.fileIds?.[path] ?? held.fileId,
|
|
77
|
+
change: page.changes[path] ?? held.change,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return entries;
|
|
81
|
+
}
|
|
82
|
+
export async function pageEntries(page, removals, roomVersion, prior) {
|
|
83
|
+
await yielded();
|
|
84
|
+
const listed = await stepped(listing(page, removals));
|
|
85
|
+
const held = listed.asked.length === 0 ? new Map() : await prior(listed.asked);
|
|
86
|
+
return stepped(entering(page, roomVersion, listed, held));
|
|
87
|
+
}
|
|
88
|
+
async function pageOf(page, roomVersion, staging) {
|
|
89
|
+
return {
|
|
90
|
+
entries: await pageEntries(page, page.removals, roomVersion, (paths) => staging.prior(paths)),
|
|
91
|
+
removals: page.removals,
|
|
92
|
+
folders: page.folders ?? [],
|
|
93
|
+
folderRemovals: page.folderRemovals ?? [],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export async function advancement(adapter, authorization, held, remodel, continuing, staging) {
|
|
6
97
|
const locator = held.locator;
|
|
7
98
|
const fromRoomVersion = held.roomVersion;
|
|
99
|
+
await staging.turn();
|
|
100
|
+
if (!continuing())
|
|
101
|
+
return unconfirmed;
|
|
8
102
|
const first = await adapter.refresh(authorization, {
|
|
9
103
|
locator,
|
|
10
104
|
selection: held.replica.selection,
|
|
@@ -17,37 +111,20 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
17
111
|
collection: held.model,
|
|
18
112
|
selection: held.selectionModel,
|
|
19
113
|
});
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
delete changes[path];
|
|
29
|
-
written[path] = roomVersion;
|
|
30
|
-
}
|
|
31
|
-
for (const path of Object.keys(page.binaryFiles)) {
|
|
32
|
-
delete documents[path];
|
|
33
|
-
delete changes[path];
|
|
34
|
-
delete written[path];
|
|
35
|
-
}
|
|
36
|
-
Object.assign(documents, page.documents);
|
|
37
|
-
Object.assign(binaries, acceptedBinaries(page.binaryFiles));
|
|
38
|
-
Object.assign(revisions, page.revisions);
|
|
39
|
-
Object.assign(changes, page.changes);
|
|
40
|
-
for (const path of page.removals) {
|
|
41
|
-
delete documents[path];
|
|
42
|
-
delete revisions[path];
|
|
43
|
-
delete changes[path];
|
|
44
|
-
delete written[path];
|
|
45
|
-
delete binaries[path];
|
|
46
|
-
}
|
|
114
|
+
const changed = new Set();
|
|
115
|
+
const staged = async (page) => {
|
|
116
|
+
const read = await pageOf(page, roomVersion, staging);
|
|
117
|
+
for (const { path } of read.entries)
|
|
118
|
+
changed.add(path);
|
|
119
|
+
for (const path of read.removals)
|
|
120
|
+
changed.add(path);
|
|
121
|
+
return staging.stage(read);
|
|
47
122
|
};
|
|
48
|
-
|
|
123
|
+
if (!(await staged(first)))
|
|
124
|
+
return unconfirmed;
|
|
49
125
|
let pageToken = first.pageToken;
|
|
50
126
|
while (pageToken !== undefined) {
|
|
127
|
+
await staging.turn();
|
|
51
128
|
if (!continuing())
|
|
52
129
|
return unconfirmed;
|
|
53
130
|
const page = await adapter.refresh(authorization, {
|
|
@@ -62,7 +139,8 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
62
139
|
return page;
|
|
63
140
|
if (page.roomVersion !== roomVersion)
|
|
64
141
|
return unconfirmed;
|
|
65
|
-
|
|
142
|
+
if (!(await staged(page)))
|
|
143
|
+
return unconfirmed;
|
|
66
144
|
pageToken = page.pageToken;
|
|
67
145
|
}
|
|
68
146
|
return {
|
|
@@ -72,18 +150,7 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
72
150
|
model: models.collection,
|
|
73
151
|
selectionModel: models.selection,
|
|
74
152
|
roomVersion,
|
|
75
|
-
documents: settled(documents),
|
|
76
|
-
binaries: settled(binaries),
|
|
77
|
-
revisions: settled(revisions),
|
|
78
|
-
changes: settled(changes),
|
|
79
|
-
written: settled(written),
|
|
80
153
|
},
|
|
154
|
+
changed,
|
|
81
155
|
};
|
|
82
156
|
}
|
|
83
|
-
export async function refreshRoom(adapter, authorization, confirmed, remodel, continuing) {
|
|
84
|
-
const advanced = await advancement(adapter, authorization, confirmed.record, remodel, continuing);
|
|
85
|
-
if (advanced.kind !== 'advanced')
|
|
86
|
-
return advanced;
|
|
87
|
-
const staged = readStaged(advanced.record, confirmed);
|
|
88
|
-
return staged.kind === 'staged' ? { kind: 'advanced', confirmed: staged.confirmed } : staged;
|
|
89
|
-
}
|
package/dist/replica.d.ts
CHANGED
|
@@ -1,46 +1,70 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BootstrapInventory, MutationResult, OperationScopes, ReplicaAdmission, TypedSelection } from './adapter.js';
|
|
2
|
+
import { type ChangeBatch, type Precondition } from './change.js';
|
|
2
3
|
import { type Collection, type Composition } from './collection.js';
|
|
4
|
+
import type { ModelState } from './model.js';
|
|
3
5
|
import { type Layer } from './overlay.js';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import type { HeldEntry, OverlayEntry, StoredEntry } from './tables.js';
|
|
7
|
+
export type ReplicaRecord = {
|
|
8
|
+
readonly locator: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly handle: string;
|
|
11
|
+
readonly operations: OperationScopes;
|
|
12
|
+
readonly replica: ReplicaAdmission;
|
|
13
|
+
readonly model: ModelState;
|
|
14
|
+
readonly typedSelection: TypedSelection | null;
|
|
15
|
+
readonly selectionModel: ModelState;
|
|
16
|
+
readonly providerOwnedPaths: readonly string[];
|
|
17
|
+
readonly roomVersion: string;
|
|
18
|
+
readonly transfer: string;
|
|
19
|
+
readonly inventory: BootstrapInventory | null;
|
|
20
|
+
readonly key: number;
|
|
21
|
+
};
|
|
22
|
+
export type HeldReplica = {
|
|
23
|
+
readonly record: ReplicaRecord;
|
|
24
|
+
readonly queue: readonly ChangeBatch[];
|
|
25
|
+
readonly overlaid: ReadonlySet<string>;
|
|
26
|
+
readonly count: number;
|
|
27
|
+
readonly confirmed: number;
|
|
28
|
+
readonly indexed: boolean;
|
|
10
29
|
};
|
|
11
30
|
export type VisibleLayer = Layer & {
|
|
12
|
-
collection: Collection;
|
|
31
|
+
readonly collection: Collection;
|
|
13
32
|
};
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} | Refused;
|
|
18
|
-
export type Replica = {
|
|
19
|
-
confirmed: ConfirmedLayer;
|
|
20
|
-
queue: readonly ChangeBatch[];
|
|
21
|
-
visible: VisibleLayer;
|
|
22
|
-
replay: readonly ReplayStep[];
|
|
33
|
+
export type Slice = Layer & {
|
|
34
|
+
readonly written: Readonly<Record<string, string>>;
|
|
35
|
+
readonly held: ReadonlySet<string>;
|
|
23
36
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
export declare function compositionOf(record: Pick<ReplicaRecord, 'model' | 'typedSelection' | 'selectionModel'>): Composition;
|
|
38
|
+
export declare function sameMembership(record: Pick<ReplicaRecord, 'typedSelection'>, other: Pick<ReplicaRecord, 'typedSelection'>): boolean;
|
|
39
|
+
export declare function storedRecord(record: ReplicaRecord): string;
|
|
40
|
+
export declare function slicing(entries: readonly HeldEntry[], paths: Iterable<string>): Generator<number, Slice, void>;
|
|
41
|
+
export declare function entryAt(layer: Layer & {
|
|
42
|
+
readonly written?: Readonly<Record<string, string>>;
|
|
43
|
+
}, path: string): StoredEntry | null;
|
|
44
|
+
export declare function slicingWith(slice: Slice, set: readonly StoredEntry[], removed: readonly string[]): Generator<number, Slice, void>;
|
|
45
|
+
export declare function touchedBy(queue: readonly ChangeBatch[]): Set<string>;
|
|
46
|
+
export declare function movedBy(queue: readonly ChangeBatch[], locator: string): Set<string>;
|
|
47
|
+
export type Replayed = {
|
|
48
|
+
readonly visible: VisibleLayer;
|
|
49
|
+
readonly touched: ReadonlySet<string>;
|
|
30
50
|
};
|
|
31
|
-
export declare function
|
|
32
|
-
export declare function
|
|
33
|
-
export declare function
|
|
34
|
-
export declare function
|
|
35
|
-
export
|
|
36
|
-
|
|
51
|
+
export declare function replaying(confirmed: Slice, queue: readonly ChangeBatch[], locator: string, composition: Composition): Generator<number, Replayed, void>;
|
|
52
|
+
export declare function overlayOf(visible: Layer, touched: Iterable<string>): Generator<number, OverlayEntry[], void>;
|
|
53
|
+
export declare function holds(layer: Layer, preconditions: readonly Precondition[]): boolean;
|
|
54
|
+
export declare function landed(batch: ChangeBatch, confirmed: Layer, current?: Readonly<Record<string, string>>): boolean;
|
|
55
|
+
export type Standing = {
|
|
56
|
+
readonly withdrawn: readonly ChangeBatch[];
|
|
57
|
+
readonly kept: readonly ChangeBatch[];
|
|
37
58
|
};
|
|
59
|
+
export declare function standing(confirmed: Slice, queue: readonly ChangeBatch[], withdrawable: (batch: ChangeBatch) => boolean, local: boolean, locator: string, composition: Composition): Generator<number, Standing, void>;
|
|
38
60
|
type Accepted = Extract<MutationResult, {
|
|
39
61
|
kind: 'accepted';
|
|
40
62
|
}>;
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
63
|
+
export type Returned = {
|
|
64
|
+
readonly set: readonly StoredEntry[];
|
|
65
|
+
readonly removed: readonly string[];
|
|
66
|
+
};
|
|
67
|
+
export declare function returnedPaths(submitted: ChangeBatch, accepted: Accepted): Set<string>;
|
|
68
|
+
export declare function returning(confirmed: Slice, submitted: ChangeBatch, accepted: Accepted, writtenAt: string): Generator<number, Returned, void>;
|
|
45
69
|
export {};
|
|
46
70
|
//# 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":"AACA,OAAO,EAAmC,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAElB,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,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAiD,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAEzF,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG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