@agentshouse/mdruntime-adapter 0.1.0-c51fa73c21cdb → 0.1.0-c543f40f7ffb2
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 +62 -47
- package/dist/actions.d.ts +1 -16
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +20 -49
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +83 -91
- package/dist/digest.d.ts +1 -1
- package/dist/digest.d.ts.map +1 -1
- package/dist/digest.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/part.d.ts +3 -1
- package/dist/part.d.ts.map +1 -1
- package/dist/part.js +10 -5
- package/dist/read.d.ts +16 -3
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +87 -52
- package/dist/referrer.d.ts +6 -1
- package/dist/referrer.d.ts.map +1 -1
- package/dist/referrer.js +6 -8
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +33 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +36 -36
- package/dist/stream.d.ts +1 -0
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +16 -1
- package/dist/transport.d.ts +10 -9
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +1 -1
- package/dist/upload.d.ts +12 -0
- package/dist/upload.d.ts.map +1 -0
- package/dist/upload.js +52 -0
- package/package.json +2 -2
- package/dist/handed.d.ts +0 -15
- package/dist/handed.d.ts.map +0 -1
- package/dist/handed.js +0 -45
package/dist/read.js
CHANGED
|
@@ -13,6 +13,8 @@ export function answering() {
|
|
|
13
13
|
changes: new Map(),
|
|
14
14
|
binaryFiles: new Map(),
|
|
15
15
|
removals: new Set(),
|
|
16
|
+
folders: new Set(),
|
|
17
|
+
folderRemovals: new Set(),
|
|
16
18
|
};
|
|
17
19
|
}
|
|
18
20
|
export function revised(answer, path, revision) {
|
|
@@ -29,12 +31,26 @@ export function forgotten(answer, path) {
|
|
|
29
31
|
answer.binaryFiles.delete(path);
|
|
30
32
|
answer.removals.delete(path);
|
|
31
33
|
}
|
|
32
|
-
export function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
export function folded(answer, path, removed) {
|
|
35
|
+
if (removed) {
|
|
36
|
+
answer.folders.delete(path);
|
|
37
|
+
answer.folderRemovals.add(path);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
answer.folderRemovals.delete(path);
|
|
41
|
+
answer.folders.add(path);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function* pathsOf(paths) {
|
|
45
|
+
const list = [];
|
|
46
|
+
for (const path of paths) {
|
|
47
|
+
list.push(path);
|
|
36
48
|
yield ROW_WEIGHT;
|
|
37
49
|
}
|
|
50
|
+
return list;
|
|
51
|
+
}
|
|
52
|
+
export function* answered(answer) {
|
|
53
|
+
const removals = yield* pathsOf(answer.removals);
|
|
38
54
|
return {
|
|
39
55
|
documents: yield* patching({}, answer.documents),
|
|
40
56
|
revisions: yield* patching({}, answer.revisions),
|
|
@@ -42,6 +58,10 @@ export function* answered(answer) {
|
|
|
42
58
|
changes: yield* patching({}, answer.changes),
|
|
43
59
|
binaryFiles: yield* patching({}, answer.binaryFiles),
|
|
44
60
|
removals,
|
|
61
|
+
...(answer.folders.size === 0 ? {} : { folders: yield* pathsOf(answer.folders) }),
|
|
62
|
+
...(answer.folderRemovals.size === 0
|
|
63
|
+
? {}
|
|
64
|
+
: { folderRemovals: yield* pathsOf(answer.folderRemovals) }),
|
|
45
65
|
};
|
|
46
66
|
}
|
|
47
67
|
export function authorityRoot(handle) {
|
|
@@ -66,11 +86,14 @@ export function parseGrant(body) {
|
|
|
66
86
|
export function parseFileAddress(body) {
|
|
67
87
|
if (typeof body !== 'object' || body === null)
|
|
68
88
|
return null;
|
|
69
|
-
const { download, name, sha256 } = body;
|
|
70
|
-
if (typeof download !== 'string' ||
|
|
89
|
+
const { download, name, sha256, media_type: mediaType } = body;
|
|
90
|
+
if (typeof download !== 'string' ||
|
|
91
|
+
typeof name !== 'string' ||
|
|
92
|
+
typeof sha256 !== 'string' ||
|
|
93
|
+
typeof mediaType !== 'string') {
|
|
71
94
|
return null;
|
|
72
95
|
}
|
|
73
|
-
return { url: download, name, sha256 };
|
|
96
|
+
return { url: download, name, sha256, mediaType };
|
|
74
97
|
}
|
|
75
98
|
function changeAuthor(value) {
|
|
76
99
|
if (typeof value !== 'object' || value === null)
|
|
@@ -195,6 +218,24 @@ export function parseParted(body) {
|
|
|
195
218
|
export function parseSiteParted(body) {
|
|
196
219
|
return parseRoomParts(body);
|
|
197
220
|
}
|
|
221
|
+
export function partInventory(room) {
|
|
222
|
+
return {
|
|
223
|
+
parts: room.parts.length,
|
|
224
|
+
bytes: room.parts.reduce((sum, part) => sum + part.bytes, 0),
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
export function manifested(room, inventory, pageToken) {
|
|
228
|
+
return {
|
|
229
|
+
kind: 'bootstrap',
|
|
230
|
+
roomVersion: roomVersion(room),
|
|
231
|
+
documents: {},
|
|
232
|
+
revisions: {},
|
|
233
|
+
changes: {},
|
|
234
|
+
binaryFiles: {},
|
|
235
|
+
inventory,
|
|
236
|
+
pageToken,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
198
239
|
export function emptyScope(room) {
|
|
199
240
|
return {
|
|
200
241
|
anchor: room.anchor,
|
|
@@ -207,6 +248,7 @@ export function emptyScope(room) {
|
|
|
207
248
|
function* partLines(text, mode) {
|
|
208
249
|
const files = [];
|
|
209
250
|
const contents = [];
|
|
251
|
+
const folders = [];
|
|
210
252
|
let start = 0;
|
|
211
253
|
while (start < text.length) {
|
|
212
254
|
const end = text.indexOf('\n', start);
|
|
@@ -220,8 +262,11 @@ function* partLines(text, mode) {
|
|
|
220
262
|
return null;
|
|
221
263
|
}
|
|
222
264
|
start = end + 1;
|
|
223
|
-
if (folderLine(entry))
|
|
265
|
+
if (folderLine(entry)) {
|
|
266
|
+
folders.push(entry.folder);
|
|
267
|
+
yield ROW_WEIGHT;
|
|
224
268
|
continue;
|
|
269
|
+
}
|
|
225
270
|
const file = parseFile(entry, mode);
|
|
226
271
|
if (file === null)
|
|
227
272
|
return null;
|
|
@@ -233,21 +278,32 @@ function* partLines(text, mode) {
|
|
|
233
278
|
return null;
|
|
234
279
|
yield ROW_WEIGHT;
|
|
235
280
|
}
|
|
236
|
-
return { files, contents };
|
|
281
|
+
return { files, contents, folders };
|
|
237
282
|
}
|
|
238
283
|
function folderLine(entry) {
|
|
239
284
|
if (typeof entry !== 'object' || entry === null || !('folder' in entry))
|
|
240
285
|
return false;
|
|
241
286
|
return typeof entry.folder === 'string' && Object.keys(entry).length === 1;
|
|
242
287
|
}
|
|
243
|
-
export async function housePart(room,
|
|
244
|
-
const payload = await checkedPayload(
|
|
288
|
+
export async function housePart(room, frame, listed, mode) {
|
|
289
|
+
const payload = await checkedPayload(frame, listed);
|
|
245
290
|
if (payload === null)
|
|
246
291
|
return null;
|
|
247
292
|
const text = await gunzipped(payload);
|
|
248
293
|
const read = text === null ? null : await stepped(partLines(text, mode));
|
|
249
294
|
return read === null ? { kind: 'transport-uncertainty' } : { ...emptyScope(room), ...read };
|
|
250
295
|
}
|
|
296
|
+
function folderChange(value) {
|
|
297
|
+
if (typeof value !== 'object' || value === null)
|
|
298
|
+
return null;
|
|
299
|
+
const { path, folder, removed, ...rest } = value;
|
|
300
|
+
return typeof path === 'string' &&
|
|
301
|
+
folder === true &&
|
|
302
|
+
(removed === undefined || removed === true) &&
|
|
303
|
+
Object.keys(rest).length === 0
|
|
304
|
+
? { path, removed: removed === true }
|
|
305
|
+
: null;
|
|
306
|
+
}
|
|
251
307
|
function parseChange(value, mode) {
|
|
252
308
|
if (typeof value !== 'object' || value === null)
|
|
253
309
|
return null;
|
|
@@ -304,7 +360,13 @@ export function parseEnumeration(body, mode) {
|
|
|
304
360
|
if (!Array.isArray(held.changes))
|
|
305
361
|
return null;
|
|
306
362
|
const changes = [];
|
|
363
|
+
const folders = [];
|
|
307
364
|
for (const change of held.changes) {
|
|
365
|
+
const folder = folderChange(change);
|
|
366
|
+
if (folder !== null) {
|
|
367
|
+
folders.push(folder);
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
308
370
|
const mapped = parseChange(change, mode);
|
|
309
371
|
if (mapped === null)
|
|
310
372
|
return null;
|
|
@@ -317,6 +379,7 @@ export function parseEnumeration(body, mode) {
|
|
|
317
379
|
authority: held.authority,
|
|
318
380
|
...at,
|
|
319
381
|
changes,
|
|
382
|
+
...(folders.length === 0 ? {} : { folders }),
|
|
320
383
|
...(next === undefined ? {} : { next }),
|
|
321
384
|
});
|
|
322
385
|
}
|
|
@@ -340,6 +403,7 @@ function advances(asked, next) {
|
|
|
340
403
|
}
|
|
341
404
|
export async function wholeView(first, more) {
|
|
342
405
|
const changes = new Map(first.changes.map((change) => [change.path, change]));
|
|
406
|
+
const folders = new Map((first.folders ?? []).map((folder) => [folder.path, folder]));
|
|
343
407
|
let view = first;
|
|
344
408
|
while (view.next !== undefined) {
|
|
345
409
|
const asked = view.next;
|
|
@@ -355,6 +419,10 @@ export async function wholeView(first, more) {
|
|
|
355
419
|
changes.delete(change.path);
|
|
356
420
|
changes.set(change.path, change);
|
|
357
421
|
}
|
|
422
|
+
for (const folder of page.folders ?? []) {
|
|
423
|
+
folders.delete(folder.path);
|
|
424
|
+
folders.set(folder.path, folder);
|
|
425
|
+
}
|
|
358
426
|
view = page;
|
|
359
427
|
}
|
|
360
428
|
return {
|
|
@@ -362,46 +430,7 @@ export async function wholeView(first, more) {
|
|
|
362
430
|
position: view.position,
|
|
363
431
|
logEpoch: first.logEpoch,
|
|
364
432
|
changes: [...changes.values()],
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
export function* advancedScope(scope, view) {
|
|
368
|
-
const files = new Map();
|
|
369
|
-
for (const file of scope.files) {
|
|
370
|
-
files.set(file.path, file);
|
|
371
|
-
yield ROW_WEIGHT;
|
|
372
|
-
}
|
|
373
|
-
const contents = new Map();
|
|
374
|
-
for (const entry of scope.contents) {
|
|
375
|
-
contents.set(entry.path, entry.content);
|
|
376
|
-
yield ROW_WEIGHT;
|
|
377
|
-
}
|
|
378
|
-
for (const change of view.changes) {
|
|
379
|
-
files.delete(change.path);
|
|
380
|
-
contents.delete(change.path);
|
|
381
|
-
yield ROW_WEIGHT;
|
|
382
|
-
if ('removed' in change)
|
|
383
|
-
continue;
|
|
384
|
-
files.set(change.path, {
|
|
385
|
-
path: change.path,
|
|
386
|
-
revision: change.revision,
|
|
387
|
-
version: change.version,
|
|
388
|
-
...headed(change.head),
|
|
389
|
-
...('binary' in change ? { binary: change.binary } : {}),
|
|
390
|
-
});
|
|
391
|
-
if ('content' in change)
|
|
392
|
-
contents.set(change.path, change.content);
|
|
393
|
-
}
|
|
394
|
-
const listed = [];
|
|
395
|
-
for (const [path, content] of contents) {
|
|
396
|
-
listed.push({ path, content });
|
|
397
|
-
yield ROW_WEIGHT;
|
|
398
|
-
}
|
|
399
|
-
return {
|
|
400
|
-
...scope,
|
|
401
|
-
position: view.position,
|
|
402
|
-
logEpoch: view.logEpoch,
|
|
403
|
-
files: [...files.values()],
|
|
404
|
-
contents: listed,
|
|
433
|
+
...(folders.size === 0 ? {} : { folders: [...folders.values()] }),
|
|
405
434
|
};
|
|
406
435
|
}
|
|
407
436
|
export function* bootstrapping(scope) {
|
|
@@ -423,7 +452,9 @@ export function* bootstrapping(scope) {
|
|
|
423
452
|
if (file.revision !== undefined)
|
|
424
453
|
revised(answer, file.path, file.revision);
|
|
425
454
|
}
|
|
426
|
-
const
|
|
455
|
+
for (const folder of scope.folders ?? [])
|
|
456
|
+
folded(answer, folder, false);
|
|
457
|
+
const { removals: _removals, folderRemovals: _folderRemovals, ...page } = yield* answered(answer);
|
|
427
458
|
return { kind: 'bootstrap', roomVersion: roomVersion(scope), ...page };
|
|
428
459
|
}
|
|
429
460
|
export function schemaOf(scope, schema) {
|
|
@@ -457,6 +488,10 @@ function* refreshing(view, fromRoomVersion) {
|
|
|
457
488
|
if (change.revision !== undefined)
|
|
458
489
|
revised(answer, change.path, change.revision);
|
|
459
490
|
}
|
|
491
|
+
for (const folder of view.folders ?? []) {
|
|
492
|
+
yield ROW_WEIGHT;
|
|
493
|
+
folded(answer, folder.path, folder.removed);
|
|
494
|
+
}
|
|
460
495
|
return { kind: 'net-advancement', roomVersion: roomVersion(view), ...(yield* answered(answer)) };
|
|
461
496
|
}
|
|
462
497
|
export async function refreshFrom(view, fromRoomVersion) {
|
package/dist/referrer.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import type { ReferrerScope } from '@agentshouse/mdruntime';
|
|
1
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
2
3
|
export type HouseReferrer = {
|
|
3
4
|
locator: string;
|
|
4
|
-
referrer:
|
|
5
|
+
referrer: {
|
|
6
|
+
readonly room_ref: string;
|
|
7
|
+
readonly path: string;
|
|
8
|
+
};
|
|
5
9
|
};
|
|
6
10
|
export declare function houseReferrer(referrer: unknown, tracked: ReadonlyMap<string, TrackedAuthority>): HouseReferrer | null;
|
|
11
|
+
export declare function houseReferrerScope(referrer: unknown): ReferrerScope | null;
|
|
7
12
|
//# sourceMappingURL=referrer.d.ts.map
|
package/dist/referrer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referrer.d.ts","sourceRoot":"","sources":["../src/referrer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,aAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"referrer.d.ts","sourceRoot":"","sources":["../src/referrer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAChE,CAAC;AAgBF,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAC7C,aAAa,GAAG,IAAI,CAYtB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,OAAO,GAAG,aAAa,GAAG,IAAI,CAK1E"}
|
package/dist/referrer.js
CHANGED
|
@@ -21,13 +21,11 @@ export function houseReferrer(referrer, tracked) {
|
|
|
21
21
|
referrer: { room_ref: entry.authority, path: held.path },
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
if (named(held, 'room_ref', 'record')) {
|
|
25
|
-
const roomRef = held.room_ref;
|
|
26
|
-
const entry = [...tracked.values()].find((candidate) => candidate.authority === roomRef);
|
|
27
|
-
return {
|
|
28
|
-
locator: entry?.locator ?? roomRef,
|
|
29
|
-
referrer: { room_ref: roomRef, record: held.record },
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
24
|
return null;
|
|
33
25
|
}
|
|
26
|
+
export function houseReferrerScope(referrer) {
|
|
27
|
+
const held = fields(referrer);
|
|
28
|
+
return held !== null && named(held, 'room', 'path')
|
|
29
|
+
? { locator: held.room, path: held.path }
|
|
30
|
+
: null;
|
|
31
|
+
}
|
package/dist/room-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"room-types.d.ts","sourceRoot":"","sources":["../src/room-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,YAAI,cAAc,CAAU,CAAC;AAE7D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"room-types.d.ts","sourceRoot":"","sources":["../src/room-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,YAAI,cAAc,CAAU,CAAC;AAE7D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAalD,eAAO,MAAM,gBAAgB,QAsDjB,CAAC"}
|
package/dist/room-types.js
CHANGED
|
@@ -2,6 +2,13 @@ export const INBOX_CHANNEL_KINDS = ['telegram-bot'];
|
|
|
2
2
|
export const INBOX_CHAT_TYPE = 'inbox-chat';
|
|
3
3
|
export const INBOX_MESSAGE_TYPE = 'inbox-message';
|
|
4
4
|
const IDENTITY = "{ type: string, pattern: '^\\S+$' }";
|
|
5
|
+
const AGENT = [' agent: { type: string, format: uuid }', ' name: { type: string }'];
|
|
6
|
+
const ASSIGNEE = [
|
|
7
|
+
' type: object',
|
|
8
|
+
' properties:',
|
|
9
|
+
' user: { type: string, format: uuid }',
|
|
10
|
+
...AGENT,
|
|
11
|
+
];
|
|
5
12
|
export const HOUSE_ROOM_TYPES = [
|
|
6
13
|
`${INBOX_CHAT_TYPE}:`,
|
|
7
14
|
' properties:',
|
|
@@ -14,6 +21,13 @@ export const HOUSE_ROOM_TYPES = [
|
|
|
14
21
|
' name: { type: string }',
|
|
15
22
|
` username: ${IDENTITY}`,
|
|
16
23
|
` phone: ${IDENTITY}`,
|
|
24
|
+
' assignee:',
|
|
25
|
+
...ASSIGNEE,
|
|
26
|
+
' return_to:',
|
|
27
|
+
' type: object',
|
|
28
|
+
' properties:',
|
|
29
|
+
...AGENT,
|
|
30
|
+
' conversation: { type: string, format: uuid }',
|
|
17
31
|
' required: [inbox, channel, chat, customer]',
|
|
18
32
|
`${INBOX_MESSAGE_TYPE}:`,
|
|
19
33
|
' properties:',
|
|
@@ -27,8 +41,26 @@ export const HOUSE_ROOM_TYPES = [
|
|
|
27
41
|
` channel_message: ${IDENTITY}`,
|
|
28
42
|
' state: { enum: [sending, sent, failed] }',
|
|
29
43
|
' reason: { type: string }',
|
|
44
|
+
' reactions:',
|
|
45
|
+
' type: array',
|
|
46
|
+
' items:',
|
|
47
|
+
' type: object',
|
|
48
|
+
' properties:',
|
|
49
|
+
' reaction: { type: string, minLength: 1 }',
|
|
50
|
+
' sender:',
|
|
51
|
+
' type: object',
|
|
52
|
+
' properties:',
|
|
53
|
+
` id: ${IDENTITY}`,
|
|
54
|
+
' name: { type: string }',
|
|
55
|
+
` username: ${IDENTITY}`,
|
|
56
|
+
' count: { type: integer, minimum: 1 }',
|
|
57
|
+
' required: [reaction]',
|
|
58
|
+
` post: ${IDENTITY}`,
|
|
59
|
+
' assignee:',
|
|
60
|
+
...ASSIGNEE,
|
|
61
|
+
' sent_outside: { const: true }',
|
|
30
62
|
' required: [direction]',
|
|
31
63
|
' if: { properties: { direction: { const: in } } }',
|
|
32
|
-
' then: { required: [sent_at
|
|
64
|
+
' then: { required: [sent_at] }',
|
|
33
65
|
'',
|
|
34
66
|
].join('\n');
|
package/dist/site.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../src/site.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../src/site.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAWR,MAAM,wBAAwB,CAAC;AA+BhC,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,gBAAgB,CAAC;AAqCxB,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,kBAAkB,EAAE,QAAQ,UAAQ,GAAG,OAAO,CAmQ1F"}
|
package/dist/site.js
CHANGED
|
@@ -2,12 +2,12 @@ import { stepped } from '@agentshouse/mdruntime';
|
|
|
2
2
|
import { actionOutcome, SITE_SUBMIT } from './actions.js';
|
|
3
3
|
import { mapDiscovery, parseSiteDiscovery, siteCapabilities, siteTracked, } from './discovery.js';
|
|
4
4
|
import { partModels, streamedModels, viewModels } from './model.js';
|
|
5
|
-
import {
|
|
6
|
-
import { PART_ATTEMPTS, unverifiedPart } from './part.js';
|
|
5
|
+
import { bootstrapping, emptyScope, housePart, manifested, parseEnumeration, parseSiteParted, partInventory, refreshFrom, viewOf, wholeView, } from './read.js';
|
|
6
|
+
import { PART_ATTEMPTS, partArrival, partFrame, unverifiedPart } from './part.js';
|
|
7
7
|
import { classifyDoor, classifyRead, discoveryFailure } from './refusal.js';
|
|
8
8
|
import { HOUSE_ROOM_TYPES } from './room-types.js';
|
|
9
9
|
import { houseNotifications } from './stream.js';
|
|
10
|
-
import { SITE_DOOR_BOOTSTRAP, SITE_DOOR_DISCOVER, SITE_DOOR_ENUMERATE, SITE_DOOR_SUBMIT,
|
|
10
|
+
import { SITE_DOOR_BOOTSTRAP, SITE_DOOR_DISCOVER, SITE_DOOR_ENUMERATE, SITE_DOOR_SUBMIT, SITE_FILES, } from './transport.js';
|
|
11
11
|
import { houseReferrer } from './referrer.js';
|
|
12
12
|
import { followsVersion, logPosition, presented, reachedVersion, roomVersion, } from './version.js';
|
|
13
13
|
const UNCERTAIN = { kind: 'transport-uncertainty' };
|
|
@@ -25,9 +25,6 @@ function siteRoom(tracked) {
|
|
|
25
25
|
providerOwnedPaths: [],
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
function settled(refused) {
|
|
29
|
-
return refused.kind === 'beyond-horizon' ? UNCERTAIN : refused;
|
|
30
|
-
}
|
|
31
28
|
export function createSiteAdapter(transport, snapshot = false) {
|
|
32
29
|
const notifications = houseNotifications(transport, 'site');
|
|
33
30
|
const tracked = new Map();
|
|
@@ -43,10 +40,8 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
43
40
|
}
|
|
44
41
|
if (request.fileRef === undefined)
|
|
45
42
|
return unfound();
|
|
46
|
-
const { room_ref, path
|
|
47
|
-
return `${SITE_FILES}${room_ref}/${encodeURIComponent(request.fileRef)}/${path
|
|
48
|
-
? `${SITE_FILE_RECORD}/${encodeURIComponent(record)}`
|
|
49
|
-
: encodeURIComponent(path)}`;
|
|
43
|
+
const { room_ref, path } = named.referrer;
|
|
44
|
+
return `${SITE_FILES}${room_ref}/${encodeURIComponent(request.fileRef)}/${encodeURIComponent(path)}`;
|
|
50
45
|
}
|
|
51
46
|
async function enumerated(entry, from, page) {
|
|
52
47
|
const answer = await transport.door(SITE_DOOR_ENUMERATE, {
|
|
@@ -80,34 +75,29 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
80
75
|
const room = parseSiteParted(answer.body);
|
|
81
76
|
return room === null || room.anchor !== entry.authority ? UNCERTAIN : room;
|
|
82
77
|
}
|
|
83
|
-
async function fetchedPart(entry, room, listed) {
|
|
78
|
+
async function fetchedPart(entry, room, listed, received, arriving) {
|
|
79
|
+
if (received !== undefined) {
|
|
80
|
+
const kept = new Uint8Array(received);
|
|
81
|
+
const held = await housePart(room, kept, listed, 'site');
|
|
82
|
+
if (held !== null)
|
|
83
|
+
return 'kind' in held ? held : { scope: held, frame: kept };
|
|
84
|
+
}
|
|
84
85
|
for (let attempt = 0; attempt < PART_ATTEMPTS; attempt += 1) {
|
|
85
|
-
const answer = await transport.read(`${SITE_DOOR_BOOTSTRAP}${entry.authority}?part=${encodeURIComponent(listed.part)}
|
|
86
|
+
const answer = await transport.read(`${SITE_DOOR_BOOTSTRAP}${entry.authority}?part=${encodeURIComponent(listed.part)}`, partArrival(listed, arriving));
|
|
86
87
|
const failure = classifyRead(answer.status, answer.body, entry.locator);
|
|
87
88
|
if (failure?.kind === 'beyond-horizon')
|
|
88
89
|
expired.set(entry.locator, room.position);
|
|
89
90
|
if (failure !== null)
|
|
90
91
|
return failure;
|
|
91
|
-
const
|
|
92
|
+
const frame = partFrame(answer.body);
|
|
93
|
+
if (frame === null)
|
|
94
|
+
continue;
|
|
95
|
+
const scope = await housePart(room, frame, listed, 'site');
|
|
92
96
|
if (scope !== null)
|
|
93
|
-
return scope;
|
|
97
|
+
return 'kind' in scope ? scope : { scope, frame };
|
|
94
98
|
}
|
|
95
99
|
return unverifiedPart(entry.locator);
|
|
96
100
|
}
|
|
97
|
-
async function caughtUp(entry, continued) {
|
|
98
|
-
const listed = continued.room.parts[continued.next];
|
|
99
|
-
const scope = listed === undefined
|
|
100
|
-
? emptyScope(continued.room)
|
|
101
|
-
: await fetchedPart(entry, continued.room, listed);
|
|
102
|
-
if ('kind' in scope)
|
|
103
|
-
return scope;
|
|
104
|
-
if (continued.room.parts.length > 1 || roomVersion(scope) === roomVersion(entry))
|
|
105
|
-
return scope;
|
|
106
|
-
const view = await enumeration(entry, scope);
|
|
107
|
-
if ('kind' in view)
|
|
108
|
-
return settled(view);
|
|
109
|
-
return stepped(advancedScope(scope, view));
|
|
110
|
-
}
|
|
111
101
|
async function refreshed(entry, fromRoomVersion) {
|
|
112
102
|
const from = logPosition(fromRoomVersion);
|
|
113
103
|
if (from === null)
|
|
@@ -154,17 +144,25 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
154
144
|
if (entry === undefined)
|
|
155
145
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
156
146
|
let continued;
|
|
147
|
+
let inventory;
|
|
157
148
|
if (request.pageToken === undefined) {
|
|
158
149
|
const room = await partedRoom(entry);
|
|
159
150
|
if ('kind' in room)
|
|
160
151
|
return room;
|
|
161
152
|
continued = { room, next: 0, seen: [] };
|
|
153
|
+
inventory = partInventory(room);
|
|
154
|
+
if (inventory.parts > 0)
|
|
155
|
+
return manifested(room, inventory, JSON.stringify(continued));
|
|
162
156
|
}
|
|
163
157
|
else
|
|
164
158
|
continued = JSON.parse(request.pageToken);
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
159
|
+
const listed = continued.room.parts[continued.next];
|
|
160
|
+
const sent = listed === undefined
|
|
161
|
+
? { scope: emptyScope(continued.room), frame: null }
|
|
162
|
+
: await fetchedPart(entry, continued.room, listed, request.received, request.arriving);
|
|
163
|
+
if ('kind' in sent)
|
|
164
|
+
return sent;
|
|
165
|
+
const { scope } = sent;
|
|
168
166
|
notifications.reach(entry.authority, scope);
|
|
169
167
|
const next = continued.next + 1;
|
|
170
168
|
const more = next < continued.room.parts.length;
|
|
@@ -173,10 +171,13 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
173
171
|
...entry.schemas.filter((schema) => scope.files.some((file) => file.path === schema)),
|
|
174
172
|
];
|
|
175
173
|
const models = await partModels(scope, entry, new Set(seen), !more);
|
|
174
|
+
const { folders: _folders, ...page } = await stepped(bootstrapping(scope));
|
|
176
175
|
return {
|
|
177
|
-
...
|
|
176
|
+
...page,
|
|
178
177
|
...(models === undefined ? {} : { models }),
|
|
179
178
|
...(more ? { pageToken: JSON.stringify({ ...continued, next, seen }) } : {}),
|
|
179
|
+
...(inventory === undefined ? {} : { inventory }),
|
|
180
|
+
...(sent.frame === null ? {} : { received: sent.frame }),
|
|
180
181
|
};
|
|
181
182
|
},
|
|
182
183
|
async refresh(_authorization, request) {
|
|
@@ -205,8 +206,8 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
205
206
|
const read = await transport.download(route);
|
|
206
207
|
if (read.status === 404)
|
|
207
208
|
return unfound();
|
|
208
|
-
return read.status === 200 && read.
|
|
209
|
-
? { kind: 'binary',
|
|
209
|
+
return read.status === 200 && read.body !== null
|
|
210
|
+
? { kind: 'binary', body: read.body, mediaType: read.mediaType }
|
|
210
211
|
: UNCERTAIN;
|
|
211
212
|
},
|
|
212
213
|
async link(_authorization, request) {
|
|
@@ -223,8 +224,7 @@ export function createSiteAdapter(transport, snapshot = false) {
|
|
|
223
224
|
const named = published(referrer);
|
|
224
225
|
if (named === null)
|
|
225
226
|
return null;
|
|
226
|
-
|
|
227
|
-
return { locator: named.locator, ...(path === undefined ? {} : { path }) };
|
|
227
|
+
return { locator: named.locator, path: named.referrer.path };
|
|
228
228
|
},
|
|
229
229
|
reached(locator, version, target) {
|
|
230
230
|
return reachedVersion(version, target, tracked.get(locator)?.logEpoch);
|
package/dist/stream.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export type HouseNotifications = {
|
|
|
15
15
|
reopen(): void;
|
|
16
16
|
track(authorities: readonly TrackedAuthority[]): void;
|
|
17
17
|
reach(authority: string, at: LogPosition): void;
|
|
18
|
+
edited(tracked: TrackedAuthority, from: LogPosition): readonly string[];
|
|
18
19
|
advance(tracked: TrackedAuthority, from: LogPosition, holds?: HeldRevision): Generator<number, StreamedAdvancement | null, void>;
|
|
19
20
|
conversations: ConversationStream;
|
|
20
21
|
serviceMode: ServiceModeSignal;
|
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,WAAW,EAChB,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,WAAW,EAChB,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAUvD,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EAEb,SAAS,EAET,gBAAgB,EAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAe,KAAK,WAAW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+1,7 @@
|
|
|
1
1
|
import { ROW_WEIGHT, } from '@agentshouse/mdruntime';
|
|
2
2
|
import { acceptedMessage } from './actions.js';
|
|
3
3
|
import { sha256Hex } from './digest.js';
|
|
4
|
-
import { answered, answering, binaryFileOf, forgotten, headChange, revised } from './read.js';
|
|
4
|
+
import { answered, answering, binaryFileOf, folded, forgotten, headChange, revised, } from './read.js';
|
|
5
5
|
import { roomVersion } from './version.js';
|
|
6
6
|
const HELD_FRAMES_MAX = 256;
|
|
7
7
|
function turnOperation(frame) {
|
|
@@ -556,6 +556,17 @@ export function houseNotifications(transport, mode) {
|
|
|
556
556
|
held,
|
|
557
557
|
});
|
|
558
558
|
},
|
|
559
|
+
edited(tracked, from) {
|
|
560
|
+
const line = lines.get(tracked.authority);
|
|
561
|
+
const start = position(from.position);
|
|
562
|
+
if (line === undefined || start === null || line.logEpoch !== from.logEpoch)
|
|
563
|
+
return [];
|
|
564
|
+
return [
|
|
565
|
+
...new Set(line.frames
|
|
566
|
+
.filter((frame) => frame.position > start)
|
|
567
|
+
.flatMap((frame) => frame.entries.flatMap((entry) => entry.kind === 'edited' && entry.revision !== undefined ? [entry.path] : []))),
|
|
568
|
+
];
|
|
569
|
+
},
|
|
559
570
|
*advance(tracked, from, holds) {
|
|
560
571
|
const line = lines.get(tracked.authority);
|
|
561
572
|
const start = position(from.position);
|
|
@@ -570,6 +581,10 @@ export function houseNotifications(transport, mode) {
|
|
|
570
581
|
for (const frame of pending) {
|
|
571
582
|
for (const entry of frame.entries) {
|
|
572
583
|
yield ROW_WEIGHT + (entry.text?.length ?? 0);
|
|
584
|
+
if (entry.kind === 'folder') {
|
|
585
|
+
folded(answer, entry.path, entry.removed === true);
|
|
586
|
+
continue;
|
|
587
|
+
}
|
|
573
588
|
if (entry.kind === 'edited' &&
|
|
574
589
|
entry.revision !== undefined &&
|
|
575
590
|
holds?.(entry.path, entry.revision) === true) {
|
package/dist/transport.d.ts
CHANGED
|
@@ -15,23 +15,23 @@ export type HouseDoorAnswer = {
|
|
|
15
15
|
body: unknown;
|
|
16
16
|
};
|
|
17
17
|
export declare const DOOR_FILES_GET = "/door/files/get";
|
|
18
|
+
export declare const DOOR_FILES_FINISH = "/door/files/finish";
|
|
18
19
|
export declare const SITE_FILES = "/_house/files/";
|
|
19
|
-
export
|
|
20
|
-
export type HouseByteAct = 'authored_batch_upload' | 'file_upload' | 'binary_stage';
|
|
21
|
-
export type HouseByteBody = string | ArrayBuffer | Uint8Array | Blob;
|
|
20
|
+
export type HouseByteAct = 'authored_batch_upload';
|
|
22
21
|
export type HouseBytesAnswer = {
|
|
23
22
|
status: number;
|
|
24
|
-
|
|
23
|
+
body: ReadableStream<Uint8Array> | null;
|
|
24
|
+
mediaType: string;
|
|
25
25
|
};
|
|
26
26
|
export type HouseByteTransfer = {
|
|
27
27
|
act: HouseByteAct;
|
|
28
28
|
url: string;
|
|
29
|
-
body:
|
|
30
|
-
operation?: string;
|
|
29
|
+
body: string;
|
|
31
30
|
};
|
|
32
31
|
export type HouseStreamEntry = {
|
|
33
32
|
path: string;
|
|
34
|
-
kind: 'edited' | 'removed' | 'piece';
|
|
33
|
+
kind: 'edited' | 'removed' | 'piece' | 'folder';
|
|
34
|
+
removed?: true;
|
|
35
35
|
revision?: string;
|
|
36
36
|
sha256?: string;
|
|
37
37
|
text?: string;
|
|
@@ -165,16 +165,17 @@ export type HouseStream = {
|
|
|
165
165
|
closed(notify: (closing: HouseClosing) => void): () => void;
|
|
166
166
|
};
|
|
167
167
|
export type HouseDoor = {
|
|
168
|
-
door(route: string, body: unknown): Promise<HouseDoorAnswer>;
|
|
168
|
+
door(route: string, body: unknown, arriving?: (bytes: number) => void): Promise<HouseDoorAnswer>;
|
|
169
169
|
stream: HouseStream;
|
|
170
170
|
};
|
|
171
171
|
export type HouseTransport = HouseDoor & {
|
|
172
172
|
transfer(request: HouseByteTransfer): Promise<HouseDoorAnswer>;
|
|
173
|
+
put(url: string, body: Blob): Promise<number>;
|
|
173
174
|
download(url: string): Promise<HouseBytesAnswer>;
|
|
174
175
|
};
|
|
175
176
|
export type HouseSiteTransport = HouseDoor & {
|
|
176
177
|
online(): boolean;
|
|
177
|
-
read(route: string): Promise<HouseDoorAnswer>;
|
|
178
|
+
read(route: string, arriving?: (bytes: number) => void): Promise<HouseDoorAnswer>;
|
|
178
179
|
download(route: string): Promise<HouseBytesAnswer>;
|
|
179
180
|
};
|
|
180
181
|
export {};
|
package/dist/transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE/E,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAE9C,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAE1D,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAE7D,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE/E,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
CHANGED
|
@@ -9,5 +9,5 @@ export const SITE_DOOR_BOOTSTRAP = '/_house/door/bootstrap/';
|
|
|
9
9
|
export const SITE_DOOR_ENUMERATE = '/_house/door/enumerate';
|
|
10
10
|
export const SITE_DOOR_SUBMIT = '/_house/door/submit';
|
|
11
11
|
export const DOOR_FILES_GET = '/door/files/get';
|
|
12
|
+
export const DOOR_FILES_FINISH = '/door/files/finish';
|
|
12
13
|
export const SITE_FILES = '/_house/files/';
|
|
13
|
-
export const SITE_FILE_RECORD = 'record';
|