@agentshouse/mdruntime 0.1.0-ca9a5a0b81b98 → 0.1.0-ca9afacd5aebd
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 +135 -48
- package/README.md +20 -10
- package/dist/adapter.d.ts +49 -14
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +15 -2
- package/dist/attempt.d.ts +16 -0
- package/dist/attempt.d.ts.map +1 -0
- package/dist/attempt.js +57 -0
- package/dist/binary.d.ts +23 -0
- package/dist/binary.d.ts.map +1 -0
- package/dist/binary.js +8 -0
- package/dist/bootstrap.d.ts +17 -5
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +89 -38
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +19 -12
- package/dist/change.d.ts +15 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +26 -1
- package/dist/chat/acts.d.ts +34 -0
- package/dist/chat/acts.d.ts.map +1 -0
- package/dist/chat/acts.js +36 -0
- package/dist/chat/context.d.ts +3 -0
- package/dist/chat/context.d.ts.map +1 -0
- package/dist/chat/context.js +10 -0
- package/dist/chat/input.d.ts +9 -0
- package/dist/chat/input.d.ts.map +1 -0
- package/dist/chat/input.js +99 -0
- package/dist/chat/kit.d.ts +60 -0
- package/dist/chat/kit.d.ts.map +1 -0
- package/dist/chat/kit.js +123 -0
- package/dist/chat/lasting.d.ts +6 -0
- package/dist/chat/lasting.d.ts.map +1 -0
- package/dist/chat/lasting.js +19 -0
- package/dist/chat/list.d.ts +20 -0
- package/dist/chat/list.d.ts.map +1 -0
- package/dist/chat/list.js +59 -0
- package/dist/chat/markdown.d.ts +19 -0
- package/dist/chat/markdown.d.ts.map +1 -0
- package/dist/chat/markdown.js +187 -0
- package/dist/chat/message.d.ts +6 -0
- package/dist/chat/message.d.ts.map +1 -0
- package/dist/chat/message.js +192 -0
- package/dist/chat/messages.d.ts +21 -0
- package/dist/chat/messages.d.ts.map +1 -0
- package/dist/chat/messages.js +151 -0
- package/dist/chat/name.d.ts +6 -0
- package/dist/chat/name.d.ts.map +1 -0
- package/dist/chat/name.js +37 -0
- package/dist/chat/opened.d.ts +11 -0
- package/dist/chat/opened.d.ts.map +1 -0
- package/dist/chat/opened.js +17 -0
- package/dist/chat/overlay.d.ts +31 -0
- package/dist/chat/overlay.d.ts.map +1 -0
- package/dist/chat/overlay.js +97 -0
- package/dist/chat/parts.d.ts +57 -0
- package/dist/chat/parts.d.ts.map +1 -0
- package/dist/chat/parts.js +119 -0
- package/dist/chat/process.d.ts +20 -0
- package/dist/chat/process.d.ts.map +1 -0
- package/dist/chat/process.js +32 -0
- package/dist/chat/provider.d.ts +63 -0
- package/dist/chat/provider.d.ts.map +1 -0
- package/dist/chat/provider.js +645 -0
- package/dist/chat/question.d.ts +9 -0
- package/dist/chat/question.d.ts.map +1 -0
- package/dist/chat/question.js +80 -0
- package/dist/chat/questions.d.ts +31 -0
- package/dist/chat/questions.d.ts.map +1 -0
- package/dist/chat/questions.js +111 -0
- package/dist/chat/read.d.ts +5 -0
- package/dist/chat/read.d.ts.map +1 -0
- package/dist/chat/read.js +13 -0
- package/dist/chat/ready.d.ts +33 -0
- package/dist/chat/ready.d.ts.map +1 -0
- package/dist/chat/ready.js +91 -0
- package/dist/chat/style.d.ts +4 -0
- package/dist/chat/style.d.ts.map +1 -0
- package/dist/chat/style.js +302 -0
- package/dist/chat.d.ts +14 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +8 -0
- package/dist/client.d.ts +16 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +65 -15
- package/dist/collection.d.ts +6 -11
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +56 -19
- package/dist/connection.d.ts +24 -11
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +478 -145
- package/dist/conversation.d.ts +11 -3
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +47 -7
- package/dist/expectation.d.ts +21 -0
- package/dist/expectation.d.ts.map +1 -0
- package/dist/expectation.js +70 -0
- package/dist/failure.d.ts +13 -0
- package/dist/failure.d.ts.map +1 -0
- package/dist/failure.js +19 -0
- package/dist/host.d.ts +1 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +9 -8
- package/dist/identity.d.ts +3 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +13 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/memory.d.ts +4 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +61 -20
- package/dist/model.d.ts +13 -8
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +6 -3
- package/dist/open.d.ts +2 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/open.js +1 -0
- package/dist/outcome.d.ts +28 -3
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +41 -1
- package/dist/overlay.d.ts +14 -3
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +75 -37
- package/dist/paths.d.ts +0 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +0 -16
- package/dist/query.d.ts +5 -1
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +74 -33
- package/dist/reach.d.ts +2 -0
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +44 -35
- package/dist/react.d.ts +26 -16
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +10 -8
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +111 -48
- package/dist/refresh.d.ts +10 -0
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +42 -38
- package/dist/replica.d.ts +8 -5
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +86 -55
- package/dist/room-draft.d.ts +26 -9
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +132 -23
- package/dist/rows.d.ts +7 -2
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +85 -40
- package/dist/save.d.ts +28 -1
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +428 -77
- package/dist/search.d.ts +3 -2
- package/dist/search.d.ts.map +1 -1
- package/dist/status.d.ts +2 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +0 -8
- package/dist/store.d.ts +34 -9
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +273 -164
- package/dist/wire.d.ts +7 -3
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +15 -2
- package/package.json +17 -9
- package/dist/attachment.d.ts +0 -3
- package/dist/attachment.d.ts.map +0 -1
- package/dist/attachment.js +0 -8
package/dist/reach.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { unheldView } from './conversation.js';
|
|
2
2
|
import { modelTypes, NO_MODEL } from './model.js';
|
|
3
3
|
import { applied, observing } from './observation.js';
|
|
4
|
+
import { runtimeError } from './failure.js';
|
|
5
|
+
import { failure, undeclared, } from './outcome.js';
|
|
4
6
|
import { beneath } from './paths.js';
|
|
5
7
|
import { reconciled } from './read-side.js';
|
|
6
|
-
import { moveTarget, readParts } from './room-draft.js';
|
|
8
|
+
import { moveTarget, readParts, staleWrite, } from './room-draft.js';
|
|
7
9
|
import { documentKey } from './rows.js';
|
|
8
10
|
const UNHELD_TYPES = { collection: modelTypes(NO_MODEL), typedSelection: null };
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return Promise.resolve(UNDECLARED);
|
|
11
|
+
function unconversed(name) {
|
|
12
|
+
return () => Promise.resolve(undeclared(name));
|
|
12
13
|
}
|
|
13
14
|
const NO_CONVERSATION = {
|
|
14
15
|
list: () => Promise.resolve([]),
|
|
15
16
|
read: (conversation) => Promise.resolve(unheldView(conversation)),
|
|
16
|
-
create:
|
|
17
|
-
send:
|
|
18
|
-
answer:
|
|
19
|
-
interrupt:
|
|
20
|
-
kill:
|
|
21
|
-
cancel:
|
|
22
|
-
delete:
|
|
17
|
+
create: unconversed('conversation.create'),
|
|
18
|
+
send: unconversed('conversation.send'),
|
|
19
|
+
answer: unconversed('conversation.answer'),
|
|
20
|
+
interrupt: unconversed('conversation.interrupt'),
|
|
21
|
+
kill: unconversed('conversation.kill'),
|
|
22
|
+
cancel: unconversed('conversation.cancel'),
|
|
23
|
+
delete: unconversed('conversation.delete'),
|
|
23
24
|
};
|
|
24
25
|
const NO_CHAT_DRAFT = {
|
|
25
26
|
write: () => Promise.resolve(),
|
|
@@ -51,6 +52,20 @@ function covers(reach, room, path) {
|
|
|
51
52
|
function conversing(reach) {
|
|
52
53
|
return reach === null || reach.conversations;
|
|
53
54
|
}
|
|
55
|
+
function refers(reach, scope) {
|
|
56
|
+
if (reach === null)
|
|
57
|
+
return true;
|
|
58
|
+
if (scope === null)
|
|
59
|
+
return false;
|
|
60
|
+
if (scope.kind === 'conversations')
|
|
61
|
+
return reach.conversations;
|
|
62
|
+
return scope.path === undefined
|
|
63
|
+
? wholly(reach, scope.locator)
|
|
64
|
+
: covers(reach, scope.locator, scope.path);
|
|
65
|
+
}
|
|
66
|
+
function unreachedReference(fileRef) {
|
|
67
|
+
return { kind: 'absent', code: 'binary-file-absent', fields: { fileRef }, retryable: false };
|
|
68
|
+
}
|
|
54
69
|
export function planReach(reach) {
|
|
55
70
|
return reach === null
|
|
56
71
|
? null
|
|
@@ -62,22 +77,7 @@ export function planReach(reach) {
|
|
|
62
77
|
};
|
|
63
78
|
}
|
|
64
79
|
function roomsWithin(reach, rooms) {
|
|
65
|
-
|
|
66
|
-
return rooms;
|
|
67
|
-
return rooms
|
|
68
|
-
.filter((room) => holds(reach, room.locator))
|
|
69
|
-
.map((room) => {
|
|
70
|
-
if (wholly(reach, room.locator))
|
|
71
|
-
return room;
|
|
72
|
-
const governed = governs(reach, room);
|
|
73
|
-
return {
|
|
74
|
-
...room,
|
|
75
|
-
model: governed.collection ? room.model : modelTypes(NO_MODEL),
|
|
76
|
-
typedSelection: governed.selection ? room.typedSelection : null,
|
|
77
|
-
roomVersion: null,
|
|
78
|
-
attachments: [],
|
|
79
|
-
};
|
|
80
|
-
});
|
|
80
|
+
return rooms.filter((room) => wholly(reach, room.locator));
|
|
81
81
|
}
|
|
82
82
|
function typesWithin(reach, room, types) {
|
|
83
83
|
if (room === undefined)
|
|
@@ -103,7 +103,7 @@ function shownDraft(reach, draft) {
|
|
|
103
103
|
function writeWithin(reach, write) {
|
|
104
104
|
return write.outcome === 'written'
|
|
105
105
|
? { outcome: 'written', roomDraft: shownDraft(reach, write.roomDraft) }
|
|
106
|
-
:
|
|
106
|
+
: staleWrite(shownDraft(reach, write.current));
|
|
107
107
|
}
|
|
108
108
|
function savedWithin(reach, room, result) {
|
|
109
109
|
if (reach === null || result.outcome === 'saved')
|
|
@@ -130,7 +130,7 @@ function queueWithin(reach, room, entries) {
|
|
|
130
130
|
(change.kind !== 'move' || covers(reach, room, change.to))));
|
|
131
131
|
}
|
|
132
132
|
function unreached(room) {
|
|
133
|
-
return
|
|
133
|
+
return runtimeError('room-not-held', `No Local Replica for ${room}`);
|
|
134
134
|
}
|
|
135
135
|
export function narrowed(runtime, given) {
|
|
136
136
|
const { md, watch } = runtime;
|
|
@@ -201,7 +201,7 @@ export function narrowed(runtime, given) {
|
|
|
201
201
|
return () => { };
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
if (topic === 'conversations') {
|
|
204
|
+
if (topic === 'conversations' || topic === 'agents') {
|
|
205
205
|
return following(() => {
|
|
206
206
|
if (conversing(reach))
|
|
207
207
|
return watch(topic, input, deliver);
|
|
@@ -231,13 +231,22 @@ export function narrowed(runtime, given) {
|
|
|
231
231
|
throw unreached(room);
|
|
232
232
|
const outside = roomDrafts.find(({ path }) => !covers(reach, room, path) ||
|
|
233
233
|
!moves(reach, room, md.roomDraft.read(room, path)?.parts.move));
|
|
234
|
-
if (outside !== undefined)
|
|
235
|
-
return { outcome: 'refused',
|
|
234
|
+
if (outside !== undefined) {
|
|
235
|
+
return { outcome: 'refused', code: 'stale', retryable: false, file: outside.path };
|
|
236
|
+
}
|
|
236
237
|
return savedWithin(reach, room, await md.save(room, roomDrafts, writtenBy));
|
|
237
238
|
},
|
|
238
239
|
history: (room, path, query) => covers(reach, room, path)
|
|
239
240
|
? md.history(room, path, query)
|
|
240
|
-
: Promise.resolve({ kind: 'room-not-readable', locator: room }),
|
|
241
|
+
: Promise.resolve(failure({ kind: 'room-not-readable', locator: room })),
|
|
242
|
+
binaryFile: {
|
|
243
|
+
read: (room, path, revision) => covers(reach, room, path)
|
|
244
|
+
? md.binaryFile.read(room, path, revision)
|
|
245
|
+
: Promise.resolve(failure({ kind: 'room-not-readable', locator: room })),
|
|
246
|
+
readReference: (reference) => refers(reach, runtime.referrerScope(reference.referrer))
|
|
247
|
+
? md.binaryFile.readReference(reference)
|
|
248
|
+
: Promise.resolve(unreachedReference(reference.fileRef)),
|
|
249
|
+
},
|
|
241
250
|
reached: (room, roomVersion, path) => (path === undefined ? wholly(reach, room) : covers(reach, room, path)) &&
|
|
242
251
|
md.reached(room, roomVersion, path),
|
|
243
252
|
log: () => (reach === null ? md.log() : ''),
|
|
@@ -252,7 +261,7 @@ export function narrowed(runtime, given) {
|
|
|
252
261
|
},
|
|
253
262
|
async discard(room, path, revision) {
|
|
254
263
|
if (!covers(reach, room, path))
|
|
255
|
-
return
|
|
264
|
+
return staleWrite(null);
|
|
256
265
|
return writeWithin(reach, await md.roomDraft.discard(room, path, revision));
|
|
257
266
|
},
|
|
258
267
|
},
|
|
@@ -268,7 +277,7 @@ export function narrowed(runtime, given) {
|
|
|
268
277
|
delete: (id) => conversation().delete(id),
|
|
269
278
|
},
|
|
270
279
|
chatDraft: {
|
|
271
|
-
write: (id, draft) => chatDraft().write(id, draft),
|
|
280
|
+
write: (id, draft, revision) => chatDraft().write(id, draft, revision),
|
|
272
281
|
discard: (id) => chatDraft().discard(id),
|
|
273
282
|
},
|
|
274
283
|
observe: observing(within),
|
package/dist/react.d.ts
CHANGED
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
import type { MdRuntimeClient } from './client.js';
|
|
2
2
|
import type { AppRoom, ConnectionRefusal, SaveResult } from './connection.js';
|
|
3
|
-
import type { ServiceMode } from './adapter.js';
|
|
4
|
-
import type { ConversationEntry, ConversationOptions, ConversationView } from './conversation.js';
|
|
3
|
+
import type { Member, ServiceMode } from './adapter.js';
|
|
4
|
+
import type { ConversationAgent, ConversationEntry, ConversationOptions, ConversationView } from './conversation.js';
|
|
5
|
+
import { type RuntimeError } from './failure.js';
|
|
5
6
|
import type { QueueEntry } from './outcome.js';
|
|
6
7
|
import type { DocumentQuery, DocumentResult, GroupQuery, GroupResult } from './query.js';
|
|
7
8
|
import type { RoomDraft, RoomDraftParts } from './room-draft.js';
|
|
8
9
|
import type { SyncStatus } from './status.js';
|
|
9
10
|
type Client = MdRuntimeClient | null;
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare function useObserve(client: Client, topic: '
|
|
17
|
-
export declare function useObserve(client: Client, topic: '
|
|
18
|
-
export declare function useObserve(client: Client, topic: '
|
|
19
|
-
export declare function useObserve(client: Client, topic: '
|
|
20
|
-
export declare function useObserve(client: Client, topic: '
|
|
21
|
-
export declare function useObserve(client: Client, topic: '
|
|
22
|
-
export declare function useObserve(client: Client, topic: '
|
|
11
|
+
export type Observed<T> = {
|
|
12
|
+
readonly state: 'loading';
|
|
13
|
+
} | {
|
|
14
|
+
readonly state: 'ready';
|
|
15
|
+
readonly value: T;
|
|
16
|
+
};
|
|
17
|
+
export declare function useObserve(client: Client, topic: 'deployment-facts'): Observed<unknown>;
|
|
18
|
+
export declare function useObserve(client: Client, topic: 'rooms'): Observed<readonly AppRoom[]>;
|
|
19
|
+
export declare function useObserve(client: Client, topic: 'connection-refusal'): Observed<ConnectionRefusal | null>;
|
|
20
|
+
export declare function useObserve(client: Client, topic: 'storage-loss'): Observed<string | null>;
|
|
21
|
+
export declare function useObserve(client: Client, topic: 'sync-status'): Observed<SyncStatus>;
|
|
22
|
+
export declare function useObserve(client: Client, topic: 'service-mode'): Observed<ServiceMode>;
|
|
23
|
+
export declare function useObserve(client: Client, topic: 'member'): Observed<Member | null>;
|
|
24
|
+
export declare function useObserve(client: Client, topic: 'query', query: DocumentQuery): Observed<DocumentResult>;
|
|
25
|
+
export declare function useObserve(client: Client, topic: 'query', query: GroupQuery): Observed<GroupResult>;
|
|
26
|
+
export declare function useObserve(client: Client, topic: 'queue', locator: string): Observed<readonly QueueEntry[]>;
|
|
27
|
+
export declare function useObserve(client: Client, topic: 'room-drafts'): Observed<readonly RoomDraft[]>;
|
|
28
|
+
export declare function useObserve(client: Client, topic: 'presentation'): Observed<unknown>;
|
|
29
|
+
export declare function useObserve(client: Client, topic: 'conversation', conversation: string, options: ConversationOptions): Observed<ConversationView>;
|
|
30
|
+
export declare function useObserve(client: Client, topic: 'conversations'): Observed<readonly ConversationEntry[]>;
|
|
31
|
+
export declare function useObserve(client: Client, topic: 'agents'): Observed<readonly ConversationAgent[]>;
|
|
23
32
|
export type Saving = {
|
|
24
33
|
readonly busy: boolean;
|
|
25
34
|
readonly outcome: SaveResult | null;
|
|
26
|
-
readonly failure:
|
|
35
|
+
readonly failure: RuntimeError | null;
|
|
27
36
|
save(room: string, roomDrafts: ReadonlyMap<string, RoomDraftParts>): Promise<SaveResult>;
|
|
28
37
|
};
|
|
38
|
+
export declare function saveRoomDrafts(client: MdRuntimeClient, room: string, roomDrafts: ReadonlyMap<string, RoomDraftParts>): Promise<SaveResult>;
|
|
29
39
|
export declare function useSave(client: MdRuntimeClient): Saving;
|
|
30
40
|
export {};
|
|
31
41
|
//# sourceMappingURL=react.d.ts.map
|
package/dist/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM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AAE,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrF,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,cAAc,EACrB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,mBAAmB,GAC3B,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAC9B,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,eAAe,GACrB,QAAQ,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAC;AAC1C,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAC;AAsCpG,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CAC1F,CAAC;AAMF,wBAAsB,cAAc,CAClC,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,GAC9C,OAAO,CAAC,UAAU,CAAC,CAcrB;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAkBvD"}
|
package/dist/react.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { useCallback,
|
|
1
|
+
import { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
2
|
+
import { failed, runtimeError } from './failure.js';
|
|
3
|
+
const LOADING = { state: 'loading' };
|
|
2
4
|
export function useObserve(client, topic, ...input) {
|
|
3
5
|
const key = JSON.stringify([topic, ...input]);
|
|
4
6
|
const [held, setHeld] = useState(null);
|
|
5
7
|
const opened = useRef(input);
|
|
6
8
|
opened.current = input;
|
|
7
|
-
|
|
9
|
+
useLayoutEffect(() => {
|
|
8
10
|
if (client === null)
|
|
9
11
|
return;
|
|
10
12
|
let live = true;
|
|
@@ -18,7 +20,7 @@ export function useObserve(client, topic, ...input) {
|
|
|
18
20
|
observation = open;
|
|
19
21
|
const take = (value) => {
|
|
20
22
|
if (live)
|
|
21
|
-
setHeld({ client, key, value });
|
|
23
|
+
setHeld({ client, key, observed: { state: 'ready', value } });
|
|
22
24
|
};
|
|
23
25
|
take(open.current());
|
|
24
26
|
open.subscribe(take);
|
|
@@ -28,16 +30,16 @@ export function useObserve(client, topic, ...input) {
|
|
|
28
30
|
observation?.close();
|
|
29
31
|
};
|
|
30
32
|
}, [client, key]);
|
|
31
|
-
return held !== null && held.client === client && held.key === key ? held.
|
|
33
|
+
return held !== null && held.client === client && held.key === key ? held.observed : LOADING;
|
|
32
34
|
}
|
|
33
35
|
const IDLE = { busy: false, outcome: null, failure: null };
|
|
34
|
-
async function
|
|
36
|
+
export async function saveRoomDrafts(client, room, roomDrafts) {
|
|
35
37
|
const kept = [];
|
|
36
38
|
for (const [path, parts] of roomDrafts) {
|
|
37
39
|
const prior = await client.roomDraft.read(room, path);
|
|
38
40
|
const write = await client.roomDraft.write(room, path, prior?.revision ?? null, parts);
|
|
39
41
|
if (write.outcome !== 'written' || write.roomDraft === null) {
|
|
40
|
-
throw
|
|
42
|
+
throw runtimeError(write.outcome === 'stale' ? write.code : 'room-draft-unwritten', `the Room Draft at ${path} was not written`);
|
|
41
43
|
}
|
|
42
44
|
kept.push({ path, revision: write.roomDraft.revision });
|
|
43
45
|
}
|
|
@@ -48,12 +50,12 @@ export function useSave(client) {
|
|
|
48
50
|
const save = useCallback(async (room, roomDrafts) => {
|
|
49
51
|
setState({ busy: true, outcome: null, failure: null });
|
|
50
52
|
try {
|
|
51
|
-
const outcome = await
|
|
53
|
+
const outcome = await saveRoomDrafts(client, room, roomDrafts);
|
|
52
54
|
setState({ busy: false, outcome, failure: null });
|
|
53
55
|
return outcome;
|
|
54
56
|
}
|
|
55
57
|
catch (error) {
|
|
56
|
-
const failure =
|
|
58
|
+
const failure = failed(error);
|
|
57
59
|
setState({ busy: false, outcome: null, failure });
|
|
58
60
|
throw failure;
|
|
59
61
|
}
|
package/dist/read-side.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-side.d.ts","sourceRoot":"","sources":["../src/read-side.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-side.d.ts","sourceRoot":"","sources":["../src/read-side.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAU,KAAK,WAAW,EAAE,KAAK,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC3F,OAAO,KAAK,EAOV,IAAI,EAIJ,WAAW,EAIZ,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAuDpD,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACxC,KAAK,CACH,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,KAAK,IAAI,GACpD,MAAM,IAAI,CAAC;IACd,SAAS,IAAI,SAAS,gBAAgB,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAC9D,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAuVF,wBAAgB,UAAU,CACxB,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,WAAW,GAChB;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GAAG,IAAI,CA4BpD;AAED,wBAAgB,cAAc,IAAI,QAAQ,CA4HzC"}
|
package/dist/read-side.js
CHANGED
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
import { and, BasicIndex, configureIndexDevMode, count, createCollection, createLiveQueryCollection, deepEquals, eq,
|
|
1
|
+
import { and, BasicIndex, configureIndexDevMode, count, createCollection, createLiveQueryCollection, deepEquals, eq, inArray, or, toArray, } from '@tanstack/db';
|
|
2
|
+
import { ARRAY_INDEX, pointerSegments } from '@agentshouse/mdmodel';
|
|
2
3
|
import { rowsOf } from './observation.js';
|
|
3
4
|
import { documentKey } from './rows.js';
|
|
4
5
|
function every(expressions) {
|
|
5
6
|
const [first, second, ...rest] = expressions;
|
|
6
7
|
return second === undefined ? first : and(first, second, ...rest);
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
return second === undefined ? first : or(first, second, ...rest);
|
|
9
|
+
function same(held, value) {
|
|
10
|
+
return Array.isArray(held) ? held.includes(value) : held === value;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function ordered(held, [operator, bound]) {
|
|
13
|
+
if (typeof held !== typeof bound || held === null || typeof held === 'object')
|
|
14
|
+
return false;
|
|
15
|
+
const left = held;
|
|
16
|
+
const right = bound;
|
|
17
|
+
if (operator === 'gt')
|
|
18
|
+
return left > right;
|
|
19
|
+
if (operator === 'gte')
|
|
20
|
+
return left >= right;
|
|
21
|
+
if (operator === 'lt')
|
|
22
|
+
return left < right;
|
|
23
|
+
return left <= right;
|
|
14
24
|
}
|
|
15
|
-
function
|
|
25
|
+
function satisfied(test, held) {
|
|
16
26
|
if (test.op === 'eq')
|
|
17
|
-
return
|
|
18
|
-
if (test.op === 'ne')
|
|
19
|
-
return test.value
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const compare = { gt, gte, lt, lte };
|
|
37
|
-
return every(test.bounds.map(([operator, bound]) => compare[operator](field, bound)));
|
|
38
|
-
}
|
|
39
|
-
if (test.op === 'all') {
|
|
40
|
-
return every([not(isUndefined(size)), ...test.values.map((value) => inArray(value, field))]);
|
|
41
|
-
}
|
|
42
|
-
if (test.op === 'size')
|
|
43
|
-
return eq(size, test.size);
|
|
44
|
-
return test.exists ? not(isUndefined(written)) : isUndefined(written);
|
|
27
|
+
return same(held, test.value);
|
|
28
|
+
if (test.op === 'ne')
|
|
29
|
+
return !same(held, test.value);
|
|
30
|
+
if (test.op === 'in')
|
|
31
|
+
return test.values.some((value) => same(held, value));
|
|
32
|
+
if (test.op === 'nin')
|
|
33
|
+
return !test.values.some((value) => same(held, value));
|
|
34
|
+
if (test.op === 'range')
|
|
35
|
+
return test.bounds.every((bound) => ordered(held, bound));
|
|
36
|
+
if (test.op === 'all')
|
|
37
|
+
return Array.isArray(held) && test.values.every((value) => same(held, value));
|
|
38
|
+
return Array.isArray(held) && held.length === test.size;
|
|
39
|
+
}
|
|
40
|
+
function tested(test, reached) {
|
|
41
|
+
if (test.op === 'exists')
|
|
42
|
+
return test.exists === (reached !== undefined);
|
|
43
|
+
if (reached === undefined)
|
|
44
|
+
return test.op === 'ne' || test.op === 'nin';
|
|
45
|
+
return reached.some((held) => satisfied(test, held));
|
|
45
46
|
}
|
|
46
47
|
function conditioned(condition, row) {
|
|
47
48
|
if ('every' in condition)
|
|
48
|
-
return
|
|
49
|
+
return condition.every.every((item) => conditioned(item, row));
|
|
49
50
|
if ('some' in condition)
|
|
50
|
-
return
|
|
51
|
-
return tested(condition.test, row.
|
|
51
|
+
return condition.some.some((item) => conditioned(item, row));
|
|
52
|
+
return tested(condition.test, row.reached[condition.field]);
|
|
53
|
+
}
|
|
54
|
+
function narrowed(query, where, alias) {
|
|
55
|
+
return where === null ? query : query.fn.where((row) => conditioned(where, row[alias]));
|
|
52
56
|
}
|
|
53
57
|
function reached(reach, room, document) {
|
|
54
58
|
return reach === null
|
|
@@ -62,7 +66,6 @@ function scoped(scope, row, rooms, reach) {
|
|
|
62
66
|
...reached(reach, row.room, row.key),
|
|
63
67
|
...(scope.types === null ? [] : [inArray(row.type, [...scope.types])]),
|
|
64
68
|
...(scope.pathPrefix === null ? [] : [inArray(scope.pathPrefix, row.directories)]),
|
|
65
|
-
...(scope.where === null ? [] : [conditioned(scope.where, row)]),
|
|
66
69
|
]);
|
|
67
70
|
}
|
|
68
71
|
function keyed(key, row) {
|
|
@@ -77,16 +80,17 @@ function live(query) {
|
|
|
77
80
|
function related(q, rows, scope, field, kept, reach) {
|
|
78
81
|
const matched = kept === 'source' ? 'target' : 'source';
|
|
79
82
|
const from = q.from({ r: rows });
|
|
80
|
-
|
|
81
|
-
.where(({ r }) => every([eq(r.kind, 'reference'), ...(field === null ? [] : [
|
|
83
|
+
const joined = from
|
|
84
|
+
.where(({ r }) => every([eq(r.kind, 'reference'), ...(field === null ? [] : [inArray(field, r.forms)])]))
|
|
82
85
|
.innerJoin({ m: rows }, ({ r, m }) => eq(r[matched], m.key))
|
|
83
|
-
.where(({ m }) => scoped(scope, m, null, reach))
|
|
86
|
+
.where(({ m }) => scoped(scope, m, null, reach));
|
|
87
|
+
return narrowed(joined, scope.where, 'm')
|
|
84
88
|
.groupBy(({ r }) => r[kept])
|
|
85
89
|
.select(({ r }) => ({ key: r[kept] }));
|
|
86
90
|
}
|
|
87
91
|
function filtered(q, rows, plan) {
|
|
88
92
|
const from = q.from({ d: rows });
|
|
89
|
-
let query = from.where(({ d }) => scoped(plan.root, d, plan.rooms, plan.reach));
|
|
93
|
+
let query = narrowed(from.where(({ d }) => scoped(plan.root, d, plan.rooms, plan.reach)), plan.root.where, 'd');
|
|
90
94
|
if (plan.hop !== null) {
|
|
91
95
|
const hop = related(q, rows, plan.hop, plan.hop.field, 'source', plan.reach);
|
|
92
96
|
query = query.innerJoin({ h: hop }, ({ d, h }) => eq(d.key, h.key));
|
|
@@ -117,8 +121,8 @@ function documents(q, rows, plan, shape) {
|
|
|
117
121
|
room: d.room,
|
|
118
122
|
path: d.path,
|
|
119
123
|
type: d.type,
|
|
120
|
-
|
|
121
|
-
...(
|
|
124
|
+
binary: d.binary,
|
|
125
|
+
...(shape.fields === null ? {} : { fields: d.fields }),
|
|
122
126
|
...(shape.sections === 'all' ? { sections: b.sections } : {}),
|
|
123
127
|
...(Array.isArray(shape.sections) ? named('section', shape.sections, b.sections) : {}),
|
|
124
128
|
...(shape.preamble ? { preamble: b.preamble } : {}),
|
|
@@ -176,16 +180,75 @@ function part(row, prefix, names, whole) {
|
|
|
176
180
|
return whole;
|
|
177
181
|
return present(names.map((name, index) => [name, row[`${prefix}${index}`]]));
|
|
178
182
|
}
|
|
183
|
+
function masked(pointers) {
|
|
184
|
+
const root = { whole: false, members: new Map() };
|
|
185
|
+
for (const pointer of pointers) {
|
|
186
|
+
let mask = root;
|
|
187
|
+
for (const token of pointerSegments(pointer)) {
|
|
188
|
+
const next = mask.members.get(token) ?? { whole: false, members: new Map() };
|
|
189
|
+
mask.members.set(token, next);
|
|
190
|
+
mask = next;
|
|
191
|
+
}
|
|
192
|
+
mask.whole = true;
|
|
193
|
+
}
|
|
194
|
+
return root;
|
|
195
|
+
}
|
|
196
|
+
function merged(left, right) {
|
|
197
|
+
if (left === undefined)
|
|
198
|
+
return right;
|
|
199
|
+
const members = new Map(left.members);
|
|
200
|
+
for (const [token, mask] of right.members)
|
|
201
|
+
members.set(token, merged(members.get(token), mask));
|
|
202
|
+
return { whole: left.whole || right.whole, members };
|
|
203
|
+
}
|
|
204
|
+
function cut(value, mask) {
|
|
205
|
+
if (mask.whole)
|
|
206
|
+
return value;
|
|
207
|
+
if (Array.isArray(value)) {
|
|
208
|
+
const each = {
|
|
209
|
+
whole: false,
|
|
210
|
+
members: new Map([...mask.members].filter(([token]) => !ARRAY_INDEX.test(token))),
|
|
211
|
+
};
|
|
212
|
+
const kept = [];
|
|
213
|
+
value.forEach((item, index) => {
|
|
214
|
+
const part = cut(item, merged(mask.members.get(String(index)), each));
|
|
215
|
+
if (part !== undefined)
|
|
216
|
+
kept[index] = part;
|
|
217
|
+
});
|
|
218
|
+
return kept.length === 0 ? undefined : kept;
|
|
219
|
+
}
|
|
220
|
+
if (typeof value !== 'object' || value === null)
|
|
221
|
+
return undefined;
|
|
222
|
+
const kept = Object.entries(value).flatMap(([key, held]) => {
|
|
223
|
+
const member = mask.members.get(key);
|
|
224
|
+
const part = member === undefined ? undefined : cut(held, member);
|
|
225
|
+
return part === undefined ? [] : [[key, part]];
|
|
226
|
+
});
|
|
227
|
+
return kept.length === 0 ? undefined : Object.fromEntries(kept);
|
|
228
|
+
}
|
|
229
|
+
function selected(fields, pointers) {
|
|
230
|
+
return (cut(fields, masked(pointers)) ?? {});
|
|
231
|
+
}
|
|
179
232
|
function documentOf(row, shape) {
|
|
180
|
-
if (row.type === null)
|
|
181
|
-
|
|
233
|
+
if (row.type === null) {
|
|
234
|
+
const binary = row.binary;
|
|
235
|
+
return {
|
|
236
|
+
room: row.room,
|
|
237
|
+
path: row.path,
|
|
238
|
+
...(binary === null ? {} : { binaryFile: binary }),
|
|
239
|
+
};
|
|
240
|
+
}
|
|
182
241
|
return {
|
|
183
242
|
room: row.room,
|
|
184
243
|
path: row.path,
|
|
185
244
|
type: row.type,
|
|
186
245
|
...(shape.fields === null
|
|
187
246
|
? {}
|
|
188
|
-
: {
|
|
247
|
+
: {
|
|
248
|
+
fields: shape.fields === 'all'
|
|
249
|
+
? row.fields
|
|
250
|
+
: selected(row.fields, shape.fields),
|
|
251
|
+
}),
|
|
189
252
|
...(shape.sections === null
|
|
190
253
|
? {}
|
|
191
254
|
: {
|
package/dist/refresh.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import type { Adapter, AdapterFailure, Authorization, RetryableRefusal } from './adapter.js';
|
|
2
2
|
import type { Remodel } from './bootstrap.js';
|
|
3
3
|
import { type ConfirmedLayer } from './replica.js';
|
|
4
|
+
import type { ReplicaRecord } from './store.js';
|
|
4
5
|
import { type Refused, type Unconfirmed } from './transfer.js';
|
|
6
|
+
export type Advancement = {
|
|
7
|
+
kind: 'still-current';
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'advanced';
|
|
10
|
+
record: ReplicaRecord;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'beyond-horizon';
|
|
13
|
+
} | RetryableRefusal | Unconfirmed | AdapterFailure;
|
|
5
14
|
export type RefreshOutcome = {
|
|
6
15
|
kind: 'still-current';
|
|
7
16
|
} | {
|
|
@@ -10,5 +19,6 @@ export type RefreshOutcome = {
|
|
|
10
19
|
} | {
|
|
11
20
|
kind: 'beyond-horizon';
|
|
12
21
|
} | RetryableRefusal | Unconfirmed | Refused | AdapterFailure;
|
|
22
|
+
export declare function advancement(adapter: Adapter, authorization: Authorization, held: ReplicaRecord, remodel: Remodel, continuing: () => boolean): Promise<Advancement>;
|
|
13
23
|
export declare function refreshRoom(adapter: Adapter, authorization: Authorization, confirmed: ConfirmedLayer, remodel: Remodel, continuing: () => boolean): Promise<RefreshOutcome>;
|
|
14
24
|
//# sourceMappingURL=refresh.d.ts.map
|
package/dist/refresh.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../src/refresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,aAAa,EAGb,gBAAgB,
|
|
1
|
+
{"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../src/refresh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,aA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