@agentshouse/mdruntime-adapter 0.1.0-cdc1a38081f09 → 0.1.0-cdc4dd63f526f
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 +3 -3
- 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 +221 -399
- 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 +281 -0
- package/dist/digest.d.ts +0 -1
- package/dist/discovery.d.ts +44 -19
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +239 -72
- 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 +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/map.d.ts +0 -1
- package/dist/model.d.ts +6 -10
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +30 -54
- package/dist/read.d.ts +17 -70
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +70 -351
- package/dist/refusal.d.ts +6 -5
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +27 -11
- package/dist/room-query.d.ts +4 -0
- package/dist/room-query.d.ts.map +1 -0
- package/dist/room-query.js +36 -0
- 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/check.d.ts +17 -0
- package/dist/session-content/index.d.ts +6 -0
- package/dist/session-content/parts.d.ts +30 -0
- package/dist/session-content/state.d.ts +59 -0
- package/dist/session-content/turn.d.ts +137 -0
- package/dist/site.d.ts +0 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +97 -173
- 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 +242 -426
- package/dist/transport.d.ts +84 -43
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +89 -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 +39 -48
- package/package.json +8 -3
- package/AGENTS.md +0 -317
- package/dist/gather.d.ts +0 -4
- package/dist/gather.d.ts.map +0 -1
- package/dist/gather.js +0 -35
- 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 -6
- package/dist/room-types.d.ts.map +0 -1
- package/dist/room-types.js +0 -83
package/dist/site.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
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 {
|
|
7
|
-
import { classifyDoor, classifyRead, discoveryFailure } from './refusal.js';
|
|
8
|
-
import { HOUSE_ROOM_TYPES } from './room-types.js';
|
|
5
|
+
import { answeredFailure, discoveryFailure } from './refusal.js';
|
|
6
|
+
import { admittedPath } from './authored-path.js';
|
|
7
|
+
import { siteQuery } from './room-query.js';
|
|
9
8
|
import { houseNotifications } from './stream.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
9
|
+
import { houseSiteRoute, SITE_DOOR_ACTS, SITE_FILES, } from './transport.js';
|
|
10
|
+
import { UNANSWERED, unusable } from './uncertain.js';
|
|
11
|
+
import { followsVersion, reachedVersion, roomVersion } from './version.js';
|
|
13
12
|
function unfound() {
|
|
14
|
-
return { kind: 'rejected', code: '
|
|
13
|
+
return { kind: 'rejected', code: 'not_found', fields: {}, retryable: false };
|
|
15
14
|
}
|
|
16
15
|
function siteRoom(tracked) {
|
|
17
16
|
return {
|
|
@@ -19,179 +18,112 @@ function siteRoom(tracked) {
|
|
|
19
18
|
locator: tracked.locator,
|
|
20
19
|
handle: tracked.handle,
|
|
21
20
|
roomVersion: roomVersion(tracked),
|
|
22
|
-
operations: { write: [],
|
|
21
|
+
operations: { write: [], erase: [] },
|
|
23
22
|
replica: { selection: tracked.locator, admission: 'admitted', offline: 'open' },
|
|
23
|
+
typedSelection: null,
|
|
24
24
|
providerOwnedPaths: [],
|
|
25
|
+
authoredPaths: ['**'],
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
export function createSiteAdapter(transport, snapshot = false) {
|
|
28
|
-
const notifications = houseNotifications(transport, 'site'
|
|
29
|
+
const notifications = houseNotifications(transport, 'site', {
|
|
30
|
+
opened: async () => {
|
|
31
|
+
const found = await discovered();
|
|
32
|
+
return found.kind === 'discovery' ? found : null;
|
|
33
|
+
},
|
|
34
|
+
changed: () => null,
|
|
35
|
+
});
|
|
29
36
|
const tracked = new Map();
|
|
30
|
-
const
|
|
37
|
+
const chunked = new Map();
|
|
31
38
|
function fileRoute(request) {
|
|
32
39
|
const entry = tracked.get(request.locator);
|
|
33
40
|
if (entry === undefined)
|
|
34
41
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
35
42
|
return `${SITE_FILES}${entry.authority}/${encodeURIComponent(request.revision)}/${encodeURIComponent(request.path)}`;
|
|
36
43
|
}
|
|
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));
|
|
44
|
+
async function listedRoom(entry) {
|
|
45
|
+
const past = chunked.get(entry.locator)?.position;
|
|
46
|
+
const listed = siteChunkList(await transport.read(`${houseSiteRoute('chunks')}/${entry.authority}${past === undefined ? '' : `?expired=${past}`}`), entry.locator);
|
|
47
|
+
if ('kind' in listed)
|
|
48
|
+
return listed;
|
|
49
|
+
const head = await chunkedHead(listed, entry);
|
|
50
|
+
if (head.kind === 'bootstrap')
|
|
51
|
+
chunked.set(entry.locator, listed);
|
|
52
|
+
return head;
|
|
59
53
|
}
|
|
60
|
-
async function
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
async function chunkPage(entry, id, arriving) {
|
|
55
|
+
const room = chunked.get(entry.locator);
|
|
56
|
+
const address = room?.chunks.get(id);
|
|
57
|
+
if (room === undefined || address === undefined)
|
|
58
|
+
return UNANSWERED;
|
|
59
|
+
const read = await transport.download(address.url);
|
|
60
|
+
if (read.status !== 200)
|
|
61
|
+
return answeredFailure(read.status, null);
|
|
62
|
+
return chunkPart(read.body, room, id, arriving);
|
|
68
63
|
}
|
|
69
|
-
async function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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 };
|
|
64
|
+
async function discovered() {
|
|
65
|
+
const answer = await transport.read(houseSiteRoute('discover'));
|
|
66
|
+
const failed = discoveryFailure(answer.status, answer.body);
|
|
67
|
+
if (failed !== null)
|
|
68
|
+
return failed;
|
|
69
|
+
const document = parseSiteDiscovery(answer.body);
|
|
70
|
+
if (document === null)
|
|
71
|
+
return unusable();
|
|
72
|
+
const entries = siteTracked(document);
|
|
73
|
+
tracked.clear();
|
|
74
|
+
for (const entry of entries)
|
|
75
|
+
tracked.set(entry.locator, entry);
|
|
76
|
+
notifications.track(entries);
|
|
77
|
+
return {
|
|
78
|
+
...mapDiscovery(document, entries.map(siteRoom), siteCapabilities()),
|
|
79
|
+
queriesOnly: document.queriesOnly.map(({ roomRef, roomHandle }) => ({
|
|
80
|
+
locator: roomRef,
|
|
81
|
+
handle: roomHandle,
|
|
82
|
+
name: roomHandle,
|
|
83
|
+
})),
|
|
84
|
+
};
|
|
110
85
|
}
|
|
111
86
|
return {
|
|
112
87
|
localSaves: true,
|
|
113
|
-
exhaustiveDiscovery: true,
|
|
114
88
|
roomTypes: HOUSE_ROOM_TYPES,
|
|
89
|
+
typedPaths: HOUSE_TYPED_PATHS,
|
|
90
|
+
pathRule: admittedPath,
|
|
115
91
|
async authorize() {
|
|
116
92
|
return {};
|
|
117
93
|
},
|
|
118
|
-
async discover() {
|
|
119
|
-
const answer = await transport.read(SITE_DOOR_DISCOVER);
|
|
120
|
-
const failed = discoveryFailure(answer.status, answer.body);
|
|
121
|
-
if (failed !== null)
|
|
122
|
-
return failed;
|
|
123
|
-
const document = parseSiteDiscovery(answer.body);
|
|
124
|
-
if (document === null)
|
|
125
|
-
return UNCERTAIN;
|
|
126
|
-
const entries = siteTracked(document);
|
|
127
|
-
tracked.clear();
|
|
128
|
-
for (const entry of entries)
|
|
129
|
-
tracked.set(entry.locator, entry);
|
|
130
|
-
notifications.track(entries);
|
|
131
|
-
return mapDiscovery(document, entries.map(siteRoom), siteCapabilities());
|
|
132
|
-
},
|
|
133
94
|
async bootstrap(_authorization, request) {
|
|
134
95
|
const entry = tracked.get(request.locator);
|
|
135
96
|
if (entry === undefined)
|
|
136
97
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const room = await partedRoom(entry);
|
|
141
|
-
if ('kind' in room)
|
|
142
|
-
return room;
|
|
143
|
-
const { models, seen } = await manifestedModels(room, entry);
|
|
144
|
-
continued = { room, next: 0, seen };
|
|
145
|
-
inventory = partInventory(room);
|
|
146
|
-
if (inventory.parts > 0) {
|
|
147
|
-
return manifested(room, inventory, JSON.stringify(continued), models);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
else
|
|
151
|
-
continued = JSON.parse(request.pageToken);
|
|
152
|
-
const listed = continued.room.parts[continued.next];
|
|
153
|
-
const sent = listed === undefined
|
|
154
|
-
? { scope: emptyScope(continued.room), frame: null }
|
|
155
|
-
: await fetchedPart(entry, continued.room, listed, request.received, request.arriving);
|
|
156
|
-
if ('kind' in sent)
|
|
157
|
-
return sent;
|
|
158
|
-
const { scope } = sent;
|
|
159
|
-
notifications.reach(entry.authority, scope);
|
|
160
|
-
const next = continued.next + 1;
|
|
161
|
-
const more = next < continued.room.parts.length;
|
|
162
|
-
const seen = [
|
|
163
|
-
...continued.seen,
|
|
164
|
-
...entry.schemas.filter((schema) => scope.files.some((file) => file.path === schema)),
|
|
165
|
-
];
|
|
166
|
-
const models = await partModels(scope, entry, new Set(seen), !more);
|
|
167
|
-
const { folders: _folders, ...page } = await stepped(bootstrapping(scope));
|
|
168
|
-
return {
|
|
169
|
-
...page,
|
|
170
|
-
...(models === undefined ? {} : { models }),
|
|
171
|
-
...(more ? { pageToken: JSON.stringify({ ...continued, next, seen }) } : {}),
|
|
172
|
-
...(inventory === undefined ? {} : { inventory }),
|
|
173
|
-
...(sent.frame === null ? {} : { received: sent.frame }),
|
|
174
|
-
};
|
|
98
|
+
return request.pageToken === undefined
|
|
99
|
+
? listedRoom(entry)
|
|
100
|
+
: chunkPage(entry, request.pageToken, request.arriving);
|
|
175
101
|
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
102
|
+
...(snapshot
|
|
103
|
+
? {
|
|
104
|
+
discover: discovered,
|
|
105
|
+
async refresh(_authorization, request) {
|
|
106
|
+
const entry = tracked.get(request.locator);
|
|
107
|
+
if (entry === undefined)
|
|
108
|
+
return { kind: 'room-not-readable', locator: request.locator };
|
|
109
|
+
if (request.pageToken !== undefined)
|
|
110
|
+
return UNANSWERED;
|
|
111
|
+
return request.fromRoomVersion === roomVersion(entry)
|
|
112
|
+
? { kind: 'still-current' }
|
|
113
|
+
: { kind: 'beyond-horizon' };
|
|
114
|
+
},
|
|
186
115
|
}
|
|
187
|
-
|
|
188
|
-
},
|
|
116
|
+
: {}),
|
|
189
117
|
async mutate() {
|
|
190
118
|
return { kind: 'rejected', affected: {}, code: 'write-grant', fields: {}, retryable: false };
|
|
191
119
|
},
|
|
120
|
+
async attach() {
|
|
121
|
+
return { kind: 'rejected', code: 'write-grant', fields: {}, retryable: false };
|
|
122
|
+
},
|
|
192
123
|
async history() {
|
|
193
124
|
return { kind: 'no-history' };
|
|
194
125
|
},
|
|
126
|
+
queryHouse: snapshot ? undefined : (_authorization, request) => siteQuery(transport, request),
|
|
195
127
|
async binary(_authorization, request) {
|
|
196
128
|
const route = fileRoute(request);
|
|
197
129
|
if (typeof route !== 'string')
|
|
@@ -199,11 +131,15 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
199
131
|
const read = await transport.download(route);
|
|
200
132
|
if (read.status === 404)
|
|
201
133
|
return unfound();
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
134
|
+
if (read.status !== 200)
|
|
135
|
+
return answeredFailure(read.status, null);
|
|
136
|
+
if (read.body === null)
|
|
137
|
+
return unusable();
|
|
138
|
+
return { kind: 'binary', body: read.body, mediaType: read.mediaType };
|
|
205
139
|
},
|
|
206
140
|
async link(_authorization, request) {
|
|
141
|
+
if (request.kind === 'key')
|
|
142
|
+
return unfound();
|
|
207
143
|
const route = fileRoute(request);
|
|
208
144
|
if (typeof route !== 'string')
|
|
209
145
|
return route;
|
|
@@ -220,7 +156,10 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
220
156
|
return followsVersion(version, next);
|
|
221
157
|
},
|
|
222
158
|
async action(_authorization, request) {
|
|
223
|
-
|
|
159
|
+
const route = Object.hasOwn(SITE_DOOR_ACTS, request.name)
|
|
160
|
+
? SITE_DOOR_ACTS[request.name]
|
|
161
|
+
: null;
|
|
162
|
+
if (route === null) {
|
|
224
163
|
return {
|
|
225
164
|
kind: 'rejected',
|
|
226
165
|
code: 'action-unimplemented',
|
|
@@ -229,29 +168,14 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
229
168
|
};
|
|
230
169
|
}
|
|
231
170
|
if (!transport.online())
|
|
232
|
-
return
|
|
233
|
-
return actionOutcome(await transport.door(
|
|
171
|
+
return UNANSWERED;
|
|
172
|
+
return actionOutcome(await transport.door(route, request.input), request.name, request.input);
|
|
234
173
|
},
|
|
235
174
|
roomStream: snapshot
|
|
236
175
|
? undefined
|
|
237
176
|
: {
|
|
238
|
-
hold
|
|
239
|
-
notifications.send(rooms.flatMap((room) => {
|
|
240
|
-
const entry = tracked.get(room.locator);
|
|
241
|
-
const at = logPosition(room.roomVersion);
|
|
242
|
-
if (entry === undefined || at === null)
|
|
243
|
-
return [];
|
|
244
|
-
notifications.reach(entry.authority, at);
|
|
245
|
-
return [presented(entry.authority, at)];
|
|
246
|
-
}));
|
|
247
|
-
},
|
|
248
|
-
reopen: notifications.reopen,
|
|
177
|
+
hold: notifications.send,
|
|
249
178
|
observe: notifications.observe,
|
|
250
|
-
published(locator, roomVersion) {
|
|
251
|
-
const at = logPosition(roomVersion);
|
|
252
|
-
if (at !== null)
|
|
253
|
-
notifications.published(locator, at);
|
|
254
|
-
},
|
|
255
179
|
},
|
|
256
180
|
serviceMode: notifications.serviceMode,
|
|
257
181
|
};
|
|
@@ -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;AAYvD,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;AAyFF,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,gBAAgB,GAC5B,kBAAkB,CAoYpB"}
|