@agentshouse/mdruntime 0.1.0-c5d3fa6fb67bc → 0.1.0-c5f333dfa0583
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 +225 -212
- package/README.md +9 -8
- package/dist/adapter.d.ts +64 -24
- 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/bootstrap.d.ts +15 -7
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +90 -61
- 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 +8 -9
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +10 -85
- 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.js +1 -1
- package/dist/chat/list.d.ts +2 -1
- package/dist/chat/list.d.ts.map +1 -1
- package/dist/chat/list.js +45 -5
- package/dist/chat/markdown.d.ts +1 -0
- package/dist/chat/markdown.d.ts.map +1 -1
- package/dist/chat/markdown.js +78 -20
- 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 +14 -1
- package/dist/chat/messages.d.ts.map +1 -1
- package/dist/chat/messages.js +79 -24
- 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 +8 -1
- package/dist/chat/provider.d.ts.map +1 -1
- package/dist/chat/provider.js +98 -92
- 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 -2
- 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 +11 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +45 -7
- 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 +11 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +712 -0
- package/dist/connection.d.ts +21 -8
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +2319 -688
- package/dist/conversation.d.ts +15 -3
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +233 -80
- 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 +2 -1
- package/dist/durability.d.ts.map +1 -1
- 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/host.d.ts +5 -4
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +55 -7
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- 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 +7 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +39 -17
- 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 +35 -4
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +28 -0
- package/dist/overlay.d.ts +2 -5
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +86 -171
- package/dist/query.d.ts +26 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +34 -6
- package/dist/reach.d.ts +5 -1
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +167 -48
- 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 +1 -1
- package/dist/readiness.d.ts.map +1 -1
- package/dist/reads.d.ts +11 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +98 -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 +12 -15
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +74 -51
- package/dist/replica.d.ts +55 -33
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +295 -186
- package/dist/room-draft.d.ts +15 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +32 -25
- package/dist/rows.d.ts +29 -30
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +113 -64
- 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 +19 -4
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +192 -35
- 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 -71
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +461 -586
- package/dist/stored.d.ts +143 -0
- package/dist/stored.d.ts.map +1 -0
- package/dist/stored.js +561 -0
- package/dist/tables.d.ts +320 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +537 -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 +32 -0
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +8 -0
- package/package.json +10 -3
- 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 -642
package/dist/reads.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Adapter } from './adapter.js';
|
|
2
|
+
import type { Reads } from './bootstrap.js';
|
|
3
|
+
export type DoorReads = Reads & {
|
|
4
|
+
carried(locator: string): number;
|
|
5
|
+
finished(locator: string, turn: number): void;
|
|
6
|
+
opened(): void;
|
|
7
|
+
applied(): void;
|
|
8
|
+
lost(): void;
|
|
9
|
+
};
|
|
10
|
+
export declare function doorReads(adapter: Adapter, declaration: (locator: string) => unknown, generation: () => number): DoorReads;
|
|
11
|
+
//# sourceMappingURL=reads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reads.d.ts","sourceRoot":"","sources":["../src/reads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAOR,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG;IAC9B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9C,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;IAChB,IAAI,IAAI,IAAI,CAAC;CACd,CAAC;AAiCF,wBAAgB,SAAS,CACvB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,EACzC,UAAU,EAAE,MAAM,MAAM,GACvB,SAAS,CA0FX"}
|
package/dist/reads.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
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, ...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.settled || current.holder < asking)) {
|
|
32
|
+
if (current.settled && !current.continued)
|
|
33
|
+
reading.delete(key);
|
|
34
|
+
else
|
|
35
|
+
current.holder = Math.max(current.holder, asking);
|
|
36
|
+
if (current.from === asking)
|
|
37
|
+
return current.answer;
|
|
38
|
+
const again = () => joined(read, authorization, request, ask);
|
|
39
|
+
return current.answer.then((answer) => {
|
|
40
|
+
if (failed(answer))
|
|
41
|
+
return again();
|
|
42
|
+
taken.set(request.locator, (taken.get(request.locator) ?? 0) + 1);
|
|
43
|
+
return answer;
|
|
44
|
+
}, again);
|
|
45
|
+
}
|
|
46
|
+
const answer = ask();
|
|
47
|
+
const sent = {
|
|
48
|
+
locator: request.locator,
|
|
49
|
+
authorization,
|
|
50
|
+
asked,
|
|
51
|
+
held,
|
|
52
|
+
answer,
|
|
53
|
+
from: asking,
|
|
54
|
+
holder: asking,
|
|
55
|
+
settled: false,
|
|
56
|
+
continued: false,
|
|
57
|
+
};
|
|
58
|
+
reading.set(key, sent);
|
|
59
|
+
const settled = (result, kept) => {
|
|
60
|
+
sent.settled = true;
|
|
61
|
+
sent.continued = kept && read === 'refresh' && continues(result);
|
|
62
|
+
if (reading.get(key) !== sent)
|
|
63
|
+
return;
|
|
64
|
+
const live = sent.holder === generation();
|
|
65
|
+
if (!kept || (live ? !sent.continued : !carrying))
|
|
66
|
+
reading.delete(key);
|
|
67
|
+
};
|
|
68
|
+
answer.then((result) => settled(result, !failed(result)), () => settled(null, false));
|
|
69
|
+
return answer;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
bootstrap: (authorization, request) => joined('bootstrap', authorization, request, () => adapter.bootstrap(authorization, request)),
|
|
73
|
+
refresh: (authorization, request) => joined('refresh', authorization, request, () => adapter.refresh(authorization, request)),
|
|
74
|
+
reached: (locator, roomVersion, target) => adapter.reached(locator, roomVersion, target),
|
|
75
|
+
carried: (locator) => taken.get(locator) ?? 0,
|
|
76
|
+
finished(locator, turn) {
|
|
77
|
+
for (const [key, held] of reading) {
|
|
78
|
+
if (held.locator !== locator || !held.settled || held.holder !== turn)
|
|
79
|
+
continue;
|
|
80
|
+
if (turn === generation() || !carrying)
|
|
81
|
+
reading.delete(key);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
opened() {
|
|
85
|
+
carrying = true;
|
|
86
|
+
},
|
|
87
|
+
applied() {
|
|
88
|
+
carrying = false;
|
|
89
|
+
for (const [key, held] of reading) {
|
|
90
|
+
if (held.settled && held.holder !== generation())
|
|
91
|
+
reading.delete(key);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
lost() {
|
|
95
|
+
reading.clear();
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
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,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,
|
|
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,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,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Remodel } from './bootstrap.js';
|
|
3
|
-
import {
|
|
4
|
-
import type {
|
|
5
|
-
import
|
|
1
|
+
import type { AdapterFailure, Authorization, 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 } 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
|
-
kind: 'beyond-horizon';
|
|
21
|
-
} | RetryableRefusal | Unconfirmed | Refused | AdapterFailure;
|
|
22
|
-
export declare function advancement(adapter: Adapter, authorization: Authorization, held: ReplicaRecord, remodel: Remodel, continuing: () => boolean): Promise<Advancement>;
|
|
23
|
-
export declare function refreshRoom(adapter: Adapter, authorization: Authorization, confirmed: ConfirmedLayer, remodel: Remodel, continuing: () => boolean): Promise<RefreshOutcome>;
|
|
16
|
+
export type Refreshing = {
|
|
17
|
+
prior(paths: readonly string[]): Promise<ReadonlyMap<string, HeldEntry>>;
|
|
18
|
+
stage(page: RefreshedPage): Promise<boolean>;
|
|
19
|
+
};
|
|
20
|
+
export declare function advancement(adapter: Reads, authorization: Authorization, held: ReplicaRecord, remodel: Remodel, continuing: () => boolean, staging: Refreshing): Promise<Advancement>;
|
|
24
21
|
//# 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,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,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAE9D,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,UAAU,GAAG;IACvB,KAAK,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IACzE,KAAK,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9C,CAAC;AAkEF,wBAAsB,WAAW,CAC/B,OAAO,EAAE,KAAK,EACd,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,CA+CtB"}
|
package/dist/refresh.js
CHANGED
|
@@ -1,8 +1,65 @@
|
|
|
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
|
+
async function pageOf(page, roomVersion, staging) {
|
|
3
|
+
const removed = new Set(page.removals);
|
|
4
|
+
const documents = Object.keys(page.documents).filter((path) => !removed.has(path));
|
|
5
|
+
const binaries = Object.keys(page.binaryFiles).filter((path) => !removed.has(path));
|
|
6
|
+
const written = new Set([...documents, ...binaries]);
|
|
7
|
+
const others = [
|
|
8
|
+
...new Set([
|
|
9
|
+
...Object.keys(page.revisions),
|
|
10
|
+
...Object.keys(page.fileIds ?? {}),
|
|
11
|
+
...Object.keys(page.changes),
|
|
12
|
+
]),
|
|
13
|
+
].filter((path) => !written.has(path) && !removed.has(path));
|
|
14
|
+
const asked = [
|
|
15
|
+
...documents.filter((path) => page.revisions[path] === undefined),
|
|
16
|
+
...binaries.filter((path) => page.revisions[path] === undefined),
|
|
17
|
+
...others,
|
|
18
|
+
];
|
|
19
|
+
const prior = asked.length === 0 ? new Map() : await staging.prior(asked);
|
|
20
|
+
const entries = [];
|
|
21
|
+
for (const path of documents) {
|
|
22
|
+
entries.push({
|
|
23
|
+
path,
|
|
24
|
+
content: page.documents[path],
|
|
25
|
+
binary: null,
|
|
26
|
+
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
27
|
+
fileId: page.fileIds?.[path] ?? null,
|
|
28
|
+
change: page.changes[path] ?? null,
|
|
29
|
+
written: roomVersion,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
for (const path of binaries) {
|
|
33
|
+
entries.push({
|
|
34
|
+
path,
|
|
35
|
+
content: null,
|
|
36
|
+
binary: { state: 'accepted', ...page.binaryFiles[path] },
|
|
37
|
+
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
38
|
+
fileId: page.fileIds?.[path] ?? null,
|
|
39
|
+
change: page.changes[path] ?? null,
|
|
40
|
+
written: null,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
for (const path of others) {
|
|
44
|
+
const held = prior.get(path);
|
|
45
|
+
if (held === undefined)
|
|
46
|
+
continue;
|
|
47
|
+
const { type: _type, ...kept } = held;
|
|
48
|
+
entries.push({
|
|
49
|
+
...kept,
|
|
50
|
+
revision: page.revisions[path] ?? held.revision,
|
|
51
|
+
fileId: page.fileIds?.[path] ?? held.fileId,
|
|
52
|
+
change: page.changes[path] ?? held.change,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
entries,
|
|
57
|
+
removals: page.removals,
|
|
58
|
+
folders: page.folders ?? [],
|
|
59
|
+
folderRemovals: page.folderRemovals ?? [],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export async function advancement(adapter, authorization, held, remodel, continuing, staging) {
|
|
6
63
|
const locator = held.locator;
|
|
7
64
|
const fromRoomVersion = held.roomVersion;
|
|
8
65
|
const first = await adapter.refresh(authorization, {
|
|
@@ -17,40 +74,17 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
17
74
|
collection: held.model,
|
|
18
75
|
selection: held.selectionModel,
|
|
19
76
|
});
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
delete binaries[path];
|
|
29
|
-
delete fileIds[path];
|
|
30
|
-
delete changes[path];
|
|
31
|
-
written[path] = roomVersion;
|
|
32
|
-
}
|
|
33
|
-
for (const path of Object.keys(page.binaryFiles)) {
|
|
34
|
-
delete documents[path];
|
|
35
|
-
delete fileIds[path];
|
|
36
|
-
delete changes[path];
|
|
37
|
-
delete written[path];
|
|
38
|
-
}
|
|
39
|
-
Object.assign(documents, page.documents);
|
|
40
|
-
Object.assign(binaries, acceptedBinaries(page.binaryFiles));
|
|
41
|
-
Object.assign(revisions, page.revisions);
|
|
42
|
-
Object.assign(fileIds, page.fileIds);
|
|
43
|
-
Object.assign(changes, page.changes);
|
|
44
|
-
for (const path of page.removals) {
|
|
45
|
-
delete documents[path];
|
|
46
|
-
delete revisions[path];
|
|
47
|
-
delete fileIds[path];
|
|
48
|
-
delete changes[path];
|
|
49
|
-
delete written[path];
|
|
50
|
-
delete binaries[path];
|
|
51
|
-
}
|
|
77
|
+
const changed = new Set();
|
|
78
|
+
const staged = async (page) => {
|
|
79
|
+
const read = await pageOf(page, roomVersion, staging);
|
|
80
|
+
for (const { path } of read.entries)
|
|
81
|
+
changed.add(path);
|
|
82
|
+
for (const path of read.removals)
|
|
83
|
+
changed.add(path);
|
|
84
|
+
return staging.stage(read);
|
|
52
85
|
};
|
|
53
|
-
|
|
86
|
+
if (!(await staged(first)))
|
|
87
|
+
return unconfirmed;
|
|
54
88
|
let pageToken = first.pageToken;
|
|
55
89
|
while (pageToken !== undefined) {
|
|
56
90
|
if (!continuing())
|
|
@@ -67,7 +101,8 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
67
101
|
return page;
|
|
68
102
|
if (page.roomVersion !== roomVersion)
|
|
69
103
|
return unconfirmed;
|
|
70
|
-
|
|
104
|
+
if (!(await staged(page)))
|
|
105
|
+
return unconfirmed;
|
|
71
106
|
pageToken = page.pageToken;
|
|
72
107
|
}
|
|
73
108
|
return {
|
|
@@ -77,19 +112,7 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
77
112
|
model: models.collection,
|
|
78
113
|
selectionModel: models.selection,
|
|
79
114
|
roomVersion,
|
|
80
|
-
documents: settled(documents),
|
|
81
|
-
binaries: settled(binaries),
|
|
82
|
-
revisions: settled(revisions),
|
|
83
|
-
fileIds: settled(fileIds),
|
|
84
|
-
changes: settled(changes),
|
|
85
|
-
written: settled(written),
|
|
86
115
|
},
|
|
116
|
+
changed,
|
|
87
117
|
};
|
|
88
118
|
}
|
|
89
|
-
export async function refreshRoom(adapter, authorization, confirmed, remodel, continuing) {
|
|
90
|
-
const advanced = await advancement(adapter, authorization, confirmed.record, remodel, continuing);
|
|
91
|
-
if (advanced.kind !== 'advanced')
|
|
92
|
-
return advanced;
|
|
93
|
-
const staged = readStaged(advanced.record, confirmed);
|
|
94
|
-
return staged.kind === 'staged' ? { kind: 'advanced', confirmed: staged.confirmed } : staged;
|
|
95
|
-
}
|
package/dist/replica.d.ts
CHANGED
|
@@ -1,46 +1,68 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { 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 key: number;
|
|
20
|
+
};
|
|
21
|
+
export type HeldReplica = {
|
|
22
|
+
readonly record: ReplicaRecord;
|
|
23
|
+
readonly queue: readonly ChangeBatch[];
|
|
24
|
+
readonly overlaid: ReadonlySet<string>;
|
|
25
|
+
readonly count: number;
|
|
26
|
+
readonly confirmed: number;
|
|
10
27
|
};
|
|
11
28
|
export type VisibleLayer = Layer & {
|
|
12
|
-
collection: Collection;
|
|
29
|
+
readonly collection: Collection;
|
|
13
30
|
};
|
|
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[];
|
|
31
|
+
export type Slice = Layer & {
|
|
32
|
+
readonly written: Readonly<Record<string, string>>;
|
|
33
|
+
readonly held: ReadonlySet<string>;
|
|
23
34
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
export declare function compositionOf(record: Pick<ReplicaRecord, 'model' | 'typedSelection' | 'selectionModel'>): Composition;
|
|
36
|
+
export declare function sameMembership(record: Pick<ReplicaRecord, 'typedSelection'>, other: Pick<ReplicaRecord, 'typedSelection'>): boolean;
|
|
37
|
+
export declare function storedRecord(record: ReplicaRecord): string;
|
|
38
|
+
export declare function slicing(entries: readonly HeldEntry[], paths: Iterable<string>): Generator<number, Slice, void>;
|
|
39
|
+
export declare function entryAt(layer: Layer & {
|
|
40
|
+
readonly written?: Readonly<Record<string, string>>;
|
|
41
|
+
}, path: string): StoredEntry | null;
|
|
42
|
+
export declare function slicingWith(slice: Slice, set: readonly StoredEntry[], removed: readonly string[]): Generator<number, Slice, void>;
|
|
43
|
+
export declare function touchedBy(queue: readonly ChangeBatch[]): Set<string>;
|
|
44
|
+
export declare function movedBy(queue: readonly ChangeBatch[], locator: string): Set<string>;
|
|
45
|
+
export type Replayed = {
|
|
46
|
+
readonly visible: VisibleLayer;
|
|
47
|
+
readonly touched: ReadonlySet<string>;
|
|
30
48
|
};
|
|
31
|
-
export declare function
|
|
32
|
-
export declare function
|
|
33
|
-
export declare function
|
|
34
|
-
export declare function
|
|
35
|
-
export
|
|
36
|
-
|
|
49
|
+
export declare function replaying(confirmed: Slice, queue: readonly ChangeBatch[], locator: string, composition: Composition): Generator<number, Replayed, void>;
|
|
50
|
+
export declare function overlayOf(visible: Layer, touched: Iterable<string>): Generator<number, OverlayEntry[], void>;
|
|
51
|
+
export declare function holds(layer: Layer, preconditions: readonly Precondition[]): boolean;
|
|
52
|
+
export declare function landed(batch: ChangeBatch, confirmed: Layer, current?: Readonly<Record<string, string>>): boolean;
|
|
53
|
+
export type Standing = {
|
|
54
|
+
readonly withdrawn: readonly ChangeBatch[];
|
|
55
|
+
readonly kept: readonly ChangeBatch[];
|
|
37
56
|
};
|
|
57
|
+
export declare function standing(confirmed: Slice, queue: readonly ChangeBatch[], withdrawable: (batch: ChangeBatch) => boolean, local: boolean, locator: string, composition: Composition): Generator<number, Standing, void>;
|
|
38
58
|
type Accepted = Extract<MutationResult, {
|
|
39
59
|
kind: 'accepted';
|
|
40
60
|
}>;
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
61
|
+
export type Returned = {
|
|
62
|
+
readonly set: readonly StoredEntry[];
|
|
63
|
+
readonly removed: readonly string[];
|
|
64
|
+
};
|
|
65
|
+
export declare function returnedPaths(submitted: ChangeBatch, accepted: Accepted): Set<string>;
|
|
66
|
+
export declare function returning(confirmed: Slice, submitted: ChangeBatch, accepted: Accepted, writtenAt: string): Generator<number, Returned, void>;
|
|
45
67
|
export {};
|
|
46
68
|
//# 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,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,i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