@agentshouse/mdruntime 0.1.0-cf08ada271a7f → 0.1.0-cf08df9b663d8
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 +21 -19
- package/dist/acceptance.d.ts.map +1 -1
- package/dist/acceptance.js +57 -38
- package/dist/act-lanes.d.ts +30 -0
- package/dist/act-lanes.d.ts.map +1 -0
- package/dist/act-lanes.js +225 -0
- package/dist/actions.d.ts +8 -2
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +173 -83
- package/dist/adapter.d.ts +210 -30
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +0 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +2 -7
- package/dist/{binary.d.ts → attachment.d.ts} +8 -4
- package/dist/attachment.d.ts.map +1 -0
- package/dist/attachment.js +15 -0
- package/dist/authored.d.ts +88 -0
- package/dist/authored.d.ts.map +1 -0
- package/dist/authored.js +345 -0
- package/dist/chain.d.ts +1 -1
- package/dist/chain.d.ts.map +1 -1
- package/dist/chain.js +5 -2
- package/dist/change.d.ts +6 -2
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +3 -0
- package/dist/chat-types.d.ts +0 -2
- package/dist/chat-types.d.ts.map +1 -1
- package/dist/chat-types.js +2 -4
- package/dist/client.d.ts +29 -24
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +49 -64
- package/dist/collection.d.ts +6 -1
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +23 -9
- package/dist/column.d.ts +5 -0
- package/dist/column.d.ts.map +1 -0
- package/dist/column.js +9 -0
- package/dist/compile.d.ts +4 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +88 -44
- package/dist/connection.d.ts +1 -1
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +32 -17
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +1 -1
- package/dist/conversation-live.d.ts +26 -11
- package/dist/conversation-live.d.ts.map +1 -1
- package/dist/conversation-live.js +24 -11
- package/dist/conversation-row.d.ts +23 -1
- package/dist/conversation-row.d.ts.map +1 -1
- package/dist/conversation-row.js +37 -8
- package/dist/conversation.d.ts +45 -11
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +337 -203
- package/dist/declaration.js +3 -3
- package/dist/discovery.d.ts +3 -1
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +46 -48
- package/dist/download.d.ts +6 -0
- package/dist/download.d.ts.map +1 -0
- package/dist/download.js +42 -0
- package/dist/durability.d.ts +6 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +7 -0
- package/dist/entry.d.ts +26 -1
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +126 -36
- package/dist/expectation.d.ts +25 -14
- package/dist/expectation.d.ts.map +1 -1
- package/dist/expectation.js +51 -20
- package/dist/failure.d.ts +2 -0
- package/dist/failure.d.ts.map +1 -1
- package/dist/failure.js +6 -1
- package/dist/figures.d.ts +1 -1
- package/dist/figures.d.ts.map +1 -1
- package/dist/figures.js +6 -4
- package/dist/file.d.ts +1 -1
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +3 -2
- package/dist/holdings.d.ts.map +1 -1
- package/dist/holdings.js +5 -3
- package/dist/host.d.ts +7 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +94 -30
- package/dist/house-query.d.ts +24 -0
- package/dist/house-query.d.ts.map +1 -0
- package/dist/house-query.js +102 -0
- package/dist/identity.d.ts +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +1 -1
- package/dist/index.d.ts +27 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -9
- package/dist/install.d.ts +10 -5
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +49 -55
- package/dist/lifecycle.d.ts +2 -2
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/lifecycle.js +74 -51
- package/dist/linked-file.d.ts +7 -0
- package/dist/linked-file.d.ts.map +1 -0
- package/dist/linked-file.js +13 -0
- package/dist/listing.d.ts +27 -20
- package/dist/listing.d.ts.map +1 -1
- package/dist/listing.js +68 -69
- package/dist/live.d.ts +19 -3
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +94 -36
- package/dist/loaded.d.ts +7 -0
- package/dist/loaded.d.ts.map +1 -0
- package/dist/loaded.js +46 -0
- package/dist/locks.d.ts +2 -4
- package/dist/locks.d.ts.map +1 -1
- package/dist/locks.js +10 -38
- package/dist/lost.d.ts.map +1 -1
- package/dist/lost.js +8 -20
- package/dist/media.d.ts +19 -3
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +181 -34
- package/dist/memory.d.ts +7 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +99 -37
- package/dist/messages.d.ts +21 -3
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +48 -16
- package/dist/modal.d.ts +2 -0
- package/dist/modal.d.ts.map +1 -0
- package/dist/modal.js +11 -0
- package/dist/model.d.ts +10 -7
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +7 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +18 -35
- package/dist/name.d.ts +0 -1
- package/dist/name.d.ts.map +1 -1
- package/dist/name.js +3 -7
- package/dist/observation.d.ts +29 -12
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +206 -69
- package/dist/online.d.ts +7 -0
- package/dist/online.d.ts.map +1 -0
- package/dist/online.js +29 -0
- package/dist/opened.d.ts +6 -6
- package/dist/opened.d.ts.map +1 -1
- package/dist/opened.js +4 -4
- package/dist/opening.d.ts.map +1 -1
- package/dist/opening.js +22 -10
- package/dist/outcome.d.ts +33 -13
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +36 -6
- package/dist/overlay.d.ts +21 -7
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +112 -39
- package/dist/page-metadata.d.ts +8 -0
- package/dist/page-metadata.d.ts.map +1 -0
- package/dist/page-metadata.js +19 -0
- package/dist/parts.d.ts +5 -9
- package/dist/parts.d.ts.map +1 -1
- package/dist/parts.js +30 -15
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/preparation.d.ts +33 -7
- package/dist/preparation.d.ts.map +1 -1
- package/dist/preparation.js +207 -96
- package/dist/presence.d.ts +58 -0
- package/dist/presence.d.ts.map +1 -0
- package/dist/presence.js +231 -0
- package/dist/queries.d.ts +2 -2
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +137 -79
- package/dist/query.d.ts +2 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/questions.d.ts +1 -5
- package/dist/questions.d.ts.map +1 -1
- package/dist/questions.js +3 -8
- package/dist/queue.d.ts +2 -1
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +76 -49
- package/dist/reach.d.ts +15 -6
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +196 -37
- package/dist/react.d.ts +17 -5
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +28 -5
- package/dist/readiness.d.ts +23 -4
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +18 -10
- package/dist/reads.d.ts +5 -3
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +26 -14
- package/dist/recovery.d.ts +4 -1
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +31 -8
- package/dist/refresh.d.ts +1 -1
- package/dist/refresh.js +4 -4
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +2 -4
- package/dist/replica.d.ts +3 -8
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +5 -5
- package/dist/retried.d.ts +30 -0
- package/dist/retried.d.ts.map +1 -0
- package/dist/retried.js +72 -0
- package/dist/room-draft.d.ts +31 -6
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +262 -36
- package/dist/room-drafts.d.ts.map +1 -1
- package/dist/room-drafts.js +12 -7
- package/dist/room-list.d.ts +10 -0
- package/dist/room-list.d.ts.map +1 -0
- package/dist/room-list.js +47 -0
- package/dist/rows.d.ts +11 -3
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +25 -11
- package/dist/run-tables.d.ts +25 -0
- package/dist/run-tables.d.ts.map +1 -0
- package/dist/run-tables.js +98 -0
- package/dist/running.d.ts +5 -0
- package/dist/running.d.ts.map +1 -0
- package/dist/running.js +10 -0
- package/dist/runs.d.ts +27 -0
- package/dist/runs.d.ts.map +1 -0
- package/dist/runs.js +92 -0
- package/dist/runtime.d.ts +11 -5
- package/dist/runtime.d.ts.map +1 -1
- package/dist/save.d.ts +2 -0
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +120 -135
- package/dist/saves.d.ts +7 -5
- package/dist/saves.d.ts.map +1 -1
- package/dist/saves.js +116 -65
- package/dist/seed.d.ts.map +1 -1
- package/dist/seed.js +4 -4
- package/dist/selector.d.ts +3 -0
- package/dist/selector.d.ts.map +1 -0
- package/dist/selector.js +22 -0
- package/dist/shown.d.ts +8 -5
- package/dist/shown.d.ts.map +1 -1
- package/dist/shown.js +95 -67
- package/dist/socket/lanes.d.ts +12 -4
- package/dist/socket/lanes.d.ts.map +1 -1
- package/dist/socket/lanes.js +34 -8
- package/dist/socket/session.d.ts +4 -1
- package/dist/socket/session.d.ts.map +1 -1
- package/dist/socket/session.js +3 -0
- package/dist/socket.d.ts +9 -6
- package/dist/socket.d.ts.map +1 -1
- package/dist/socket.js +17 -16
- package/dist/source.d.ts +42 -7
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +76 -9
- package/dist/store/installs.d.ts +2 -2
- package/dist/store/installs.d.ts.map +1 -1
- package/dist/store/installs.js +10 -4
- package/dist/store/readiness.d.ts +5 -4
- package/dist/store/readiness.d.ts.map +1 -1
- package/dist/store/readiness.js +28 -12
- package/dist/store/records.d.ts +31 -7
- package/dist/store/records.d.ts.map +1 -1
- package/dist/store/records.js +70 -24
- package/dist/store/rooms-shown.d.ts +8 -0
- package/dist/store/rooms-shown.d.ts.map +1 -0
- package/dist/store/rooms-shown.js +13 -0
- package/dist/store.d.ts +24 -14
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +49 -17
- package/dist/stored.d.ts +41 -16
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +215 -57
- package/dist/surface.d.ts +20 -8
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +66 -32
- package/dist/sync.d.ts +4 -2
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +109 -82
- package/dist/tables.d.ts +40 -52
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +109 -326
- package/dist/tallies.d.ts.map +1 -1
- package/dist/tallies.js +3 -4
- package/dist/validation.d.ts +2 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +50 -10
- package/dist/wire.d.ts +68 -8
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +28 -11
- package/package.json +4 -4
- package/dist/attempt.d.ts +0 -16
- package/dist/attempt.d.ts.map +0 -1
- package/dist/attempt.js +0 -70
- package/dist/binary.d.ts.map +0 -1
- package/dist/binary.js +0 -8
- package/dist/job.d.ts +0 -5
- package/dist/job.d.ts.map +0 -1
- package/dist/job.js +0 -7
- package/dist/log.d.ts +0 -6
- package/dist/log.d.ts.map +0 -1
- package/dist/log.js +0 -14
- package/dist/socket/rooms.d.ts +0 -41
- package/dist/socket/rooms.d.ts.map +0 -1
- package/dist/socket/rooms.js +0 -90
- package/dist/store/fences.d.ts +0 -16
- package/dist/store/fences.d.ts.map +0 -1
- package/dist/store/fences.js +0 -26
package/dist/saves.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isImageType, parse } from '@agentshouse/mdmodel';
|
|
2
|
+
import { attachmentRecord } from './attachment.js';
|
|
3
|
+
import { changeSet } from './change-set.js';
|
|
3
4
|
import { queuedFile } from './change.js';
|
|
4
|
-
import { available } from './collection.js';
|
|
5
|
+
import { available, definitionsAt, typeAt } from './collection.js';
|
|
5
6
|
import { runtimeError } from './failure.js';
|
|
6
7
|
import { attachedFile } from './file.js';
|
|
8
|
+
import { roomDraftRevision } from './identity.js';
|
|
7
9
|
import { compositionFor } from './listing.js';
|
|
8
10
|
import { scoped } from './models.js';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
+
import { absentAttachment, attachAnswer, attachmentAnswer, attachmentLinkAnswer, failure, linkedAnswer, OFFLINE, UNCERTAIN, } from './outcome.js';
|
|
12
|
+
import { sameAttachment } from './overlay.js';
|
|
11
13
|
import { ancestors } from './paths.js';
|
|
12
14
|
import { connectionNow } from './preparation.js';
|
|
13
15
|
import { append, sliceAt, withdrawable } from './queue.js';
|
|
14
16
|
import { entryAt, replaying, slicing, } from './replica.js';
|
|
15
|
-
import {
|
|
17
|
+
import { attachmentBase, changesOf, held, heldFile, joinedOver, moveTarget, readSavedParts, } from './room-draft.js';
|
|
16
18
|
import { refuse } from './refusal.js';
|
|
17
19
|
import { visibleOf } from './room-drafts.js';
|
|
18
20
|
import { destination, planSave, } from './save.js';
|
|
@@ -20,9 +22,9 @@ import { pendingShown } from './shown.js';
|
|
|
20
22
|
import { paced, ROW_WEIGHT, stepped } from './turn.js';
|
|
21
23
|
import { validatedNeighbourhood } from './validation.js';
|
|
22
24
|
const FULL = { outcome: 'refused', code: 'durable-write', retryable: true };
|
|
23
|
-
async function savedRoom(store, locator) {
|
|
25
|
+
async function savedRoom({ store, presence }, locator) {
|
|
24
26
|
const replica = await store.replica(locator);
|
|
25
|
-
if (replica === undefined ||
|
|
27
|
+
if (replica === undefined || presence.lost(locator)) {
|
|
26
28
|
throw runtimeError('unknown-room', `Unknown Room ${locator}`);
|
|
27
29
|
}
|
|
28
30
|
return replica;
|
|
@@ -32,7 +34,7 @@ export function saveRoomDrafts(runtime, locator, named, writtenBy) {
|
|
|
32
34
|
return store.exclusive(async () => {
|
|
33
35
|
if (store.space.full())
|
|
34
36
|
return FULL;
|
|
35
|
-
const replica = await savedRoom(
|
|
37
|
+
const replica = await savedRoom(runtime, locator);
|
|
36
38
|
const drafts = new Map((await store.drafts(locator, named.map(({ path }) => path))).map((record) => [record.path, record]));
|
|
37
39
|
const saved = [];
|
|
38
40
|
for (const { path, revision } of named) {
|
|
@@ -43,16 +45,31 @@ export function saveRoomDrafts(runtime, locator, named, writtenBy) {
|
|
|
43
45
|
if (!saved.some((draft) => draft.path === path))
|
|
44
46
|
saved.push({ path, parts: record.parts });
|
|
45
47
|
}
|
|
46
|
-
|
|
48
|
+
const result = await loaded(runtime, locator, replica, saved, new Set(saved.map(({ path }) => path)), [], writtenBy);
|
|
49
|
+
if (result.outcome !== 'refused' || result.code !== 'changed-underneath')
|
|
50
|
+
return result;
|
|
51
|
+
return joinedUnderneath(runtime, locator, saved.map(({ path }) => drafts.get(path)), result);
|
|
47
52
|
});
|
|
48
53
|
}
|
|
54
|
+
async function joinedUnderneath({ store }, locator, records, refused) {
|
|
55
|
+
const visible = (await visibleOf(store, locator, records.map(({ path }) => path)));
|
|
56
|
+
const joined = records.flatMap((record) => {
|
|
57
|
+
const join = joinedOver(record.parts, record.marks, record.path, visible);
|
|
58
|
+
return join === null ? [] : [{ ...record, ...join, revision: roomDraftRevision() }];
|
|
59
|
+
});
|
|
60
|
+
if (joined.length === 0)
|
|
61
|
+
return refused;
|
|
62
|
+
await (await store.open()).commit({ rooms: [], writes: [{ locator, roomDrafts: joined }] });
|
|
63
|
+
await store.changed(changeSet(locator, { drafts: joined.map(({ path }) => path) }));
|
|
64
|
+
return refused;
|
|
65
|
+
}
|
|
49
66
|
export function saveParts(runtime, locator, named, writtenBy) {
|
|
50
67
|
const { store } = runtime;
|
|
51
68
|
return store.exclusive(async () => {
|
|
52
69
|
const read = readSavedParts(named);
|
|
53
70
|
if (store.space.full())
|
|
54
71
|
return FULL;
|
|
55
|
-
const replica = await savedRoom(
|
|
72
|
+
const replica = await savedRoom(runtime, locator);
|
|
56
73
|
const saved = [];
|
|
57
74
|
const files = [];
|
|
58
75
|
const filed = read.filter(({ parts }) => parts.file !== undefined).map(({ path }) => path);
|
|
@@ -60,7 +77,7 @@ export function saveParts(runtime, locator, named, writtenBy) {
|
|
|
60
77
|
for (const { path, parts } of read) {
|
|
61
78
|
const file = parts.file === undefined
|
|
62
79
|
? undefined
|
|
63
|
-
: await heldFile(parts.file.blob, parts.file.base === undefined ?
|
|
80
|
+
: await heldFile(parts.file.blob, parts.file.base === undefined ? attachmentBase(visible, path) : parts.file.base);
|
|
64
81
|
if (parts.file !== undefined && file !== undefined) {
|
|
65
82
|
files.push({ key: file.localId, blob: parts.file.blob });
|
|
66
83
|
}
|
|
@@ -118,9 +135,10 @@ function targetsOf(saved) {
|
|
|
118
135
|
return saved.flatMap(({ parts }) => (parts.move === undefined ? [] : [moveTarget(parts.move)]));
|
|
119
136
|
}
|
|
120
137
|
async function loaded(runtime, locator, replica, saved, consumed, files, writtenBy) {
|
|
121
|
-
const { store
|
|
138
|
+
const { store } = runtime;
|
|
139
|
+
const localSaves = runtime.savesLocally(locator);
|
|
122
140
|
const into = destination(locator, saved);
|
|
123
|
-
const target = into === null ? undefined : await savedRoom(
|
|
141
|
+
const target = into === null ? undefined : await savedRoom(runtime, into);
|
|
124
142
|
const paths = saved.map(({ path }) => path);
|
|
125
143
|
const targets = targetsOf(saved);
|
|
126
144
|
const parts = saved.map(({ path, parts: held }) => changesOf(path, held));
|
|
@@ -137,12 +155,12 @@ async function loaded(runtime, locator, replica, saved, consumed, files, written
|
|
|
137
155
|
room.record.locator,
|
|
138
156
|
held,
|
|
139
157
|
])),
|
|
140
|
-
after: () => pendingShown(runtime),
|
|
158
|
+
after: () => pendingShown(runtime, locator),
|
|
141
159
|
});
|
|
142
160
|
}
|
|
143
161
|
function textDiffers(left, right) {
|
|
144
162
|
return ((left?.content ?? undefined) !== (right?.content ?? undefined) ||
|
|
145
|
-
!
|
|
163
|
+
!sameAttachment(left?.binary ?? undefined, right?.binary ?? undefined));
|
|
146
164
|
}
|
|
147
165
|
function textOf(entry) {
|
|
148
166
|
if (entry === null)
|
|
@@ -159,13 +177,16 @@ function lookupOf(local, key, view) {
|
|
|
159
177
|
]));
|
|
160
178
|
};
|
|
161
179
|
}
|
|
162
|
-
function declaredOf(entry) {
|
|
180
|
+
function declaredOf(composition, path, entry) {
|
|
163
181
|
if (entry.binary !== null)
|
|
164
182
|
return { type: undefined, binary: true };
|
|
165
|
-
const
|
|
166
|
-
return {
|
|
183
|
+
const content = entry.content ?? '';
|
|
184
|
+
return {
|
|
185
|
+
type: typeAt(composition, path, parse(content, path, definitionsAt(composition, path))),
|
|
186
|
+
binary: false,
|
|
187
|
+
};
|
|
167
188
|
}
|
|
168
|
-
function overriddenLookup(lookup, overrides) {
|
|
189
|
+
function overriddenLookup(composition, lookup, overrides) {
|
|
169
190
|
return async (paths) => {
|
|
170
191
|
const known = new Map(await lookup(paths.filter((path) => !overrides.has(path))));
|
|
171
192
|
for (const path of paths) {
|
|
@@ -175,7 +196,7 @@ function overriddenLookup(lookup, overrides) {
|
|
|
175
196
|
if (entry === null)
|
|
176
197
|
known.delete(path);
|
|
177
198
|
else
|
|
178
|
-
known.set(path, declaredOf(entry));
|
|
199
|
+
known.set(path, declaredOf(composition, path, entry));
|
|
179
200
|
}
|
|
180
201
|
return known;
|
|
181
202
|
};
|
|
@@ -196,10 +217,12 @@ function validatorOf(runtime, record, confirmedLayer) {
|
|
|
196
217
|
if (textOf(was) !== textOf(now))
|
|
197
218
|
changes.push({ path, was: textOf(was), now: textOf(now) });
|
|
198
219
|
}
|
|
199
|
-
|
|
200
|
-
|
|
220
|
+
const composition = compositionFor(runtime, record);
|
|
221
|
+
return validatedNeighbourhood(changes, composition, {
|
|
222
|
+
lookup: overriddenLookup(composition, lookupOf(local, record.key, 'confirmed'), overrides),
|
|
201
223
|
texts: textsOf(local, record.key, 'confirmed'),
|
|
202
224
|
referrers: referrersOf(local, record.key, 'confirmed'),
|
|
225
|
+
holders: (sought) => local.holders(record.key, 'confirmed', sought),
|
|
203
226
|
});
|
|
204
227
|
};
|
|
205
228
|
}
|
|
@@ -229,8 +252,8 @@ export function batchFile(store, batch) {
|
|
|
229
252
|
return (await store.open()).file(localId, change?.kind === 'binary' ? change.mediaType : '');
|
|
230
253
|
};
|
|
231
254
|
}
|
|
232
|
-
async function
|
|
233
|
-
const { store, socket,
|
|
255
|
+
async function transferAttachment(runtime, request, transfer, answer) {
|
|
256
|
+
const { store, socket, presence } = runtime;
|
|
234
257
|
const { session } = socket;
|
|
235
258
|
if (socket.closed() || session.now().refusal !== null)
|
|
236
259
|
return UNCERTAIN;
|
|
@@ -246,13 +269,11 @@ async function transferBinary(runtime, request, transfer, answer) {
|
|
|
246
269
|
const { closed, authorization, refusal } = session.now();
|
|
247
270
|
if (closed || authorization === undefined || refusal !== null)
|
|
248
271
|
return UNCERTAIN;
|
|
249
|
-
const since =
|
|
250
|
-
journal.record(`transfer binary ${request.locator} ${request.path}`);
|
|
272
|
+
const since = presence.losses();
|
|
251
273
|
try {
|
|
252
274
|
const result = await transfer(authorization);
|
|
253
275
|
const settled = result;
|
|
254
|
-
|
|
255
|
-
if (store.fences.since(request.locator, since))
|
|
276
|
+
if (request.locator !== null && presence.lostSince(request.locator, since))
|
|
256
277
|
return failure({ kind: 'room-not-readable', locator: request.locator });
|
|
257
278
|
if (settled.kind === 'scoped-refusal') {
|
|
258
279
|
const room = await store.record(settled.locator);
|
|
@@ -264,23 +285,22 @@ async function transferBinary(runtime, request, transfer, answer) {
|
|
|
264
285
|
return answer(result);
|
|
265
286
|
}
|
|
266
287
|
catch {
|
|
267
|
-
journal.record('outcome binary transport-uncertainty');
|
|
268
288
|
return UNCERTAIN;
|
|
269
289
|
}
|
|
270
290
|
}
|
|
271
|
-
function
|
|
291
|
+
function fetchAttachment(runtime, request, name) {
|
|
272
292
|
const { store, socket } = runtime;
|
|
273
|
-
return
|
|
293
|
+
return transferAttachment(runtime, request, (authorization) => store.opened.fetch(name, () => socket.binary(authorization, request)), attachmentAnswer);
|
|
274
294
|
}
|
|
275
|
-
async function
|
|
295
|
+
async function readAttachment(runtime, request, name) {
|
|
276
296
|
if (runtime.socket.closed())
|
|
277
297
|
return UNCERTAIN;
|
|
278
298
|
const held = await runtime.store.opened.find(name);
|
|
279
299
|
if (held !== null)
|
|
280
300
|
return held;
|
|
281
|
-
return
|
|
301
|
+
return fetchAttachment(runtime, request, name);
|
|
282
302
|
}
|
|
283
|
-
async function
|
|
303
|
+
async function attachmentPath(store, locator, path, revision) {
|
|
284
304
|
if (revision !== undefined)
|
|
285
305
|
return { kind: 'path', locator, path, revision };
|
|
286
306
|
const replica = await store.replica(locator);
|
|
@@ -293,7 +313,7 @@ async function binaryPath(store, locator, path, revision) {
|
|
|
293
313
|
return null;
|
|
294
314
|
if (held.binary.state === 'pending')
|
|
295
315
|
return { kind: 'pending', localId: held.binary.localId };
|
|
296
|
-
const record =
|
|
316
|
+
const record = attachmentRecord(path, held.binary, held.revision ?? undefined);
|
|
297
317
|
if (record.state !== 'accepted')
|
|
298
318
|
return null;
|
|
299
319
|
const queued = replica.queue.flatMap((batch) => batch.changes);
|
|
@@ -321,17 +341,17 @@ async function binaryPath(store, locator, path, revision) {
|
|
|
321
341
|
revision: record.revision,
|
|
322
342
|
};
|
|
323
343
|
}
|
|
324
|
-
async function
|
|
344
|
+
async function askedAttachment({ store, socket }, locator, path, revision) {
|
|
325
345
|
await socket.ready;
|
|
326
346
|
const drafted = (await store.draft(locator, path))?.parts.file;
|
|
327
347
|
return drafted !== undefined && drafted.localId === revision
|
|
328
348
|
? { kind: 'pending', localId: revision }
|
|
329
|
-
:
|
|
349
|
+
: attachmentPath(store, locator, path, revision);
|
|
330
350
|
}
|
|
331
|
-
async function
|
|
351
|
+
async function pendingAttachment(store, locator, path, localId) {
|
|
332
352
|
const facts = await queuedFacts(store, locator, path, localId);
|
|
333
353
|
return facts === null
|
|
334
|
-
?
|
|
354
|
+
? absentAttachment(path)
|
|
335
355
|
: {
|
|
336
356
|
kind: 'binary',
|
|
337
357
|
file: localId,
|
|
@@ -339,13 +359,13 @@ async function pendingBinary(store, locator, path, localId) {
|
|
|
339
359
|
mediaType: facts.mediaType,
|
|
340
360
|
};
|
|
341
361
|
}
|
|
342
|
-
async function
|
|
343
|
-
const asked = await
|
|
362
|
+
async function readAttachmentPath(runtime, locator, path, revision) {
|
|
363
|
+
const asked = await askedAttachment(runtime, locator, path, revision);
|
|
344
364
|
if (asked === null)
|
|
345
|
-
return
|
|
365
|
+
return absentAttachment(path);
|
|
346
366
|
if (asked.kind === 'pending')
|
|
347
|
-
return
|
|
348
|
-
return
|
|
367
|
+
return pendingAttachment(runtime.store, locator, path, asked.localId);
|
|
368
|
+
return readAttachment(runtime, asked, { locator, path: asked.path, revision: asked.revision });
|
|
349
369
|
}
|
|
350
370
|
async function heldMediaType(store, locator, path) {
|
|
351
371
|
const replica = await store.record(locator);
|
|
@@ -353,23 +373,42 @@ async function heldMediaType(store, locator, path) {
|
|
|
353
373
|
return held === undefined ? store.attached.of(locator, path)?.mediaType : held.binary?.mediaType;
|
|
354
374
|
}
|
|
355
375
|
function linkOf(runtime, asked, held) {
|
|
356
|
-
return
|
|
376
|
+
return transferAttachment(runtime, asked, (authorization) => runtime.socket.link(authorization, asked), (result) => attachmentLinkAnswer(result, held));
|
|
357
377
|
}
|
|
358
|
-
async function
|
|
378
|
+
async function linkAttachmentPath(runtime, locator, path, revision) {
|
|
359
379
|
const { store, socket } = runtime;
|
|
360
380
|
await socket.ready;
|
|
361
|
-
const asked = await
|
|
381
|
+
const asked = await attachmentPath(store, locator, path, revision);
|
|
362
382
|
if (asked === null || asked.kind === 'pending')
|
|
363
|
-
return
|
|
383
|
+
return absentAttachment(path);
|
|
364
384
|
return linkOf(runtime, asked, revision === undefined ? await heldMediaType(store, locator, path) : undefined);
|
|
365
385
|
}
|
|
366
|
-
|
|
386
|
+
function shownImage(runtime, asked, name) {
|
|
387
|
+
const { store, socket } = runtime;
|
|
388
|
+
return new Promise((answer) => {
|
|
389
|
+
void transferAttachment(runtime, asked, (authorization) => store.opened.fetch(name, async () => {
|
|
390
|
+
const read = await socket.binary(authorization, asked);
|
|
391
|
+
const copies = read.kind === 'binary' ? (read.copies ?? []) : [];
|
|
392
|
+
if (read.kind === 'binary' && read.url !== undefined && copies.length > 0) {
|
|
393
|
+
answer({
|
|
394
|
+
kind: 'link',
|
|
395
|
+
url: read.url,
|
|
396
|
+
name: asked.path.slice(asked.path.lastIndexOf('/') + 1),
|
|
397
|
+
mediaType: read.mediaType,
|
|
398
|
+
copies,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
return read;
|
|
402
|
+
}), attachmentAnswer).then(answer);
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
async function showAttachmentPath(runtime, locator, path, revision) {
|
|
367
406
|
const { store } = runtime;
|
|
368
|
-
const asked = await
|
|
407
|
+
const asked = await askedAttachment(runtime, locator, path, revision);
|
|
369
408
|
if (asked === null)
|
|
370
|
-
return
|
|
409
|
+
return absentAttachment(path);
|
|
371
410
|
if (asked.kind === 'pending')
|
|
372
|
-
return
|
|
411
|
+
return pendingAttachment(store, locator, path, asked.localId);
|
|
373
412
|
if (runtime.socket.closed())
|
|
374
413
|
return UNCERTAIN;
|
|
375
414
|
const name = { locator, path: asked.path, revision: asked.revision };
|
|
@@ -377,11 +416,12 @@ async function showBinaryPath(runtime, locator, path, revision) {
|
|
|
377
416
|
if (kept !== null)
|
|
378
417
|
return kept;
|
|
379
418
|
const mediaType = await heldMediaType(store, locator, path);
|
|
380
|
-
if (mediaType
|
|
381
|
-
return
|
|
382
|
-
|
|
419
|
+
if (mediaType !== undefined && isImageType(mediaType))
|
|
420
|
+
return shownImage(runtime, asked, name);
|
|
421
|
+
const linked = await linkOf(runtime, asked, revision === undefined ? mediaType : undefined);
|
|
422
|
+
return linked.kind === 'link' ? { ...linked, copies: [] } : linked;
|
|
383
423
|
}
|
|
384
|
-
async function
|
|
424
|
+
async function attachFile(runtime, locator, file, answer) {
|
|
385
425
|
const { store, socket } = runtime;
|
|
386
426
|
await socket.ready;
|
|
387
427
|
await socket.firstDiscovery;
|
|
@@ -391,23 +431,34 @@ async function attachBinary(runtime, locator, file) {
|
|
|
391
431
|
socket.session.now().refusal !== null)
|
|
392
432
|
return OFFLINE;
|
|
393
433
|
const request = await attachedFile(locator, file);
|
|
394
|
-
return
|
|
434
|
+
return transferAttachment(runtime, { locator }, async (held) => {
|
|
395
435
|
const result = await socket.attach(held, request);
|
|
396
|
-
if (result.kind === 'attached') {
|
|
436
|
+
if (result.kind === 'attached' && locator !== null) {
|
|
397
437
|
store.attached.hold(locator, result.path, {
|
|
398
438
|
revision: result.revision,
|
|
399
439
|
mediaType: request.mediaType,
|
|
400
440
|
});
|
|
401
441
|
}
|
|
402
442
|
return result;
|
|
403
|
-
},
|
|
443
|
+
}, answer);
|
|
444
|
+
}
|
|
445
|
+
async function keyedAttachment(runtime, link) {
|
|
446
|
+
await runtime.socket.ready;
|
|
447
|
+
const asked = { kind: 'key', link };
|
|
448
|
+
return transferAttachment(runtime, { locator: null }, (authorization) => runtime.socket.link(authorization, asked), (result) => attachmentLinkAnswer(result));
|
|
449
|
+
}
|
|
450
|
+
export function conversationFiles(runtime) {
|
|
451
|
+
return {
|
|
452
|
+
attach: (file) => attachFile(runtime, null, file, linkedAnswer),
|
|
453
|
+
attachment: (link) => keyedAttachment(runtime, link),
|
|
454
|
+
};
|
|
404
455
|
}
|
|
405
|
-
export function
|
|
456
|
+
export function attachmentSurface(runtime) {
|
|
406
457
|
return {
|
|
407
458
|
part: runtime.store.part,
|
|
408
|
-
read: (room, path, revision) =>
|
|
409
|
-
link: (room, path, revision) =>
|
|
410
|
-
show: (room, path, revision) =>
|
|
411
|
-
attach: (room, file) =>
|
|
459
|
+
read: (room, path, revision) => readAttachmentPath(runtime, room, path, revision),
|
|
460
|
+
link: (room, path, revision) => linkAttachmentPath(runtime, room, path, revision),
|
|
461
|
+
show: (room, path, revision) => showAttachmentPath(runtime, room, path, revision),
|
|
462
|
+
attach: (room, file) => attachFile(runtime, room, file, attachAnswer),
|
|
412
463
|
};
|
|
413
464
|
}
|
package/dist/seed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../src/seed.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../src/seed.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAwB,KAAK,WAAW,EAAqB,MAAM,kBAAkB,CAAC;AAC7F,OAAO,KAAK,EAAE,IAAI,EAA4C,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;KAAE,EAAE,CAAC;CACpF,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAAE,CAAC;AAEjG,KAAK,WAAW,GAAG,CACjB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,KAAK,KAAK,EACjD,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,KAChC,MAAM,IAAI,CAAC;AA0ChB,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAe5D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAmBtD;AA+BD,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAOxF;AAYD,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAMlE;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,WAAW,GACjB,MAAM,IAAI,CA4BZ"}
|
package/dist/seed.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { queryKey } from '@agentshouse/mdmodel';
|
|
2
|
-
import { whole } from './observation.js';
|
|
2
|
+
import { pendingChange, whole } from './observation.js';
|
|
3
3
|
import { documentKey } from './rows.js';
|
|
4
4
|
const seedTopic = (key) => `seed\u0000${key}`;
|
|
5
5
|
function plain(value) {
|
|
@@ -82,9 +82,9 @@ function seedRoomHeld({ socket }, room, version, held) {
|
|
|
82
82
|
socket.reads.reached(room, stored.roomVersion, version));
|
|
83
83
|
}
|
|
84
84
|
function seedHeld(runtime, at, held) {
|
|
85
|
-
const { socket } = runtime;
|
|
85
|
+
const { socket, presence } = runtime;
|
|
86
86
|
return Object.entries(at).every(([room, version]) => (socket.session.now().roomsListed &&
|
|
87
|
-
|
|
87
|
+
presence.room(room) === undefined &&
|
|
88
88
|
!held.rooms.has(room)) ||
|
|
89
89
|
seedRoomHeld(runtime, room, version, held));
|
|
90
90
|
}
|
|
@@ -130,7 +130,7 @@ export function watchSeeded(runtime, plan, deliver, watch) {
|
|
|
130
130
|
const watcher = store.watch(seedTopic(plan.key), shown);
|
|
131
131
|
const stop = watch((cover, held) => seedBehind(runtime, plan, cover, held), (message) => {
|
|
132
132
|
const answered = message;
|
|
133
|
-
pending = whole(answered)
|
|
133
|
+
pending = whole(answered) ? 'pending' in answered.result : pendingChange(answered);
|
|
134
134
|
if (pending && store.seeds.of(plan.key) !== undefined) {
|
|
135
135
|
shown();
|
|
136
136
|
return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector.d.ts","sourceRoot":"","sources":["../src/selector.ts"],"names":[],"mappings":"AAaA,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,GACtC,OAAO,CAET;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,OAAO,EAAE,CAOnF"}
|
package/dist/selector.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function rewrittenAt(value, members, rewrite) {
|
|
2
|
+
if (Array.isArray(value))
|
|
3
|
+
return value.map((one) => rewrittenAt(one, members, rewrite));
|
|
4
|
+
const [member, ...rest] = members;
|
|
5
|
+
if (member === undefined)
|
|
6
|
+
return rewrite(value);
|
|
7
|
+
if (value === null || typeof value !== 'object' || !Object.hasOwn(value, member))
|
|
8
|
+
return value;
|
|
9
|
+
const held = value;
|
|
10
|
+
return { ...held, [member]: rewrittenAt(held[member], rest, rewrite) };
|
|
11
|
+
}
|
|
12
|
+
export function selectorRewritten(value, selector, rewrite) {
|
|
13
|
+
return rewrittenAt(value, selector.split('.'), rewrite);
|
|
14
|
+
}
|
|
15
|
+
export function selectorValues(value, selector) {
|
|
16
|
+
const selected = [];
|
|
17
|
+
selectorRewritten(value, selector, (one) => {
|
|
18
|
+
selected.push(one);
|
|
19
|
+
return one;
|
|
20
|
+
});
|
|
21
|
+
return selected;
|
|
22
|
+
}
|
package/dist/shown.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Member } from './adapter.js';
|
|
2
2
|
import { type ChangeSet } from './change-set.js';
|
|
3
3
|
import type { QueueEntry } from './outcome.js';
|
|
4
4
|
import type { Runtime } from './runtime.js';
|
|
@@ -10,23 +10,26 @@ export declare const REFUSAL_TOPIC = "connection-refusal";
|
|
|
10
10
|
export declare const STORAGE_LOSS_TOPIC = "storage-loss";
|
|
11
11
|
export declare const SERVICE_MODE_TOPIC = "service-mode";
|
|
12
12
|
export declare const MEMBER_TOPIC = "member";
|
|
13
|
+
export declare const TIME_ZONE_TOPIC = "time-zone";
|
|
13
14
|
export declare const AUTHORITY_TOPIC = "authority-changes";
|
|
14
15
|
export declare const LOCKS_TOPIC = "locks";
|
|
15
16
|
export declare const queueTopic: (locator: string) => string;
|
|
16
|
-
export declare function recoverReads({ liveQueries, figures }: Runtime): void;
|
|
17
|
+
export declare function recoverReads({ liveQueries, figures }: Runtime, locators?: readonly string[]): void;
|
|
17
18
|
export declare function emitRooms(runtime: Runtime, changed?: readonly string[]): Promise<void>;
|
|
18
19
|
export declare function emitKnownRooms(runtime: Runtime): void;
|
|
19
20
|
export declare function emitRefusal(runtime: Runtime): void;
|
|
20
|
-
export declare function
|
|
21
|
+
export declare function storageLossNow({ store }: Runtime): string | null;
|
|
22
|
+
export declare function emitStorageLoss(runtime: Runtime): void;
|
|
21
23
|
export declare function emitMember({ store }: Runtime, member: Member | null): void;
|
|
24
|
+
export declare function emitTimeZone({ store }: Runtime, zone: string | null): void;
|
|
22
25
|
export declare function show(runtime: Runtime): Promise<void>;
|
|
23
26
|
export declare function moveTo(runtime: Runtime, next: Moving): Promise<void>;
|
|
24
27
|
export declare function statusShown(runtime: Runtime): Promise<void>;
|
|
25
28
|
export declare function transferring({ socket }: Runtime): Moving;
|
|
26
|
-
export declare function pendingShown(runtime: Runtime): Promise<void>;
|
|
29
|
+
export declare function pendingShown(runtime: Runtime, locator: string): Promise<void>;
|
|
27
30
|
export declare function entriesOf(runtime: Runtime, locator: string): Promise<readonly QueueEntry[]>;
|
|
28
31
|
export declare function publishChangeSet(runtime: Runtime, set: ChangeSet): Promise<void>;
|
|
29
32
|
export declare function submissionDue(runtime: Runtime, locators?: readonly string[]): Promise<void>;
|
|
30
|
-
export declare function roomUnreadable(runtime: Runtime,
|
|
33
|
+
export declare function roomUnreadable(runtime: Runtime, locator: string): void;
|
|
31
34
|
export declare function rest(runtime: Runtime, progress: CycleProgress | null, live?: Live): Promise<void>;
|
|
32
35
|
//# sourceMappingURL=shown.d.ts.map
|
package/dist/shown.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shown.d.ts","sourceRoot":"","sources":["../src/shown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"shown.d.ts","sourceRoot":"","sources":["../src/shown.ts"],"names":[],"mappings":"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"}
|