@agentshouse/mdruntime 0.1.0-c7354b18eab89 → 0.1.0-c75a43bf2460f
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 +72 -59
- package/README.md +9 -8
- package/dist/adapter.d.ts +31 -26
- 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 +24 -6
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +164 -110
- 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 +6 -16
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +11 -90
- package/dist/change.d.ts +0 -1
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +1 -1
- package/dist/chat/input.d.ts.map +1 -1
- package/dist/chat/input.js +9 -16
- package/dist/chat/list.d.ts.map +1 -1
- package/dist/chat/list.js +1 -1
- package/dist/chat/markdown.d.ts +1 -2
- package/dist/chat/markdown.d.ts.map +1 -1
- package/dist/chat/markdown.js +2 -19
- package/dist/chat/message.d.ts.map +1 -1
- package/dist/chat/message.js +43 -10
- package/dist/chat/messages.d.ts +6 -1
- package/dist/chat/messages.d.ts.map +1 -1
- package/dist/chat/messages.js +24 -12
- package/dist/chat/overlay.d.ts.map +1 -1
- package/dist/chat/overlay.js +1 -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/provider.d.ts +5 -1
- package/dist/chat/provider.d.ts.map +1 -1
- package/dist/chat/provider.js +69 -77
- package/dist/chat/ready.d.ts +2 -1
- package/dist/chat/ready.d.ts.map +1 -1
- package/dist/chat/ready.js +2 -2
- 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/style.d.ts.map +1 -1
- package/dist/chat/style.js +2 -0
- package/dist/client.d.ts +4 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +27 -2
- package/dist/collection.d.ts +5 -19
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +22 -360
- 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 +11 -8
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1728 -904
- package/dist/conversation.d.ts +4 -3
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +79 -62
- 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 -24
- 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 +4 -4
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +14 -8
- 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 +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -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 +1 -0
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +13 -14
- package/dist/messages.d.ts +28 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +90 -0
- 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 +12 -0
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +84 -0
- 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 +9 -4
- package/dist/outcome.d.ts.map +1 -1
- package/dist/overlay.d.ts +0 -3
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +2 -152
- package/dist/query.d.ts +4 -1
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +12 -1
- package/dist/reach.d.ts +0 -2
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +45 -58
- package/dist/readiness.d.ts +19 -9
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +2 -2
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +4 -2
- package/dist/refresh.d.ts +11 -13
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +113 -70
- package/dist/replica.d.ts +57 -38
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +273 -209
- package/dist/room-draft.d.ts +1 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +5 -6
- package/dist/rows.d.ts +29 -31
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +113 -69
- package/dist/save.d.ts +9 -10
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +61 -59
- package/dist/search.d.ts +11 -43
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +0 -264
- package/dist/shared.d.ts +0 -3
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +1 -31
- package/dist/store.d.ts +86 -93
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +313 -726
- 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 +344 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +580 -0
- package/dist/turn.d.ts +1 -1
- package/dist/turn.d.ts.map +1 -1
- package/dist/turn.js +28 -20
- 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 +2 -1
- package/dist/windows.d.ts.map +1 -1
- package/dist/windows.js +30 -25
- package/dist/wire.d.ts +9 -1
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +3 -1
- package/dist/words.d.ts +19 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.js +150 -0
- package/package.json +10 -4
- package/dist/read-side.d.ts +0 -27
- package/dist/read-side.d.ts.map +0 -1
- package/dist/read-side.js +0 -1179
package/dist/bootstrap.js
CHANGED
|
@@ -1,130 +1,184 @@
|
|
|
1
1
|
import { transferIdentity } from './identity.js';
|
|
2
2
|
import { advancement } from './refresh.js';
|
|
3
|
-
import { acceptedBinaries } from './overlay.js';
|
|
4
|
-
import { readStaged } from './replica.js';
|
|
5
3
|
import { unconfirmed } from './transfer.js';
|
|
6
|
-
|
|
7
|
-
import { ROW_WEIGHT, stepped } from './turn.js';
|
|
4
|
+
const NOTHING_DONE = { parts: 0, bytes: 0 };
|
|
8
5
|
const RESUMABLE = new Set([
|
|
9
6
|
'transport-uncertainty',
|
|
10
7
|
'retryable-refusal',
|
|
11
8
|
'unconfirmed',
|
|
12
9
|
]);
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
for (const [path] of
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
function pageOf(page) {
|
|
11
|
+
const entries = [];
|
|
12
|
+
for (const [path, content] of Object.entries(page.documents)) {
|
|
13
|
+
entries.push({
|
|
14
|
+
path,
|
|
15
|
+
content,
|
|
16
|
+
binary: null,
|
|
17
|
+
revision: page.revisions[path] ?? null,
|
|
18
|
+
fileId: page.fileIds?.[path] ?? null,
|
|
19
|
+
change: page.changes[path] ?? null,
|
|
20
|
+
written: page.roomVersion,
|
|
21
|
+
});
|
|
23
22
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
function* gathering(into, layer) {
|
|
35
|
-
if (layer === undefined)
|
|
36
|
-
return;
|
|
37
|
-
for (const name of LAYER) {
|
|
38
|
-
for (const [path, value] of entriesIn(layer[name])) {
|
|
39
|
-
into[name].set(path, value);
|
|
40
|
-
yield ROW_WEIGHT;
|
|
41
|
-
}
|
|
23
|
+
for (const [path, file] of Object.entries(page.binaryFiles)) {
|
|
24
|
+
entries.push({
|
|
25
|
+
path,
|
|
26
|
+
content: null,
|
|
27
|
+
binary: { state: 'accepted', ...file },
|
|
28
|
+
revision: page.revisions[path] ?? null,
|
|
29
|
+
fileId: page.fileIds?.[path] ?? null,
|
|
30
|
+
change: page.changes[path] ?? null,
|
|
31
|
+
written: null,
|
|
32
|
+
});
|
|
42
33
|
}
|
|
34
|
+
return { entries, folders: page.folders ?? [] };
|
|
43
35
|
}
|
|
44
|
-
function
|
|
36
|
+
function heldTogether(first, second) {
|
|
37
|
+
if (first === null)
|
|
38
|
+
return second;
|
|
45
39
|
return {
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
async files(after, limit) {
|
|
41
|
+
const [left, right] = await Promise.all([
|
|
42
|
+
first.files(after, limit),
|
|
43
|
+
second.files(after, limit),
|
|
44
|
+
]);
|
|
45
|
+
const merged = new Map([...left, ...right].map((file) => [file.path, file]));
|
|
46
|
+
return [...merged.values()]
|
|
47
|
+
.sort((one, other) => (one.path < other.path ? -1 : one.path > other.path ? 1 : 0))
|
|
48
|
+
.slice(0, limit);
|
|
49
|
+
},
|
|
50
|
+
async contents(paths) {
|
|
51
|
+
const [left, right] = await Promise.all([first.contents(paths), second.contents(paths)]);
|
|
52
|
+
return new Map([...left, ...right]);
|
|
53
|
+
},
|
|
48
54
|
};
|
|
49
55
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
const NO_CONTENT = {
|
|
57
|
+
files: () => Promise.resolve([]),
|
|
58
|
+
contents: () => Promise.resolve(new Map()),
|
|
59
|
+
};
|
|
60
|
+
export async function bootstrapRoom(adapter, authorization, room, held, remodel, continuing, staging, reuse) {
|
|
61
|
+
const kept = staging.held(room.locator);
|
|
62
|
+
const resumed = kept !== null && kept.selection === room.replica.selection ? kept : null;
|
|
63
|
+
if (kept !== null && resumed === null)
|
|
64
|
+
await staging.abandon(room.locator);
|
|
65
|
+
const first = await bundle(adapter, authorization, room, held, remodel, continuing, staging, resumed, reuse);
|
|
66
|
+
if (first.kind !== 'expired')
|
|
67
|
+
return first;
|
|
68
|
+
await staging.setAside(room.locator);
|
|
69
|
+
try {
|
|
70
|
+
const replacement = await bundle(adapter, authorization, room, held, remodel, continuing, staging, null, heldTogether(reuse, first.held));
|
|
71
|
+
if (replacement.kind !== 'expired')
|
|
72
|
+
return replacement;
|
|
73
|
+
await staging.abandon(room.locator);
|
|
74
|
+
return unconfirmed;
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
if (first.key !== null)
|
|
78
|
+
await staging.release(first.key);
|
|
56
79
|
}
|
|
57
|
-
await staging.abandon(room.locator);
|
|
58
|
-
return null;
|
|
59
80
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return layer;
|
|
81
|
+
const RESUMED_LOOKUPS = 2;
|
|
82
|
+
function compositionFor(room, models) {
|
|
63
83
|
return {
|
|
64
|
-
|
|
65
|
-
|
|
84
|
+
model: models.collection,
|
|
85
|
+
selection: room.typedSelection === undefined
|
|
86
|
+
? null
|
|
87
|
+
: { roots: room.typedSelection.roots, model: models.selection },
|
|
66
88
|
};
|
|
67
89
|
}
|
|
68
|
-
export async function bootstrapRoom(adapter, authorization, room, held, remodel, continuing, staging, reuse) {
|
|
69
|
-
const first = await bundle(adapter, authorization, room, held, remodel, continuing, staging, await heldTransfer(staging, room), reuse);
|
|
70
|
-
if (first.kind !== 'expired')
|
|
71
|
-
return first;
|
|
72
|
-
await staging.abandon(room.locator);
|
|
73
|
-
const pool = await stepped(pooling(reuse, first.held));
|
|
74
|
-
const replacement = await bundle(adapter, authorization, room, held, remodel, continuing, staging, null, pool);
|
|
75
|
-
if (replacement.kind !== 'expired')
|
|
76
|
-
return replacement;
|
|
77
|
-
await staging.abandon(room.locator);
|
|
78
|
-
return unconfirmed;
|
|
79
|
-
}
|
|
80
90
|
async function bundle(adapter, authorization, room, held, remodel, continuing, staging, kept, pool) {
|
|
81
91
|
const locator = room.locator;
|
|
82
92
|
const selection = room.replica.selection;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
let transfer = kept?.record ?? null;
|
|
93
|
-
while (transfer === null || transfer.pageToken !== null) {
|
|
94
|
-
if (!continuing())
|
|
95
|
-
return unconfirmed;
|
|
93
|
+
let transfer = kept;
|
|
94
|
+
let lookups = kept === null ? 0 : RESUMED_LOOKUPS;
|
|
95
|
+
let ahead = null;
|
|
96
|
+
const arriving = staging.arriving(locator);
|
|
97
|
+
const asking = async (token) => {
|
|
98
|
+
const looked = token !== null && lookups > 0;
|
|
99
|
+
if (looked)
|
|
100
|
+
lookups -= 1;
|
|
101
|
+
const received = looked ? await staging.received(locator, token) : null;
|
|
96
102
|
const page = await adapter.bootstrap(authorization, {
|
|
97
103
|
locator,
|
|
98
104
|
selection,
|
|
99
|
-
...(
|
|
105
|
+
...(token === null
|
|
106
|
+
? {}
|
|
107
|
+
: { pageToken: token, arriving: (bytes) => arriving.at(token, bytes) }),
|
|
100
108
|
...(pool === null ? {} : { held: pool }),
|
|
109
|
+
...(received === null ? {} : { received }),
|
|
101
110
|
});
|
|
102
|
-
if (page.kind === '
|
|
103
|
-
|
|
111
|
+
if (token !== null && page.kind === 'bootstrap' && page.received !== undefined) {
|
|
112
|
+
await staging.keep(locator, token, page.received);
|
|
104
113
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
114
|
+
return page;
|
|
115
|
+
};
|
|
116
|
+
try {
|
|
117
|
+
while (transfer === null || transfer.writing !== null || transfer.pageToken !== null) {
|
|
118
|
+
if (!continuing())
|
|
119
|
+
return unconfirmed;
|
|
120
|
+
const writing = transfer?.writing ?? null;
|
|
121
|
+
const asked = writing === null ? (transfer?.pageToken ?? null) : writing.token;
|
|
122
|
+
const fetched = ahead !== null && ahead.token === asked ? ahead : null;
|
|
123
|
+
if (ahead !== fetched)
|
|
124
|
+
ahead?.release();
|
|
125
|
+
ahead = null;
|
|
126
|
+
const turned = fetched?.release ??
|
|
127
|
+
(await staging.turn(locator, transfer === null ? 'listing' : 'downloading'));
|
|
128
|
+
try {
|
|
129
|
+
if (!continuing())
|
|
130
|
+
return unconfirmed;
|
|
131
|
+
const page = await (fetched?.page ?? asking(asked));
|
|
132
|
+
if (page.kind === 'beyond-horizon') {
|
|
133
|
+
const key = transfer?.key ?? null;
|
|
134
|
+
return { kind: 'expired', held: key === null ? NO_CONTENT : staging.content(key), key };
|
|
135
|
+
}
|
|
136
|
+
if (page.kind !== 'bootstrap') {
|
|
137
|
+
if (!RESUMABLE.has(page.kind))
|
|
138
|
+
await staging.abandon(locator);
|
|
139
|
+
return page;
|
|
140
|
+
}
|
|
141
|
+
const later = page.pageToken;
|
|
142
|
+
const spare = later === undefined || !continuing() ? null : staging.spare();
|
|
143
|
+
if (later !== undefined && spare !== null) {
|
|
144
|
+
const answer = asking(later);
|
|
145
|
+
answer.catch(() => { });
|
|
146
|
+
ahead = { token: later, page: answer, release: spare };
|
|
147
|
+
}
|
|
148
|
+
const next = {
|
|
149
|
+
locator,
|
|
150
|
+
transfer: transfer?.transfer ?? transferIdentity(),
|
|
151
|
+
selection,
|
|
152
|
+
from: transfer !== null && adapter.reached(locator, page.roomVersion, transfer.from)
|
|
153
|
+
? transfer.from
|
|
154
|
+
: page.roomVersion,
|
|
155
|
+
last: transfer !== null && !adapter.reached(locator, page.roomVersion, transfer.last)
|
|
156
|
+
? transfer.last
|
|
157
|
+
: page.roomVersion,
|
|
158
|
+
pageToken: later ?? null,
|
|
159
|
+
writing: { token: asked, written: asked === null ? 0 : (writing?.written ?? 0) },
|
|
160
|
+
inventory: page.inventory ?? transfer?.inventory ?? null,
|
|
161
|
+
done: transfer?.done ?? NOTHING_DONE,
|
|
162
|
+
models: remodel(page.models, transfer?.models ?? held),
|
|
163
|
+
key: transfer?.key ?? null,
|
|
164
|
+
};
|
|
165
|
+
const staged = await staging.stage(next, pageOf(page), compositionFor(room, next.models), page.received ?? null);
|
|
166
|
+
if (staged === null)
|
|
167
|
+
return unconfirmed;
|
|
168
|
+
transfer = staged;
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
turned();
|
|
172
|
+
}
|
|
109
173
|
}
|
|
110
|
-
transfer = {
|
|
111
|
-
locator,
|
|
112
|
-
transfer: transfer?.transfer ?? transferIdentity(),
|
|
113
|
-
selection,
|
|
114
|
-
from: transfer !== null && adapter.reached(locator, page.roomVersion, transfer.from)
|
|
115
|
-
? transfer.from
|
|
116
|
-
: page.roomVersion,
|
|
117
|
-
last: transfer !== null && !adapter.reached(locator, page.roomVersion, transfer.last)
|
|
118
|
-
? transfer.last
|
|
119
|
-
: page.roomVersion,
|
|
120
|
-
pageToken: page.pageToken ?? null,
|
|
121
|
-
models: remodel(page.models, transfer?.models ?? held),
|
|
122
|
-
};
|
|
123
|
-
const staged = await stepped(pageLayer(page));
|
|
124
|
-
if (!(await staging.stage(transfer, staged)))
|
|
125
|
-
return unconfirmed;
|
|
126
|
-
await stepped(gathering(gathered, staged));
|
|
127
174
|
}
|
|
175
|
+
finally {
|
|
176
|
+
ahead?.release();
|
|
177
|
+
arriving.end();
|
|
178
|
+
}
|
|
179
|
+
await staging.turn(locator, 'replaying');
|
|
180
|
+
if (!continuing())
|
|
181
|
+
return unconfirmed;
|
|
128
182
|
const record = {
|
|
129
183
|
locator,
|
|
130
184
|
name: room.name,
|
|
@@ -137,26 +191,26 @@ async function bundle(adapter, authorization, room, held, remodel, continuing, s
|
|
|
137
191
|
providerOwnedPaths: room.providerOwnedPaths,
|
|
138
192
|
roomVersion: transfer.from,
|
|
139
193
|
transfer: transfer.transfer,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
revisions: await stepped(patching({}, gathered.revisions)),
|
|
143
|
-
fileIds: await stepped(patching({}, gathered.fileIds)),
|
|
144
|
-
changes: await stepped(patching({}, gathered.changes)),
|
|
145
|
-
written: await stepped(patching({}, gathered.written)),
|
|
194
|
+
inventory: transfer.inventory,
|
|
195
|
+
key: transfer.key,
|
|
146
196
|
};
|
|
147
|
-
const
|
|
197
|
+
const due = [room.roomVersion, ...staging.announced(locator)];
|
|
198
|
+
const last = transfer.last;
|
|
199
|
+
const reconciled = last === transfer.from && due.every((version) => adapter.reached(locator, last, version))
|
|
148
200
|
? { kind: 'still-current' }
|
|
149
|
-
: await advancement(adapter, authorization, record, remodel, continuing);
|
|
201
|
+
: await advancement(adapter, authorization, record, remodel, continuing, await staging.refreshing(locator, record.key));
|
|
150
202
|
if (reconciled.kind === 'advanced' || reconciled.kind === 'still-current') {
|
|
151
|
-
const
|
|
152
|
-
|
|
203
|
+
const refreshed = reconciled.kind === 'advanced';
|
|
204
|
+
const result = refreshed ? reconciled.record : record;
|
|
205
|
+
const refused = await staging.validate(result, refreshed ? 'refreshed' : 'confirmed');
|
|
206
|
+
if (refused !== null) {
|
|
153
207
|
await staging.abandon(locator);
|
|
154
|
-
return
|
|
208
|
+
return refused;
|
|
155
209
|
}
|
|
156
|
-
return { kind: 'staged',
|
|
210
|
+
return { kind: 'staged', record: result, refreshed };
|
|
157
211
|
}
|
|
158
212
|
if (reconciled.kind === 'beyond-horizon') {
|
|
159
|
-
return { kind: 'expired', held:
|
|
213
|
+
return { kind: 'expired', held: staging.content(record.key), key: record.key };
|
|
160
214
|
}
|
|
161
215
|
if (!RESUMABLE.has(reconciled.kind))
|
|
162
216
|
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,19 +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
22
|
};
|
|
32
|
-
export declare function changeSet(locator: string,
|
|
33
|
-
export declare function
|
|
34
|
-
export declare function entering(locator: string, replica: Replica, paths: readonly string[]): ChangeSet;
|
|
35
|
-
export declare function conversationChangeSet(messages: readonly MessageChange[], conversations: readonly string[]): ChangeSet;
|
|
23
|
+
export declare function changeSet(locator: string, changed?: Changed): ChangeSet;
|
|
24
|
+
export declare function conversationChangeSet(conversations: readonly string[]): ChangeSet;
|
|
36
25
|
export declare function mergeChangeSets(sets: readonly ChangeSet[]): ChangeSet;
|
|
26
|
+
export declare function touches(set: ChangeSet, locator: string, path: string): boolean;
|
|
37
27
|
export {};
|
|
38
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,106 +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
|
-
import { keysIn } from './shared.js';
|
|
8
|
-
import { finished, ROW_WEIGHT } from './turn.js';
|
|
9
|
-
function rowsAt(locator, replica, path) {
|
|
10
|
-
if (replica === null)
|
|
11
|
-
return [];
|
|
12
|
-
const visible = replica.visible;
|
|
13
|
-
const document = markdownPath(path) ? passingFrontmatter(visible.collection, path) : null;
|
|
14
|
-
const held = visible.documents[path] !== undefined && document !== undefined;
|
|
15
|
-
const binary = visible.binaries[path];
|
|
16
|
-
if (!held && binary === undefined)
|
|
17
|
-
return [];
|
|
18
|
-
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]));
|
|
19
|
-
}
|
|
20
|
-
function modelShape(model) {
|
|
21
|
-
return model.status === 'unavailable' ? 'unavailable' : JSON.stringify(model.types);
|
|
22
|
-
}
|
|
23
|
-
export function changeSet(locator, before, after, changed = {}) {
|
|
24
|
-
return finished(changing(locator, before, after, changed));
|
|
25
|
-
}
|
|
26
|
-
export function* changing(locator, before, after, changed = {}) {
|
|
27
|
-
const documents = [];
|
|
28
|
-
const oldRoom = before?.confirmed.record;
|
|
29
|
-
const newRoom = after?.confirmed.record;
|
|
30
|
-
const collectionChanged = oldRoom !== undefined &&
|
|
31
|
-
newRoom !== undefined &&
|
|
32
|
-
modelShape(oldRoom.model) !== modelShape(newRoom.model);
|
|
33
|
-
const selectionChanged = oldRoom !== undefined &&
|
|
34
|
-
newRoom !== undefined &&
|
|
35
|
-
modelShape(oldRoom.selectionModel) !== modelShape(newRoom.selectionModel);
|
|
36
|
-
const reclassified = oldRoom !== undefined && newRoom !== undefined && !sameMembership(oldRoom, newRoom);
|
|
37
|
-
const paths = before === null || after === null || collectionChanged || selectionChanged || reclassified
|
|
38
|
-
? yield* keysIn(...[before, after].flatMap((replica) => replica === null ? [] : [replica.visible.documents, replica.visible.binaries]))
|
|
39
|
-
: yield* changedPaths(before.visible, after.visible);
|
|
40
|
-
for (const path of paths) {
|
|
41
|
-
yield ROW_WEIGHT;
|
|
42
|
-
if (after?.visible.documents[path] === undefined &&
|
|
43
|
-
after?.visible.binaries[path] === undefined &&
|
|
44
|
-
before?.visible.documents[path] === undefined &&
|
|
45
|
-
before?.visible.binaries[path] === undefined)
|
|
46
|
-
continue;
|
|
47
|
-
const selected = newRoom?.typedSelection?.roots.some((root) => beneath(root, path)) ?? false;
|
|
48
|
-
const retyped = selected ? selectionChanged : collectionChanged;
|
|
49
|
-
if (before?.visible.documents[path] === after?.visible.documents[path] &&
|
|
50
|
-
sameBinary(before?.visible.binaries[path], after?.visible.binaries[path]) &&
|
|
51
|
-
before?.visible.revisions[path] === after?.visible.revisions[path] &&
|
|
52
|
-
before?.visible.fileIds[path] === after?.visible.fileIds[path] &&
|
|
53
|
-
sameChange(before?.visible.changes[path], after?.visible.changes[path]) &&
|
|
54
|
-
!retyped &&
|
|
55
|
-
!reclassified)
|
|
56
|
-
continue;
|
|
57
|
-
documents.push({
|
|
58
|
-
locator,
|
|
59
|
-
path,
|
|
60
|
-
get before() {
|
|
61
|
-
return rowsAt(locator, before, path);
|
|
62
|
-
},
|
|
63
|
-
get after() {
|
|
64
|
-
return rowsAt(locator, after, path);
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
}
|
|
1
|
+
export function changeSet(locator, changed = {}) {
|
|
2
|
+
const documents = changed.documents;
|
|
68
3
|
return {
|
|
69
|
-
documents
|
|
4
|
+
documents: documents === undefined
|
|
5
|
+
? []
|
|
6
|
+
: documents === null
|
|
7
|
+
? [{ locator, path: null }]
|
|
8
|
+
: documents.map((path) => ({ locator, path })),
|
|
70
9
|
drafts: (changed.drafts ?? []).map((path) => ({ locator, path })),
|
|
71
10
|
rooms: changed.room ? [locator] : [],
|
|
72
11
|
queues: changed.queue ? [locator] : [],
|
|
73
12
|
presentations: changed.presentation === undefined ? [] : [changed.presentation],
|
|
74
|
-
messages: [],
|
|
75
|
-
conversations: [],
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
export function entering(locator, replica, paths) {
|
|
79
|
-
return {
|
|
80
|
-
documents: paths.map((path) => ({
|
|
81
|
-
locator,
|
|
82
|
-
path,
|
|
83
|
-
before: [],
|
|
84
|
-
get after() {
|
|
85
|
-
return rowsAt(locator, replica, path);
|
|
86
|
-
},
|
|
87
|
-
})),
|
|
88
|
-
drafts: [],
|
|
89
|
-
rooms: [],
|
|
90
|
-
queues: [],
|
|
91
|
-
presentations: [],
|
|
92
|
-
messages: [],
|
|
93
13
|
conversations: [],
|
|
94
14
|
};
|
|
95
15
|
}
|
|
96
|
-
export function conversationChangeSet(
|
|
16
|
+
export function conversationChangeSet(conversations) {
|
|
97
17
|
return {
|
|
98
18
|
documents: [],
|
|
99
19
|
drafts: [],
|
|
100
20
|
rooms: [],
|
|
101
21
|
queues: [],
|
|
102
22
|
presentations: [],
|
|
103
|
-
messages,
|
|
104
23
|
conversations: [...new Set(conversations)],
|
|
105
24
|
};
|
|
106
25
|
}
|
|
@@ -111,7 +30,9 @@ export function mergeChangeSets(sets) {
|
|
|
111
30
|
rooms: [...new Set(sets.flatMap((set) => set.rooms))],
|
|
112
31
|
queues: [...new Set(sets.flatMap((set) => set.queues))],
|
|
113
32
|
presentations: [...new Set(sets.flatMap((set) => set.presentations))],
|
|
114
|
-
messages: sets.flatMap((set) => set.messages),
|
|
115
33
|
conversations: [...new Set(sets.flatMap((set) => set.conversations))],
|
|
116
34
|
};
|
|
117
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
package/dist/change.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change.d.ts","sourceRoot":"","sources":["../src/change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3D,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,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC5E;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,I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,KAAK,EAAE,WAAW,GAAG,WAAW,CAEzD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI5E;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ9F;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM3E;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAOpF"}
|
package/dist/change.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function frozen(value) {
|
|
2
2
|
if (Array.isArray(value))
|
|
3
3
|
return Object.freeze(value.map((item) => frozen(item)));
|
|
4
|
-
if (value === null || typeof value !== 'object'
|
|
4
|
+
if (value === null || typeof value !== 'object')
|
|
5
5
|
return value;
|
|
6
6
|
const copy = {};
|
|
7
7
|
for (const [name, item] of Object.entries(value))
|
package/dist/chat/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/chat/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/chat/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBlG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAsD,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAMlG,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,SAAS,CAAC;IACnD,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,SAAS,CAAC;CACzD,CAAC;AAgFF,wBAAgB,SAAS,CAAC,EACxB,aAAa,EACb,IAAY,EACZ,SAAiB,EACjB,QAAQ,GACT,EAAE,cAAc,GAAG,YAAY,CA4K/B"}
|