@agentshouse/mdruntime 0.1.0-c3a4522b541bd → 0.1.0-c3b445fa731c0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +2 -1
- package/dist/adapter.d.ts +12 -8
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +2 -2
- package/dist/authored.d.ts.map +1 -1
- package/dist/authored.js +2 -0
- package/dist/binary.d.ts +2 -2
- package/dist/binary.js +1 -1
- package/dist/change.d.ts +2 -2
- package/dist/client.d.ts +1 -1
- package/dist/client.js +8 -8
- package/dist/collection.d.ts +1 -0
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +7 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +4 -6
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1 -0
- package/dist/conversation.d.ts +0 -1
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +0 -1
- package/dist/entry.d.ts +2 -2
- package/dist/entry.js +1 -1
- package/dist/host.js +10 -10
- package/dist/house-query.d.ts +8 -2
- package/dist/house-query.d.ts.map +1 -1
- package/dist/house-query.js +14 -1
- package/dist/index.d.ts +3 -3
- package/dist/media.js +3 -3
- package/dist/memory.d.ts +2 -2
- package/dist/memory.js +5 -5
- package/dist/outcome.js +1 -1
- package/dist/overlay.d.ts +3 -3
- package/dist/query.d.ts +2 -2
- package/dist/reach.js +7 -7
- package/dist/reference-forms.d.ts +4 -0
- package/dist/reference-forms.d.ts.map +1 -0
- package/dist/reference-forms.js +74 -0
- package/dist/refresh.d.ts +1 -1
- package/dist/refresh.js +4 -4
- package/dist/replica.js +2 -2
- package/dist/rows.d.ts +8 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +17 -4
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +6 -6
- package/dist/saves.d.ts +2 -2
- package/dist/saves.d.ts.map +1 -1
- package/dist/saves.js +14 -8
- package/dist/source.d.ts +2 -0
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +2 -0
- package/dist/store/records.d.ts +2 -1
- package/dist/store/records.d.ts.map +1 -1
- package/dist/store/records.js +3 -0
- package/dist/stored.d.ts +6 -0
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +18 -6
- package/dist/surface.d.ts +2 -2
- package/dist/surface.js +2 -2
- package/dist/sync.js +1 -1
- package/dist/tables.d.ts +8 -2
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +5 -1
- package/dist/validation.d.ts +2 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +49 -3
- package/dist/wire.d.ts +5 -5
- package/dist/wire.js +5 -5
- package/package.json +2 -2
package/dist/house-query.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { invalid, known, plain } from '@agentshouse/mdmodel';
|
|
2
2
|
import { listedOrHeld } from './listing.js';
|
|
3
|
+
import { normalize } from './paths.js';
|
|
3
4
|
import { failure, OFFLINE, UNCERTAIN, undeclared } from './outcome.js';
|
|
4
5
|
import { askedOnline, offline } from './online.js';
|
|
5
6
|
import { holds, queriedOnly } from './reach.js';
|
|
@@ -20,13 +21,25 @@ function freshOf(options) {
|
|
|
20
21
|
invalid('fresh', 'expects true or false');
|
|
21
22
|
return fresh;
|
|
22
23
|
}
|
|
24
|
+
function viewOf(query) {
|
|
25
|
+
known(query, ['path', 'after'], '');
|
|
26
|
+
const { path, after } = query;
|
|
27
|
+
if (typeof path !== 'string' || path === '' || normalize(path) !== path)
|
|
28
|
+
invalid('path', 'names a View by its Path in the Room');
|
|
29
|
+
if (after === undefined)
|
|
30
|
+
return { path };
|
|
31
|
+
if (typeof after !== 'string')
|
|
32
|
+
invalid('after', 'expects the next an earlier page answered');
|
|
33
|
+
return { path, after };
|
|
34
|
+
}
|
|
23
35
|
function houseQueryOf(input, options) {
|
|
24
36
|
if (!plain(input))
|
|
25
37
|
invalid('query', 'expects a query object');
|
|
26
38
|
const { rooms, ...query } = input;
|
|
27
39
|
if (!Array.isArray(rooms) || rooms.length !== 1 || typeof rooms[0] !== 'string')
|
|
28
40
|
invalid('rooms', 'names the one Room House answers');
|
|
29
|
-
|
|
41
|
+
const asked = { room: rooms[0], fresh: freshOf(options) };
|
|
42
|
+
return query.path === undefined ? { ...asked, query } : { ...asked, ...viewOf(query) };
|
|
30
43
|
}
|
|
31
44
|
async function heldHere(runtime, reach, room) {
|
|
32
45
|
return holds(reach, room) && listedOrHeld(runtime, await runtime.store.rooms([room]), room);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AcceptedMessage, AcceptedRoom, ActionDeclaration, ActionRequest, ActionResult, Adapter, AdapterFailure, AttachRequest, AttachResult, AuthorityChange, Authorization, BinaryCopy,
|
|
1
|
+
export type { AcceptedMessage, AcceptedRoom, ActionDeclaration, ActionRequest, ActionResult, Adapter, AdapterFailure, AttachRequest, AttachResult, AuthorityChange, Authorization, BinaryCopy, Attachment, BinaryLinkResult, BinaryRequest, BinaryResult, BootstrapPage, BootstrapRequest, BootstrapResult, Capability, ChangeAuthor, ContractUnavailable, ConversationAction, ConversationEvent, ConversationHistories, ConversationHistoryPage, ConversationHistoryRequest, ConversationMessage, ConversationStream, DiscoverResult, DiscoveredRoom, Discovery, SavedFacts, HistoryAuthor, HistoryRequest, HistoryResult, HistoryRetention, HistoryRevision, BootstrapPart, NotReady, HeldRoom, KeyedRequest, AgentEnvironment, ListedAgent, ListedConversation, ListedOwner, ListedSpaceRef, RoomList, RoomListEntry, SpaceListEntry, MdModelIdentity, Member, MutationRequest, MutationResult, PageToken, ProviderLimit, ProviderRefusal, RefreshPage, RefreshRequest, RefreshResult, Retention, RetryableRefusal, RevokedAuthorization, RoomChange, RoomModels, RoomNotReadable, RoomStream, RoomStreamEvent, RoomVersionAt, HouseQueryAnswer, HouseQueryAsk, HouseQueryGroups, HouseQueryRows, SearchAnswer, SearchAsk, ServiceMode, ServiceModeSignal, TransportUncertainty, TurnOperation, TypedPath, TypedSelection, } from './adapter.js';
|
|
2
2
|
export type { Change, ChangeBatch, Precondition, RoomMove, WrittenBy } from './change.js';
|
|
3
3
|
export { heldFacts } from './conversation-row.js';
|
|
4
4
|
export type { ConversationAsk, ConversationHeld, ConversationLast, ConversationStart, } from './conversation-row.js';
|
|
@@ -10,14 +10,14 @@ export type { HistoryQuery } from './actions.js';
|
|
|
10
10
|
export type { AppRoom, AppTypedSelection } from './listing.js';
|
|
11
11
|
export type { ConnectionRefusal, ConnectionRefusalCode } from './socket.js';
|
|
12
12
|
export type { MdRuntime, RoomSchemas } from './surface.js';
|
|
13
|
-
export type {
|
|
13
|
+
export type { AttachmentSurface, SavedParts, SavedRoomDraft, SaveResult } from './saves.js';
|
|
14
14
|
export type { Observation } from './observation.js';
|
|
15
15
|
export type { DayFigures, Figures, FiguresResult, RoomFigures } from './figures.js';
|
|
16
16
|
export type { HeldApp, Holdings, RoomDocuments } from './holdings.js';
|
|
17
17
|
export type { PresentationSurface, RoomDraftSurface } from './room-drafts.js';
|
|
18
18
|
export type { AttachAnswer, BinaryAnswer, BinaryLinkAnswer, CallResult, ShownAnswer, ConversationAttachAnswer, DownloadAnswer, Failure, HistoryAnswer, Offline, QueueEntry, Resolution, Submission, } from './outcome.js';
|
|
19
19
|
export { blobOf, declaredType } from './outcome.js';
|
|
20
|
-
export type {
|
|
20
|
+
export type { AttachmentRecord } from './binary.js';
|
|
21
21
|
export type { RuntimeError } from './failure.js';
|
|
22
22
|
export { refusalError } from './failure.js';
|
|
23
23
|
export type { ChangedPart, FieldValue, Marks, ReturnReason, RoomDraft, RoomDraftCreation, RoomDraftParts, RoomDraftWrite, TextParts, } from './room-draft.js';
|
package/dist/media.js
CHANGED
|
@@ -42,7 +42,7 @@ export function mediaTag(at) {
|
|
|
42
42
|
export function downloadAt(client, at) {
|
|
43
43
|
return 'link' in at
|
|
44
44
|
? downloadAttachment(client, at.link)
|
|
45
|
-
: client.
|
|
45
|
+
: client.attachment.download(at.room, at.path, at.revision);
|
|
46
46
|
}
|
|
47
47
|
function shownAt(client, at) {
|
|
48
48
|
if (at === null)
|
|
@@ -52,7 +52,7 @@ function shownAt(client, at) {
|
|
|
52
52
|
.attachment(at.link)
|
|
53
53
|
.then((shown) => (shown.kind === 'link' ? { ...shown, copies: [] } : shown));
|
|
54
54
|
}
|
|
55
|
-
return client.
|
|
55
|
+
return client.attachment.show(at.room, at.path, at.revision);
|
|
56
56
|
}
|
|
57
57
|
function ratioOf(width, height) {
|
|
58
58
|
const across = Number(width);
|
|
@@ -62,7 +62,7 @@ function ratioOf(width, height) {
|
|
|
62
62
|
: null;
|
|
63
63
|
}
|
|
64
64
|
function ownRatio(found, at) {
|
|
65
|
-
const record = 'documents' in found ? found.documents[0]?.
|
|
65
|
+
const record = 'documents' in found ? found.documents[0]?.attachment : undefined;
|
|
66
66
|
if (record?.state !== 'accepted' ||
|
|
67
67
|
(at.revision !== undefined && record.revision !== at.revision)) {
|
|
68
68
|
return null;
|
package/dist/memory.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VerifiedModel } from '@agentshouse/mdmodel';
|
|
2
2
|
import type { ModelResult } from './model.js';
|
|
3
|
-
import { type AcceptedMessage, type ActionResult, type Adapter, type
|
|
3
|
+
import { type AcceptedMessage, type ActionResult, type Adapter, type Attachment, type Capability, type ConversationAction, type ConversationEvent, type DiscoveredRoom, type SavedFacts, type HeadChange, type ListedAgent, type ListedConversation, type Member, type ProviderLimit, type Retention, type ServiceMode, type TypedPath, type TypedSelection } from './adapter.js';
|
|
4
4
|
export type MemoryRoom = Omit<DiscoveredRoom, 'typedSelection' | 'authoredPaths'> & {
|
|
5
5
|
typedSelection?: TypedSelection | null;
|
|
6
6
|
authoredPaths?: readonly string[];
|
|
@@ -11,7 +11,7 @@ export type MemoryRoom = Omit<DiscoveredRoom, 'typedSelection' | 'authoredPaths'
|
|
|
11
11
|
fileIds?: Readonly<Record<string, string>>;
|
|
12
12
|
created?: Readonly<Record<string, string>>;
|
|
13
13
|
changes?: Readonly<Record<string, HeadChange>>;
|
|
14
|
-
|
|
14
|
+
attachments?: Readonly<Record<string, Attachment>>;
|
|
15
15
|
folders?: readonly string[];
|
|
16
16
|
blobs?: Readonly<Record<string, Blob>>;
|
|
17
17
|
};
|
package/dist/memory.js
CHANGED
|
@@ -193,7 +193,7 @@ export function createMemoryAdapter(options = {}) {
|
|
|
193
193
|
const size = pageSize ?? paths.length;
|
|
194
194
|
const taken = paths.slice(from, from + size);
|
|
195
195
|
const next = from + taken.length;
|
|
196
|
-
const targets = opening ? Object.keys(room.
|
|
196
|
+
const targets = opening ? Object.keys(room.attachments ?? {}) : [];
|
|
197
197
|
return {
|
|
198
198
|
kind: 'bootstrap',
|
|
199
199
|
roomVersion: room.roomVersion,
|
|
@@ -208,7 +208,7 @@ export function createMemoryAdapter(options = {}) {
|
|
|
208
208
|
? {}
|
|
209
209
|
: { created: named(room.created, [...taken, ...targets]) }),
|
|
210
210
|
changes: named(room.changes ?? {}, [...taken, ...targets]),
|
|
211
|
-
|
|
211
|
+
attachments: named(room.attachments ?? {}, targets),
|
|
212
212
|
...(opening && room.folders !== undefined ? { folders: room.folders } : {}),
|
|
213
213
|
...(next < paths.length ? { pageToken: taken.at(-1) } : {}),
|
|
214
214
|
};
|
|
@@ -226,8 +226,8 @@ export function createMemoryAdapter(options = {}) {
|
|
|
226
226
|
function advancement(room, from, at, whole = false) {
|
|
227
227
|
const current = room.documents ?? {};
|
|
228
228
|
const previous = from.documents ?? {};
|
|
229
|
-
const currentTargets = new Set(Object.keys(room.
|
|
230
|
-
const previousTargets = new Set(Object.keys(from.
|
|
229
|
+
const currentTargets = new Set(Object.keys(room.attachments ?? {}));
|
|
230
|
+
const previousTargets = new Set(Object.keys(from.attachments ?? {}));
|
|
231
231
|
const headMoved = (path) => room.revisions?.[path] !== from.revisions?.[path] ||
|
|
232
232
|
room.fileIds?.[path] !== from.fileIds?.[path] ||
|
|
233
233
|
room.created?.[path] !== from.created?.[path] ||
|
|
@@ -260,7 +260,7 @@ export function createMemoryAdapter(options = {}) {
|
|
|
260
260
|
? {}
|
|
261
261
|
: { created: named(room.created, [...taken, ...targets]) }),
|
|
262
262
|
changes: named(room.changes ?? {}, [...taken, ...targets]),
|
|
263
|
-
|
|
263
|
+
attachments: named(room.attachments ?? {}, targets),
|
|
264
264
|
...(opening ? foldersMoved(room, from) : {}),
|
|
265
265
|
removals: opening
|
|
266
266
|
? [
|
package/dist/outcome.js
CHANGED
|
@@ -19,7 +19,7 @@ export const ABSENT_TARGET = {
|
|
|
19
19
|
retryable: false,
|
|
20
20
|
};
|
|
21
21
|
export function absentBinary(path) {
|
|
22
|
-
return { kind: 'absent', code: '
|
|
22
|
+
return { kind: 'absent', code: 'attachment-absent', fields: { path }, retryable: false };
|
|
23
23
|
}
|
|
24
24
|
export function declaredType(blob) {
|
|
25
25
|
return blob.type === '' ? MEDIA_TYPES.octetStream : blob.type;
|
package/dist/overlay.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ApplyResult } from '@agentshouse/mdmodel';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Attachment, HeadChange } from './adapter.js';
|
|
3
3
|
import { type Composition } from './collection.js';
|
|
4
4
|
import { type ChangeBatch } from './change.js';
|
|
5
5
|
export type Heads = {
|
|
@@ -10,7 +10,7 @@ export type Heads = {
|
|
|
10
10
|
};
|
|
11
11
|
export type HeldBinary = ({
|
|
12
12
|
readonly state: 'accepted';
|
|
13
|
-
} &
|
|
13
|
+
} & Attachment) | {
|
|
14
14
|
readonly state: 'pending';
|
|
15
15
|
readonly localId: string;
|
|
16
16
|
readonly byteLength: number;
|
|
@@ -21,7 +21,7 @@ export type Layer = Heads & {
|
|
|
21
21
|
documents: Readonly<Record<string, string>>;
|
|
22
22
|
binaries: Readonly<Record<string, HeldBinary>>;
|
|
23
23
|
};
|
|
24
|
-
export declare function acceptedBinaries(files: Readonly<Record<string,
|
|
24
|
+
export declare function acceptedBinaries(files: Readonly<Record<string, Attachment>>): Generator<readonly [string, HeldBinary]>;
|
|
25
25
|
export declare function sameBinary(left: HeldBinary | undefined, right: HeldBinary | undefined): boolean;
|
|
26
26
|
export declare function sameChange(left: HeadChange | undefined, right: HeadChange | undefined): boolean;
|
|
27
27
|
export declare function composed(path: string, fields: Readonly<Record<string, unknown>>, sections: Readonly<Record<string, string>>, composition: Composition): ApplyResult;
|
package/dist/query.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type HeldRooms, type QueryPlan } from '@agentshouse/mdmodel';
|
|
2
2
|
import type { HeadChange } from './adapter.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { AttachmentRecord } from './binary.js';
|
|
4
4
|
import type { Open } from './open.js';
|
|
5
5
|
export type Backlink = {
|
|
6
6
|
path: string;
|
|
@@ -19,7 +19,7 @@ export type QueryDocument = {
|
|
|
19
19
|
change?: HeadChange | null;
|
|
20
20
|
fileId?: string | null;
|
|
21
21
|
revision?: string | null;
|
|
22
|
-
|
|
22
|
+
attachment?: AttachmentRecord;
|
|
23
23
|
size?: number | null;
|
|
24
24
|
created?: string | null;
|
|
25
25
|
};
|
package/dist/reach.js
CHANGED
|
@@ -239,7 +239,7 @@ function queriesOnlyError(room) {
|
|
|
239
239
|
return runtimeError(QUERIES_ONLY, `${room} answers through queryHouse`);
|
|
240
240
|
}
|
|
241
241
|
function attachRequired() {
|
|
242
|
-
return runtimeError(ATTACH_REQUIRED, 'App code takes a file in with
|
|
242
|
+
return runtimeError(ATTACH_REQUIRED, 'App code takes a file in with attachment.attach');
|
|
243
243
|
}
|
|
244
244
|
function carriesFile(parts) {
|
|
245
245
|
return parts !== null && typeof parts === 'object' && Object.hasOwn(parts, 'file');
|
|
@@ -525,32 +525,32 @@ export function narrowed(runtime, given, attached) {
|
|
|
525
525
|
: (await runtime.locked(room))
|
|
526
526
|
? lockedRoom(room)
|
|
527
527
|
: md.history(room, path, query),
|
|
528
|
-
|
|
528
|
+
attachment: {
|
|
529
529
|
read: async (room, path, revision) => !covers(reach, room, path)
|
|
530
530
|
? failure({ kind: 'room-not-readable', locator: room })
|
|
531
531
|
: (await runtime.locked(room))
|
|
532
532
|
? lockedRoom(room)
|
|
533
|
-
: hand(md.
|
|
533
|
+
: hand(md.attachment.read(room, path, revision)),
|
|
534
534
|
link: async (room, path, revision) => !covers(reach, room, path)
|
|
535
535
|
? failure({ kind: 'room-not-readable', locator: room })
|
|
536
536
|
: (await runtime.locked(room))
|
|
537
537
|
? lockedRoom(room)
|
|
538
|
-
: md.
|
|
538
|
+
: md.attachment.link(room, path, revision),
|
|
539
539
|
show: async (room, path, revision) => !covers(reach, room, path)
|
|
540
540
|
? failure({ kind: 'room-not-readable', locator: room })
|
|
541
541
|
: (await runtime.locked(room))
|
|
542
542
|
? lockedRoom(room)
|
|
543
|
-
: hand(md.
|
|
543
|
+
: hand(md.attachment.show(room, path, revision)),
|
|
544
544
|
attach: async (room, file) => !wholly(reach, room)
|
|
545
545
|
? failure({ kind: 'room-not-readable', locator: room })
|
|
546
546
|
: (await runtime.locked(room))
|
|
547
547
|
? lockedRoom(room)
|
|
548
|
-
: md.
|
|
548
|
+
: md.attachment.attach(room, file),
|
|
549
549
|
async part(file, part) {
|
|
550
550
|
const key = files.get(file);
|
|
551
551
|
if (key === undefined)
|
|
552
552
|
return null;
|
|
553
|
-
const bytes = await md.
|
|
553
|
+
const bytes = await md.attachment.part(key, part);
|
|
554
554
|
if (bytes === null)
|
|
555
555
|
files.delete(file);
|
|
556
556
|
return bytes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-forms.d.ts","sourceRoot":"","sources":["../src/reference-forms.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,aAAa,CAAC;AAuBrD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGpD;AAuCD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAuB7D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ATTACHMENT_REFERENCE_PREFIX, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, DOCUMENT_REFERENCE_PREFIX, REVISION_REFERENCE_PREFIX, } from '@agentshouse/mdmodel';
|
|
2
|
+
import { text, texts } from './column.js';
|
|
3
|
+
import { markdownPath } from './rows.js';
|
|
4
|
+
const ORDINAL = `${CROCKFORD_LEADING_CHARACTER}${CROCKFORD_CHARACTER}*`;
|
|
5
|
+
const OLD_REVISION = new RegExp(`^fr_(${ORDINAL}\\.${ORDINAL}\\.${CROCKFORD_CHARACTER})$`, 'u');
|
|
6
|
+
const OLD_ENTRY = new RegExp(`^af_(${ORDINAL})\\.(${CROCKFORD_CHARACTER})$`, 'u');
|
|
7
|
+
const RECORDS = [
|
|
8
|
+
['authored_pending', 'batch', ['locator', 'id']],
|
|
9
|
+
['authored_pending', 'state', ['locator', 'id']],
|
|
10
|
+
['authored_room_drafts', 'record', ['locator', 'path']],
|
|
11
|
+
['authored_chat_drafts', 'record', ['conversation']],
|
|
12
|
+
['authored_calls', 'record', ['operation']],
|
|
13
|
+
];
|
|
14
|
+
const REVISIONS = [
|
|
15
|
+
['replica_entries', 'revision'],
|
|
16
|
+
['opened_files', 'revision'],
|
|
17
|
+
];
|
|
18
|
+
export function kindedRevision(value) {
|
|
19
|
+
const revision = OLD_REVISION.exec(value);
|
|
20
|
+
return revision === null ? value : `${REVISION_REFERENCE_PREFIX}${revision[1]}`;
|
|
21
|
+
}
|
|
22
|
+
function kindedReference(value, paths) {
|
|
23
|
+
const revised = kindedRevision(value);
|
|
24
|
+
if (revised !== value)
|
|
25
|
+
return revised;
|
|
26
|
+
const entry = OLD_ENTRY.exec(value);
|
|
27
|
+
const path = entry === null ? undefined : paths.get(entry[1]);
|
|
28
|
+
if (entry === null || path === undefined)
|
|
29
|
+
return value;
|
|
30
|
+
const prefix = markdownPath(path) ? DOCUMENT_REFERENCE_PREFIX : ATTACHMENT_REFERENCE_PREFIX;
|
|
31
|
+
return `${prefix}${entry[1]}.${entry[2]}`;
|
|
32
|
+
}
|
|
33
|
+
function kinded(value, paths) {
|
|
34
|
+
if (typeof value === 'string')
|
|
35
|
+
return kindedReference(value, paths);
|
|
36
|
+
if (Array.isArray(value))
|
|
37
|
+
return value.map((item) => kinded(item, paths));
|
|
38
|
+
if (value === null || typeof value !== 'object')
|
|
39
|
+
return value;
|
|
40
|
+
return Object.fromEntries(Object.entries(value).map(([name, item]) => [name, kinded(item, paths)]));
|
|
41
|
+
}
|
|
42
|
+
function heldColumns(connection, table) {
|
|
43
|
+
return new Set(texts(connection.rows('SELECT name FROM pragma_table_info(?)', [table]), 'name'));
|
|
44
|
+
}
|
|
45
|
+
function heldPaths(connection) {
|
|
46
|
+
const columns = heldColumns(connection, 'replica_entries');
|
|
47
|
+
if (!columns.has('file_id') || !columns.has('path'))
|
|
48
|
+
return new Map();
|
|
49
|
+
return new Map(connection
|
|
50
|
+
.rows('SELECT DISTINCT file_id, path FROM replica_entries WHERE file_id IS NOT NULL')
|
|
51
|
+
.map((row) => [text(row.file_id), text(row.path)]));
|
|
52
|
+
}
|
|
53
|
+
function holdingOldForm(column) {
|
|
54
|
+
return `(${column} LIKE '%"fr\\_%' ESCAPE '\\' OR ${column} LIKE '%"af\\_%' ESCAPE '\\')`;
|
|
55
|
+
}
|
|
56
|
+
export function kindedReferences(connection) {
|
|
57
|
+
for (const [table, column] of REVISIONS) {
|
|
58
|
+
if (!heldColumns(connection, table).has(column))
|
|
59
|
+
continue;
|
|
60
|
+
connection.run(`UPDATE ${table} SET ${column} = '${REVISION_REFERENCE_PREFIX}' || substr(${column}, 4) WHERE ${column} LIKE 'fr\\_%' ESCAPE '\\'`);
|
|
61
|
+
}
|
|
62
|
+
let paths = null;
|
|
63
|
+
for (const [table, column, keys] of RECORDS) {
|
|
64
|
+
const held = connection.rows(`SELECT ${keys.join(', ')}, ${column} AS value FROM ${table} WHERE ${holdingOldForm(column)}`);
|
|
65
|
+
for (const row of held) {
|
|
66
|
+
paths ??= heldPaths(connection);
|
|
67
|
+
const value = JSON.parse(text(row.value));
|
|
68
|
+
const written = JSON.stringify(kinded(value, paths));
|
|
69
|
+
if (written === JSON.stringify(value))
|
|
70
|
+
continue;
|
|
71
|
+
connection.run(`UPDATE ${table} SET ${column} = ? WHERE ${keys.map((key) => `${key} = ?`).join(' AND ')}`, [written, ...keys.map((key) => row[key])]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
package/dist/refresh.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type Refreshing = {
|
|
|
20
20
|
later(paths: readonly string[], roomVersion: string): Promise<ReadonlySet<string>>;
|
|
21
21
|
stage(page: RefreshedPage): Promise<boolean>;
|
|
22
22
|
};
|
|
23
|
-
type PageContent = Pick<RefreshPage, 'documents' | 'facts' | 'revisions' | 'fileIds' | 'created' | 'changes' | '
|
|
23
|
+
type PageContent = Pick<RefreshPage, 'documents' | 'facts' | 'revisions' | 'fileIds' | 'created' | 'changes' | 'attachments'>;
|
|
24
24
|
export declare function pageEntries(page: PageContent, removals: readonly string[], roomVersion: string, prior: (paths: readonly string[]) => Promise<ReadonlyMap<string, HeldEntry>>): Promise<StoredEntry[]>;
|
|
25
25
|
export declare function advancement(refresh: Refresher, authorization: Authorization, held: ReplicaRecord, remodel: Remodel, continuing: () => boolean, staging: Refreshing): Promise<Advancement>;
|
|
26
26
|
export {};
|
package/dist/refresh.js
CHANGED
|
@@ -12,7 +12,7 @@ function* listing(page, removals) {
|
|
|
12
12
|
const written = new Set();
|
|
13
13
|
for (const [kept, named] of [
|
|
14
14
|
[documents, page.documents],
|
|
15
|
-
[binaries, page.
|
|
15
|
+
[binaries, page.attachments],
|
|
16
16
|
]) {
|
|
17
17
|
for (const path of Object.keys(named)) {
|
|
18
18
|
yield ROW_WEIGHT;
|
|
@@ -60,7 +60,7 @@ function* entering(page, roomVersion, listed, prior) {
|
|
|
60
60
|
path,
|
|
61
61
|
content: null,
|
|
62
62
|
facts: null,
|
|
63
|
-
binary: { state: 'accepted', ...page.
|
|
63
|
+
binary: { state: 'accepted', ...page.attachments[path] },
|
|
64
64
|
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
65
65
|
fileId: page.fileIds?.[path] ?? null,
|
|
66
66
|
created: page.created?.[path] ?? null,
|
|
@@ -104,14 +104,14 @@ function unwritten(page, kept) {
|
|
|
104
104
|
...(page.fileIds === undefined ? {} : { fileIds: without(page.fileIds, kept) }),
|
|
105
105
|
...(page.created === undefined ? {} : { created: without(page.created, kept) }),
|
|
106
106
|
changes: without(page.changes, kept),
|
|
107
|
-
|
|
107
|
+
attachments: without(page.attachments, kept),
|
|
108
108
|
removals: page.removals.filter((path) => !kept.has(path)),
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
async function pageOf(answered, roomVersion, staging) {
|
|
112
112
|
const page = unwritten(answered, await staging.later([
|
|
113
113
|
...Object.keys(answered.documents),
|
|
114
|
-
...Object.keys(answered.
|
|
114
|
+
...Object.keys(answered.attachments),
|
|
115
115
|
...answered.removals,
|
|
116
116
|
], roomVersion));
|
|
117
117
|
return {
|
package/dist/replica.js
CHANGED
|
@@ -353,7 +353,7 @@ export function returnedPaths(submitted, accepted) {
|
|
|
353
353
|
...Object.keys(accepted.revisions),
|
|
354
354
|
...Object.keys(accepted.fileIds ?? {}),
|
|
355
355
|
...Object.keys(accepted.changes),
|
|
356
|
-
...Object.keys(accepted.
|
|
356
|
+
...Object.keys(accepted.attachments ?? {}),
|
|
357
357
|
...accepted.removals,
|
|
358
358
|
]);
|
|
359
359
|
for (const change of submitted.changes) {
|
|
@@ -420,7 +420,7 @@ export function* returning(confirmed, submitted, accepted, writtenAt, compositio
|
|
|
420
420
|
binaries.set(change.to, moved);
|
|
421
421
|
binaries.set(change.path, undefined);
|
|
422
422
|
}
|
|
423
|
-
for (const [path, binary] of acceptedBinaries(accepted.
|
|
423
|
+
for (const [path, binary] of acceptedBinaries(accepted.attachments ?? {}))
|
|
424
424
|
binaries.set(path, binary);
|
|
425
425
|
for (const path of accepted.removals) {
|
|
426
426
|
binaries.set(path, undefined);
|
package/dist/rows.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HeldValue } from '@agentshouse/mdmodel';
|
|
1
|
+
import { type Definition, type HeldValue } from '@agentshouse/mdmodel';
|
|
2
2
|
import type { SavedFacts } from './adapter.js';
|
|
3
3
|
import { type Composition } from './collection.js';
|
|
4
4
|
import type { PlanReach } from './query.js';
|
|
@@ -22,9 +22,15 @@ export type Held = {
|
|
|
22
22
|
readonly fields: Readonly<Record<string, unknown>> | null;
|
|
23
23
|
readonly links: readonly string[];
|
|
24
24
|
};
|
|
25
|
+
export type Sought = {
|
|
26
|
+
readonly type: string;
|
|
27
|
+
readonly field: string;
|
|
28
|
+
readonly value: string;
|
|
29
|
+
};
|
|
25
30
|
export type Derived = {
|
|
26
31
|
readonly values: readonly HeldValue[];
|
|
27
32
|
readonly links: readonly HeldLink[];
|
|
33
|
+
readonly unique: readonly Sought[];
|
|
28
34
|
};
|
|
29
35
|
export declare function documentKey(room: string, path: string): string;
|
|
30
36
|
export declare function roomOfKey(key: string): string;
|
|
@@ -35,6 +41,7 @@ export declare function folderOf(path: string): string;
|
|
|
35
41
|
export declare function writtenFacts(path: string, content: string, composition: Composition): SavedFacts | null;
|
|
36
42
|
export declare function described(path: string, content: string | null, facts: SavedFacts | null): Described;
|
|
37
43
|
export declare function heldOf(path: string, content: string | null, facts: SavedFacts | null): Held;
|
|
44
|
+
export declare function uniqueValues(type: string, fields: Readonly<Record<string, unknown>>, definition: Definition | undefined): Sought[];
|
|
38
45
|
export declare function derived(path: string, held: Held, composition: Composition): Derived;
|
|
39
46
|
export {};
|
|
40
47
|
//# 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,
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../src/rows.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAA4B,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,KAAK,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjC,KAAK,QAAQ,GAAG;IACd,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,M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AC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI,CAK3F;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzC,UAAU,EAAE,UAAU,GAAG,SAAS,GACjC,MAAM,EAAE,CAMV;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAgBnF"}
|
package/dist/rows.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { byCodePoint, documentFacts, indexed, parse } from '@agentshouse/mdmodel';
|
|
1
|
+
import { byCodePoint, documentFacts, fieldKey, indexed, parse, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { definitionsAt, governing } from './collection.js';
|
|
3
3
|
function keyOf(...parts) {
|
|
4
4
|
return `${parts.join('\u0000')}\u0000`;
|
|
@@ -15,8 +15,9 @@ export function roomsOfReach(reach) {
|
|
|
15
15
|
export function pathOfKey(key) {
|
|
16
16
|
return key.split('\u0000')[2];
|
|
17
17
|
}
|
|
18
|
+
const MARKDOWN = /\.md$/iu;
|
|
18
19
|
export function markdownPath(path) {
|
|
19
|
-
return
|
|
20
|
+
return MARKDOWN.test(path);
|
|
20
21
|
}
|
|
21
22
|
export function folderOf(path) {
|
|
22
23
|
return path.slice(0, Math.max(path.lastIndexOf('/'), 0));
|
|
@@ -61,6 +62,14 @@ export function heldOf(path, content, facts) {
|
|
|
61
62
|
? { type: facts.type, fields: facts.fields, links: facts.links }
|
|
62
63
|
: { type: null, fields: null, links: facts.links };
|
|
63
64
|
}
|
|
65
|
+
export function uniqueValues(type, fields, definition) {
|
|
66
|
+
if (definition === undefined)
|
|
67
|
+
return [];
|
|
68
|
+
return (definition.unique ?? []).flatMap((field) => {
|
|
69
|
+
const { key, unique } = fieldKey(definition, fields, field);
|
|
70
|
+
return unique ? [{ type, field, value: key }] : [];
|
|
71
|
+
});
|
|
72
|
+
}
|
|
64
73
|
export function derived(path, held, composition) {
|
|
65
74
|
const stored = held.links.map((target) => ({
|
|
66
75
|
kind: 'link',
|
|
@@ -70,8 +79,12 @@ export function derived(path, held, composition) {
|
|
|
70
79
|
field: '',
|
|
71
80
|
}));
|
|
72
81
|
if (held.type === null || held.fields === null)
|
|
73
|
-
return { values: [], links: stored };
|
|
82
|
+
return { values: [], links: stored, unique: [] };
|
|
74
83
|
const definition = definitionsAt(composition, path)(held.type);
|
|
75
84
|
const { values, links: fields } = indexed(path, held.fields, definition);
|
|
76
|
-
return {
|
|
85
|
+
return {
|
|
86
|
+
values,
|
|
87
|
+
links: [...fields, ...stored],
|
|
88
|
+
unique: uniqueValues(held.type, held.fields, definition),
|
|
89
|
+
};
|
|
77
90
|
}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type Runtime = {
|
|
|
23
23
|
readonly roomTypes: Parameters<typeof schemaTypes>[1];
|
|
24
24
|
readonly builtIn: ModelState;
|
|
25
25
|
readonly typedPaths: readonly TypedPath[];
|
|
26
|
+
readonly renamedActions: ReadonlyMap<string, string>;
|
|
26
27
|
readonly writeRule: (declaration: RoomDeclaration) => WriteRule;
|
|
27
28
|
readonly build: string;
|
|
28
29
|
readonly conversations: LiveConversations;
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAA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C,CAItC;AA4uCD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,GAAG,IAAI,CAKxF;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CAE7F"}
|
package/dist/save.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { apply, ARRAY_INDEX, ATTACHMENT, create, links, parse, pointerSegments, references, relative, relativize, retarget, roomReferences, serialize, target, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { immutable, isPart, leaving, queuedFile, departure, } from './change.js';
|
|
3
|
-
import { collectionOf, definitionsAt, documentsOf, governing,
|
|
3
|
+
import { collectionOf, definitionsAt, documentsOf, governing, typeAt, UNTYPED, } from './collection.js';
|
|
4
4
|
import { changeBatchIdentity, roomDraftRevision } from './identity.js';
|
|
5
5
|
import { composed, overlaying } from './overlay.js';
|
|
6
6
|
import { ancestors } from './paths.js';
|
|
@@ -817,8 +817,8 @@ function* limiting(queue, batch, limits, state) {
|
|
|
817
817
|
const limited = yield* exceeding(limits, batch.changes, rewritten.changes, yield* state(queue.slice(0, at + 1)));
|
|
818
818
|
return limited?.refusal ?? null;
|
|
819
819
|
}
|
|
820
|
-
function typedContent(content) {
|
|
821
|
-
return content !== undefined &&
|
|
820
|
+
function typedContent(composition, path, content) {
|
|
821
|
+
return (content !== undefined && (typeAt(composition, path, parse(content)) ?? UNTYPED) !== UNTYPED);
|
|
822
822
|
}
|
|
823
823
|
function touchedLibrary(resulting, touched, composition) {
|
|
824
824
|
const entries = touched
|
|
@@ -838,7 +838,7 @@ function touchedLibrary(resulting, touched, composition) {
|
|
|
838
838
|
if (binaries.has(path))
|
|
839
839
|
known.set(path, { type: undefined, binary: true });
|
|
840
840
|
else if (content !== undefined && content !== null) {
|
|
841
|
-
const type =
|
|
841
|
+
const type = typeAt(composition, path, parse(content, path, definitionsAt(composition, path)));
|
|
842
842
|
if (type !== undefined)
|
|
843
843
|
known.set(path, { type, binary: false });
|
|
844
844
|
await pace(content.length + ROW_WEIGHT);
|
|
@@ -858,7 +858,7 @@ async function judging(visible, resulting, composition, validate, removed, touch
|
|
|
858
858
|
for (const path of touched) {
|
|
859
859
|
const before = visible.documents[path];
|
|
860
860
|
const after = resulting.documents[path];
|
|
861
|
-
if (typedContent(before) || typedContent(after))
|
|
861
|
+
if (typedContent(composition, path, before) || typedContent(composition, path, after))
|
|
862
862
|
typedPaths.push(path);
|
|
863
863
|
await pace((before?.length ?? 0) + (after?.length ?? 0) + ROW_WEIGHT);
|
|
864
864
|
}
|
|
@@ -1097,7 +1097,7 @@ function unreadable(saved, visible, composition) {
|
|
|
1097
1097
|
const path = saved.find(({ path: at, parts }) => (parts.fields !== undefined ||
|
|
1098
1098
|
parts.sections !== undefined ||
|
|
1099
1099
|
parts.preamble !== undefined) &&
|
|
1100
|
-
typedContent(visible.documents[at]) &&
|
|
1100
|
+
typedContent(composition, at, visible.documents[at]) &&
|
|
1101
1101
|
governing(composition, at).status === 'unavailable')?.path;
|
|
1102
1102
|
return path === undefined ? null : refuse('model-unavailable', path);
|
|
1103
1103
|
}
|
package/dist/saves.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type SavedParts = {
|
|
|
19
19
|
readonly path: string;
|
|
20
20
|
readonly parts: RoomDraftParts;
|
|
21
21
|
};
|
|
22
|
-
export type
|
|
22
|
+
export type AttachmentSurface = {
|
|
23
23
|
read(room: string, path: string, revision?: string): Promise<HeldBinaryAnswer>;
|
|
24
24
|
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
25
25
|
show(room: string, path: string, revision?: string): Promise<HeldShownAnswer>;
|
|
@@ -30,5 +30,5 @@ export declare function saveRoomDrafts(runtime: Runtime, locator: string, named:
|
|
|
30
30
|
export declare function saveParts(runtime: Runtime, locator: string, named: readonly SavedParts[], writtenBy: WrittenBy | undefined): Promise<SaveResult>;
|
|
31
31
|
export declare function batchFile(store: Store, batch: ChangeBatch): (localId: string) => Promise<Blob>;
|
|
32
32
|
export declare function conversationFiles(runtime: Runtime): ConversationFiles;
|
|
33
|
-
export declare function
|
|
33
|
+
export declare function attachmentSurface(runtime: Runtime): AttachmentSurface;
|
|
34
34
|
//# sourceMappingURL=saves.d.ts.map
|
package/dist/saves.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saves.d.ts","sourceRoot":"","sources":["../src/saves.ts"],"names":[],"mappings":"AAUA,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAGrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAatB,OAAO,EAQL,KAAK,cAAc,EAGpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAsB,KAAK,EAAoB,MAAM,YAAY,CAAC;AAK9E,MAAM,MAAM,UAAU,GAClB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACxC,CAAC;IAAE,OAAO,EAAE,SAAS,CAAA;CAAE,GAAG,WAAW,CAAC,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,Q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