@agentshouse/mdruntime-adapter 0.1.0-c8c9697b9a064 → 0.1.0-c8d11fe025eda
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 +1 -1
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +1 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +89 -77
- package/dist/authored-path.d.ts +58 -3
- package/dist/authored-path.d.ts.map +1 -1
- package/dist/authored-path.js +140 -11
- package/dist/chunks.d.ts +2 -3
- package/dist/chunks.d.ts.map +1 -1
- package/dist/chunks.js +58 -31
- package/dist/discovery.d.ts +25 -5
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +169 -21
- package/dist/index.d.ts +4 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -7
- package/dist/model.d.ts +5 -5
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +17 -27
- package/dist/read.d.ts +7 -20
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +66 -39
- package/dist/refusal.d.ts +4 -1
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +11 -0
- package/dist/room-query.d.ts +4 -0
- package/dist/room-query.d.ts.map +1 -0
- package/dist/room-query.js +48 -0
- package/dist/session-content/check.d.ts +0 -1
- package/dist/session-content/index.d.ts +2 -3
- package/dist/session-content/parts.d.ts +12 -84
- package/dist/session-content/state.d.ts +4 -6
- package/dist/session-content/turn.d.ts +28 -219
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +36 -12
- package/dist/space-schema.d.ts.map +1 -1
- package/dist/space-schema.js +1 -8
- package/dist/stream.d.ts +2 -3
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +70 -92
- package/dist/transport.d.ts +38 -11
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +39 -2
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +3 -5
- package/package.json +3 -2
- package/dist/app-reference.d.ts +0 -1
- package/dist/app-reference.d.ts.map +0 -1
- package/dist/app-reference.js +0 -2
- package/dist/crockford.d.ts +0 -3
- package/dist/crockford.d.ts.map +0 -1
- package/dist/crockford.js +0 -3
- package/dist/house-model.d.ts +0 -830
- package/dist/house-model.d.ts.map +0 -1
- package/dist/house-model.js +0 -465
- package/dist/room-types.d.ts +0 -4
- package/dist/room-types.d.ts.map +0 -1
- package/dist/room-types.js +0 -135
- package/dist/session-content/bounds.d.ts +0 -7
package/dist/chunks.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { paced, ROW_WEIGHT, stepped, } from '@agentshouse/mdruntime';
|
|
2
2
|
import { manifestedModels } from './model.js';
|
|
3
|
-
import { authorityRoot, bootstrapping,
|
|
3
|
+
import { authorityRoot, bootstrapping, documentEntry, } from './read.js';
|
|
4
4
|
import { classifyDoor } from './refusal.js';
|
|
5
5
|
import { failedOn, unusable } from './uncertain.js';
|
|
6
|
+
import { spaceSchemas } from './space-schema.js';
|
|
6
7
|
import { houseDoorRoute } from './transport.js';
|
|
7
8
|
import { readPosition, roomVersion } from './version.js';
|
|
8
9
|
function authorKey(author) {
|
|
@@ -27,27 +28,35 @@ function namesOf(authors) {
|
|
|
27
28
|
}
|
|
28
29
|
return names;
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function schemaText(file, texts) {
|
|
32
|
+
const { space, revision, content } = file;
|
|
33
|
+
if (content !== undefined) {
|
|
34
|
+
if (space !== undefined && revision !== undefined)
|
|
35
|
+
texts.keep(space, revision, content);
|
|
36
|
+
return content;
|
|
37
|
+
}
|
|
38
|
+
return space === undefined || revision === undefined ? undefined : texts.held(space, revision);
|
|
39
|
+
}
|
|
40
|
+
function modelsOf(models, mode, texts) {
|
|
31
41
|
if (!Array.isArray(models))
|
|
32
42
|
return null;
|
|
33
43
|
const files = [];
|
|
34
|
-
const contents = [];
|
|
35
44
|
for (const entry of models) {
|
|
36
|
-
const file =
|
|
37
|
-
|
|
45
|
+
const file = documentEntry(entry, mode);
|
|
46
|
+
const content = file === null ? undefined : schemaText(file, texts);
|
|
47
|
+
if (file === null || content === undefined)
|
|
38
48
|
return null;
|
|
39
|
-
files.push(file);
|
|
40
|
-
contents.push({ path: file.path, content: entry.content });
|
|
49
|
+
files.push({ ...file, content });
|
|
41
50
|
}
|
|
42
|
-
return
|
|
51
|
+
return files;
|
|
43
52
|
}
|
|
44
53
|
export function partId(logEpoch, hash) {
|
|
45
54
|
return `${logEpoch}:${hash}`;
|
|
46
55
|
}
|
|
47
|
-
function chunkedRoom(room, mode) {
|
|
56
|
+
function chunkedRoom(room, mode, texts) {
|
|
48
57
|
const at = readPosition(room);
|
|
49
58
|
const names = mode === 'site' ? new Map() : namesOf(room.authors);
|
|
50
|
-
const models = modelsOf(room.models, mode);
|
|
59
|
+
const models = modelsOf(room.models, mode, texts);
|
|
51
60
|
if (at === null || names === null || models === null || !Array.isArray(room.chunks))
|
|
52
61
|
return null;
|
|
53
62
|
const chunks = new Map();
|
|
@@ -62,7 +71,7 @@ function chunkedRoom(room, mode) {
|
|
|
62
71
|
}
|
|
63
72
|
return { anchor: room.room_ref, ...at, mode, chunks, parts, names, models };
|
|
64
73
|
}
|
|
65
|
-
function listedRoom(room, mode) {
|
|
74
|
+
function listedRoom(room, mode, texts) {
|
|
66
75
|
if (typeof room !== 'object' || room === null)
|
|
67
76
|
return null;
|
|
68
77
|
const held = room;
|
|
@@ -70,15 +79,15 @@ function listedRoom(room, mode) {
|
|
|
70
79
|
return null;
|
|
71
80
|
if (held.ready === false)
|
|
72
81
|
return { kind: 'not-ready' };
|
|
73
|
-
return held.ready === true ? chunkedRoom(held, mode) : null;
|
|
82
|
+
return held.ready === true ? chunkedRoom(held, mode, texts) : null;
|
|
74
83
|
}
|
|
75
84
|
export function siteChunkList(answer, locator) {
|
|
76
85
|
const failure = classifyDoor(answer.status, answer.body, locator);
|
|
77
86
|
if (failure !== null)
|
|
78
87
|
return failure;
|
|
79
|
-
return listedRoom(answer.body, 'site') ?? unusable();
|
|
88
|
+
return listedRoom(answer.body, 'site', spaceSchemas()) ?? unusable();
|
|
80
89
|
}
|
|
81
|
-
export async function chunkedHead(listed, entry
|
|
90
|
+
export async function chunkedHead(listed, entry) {
|
|
82
91
|
if (listed.anchor !== entry.authority)
|
|
83
92
|
return unusable();
|
|
84
93
|
const models = await manifestedModels({
|
|
@@ -86,7 +95,7 @@ export async function chunkedHead(listed, entry, spaces) {
|
|
|
86
95
|
position: listed.position,
|
|
87
96
|
logEpoch: listed.logEpoch,
|
|
88
97
|
models: listed.models,
|
|
89
|
-
}, entry
|
|
98
|
+
}, entry);
|
|
90
99
|
return {
|
|
91
100
|
kind: 'bootstrap',
|
|
92
101
|
roomVersion: roomVersion(listed),
|
|
@@ -119,16 +128,18 @@ function listedRooms(answer) {
|
|
|
119
128
|
if (!Array.isArray(rooms))
|
|
120
129
|
return null;
|
|
121
130
|
const listed = new Map();
|
|
131
|
+
const texts = spaceSchemas();
|
|
122
132
|
for (const room of rooms) {
|
|
123
|
-
const held = listedRoom(room, 'credential');
|
|
133
|
+
const held = listedRoom(room, 'credential', texts);
|
|
124
134
|
if (held === null)
|
|
125
135
|
return null;
|
|
126
136
|
listed.set(room.room_ref, held);
|
|
127
137
|
}
|
|
128
138
|
return listed;
|
|
129
139
|
}
|
|
130
|
-
export function chunkLister(transport, most) {
|
|
140
|
+
export function chunkLister(transport, most, tracked) {
|
|
131
141
|
const asked = new Map();
|
|
142
|
+
const unlisted = new Set();
|
|
132
143
|
function answered(entries, whole) {
|
|
133
144
|
const prefixes = whole ? ['/'] : entries.map((entry) => authorityRoot(entry.handle));
|
|
134
145
|
return transport.door(houseDoorRoute('room-chunks/list'), { prefixes }).then((answer) => {
|
|
@@ -160,24 +171,46 @@ export function chunkLister(transport, most) {
|
|
|
160
171
|
asked.set(entry.authority, { entry, listed });
|
|
161
172
|
}
|
|
162
173
|
}
|
|
174
|
+
function current(entry) {
|
|
175
|
+
return asked.get(entry.authority)?.entry.handle === entry.handle;
|
|
176
|
+
}
|
|
177
|
+
function askTogether(entries) {
|
|
178
|
+
askAll([...new Map(entries.map((one) => [one.authority, one])).values()]);
|
|
179
|
+
}
|
|
180
|
+
function waiting() {
|
|
181
|
+
return [...unlisted].flatMap((locator) => {
|
|
182
|
+
const entry = tracked(locator);
|
|
183
|
+
if (entry === undefined)
|
|
184
|
+
unlisted.delete(locator);
|
|
185
|
+
return entry ?? [];
|
|
186
|
+
});
|
|
187
|
+
}
|
|
163
188
|
function list(entry) {
|
|
164
|
-
|
|
189
|
+
if (!current(entry))
|
|
190
|
+
askTogether([...waiting().filter((one) => !current(one)), entry]);
|
|
191
|
+
const { listed } = asked.get(entry.authority);
|
|
165
192
|
asked.delete(entry.authority);
|
|
166
|
-
return
|
|
193
|
+
return listed.then((answer) => {
|
|
194
|
+
if ('kind' in answer)
|
|
195
|
+
unlisted.add(entry.locator);
|
|
196
|
+
else
|
|
197
|
+
unlisted.delete(entry.locator);
|
|
198
|
+
return answer;
|
|
199
|
+
});
|
|
167
200
|
}
|
|
168
201
|
return {
|
|
169
202
|
askAll,
|
|
170
203
|
list,
|
|
171
204
|
renew(entry, installing) {
|
|
172
|
-
if (!
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
askAll([...due.values()]);
|
|
205
|
+
if (!current(entry)) {
|
|
206
|
+
const listed = [...asked.values()].flatMap((held) => tracked(held.entry.locator) ?? []);
|
|
207
|
+
askTogether([...listed, ...waiting(), ...installing, entry]);
|
|
176
208
|
}
|
|
177
209
|
return list(entry);
|
|
178
210
|
},
|
|
179
211
|
forget() {
|
|
180
212
|
asked.clear();
|
|
213
|
+
unlisted.clear();
|
|
181
214
|
},
|
|
182
215
|
};
|
|
183
216
|
}
|
|
@@ -208,20 +241,14 @@ function chunkEntry(line, room, read) {
|
|
|
208
241
|
return false;
|
|
209
242
|
named = { ...entry, author: { ...author, name } };
|
|
210
243
|
}
|
|
211
|
-
const file =
|
|
244
|
+
const file = documentEntry(named, room.mode);
|
|
212
245
|
if (file === null)
|
|
213
246
|
return false;
|
|
214
247
|
read.files.push(file);
|
|
215
|
-
if (typeof entry.content === 'string')
|
|
216
|
-
read.contents.push({ path: file.path, content: entry.content });
|
|
217
248
|
return true;
|
|
218
249
|
}
|
|
219
250
|
export async function chunkScope(body, room, arriving) {
|
|
220
|
-
const read = {
|
|
221
|
-
files: [],
|
|
222
|
-
contents: [],
|
|
223
|
-
folders: [],
|
|
224
|
-
};
|
|
251
|
+
const read = { files: [], folders: [] };
|
|
225
252
|
const reader = body.getReader();
|
|
226
253
|
const decoder = new TextDecoder();
|
|
227
254
|
const pace = paced();
|
package/dist/discovery.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Capability, DiscoveredRoom, Discovery, Member, ProviderLimit, Retention } from '@agentshouse/mdruntime';
|
|
1
|
+
import type { Capability, DiscoveredRoom, Discovery, Member, ProviderLimit, Retention, RoomList } from '@agentshouse/mdruntime';
|
|
2
2
|
import { type LogPosition } from './version.js';
|
|
3
3
|
export declare const PROVIDER_ACTIONS = "provider-actions";
|
|
4
4
|
export type HouseBounds = {
|
|
@@ -12,6 +12,8 @@ export type HouseBounds = {
|
|
|
12
12
|
max_prefixes: number;
|
|
13
13
|
change_retention_seconds: number;
|
|
14
14
|
max_move_documents?: number;
|
|
15
|
+
max_indexed_fields?: number;
|
|
16
|
+
max_indexed_text_length?: number;
|
|
15
17
|
};
|
|
16
18
|
export type HouseOperations = {
|
|
17
19
|
write: readonly string[];
|
|
@@ -32,14 +34,19 @@ export type HouseAuthority = LogPosition & {
|
|
|
32
34
|
};
|
|
33
35
|
export type HouseDiscoveryDocument = {
|
|
34
36
|
member: Member;
|
|
37
|
+
timeZone: string | null;
|
|
35
38
|
bounds: HouseBounds;
|
|
36
39
|
authorities: readonly HouseAuthority[];
|
|
37
40
|
actions: readonly string[];
|
|
41
|
+
roomList: RoomList;
|
|
38
42
|
};
|
|
39
43
|
export type HouseAuthorityChange = {
|
|
40
44
|
member: Member;
|
|
45
|
+
timeZone: string | null;
|
|
41
46
|
authorities: readonly HouseAuthority[];
|
|
47
|
+
listed: readonly string[];
|
|
42
48
|
left: readonly string[];
|
|
49
|
+
roomList: RoomList;
|
|
43
50
|
};
|
|
44
51
|
export type TrackedAuthority = LogPosition & {
|
|
45
52
|
locator: string;
|
|
@@ -53,18 +60,31 @@ export type HouseSiteAuthority = LogPosition & {
|
|
|
53
60
|
roomHandle: string;
|
|
54
61
|
schema: string;
|
|
55
62
|
};
|
|
63
|
+
export type HouseSiteQueried = {
|
|
64
|
+
roomRef: string;
|
|
65
|
+
roomHandle: string;
|
|
66
|
+
};
|
|
56
67
|
export type HouseSiteDiscovery = {
|
|
57
68
|
bounds: HouseBounds;
|
|
58
69
|
authorities: readonly HouseSiteAuthority[];
|
|
70
|
+
queriesOnly: readonly HouseSiteQueried[];
|
|
71
|
+
};
|
|
72
|
+
export declare const ROOM_OWN: {
|
|
73
|
+
readonly room_ref: true;
|
|
74
|
+
readonly room_handle: true;
|
|
75
|
+
readonly name: true;
|
|
76
|
+
readonly position: true;
|
|
77
|
+
readonly created: true;
|
|
78
|
+
readonly archived: true;
|
|
59
79
|
};
|
|
60
|
-
type RoomOwn =
|
|
61
|
-
type Folded<A extends Record<
|
|
80
|
+
type RoomOwn = keyof typeof ROOM_OWN;
|
|
81
|
+
type Folded<A extends Record<'room_ref' | 'room_handle' | 'name' | 'position', unknown>> = {
|
|
62
82
|
readonly shapes: readonly Omit<A, RoomOwn>[];
|
|
63
|
-
readonly rooms: readonly (Pick<A, RoomOwn
|
|
83
|
+
readonly rooms: readonly (Pick<A, Extract<keyof A, RoomOwn>> & {
|
|
64
84
|
readonly shape: number;
|
|
65
85
|
})[];
|
|
66
86
|
};
|
|
67
|
-
export declare function foldedAuthorities<A extends Record<
|
|
87
|
+
export declare function foldedAuthorities<A extends Record<'room_ref' | 'room_handle' | 'name' | 'position', unknown>>(authorities: readonly A[]): Folded<A>;
|
|
68
88
|
export declare function parseDiscovery(body: unknown): HouseDiscoveryDocument | null;
|
|
69
89
|
export declare function parseAuthorityChange(body: unknown): HouseAuthorityChange | null;
|
|
70
90
|
export declare function parseSiteDiscovery(body: unknown): HouseSiteDiscovery | null;
|
package/dist/discovery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"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"}
|
package/dist/discovery.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { declaredActions } from './actions.js';
|
|
2
|
-
import {
|
|
2
|
+
import { SITE_DOOR_ACTS } from './transport.js';
|
|
3
3
|
import { readPosition, roomVersion } from './version.js';
|
|
4
4
|
export const PROVIDER_ACTIONS = 'provider-actions';
|
|
5
5
|
const BOUND_KEYS = [
|
|
@@ -13,8 +13,20 @@ const BOUND_KEYS = [
|
|
|
13
13
|
'max_prefixes',
|
|
14
14
|
'change_retention_seconds',
|
|
15
15
|
];
|
|
16
|
+
const MEMBER_BOUND_KEYS = [
|
|
17
|
+
'max_move_documents',
|
|
18
|
+
'max_indexed_fields',
|
|
19
|
+
'max_indexed_text_length',
|
|
20
|
+
];
|
|
16
21
|
const OPERATION_KEYS = ['write', 'erase'];
|
|
17
22
|
const ACCESS_LEVELS = ['search', 'open', 'keep'];
|
|
23
|
+
const ROOM_ACCESS = [
|
|
24
|
+
'owner',
|
|
25
|
+
'manage',
|
|
26
|
+
'write',
|
|
27
|
+
'read',
|
|
28
|
+
'public',
|
|
29
|
+
];
|
|
18
30
|
function stringList(value) {
|
|
19
31
|
if (!Array.isArray(value))
|
|
20
32
|
return null;
|
|
@@ -31,11 +43,13 @@ function parseBounds(value) {
|
|
|
31
43
|
return null;
|
|
32
44
|
bounds[key] = amount;
|
|
33
45
|
}
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
if (
|
|
46
|
+
for (const key of MEMBER_BOUND_KEYS) {
|
|
47
|
+
const amount = held[key];
|
|
48
|
+
if (amount === undefined)
|
|
49
|
+
continue;
|
|
50
|
+
if (typeof amount !== 'number' || !Number.isFinite(amount))
|
|
37
51
|
return null;
|
|
38
|
-
bounds
|
|
52
|
+
bounds[key] = amount;
|
|
39
53
|
}
|
|
40
54
|
return bounds;
|
|
41
55
|
}
|
|
@@ -44,6 +58,9 @@ function parseTypedSelection(value) {
|
|
|
44
58
|
return null;
|
|
45
59
|
return stringList(value) ?? undefined;
|
|
46
60
|
}
|
|
61
|
+
function parseTimeZone(value) {
|
|
62
|
+
return typeof value === 'string' ? value : null;
|
|
63
|
+
}
|
|
47
64
|
function parseMember(value) {
|
|
48
65
|
if (typeof value !== 'object' || value === null)
|
|
49
66
|
return null;
|
|
@@ -109,6 +126,89 @@ function parseAuthority(value) {
|
|
|
109
126
|
...at,
|
|
110
127
|
};
|
|
111
128
|
}
|
|
129
|
+
function parseOwner(value) {
|
|
130
|
+
if (typeof value !== 'object' || value === null)
|
|
131
|
+
return null;
|
|
132
|
+
const { user, name } = value;
|
|
133
|
+
return typeof user === 'string' && typeof name === 'string' ? { user, name } : null;
|
|
134
|
+
}
|
|
135
|
+
function parseSpaceRef(value) {
|
|
136
|
+
if (typeof value !== 'object' || value === null)
|
|
137
|
+
return null;
|
|
138
|
+
const { space_ref, name } = value;
|
|
139
|
+
return typeof space_ref === 'string' && typeof name === 'string' ? { space_ref, name } : null;
|
|
140
|
+
}
|
|
141
|
+
function parseListedRoom(value) {
|
|
142
|
+
if (typeof value !== 'object' || value === null)
|
|
143
|
+
return null;
|
|
144
|
+
const held = value;
|
|
145
|
+
const level = ACCESS_LEVELS.find((one) => one === held.level);
|
|
146
|
+
const access = ROOM_ACCESS.find((one) => one === held.access);
|
|
147
|
+
const owner = parseOwner(held.owner);
|
|
148
|
+
const space = held.space === undefined ? undefined : parseSpaceRef(held.space);
|
|
149
|
+
if (typeof held.room_ref !== 'string' ||
|
|
150
|
+
held.room_ref.length === 0 ||
|
|
151
|
+
typeof held.room_handle !== 'string' ||
|
|
152
|
+
held.room_handle.length === 0 ||
|
|
153
|
+
typeof held.name !== 'string' ||
|
|
154
|
+
typeof held.created !== 'string' ||
|
|
155
|
+
(held.archived !== undefined && typeof held.archived !== 'string') ||
|
|
156
|
+
(held.exportable !== undefined && held.exportable !== true) ||
|
|
157
|
+
level === undefined ||
|
|
158
|
+
access === undefined ||
|
|
159
|
+
owner === null ||
|
|
160
|
+
space === null)
|
|
161
|
+
return null;
|
|
162
|
+
return {
|
|
163
|
+
room_ref: held.room_ref,
|
|
164
|
+
room_handle: held.room_handle,
|
|
165
|
+
name: held.name,
|
|
166
|
+
level,
|
|
167
|
+
access,
|
|
168
|
+
owner,
|
|
169
|
+
created: held.created,
|
|
170
|
+
...(typeof held.archived === 'string' ? { archived: held.archived } : {}),
|
|
171
|
+
...(held.exportable === true ? { exportable: true } : {}),
|
|
172
|
+
...(space === undefined ? {} : { space }),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function parseListedSpace(value) {
|
|
176
|
+
const space = parseSpaceRef(value);
|
|
177
|
+
if (space === null)
|
|
178
|
+
return null;
|
|
179
|
+
const held = value;
|
|
180
|
+
const owner = parseOwner(held.owner);
|
|
181
|
+
if (owner === null ||
|
|
182
|
+
typeof held.created !== 'string' ||
|
|
183
|
+
(held.manages !== undefined && held.manages !== true))
|
|
184
|
+
return null;
|
|
185
|
+
return {
|
|
186
|
+
...space,
|
|
187
|
+
owner,
|
|
188
|
+
created: held.created,
|
|
189
|
+
...(held.manages === true ? { manages: true } : {}),
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function parsedAll(value, parse) {
|
|
193
|
+
if (!Array.isArray(value))
|
|
194
|
+
return null;
|
|
195
|
+
const parsed = [];
|
|
196
|
+
for (const entry of value) {
|
|
197
|
+
const one = parse(entry);
|
|
198
|
+
if (one === null)
|
|
199
|
+
return null;
|
|
200
|
+
parsed.push(one);
|
|
201
|
+
}
|
|
202
|
+
return parsed;
|
|
203
|
+
}
|
|
204
|
+
function parseRoomList(authorities, listed, spaces) {
|
|
205
|
+
const held = parsedAll(authorities, parseListedRoom);
|
|
206
|
+
const only = parsedAll(listed, parseListedRoom);
|
|
207
|
+
const shown = parsedAll(spaces, parseListedSpace);
|
|
208
|
+
if (held === null || only === null || shown === null)
|
|
209
|
+
return null;
|
|
210
|
+
return { rooms: [...held, ...only], spaces: shown, listed: only };
|
|
211
|
+
}
|
|
112
212
|
function parseAuthorities(value) {
|
|
113
213
|
if (!Array.isArray(value))
|
|
114
214
|
return null;
|
|
@@ -121,17 +221,31 @@ function parseAuthorities(value) {
|
|
|
121
221
|
}
|
|
122
222
|
return authorities;
|
|
123
223
|
}
|
|
224
|
+
export const ROOM_OWN = {
|
|
225
|
+
room_ref: true,
|
|
226
|
+
room_handle: true,
|
|
227
|
+
name: true,
|
|
228
|
+
position: true,
|
|
229
|
+
created: true,
|
|
230
|
+
archived: true,
|
|
231
|
+
};
|
|
232
|
+
function ownKey(key) {
|
|
233
|
+
return Object.hasOwn(ROOM_OWN, key);
|
|
234
|
+
}
|
|
124
235
|
export function foldedAuthorities(authorities) {
|
|
125
236
|
const shapes = [];
|
|
126
237
|
const known = new Map();
|
|
127
|
-
const rooms = authorities.map((
|
|
238
|
+
const rooms = authorities.map((authority) => {
|
|
239
|
+
const entries = Object.entries(authority);
|
|
240
|
+
const shape = Object.fromEntries(entries.filter(([key]) => !ownKey(key)));
|
|
241
|
+
const own = Object.fromEntries(entries.filter(([key]) => ownKey(key)));
|
|
128
242
|
const key = JSON.stringify(shape);
|
|
129
243
|
let held = known.get(key);
|
|
130
244
|
if (held === undefined) {
|
|
131
245
|
held = shapes.push(shape) - 1;
|
|
132
246
|
known.set(key, held);
|
|
133
247
|
}
|
|
134
|
-
return {
|
|
248
|
+
return { ...own, shape: held };
|
|
135
249
|
});
|
|
136
250
|
return { shapes, rooms };
|
|
137
251
|
}
|
|
@@ -165,8 +279,19 @@ export function parseDiscovery(body) {
|
|
|
165
279
|
new Set(actions).size !== actions.length ||
|
|
166
280
|
actions.some((name) => name.length === 0))
|
|
167
281
|
return null;
|
|
168
|
-
const
|
|
169
|
-
|
|
282
|
+
const entries = unfolded(held.shapes, held.rooms);
|
|
283
|
+
const authorities = parseAuthorities(entries);
|
|
284
|
+
const listing = parseRoomList(entries, held.listed, held.spaces);
|
|
285
|
+
if (authorities === null || listing === null)
|
|
286
|
+
return null;
|
|
287
|
+
return {
|
|
288
|
+
member,
|
|
289
|
+
timeZone: parseTimeZone(held.time_zone),
|
|
290
|
+
bounds,
|
|
291
|
+
authorities,
|
|
292
|
+
actions,
|
|
293
|
+
roomList: { rooms: listing.rooms, spaces: listing.spaces },
|
|
294
|
+
};
|
|
170
295
|
}
|
|
171
296
|
export function parseAuthorityChange(body) {
|
|
172
297
|
if (typeof body !== 'object' || body === null)
|
|
@@ -174,10 +299,18 @@ export function parseAuthorityChange(body) {
|
|
|
174
299
|
const held = body;
|
|
175
300
|
const member = parseMember(held.member);
|
|
176
301
|
const authorities = parseAuthorities(held.authorities);
|
|
302
|
+
const listing = parseRoomList(held.authorities, held.listed, held.spaces);
|
|
177
303
|
const left = stringList(held.left);
|
|
178
|
-
if (member === null || authorities === null || left === null)
|
|
304
|
+
if (member === null || authorities === null || listing === null || left === null)
|
|
179
305
|
return null;
|
|
180
|
-
return {
|
|
306
|
+
return {
|
|
307
|
+
member,
|
|
308
|
+
timeZone: parseTimeZone(held.time_zone),
|
|
309
|
+
authorities,
|
|
310
|
+
listed: listing.listed.map((room) => room.room_ref),
|
|
311
|
+
left,
|
|
312
|
+
roomList: { rooms: listing.rooms, spaces: listing.spaces },
|
|
313
|
+
};
|
|
181
314
|
}
|
|
182
315
|
function parseSiteAuthority(value) {
|
|
183
316
|
if (typeof value !== 'object' || value === null)
|
|
@@ -201,6 +334,16 @@ function parseSiteAuthority(value) {
|
|
|
201
334
|
...at,
|
|
202
335
|
};
|
|
203
336
|
}
|
|
337
|
+
function parseSiteQueried(value) {
|
|
338
|
+
if (typeof value !== 'object' || value === null)
|
|
339
|
+
return null;
|
|
340
|
+
const { room_ref, room_handle } = value;
|
|
341
|
+
if (typeof room_ref !== 'string' || room_ref.length === 0)
|
|
342
|
+
return null;
|
|
343
|
+
if (typeof room_handle !== 'string' || room_handle.length === 0)
|
|
344
|
+
return null;
|
|
345
|
+
return { roomRef: room_ref, roomHandle: room_handle };
|
|
346
|
+
}
|
|
204
347
|
export function parseSiteDiscovery(body) {
|
|
205
348
|
if (typeof body !== 'object' || body === null)
|
|
206
349
|
return null;
|
|
@@ -208,16 +351,11 @@ export function parseSiteDiscovery(body) {
|
|
|
208
351
|
const bounds = parseBounds(held.bounds);
|
|
209
352
|
if (bounds === null)
|
|
210
353
|
return null;
|
|
211
|
-
|
|
354
|
+
const authorities = parsedAll(held.authorities, parseSiteAuthority);
|
|
355
|
+
const queriesOnly = held.queries_only === undefined ? [] : parsedAll(held.queries_only, parseSiteQueried);
|
|
356
|
+
if (authorities === null || queriesOnly === null)
|
|
212
357
|
return null;
|
|
213
|
-
|
|
214
|
-
for (const entry of held.authorities) {
|
|
215
|
-
const authority = parseSiteAuthority(entry);
|
|
216
|
-
if (authority === null)
|
|
217
|
-
return null;
|
|
218
|
-
authorities.push(authority);
|
|
219
|
-
}
|
|
220
|
-
return { bounds, authorities };
|
|
358
|
+
return { bounds, authorities, queriesOnly };
|
|
221
359
|
}
|
|
222
360
|
export function siteTracked(document) {
|
|
223
361
|
return document.authorities.map((authority) => ({
|
|
@@ -251,6 +389,12 @@ export function providerLimits(bounds) {
|
|
|
251
389
|
...(bounds.max_move_documents === undefined
|
|
252
390
|
? []
|
|
253
391
|
: [{ name: 'move-documents', value: bounds.max_move_documents }]),
|
|
392
|
+
...(bounds.max_indexed_fields === undefined
|
|
393
|
+
? []
|
|
394
|
+
: [{ name: 'indexed-fields', value: bounds.max_indexed_fields }]),
|
|
395
|
+
...(bounds.max_indexed_text_length === undefined
|
|
396
|
+
? []
|
|
397
|
+
: [{ name: 'indexed-text-length', value: bounds.max_indexed_text_length }]),
|
|
254
398
|
{ name: 'write-rate' },
|
|
255
399
|
{ name: 'storage-limit' },
|
|
256
400
|
];
|
|
@@ -268,7 +412,11 @@ export function siteCapabilities() {
|
|
|
268
412
|
return [
|
|
269
413
|
{
|
|
270
414
|
name: PROVIDER_ACTIONS,
|
|
271
|
-
actions:
|
|
415
|
+
actions: Object.keys(SITE_DOOR_ACTS).map((name) => ({
|
|
416
|
+
name,
|
|
417
|
+
inputShape: {},
|
|
418
|
+
resultKind: 'house',
|
|
419
|
+
})),
|
|
272
420
|
},
|
|
273
421
|
];
|
|
274
422
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter, type AgentsHouseAdapterOptions } from './adapter.js';
|
|
2
|
-
export { foldedAuthorities } from './discovery.js';
|
|
2
|
+
export { foldedAuthorities, ROOM_OWN } from './discovery.js';
|
|
3
3
|
export { finishedUpload, houseUpload, type HouseUpload } from './upload.js';
|
|
4
4
|
export { houseAction, type HouseActDoor } from './actions.js';
|
|
5
5
|
export { HISTORY_PAGE } from './history.js';
|
|
6
6
|
export { answeredFailure } from './refusal.js';
|
|
7
|
+
export { answering, documentEntry, kept, type Answered, type HouseManifestFile } from './read.js';
|
|
7
8
|
export { houseParts, type ChangeMapping } from './write.js';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export { HOUSE_MODEL_DECLARATION, HOUSE_MODEL_TYPES, HOUSE_TYPED_PATHS, type HouseDocumentFields, type HouseModelType, } from './house-model.js';
|
|
11
|
-
export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
|
|
12
|
-
export { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, type InboxChannelKind, } from './room-types.js';
|
|
13
|
-
export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, type HouseRuntimeAct, type HouseRuntimeFrame, } from './transport.js';
|
|
9
|
+
export { admittedPath, AUTHORED_NAME_MAX_BYTES, AUTHORED_NAME_RULE, AUTHORED_PATH_MAX_BYTES, fittedName, GENERATED_PROVENANCE, GENERATED_REVISIONS, LOCAL_COPY_MANIFEST, LOCAL_COPY_ROOT_NAMES, nameRefusal, pathRefusal, RESERVED_DERIVED, sameName, utf8Bytes, WHOLE_ESCAPED_NAMES, type NameRefusal, type PathRefusal, } from './authored-path.js';
|
|
10
|
+
export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, SITE_FRESH_QUERY, SITE_IMAGE_COPIES_HEADER, SITE_QUERY, SITE_QUERY_ROUTE_CHARACTERS, siteQueryAsked, siteQueryRoute, type HouseRuntimeAct, type HouseRuntimeFrame, } from './transport.js';
|
|
14
11
|
export type { 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,iBAAiB,EAAE,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,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,EACV,2BAA2B,EAC3B,cAAc,EACd,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,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,13 +1,10 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter } from './adapter.js';
|
|
2
|
-
export { foldedAuthorities } from './discovery.js';
|
|
2
|
+
export { foldedAuthorities, ROOM_OWN } from './discovery.js';
|
|
3
3
|
export { finishedUpload, houseUpload } from './upload.js';
|
|
4
4
|
export { houseAction } from './actions.js';
|
|
5
5
|
export { HISTORY_PAGE } from './history.js';
|
|
6
6
|
export { answeredFailure } from './refusal.js';
|
|
7
|
+
export { answering, documentEntry, kept } from './read.js';
|
|
7
8
|
export { houseParts } from './write.js';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export { HOUSE_MODEL_DECLARATION, HOUSE_MODEL_TYPES, HOUSE_TYPED_PATHS, } from './house-model.js';
|
|
11
|
-
export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
|
|
12
|
-
export { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, } from './room-types.js';
|
|
13
|
-
export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, } from './transport.js';
|
|
9
|
+
export { admittedPath, AUTHORED_NAME_MAX_BYTES, AUTHORED_NAME_RULE, AUTHORED_PATH_MAX_BYTES, fittedName, GENERATED_PROVENANCE, GENERATED_REVISIONS, LOCAL_COPY_MANIFEST, LOCAL_COPY_ROOT_NAMES, nameRefusal, pathRefusal, RESERVED_DERIVED, sameName, utf8Bytes, WHOLE_ESCAPED_NAMES, } from './authored-path.js';
|
|
10
|
+
export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, SITE_FRESH_QUERY, SITE_IMAGE_COPIES_HEADER, SITE_QUERY, SITE_QUERY_ROUTE_CHARACTERS, siteQueryAsked, siteQueryRoute, } from './transport.js';
|
package/dist/model.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RoomModels } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
3
|
-
import { type HouseRoomHead } from './read.js';
|
|
3
|
+
import { type HouseManifestFile, type HouseRoomHead } from './read.js';
|
|
4
4
|
import { type SpaceSchemas } from './space-schema.js';
|
|
5
|
-
import type {
|
|
6
|
-
export declare function manifestedModels(room: HouseRoomHead, tracked: TrackedAuthority
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function streamedModels(schemas: ReadonlyMap<string,
|
|
5
|
+
import type { HouseStreamEntry } from './transport.js';
|
|
6
|
+
export declare function manifestedModels(room: HouseRoomHead, tracked: TrackedAuthority): Promise<RoomModels | undefined>;
|
|
7
|
+
export declare function spaceSchemaTexts(entries: readonly HouseStreamEntry[], spaces: SpaceSchemas): HouseStreamEntry[];
|
|
8
|
+
export declare function streamedModels(schemas: ReadonlyMap<string, HouseManifestFile | null>, tracked: TrackedAuthority, whole: boolean): Promise<RoomModels | undefined>;
|
package/dist/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAEnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA+BvD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAGjC;AAYD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,MAAM,EAAE,YAAY,GACnB,gBAAgB,EAAE,CAEpB;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC,EACtD,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAMjC"}
|