@agentshouse/mdruntime-adapter 0.1.0-c82b9ec2b727a → 0.1.0-c82bbadeabf45
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 +2 -2
- package/dist/actions.d.ts +6 -60
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +26 -295
- package/dist/adapter.d.ts +0 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +196 -389
- package/dist/authored-path.d.ts +9 -0
- package/dist/authored-path.d.ts.map +1 -0
- package/dist/authored-path.js +34 -0
- package/dist/chunks.d.ts +36 -0
- package/dist/chunks.d.ts.map +1 -0
- package/dist/chunks.js +289 -0
- package/dist/digest.d.ts +0 -1
- package/dist/discovery.d.ts +21 -11
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +70 -38
- package/dist/history.d.ts +6 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +85 -0
- package/dist/index.d.ts +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/map.d.ts +0 -1
- package/dist/model.d.ts +5 -9
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +28 -34
- package/dist/read.d.ts +21 -60
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +52 -332
- package/dist/refusal.d.ts +3 -5
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +17 -12
- package/dist/search.d.ts +4 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +47 -0
- package/dist/session-content/bounds.d.ts +7 -0
- package/dist/session-content/check.d.ts +18 -0
- package/dist/session-content/index.d.ts +7 -0
- package/dist/session-content/parts.d.ts +103 -0
- package/dist/session-content/state.d.ts +61 -0
- package/dist/session-content/turn.d.ts +328 -0
- package/dist/site.d.ts +0 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +83 -174
- package/dist/space-schema.d.ts +6 -0
- package/dist/space-schema.d.ts.map +1 -0
- package/dist/space-schema.js +11 -0
- package/dist/stream.d.ts +15 -16
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +247 -425
- package/dist/transport.d.ts +58 -42
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +54 -11
- package/dist/uncertain.d.ts +5 -0
- package/dist/uncertain.d.ts.map +1 -0
- package/dist/uncertain.js +11 -0
- package/dist/upload.d.ts +3 -2
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +10 -8
- package/dist/version.d.ts +0 -1
- package/dist/write.d.ts +6 -3
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +37 -44
- package/package.json +3 -2
- package/dist/app-reference.d.ts +0 -2
- package/dist/app-reference.d.ts.map +0 -1
- package/dist/app-reference.js +0 -2
- package/dist/crockford.d.ts +0 -4
- package/dist/crockford.d.ts.map +0 -1
- package/dist/crockford.js +0 -3
- package/dist/gather.d.ts +0 -4
- package/dist/gather.d.ts.map +0 -1
- package/dist/gather.js +0 -35
- package/dist/house-model.d.ts +0 -2
- package/dist/house-model.d.ts.map +0 -1
- package/dist/house-model.js +0 -415
- package/dist/part.d.ts +0 -15
- package/dist/part.d.ts.map +0 -1
- package/dist/part.js +0 -82
- package/dist/room-types.d.ts +0 -7
- package/dist/room-types.d.ts.map +0 -1
- package/dist/room-types.js +0 -124
package/dist/site.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { actionOutcome
|
|
1
|
+
import { HOUSE_ROOM_TYPES, HOUSE_TYPED_PATHS } from '@agentshouse/mdmodel';
|
|
2
|
+
import { actionOutcome } from './actions.js';
|
|
3
|
+
import { chunkedHead, chunkPart, siteChunkList } from './chunks.js';
|
|
3
4
|
import { mapDiscovery, parseSiteDiscovery, siteCapabilities, siteTracked, } from './discovery.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { PART_ATTEMPTS, partArrival, partFrame, unverifiedPart } from './part.js';
|
|
7
|
-
import { classifyDoor, classifyRead, discoveryFailure } from './refusal.js';
|
|
8
|
-
import { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES } from './room-types.js';
|
|
5
|
+
import { answeredFailure, discoveryFailure } from './refusal.js';
|
|
6
|
+
import { admittedPath } from './authored-path.js';
|
|
9
7
|
import { houseNotifications } from './stream.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
8
|
+
import { houseSiteRoute, SITE_DOOR_SUBMIT, SITE_FILES, SITES_SUBMISSIONS_CREATE, } from './transport.js';
|
|
9
|
+
import { UNANSWERED, unusable } from './uncertain.js';
|
|
10
|
+
import { followsVersion, reachedVersion, roomVersion } from './version.js';
|
|
13
11
|
function unfound() {
|
|
14
|
-
return { kind: 'rejected', code: '
|
|
12
|
+
return { kind: 'rejected', code: 'not_found', fields: {}, retryable: false };
|
|
15
13
|
}
|
|
16
14
|
function siteRoom(tracked) {
|
|
17
15
|
return {
|
|
@@ -19,177 +17,101 @@ function siteRoom(tracked) {
|
|
|
19
17
|
locator: tracked.locator,
|
|
20
18
|
handle: tracked.handle,
|
|
21
19
|
roomVersion: roomVersion(tracked),
|
|
22
|
-
operations: { write: [],
|
|
20
|
+
operations: { write: [], erase: [] },
|
|
23
21
|
replica: { selection: tracked.locator, admission: 'admitted', offline: 'open' },
|
|
22
|
+
typedSelection: null,
|
|
24
23
|
providerOwnedPaths: [],
|
|
24
|
+
authoredPaths: ['**'],
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export function createSiteAdapter(transport, snapshot = false) {
|
|
28
|
-
const notifications = houseNotifications(transport, 'site'
|
|
28
|
+
const notifications = houseNotifications(transport, 'site', {
|
|
29
|
+
opened: async () => {
|
|
30
|
+
const found = await discovered();
|
|
31
|
+
return found.kind === 'discovery' ? found : null;
|
|
32
|
+
},
|
|
33
|
+
changed: () => null,
|
|
34
|
+
});
|
|
29
35
|
const tracked = new Map();
|
|
30
|
-
const
|
|
36
|
+
const chunked = new Map();
|
|
31
37
|
function fileRoute(request) {
|
|
32
38
|
const entry = tracked.get(request.locator);
|
|
33
39
|
if (entry === undefined)
|
|
34
40
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
35
41
|
return `${SITE_FILES}${entry.authority}/${encodeURIComponent(request.revision)}/${encodeURIComponent(request.path)}`;
|
|
36
42
|
}
|
|
37
|
-
async function
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
],
|
|
47
|
-
});
|
|
48
|
-
const classified = classifyRead(answer.status, answer.body, entry.locator);
|
|
49
|
-
if (classified !== null)
|
|
50
|
-
return classified;
|
|
51
|
-
const found = parseEnumeration(answer.body, 'site');
|
|
52
|
-
if (found === null)
|
|
53
|
-
return UNCERTAIN;
|
|
54
|
-
return viewOf(found, entry) ?? { kind: 'room-not-readable', locator: entry.locator };
|
|
55
|
-
}
|
|
56
|
-
async function enumeration(entry, from) {
|
|
57
|
-
const first = await enumerated(entry, from);
|
|
58
|
-
return 'kind' in first ? first : wholeView(first, (page) => enumerated(entry, from, page));
|
|
43
|
+
async function listedRoom(entry) {
|
|
44
|
+
const past = chunked.get(entry.locator)?.position;
|
|
45
|
+
const listed = siteChunkList(await transport.read(`${houseSiteRoute('chunks')}/${entry.authority}${past === undefined ? '' : `?expired=${past}`}`), entry.locator);
|
|
46
|
+
if ('kind' in listed)
|
|
47
|
+
return listed;
|
|
48
|
+
const head = await chunkedHead(listed, entry);
|
|
49
|
+
if (head.kind === 'bootstrap')
|
|
50
|
+
chunked.set(entry.locator, listed);
|
|
51
|
+
return head;
|
|
59
52
|
}
|
|
60
|
-
async function
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
async function chunkPage(entry, id, arriving) {
|
|
54
|
+
const room = chunked.get(entry.locator);
|
|
55
|
+
const address = room?.chunks.get(id);
|
|
56
|
+
if (room === undefined || address === undefined)
|
|
57
|
+
return UNANSWERED;
|
|
58
|
+
const read = await transport.download(address.url);
|
|
59
|
+
if (read.status !== 200)
|
|
60
|
+
return answeredFailure(read.status, null);
|
|
61
|
+
return chunkPart(read.body, room, id, arriving);
|
|
68
62
|
}
|
|
69
|
-
async function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const frame = partFrame(answer.body);
|
|
84
|
-
if (frame === null)
|
|
85
|
-
continue;
|
|
86
|
-
const scope = await housePart(room, frame, listed, 'site');
|
|
87
|
-
if (scope !== null)
|
|
88
|
-
return 'kind' in scope ? scope : { scope, frame };
|
|
89
|
-
}
|
|
90
|
-
return unverifiedPart(entry.locator);
|
|
91
|
-
}
|
|
92
|
-
async function refreshed(entry, fromRoomVersion) {
|
|
93
|
-
const from = logPosition(fromRoomVersion);
|
|
94
|
-
if (from === null)
|
|
95
|
-
return { kind: 'beyond-horizon' };
|
|
96
|
-
const streamed = await stepped(notifications.advance(entry, from));
|
|
97
|
-
if (streamed !== null) {
|
|
98
|
-
const models = await streamedModels(streamed.schemas, entry, 'site');
|
|
99
|
-
return models === undefined ? streamed.page : { ...streamed.page, models };
|
|
100
|
-
}
|
|
101
|
-
const view = await enumeration(entry, from);
|
|
102
|
-
if ('kind' in view)
|
|
103
|
-
return view;
|
|
104
|
-
notifications.reach(entry.authority, view);
|
|
105
|
-
const answer = await refreshFrom(view, fromRoomVersion);
|
|
106
|
-
if (answer.kind !== 'net-advancement')
|
|
107
|
-
return answer;
|
|
108
|
-
const models = await viewModels(view, entry);
|
|
109
|
-
return models === undefined ? answer : { ...answer, models };
|
|
63
|
+
async function discovered() {
|
|
64
|
+
const answer = await transport.read(houseSiteRoute('discover'));
|
|
65
|
+
const failed = discoveryFailure(answer.status, answer.body);
|
|
66
|
+
if (failed !== null)
|
|
67
|
+
return failed;
|
|
68
|
+
const document = parseSiteDiscovery(answer.body);
|
|
69
|
+
if (document === null)
|
|
70
|
+
return unusable();
|
|
71
|
+
const entries = siteTracked(document);
|
|
72
|
+
tracked.clear();
|
|
73
|
+
for (const entry of entries)
|
|
74
|
+
tracked.set(entry.locator, entry);
|
|
75
|
+
notifications.track(entries);
|
|
76
|
+
return mapDiscovery(document, entries.map(siteRoom), siteCapabilities());
|
|
110
77
|
}
|
|
111
78
|
return {
|
|
112
79
|
localSaves: true,
|
|
113
|
-
exhaustiveDiscovery: true,
|
|
114
80
|
roomTypes: HOUSE_ROOM_TYPES,
|
|
115
|
-
|
|
81
|
+
typedPaths: HOUSE_TYPED_PATHS,
|
|
82
|
+
pathRule: admittedPath,
|
|
116
83
|
async authorize() {
|
|
117
84
|
return {};
|
|
118
85
|
},
|
|
119
|
-
async discover() {
|
|
120
|
-
const answer = await transport.read(SITE_DOOR_DISCOVER);
|
|
121
|
-
const failed = discoveryFailure(answer.status, answer.body);
|
|
122
|
-
if (failed !== null)
|
|
123
|
-
return failed;
|
|
124
|
-
const document = parseSiteDiscovery(answer.body);
|
|
125
|
-
if (document === null)
|
|
126
|
-
return UNCERTAIN;
|
|
127
|
-
const entries = siteTracked(document);
|
|
128
|
-
tracked.clear();
|
|
129
|
-
for (const entry of entries)
|
|
130
|
-
tracked.set(entry.locator, entry);
|
|
131
|
-
notifications.track(entries);
|
|
132
|
-
return mapDiscovery(document, entries.map(siteRoom), siteCapabilities());
|
|
133
|
-
},
|
|
134
86
|
async bootstrap(_authorization, request) {
|
|
135
87
|
const entry = tracked.get(request.locator);
|
|
136
88
|
if (entry === undefined)
|
|
137
89
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const room = await partedRoom(entry);
|
|
142
|
-
if ('kind' in room)
|
|
143
|
-
return room;
|
|
144
|
-
const { models, seen } = await manifestedModels(room, entry);
|
|
145
|
-
continued = { room, next: 0, seen };
|
|
146
|
-
inventory = partInventory(room);
|
|
147
|
-
if (inventory.parts > 0) {
|
|
148
|
-
return manifested(room, inventory, JSON.stringify(continued), models);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
else
|
|
152
|
-
continued = JSON.parse(request.pageToken);
|
|
153
|
-
const listed = continued.room.parts[continued.next];
|
|
154
|
-
const sent = listed === undefined
|
|
155
|
-
? { scope: emptyScope(continued.room), frame: null }
|
|
156
|
-
: await fetchedPart(entry, continued.room, listed, request.received, request.arriving);
|
|
157
|
-
if ('kind' in sent)
|
|
158
|
-
return sent;
|
|
159
|
-
const { scope } = sent;
|
|
160
|
-
notifications.reach(entry.authority, scope);
|
|
161
|
-
const next = continued.next + 1;
|
|
162
|
-
const more = next < continued.room.parts.length;
|
|
163
|
-
const seen = [
|
|
164
|
-
...continued.seen,
|
|
165
|
-
...(scope.files.some((file) => file.path === entry.schema) ? [entry.schema] : []),
|
|
166
|
-
];
|
|
167
|
-
const models = await partModels(scope, entry, new Set(seen), !more);
|
|
168
|
-
const { folders: _folders, ...page } = await stepped(bootstrapping(scope));
|
|
169
|
-
return {
|
|
170
|
-
...page,
|
|
171
|
-
...(models === undefined ? {} : { models }),
|
|
172
|
-
...(more ? { pageToken: JSON.stringify({ ...continued, next, seen }) } : {}),
|
|
173
|
-
...(inventory === undefined ? {} : { inventory }),
|
|
174
|
-
...(sent.frame === null ? {} : { received: sent.frame }),
|
|
175
|
-
};
|
|
90
|
+
return request.pageToken === undefined
|
|
91
|
+
? listedRoom(entry)
|
|
92
|
+
: chunkPage(entry, request.pageToken, request.arriving);
|
|
176
93
|
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
94
|
+
...(snapshot
|
|
95
|
+
? {
|
|
96
|
+
discover: discovered,
|
|
97
|
+
async refresh(_authorization, request) {
|
|
98
|
+
const entry = tracked.get(request.locator);
|
|
99
|
+
if (entry === undefined)
|
|
100
|
+
return { kind: 'room-not-readable', locator: request.locator };
|
|
101
|
+
if (request.pageToken !== undefined)
|
|
102
|
+
return UNANSWERED;
|
|
103
|
+
return request.fromRoomVersion === roomVersion(entry)
|
|
104
|
+
? { kind: 'still-current' }
|
|
105
|
+
: { kind: 'beyond-horizon' };
|
|
106
|
+
},
|
|
187
107
|
}
|
|
188
|
-
|
|
189
|
-
},
|
|
108
|
+
: {}),
|
|
190
109
|
async mutate() {
|
|
191
110
|
return { kind: 'rejected', affected: {}, code: 'write-grant', fields: {}, retryable: false };
|
|
192
111
|
},
|
|
112
|
+
async attach() {
|
|
113
|
+
return { kind: 'rejected', code: 'write-grant', fields: {}, retryable: false };
|
|
114
|
+
},
|
|
193
115
|
async history() {
|
|
194
116
|
return { kind: 'no-history' };
|
|
195
117
|
},
|
|
@@ -200,9 +122,11 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
200
122
|
const read = await transport.download(route);
|
|
201
123
|
if (read.status === 404)
|
|
202
124
|
return unfound();
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
125
|
+
if (read.status !== 200)
|
|
126
|
+
return answeredFailure(read.status, null);
|
|
127
|
+
if (read.body === null)
|
|
128
|
+
return unusable();
|
|
129
|
+
return { kind: 'binary', body: read.body, mediaType: read.mediaType };
|
|
206
130
|
},
|
|
207
131
|
async link(_authorization, request) {
|
|
208
132
|
const route = fileRoute(request);
|
|
@@ -221,7 +145,7 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
221
145
|
return followsVersion(version, next);
|
|
222
146
|
},
|
|
223
147
|
async action(_authorization, request) {
|
|
224
|
-
if (request.name !==
|
|
148
|
+
if (request.name !== SITES_SUBMISSIONS_CREATE) {
|
|
225
149
|
return {
|
|
226
150
|
kind: 'rejected',
|
|
227
151
|
code: 'action-unimplemented',
|
|
@@ -230,29 +154,14 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
230
154
|
};
|
|
231
155
|
}
|
|
232
156
|
if (!transport.online())
|
|
233
|
-
return
|
|
234
|
-
return actionOutcome(await transport.door(SITE_DOOR_SUBMIT, request.input),
|
|
157
|
+
return UNANSWERED;
|
|
158
|
+
return actionOutcome(await transport.door(SITE_DOOR_SUBMIT, request.input), SITES_SUBMISSIONS_CREATE, request.input);
|
|
235
159
|
},
|
|
236
160
|
roomStream: snapshot
|
|
237
161
|
? undefined
|
|
238
162
|
: {
|
|
239
|
-
hold
|
|
240
|
-
notifications.send(rooms.flatMap((room) => {
|
|
241
|
-
const entry = tracked.get(room.locator);
|
|
242
|
-
const at = logPosition(room.roomVersion);
|
|
243
|
-
if (entry === undefined || at === null)
|
|
244
|
-
return [];
|
|
245
|
-
notifications.reach(entry.authority, at);
|
|
246
|
-
return [presented(entry.authority, at)];
|
|
247
|
-
}));
|
|
248
|
-
},
|
|
249
|
-
reopen: notifications.reopen,
|
|
163
|
+
hold: notifications.send,
|
|
250
164
|
observe: notifications.observe,
|
|
251
|
-
published(locator, roomVersion) {
|
|
252
|
-
const at = logPosition(roomVersion);
|
|
253
|
-
if (at !== null)
|
|
254
|
-
notifications.published(locator, at);
|
|
255
|
-
},
|
|
256
165
|
},
|
|
257
166
|
serviceMode: notifications.serviceMode,
|
|
258
167
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type SpaceSchemas = {
|
|
2
|
+
held(space: string, revision: string): string | undefined;
|
|
3
|
+
keep(space: string, revision: string, text: string): void;
|
|
4
|
+
};
|
|
5
|
+
export declare function spaceSchemas(): SpaceSchemas;
|
|
6
|
+
export declare function spaceIdentity(space: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-schema.d.ts","sourceRoot":"","sources":["../src/space-schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3D,CAAC;AAEF,wBAAgB,YAAY,IAAI,YAAY,CAO3C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function spaceSchemas() {
|
|
2
|
+
const texts = new Map();
|
|
3
|
+
const key = (space, revision) => `${space} ${revision}`;
|
|
4
|
+
return {
|
|
5
|
+
held: (space, revision) => texts.get(key(space, revision)),
|
|
6
|
+
keep: (space, revision, text) => void texts.set(key(space, revision), text),
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export function spaceIdentity(space) {
|
|
10
|
+
return `space:${space}`;
|
|
11
|
+
}
|
package/dist/stream.d.ts
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type AuthorityChange, type Discovery, type ConversationStream, type HeldRoom, type RoomStreamEvent, type ServiceModeSignal } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
3
|
-
import type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { type HouseDoor, type HouseMode, type HouseStreamFrame } from './transport.js';
|
|
4
|
+
export type HouseOpeningFrame = Extract<HouseStreamFrame, {
|
|
5
|
+
type: 'opening';
|
|
6
|
+
}>;
|
|
7
|
+
export type HouseAuthorityChangedFrame = Extract<HouseStreamFrame, {
|
|
8
|
+
type: 'authority_changed';
|
|
9
|
+
}>;
|
|
10
|
+
export type HouseDiscovering = {
|
|
11
|
+
opened(frame: HouseOpeningFrame | null): Promise<Discovery | null>;
|
|
12
|
+
changed(frame: HouseAuthorityChangedFrame): AuthorityChange | null;
|
|
13
|
+
expired?(entries: readonly TrackedAuthority[]): void;
|
|
9
14
|
};
|
|
10
15
|
export type HouseNotifications = {
|
|
11
16
|
runtime: string;
|
|
12
|
-
observe(notify: (event: RoomStreamEvent) => void
|
|
13
|
-
send(rooms: readonly
|
|
14
|
-
published(locator: string, at: LogPosition): void;
|
|
15
|
-
reopen(): void;
|
|
17
|
+
observe(notify: (event: RoomStreamEvent) => void): () => void;
|
|
18
|
+
send(rooms: readonly HeldRoom[]): void;
|
|
16
19
|
track(authorities: readonly TrackedAuthority[]): void;
|
|
17
|
-
reach(authority: string, at: LogPosition): void;
|
|
18
|
-
edited(tracked: TrackedAuthority, from: LogPosition): readonly string[];
|
|
19
|
-
advance(tracked: TrackedAuthority, from: LogPosition, holds?: HeldRevision): Generator<number, StreamedAdvancement | null, void>;
|
|
20
20
|
conversations: ConversationStream;
|
|
21
21
|
serviceMode: ServiceModeSignal;
|
|
22
22
|
};
|
|
23
|
-
export declare function houseNotifications(transport: HouseDoor, mode: HouseMode): HouseNotifications;
|
|
24
|
-
//# sourceMappingURL=stream.d.ts.map
|
|
23
|
+
export declare function houseNotifications(transport: HouseDoor, mode: HouseMode, discovering: HouseDiscovering): HouseNotifications;
|
package/dist/stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAEpB,KAAK,SAAS,EACd,KAAK,kBAAkB,EAEvB,KAAK,QAAQ,EAGb,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EAEvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAavD,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,SAAS,EAGd,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAaxB,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAE/E,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAAC;AAElG,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACnE,OAAO,CAAC,KAAK,EAAE,0BAA0B,GAAG,eAAe,GAAG,IAAI,CAAC;IACnE,OAAO,CAAC,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,IAAI,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAC;IACvC,KAAK,CAAC,WAAW,EAAE,SAAS,gBAAgB,EAAE,GAAG,IAAI,CAAC;IACtD,aAAa,EAAE,kBAAkB,CAAC;IAClC,WAAW,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAiGF,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,gBAAgB,GAC5B,kBAAkB,CAgYpB"}
|