@agentshouse/mdruntime 0.1.0-c5d3fa6fb67bc → 0.1.0-c5d81e5d5cb58
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 +18 -15
- package/dist/adapter.d.ts +86 -34
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +5 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +38 -4
- 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 +31 -8
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +187 -85
- 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 -89
- package/dist/change.d.ts +31 -1
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +10 -1
- package/dist/client.d.ts +13 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +95 -10
- package/dist/collection.d.ts +11 -19
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +53 -289
- package/dist/compile.d.ts +16 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +765 -0
- package/dist/connection.d.ts +28 -13
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +2937 -1064
- package/dist/conversation.d.ts +18 -3
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +340 -117
- 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 -19
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +7 -122
- 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 +8 -7
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +84 -14
- 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 +14 -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 +124 -0
- package/dist/media.d.ts +8 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +208 -0
- package/dist/memory.d.ts +8 -4
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +79 -32
- 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 +6 -0
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +7 -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 +15 -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 +45 -4
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +39 -0
- package/dist/overlay.d.ts +2 -5
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +87 -172
- 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 +35 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +46 -7
- package/dist/reach.d.ts +13 -4
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +210 -68
- 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 +113 -56
- package/dist/replica.d.ts +56 -33
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +298 -188
- package/dist/room-draft.d.ts +16 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +65 -25
- package/dist/rows.d.ts +38 -30
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +173 -96
- package/dist/save.d.ts +53 -14
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +529 -185
- package/dist/search.d.ts +25 -42
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +30 -169
- 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/status.d.ts +5 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +3 -1
- package/dist/store.d.ts +106 -90
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +355 -659
- package/dist/stored.d.ts +154 -0
- package/dist/stored.d.ts.map +1 -0
- package/dist/stored.js +624 -0
- package/dist/tables.d.ts +362 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +627 -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 +33 -1
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +9 -1
- package/dist/words.d.ts +19 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.js +156 -0
- package/package.json +18 -19
- package/AGENTS.md +0 -299
- package/dist/acquisition.d.ts +0 -14
- package/dist/acquisition.d.ts.map +0 -1
- package/dist/acquisition.js +0 -24
- package/dist/chat/acts.d.ts +0 -33
- package/dist/chat/acts.d.ts.map +0 -1
- package/dist/chat/acts.js +0 -36
- package/dist/chat/context.d.ts +0 -3
- package/dist/chat/context.d.ts.map +0 -1
- package/dist/chat/context.js +0 -10
- package/dist/chat/input.d.ts +0 -9
- package/dist/chat/input.d.ts.map +0 -1
- package/dist/chat/input.js +0 -99
- package/dist/chat/kit.d.ts +0 -61
- package/dist/chat/kit.d.ts.map +0 -1
- package/dist/chat/kit.js +0 -123
- package/dist/chat/lasting.d.ts +0 -6
- package/dist/chat/lasting.d.ts.map +0 -1
- package/dist/chat/lasting.js +0 -19
- package/dist/chat/list.d.ts +0 -27
- package/dist/chat/list.d.ts.map +0 -1
- package/dist/chat/list.js +0 -63
- package/dist/chat/markdown.d.ts +0 -20
- package/dist/chat/markdown.d.ts.map +0 -1
- package/dist/chat/markdown.js +0 -188
- package/dist/chat/message.d.ts +0 -6
- package/dist/chat/message.d.ts.map +0 -1
- package/dist/chat/message.js +0 -192
- package/dist/chat/messages.d.ts +0 -22
- package/dist/chat/messages.d.ts.map +0 -1
- package/dist/chat/messages.js +0 -155
- package/dist/chat/name.d.ts +0 -6
- package/dist/chat/name.d.ts.map +0 -1
- package/dist/chat/name.js +0 -37
- package/dist/chat/opened.d.ts +0 -11
- package/dist/chat/opened.d.ts.map +0 -1
- package/dist/chat/opened.js +0 -17
- package/dist/chat/overlay.d.ts +0 -31
- package/dist/chat/overlay.d.ts.map +0 -1
- package/dist/chat/overlay.js +0 -97
- package/dist/chat/parts.d.ts +0 -57
- package/dist/chat/parts.d.ts.map +0 -1
- package/dist/chat/parts.js +0 -119
- package/dist/chat/process.d.ts +0 -20
- package/dist/chat/process.d.ts.map +0 -1
- package/dist/chat/process.js +0 -32
- package/dist/chat/provider.d.ts +0 -63
- package/dist/chat/provider.d.ts.map +0 -1
- package/dist/chat/provider.js +0 -629
- package/dist/chat/question.d.ts +0 -9
- package/dist/chat/question.d.ts.map +0 -1
- package/dist/chat/question.js +0 -80
- package/dist/chat/questions.d.ts +0 -31
- package/dist/chat/questions.d.ts.map +0 -1
- package/dist/chat/questions.js +0 -111
- package/dist/chat/read.d.ts +0 -5
- package/dist/chat/read.d.ts.map +0 -1
- package/dist/chat/read.js +0 -13
- package/dist/chat/ready.d.ts +0 -34
- package/dist/chat/ready.d.ts.map +0 -1
- package/dist/chat/ready.js +0 -91
- package/dist/chat/style.d.ts +0 -4
- package/dist/chat/style.d.ts.map +0 -1
- package/dist/chat/style.js +0 -302
- package/dist/chat.d.ts +0 -14
- package/dist/chat.d.ts.map +0 -1
- package/dist/chat.js +0 -8
- 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/bootstrap.js
CHANGED
|
@@ -1,99 +1,202 @@
|
|
|
1
1
|
import { transferIdentity } from './identity.js';
|
|
2
|
-
import { advancement } from './refresh.js';
|
|
3
|
-
import { acceptedBinaries } from './overlay.js';
|
|
4
|
-
import { readStaged } from './replica.js';
|
|
2
|
+
import { advancement, pageEntries } from './refresh.js';
|
|
5
3
|
import { unconfirmed } from './transfer.js';
|
|
4
|
+
export const NOTHING_DONE = { parts: 0, bytes: 0 };
|
|
6
5
|
const RESUMABLE = new Set([
|
|
7
6
|
'transport-uncertainty',
|
|
8
7
|
'retryable-refusal',
|
|
9
8
|
'unconfirmed',
|
|
10
9
|
]);
|
|
11
|
-
|
|
10
|
+
const NOTHING_PRIOR = () => Promise.resolve(new Map());
|
|
11
|
+
async function pageOf(page) {
|
|
12
12
|
return {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
fileIds: page.fileIds ?? {},
|
|
16
|
-
changes: page.changes,
|
|
17
|
-
written: Object.fromEntries(Object.keys(page.documents).map((path) => [path, page.roomVersion])),
|
|
18
|
-
binaries: acceptedBinaries(page.binaryFiles),
|
|
13
|
+
entries: await pageEntries(page, [], page.roomVersion, NOTHING_PRIOR),
|
|
14
|
+
folders: page.folders ?? [],
|
|
19
15
|
};
|
|
20
16
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return null;
|
|
25
|
-
if (record.selection === room.replica.selection) {
|
|
26
|
-
return { record, layer: await staging.staged(record) };
|
|
27
|
-
}
|
|
28
|
-
await staging.abandon(room.locator);
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
function pooled(pool, layer) {
|
|
17
|
+
function heldTogether(first, second) {
|
|
18
|
+
if (first === null)
|
|
19
|
+
return second;
|
|
32
20
|
return {
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
async files(after, limit) {
|
|
22
|
+
const [left, right] = await Promise.all([
|
|
23
|
+
first.files(after, limit),
|
|
24
|
+
second.files(after, limit),
|
|
25
|
+
]);
|
|
26
|
+
const merged = new Map([...left, ...right].map((file) => [file.path, file]));
|
|
27
|
+
return [...merged.values()]
|
|
28
|
+
.sort((one, other) => (one.path < other.path ? -1 : one.path > other.path ? 1 : 0))
|
|
29
|
+
.slice(0, limit);
|
|
30
|
+
},
|
|
31
|
+
async contents(paths) {
|
|
32
|
+
const [left, right] = await Promise.all([first.contents(paths), second.contents(paths)]);
|
|
33
|
+
return new Map([...left, ...right]);
|
|
34
|
+
},
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const NO_CONTENT = {
|
|
38
|
+
files: () => Promise.resolve([]),
|
|
39
|
+
contents: () => Promise.resolve(new Map()),
|
|
40
|
+
};
|
|
41
|
+
export async function bootstrapRoom(adapter, authorization, room, held, builtIn, remodel, continuing, staging, reuse) {
|
|
42
|
+
const kept = staging.held(room.locator);
|
|
43
|
+
const resumed = kept !== null && kept.selection === room.replica.selection ? kept : null;
|
|
44
|
+
if (kept !== null && resumed === null)
|
|
45
|
+
await staging.abandon(room.locator);
|
|
46
|
+
const first = await bundle(adapter, authorization, room, held, builtIn, remodel, continuing, staging, resumed, reuse);
|
|
39
47
|
if (first.kind !== 'expired')
|
|
40
48
|
return first;
|
|
41
|
-
await staging.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
await staging.setAside(room.locator);
|
|
50
|
+
try {
|
|
51
|
+
const replacement = await bundle(adapter, authorization, room, held, builtIn, remodel, continuing, staging, null, heldTogether(reuse, first.held));
|
|
52
|
+
if (replacement.kind !== 'expired')
|
|
53
|
+
return replacement;
|
|
54
|
+
await staging.abandon(room.locator);
|
|
55
|
+
return unconfirmed;
|
|
56
|
+
}
|
|
57
|
+
finally {
|
|
58
|
+
if (first.key !== null)
|
|
59
|
+
await staging.release(first.key);
|
|
60
|
+
}
|
|
47
61
|
}
|
|
48
|
-
|
|
62
|
+
const UNASKED = { page: unconfirmed, reused: false };
|
|
63
|
+
const NOTHING_KEPT = Promise.resolve();
|
|
64
|
+
function dropped(ahead) {
|
|
65
|
+
void ahead?.fetched.then(({ next, written }) => {
|
|
66
|
+
written();
|
|
67
|
+
dropped(next);
|
|
68
|
+
}, () => { });
|
|
69
|
+
}
|
|
70
|
+
function compositionFor(room, models, builtIn) {
|
|
71
|
+
return {
|
|
72
|
+
model: models.collection,
|
|
73
|
+
selection: room.typedSelection === undefined
|
|
74
|
+
? null
|
|
75
|
+
: { roots: room.typedSelection.roots, model: builtIn },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
async function bundle(adapter, authorization, room, held, builtIn, remodel, continuing, staging, kept, pool) {
|
|
49
79
|
const locator = room.locator;
|
|
50
80
|
const selection = room.replica.selection;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
81
|
+
let transfer = kept;
|
|
82
|
+
let looking = kept !== null;
|
|
83
|
+
let stopped = false;
|
|
84
|
+
let begin = () => { };
|
|
85
|
+
const begun = kept === null
|
|
86
|
+
? new Promise((resolve) => {
|
|
87
|
+
begin = resolve;
|
|
88
|
+
})
|
|
89
|
+
: NOTHING_KEPT;
|
|
90
|
+
const arriving = staging.arriving(locator);
|
|
91
|
+
const asking = async (token) => {
|
|
92
|
+
const received = token !== null && looking ? await staging.received(locator, token) : null;
|
|
93
|
+
if (received === null)
|
|
94
|
+
looking = false;
|
|
61
95
|
const page = await adapter.bootstrap(authorization, {
|
|
62
96
|
locator,
|
|
63
97
|
selection,
|
|
64
|
-
...(
|
|
98
|
+
...(token === null
|
|
99
|
+
? {}
|
|
100
|
+
: { pageToken: token, arriving: (bytes) => arriving.at(token, bytes) }),
|
|
65
101
|
...(pool === null ? {} : { held: pool }),
|
|
102
|
+
...(received === null ? {} : { received }),
|
|
66
103
|
});
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
104
|
+
return { page, reused: received !== null };
|
|
105
|
+
};
|
|
106
|
+
const fetching = (token) => {
|
|
107
|
+
const fetched = (async () => {
|
|
108
|
+
const release = await staging.turn(locator, token === null ? 'listing' : 'downloading');
|
|
109
|
+
let asked;
|
|
110
|
+
try {
|
|
111
|
+
asked = stopped || !continuing() ? UNASKED : await asking(token);
|
|
112
|
+
}
|
|
113
|
+
finally {
|
|
114
|
+
release();
|
|
115
|
+
}
|
|
116
|
+
const { page, reused } = asked;
|
|
117
|
+
if (page.kind !== 'bootstrap') {
|
|
118
|
+
return { page, kept: NOTHING_KEPT, next: null, written: () => { } };
|
|
119
|
+
}
|
|
120
|
+
const received = page.received;
|
|
121
|
+
const written = staging.queued(received?.byteLength ?? 0);
|
|
122
|
+
let kept = NOTHING_KEPT;
|
|
123
|
+
if (token !== null && received !== undefined && !reused) {
|
|
124
|
+
kept = begun.then(() => staging.keep(locator, token, received));
|
|
125
|
+
kept.catch(() => { });
|
|
126
|
+
}
|
|
127
|
+
const later = page.pageToken;
|
|
128
|
+
const next = later === undefined || stopped || !continuing() ? null : fetching(later);
|
|
129
|
+
return { page, kept, next, written };
|
|
130
|
+
})();
|
|
131
|
+
fetched.catch(() => { });
|
|
132
|
+
return { token, fetched };
|
|
133
|
+
};
|
|
134
|
+
let ahead = null;
|
|
135
|
+
try {
|
|
136
|
+
while (transfer === null || transfer.pageToken !== null) {
|
|
137
|
+
if (!continuing())
|
|
138
|
+
return unconfirmed;
|
|
139
|
+
const asked = transfer?.pageToken ?? null;
|
|
140
|
+
const current = ahead !== null && ahead.token === asked ? ahead : fetching(asked);
|
|
141
|
+
if (ahead !== current)
|
|
142
|
+
dropped(ahead);
|
|
143
|
+
ahead = null;
|
|
144
|
+
const fetched = await current.fetched;
|
|
145
|
+
ahead = fetched.next;
|
|
146
|
+
try {
|
|
147
|
+
if (!continuing())
|
|
148
|
+
return unconfirmed;
|
|
149
|
+
const page = fetched.page;
|
|
150
|
+
if (page.kind === 'beyond-horizon') {
|
|
151
|
+
const key = transfer?.key ?? null;
|
|
152
|
+
return { kind: 'expired', held: key === null ? NO_CONTENT : staging.content(key), key };
|
|
153
|
+
}
|
|
154
|
+
if (page.kind !== 'bootstrap') {
|
|
155
|
+
if (!RESUMABLE.has(page.kind))
|
|
156
|
+
await staging.abandon(locator);
|
|
157
|
+
return page;
|
|
158
|
+
}
|
|
159
|
+
await fetched.kept;
|
|
160
|
+
const done = transfer?.done ?? NOTHING_DONE;
|
|
161
|
+
const part = page.received?.byteLength;
|
|
162
|
+
const next = {
|
|
163
|
+
locator,
|
|
164
|
+
transfer: transfer?.transfer ?? transferIdentity(),
|
|
165
|
+
selection,
|
|
166
|
+
from: transfer !== null && adapter.reached(locator, page.roomVersion, transfer.from)
|
|
167
|
+
? transfer.from
|
|
168
|
+
: page.roomVersion,
|
|
169
|
+
last: transfer !== null && !adapter.reached(locator, page.roomVersion, transfer.last)
|
|
170
|
+
? transfer.last
|
|
171
|
+
: page.roomVersion,
|
|
172
|
+
pageToken: page.pageToken ?? null,
|
|
173
|
+
inventory: page.inventory ?? transfer?.inventory ?? null,
|
|
174
|
+
done: part === undefined ? done : { parts: done.parts + 1, bytes: done.bytes + part },
|
|
175
|
+
models: remodel(page.models, transfer?.models ?? held),
|
|
176
|
+
key: transfer?.key ?? null,
|
|
177
|
+
};
|
|
178
|
+
const staged = await staging.stage(next, await pageOf(page), compositionFor(room, next.models, builtIn), part === undefined ? null : asked);
|
|
179
|
+
if (staged === null)
|
|
180
|
+
return unconfirmed;
|
|
181
|
+
transfer = staged;
|
|
182
|
+
begin();
|
|
183
|
+
}
|
|
184
|
+
finally {
|
|
185
|
+
fetched.written();
|
|
186
|
+
}
|
|
73
187
|
}
|
|
74
|
-
transfer = {
|
|
75
|
-
locator,
|
|
76
|
-
transfer: transfer?.transfer ?? transferIdentity(),
|
|
77
|
-
selection,
|
|
78
|
-
from: transfer !== null && adapter.reached(locator, page.roomVersion, transfer.from)
|
|
79
|
-
? transfer.from
|
|
80
|
-
: page.roomVersion,
|
|
81
|
-
last: transfer !== null && !adapter.reached(locator, page.roomVersion, transfer.last)
|
|
82
|
-
? transfer.last
|
|
83
|
-
: page.roomVersion,
|
|
84
|
-
pageToken: page.pageToken ?? null,
|
|
85
|
-
models: remodel(page.models, transfer?.models ?? held),
|
|
86
|
-
};
|
|
87
|
-
const staged = pageLayer(page);
|
|
88
|
-
if (!(await staging.stage(transfer, staged)))
|
|
89
|
-
return unconfirmed;
|
|
90
|
-
Object.assign(documents, staged.documents);
|
|
91
|
-
Object.assign(revisions, staged.revisions);
|
|
92
|
-
Object.assign(fileIds, staged.fileIds);
|
|
93
|
-
Object.assign(changes, staged.changes);
|
|
94
|
-
Object.assign(written, staged.written);
|
|
95
|
-
Object.assign(binaries, staged.binaries);
|
|
96
188
|
}
|
|
189
|
+
finally {
|
|
190
|
+
stopped = true;
|
|
191
|
+
dropped(ahead);
|
|
192
|
+
arriving.end();
|
|
193
|
+
}
|
|
194
|
+
const composition = compositionFor(room, transfer.models, builtIn);
|
|
195
|
+
if (!(await staging.derive(locator, transfer.key, composition)))
|
|
196
|
+
return unconfirmed;
|
|
197
|
+
await staging.turn(locator, 'replaying');
|
|
198
|
+
if (!continuing())
|
|
199
|
+
return unconfirmed;
|
|
97
200
|
const record = {
|
|
98
201
|
locator,
|
|
99
202
|
name: room.name,
|
|
@@ -102,30 +205,29 @@ async function bundle(adapter, authorization, room, held, remodel, continuing, s
|
|
|
102
205
|
replica: room.replica,
|
|
103
206
|
model: transfer.models.collection,
|
|
104
207
|
typedSelection: room.typedSelection ?? null,
|
|
105
|
-
selectionModel: transfer.models.selection,
|
|
106
208
|
providerOwnedPaths: room.providerOwnedPaths,
|
|
107
209
|
roomVersion: transfer.from,
|
|
108
210
|
transfer: transfer.transfer,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
revisions,
|
|
112
|
-
fileIds,
|
|
113
|
-
changes,
|
|
114
|
-
written,
|
|
211
|
+
inventory: transfer.inventory,
|
|
212
|
+
key: transfer.key,
|
|
115
213
|
};
|
|
116
|
-
const
|
|
214
|
+
const due = [room.roomVersion, ...staging.announced(locator)];
|
|
215
|
+
const last = transfer.last;
|
|
216
|
+
const reconciled = last === transfer.from && due.every((version) => adapter.reached(locator, last, version))
|
|
117
217
|
? { kind: 'still-current' }
|
|
118
|
-
: await advancement(adapter, authorization, record, remodel, continuing);
|
|
218
|
+
: await advancement(adapter, authorization, record, remodel, continuing, await staging.refreshing(locator, record.key, composition));
|
|
119
219
|
if (reconciled.kind === 'advanced' || reconciled.kind === 'still-current') {
|
|
120
|
-
const
|
|
121
|
-
|
|
220
|
+
const refreshed = reconciled.kind === 'advanced';
|
|
221
|
+
const result = refreshed ? reconciled.record : record;
|
|
222
|
+
const refused = await staging.validate(result, refreshed ? 'refreshed' : 'confirmed');
|
|
223
|
+
if (refused !== null) {
|
|
122
224
|
await staging.abandon(locator);
|
|
123
|
-
return
|
|
225
|
+
return refused;
|
|
124
226
|
}
|
|
125
|
-
return { kind: 'staged',
|
|
227
|
+
return { kind: 'staged', record: result, refreshed };
|
|
126
228
|
}
|
|
127
229
|
if (reconciled.kind === 'beyond-horizon') {
|
|
128
|
-
return { kind: 'expired', held:
|
|
230
|
+
return { kind: 'expired', held: staging.content(record.key), key: record.key };
|
|
129
231
|
}
|
|
130
232
|
if (!RESUMABLE.has(reconciled.kind))
|
|
131
233
|
await staging.abandon(locator);
|
package/dist/chain.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MdRuntimeClient } from './client.js';
|
|
2
|
+
import type { DocumentQuery, DocumentResult, GroupQuery, GroupResult, PendingResult } from './query.js';
|
|
3
|
+
type Rows = DocumentResult | GroupResult;
|
|
4
|
+
export type WindowAnswer = Rows | PendingResult;
|
|
5
|
+
export type WindowChain = {
|
|
6
|
+
want(count: number): void;
|
|
7
|
+
close(): void;
|
|
8
|
+
};
|
|
9
|
+
export declare function chainedWindows(runtime: MdRuntimeClient, query: DocumentQuery | GroupQuery, count: number, publish: (answers: readonly (WindowAnswer | null)[], settled: boolean) => void): WindowChain;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../src/chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,EACX,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,KAAK,IAAI,GAAG,cAAc,GAAG,WAAW,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,aAAa,CAAC;AAEhD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAaF,wBAAgB,cAAc,CAC5B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,aAAa,GAAG,UAAU,EACjC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,GAC7E,WAAW,CAkEb"}
|
package/dist/chain.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function answered(answer) {
|
|
2
|
+
return answer !== null && !('pending' in answer);
|
|
3
|
+
}
|
|
4
|
+
export function chainedWindows(runtime, query, count, publish) {
|
|
5
|
+
let links = [];
|
|
6
|
+
let wanted = count;
|
|
7
|
+
let closed = false;
|
|
8
|
+
const observe = runtime.observe;
|
|
9
|
+
const open = (after, shown) => {
|
|
10
|
+
const link = { after, observation: null, value: shown, fresh: false };
|
|
11
|
+
void observe('query', after === undefined ? query : { ...query, after }).then((observation) => {
|
|
12
|
+
if (closed || !links.includes(link)) {
|
|
13
|
+
observation.close();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
link.observation = observation;
|
|
17
|
+
const take = (value) => {
|
|
18
|
+
link.value = value;
|
|
19
|
+
link.fresh = true;
|
|
20
|
+
settle();
|
|
21
|
+
};
|
|
22
|
+
observation.subscribe(take);
|
|
23
|
+
take(observation.current());
|
|
24
|
+
}, () => { });
|
|
25
|
+
return link;
|
|
26
|
+
};
|
|
27
|
+
const settle = () => {
|
|
28
|
+
if (closed)
|
|
29
|
+
return;
|
|
30
|
+
const next = [];
|
|
31
|
+
for (let at = 0; at < wanted; at += 1) {
|
|
32
|
+
const before = next[at - 1];
|
|
33
|
+
if (before !== undefined && !before.fresh) {
|
|
34
|
+
next.push(...links.slice(at, wanted));
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
if (before !== undefined && (!answered(before.value) || before.value.next === undefined)) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
const after = before === undefined ? undefined : before.value.next;
|
|
41
|
+
const held = links[at];
|
|
42
|
+
next.push(held !== undefined && held.after === after ? held : open(after, held?.value ?? null));
|
|
43
|
+
}
|
|
44
|
+
for (const link of links)
|
|
45
|
+
if (!next.includes(link))
|
|
46
|
+
link.observation?.close();
|
|
47
|
+
links = next;
|
|
48
|
+
publish(links.map((link) => link.value), links.every((link) => link.fresh));
|
|
49
|
+
};
|
|
50
|
+
settle();
|
|
51
|
+
return {
|
|
52
|
+
want(count) {
|
|
53
|
+
if (count === wanted)
|
|
54
|
+
return;
|
|
55
|
+
wanted = count;
|
|
56
|
+
settle();
|
|
57
|
+
},
|
|
58
|
+
close() {
|
|
59
|
+
closed = true;
|
|
60
|
+
for (const link of links)
|
|
61
|
+
link.observation?.close();
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
package/dist/change-set.d.ts
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import { type Replica } from './replica.js';
|
|
2
|
-
import { type Row } from './rows.js';
|
|
3
1
|
export type DocumentChange = {
|
|
4
|
-
locator: string;
|
|
5
|
-
path: string;
|
|
6
|
-
before: readonly Row[];
|
|
7
|
-
after: readonly Row[];
|
|
8
|
-
};
|
|
9
|
-
export type MessageChange = {
|
|
10
|
-
conversation: string;
|
|
11
|
-
identity: string;
|
|
12
|
-
text: string | null;
|
|
2
|
+
readonly locator: string;
|
|
3
|
+
readonly path: string | null;
|
|
13
4
|
};
|
|
14
5
|
export type ChangeSet = {
|
|
15
6
|
documents: readonly DocumentChange[];
|
|
@@ -20,16 +11,18 @@ export type ChangeSet = {
|
|
|
20
11
|
rooms: readonly string[];
|
|
21
12
|
queues: readonly string[];
|
|
22
13
|
presentations: readonly string[];
|
|
23
|
-
messages: readonly MessageChange[];
|
|
24
14
|
conversations: readonly string[];
|
|
25
15
|
};
|
|
26
|
-
|
|
16
|
+
type Changed = {
|
|
17
|
+
documents?: readonly string[] | null;
|
|
27
18
|
drafts?: readonly string[];
|
|
28
19
|
room?: boolean;
|
|
29
20
|
queue?: boolean;
|
|
30
21
|
presentation?: string;
|
|
31
|
-
}
|
|
32
|
-
export declare function
|
|
33
|
-
export declare function conversationChangeSet(
|
|
22
|
+
};
|
|
23
|
+
export declare function changeSet(locator: string, changed?: Changed): ChangeSet;
|
|
24
|
+
export declare function conversationChangeSet(conversations: readonly string[]): ChangeSet;
|
|
34
25
|
export declare function mergeChangeSets(sets: readonly ChangeSet[]): ChangeSet;
|
|
26
|
+
export declare function touches(set: ChangeSet, locator: string, path: string): boolean;
|
|
27
|
+
export {};
|
|
35
28
|
//# sourceMappingURL=change-set.d.ts.map
|
package/dist/change-set.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IACrC,MAAM,EAAE,SAAS;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrD,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,OAAY,GAAG,SAAS,CAe3E;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CASjF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,CASrE;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAI9E"}
|
package/dist/change-set.js
CHANGED
|
@@ -1,105 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { changedPaths, sameBinary, sameChange } from './overlay.js';
|
|
4
|
-
import { beneath } from './paths.js';
|
|
5
|
-
import { compositionOf, sameMembership } from './replica.js';
|
|
6
|
-
import { markdownPath, rowsOf } from './rows.js';
|
|
7
|
-
function rowsAt(locator, replica, path) {
|
|
8
|
-
if (replica === null)
|
|
9
|
-
return [];
|
|
10
|
-
const visible = replica.visible;
|
|
11
|
-
const document = markdownPath(path) ? passingFrontmatter(visible.collection, path) : null;
|
|
12
|
-
const held = visible.documents[path] !== undefined && document !== undefined;
|
|
13
|
-
const binary = visible.binaries[path];
|
|
14
|
-
if (!held && binary === undefined)
|
|
15
|
-
return [];
|
|
16
|
-
return rowsOf(locator, path, document ?? null, compositionOf(replica.confirmed.record), visible.changes[path] ?? null, visible.fileIds[path] ?? null, binary === undefined ? null : binaryRecord(path, binary, visible.revisions[path]));
|
|
17
|
-
}
|
|
18
|
-
function modelShape(model) {
|
|
19
|
-
return model.status === 'unavailable' ? 'unavailable' : JSON.stringify(model.types);
|
|
20
|
-
}
|
|
21
|
-
export function changeSet(locator, before, after, changed = {}) {
|
|
22
|
-
const documents = [];
|
|
23
|
-
const oldRoom = before?.confirmed.record;
|
|
24
|
-
const newRoom = after?.confirmed.record;
|
|
25
|
-
const collectionChanged = oldRoom !== undefined &&
|
|
26
|
-
newRoom !== undefined &&
|
|
27
|
-
modelShape(oldRoom.model) !== modelShape(newRoom.model);
|
|
28
|
-
const selectionChanged = oldRoom !== undefined &&
|
|
29
|
-
newRoom !== undefined &&
|
|
30
|
-
modelShape(oldRoom.selectionModel) !== modelShape(newRoom.selectionModel);
|
|
31
|
-
const reclassified = oldRoom !== undefined && newRoom !== undefined && !sameMembership(oldRoom, newRoom);
|
|
32
|
-
const paths = before === null || after === null || collectionChanged || selectionChanged || reclassified
|
|
33
|
-
? new Set([
|
|
34
|
-
...Object.keys(before?.visible.documents ?? {}),
|
|
35
|
-
...Object.keys(after?.visible.documents ?? {}),
|
|
36
|
-
...Object.keys(before?.visible.binaries ?? {}),
|
|
37
|
-
...Object.keys(after?.visible.binaries ?? {}),
|
|
38
|
-
])
|
|
39
|
-
: changedPaths(before.visible, after.visible);
|
|
40
|
-
for (const path of paths) {
|
|
41
|
-
if (after?.visible.documents[path] === undefined &&
|
|
42
|
-
after?.visible.binaries[path] === undefined &&
|
|
43
|
-
before?.visible.documents[path] === undefined &&
|
|
44
|
-
before?.visible.binaries[path] === undefined)
|
|
45
|
-
continue;
|
|
46
|
-
const selected = newRoom?.typedSelection?.roots.some((root) => beneath(root, path)) ?? false;
|
|
47
|
-
const retyped = selected ? selectionChanged : collectionChanged;
|
|
48
|
-
if (before?.visible.documents[path] === after?.visible.documents[path] &&
|
|
49
|
-
sameBinary(before?.visible.binaries[path], after?.visible.binaries[path]) &&
|
|
50
|
-
before?.visible.revisions[path] === after?.visible.revisions[path] &&
|
|
51
|
-
before?.visible.fileIds[path] === after?.visible.fileIds[path] &&
|
|
52
|
-
sameChange(before?.visible.changes[path], after?.visible.changes[path]) &&
|
|
53
|
-
!retyped &&
|
|
54
|
-
!reclassified)
|
|
55
|
-
continue;
|
|
56
|
-
documents.push({
|
|
57
|
-
locator,
|
|
58
|
-
path,
|
|
59
|
-
get before() {
|
|
60
|
-
return rowsAt(locator, before, path);
|
|
61
|
-
},
|
|
62
|
-
get after() {
|
|
63
|
-
return rowsAt(locator, after, path);
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
}
|
|
1
|
+
export function changeSet(locator, changed = {}) {
|
|
2
|
+
const documents = changed.documents;
|
|
67
3
|
return {
|
|
68
|
-
documents
|
|
4
|
+
documents: documents === undefined
|
|
5
|
+
? []
|
|
6
|
+
: documents === null
|
|
7
|
+
? [{ locator, path: null }]
|
|
8
|
+
: documents.map((path) => ({ locator, path })),
|
|
69
9
|
drafts: (changed.drafts ?? []).map((path) => ({ locator, path })),
|
|
70
10
|
rooms: changed.room ? [locator] : [],
|
|
71
11
|
queues: changed.queue ? [locator] : [],
|
|
72
12
|
presentations: changed.presentation === undefined ? [] : [changed.presentation],
|
|
73
|
-
messages: [],
|
|
74
13
|
conversations: [],
|
|
75
14
|
};
|
|
76
15
|
}
|
|
77
|
-
export function
|
|
78
|
-
return {
|
|
79
|
-
documents: paths.map((path) => ({
|
|
80
|
-
locator,
|
|
81
|
-
path,
|
|
82
|
-
before: [],
|
|
83
|
-
get after() {
|
|
84
|
-
return rowsAt(locator, replica, path);
|
|
85
|
-
},
|
|
86
|
-
})),
|
|
87
|
-
drafts: [],
|
|
88
|
-
rooms: [],
|
|
89
|
-
queues: [],
|
|
90
|
-
presentations: [],
|
|
91
|
-
messages: [],
|
|
92
|
-
conversations: [],
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
export function conversationChangeSet(messages, conversations) {
|
|
16
|
+
export function conversationChangeSet(conversations) {
|
|
96
17
|
return {
|
|
97
18
|
documents: [],
|
|
98
19
|
drafts: [],
|
|
99
20
|
rooms: [],
|
|
100
21
|
queues: [],
|
|
101
22
|
presentations: [],
|
|
102
|
-
messages,
|
|
103
23
|
conversations: [...new Set(conversations)],
|
|
104
24
|
};
|
|
105
25
|
}
|
|
@@ -110,7 +30,9 @@ export function mergeChangeSets(sets) {
|
|
|
110
30
|
rooms: [...new Set(sets.flatMap((set) => set.rooms))],
|
|
111
31
|
queues: [...new Set(sets.flatMap((set) => set.queues))],
|
|
112
32
|
presentations: [...new Set(sets.flatMap((set) => set.presentations))],
|
|
113
|
-
messages: sets.flatMap((set) => set.messages),
|
|
114
33
|
conversations: [...new Set(sets.flatMap((set) => set.conversations))],
|
|
115
34
|
};
|
|
116
35
|
}
|
|
36
|
+
export function touches(set, locator, path) {
|
|
37
|
+
return set.documents.some((change) => change.locator === locator && (change.path === null || change.path === path));
|
|
38
|
+
}
|
package/dist/change.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BinaryFile, HeadChange } from './adapter.js';
|
|
1
2
|
export type Change = {
|
|
2
3
|
readonly kind: 'field';
|
|
3
4
|
readonly path: string;
|
|
@@ -29,7 +30,6 @@ export type Change = {
|
|
|
29
30
|
readonly kind: 'binary';
|
|
30
31
|
readonly path: string;
|
|
31
32
|
readonly localId: string;
|
|
32
|
-
readonly blob: Blob;
|
|
33
33
|
readonly byteLength: number;
|
|
34
34
|
readonly mediaType: string;
|
|
35
35
|
readonly sha256: string;
|
|
@@ -40,6 +40,32 @@ export type Change = {
|
|
|
40
40
|
} | {
|
|
41
41
|
readonly kind: 'remove';
|
|
42
42
|
readonly path: string;
|
|
43
|
+
} | (Arriving & {
|
|
44
|
+
readonly content: string;
|
|
45
|
+
}) | (Arriving & {
|
|
46
|
+
readonly binary: BinaryFile;
|
|
47
|
+
});
|
|
48
|
+
type Arriving = {
|
|
49
|
+
readonly kind: 'arrival';
|
|
50
|
+
readonly path: string;
|
|
51
|
+
readonly revision?: string;
|
|
52
|
+
readonly fileId?: string;
|
|
53
|
+
readonly change?: HeadChange;
|
|
54
|
+
};
|
|
55
|
+
export type RoomMove = {
|
|
56
|
+
readonly source: {
|
|
57
|
+
readonly room: string;
|
|
58
|
+
readonly baseRoomVersion: string;
|
|
59
|
+
};
|
|
60
|
+
readonly destination: {
|
|
61
|
+
readonly room: string;
|
|
62
|
+
readonly baseRoomVersion: string;
|
|
63
|
+
readonly handle: string;
|
|
64
|
+
};
|
|
65
|
+
readonly moves: readonly {
|
|
66
|
+
readonly path: string;
|
|
67
|
+
readonly to: string;
|
|
68
|
+
}[];
|
|
43
69
|
};
|
|
44
70
|
export type Precondition = {
|
|
45
71
|
readonly kind: 'field';
|
|
@@ -81,9 +107,13 @@ export type ChangeBatch = {
|
|
|
81
107
|
readonly changes: readonly Change[];
|
|
82
108
|
readonly preconditions: readonly Precondition[];
|
|
83
109
|
readonly writtenBy?: WrittenBy;
|
|
110
|
+
readonly between?: RoomMove;
|
|
84
111
|
};
|
|
85
112
|
export declare function immutable(batch: ChangeBatch): ChangeBatch;
|
|
113
|
+
export declare function partnerOf(batch: ChangeBatch, locator: string): string | null;
|
|
114
|
+
export declare function leaving(batch: ChangeBatch, locator: string): boolean;
|
|
86
115
|
export declare function landing(changes: readonly Change[], index: number, path: string): string | null;
|
|
87
116
|
export declare function departure(changes: readonly Change[], index: number): string;
|
|
88
117
|
export declare function queuedFile(batch: ChangeBatch, path: string, localId: string): number;
|
|
118
|
+
export {};
|
|
89
119
|
//# sourceMappingURL=change.d.ts.map
|
package/dist/change.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change.d.ts","sourceRoot":"","sources":["../src/change.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GACd;IACE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAA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