@agentshouse/mdruntime 0.1.0-c1db74d14e5fa → 0.1.0-c24132a516ded
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 +246 -242
- package/README.md +9 -8
- package/dist/adapter.d.ts +53 -23
- 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 +2 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +62 -27
- package/dist/change-set.d.ts +5 -2
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +10 -8
- package/dist/change.d.ts +31 -1
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +10 -1
- package/dist/chat/earlier.d.ts +10 -0
- package/dist/chat/earlier.d.ts.map +1 -0
- package/dist/chat/earlier.js +54 -0
- package/dist/chat/house.d.ts +25 -0
- package/dist/chat/house.d.ts.map +1 -0
- package/dist/chat/house.js +38 -0
- package/dist/chat/input.d.ts +3 -1
- package/dist/chat/input.d.ts.map +1 -1
- package/dist/chat/input.js +11 -18
- package/dist/chat/kit.d.ts +2 -1
- package/dist/chat/kit.d.ts.map +1 -1
- package/dist/chat/kit.js +3 -3
- package/dist/chat/list.d.ts +3 -1
- package/dist/chat/list.d.ts.map +1 -1
- package/dist/chat/list.js +47 -6
- package/dist/chat/markdown.d.ts +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 +55 -10
- package/dist/chat/messages.d.ts +9 -1
- package/dist/chat/messages.d.ts.map +1 -1
- package/dist/chat/messages.js +67 -28
- 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 +7 -2
- package/dist/chat/provider.d.ts.map +1 -1
- package/dist/chat/provider.js +104 -105
- package/dist/chat/question.d.ts +1 -1
- package/dist/chat/question.d.ts.map +1 -1
- package/dist/chat/question.js +7 -18
- package/dist/chat/ready.d.ts +5 -1
- package/dist/chat/ready.d.ts.map +1 -1
- package/dist/chat/ready.js +7 -5
- package/dist/chat/room-file.d.ts +8 -0
- package/dist/chat/room-file.d.ts.map +1 -0
- package/dist/chat/room-file.js +67 -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 +5 -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 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +19 -5
- package/dist/collection.d.ts +6 -5
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +166 -85
- package/dist/connection.d.ts +17 -5
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1212 -368
- package/dist/conversation.d.ts +15 -2
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +278 -74
- package/dist/digest.d.ts +2 -0
- package/dist/digest.d.ts.map +1 -0
- package/dist/digest.js +100 -0
- package/dist/durability.d.ts +1 -1
- package/dist/entry.d.ts +2 -1
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +5 -4
- 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 +9 -7
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +67 -14
- package/dist/index.d.ts +11 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/memory.d.ts +7 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +33 -16
- package/dist/model.d.ts +3 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +1 -1
- package/dist/name.d.ts +4 -0
- package/dist/name.d.ts.map +1 -0
- package/dist/name.js +122 -0
- package/dist/observation.d.ts +2 -0
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +9 -3
- package/dist/outcome.d.ts +27 -2
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +25 -0
- package/dist/overlay.d.ts +6 -5
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +223 -134
- package/dist/query.d.ts +30 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +37 -7
- package/dist/reach.d.ts +6 -3
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +156 -38
- package/dist/react.d.ts +3 -3
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +7 -17
- package/dist/read-side.d.ts +6 -4
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +755 -215
- 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 +4 -4
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +41 -16
- package/dist/replica.d.ts +12 -7
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +133 -74
- package/dist/room-draft.d.ts +16 -2
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +32 -25
- package/dist/rows.d.ts +3 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +8 -1
- package/dist/save.d.ts +47 -9
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +501 -165
- package/dist/search.d.ts +29 -8
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +150 -17
- 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 +9 -1
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +134 -41
- package/dist/store.d.ts +30 -17
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +489 -430
- package/dist/tables.d.ts +181 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +309 -0
- package/dist/turn.d.ts +5 -3
- package/dist/turn.d.ts.map +1 -1
- package/dist/turn.js +35 -13
- package/dist/windows.d.ts +21 -0
- package/dist/windows.d.ts.map +1 -0
- package/dist/windows.js +84 -0
- package/dist/wire.d.ts +159 -33
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +53 -32
- package/package.json +6 -2
- package/dist/acquisition.d.ts +0 -14
- package/dist/acquisition.d.ts.map +0 -1
- package/dist/acquisition.js +0 -24
package/dist/collection.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { checkDocument, parseFrontmatter, references, sectionReferences, target, parse, resolves,
|
|
1
|
+
import { checkDocument, parseFrontmatter, references, sectionReferences, target, parse, resolves, validating, VERSION, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { beneath, normalize } from './paths.js';
|
|
3
3
|
import { sameTyping } from './model.js';
|
|
4
|
-
import {
|
|
5
|
-
import { inUnits, ROW_WEIGHT } from './turn.js';
|
|
4
|
+
import { differences, entriesIn, keysIn, patched, patching, shared, sizeOf, sortedKeys, } from './shared.js';
|
|
5
|
+
import { after, finished, inUnits, ROW_WEIGHT } from './turn.js';
|
|
6
6
|
export const MD_MODEL = { identity: '@agentshouse/mdmodel', version: VERSION };
|
|
7
|
+
const REFERENCE_WEIGHT = 4 * ROW_WEIGHT;
|
|
7
8
|
const NO_TYPES = { types: {} };
|
|
8
9
|
function selected(composition, path) {
|
|
9
10
|
return (composition.selection !== null &&
|
|
@@ -15,14 +16,14 @@ export function governing(composition, path) {
|
|
|
15
16
|
: composition.model;
|
|
16
17
|
}
|
|
17
18
|
const parsedIn = new WeakMap();
|
|
18
|
-
function carried(previous, text) {
|
|
19
|
+
function* carried(previous, text) {
|
|
19
20
|
const held = parsedIn.get(previous);
|
|
20
21
|
if (held === undefined)
|
|
21
22
|
return shared({});
|
|
22
|
-
const kept =
|
|
23
|
+
const kept = yield* patching(held.base, held.added);
|
|
23
24
|
held.base = kept;
|
|
24
25
|
held.added = new Map();
|
|
25
|
-
return
|
|
26
|
+
return yield* patching(kept, [], yield* differences(previous.text, text));
|
|
26
27
|
}
|
|
27
28
|
function cachedIn(collection, path) {
|
|
28
29
|
const held = parsedIn.get(collection);
|
|
@@ -33,8 +34,11 @@ function cachedIn(collection, path) {
|
|
|
33
34
|
return Object.hasOwn(held.base, path) ? held.base[path] : undefined;
|
|
34
35
|
}
|
|
35
36
|
export function collectionOf(text, composition, previous) {
|
|
37
|
+
return finished(collecting(text, composition, previous));
|
|
38
|
+
}
|
|
39
|
+
export function* collecting(text, composition, previous) {
|
|
36
40
|
const parsed = {
|
|
37
|
-
base: previous === undefined ? shared({}) : carried(previous, text),
|
|
41
|
+
base: previous === undefined ? shared({}) : yield* carried(previous, text),
|
|
38
42
|
added: new Map(),
|
|
39
43
|
};
|
|
40
44
|
const collection = {
|
|
@@ -65,8 +69,8 @@ export function passingFrontmatter(collection, path) {
|
|
|
65
69
|
const read = parseFrontmatter(content, path);
|
|
66
70
|
return read.ok ? read.frontmatter : undefined;
|
|
67
71
|
}
|
|
68
|
-
|
|
69
|
-
for (const path of
|
|
72
|
+
function* readIn(collection, paths) {
|
|
73
|
+
for (const path of paths) {
|
|
70
74
|
const held = cachedIn(collection, path);
|
|
71
75
|
if (held === null)
|
|
72
76
|
continue;
|
|
@@ -79,51 +83,66 @@ export function* documentsOf(collection) {
|
|
|
79
83
|
yield [path, read.document];
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
|
-
export function
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
export function* documentsOf(collection) {
|
|
87
|
+
return readIn(collection, yield* sortedKeys(collection.text));
|
|
88
|
+
}
|
|
89
|
+
export function* unreadable(text, previous) {
|
|
90
|
+
const paths = previous === undefined ? yield* keysIn(text) : yield* differences(previous, text);
|
|
91
|
+
let least = null;
|
|
92
|
+
for (const path of paths) {
|
|
93
|
+
const content = text[path];
|
|
94
|
+
if (content === undefined)
|
|
95
|
+
continue;
|
|
96
|
+
const read = parse(content, path);
|
|
97
|
+
if (!read.ok && (least === null || path < least.path)) {
|
|
98
|
+
least = { path, refused: { kind: 'refused', refusal: read.refusal } };
|
|
99
|
+
}
|
|
100
|
+
yield ROW_WEIGHT + content.length;
|
|
90
101
|
}
|
|
91
|
-
return null;
|
|
102
|
+
return least?.refused ?? null;
|
|
92
103
|
}
|
|
93
104
|
export function validRoot(root) {
|
|
94
105
|
return typeof root === 'string' && normalize(root) === root;
|
|
95
106
|
}
|
|
96
|
-
function validateAgainst(documents, binaryTargets, model) {
|
|
107
|
+
function* validateAgainst(documents, binaryTargets, model) {
|
|
97
108
|
if (model.status === 'unavailable') {
|
|
98
|
-
const
|
|
109
|
+
for (const [path, content] of documents) {
|
|
99
110
|
const parsed = parse(content);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
if (parsed.ok && parsed.document.type !== undefined && parsed.document.type !== 'any')
|
|
112
|
+
return { verdict: 'refuse', rule: 'model-unavailable', file: path };
|
|
113
|
+
yield ROW_WEIGHT + content.length;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const steps = validating(documents, { binaryTargets, anyRoom: true }, model.status === 'unavailable' ? NO_TYPES : { types: model.types });
|
|
117
|
+
for (let step = steps.next();; step = steps.next()) {
|
|
118
|
+
if (step.done === true)
|
|
119
|
+
return step.value;
|
|
120
|
+
const { path, resolved } = step.value;
|
|
121
|
+
yield ROW_WEIGHT + documents.get(path).length + REFERENCE_WEIGHT * resolved;
|
|
104
122
|
}
|
|
105
|
-
return validate(documents, { binaryTargets }, model.status === 'unavailable' ? NO_TYPES : { types: model.types });
|
|
106
123
|
}
|
|
107
|
-
export function validateCollection(text, binaryTargets, composition) {
|
|
108
|
-
const collection =
|
|
109
|
-
const selection =
|
|
110
|
-
for (const [path, content] of
|
|
124
|
+
export function* validateCollection(text, binaryTargets, composition) {
|
|
125
|
+
const collection = new Map();
|
|
126
|
+
const selection = new Map();
|
|
127
|
+
for (const [path, content] of entriesIn(text)) {
|
|
111
128
|
if (selected(composition, path))
|
|
112
|
-
selection
|
|
129
|
+
selection.set(path, content);
|
|
113
130
|
else
|
|
114
|
-
collection
|
|
131
|
+
collection.set(path, content);
|
|
132
|
+
yield ROW_WEIGHT;
|
|
115
133
|
}
|
|
116
134
|
const verdicts = [
|
|
117
|
-
validateAgainst(collection, binaryTargets.filter((path) => !selected(composition, path)), composition.model),
|
|
135
|
+
yield* validateAgainst(collection, binaryTargets.filter((path) => !selected(composition, path)), composition.model),
|
|
118
136
|
];
|
|
119
137
|
if (composition.selection !== null) {
|
|
120
|
-
verdicts.push(validateAgainst(selection, binaryTargets.filter((path) => selected(composition, path)), composition.selection.model));
|
|
138
|
+
verdicts.push(yield* validateAgainst(selection, binaryTargets.filter((path) => selected(composition, path)), composition.selection.model));
|
|
121
139
|
}
|
|
122
140
|
const refusals = verdicts.filter((verdict) => verdict.verdict === 'refuse');
|
|
123
141
|
if (refusals.length === 0)
|
|
124
142
|
return verdicts[0];
|
|
125
143
|
return refusals.find((refusal) => refusal.rule !== 'model-unavailable') ?? refusals[0];
|
|
126
144
|
}
|
|
145
|
+
const NO_REFERRERS = shared({});
|
|
127
146
|
const referrersOf = new WeakMap();
|
|
128
147
|
function typing(left, right) {
|
|
129
148
|
return (sameTyping(left.model, right.model) &&
|
|
@@ -147,7 +166,10 @@ function modelOf(composition, path) {
|
|
|
147
166
|
return model.status === 'unavailable' ? null : { types: model.types };
|
|
148
167
|
}
|
|
149
168
|
function checked(path, content, composition) {
|
|
150
|
-
return checkDocument(path, content, modelOf(composition, path) ?? NO_TYPES);
|
|
169
|
+
return checkDocument(path, content, modelOf(composition, path) ?? NO_TYPES, { anyRoom: true });
|
|
170
|
+
}
|
|
171
|
+
function resolvedBy(check) {
|
|
172
|
+
return check.ok ? check.references.length : 0;
|
|
151
173
|
}
|
|
152
174
|
function targetsOf(check) {
|
|
153
175
|
if (!check.ok)
|
|
@@ -173,31 +195,80 @@ function referencedBy(path, content, composition) {
|
|
|
173
195
|
]),
|
|
174
196
|
];
|
|
175
197
|
}
|
|
176
|
-
function
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
198
|
+
function referrersOfTarget(index, target) {
|
|
199
|
+
return Object.hasOwn(index.referrers, target) ? index.referrers[target] : NO_REFERRERS;
|
|
200
|
+
}
|
|
201
|
+
function* reindexed(index, changed) {
|
|
202
|
+
const moved = new Map();
|
|
203
|
+
const movesOf = (target) => {
|
|
204
|
+
const held = moved.get(target) ?? { gained: [], lost: [] };
|
|
205
|
+
moved.set(target, held);
|
|
184
206
|
return held;
|
|
185
207
|
};
|
|
208
|
+
const targeting = [];
|
|
209
|
+
const targetless = [];
|
|
186
210
|
for (const [path, found] of changed) {
|
|
187
211
|
const before = Object.hasOwn(index.targets, path) ? index.targets[path] : [];
|
|
188
212
|
for (const target of before)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
213
|
+
if (!found.includes(target))
|
|
214
|
+
movesOf(target).lost.push(path);
|
|
215
|
+
for (const target of found) {
|
|
216
|
+
if (!before.includes(target))
|
|
217
|
+
movesOf(target).gained.push([path, true]);
|
|
218
|
+
}
|
|
219
|
+
if (found.length > 0)
|
|
220
|
+
targeting.push([path, found]);
|
|
221
|
+
else
|
|
222
|
+
targetless.push(path);
|
|
223
|
+
yield ROW_WEIGHT * (1 + before.length + found.length);
|
|
224
|
+
}
|
|
225
|
+
const referred = [];
|
|
226
|
+
const unreferred = [];
|
|
227
|
+
for (const [target, { gained, lost }] of moved) {
|
|
228
|
+
const files = yield* patching(referrersOfTarget(index, target), gained, lost);
|
|
229
|
+
if (sizeOf(files) > 0)
|
|
230
|
+
referred.push([target, files]);
|
|
231
|
+
else
|
|
232
|
+
unreferred.push(target);
|
|
192
233
|
}
|
|
193
|
-
const emptied = [...referrers].filter(([, held]) => held.size === 0).map(([target]) => target);
|
|
194
234
|
return {
|
|
195
235
|
composition: index.composition,
|
|
196
|
-
targets:
|
|
197
|
-
referrers:
|
|
198
|
-
|
|
199
|
-
|
|
236
|
+
targets: yield* patching(index.targets, targeting, targetless),
|
|
237
|
+
referrers: yield* patching(index.referrers, referred, unreferred),
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function storedIn(entries) {
|
|
241
|
+
let stored = shared({});
|
|
242
|
+
let unit = [];
|
|
243
|
+
return after(inUnits(entries, (entry) => {
|
|
244
|
+
unit.push(entry);
|
|
245
|
+
return ROW_WEIGHT;
|
|
246
|
+
}, () => {
|
|
247
|
+
stored = patched(stored, unit);
|
|
248
|
+
unit = [];
|
|
249
|
+
}), () => stored);
|
|
250
|
+
}
|
|
251
|
+
function storedReferrers(referrers) {
|
|
252
|
+
const sets = new Map();
|
|
253
|
+
let unit = new Map();
|
|
254
|
+
const pairs = function* () {
|
|
255
|
+
for (const [target, files] of referrers)
|
|
256
|
+
for (const file of files)
|
|
257
|
+
yield [target, file];
|
|
200
258
|
};
|
|
259
|
+
return after(inUnits(pairs(), ([target, file]) => {
|
|
260
|
+
const files = unit.get(target);
|
|
261
|
+
if (files === undefined)
|
|
262
|
+
unit.set(target, [file]);
|
|
263
|
+
else
|
|
264
|
+
files.push(file);
|
|
265
|
+
return ROW_WEIGHT;
|
|
266
|
+
}, () => {
|
|
267
|
+
for (const [target, files] of unit) {
|
|
268
|
+
sets.set(target, patched(sets.get(target) ?? NO_REFERRERS, files.map((file) => [file, true])));
|
|
269
|
+
}
|
|
270
|
+
unit = new Map();
|
|
271
|
+
}), () => storedIn(sets));
|
|
201
272
|
}
|
|
202
273
|
function heldIndex(held, composition) {
|
|
203
274
|
const index = referrersOf.get(held.text);
|
|
@@ -212,41 +283,41 @@ export function indexReferrers(held, composition) {
|
|
|
212
283
|
return running;
|
|
213
284
|
const targets = new Map();
|
|
214
285
|
const referrers = new Map();
|
|
215
|
-
const filled = inUnits(
|
|
216
|
-
const content = held.text[path];
|
|
286
|
+
const filled = inUnits(entriesIn(held.text), ([path, content]) => {
|
|
217
287
|
const found = referencedBy(path, content, composition);
|
|
218
288
|
if (found.length > 0)
|
|
219
289
|
targets.set(path, found);
|
|
220
|
-
for (const target of found)
|
|
221
|
-
|
|
222
|
-
|
|
290
|
+
for (const target of found) {
|
|
291
|
+
const files = referrers.get(target);
|
|
292
|
+
if (files === undefined)
|
|
293
|
+
referrers.set(target, [path]);
|
|
294
|
+
else
|
|
295
|
+
files.push(path);
|
|
296
|
+
}
|
|
297
|
+
return ROW_WEIGHT + content.length + REFERENCE_WEIGHT * found.length;
|
|
223
298
|
});
|
|
224
|
-
const indexed = () => {
|
|
225
|
-
referrersOf.set(held.text, {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
};
|
|
231
|
-
if (!(filled instanceof Promise))
|
|
232
|
-
return indexed();
|
|
233
|
-
const building = filled.then(indexed).finally(() => indexing.delete(held.text));
|
|
299
|
+
const indexed = after(filled, () => after(storedIn(targets), (storedTargets) => after(storedReferrers(referrers), (stored) => {
|
|
300
|
+
referrersOf.set(held.text, { composition, targets: storedTargets, referrers: stored });
|
|
301
|
+
})));
|
|
302
|
+
if (!(indexed instanceof Promise))
|
|
303
|
+
return;
|
|
304
|
+
const building = indexed.finally(() => indexing.delete(held.text));
|
|
234
305
|
indexing.set(held.text, building);
|
|
235
306
|
return building;
|
|
236
307
|
}
|
|
237
308
|
export function referencesIndexed(held, composition) {
|
|
238
309
|
return heldIndex(held, composition) !== null;
|
|
239
310
|
}
|
|
240
|
-
export function referring(held, composition, targets) {
|
|
311
|
+
export function* referring(held, composition, targets) {
|
|
241
312
|
const index = heldIndex(held, composition);
|
|
242
313
|
if (index === null)
|
|
243
314
|
return null;
|
|
244
315
|
const found = new Set();
|
|
245
316
|
for (const target of targets) {
|
|
246
|
-
|
|
247
|
-
continue;
|
|
248
|
-
for (const file of index.referrers[target])
|
|
317
|
+
for (const [file] of entriesIn(referrersOfTarget(index, target))) {
|
|
249
318
|
found.add(file);
|
|
319
|
+
yield ROW_WEIGHT;
|
|
320
|
+
}
|
|
250
321
|
}
|
|
251
322
|
return found;
|
|
252
323
|
}
|
|
@@ -254,12 +325,12 @@ export function available(composition) {
|
|
|
254
325
|
return (composition.model.status !== 'unavailable' &&
|
|
255
326
|
(composition.selection === null || composition.selection.model.status !== 'unavailable'));
|
|
256
327
|
}
|
|
257
|
-
export function changedCleanly(next, previous, composition) {
|
|
328
|
+
export function* changedCleanly(next, previous, composition) {
|
|
258
329
|
if (!typing(previous.composition, composition))
|
|
259
330
|
return false;
|
|
260
331
|
const paths = new Set([
|
|
261
|
-
...
|
|
262
|
-
...
|
|
332
|
+
...(yield* differences(previous.text, next.text)),
|
|
333
|
+
...(yield* differences(previous.binaries, next.binaries, () => true)),
|
|
263
334
|
]);
|
|
264
335
|
const binary = (path) => Object.hasOwn(next.binaries, path);
|
|
265
336
|
const within = (file) => (path) => selected(composition, path) === selected(composition, file);
|
|
@@ -271,7 +342,7 @@ export function changedCleanly(next, previous, composition) {
|
|
|
271
342
|
};
|
|
272
343
|
const changedTargets = new Map();
|
|
273
344
|
const shifted = [];
|
|
274
|
-
|
|
345
|
+
const admitted = (path) => {
|
|
275
346
|
const now = next.text[path];
|
|
276
347
|
const was = previous.text[path];
|
|
277
348
|
const modeled = modelOf(composition, path) !== null;
|
|
@@ -281,40 +352,50 @@ export function changedCleanly(next, previous, composition) {
|
|
|
281
352
|
shifted.push(path);
|
|
282
353
|
}
|
|
283
354
|
if (!modeled && typedIn(was) && !typedIn(now))
|
|
284
|
-
return
|
|
355
|
+
return null;
|
|
285
356
|
if (now === undefined) {
|
|
286
357
|
if (modeled)
|
|
287
358
|
changedTargets.set(path, []);
|
|
288
|
-
|
|
359
|
+
return 0;
|
|
289
360
|
}
|
|
290
361
|
if (binary(path))
|
|
291
|
-
return
|
|
362
|
+
return null;
|
|
292
363
|
if (!modeled) {
|
|
293
364
|
if (declared(now) === undefined)
|
|
294
|
-
return
|
|
295
|
-
if (
|
|
296
|
-
return
|
|
297
|
-
|
|
365
|
+
return null;
|
|
366
|
+
if (typedIn(now))
|
|
367
|
+
return 0;
|
|
368
|
+
const check = checked(path, now, composition);
|
|
369
|
+
return check.ok ? resolvedBy(check) : null;
|
|
298
370
|
}
|
|
299
371
|
const check = checked(path, now, composition);
|
|
300
372
|
if (!reaching(path, check))
|
|
301
|
-
return
|
|
373
|
+
return null;
|
|
302
374
|
changedTargets.set(path, targetsOf(check));
|
|
375
|
+
return resolvedBy(check);
|
|
376
|
+
};
|
|
377
|
+
for (const path of paths) {
|
|
378
|
+
const resolved = admitted(path);
|
|
379
|
+
if (resolved === null)
|
|
380
|
+
return false;
|
|
381
|
+
yield ROW_WEIGHT + (next.text[path]?.length ?? 0) + REFERENCE_WEIGHT * resolved;
|
|
303
382
|
}
|
|
304
383
|
const index = heldIndex(previous, composition);
|
|
305
384
|
if (index === null && shifted.length > 0)
|
|
306
385
|
return false;
|
|
307
386
|
for (const target of shifted) {
|
|
308
|
-
const files = index
|
|
309
|
-
for (const file of files) {
|
|
387
|
+
const files = index === null ? NO_REFERRERS : referrersOfTarget(index, target);
|
|
388
|
+
for (const [file] of entriesIn(files)) {
|
|
310
389
|
if (paths.has(file))
|
|
311
390
|
continue;
|
|
312
|
-
|
|
391
|
+
const check = checked(file, next.text[file], composition);
|
|
392
|
+
if (!reaching(file, check))
|
|
313
393
|
return false;
|
|
394
|
+
yield ROW_WEIGHT + next.text[file].length + REFERENCE_WEIGHT * resolvedBy(check);
|
|
314
395
|
}
|
|
315
396
|
}
|
|
316
397
|
if (index !== null) {
|
|
317
|
-
referrersOf.set(next.text, changedTargets.size === 0 ? index : reindexed(index, changedTargets));
|
|
398
|
+
referrersOf.set(next.text, changedTargets.size === 0 ? index : yield* reindexed(index, changedTargets));
|
|
318
399
|
}
|
|
319
400
|
return true;
|
|
320
401
|
}
|
package/dist/connection.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { type TypesResult } from './model.js';
|
|
2
2
|
import { type Observation } from './observation.js';
|
|
3
3
|
import { type DocumentQuery, type DocumentResult, type GroupQuery, type GroupResult, type PendingResult } from './query.js';
|
|
4
|
+
import { type EntrySeed } from './seed.js';
|
|
4
5
|
import { type SearchRequest, type SearchResult } from './search.js';
|
|
5
6
|
import { type Adapter, type Authorization, type Member, type ProviderRefusal, type ServiceMode } from './adapter.js';
|
|
6
7
|
import { type ChatDraftSurface, type ConversationAgent, type ConversationEntry, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
7
8
|
import { type WrittenBy } from './change.js';
|
|
8
9
|
import type { Open } from './open.js';
|
|
9
10
|
import { type BinaryReference } from './binary.js';
|
|
10
|
-
import { type BinaryAnswer, type CallResult, type HistoryAnswer, type QueueEntry } from './outcome.js';
|
|
11
|
+
import { type BinaryAnswer, type BinaryLinkAnswer, type CallResult, type HistoryAnswer, type QueueEntry, type Resolution } from './outcome.js';
|
|
11
12
|
import { type Recovery } from './recovery.js';
|
|
12
13
|
import { type SaveRefusal } from './save.js';
|
|
13
|
-
import { type RoomDraft, type RoomDraftWrite } from './room-draft.js';
|
|
14
|
+
import { type RoomDraft, type RoomDraftParts, type RoomDraftWrite } from './room-draft.js';
|
|
14
15
|
import { type SyncStatus } from './status.js';
|
|
15
16
|
import { type RuntimeShell } from './durability.js';
|
|
16
|
-
import { type
|
|
17
|
-
import
|
|
17
|
+
import { type CapacityCause, type CodeAvailability, type Persistence, type Readiness, type SearchObligation } from './readiness.js';
|
|
18
|
+
import type { RuntimeDatabase } from './tables.js';
|
|
18
19
|
import { type NarrowedView, type PortReach, type RuntimeView } from './reach.js';
|
|
19
20
|
export type AppTypedSelection = {
|
|
20
21
|
roots: readonly string[];
|
|
@@ -33,6 +34,7 @@ export type AppRoom = {
|
|
|
33
34
|
documents: number;
|
|
34
35
|
synchronizationAvailable: boolean;
|
|
35
36
|
refusal: ProviderRefusal | null;
|
|
37
|
+
locked: boolean;
|
|
36
38
|
};
|
|
37
39
|
export type RoomSchemas = {
|
|
38
40
|
collection: TypesResult;
|
|
@@ -49,6 +51,7 @@ export type ConnectionRefusal = {
|
|
|
49
51
|
export type MdRuntimeOptions = {
|
|
50
52
|
adapter: Adapter;
|
|
51
53
|
shell: RuntimeShell;
|
|
54
|
+
database: RuntimeDatabase;
|
|
52
55
|
authorization?: Authorization;
|
|
53
56
|
signal?: AbortSignal;
|
|
54
57
|
recovery?: Recovery;
|
|
@@ -63,6 +66,10 @@ export type SavedRoomDraft = {
|
|
|
63
66
|
readonly path: string;
|
|
64
67
|
readonly revision: string;
|
|
65
68
|
};
|
|
69
|
+
export type SavedParts = {
|
|
70
|
+
readonly path: string;
|
|
71
|
+
readonly parts: RoomDraftParts;
|
|
72
|
+
};
|
|
66
73
|
export type RoomDraftSurface = {
|
|
67
74
|
list(): Promise<readonly RoomDraft[]>;
|
|
68
75
|
read(room: string, path: string): RoomDraft | null;
|
|
@@ -72,9 +79,11 @@ export type RoomDraftSurface = {
|
|
|
72
79
|
export type PresentationSurface = {
|
|
73
80
|
read(app: string): Promise<unknown>;
|
|
74
81
|
write(app: string, value: unknown): Promise<void>;
|
|
82
|
+
edit(app: string, members: Readonly<Record<string, unknown>>): Promise<void>;
|
|
75
83
|
};
|
|
76
84
|
export type BinaryFileSurface = {
|
|
77
85
|
read(room: string, path: string, revision?: string): Promise<BinaryAnswer>;
|
|
86
|
+
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
78
87
|
readReference(reference: BinaryReference): Promise<BinaryAnswer>;
|
|
79
88
|
};
|
|
80
89
|
export type HistoryQuery = {
|
|
@@ -95,7 +104,9 @@ export type MdRuntime = {
|
|
|
95
104
|
chatDraft: ChatDraftSurface;
|
|
96
105
|
presentation: PresentationSurface;
|
|
97
106
|
save(room: string, roomDrafts: readonly SavedRoomDraft[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
107
|
+
saveParts(room: string, parts: readonly SavedParts[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
98
108
|
history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
|
|
109
|
+
resolve(room: string, path: string, destination: string): Promise<Resolution>;
|
|
99
110
|
binaryFile: BinaryFileSurface;
|
|
100
111
|
call(name: string, input: unknown): Promise<CallResult>;
|
|
101
112
|
reached(locator: string, roomVersion: string, path?: string): boolean;
|
|
@@ -126,11 +137,12 @@ export type ReadinessPort = {
|
|
|
126
137
|
readonly target: string;
|
|
127
138
|
readonly code: CodeAvailability;
|
|
128
139
|
readonly capacity: CapacityCause | null;
|
|
140
|
+
readonly search: SearchObligation;
|
|
129
141
|
};
|
|
130
142
|
export type ComposedRuntime = RuntimeView & {
|
|
143
|
+
seed(entry: EntrySeed): void;
|
|
131
144
|
stop(): Promise<void>;
|
|
132
145
|
lose(locators: readonly string[]): Promise<void>;
|
|
133
|
-
acquire(demand: RuntimeDemand): void;
|
|
134
146
|
persisted(answer: Persistence): void;
|
|
135
147
|
within(reach: PortReach | null, port: ReadinessPort): NarrowedView;
|
|
136
148
|
};
|
package/dist/connection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAoB,KAAK,WAAW,EAAqB,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,WAAW,EAEhB,KAAK,aAAa,EAKnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAgB,KAAK,SAAS,EAAe,MAAM,WAAW,CAAC;AAEtE,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,OAAO,EAEZ,KAAK,aAAa,EAQlB,KAAK,MAAM,EASX,KAAK,eAAe,EAGpB,KAAK,WAAW,EAGjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAExB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,aAAa,CAAC;AASrB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAaL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAEf,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,UAAU,EAEhB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAuD,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGnG,OAAO,EAQL,KAAK,WAAW,EACjB,MAAM,WAAW,CAAC;AAanB,OAAO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