@agentshouse/mdruntime 0.1.0-c69ca0e865e0b → 0.1.0-c6fd2cbbff187
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 +275 -275
- package/dist/acquisition.d.ts +14 -0
- package/dist/acquisition.d.ts.map +1 -0
- package/dist/acquisition.js +24 -0
- package/dist/adapter.d.ts +50 -9
- package/dist/adapter.d.ts.map +1 -1
- package/dist/bootstrap.d.ts +3 -2
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +26 -4
- package/dist/change-set.d.ts +2 -0
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +36 -10
- package/dist/chat/acts.d.ts +3 -4
- package/dist/chat/acts.d.ts.map +1 -1
- package/dist/chat/acts.js +10 -10
- 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/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 +2 -1
- package/dist/chat/list.d.ts.map +1 -1
- package/dist/chat/list.js +42 -5
- package/dist/chat/message.d.ts.map +1 -1
- package/dist/chat/message.js +2 -2
- package/dist/chat/messages.d.ts +1 -0
- package/dist/chat/messages.d.ts.map +1 -1
- package/dist/chat/messages.js +4 -0
- package/dist/chat/provider.d.ts +1 -1
- package/dist/chat/provider.d.ts.map +1 -1
- package/dist/chat/provider.js +59 -69
- 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 +1 -0
- package/dist/chat/ready.d.ts.map +1 -1
- package/dist/chat/ready.js +2 -2
- package/dist/chat/style.js +1 -1
- package/dist/client.d.ts +14 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +17 -6
- package/dist/collection.d.ts +17 -3
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +230 -19
- package/dist/connection.d.ts +27 -8
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1567 -362
- package/dist/conversation.d.ts +19 -7
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +438 -152
- package/dist/durability.d.ts +7 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/entry.d.ts +2 -2
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +3 -3
- package/dist/fence.d.ts +6 -0
- package/dist/fence.d.ts.map +1 -0
- package/dist/fence.js +10 -0
- package/dist/host.d.ts +17 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +90 -9
- package/dist/identity.d.ts +2 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +6 -0
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/memory.d.ts +9 -2
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +36 -7
- package/dist/model.d.ts +4 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +10 -1
- package/dist/observation.d.ts +7 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +29 -12
- package/dist/outcome.d.ts +12 -2
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +4 -0
- package/dist/overlay.d.ts +2 -0
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +58 -55
- package/dist/query.d.ts +56 -4
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +36 -7
- package/dist/reach.d.ts +6 -3
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +20 -5
- package/dist/react.d.ts +7 -4
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +6 -4
- package/dist/read-side.d.ts +13 -6
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +419 -92
- package/dist/readiness.d.ts +53 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +33 -0
- 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 +25 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +197 -0
- package/dist/refresh.d.ts +4 -4
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +17 -10
- package/dist/replica.d.ts +6 -2
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +76 -23
- package/dist/room-draft.d.ts +13 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +2 -2
- package/dist/rows.d.ts +6 -13
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +10 -13
- package/dist/save.d.ts +6 -0
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +53 -14
- package/dist/search.d.ts +49 -6
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +192 -47
- 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 +11 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +368 -0
- package/dist/status.d.ts +4 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/store.d.ts +56 -11
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +311 -84
- package/dist/turn.d.ts +7 -0
- package/dist/turn.d.ts.map +1 -0
- package/dist/turn.js +45 -0
- package/dist/windows.d.ts +19 -0
- package/dist/windows.d.ts.map +1 -0
- package/dist/windows.js +83 -0
- package/dist/wire.d.ts +144 -32
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +50 -31
- package/package.json +2 -2
package/dist/replica.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { equalValue, parse } from '@agentshouse/mdmodel';
|
|
2
2
|
import { immutable, landing } from './change.js';
|
|
3
|
-
import { collectionOf, unreadable, validateCollection, } from './collection.js';
|
|
3
|
+
import { changedCleanly, collectionOf, unreadable, validateCollection, } from './collection.js';
|
|
4
4
|
import { acceptedBinaries, overlay, overlayChanged, sameLayerText, } from './overlay.js';
|
|
5
5
|
import { providerRewritten } from './save.js';
|
|
6
|
+
import { drafted, patched, settled, shared } from './shared.js';
|
|
6
7
|
export function compositionOf(record) {
|
|
7
8
|
return {
|
|
8
9
|
model: record.model,
|
|
@@ -11,23 +12,48 @@ export function compositionOf(record) {
|
|
|
11
12
|
: { roots: record.typedSelection.roots, model: record.selectionModel },
|
|
12
13
|
};
|
|
13
14
|
}
|
|
15
|
+
function held(record) {
|
|
16
|
+
const documents = shared(record.documents);
|
|
17
|
+
const binaries = shared(record.binaries);
|
|
18
|
+
const revisions = shared(record.revisions);
|
|
19
|
+
const fileIds = shared(record.fileIds);
|
|
20
|
+
const changes = shared(record.changes);
|
|
21
|
+
const written = shared(record.written);
|
|
22
|
+
return documents === record.documents &&
|
|
23
|
+
binaries === record.binaries &&
|
|
24
|
+
revisions === record.revisions &&
|
|
25
|
+
fileIds === record.fileIds &&
|
|
26
|
+
changes === record.changes &&
|
|
27
|
+
written === record.written
|
|
28
|
+
? record
|
|
29
|
+
: { ...record, documents, binaries, revisions, fileIds, changes, written };
|
|
30
|
+
}
|
|
14
31
|
export function confirmedOf(record, previous) {
|
|
32
|
+
const kept = held(record);
|
|
15
33
|
return {
|
|
16
|
-
record,
|
|
17
|
-
collection: collectionOf(
|
|
34
|
+
record: kept,
|
|
35
|
+
collection: collectionOf(kept.documents, compositionOf(kept), previous?.collection),
|
|
18
36
|
};
|
|
19
37
|
}
|
|
20
38
|
export function sameMembership(record, other) {
|
|
21
39
|
return (JSON.stringify(record.typedSelection?.roots ?? null) ===
|
|
22
40
|
JSON.stringify(other.typedSelection?.roots ?? null));
|
|
23
41
|
}
|
|
24
|
-
|
|
42
|
+
function cleanly(record, previous) {
|
|
43
|
+
if (previous === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
const before = previous.record;
|
|
46
|
+
return changedCleanly({ text: record.documents, binaries: record.binaries }, { text: before.documents, binaries: before.binaries, composition: compositionOf(before) }, compositionOf(record));
|
|
47
|
+
}
|
|
48
|
+
export function readStaged(staged, previous) {
|
|
49
|
+
const record = held(staged);
|
|
25
50
|
const textChanged = previous === undefined || !sameLayerText(record, previous.record);
|
|
26
51
|
const modeled = record.model.status !== 'unavailable' || record.selectionModel.status !== 'unavailable';
|
|
27
52
|
if (modeled &&
|
|
28
53
|
(textChanged ||
|
|
29
54
|
record.model !== previous?.record.model ||
|
|
30
|
-
record.selectionModel !== previous?.record.selectionModel)
|
|
55
|
+
record.selectionModel !== previous?.record.selectionModel) &&
|
|
56
|
+
!cleanly(record, previous)) {
|
|
31
57
|
const verdict = validateCollection(record.documents, Object.keys(record.binaries), compositionOf(record));
|
|
32
58
|
if (verdict.verdict === 'refuse' && verdict.rule !== 'model-unavailable') {
|
|
33
59
|
return { kind: 'refused', refusal: verdict };
|
|
@@ -54,7 +80,7 @@ export function readReclassified(record, previous) {
|
|
|
54
80
|
: { kind: 'refused', refusal: verdict };
|
|
55
81
|
}
|
|
56
82
|
function returnedBinaries(held, submitted, accepted) {
|
|
57
|
-
const binaries =
|
|
83
|
+
const binaries = drafted(held);
|
|
58
84
|
for (const change of submitted.changes) {
|
|
59
85
|
if (change.kind !== 'move')
|
|
60
86
|
continue;
|
|
@@ -67,17 +93,22 @@ function returnedBinaries(held, submitted, accepted) {
|
|
|
67
93
|
Object.assign(binaries, acceptedBinaries(accepted.binaryFiles ?? {}));
|
|
68
94
|
for (const path of accepted.removals)
|
|
69
95
|
delete binaries[path];
|
|
70
|
-
return binaries;
|
|
96
|
+
return settled(binaries);
|
|
71
97
|
}
|
|
72
98
|
export function applyReturned(confirmed, submitted, accepted, roomVersion, writtenAt) {
|
|
73
|
-
const { documents, revisions, changes, removals } = accepted;
|
|
74
|
-
const nextDocuments =
|
|
75
|
-
const nextRevisions =
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
99
|
+
const { documents, revisions, fileIds, changes, removals } = accepted;
|
|
100
|
+
const nextDocuments = drafted(confirmed.record.documents);
|
|
101
|
+
const nextRevisions = drafted(confirmed.record.revisions);
|
|
102
|
+
const nextFileIds = drafted(confirmed.record.fileIds);
|
|
103
|
+
const nextChanges = drafted(confirmed.record.changes);
|
|
104
|
+
const nextWritten = drafted(confirmed.record.written);
|
|
105
|
+
Object.assign(nextDocuments, documents);
|
|
106
|
+
Object.assign(nextRevisions, revisions);
|
|
107
|
+
for (const path of Object.keys({ ...documents, ...revisions }))
|
|
108
|
+
delete nextFileIds[path];
|
|
109
|
+
Object.assign(nextFileIds, fileIds);
|
|
110
|
+
for (const path of Object.keys(documents))
|
|
111
|
+
nextWritten[path] = writtenAt;
|
|
81
112
|
for (const [path, revision] of Object.entries(revisions)) {
|
|
82
113
|
if (confirmed.record.revisions[path] !== revision)
|
|
83
114
|
delete nextChanges[path];
|
|
@@ -86,16 +117,18 @@ export function applyReturned(confirmed, submitted, accepted, roomVersion, writt
|
|
|
86
117
|
for (const path of removals) {
|
|
87
118
|
delete nextDocuments[path];
|
|
88
119
|
delete nextRevisions[path];
|
|
120
|
+
delete nextFileIds[path];
|
|
89
121
|
delete nextChanges[path];
|
|
90
122
|
delete nextWritten[path];
|
|
91
123
|
}
|
|
92
124
|
return readStaged({
|
|
93
125
|
...confirmed.record,
|
|
94
126
|
roomVersion,
|
|
95
|
-
documents: nextDocuments,
|
|
96
|
-
revisions: nextRevisions,
|
|
97
|
-
|
|
98
|
-
|
|
127
|
+
documents: settled(nextDocuments),
|
|
128
|
+
revisions: settled(nextRevisions),
|
|
129
|
+
fileIds: settled(nextFileIds),
|
|
130
|
+
changes: settled(nextChanges),
|
|
131
|
+
written: settled(nextWritten),
|
|
99
132
|
binaries: returnedBinaries(confirmed.record.binaries, submitted, accepted),
|
|
100
133
|
}, confirmed);
|
|
101
134
|
}
|
|
@@ -148,6 +181,7 @@ export function replicaOf(confirmed, queue, previous) {
|
|
|
148
181
|
documents: confirmed.record.documents,
|
|
149
182
|
binaries: confirmed.record.binaries,
|
|
150
183
|
revisions: confirmed.record.revisions,
|
|
184
|
+
fileIds: confirmed.record.fileIds,
|
|
151
185
|
changes: confirmed.record.changes,
|
|
152
186
|
collection: confirmed.collection,
|
|
153
187
|
},
|
|
@@ -238,7 +272,10 @@ function effects(change) {
|
|
|
238
272
|
return [{ kind: 'absent', path }];
|
|
239
273
|
}
|
|
240
274
|
export function landed(batch, confirmed, current = {}) {
|
|
241
|
-
const layer = {
|
|
275
|
+
const layer = {
|
|
276
|
+
...confirmed.record,
|
|
277
|
+
documents: patched(confirmed.record.documents, Object.entries(current)),
|
|
278
|
+
};
|
|
242
279
|
return batch.changes.every((change, index) => {
|
|
243
280
|
if (change.kind === 'replace' || (change.kind === 'create' && 'content' in change)) {
|
|
244
281
|
const at = landing(batch.changes, index, change.path);
|
|
@@ -256,12 +293,27 @@ export function landed(batch, confirmed, current = {}) {
|
|
|
256
293
|
});
|
|
257
294
|
});
|
|
258
295
|
}
|
|
259
|
-
|
|
296
|
+
function founded(batch, layer) {
|
|
297
|
+
let changed = false;
|
|
298
|
+
const preconditions = batch.preconditions.map((precondition) => {
|
|
299
|
+
if (precondition.kind !== 'content')
|
|
300
|
+
return precondition;
|
|
301
|
+
const revision = layer.revisions[precondition.path];
|
|
302
|
+
if (revision === undefined || layer.documents[precondition.path] !== precondition.content) {
|
|
303
|
+
return precondition;
|
|
304
|
+
}
|
|
305
|
+
changed = true;
|
|
306
|
+
return { kind: 'revision', path: precondition.path, revision };
|
|
307
|
+
});
|
|
308
|
+
return changed ? immutable({ ...batch, preconditions }) : batch;
|
|
309
|
+
}
|
|
310
|
+
export function standing(confirmed, queue, withdrawable, local) {
|
|
260
311
|
if (!queue.some(withdrawable))
|
|
261
|
-
return [];
|
|
312
|
+
return { withdrawn: [], kept: queue };
|
|
262
313
|
const composition = compositionOf(confirmed.record);
|
|
263
314
|
let layer = confirmed.record;
|
|
264
315
|
const withdrawn = [];
|
|
316
|
+
const kept = [];
|
|
265
317
|
for (const batch of queue) {
|
|
266
318
|
if (withdrawable(batch) && !holds(layer, batch.preconditions)) {
|
|
267
319
|
withdrawn.push(batch);
|
|
@@ -281,7 +333,8 @@ export function withdrawals(confirmed, queue, withdrawable, local) {
|
|
|
281
333
|
withdrawn.push(batch);
|
|
282
334
|
continue;
|
|
283
335
|
}
|
|
336
|
+
kept.push(local || !withdrawable(batch) ? batch : founded(batch, layer));
|
|
284
337
|
layer = next;
|
|
285
338
|
}
|
|
286
|
-
return withdrawn;
|
|
339
|
+
return { withdrawn, kept };
|
|
287
340
|
}
|
package/dist/room-draft.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ type ChangedUnderneath = {
|
|
|
87
87
|
readonly file?: string | null;
|
|
88
88
|
};
|
|
89
89
|
export type ReturnReason = ProviderRefusal & {
|
|
90
|
-
readonly kind: 'conflicted' | 'rejected' | 'expired' | 'withdrawn'
|
|
90
|
+
readonly kind: Open<'conflicted' | 'rejected' | 'expired' | 'withdrawn'>;
|
|
91
91
|
};
|
|
92
92
|
export declare function returnedBy(kind: 'expired' | 'withdrawn'): ReturnReason;
|
|
93
93
|
export type RoomDraft = {
|
|
@@ -130,6 +130,18 @@ export declare function underneath(parts: HeldParts, path: string, visible: Visi
|
|
|
130
130
|
export declare function heldFile(blob: Blob, base: string | null): Promise<HeldFile>;
|
|
131
131
|
export declare function binaryBase(visible: VisibleLayer | undefined, path: string): string | null;
|
|
132
132
|
export declare function changedParts(path: string, report: ChangedUnderneath): readonly ChangedPart[];
|
|
133
|
+
export type TextParts = {
|
|
134
|
+
readonly fields?: Readonly<Record<string, {
|
|
135
|
+
readonly value: unknown;
|
|
136
|
+
}>>;
|
|
137
|
+
readonly sections?: Readonly<Record<string, {
|
|
138
|
+
readonly value: string;
|
|
139
|
+
}>>;
|
|
140
|
+
readonly preamble?: {
|
|
141
|
+
readonly value: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
export declare function partsAfter(markdown: string, parts: TextParts): string;
|
|
133
145
|
export declare function returnedInto(existing: HeldParts | undefined, returned: HeldParts): HeldParts;
|
|
134
146
|
export declare function moveTarget(move: {
|
|
135
147
|
readonly to: string;
|
package/dist/room-draft.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"room-draft.d.ts","sourceRoot":"","sources":["../src/room-draft.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GACzB;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACrD,GACD;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CACxB,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC,CACxE,CAAC;IACF,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC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AY,EAAE,CAAA;CAAE,CA2ChE;AAkBD,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,CAkBzF;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,SAAS,UAAU,EAAE,CAqBvB"}
|
package/dist/room-draft.js
CHANGED
|
@@ -288,7 +288,7 @@ function frontmatterOf(fields) {
|
|
|
288
288
|
}
|
|
289
289
|
return serialize(document);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
export function partsAfter(markdown, parts) {
|
|
292
292
|
const fields = named(parts.fields);
|
|
293
293
|
const pieces = [
|
|
294
294
|
...(fields.length === 0 ? [] : [frontmatterOf(fields)]),
|
|
@@ -319,7 +319,7 @@ export function returnedInto(existing, returned) {
|
|
|
319
319
|
delete next.fields;
|
|
320
320
|
delete next.sections;
|
|
321
321
|
delete next.preamble;
|
|
322
|
-
const value =
|
|
322
|
+
const value = partsAfter(whole.value, existing.markdown === undefined ? existing : returned);
|
|
323
323
|
next.markdown = { value, base: whole.base };
|
|
324
324
|
}
|
|
325
325
|
const creation = existing.creation ?? returned.creation;
|
package/dist/rows.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Frontmatter } from '@agentshouse/mdmodel';
|
|
2
2
|
import type { HeadChange } from './adapter.js';
|
|
3
3
|
import type { BinaryFileRecord } from './binary.js';
|
|
4
4
|
import { type Composition } from './collection.js';
|
|
@@ -13,19 +13,12 @@ export type DocumentRow = {
|
|
|
13
13
|
values: Fields;
|
|
14
14
|
reached: Readonly<Record<string, readonly unknown[]>>;
|
|
15
15
|
directories: readonly string[];
|
|
16
|
-
|
|
16
|
+
folder: string;
|
|
17
|
+
text: string | null;
|
|
17
18
|
change: HeadChange | null;
|
|
19
|
+
fileId: string | null;
|
|
18
20
|
binary: BinaryFileRecord | null;
|
|
19
21
|
};
|
|
20
|
-
export type BodyRow = {
|
|
21
|
-
key: string;
|
|
22
|
-
kind: 'body';
|
|
23
|
-
room: string;
|
|
24
|
-
path: string;
|
|
25
|
-
preamble: string;
|
|
26
|
-
sections: Readonly<Record<string, string>>;
|
|
27
|
-
markdown: string;
|
|
28
|
-
};
|
|
29
22
|
export type ReferenceRow = {
|
|
30
23
|
key: string;
|
|
31
24
|
kind: 'reference';
|
|
@@ -37,10 +30,10 @@ export type ReferenceRow = {
|
|
|
37
30
|
path: string;
|
|
38
31
|
type: string;
|
|
39
32
|
};
|
|
40
|
-
export type Row = DocumentRow |
|
|
33
|
+
export type Row = DocumentRow | ReferenceRow;
|
|
41
34
|
export declare function documentKey(room: string, path: string): string;
|
|
42
35
|
export declare function roomOfKey(key: string): string;
|
|
43
36
|
export declare function markdownPath(path: string): boolean;
|
|
44
|
-
export declare function rowsOf(room: string, path: string, document:
|
|
37
|
+
export declare function rowsOf(room: string, path: string, document: Frontmatter | null, composition: Composition, change: HeadChange | null, fileId: string | null, binary: BinaryFileRecord | null): readonly Row[];
|
|
45
38
|
export {};
|
|
46
39
|
//# sourceMappingURL=rows.d.ts.map
|
package/dist/rows.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../src/rows.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../src/rows.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9D,KAAK,MAAM,GAAG,QAAQ,CAAC,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AAED,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAC9B,SAAS,GAAG,EAAE,CAmEhB"}
|
package/dist/rows.js
CHANGED
|
@@ -64,6 +64,9 @@ function walk(reading, node, forms, exact) {
|
|
|
64
64
|
: [{ text: `${form.text}/${segment}`, through: form.through, pending: false }]), `${exact}/${segment}`);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
+
function folderOf(path) {
|
|
68
|
+
return path.slice(0, Math.max(path.lastIndexOf('/'), 0));
|
|
69
|
+
}
|
|
67
70
|
function directoriesOf(path) {
|
|
68
71
|
const parts = path.split('/').slice(0, -1);
|
|
69
72
|
return ['', ...parts.map((_, index) => parts.slice(0, index + 1).join('/'))];
|
|
@@ -71,9 +74,8 @@ function directoriesOf(path) {
|
|
|
71
74
|
export function markdownPath(path) {
|
|
72
75
|
return path.endsWith('.md');
|
|
73
76
|
}
|
|
74
|
-
export function rowsOf(room, path, document, composition, change, binary) {
|
|
77
|
+
export function rowsOf(room, path, document, composition, change, fileId, binary) {
|
|
75
78
|
const key = documentKey(room, path);
|
|
76
|
-
const body = keyOf('b', room, path);
|
|
77
79
|
if (document === null || !markdownPath(path)) {
|
|
78
80
|
return [
|
|
79
81
|
{
|
|
@@ -86,8 +88,10 @@ export function rowsOf(room, path, document, composition, change, binary) {
|
|
|
86
88
|
values: {},
|
|
87
89
|
reached: {},
|
|
88
90
|
directories: directoriesOf(path),
|
|
89
|
-
|
|
91
|
+
folder: folderOf(path),
|
|
92
|
+
text: null,
|
|
90
93
|
change,
|
|
94
|
+
fileId,
|
|
91
95
|
binary,
|
|
92
96
|
},
|
|
93
97
|
];
|
|
@@ -117,19 +121,12 @@ export function rowsOf(room, path, document, composition, change, binary) {
|
|
|
117
121
|
values,
|
|
118
122
|
reached,
|
|
119
123
|
directories: directoriesOf(path),
|
|
120
|
-
|
|
124
|
+
folder: folderOf(path),
|
|
125
|
+
text: document.content,
|
|
121
126
|
change,
|
|
127
|
+
fileId,
|
|
122
128
|
binary,
|
|
123
129
|
},
|
|
124
|
-
{
|
|
125
|
-
key: body,
|
|
126
|
-
kind: 'body',
|
|
127
|
-
room,
|
|
128
|
-
path,
|
|
129
|
-
preamble: document.preamble,
|
|
130
|
-
sections: document.sections,
|
|
131
|
-
markdown: document.content,
|
|
132
|
-
},
|
|
133
130
|
...[...reading.targets.values()].map(({ field, target: found, forms }) => ({
|
|
134
131
|
key: keyOf('r', room, path, field, found),
|
|
135
132
|
kind: 'reference',
|
package/dist/save.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ export type SaveInput = {
|
|
|
24
24
|
bases: readonly Precondition[];
|
|
25
25
|
queued?: ReadonlySet<string>;
|
|
26
26
|
writtenBy?: WrittenBy;
|
|
27
|
+
clean?: {
|
|
28
|
+
text: Readonly<Record<string, string>>;
|
|
29
|
+
binaries: Readonly<Record<string, unknown>>;
|
|
30
|
+
composition: Composition;
|
|
31
|
+
};
|
|
27
32
|
};
|
|
28
33
|
export type BatchResult = {
|
|
29
34
|
kind: 'batch';
|
|
@@ -33,6 +38,7 @@ export type BatchResult = {
|
|
|
33
38
|
refusal: SaveRefusal;
|
|
34
39
|
};
|
|
35
40
|
export declare function providerRewritten(batch: ChangeBatch, visible: VisibleLayer): ChangeBatch;
|
|
41
|
+
export declare function queuedDocuments(queue: readonly ChangeBatch[]): ReadonlySet<string>;
|
|
36
42
|
export type Requeued = {
|
|
37
43
|
kind: 'requeued';
|
|
38
44
|
queue: readonly ChangeBatch[];
|
package/dist/save.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save.d.ts","sourceRoot":"","sources":["../src/save.ts"],"names":[],"mappings":"
|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,MAAM,EAAE,EAC1B,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,EAC3C,KAAK,EAAE,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,KAAK,YAAY,GACrD,QAAQ,CA+DV;AAUD,wBAAgB,MAAM,CACpB,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,WAAW,GACjB,OAAO,CAiCT;AAED,wBAAgB,SAAS,CACvB,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,KAAK,EAAE,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,KAAK,YAAY,GACrD,WAAW,GAAG,IAAI,CASpB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,CA4GxD"}
|
package/dist/save.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { definitionOf } from './model.js';
|
|
2
2
|
import { apply, ATTACHMENT, links, parse, pointerSegments, references, relative, relativize, retarget, serialize, target, } from '@agentshouse/mdmodel';
|
|
3
3
|
import { immutable, queuedFile, departure, } from './change.js';
|
|
4
|
-
import { collectionOf, documentsOf, governing, validateCollection, } from './collection.js';
|
|
4
|
+
import { available, changedCleanly, collectionOf, documentsOf, governing, referring, validateCollection, } from './collection.js';
|
|
5
5
|
import { changeBatchIdentity } from './identity.js';
|
|
6
6
|
import { overlay } from './overlay.js';
|
|
7
7
|
import { covered, normalize } from './paths.js';
|
|
@@ -177,7 +177,7 @@ export function providerRewritten(batch, visible) {
|
|
|
177
177
|
...anticipated(batch.changes, batch.preconditions, rewritten.changes, visible),
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function incoming(collection, removed) {
|
|
180
|
+
function incoming(collection, removed, candidates) {
|
|
181
181
|
const found = new Map();
|
|
182
182
|
const note = (target, file) => {
|
|
183
183
|
if (!removed.has(target))
|
|
@@ -186,7 +186,13 @@ function incoming(collection, removed) {
|
|
|
186
186
|
referrers.add(file);
|
|
187
187
|
found.set(target, referrers);
|
|
188
188
|
};
|
|
189
|
-
|
|
189
|
+
const read = candidates === null
|
|
190
|
+
? documentsOf(collection)
|
|
191
|
+
: [...new Set(candidates)].sort().flatMap((path) => {
|
|
192
|
+
const document = collection.document(path);
|
|
193
|
+
return document === undefined ? [] : [[path, document]];
|
|
194
|
+
});
|
|
195
|
+
for (const [path, document] of read) {
|
|
190
196
|
const definition = definitionOf(governing(collection.composition, path), document.type);
|
|
191
197
|
for (const { value, to } of definition === undefined ? [] : references(document, definition)) {
|
|
192
198
|
if (to.includes(ATTACHMENT))
|
|
@@ -217,10 +223,13 @@ function affected(change) {
|
|
|
217
223
|
return change.kind === 'move' ? [change.path, change.to] : [change.path];
|
|
218
224
|
}
|
|
219
225
|
function guard(changes, input) {
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
226
|
+
const overridden = new Map();
|
|
227
|
+
const existing = {
|
|
228
|
+
has: (path) => overridden.get(path) ??
|
|
229
|
+
(Object.hasOwn(input.visible.documents, path) || Object.hasOwn(input.visible.binaries, path)),
|
|
230
|
+
add: (path) => void overridden.set(path, true),
|
|
231
|
+
delete: (path) => void overridden.set(path, false),
|
|
232
|
+
};
|
|
224
233
|
for (const [index, change] of changes.entries()) {
|
|
225
234
|
for (const path of affected(change)) {
|
|
226
235
|
const normalized = normalize(path);
|
|
@@ -275,7 +284,7 @@ function guard(changes, input) {
|
|
|
275
284
|
continue;
|
|
276
285
|
}
|
|
277
286
|
if (change.kind === 'replace') {
|
|
278
|
-
if (
|
|
287
|
+
if (unrevised(input, change.path)) {
|
|
279
288
|
return refuse('unknown-revision', change.path);
|
|
280
289
|
}
|
|
281
290
|
continue;
|
|
@@ -289,6 +298,22 @@ function guard(changes, input) {
|
|
|
289
298
|
function unrevised(input, path) {
|
|
290
299
|
return (!input.local && input.queued?.has(path) !== true && input.visible.revisions[path] === undefined);
|
|
291
300
|
}
|
|
301
|
+
export function queuedDocuments(queue) {
|
|
302
|
+
const paths = new Set();
|
|
303
|
+
for (const batch of queue) {
|
|
304
|
+
for (const change of batch.changes) {
|
|
305
|
+
if (change.kind === 'binary')
|
|
306
|
+
continue;
|
|
307
|
+
if (change.kind === 'remove')
|
|
308
|
+
paths.delete(change.path);
|
|
309
|
+
else if (change.kind !== 'move')
|
|
310
|
+
paths.add(change.path);
|
|
311
|
+
else if (paths.delete(change.path))
|
|
312
|
+
paths.add(change.to);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return paths;
|
|
316
|
+
}
|
|
292
317
|
function identity(precondition) {
|
|
293
318
|
const part = precondition.kind === 'field' || precondition.kind === 'section' ? precondition.name : '';
|
|
294
319
|
return `${precondition.kind} ${precondition.path} ${part}`;
|
|
@@ -450,6 +475,8 @@ function relativeChanges(input) {
|
|
|
450
475
|
});
|
|
451
476
|
}
|
|
452
477
|
function unmodeledType(collection, composition) {
|
|
478
|
+
if (available(composition))
|
|
479
|
+
return false;
|
|
453
480
|
for (const [path, document] of documentsOf(collection)) {
|
|
454
481
|
if (document.type !== undefined &&
|
|
455
482
|
document.type !== 'any' &&
|
|
@@ -740,9 +767,16 @@ export function buildBatch(input) {
|
|
|
740
767
|
const resulting = overlay(input.visible, [
|
|
741
768
|
{ id: '', baseRoomVersion: input.baseRoomVersion, ...predicted },
|
|
742
769
|
]);
|
|
770
|
+
const clean = input.clean !== undefined &&
|
|
771
|
+
input.clean.text === input.visible.documents &&
|
|
772
|
+
input.clean.binaries === input.visible.binaries &&
|
|
773
|
+
available(input.composition)
|
|
774
|
+
? input.clean
|
|
775
|
+
: null;
|
|
743
776
|
const removed = new Set(changes.filter((change) => change.kind === 'remove').map((change) => change.path));
|
|
744
777
|
if (removed.size > 0) {
|
|
745
|
-
const
|
|
778
|
+
const referrers = clean === null ? null : referring(clean, input.composition, removed);
|
|
779
|
+
const referenced = incoming(collectionOf(resulting.documents, input.composition), removed, referrers === null ? null : [...referrers, ...predicted.changes.flatMap(affected)]);
|
|
746
780
|
if (referenced !== null)
|
|
747
781
|
return referenced;
|
|
748
782
|
}
|
|
@@ -752,15 +786,20 @@ export function buildBatch(input) {
|
|
|
752
786
|
const parsed = parse(content);
|
|
753
787
|
return parsed.ok && parsed.document.type !== undefined && parsed.document.type !== 'any';
|
|
754
788
|
};
|
|
755
|
-
const
|
|
789
|
+
const touched = [...new Set(predicted.changes.flatMap(affected))];
|
|
790
|
+
const typedPaths = touched.filter((path) => typed(input.visible.documents[path]) || typed(resulting.documents[path]));
|
|
756
791
|
const needsModel = typedPaths.length > 0;
|
|
757
792
|
const withoutModel = typedPaths.find((path) => governing(input.composition, path).status === 'unavailable');
|
|
758
793
|
if (withoutModel !== undefined)
|
|
759
794
|
return refuse('model-unavailable', withoutModel);
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
795
|
+
const verdict = clean !== null &&
|
|
796
|
+
changedCleanly({ text: resulting.documents, binaries: resulting.binaries }, clean, input.composition)
|
|
797
|
+
? { verdict: 'accept' }
|
|
798
|
+
: validateCollection(needsModel
|
|
799
|
+
? resulting.documents
|
|
800
|
+
: Object.fromEntries(touched.flatMap((path) => resulting.documents[path] === undefined
|
|
801
|
+
? []
|
|
802
|
+
: [[path, resulting.documents[path]]])), Object.keys(resulting.binaries), input.composition);
|
|
764
803
|
if (verdict.verdict === 'refuse') {
|
|
765
804
|
return {
|
|
766
805
|
kind: 'refused',
|
package/dist/search.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import type { ProviderRefusal } from './adapter.js';
|
|
1
2
|
import type { ChangeSet } from './change-set.js';
|
|
2
|
-
import { type Filter } from './query.js';
|
|
3
|
+
import { type CoveredRoom, type Filter, type PendingRoom } from './query.js';
|
|
3
4
|
import type { Open } from './open.js';
|
|
4
5
|
export type DocumentPart = Open<'fields' | 'sections' | 'preamble' | 'path'>;
|
|
5
6
|
export type SearchRequest = {
|
|
6
7
|
text: string;
|
|
7
8
|
documents?: Filter;
|
|
9
|
+
collection?: true;
|
|
8
10
|
conversations?: readonly string[];
|
|
9
11
|
limit?: number;
|
|
12
|
+
after?: string;
|
|
13
|
+
total?: true;
|
|
10
14
|
};
|
|
11
15
|
export type DocumentHit = {
|
|
12
16
|
room: string;
|
|
@@ -21,10 +25,38 @@ export type MessageHit = {
|
|
|
21
25
|
score: number;
|
|
22
26
|
matches: Readonly<Record<string, readonly Open<'text'>[]>>;
|
|
23
27
|
};
|
|
24
|
-
export type
|
|
28
|
+
export type SearchCoverage = {
|
|
29
|
+
rooms: readonly CoveredRoom[];
|
|
30
|
+
conversations: readonly string[];
|
|
31
|
+
index: string;
|
|
32
|
+
overlay: readonly string[];
|
|
33
|
+
};
|
|
34
|
+
export type PendingConversation = {
|
|
35
|
+
conversation: string;
|
|
36
|
+
awaits: Open<'index'>;
|
|
37
|
+
};
|
|
38
|
+
export type SearchHits = {
|
|
25
39
|
documents: readonly DocumentHit[];
|
|
26
40
|
messages: readonly MessageHit[];
|
|
27
41
|
};
|
|
42
|
+
export type SearchWindow = SearchHits & {
|
|
43
|
+
next?: string;
|
|
44
|
+
total?: {
|
|
45
|
+
documents: number;
|
|
46
|
+
messages: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type SearchPending = SearchHits & {
|
|
50
|
+
pending: readonly (PendingRoom | PendingConversation)[];
|
|
51
|
+
coverage: SearchCoverage;
|
|
52
|
+
};
|
|
53
|
+
export type SearchUndeclared = ProviderRefusal & {
|
|
54
|
+
kind: 'undeclared';
|
|
55
|
+
};
|
|
56
|
+
export type SearchResult = (SearchWindow & {
|
|
57
|
+
coverage: SearchCoverage;
|
|
58
|
+
}) | SearchPending | SearchUndeclared;
|
|
59
|
+
export declare function undeclaredSearch(): SearchUndeclared;
|
|
28
60
|
export type SearchedDocument = {
|
|
29
61
|
room: string;
|
|
30
62
|
path: string;
|
|
@@ -39,24 +71,35 @@ export type SearchedMessage = {
|
|
|
39
71
|
text: string;
|
|
40
72
|
};
|
|
41
73
|
export type SearchSource = {
|
|
42
|
-
|
|
74
|
+
room(room: string): readonly string[];
|
|
43
75
|
document(room: string, path: string): SearchedDocument | null;
|
|
44
|
-
messages(): readonly SearchedMessage[];
|
|
45
|
-
message(conversation: string, identity: string): SearchedMessage | null;
|
|
46
76
|
};
|
|
77
|
+
type HitCursor = readonly [number, string, string] | readonly [] | null;
|
|
47
78
|
export type SearchPlan = {
|
|
48
79
|
text: string;
|
|
49
80
|
documents: unknown;
|
|
81
|
+
collection: boolean;
|
|
50
82
|
conversations: readonly string[] | null;
|
|
51
83
|
limit: number | null;
|
|
84
|
+
after: readonly [HitCursor, HitCursor] | null;
|
|
85
|
+
total: boolean;
|
|
52
86
|
};
|
|
53
87
|
export type SearchIndex = {
|
|
88
|
+
generation(): string;
|
|
89
|
+
rooms(): ReadonlySet<string>;
|
|
90
|
+
conversations(): ReadonlySet<string>;
|
|
91
|
+
indexRoom(room: string): Promise<void>;
|
|
92
|
+
indexMessages(conversation: string, messages: readonly SearchedMessage[], whole: boolean): void;
|
|
93
|
+
forget(rooms: readonly string[]): void;
|
|
54
94
|
changed(set: ChangeSet): void;
|
|
95
|
+
changes(): number;
|
|
96
|
+
caughtUp(): Promise<void>;
|
|
55
97
|
search(plan: SearchPlan, documents: readonly {
|
|
56
98
|
room: string;
|
|
57
99
|
path: string;
|
|
58
|
-
}[] | null):
|
|
100
|
+
}[] | null, conversations: readonly string[], rooms: ReadonlySet<string> | null, selections: ReadonlyMap<string, readonly string[]> | null): SearchWindow;
|
|
59
101
|
};
|
|
60
102
|
export declare function searchPlanOf(input: unknown): SearchPlan;
|
|
61
103
|
export declare function createSearchIndex(source: SearchSource): SearchIndex;
|
|
104
|
+
export {};
|
|
62
105
|
//# sourceMappingURL=search.d.ts.map
|
package/dist/search.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAKtC,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;AAE7E,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,IAAI,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC,CAAC,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,QAA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