@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/adapter.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { stepped } from '@agentshouse/mdruntime';
|
|
2
2
|
import { DISCOVER_PREFIXES, capabilities, discoveredRoom, mapDiscovery, parseDiscovery, trackedFrom, } from './discovery.js';
|
|
3
3
|
import { partModels, streamedModels, viewModels } from './model.js';
|
|
4
4
|
import { gathered, gatheredEach, selections } from './gather.js';
|
|
5
5
|
import { createSiteAdapter } from './site.js';
|
|
6
|
-
import { authorityRoot, bootstrapping, emptyScope, housePart, parseEnumeration, parseFileAddress, parseGrant, parseParted, refreshFrom, viewOf, wholeView, } from './read.js';
|
|
7
|
-
import { PART_ATTEMPTS, unverifiedPart } from './part.js';
|
|
6
|
+
import { authorityRoot, bootstrapping, emptyScope, housePart, manifested, parseEnumeration, parseFileAddress, parseGrant, parseParted, partInventory, refreshFrom, viewOf, wholeView, } from './read.js';
|
|
7
|
+
import { PART_ATTEMPTS, partArrival, partFrame, unverifiedPart } from './part.js';
|
|
8
8
|
import { sha256Hex } from './digest.js';
|
|
9
|
-
import {
|
|
9
|
+
import { finishedUpload, houseUpload } from './upload.js';
|
|
10
10
|
import { houseAction } from './actions.js';
|
|
11
11
|
import { classifyDoor, classifyRead, discoveryFailure, doorRefusal } from './refusal.js';
|
|
12
12
|
import { houseNotifications } from './stream.js';
|
|
13
13
|
import { DOOR_BATCH, DOOR_BATCH_UPLOAD, DOOR_BOOTSTRAP, DOOR_DISCOVER, DOOR_ENUMERATE, DOOR_FILES_GET, DOOR_REVISIONS, } from './transport.js';
|
|
14
14
|
import { batchPaths, deltaBody, deltaBytes, deltaDigest, historyOutcome, houseChanges, houseMove, mutationOutcome, operationHead, rejectedMapping, revisionBody, uploadable, } from './write.js';
|
|
15
|
-
import { houseReferrer } from './referrer.js';
|
|
15
|
+
import { houseReferrer, houseReferrerScope } from './referrer.js';
|
|
16
16
|
import { HOUSE_ROOM_TYPES } from './room-types.js';
|
|
17
17
|
import { followsVersion, logPosition, presented, reachedVersion, roomVersion, } from './version.js';
|
|
18
18
|
const UNCERTAIN = { kind: 'transport-uncertainty' };
|
|
@@ -21,42 +21,29 @@ const EXPIRED_ADDRESS = 403;
|
|
|
21
21
|
function lapsedGrant(outcome) {
|
|
22
22
|
return outcome.kind === 'rejected' && outcome.code === 'upload_unavailable';
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
return known;
|
|
29
|
-
const sorted = await stepped(sortedKeys(held.documents));
|
|
30
|
-
heldPaths.set(held.documents, sorted);
|
|
31
|
-
return sorted;
|
|
32
|
-
}
|
|
33
|
-
function heldFiles(authority, held, paths, bound) {
|
|
34
|
-
const files = [];
|
|
35
|
-
let through = null;
|
|
36
|
-
for (let at = 0; at < paths.length && through === null; at += 1) {
|
|
37
|
-
const revision = held.revisions[paths[at]];
|
|
38
|
-
if (revision === undefined)
|
|
39
|
-
continue;
|
|
40
|
-
if (files.length === bound)
|
|
41
|
-
through = files.at(-1).path;
|
|
42
|
-
else
|
|
43
|
-
files.push({ path: paths[at], revision });
|
|
44
|
-
}
|
|
24
|
+
async function heldFiles(authority, held, bound) {
|
|
25
|
+
const listed = await held.files(null, bound + 1);
|
|
26
|
+
const files = listed.slice(0, bound);
|
|
27
|
+
const through = listed.length > bound ? (files.at(-1)?.path ?? null) : null;
|
|
45
28
|
return files.length === 0 ? null : { room: authority, through, files };
|
|
46
29
|
}
|
|
47
30
|
async function reused(scope, held) {
|
|
48
31
|
const sent = new Set(scope.contents.map((entry) => entry.path));
|
|
49
32
|
const contents = [...scope.contents];
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
33
|
+
const asked = scope.files.filter((file) => file.binary === undefined && !sent.has(file.path));
|
|
34
|
+
if (asked.length === 0)
|
|
35
|
+
return scope;
|
|
36
|
+
if (held === undefined)
|
|
37
|
+
return null;
|
|
38
|
+
const kept = await held.contents(asked.map(({ path }) => path));
|
|
39
|
+
for (const file of asked) {
|
|
40
|
+
const found = kept.get(file.path);
|
|
41
|
+
if (found === undefined ||
|
|
42
|
+
found.revision !== file.revision ||
|
|
43
|
+
(await sha256Hex(found.content)) !== file.sha256) {
|
|
57
44
|
return null;
|
|
58
45
|
}
|
|
59
|
-
contents.push({ path: file.path, content });
|
|
46
|
+
contents.push({ path: file.path, content: found.content });
|
|
60
47
|
}
|
|
61
48
|
return { ...scope, contents };
|
|
62
49
|
}
|
|
@@ -67,51 +54,55 @@ export function createAgentsHouseAdapter(options) {
|
|
|
67
54
|
const notifications = houseNotifications(transport, 'credential');
|
|
68
55
|
const tracked = new Map();
|
|
69
56
|
const handed = new Map();
|
|
57
|
+
let heldRevisions;
|
|
70
58
|
let bounds;
|
|
71
59
|
function declared() {
|
|
72
60
|
if (bounds === undefined)
|
|
73
61
|
throw new Error('no Discovery declared the bounds');
|
|
74
62
|
return bounds;
|
|
75
63
|
}
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
async function fetchedPart(entry, continued, listed, received, arriving) {
|
|
65
|
+
if (received !== undefined) {
|
|
66
|
+
const kept = new Uint8Array(received);
|
|
67
|
+
const held = await housePart(continued.room, kept, listed, 'credential');
|
|
68
|
+
if (held !== null)
|
|
69
|
+
return 'kind' in held ? held : { scope: held, frame: kept };
|
|
82
70
|
}
|
|
83
|
-
return next.then((room) => {
|
|
84
|
-
if (handed.get(locator) === held)
|
|
85
|
-
handed.set(locator, room);
|
|
86
|
-
else
|
|
87
|
-
handed.delete(locator);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
async function fetchedPart(entry, continued, listed) {
|
|
91
71
|
for (let attempt = 0; attempt < PART_ATTEMPTS; attempt += 1) {
|
|
92
72
|
const answered = await transport.door(DOOR_BOOTSTRAP, {
|
|
93
73
|
prefixes: [authorityRoot(entry.handle)],
|
|
94
74
|
part: listed.part,
|
|
95
75
|
...(continued.held === undefined ? {} : { held: [continued.held] }),
|
|
96
|
-
});
|
|
76
|
+
}, partArrival(listed, arriving));
|
|
97
77
|
const failure = classifyRead(answered.status, answered.body, entry.locator);
|
|
98
78
|
if (failure !== null)
|
|
99
79
|
return failure;
|
|
100
|
-
const
|
|
80
|
+
const frame = partFrame(answered.body);
|
|
81
|
+
if (frame === null)
|
|
82
|
+
continue;
|
|
83
|
+
const scope = await housePart(continued.room, frame, listed, 'credential');
|
|
101
84
|
if (scope !== null)
|
|
102
|
-
return scope;
|
|
85
|
+
return 'kind' in scope ? scope : { scope, frame };
|
|
103
86
|
}
|
|
104
87
|
return unverifiedPart(entry.locator);
|
|
105
88
|
}
|
|
106
|
-
async function
|
|
89
|
+
async function manifestPage(asked, continued) {
|
|
90
|
+
const inventory = partInventory(continued.room);
|
|
91
|
+
if (inventory.parts === 0) {
|
|
92
|
+
const page = await partPage(asked, continued, undefined, undefined);
|
|
93
|
+
return page.kind === 'bootstrap' ? { ...page, inventory } : page;
|
|
94
|
+
}
|
|
95
|
+
return manifested(continued.room, inventory, JSON.stringify(continued));
|
|
96
|
+
}
|
|
97
|
+
async function partPage(asked, continued, received, arriving) {
|
|
107
98
|
const { entry } = asked;
|
|
108
99
|
const listed = continued.room.parts[continued.next];
|
|
109
100
|
const sent = listed === undefined
|
|
110
|
-
? emptyScope(continued.room)
|
|
111
|
-
: await fetchedPart(entry, continued, listed);
|
|
101
|
+
? { scope: emptyScope(continued.room), frame: null }
|
|
102
|
+
: await fetchedPart(entry, continued, listed, received, arriving);
|
|
112
103
|
if ('kind' in sent)
|
|
113
104
|
return sent;
|
|
114
|
-
const scope = await reused(sent, asked.held);
|
|
105
|
+
const scope = await reused(sent.scope, asked.held);
|
|
115
106
|
if (scope === null) {
|
|
116
107
|
return asked.held === undefined
|
|
117
108
|
? UNCERTAIN_READ
|
|
@@ -120,7 +111,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
120
111
|
const next = continued.next + 1;
|
|
121
112
|
const more = next < continued.room.parts.length;
|
|
122
113
|
if (continued.next === 0 && !more)
|
|
123
|
-
|
|
114
|
+
handed.set(entry.locator, roomVersion(scope));
|
|
124
115
|
else
|
|
125
116
|
handed.delete(entry.locator);
|
|
126
117
|
notifications.reach(entry.authority, scope);
|
|
@@ -133,6 +124,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
133
124
|
...(await stepped(bootstrapping(scope))),
|
|
134
125
|
...(models === undefined ? {} : { models }),
|
|
135
126
|
...(more ? { pageToken: JSON.stringify({ ...continued, next, seen }) } : {}),
|
|
127
|
+
...(sent.frame === null ? {} : { received: sent.frame }),
|
|
136
128
|
};
|
|
137
129
|
}
|
|
138
130
|
async function enumeratedPage(ask, page) {
|
|
@@ -164,18 +156,21 @@ export function createAgentsHouseAdapter(options) {
|
|
|
164
156
|
const answer = await refreshFrom(view, ask.fromRoomVersion);
|
|
165
157
|
if (answer.kind !== 'net-advancement')
|
|
166
158
|
return answer;
|
|
167
|
-
|
|
159
|
+
handed.set(ask.entry.locator, roomVersion(view));
|
|
168
160
|
const models = await viewModels(view, ask.entry);
|
|
169
161
|
return models === undefined ? answer : { ...answer, models };
|
|
170
162
|
}
|
|
171
163
|
async function streamed(entry, request, from) {
|
|
172
|
-
|
|
173
|
-
if (held?.roomVersion !== request.fromRoomVersion)
|
|
164
|
+
if (handed.get(entry.locator) !== request.fromRoomVersion)
|
|
174
165
|
return null;
|
|
175
|
-
const
|
|
166
|
+
const asked = notifications.edited(entry, from);
|
|
167
|
+
const kept = asked.length === 0 || heldRevisions === undefined
|
|
168
|
+
? new Map()
|
|
169
|
+
: await heldRevisions(entry.locator, asked);
|
|
170
|
+
const advanced = await stepped(notifications.advance(entry, from, (path, revision) => kept.get(path) === revision));
|
|
176
171
|
if (advanced === null)
|
|
177
172
|
return null;
|
|
178
|
-
|
|
173
|
+
handed.set(entry.locator, advanced.page.roomVersion);
|
|
179
174
|
const models = await streamedModels(advanced.schemas, entry, 'credential');
|
|
180
175
|
return models === undefined ? advanced.page : { ...advanced.page, models };
|
|
181
176
|
}
|
|
@@ -185,7 +180,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
185
180
|
const at = logPosition(room.roomVersion);
|
|
186
181
|
if (entry === undefined || at === null)
|
|
187
182
|
return [];
|
|
188
|
-
handed.set(room.locator,
|
|
183
|
+
handed.set(room.locator, room.roomVersion);
|
|
189
184
|
notifications.reach(entry.authority, at);
|
|
190
185
|
return [presented(entry.authority, at)];
|
|
191
186
|
});
|
|
@@ -203,8 +198,9 @@ export function createAgentsHouseAdapter(options) {
|
|
|
203
198
|
const held = handed.get(entry.locator);
|
|
204
199
|
if (held === undefined)
|
|
205
200
|
return outcome;
|
|
206
|
-
const follows = followsVersion(held
|
|
207
|
-
|
|
201
|
+
const follows = followsVersion(held, outcome.roomVersion);
|
|
202
|
+
if (follows)
|
|
203
|
+
handed.set(entry.locator, outcome.roomVersion);
|
|
208
204
|
const at = logPosition(outcome.roomVersion);
|
|
209
205
|
if (follows && at !== null)
|
|
210
206
|
notifications.reach(entry.authority, at);
|
|
@@ -233,8 +229,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
233
229
|
for (const ask of asks) {
|
|
234
230
|
if (ask.held === undefined || bound === 0)
|
|
235
231
|
continue;
|
|
236
|
-
const
|
|
237
|
-
const files = heldFiles(ask.entry.authority, ask.held, paths, bound);
|
|
232
|
+
const files = await heldFiles(ask.entry.authority, ask.held, bound);
|
|
238
233
|
if (files !== null)
|
|
239
234
|
held.push(files);
|
|
240
235
|
}
|
|
@@ -272,7 +267,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
272
267
|
continue;
|
|
273
268
|
}
|
|
274
269
|
const kept = held.find((files) => files.room === asked.entry.authority);
|
|
275
|
-
answer(asked.ask, await
|
|
270
|
+
answer(asked.ask, await manifestPage(asked.asked, {
|
|
276
271
|
room,
|
|
277
272
|
next: 0,
|
|
278
273
|
seen: [],
|
|
@@ -364,21 +359,16 @@ export function createAgentsHouseAdapter(options) {
|
|
|
364
359
|
const refusal = doorRefusal(answer.body);
|
|
365
360
|
if (refusal?.code !== 'files_unstaged')
|
|
366
361
|
return null;
|
|
367
|
-
const
|
|
368
|
-
if (!Array.isArray(
|
|
362
|
+
const uploads = refusal.fields.upload;
|
|
363
|
+
if (!Array.isArray(uploads))
|
|
369
364
|
return false;
|
|
370
|
-
for (const
|
|
371
|
-
const
|
|
372
|
-
const change = batch.changes.find((held) => held.kind === 'binary' && held.sha256 === sha256);
|
|
373
|
-
if (
|
|
365
|
+
for (const named of uploads) {
|
|
366
|
+
const upload = houseUpload(named);
|
|
367
|
+
const change = batch.changes.find((held) => held.kind === 'binary' && held.sha256 === named.sha256);
|
|
368
|
+
if (upload === null || change === undefined)
|
|
374
369
|
return false;
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
url,
|
|
378
|
-
body: await file(change.localId),
|
|
379
|
-
operation,
|
|
380
|
-
});
|
|
381
|
-
if (delivered.status !== 200)
|
|
370
|
+
const finished = await finishedUpload(transport, upload, await file(change.localId));
|
|
371
|
+
if (finished?.body?.staged !== true)
|
|
382
372
|
return false;
|
|
383
373
|
}
|
|
384
374
|
return true;
|
|
@@ -436,11 +426,14 @@ export function createAgentsHouseAdapter(options) {
|
|
|
436
426
|
return address;
|
|
437
427
|
read = await transport.download(address.url);
|
|
438
428
|
}
|
|
439
|
-
if (read.status !== 200 || read.
|
|
429
|
+
if (read.status !== 200 || read.body === null)
|
|
440
430
|
return UNCERTAIN_READ;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
431
|
+
return {
|
|
432
|
+
kind: 'binary',
|
|
433
|
+
body: read.body,
|
|
434
|
+
mediaType: address.mediaType,
|
|
435
|
+
sha256: address.sha256,
|
|
436
|
+
};
|
|
444
437
|
}
|
|
445
438
|
function pathAddress(request) {
|
|
446
439
|
const entry = authorityFor(request.locator);
|
|
@@ -503,7 +496,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
503
496
|
return { kind: 'room-not-readable', locator: request.locator };
|
|
504
497
|
const asked = { entry, held: request.held };
|
|
505
498
|
if (request.pageToken !== undefined) {
|
|
506
|
-
return partPage(asked, JSON.parse(request.pageToken));
|
|
499
|
+
return partPage(asked, JSON.parse(request.pageToken), request.received, request.arriving);
|
|
507
500
|
}
|
|
508
501
|
return bootstrapTogether(asked);
|
|
509
502
|
},
|
|
@@ -582,11 +575,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
582
575
|
return linked(await ask(), request.locator);
|
|
583
576
|
},
|
|
584
577
|
referrerScope(referrer) {
|
|
585
|
-
|
|
586
|
-
if (held === null)
|
|
587
|
-
return null;
|
|
588
|
-
const { path } = held.referrer;
|
|
589
|
-
return { locator: held.locator, ...(path === undefined ? {} : { path }) };
|
|
578
|
+
return houseReferrerScope(referrer);
|
|
590
579
|
},
|
|
591
580
|
reached(locator, version, target) {
|
|
592
581
|
return reachedVersion(version, target, authorityFor(locator)?.logEpoch);
|
|
@@ -600,7 +589,10 @@ export function createAgentsHouseAdapter(options) {
|
|
|
600
589
|
roomStream: {
|
|
601
590
|
hold: held,
|
|
602
591
|
reopen: notifications.reopen,
|
|
603
|
-
observe
|
|
592
|
+
observe(notify, receipts, revisions) {
|
|
593
|
+
heldRevisions = revisions;
|
|
594
|
+
return notifications.observe(notify, receipts);
|
|
595
|
+
},
|
|
604
596
|
published(locator, roomVersion) {
|
|
605
597
|
const at = logPosition(roomVersion);
|
|
606
598
|
if (at !== null)
|
package/dist/digest.d.ts
CHANGED
package/dist/digest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../src/digest.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../src/digest.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAG9D"}
|
package/dist/digest.js
CHANGED
|
@@ -2,6 +2,6 @@ export function textBytes(value) {
|
|
|
2
2
|
return new TextEncoder().encode(value).length;
|
|
3
3
|
}
|
|
4
4
|
export async function sha256Hex(value) {
|
|
5
|
-
const digest = await crypto.subtle.digest('SHA-256',
|
|
5
|
+
const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(value));
|
|
6
6
|
return [...new Uint8Array(digest)].map((byte) => byte.toString(16).padStart(2, '0')).join('');
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter, type AgentsHouseAdapterOptions } from './adapter.js';
|
|
2
|
+
export { finishedUpload, houseUpload, type HouseUpload } from './upload.js';
|
|
2
3
|
export { HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS } from './actions.js';
|
|
3
4
|
export { HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, INBOX_CHAT_TYPE, INBOX_MESSAGE_TYPE, type InboxChannelKind, } from './room-types.js';
|
|
4
5
|
export type { HouseByteAct, HouseByteTransfer, HouseBytesAnswer, HouseClosing, HouseDoorAnswer, HouseHeldRoom, HouseOpening, HouseStream, HouseStreamEntry, HouseStreamFrame, HouseSiteTransport, HouseTransport, } from './transport.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter } from './adapter.js';
|
|
2
|
+
export { finishedUpload, houseUpload } from './upload.js';
|
|
2
3
|
export { HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS } from './actions.js';
|
|
3
4
|
export { HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, INBOX_CHAT_TYPE, INBOX_MESSAGE_TYPE, } from './room-types.js';
|
package/dist/part.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ export type HousePart = {
|
|
|
7
7
|
sha256: string;
|
|
8
8
|
};
|
|
9
9
|
export declare function parsePart(value: unknown): HousePart | null;
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function partArrival(listed: HousePart, arriving: ((bytes: number) => void) | undefined): ((answered: number) => void) | undefined;
|
|
11
|
+
export declare function partFrame(body: unknown): Uint8Array<ArrayBuffer> | null;
|
|
12
|
+
export declare function checkedPayload(frame: Uint8Array<ArrayBuffer>, listed: HousePart): Promise<Uint8Array<ArrayBuffer> | null>;
|
|
11
13
|
export declare function gunzipped(payload: Uint8Array<ArrayBuffer>): Promise<string | null>;
|
|
12
14
|
export declare function unverifiedPart(locator: string): ScopedRefusal;
|
|
13
15
|
//# sourceMappingURL=part.d.ts.map
|
package/dist/part.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"part.d.ts","sourceRoot":"","sources":["../src/part.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU5D,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAO1D;AAoBD,wBAAsB,cAAc,CAClC,
|
|
1
|
+
{"version":3,"file":"part.d.ts","sourceRoot":"","sources":["../src/part.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU5D,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAO1D;AAoBD,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,GAC9C,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAG1C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAIvE;AAED,wBAAsB,cAAc,CAClC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,EAC9B,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAazC;AAED,wBAAsB,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOxF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAS7D"}
|
package/dist/part.js
CHANGED
|
@@ -35,14 +35,19 @@ function hex(bytes) {
|
|
|
35
35
|
text += byte.toString(16).padStart(2, '0');
|
|
36
36
|
return text;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export function partArrival(listed, arriving) {
|
|
39
|
+
if (arriving === undefined)
|
|
40
|
+
return undefined;
|
|
41
|
+
return (answered) => arriving(Math.min(listed.bytes, Math.floor((answered * 3) / 4)));
|
|
42
|
+
}
|
|
43
|
+
export function partFrame(body) {
|
|
39
44
|
if (typeof body !== 'object' || body === null)
|
|
40
45
|
return null;
|
|
41
46
|
const { part } = body;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (frame
|
|
47
|
+
return typeof part === 'string' ? decoded(part) : null;
|
|
48
|
+
}
|
|
49
|
+
export async function checkedPayload(frame, listed) {
|
|
50
|
+
if (frame.length !== listed.bytes)
|
|
46
51
|
return null;
|
|
47
52
|
if (frame.length < PART_HEAD_BYTES + PART_DIGEST_BYTES)
|
|
48
53
|
return null;
|
package/dist/read.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AdapterFailure, type BinaryFile, type BootstrapPage, type RefreshResult, type TransportUncertainty } from '@agentshouse/mdruntime';
|
|
1
|
+
import { type AdapterFailure, type BinaryFile, type BootstrapInventory, type BootstrapPage, type RefreshResult, type TransportUncertainty } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
3
3
|
import { type HousePart } from './part.js';
|
|
4
4
|
import type { HouseMode } from './transport.js';
|
|
@@ -11,10 +11,13 @@ export type Answered = {
|
|
|
11
11
|
readonly changes: Map<string, HeadChange>;
|
|
12
12
|
readonly binaryFiles: Map<string, BinaryFile>;
|
|
13
13
|
readonly removals: Set<string>;
|
|
14
|
+
readonly folders: Set<string>;
|
|
15
|
+
readonly folderRemovals: Set<string>;
|
|
14
16
|
};
|
|
15
17
|
export declare function answering(): Answered;
|
|
16
18
|
export declare function revised(answer: Answered, path: string, revision: string): void;
|
|
17
19
|
export declare function forgotten(answer: Answered, path: string): void;
|
|
20
|
+
export declare function folded(answer: Answered, path: string, removed: boolean): void;
|
|
18
21
|
export declare function answered(answer: Answered): Generator<number, {
|
|
19
22
|
documents: Readonly<Record<string, string>>;
|
|
20
23
|
revisions: Readonly<Record<string, string>>;
|
|
@@ -22,6 +25,8 @@ export declare function answered(answer: Answered): Generator<number, {
|
|
|
22
25
|
changes: Readonly<Record<string, HeadChange>>;
|
|
23
26
|
binaryFiles: Readonly<Record<string, BinaryFile>>;
|
|
24
27
|
removals: readonly string[];
|
|
28
|
+
folders?: readonly string[];
|
|
29
|
+
folderRemovals?: readonly string[];
|
|
25
30
|
}, void>;
|
|
26
31
|
export type HouseManifestFile = {
|
|
27
32
|
path: string;
|
|
@@ -39,6 +44,7 @@ export type HouseScope = LogPosition & {
|
|
|
39
44
|
anchor: string;
|
|
40
45
|
files: readonly HouseManifestFile[];
|
|
41
46
|
contents: readonly HouseContent[];
|
|
47
|
+
folders?: readonly string[];
|
|
42
48
|
};
|
|
43
49
|
export type HouseRoomParts = LogPosition & {
|
|
44
50
|
anchor: string;
|
|
@@ -56,6 +62,7 @@ export type HouseFileAddress = {
|
|
|
56
62
|
url: string;
|
|
57
63
|
name: string;
|
|
58
64
|
sha256: string;
|
|
65
|
+
mediaType: string;
|
|
59
66
|
};
|
|
60
67
|
export type HouseChange = {
|
|
61
68
|
path: string;
|
|
@@ -78,9 +85,14 @@ export type HousePage = {
|
|
|
78
85
|
through: string;
|
|
79
86
|
read: number;
|
|
80
87
|
};
|
|
88
|
+
export type HouseFolder = {
|
|
89
|
+
path: string;
|
|
90
|
+
removed: boolean;
|
|
91
|
+
};
|
|
81
92
|
export type HouseView = LogPosition & {
|
|
82
93
|
authority: string;
|
|
83
94
|
changes: readonly HouseChange[];
|
|
95
|
+
folders?: readonly HouseFolder[];
|
|
84
96
|
next?: HousePage;
|
|
85
97
|
};
|
|
86
98
|
type PageFailure = AdapterFailure | {
|
|
@@ -100,11 +112,12 @@ export declare function headChange(held: {
|
|
|
100
112
|
export declare function binaryFileOf(held: Readonly<Record<string, unknown>>): BinaryFile | undefined | null;
|
|
101
113
|
export declare function parseParted(body: unknown): HouseParted | null;
|
|
102
114
|
export declare function parseSiteParted(body: unknown): HouseRoomParts | null;
|
|
115
|
+
export declare function partInventory(room: HouseRoomParts): BootstrapInventory;
|
|
116
|
+
export declare function manifested(room: HouseRoomParts, inventory: BootstrapInventory, pageToken: string): BootstrapPage;
|
|
103
117
|
export declare function emptyScope(room: HouseRoomParts): HouseScope;
|
|
104
|
-
export declare function housePart(room: HouseRoomParts,
|
|
118
|
+
export declare function housePart(room: HouseRoomParts, frame: Uint8Array<ArrayBuffer>, listed: HousePart, mode: HouseMode): Promise<HouseScope | TransportUncertainty | null>;
|
|
105
119
|
export declare function parseEnumeration(body: unknown, mode: HouseMode): HouseEnumeration | null;
|
|
106
120
|
export declare function wholeView(first: HouseView, more: (page: HousePage) => Promise<HouseView | PageFailure>): Promise<HouseView | PageFailure>;
|
|
107
|
-
export declare function advancedScope(scope: HouseScope, view: HouseView): Generator<number, HouseScope, void>;
|
|
108
121
|
export declare function bootstrapping(scope: HouseScope): Generator<number, BootstrapPage, void>;
|
|
109
122
|
export type HouseSchema = {
|
|
110
123
|
schema: string | null;
|
package/dist/read.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EAElB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEpF,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAQ1D,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],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