@agentshouse/mdruntime-adapter 0.1.0-c330745735a75 → 0.1.0-c341663d60099
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/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +8 -7
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +113 -89
- package/dist/authored-path.d.ts +0 -1
- package/dist/authored-path.d.ts.map +1 -1
- package/dist/authored-path.js +2 -3
- package/dist/chunks.d.ts +2 -3
- package/dist/chunks.d.ts.map +1 -1
- package/dist/chunks.js +71 -37
- package/dist/discovery.d.ts +18 -5
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +132 -6
- package/dist/history.d.ts +1 -6
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +21 -28
- package/dist/index.d.ts +4 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -6
- 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 +5 -19
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +34 -35
- package/dist/refusal.d.ts +5 -1
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +23 -6
- package/dist/room-query.d.ts +3 -0
- package/dist/room-query.d.ts.map +1 -0
- package/dist/room-query.js +22 -0
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +4 -4
- package/dist/session-content/index.d.ts +1 -1
- package/dist/session-content/parts.d.ts +4 -3
- package/dist/session-content/turn.d.ts +3 -3
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +17 -17
- 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 +79 -72
- package/dist/transport.d.ts +30 -11
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +5 -1
- package/dist/uncertain.d.ts +5 -0
- package/dist/uncertain.d.ts.map +1 -0
- package/dist/uncertain.js +11 -0
- package/dist/upload.d.ts +3 -1
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +8 -6
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +19 -19
- 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/chunks.js
CHANGED
|
@@ -1,7 +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
|
+
import { failedOn, unusable } from './uncertain.js';
|
|
6
|
+
import { spaceSchemas } from './space-schema.js';
|
|
5
7
|
import { houseDoorRoute } from './transport.js';
|
|
6
8
|
import { readPosition, roomVersion } from './version.js';
|
|
7
9
|
function authorKey(author) {
|
|
@@ -26,27 +28,35 @@ function namesOf(authors) {
|
|
|
26
28
|
}
|
|
27
29
|
return names;
|
|
28
30
|
}
|
|
29
|
-
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) {
|
|
30
41
|
if (!Array.isArray(models))
|
|
31
42
|
return null;
|
|
32
43
|
const files = [];
|
|
33
|
-
const contents = [];
|
|
34
44
|
for (const entry of models) {
|
|
35
|
-
const file =
|
|
36
|
-
|
|
45
|
+
const file = documentEntry(entry, mode);
|
|
46
|
+
const content = file === null ? undefined : schemaText(file, texts);
|
|
47
|
+
if (file === null || content === undefined)
|
|
37
48
|
return null;
|
|
38
|
-
files.push(file);
|
|
39
|
-
contents.push({ path: file.path, content: entry.content });
|
|
49
|
+
files.push({ ...file, content });
|
|
40
50
|
}
|
|
41
|
-
return
|
|
51
|
+
return files;
|
|
42
52
|
}
|
|
43
53
|
export function partId(logEpoch, hash) {
|
|
44
54
|
return `${logEpoch}:${hash}`;
|
|
45
55
|
}
|
|
46
|
-
function chunkedRoom(room, mode) {
|
|
56
|
+
function chunkedRoom(room, mode, texts) {
|
|
47
57
|
const at = readPosition(room);
|
|
48
58
|
const names = mode === 'site' ? new Map() : namesOf(room.authors);
|
|
49
|
-
const models = modelsOf(room.models, mode);
|
|
59
|
+
const models = modelsOf(room.models, mode, texts);
|
|
50
60
|
if (at === null || names === null || models === null || !Array.isArray(room.chunks))
|
|
51
61
|
return null;
|
|
52
62
|
const chunks = new Map();
|
|
@@ -61,7 +71,7 @@ function chunkedRoom(room, mode) {
|
|
|
61
71
|
}
|
|
62
72
|
return { anchor: room.room_ref, ...at, mode, chunks, parts, names, models };
|
|
63
73
|
}
|
|
64
|
-
function listedRoom(room, mode) {
|
|
74
|
+
function listedRoom(room, mode, texts) {
|
|
65
75
|
if (typeof room !== 'object' || room === null)
|
|
66
76
|
return null;
|
|
67
77
|
const held = room;
|
|
@@ -69,23 +79,23 @@ function listedRoom(room, mode) {
|
|
|
69
79
|
return null;
|
|
70
80
|
if (held.ready === false)
|
|
71
81
|
return { kind: 'not-ready' };
|
|
72
|
-
return held.ready === true ? chunkedRoom(held, mode) : null;
|
|
82
|
+
return held.ready === true ? chunkedRoom(held, mode, texts) : null;
|
|
73
83
|
}
|
|
74
84
|
export function siteChunkList(answer, locator) {
|
|
75
85
|
const failure = classifyDoor(answer.status, answer.body, locator);
|
|
76
86
|
if (failure !== null)
|
|
77
87
|
return failure;
|
|
78
|
-
return listedRoom(answer.body, 'site') ??
|
|
88
|
+
return listedRoom(answer.body, 'site', spaceSchemas()) ?? unusable();
|
|
79
89
|
}
|
|
80
|
-
export async function chunkedHead(listed, entry
|
|
90
|
+
export async function chunkedHead(listed, entry) {
|
|
81
91
|
if (listed.anchor !== entry.authority)
|
|
82
|
-
return
|
|
92
|
+
return unusable();
|
|
83
93
|
const models = await manifestedModels({
|
|
84
94
|
anchor: listed.anchor,
|
|
85
95
|
position: listed.position,
|
|
86
96
|
logEpoch: listed.logEpoch,
|
|
87
97
|
models: listed.models,
|
|
88
|
-
}, entry
|
|
98
|
+
}, entry);
|
|
89
99
|
return {
|
|
90
100
|
kind: 'bootstrap',
|
|
91
101
|
roomVersion: roomVersion(listed),
|
|
@@ -101,10 +111,16 @@ export async function chunkedHead(listed, entry, spaces) {
|
|
|
101
111
|
export async function chunkPart(body, room, id, arriving) {
|
|
102
112
|
const address = room.chunks.get(id);
|
|
103
113
|
if (body === null || address === undefined)
|
|
104
|
-
return
|
|
105
|
-
|
|
114
|
+
return unusable();
|
|
115
|
+
let scope;
|
|
116
|
+
try {
|
|
117
|
+
scope = await chunkScope(body, room, arriving);
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
return failedOn(error);
|
|
121
|
+
}
|
|
106
122
|
if (scope === null)
|
|
107
|
-
return
|
|
123
|
+
return unusable();
|
|
108
124
|
return { ...(await stepped(bootstrapping(scope))), bytes: address.bytes };
|
|
109
125
|
}
|
|
110
126
|
function listedRooms(answer) {
|
|
@@ -112,16 +128,18 @@ function listedRooms(answer) {
|
|
|
112
128
|
if (!Array.isArray(rooms))
|
|
113
129
|
return null;
|
|
114
130
|
const listed = new Map();
|
|
131
|
+
const texts = spaceSchemas();
|
|
115
132
|
for (const room of rooms) {
|
|
116
|
-
const held = listedRoom(room, 'credential');
|
|
133
|
+
const held = listedRoom(room, 'credential', texts);
|
|
117
134
|
if (held === null)
|
|
118
135
|
return null;
|
|
119
136
|
listed.set(room.room_ref, held);
|
|
120
137
|
}
|
|
121
138
|
return listed;
|
|
122
139
|
}
|
|
123
|
-
export function chunkLister(transport, most) {
|
|
140
|
+
export function chunkLister(transport, most, tracked) {
|
|
124
141
|
const asked = new Map();
|
|
142
|
+
const unlisted = new Set();
|
|
125
143
|
function answered(entries, whole) {
|
|
126
144
|
const prefixes = whole ? ['/'] : entries.map((entry) => authorityRoot(entry.handle));
|
|
127
145
|
return transport.door(houseDoorRoute('room-chunks/list'), { prefixes }).then((answer) => {
|
|
@@ -129,8 +147,8 @@ export function chunkLister(transport, most) {
|
|
|
129
147
|
if (failure !== null)
|
|
130
148
|
return failed(entries, failure);
|
|
131
149
|
const listed = listedRooms(answer);
|
|
132
|
-
return listed ?? failed(entries,
|
|
133
|
-
}, () => failed(entries,
|
|
150
|
+
return listed ?? failed(entries, unusable());
|
|
151
|
+
}, (error) => failed(entries, failedOn(error)));
|
|
134
152
|
}
|
|
135
153
|
function failed(entries, failure) {
|
|
136
154
|
return new Map(entries.map((entry) => [
|
|
@@ -153,24 +171,46 @@ export function chunkLister(transport, most) {
|
|
|
153
171
|
asked.set(entry.authority, { entry, listed });
|
|
154
172
|
}
|
|
155
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
|
+
}
|
|
156
188
|
function list(entry) {
|
|
157
|
-
|
|
189
|
+
if (!current(entry))
|
|
190
|
+
askTogether([...waiting().filter((one) => !current(one)), entry]);
|
|
191
|
+
const { listed } = asked.get(entry.authority);
|
|
158
192
|
asked.delete(entry.authority);
|
|
159
|
-
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
|
+
});
|
|
160
200
|
}
|
|
161
201
|
return {
|
|
162
202
|
askAll,
|
|
163
203
|
list,
|
|
164
204
|
renew(entry, installing) {
|
|
165
|
-
if (!
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
askAll([...due.values()]);
|
|
205
|
+
if (!current(entry)) {
|
|
206
|
+
const listed = [...asked.values()].flatMap((held) => tracked(held.entry.locator) ?? []);
|
|
207
|
+
askTogether([...listed, ...waiting(), ...installing, entry]);
|
|
169
208
|
}
|
|
170
209
|
return list(entry);
|
|
171
210
|
},
|
|
172
211
|
forget() {
|
|
173
212
|
asked.clear();
|
|
213
|
+
unlisted.clear();
|
|
174
214
|
},
|
|
175
215
|
};
|
|
176
216
|
}
|
|
@@ -201,20 +241,14 @@ function chunkEntry(line, room, read) {
|
|
|
201
241
|
return false;
|
|
202
242
|
named = { ...entry, author: { ...author, name } };
|
|
203
243
|
}
|
|
204
|
-
const file =
|
|
244
|
+
const file = documentEntry(named, room.mode);
|
|
205
245
|
if (file === null)
|
|
206
246
|
return false;
|
|
207
247
|
read.files.push(file);
|
|
208
|
-
if (typeof entry.content === 'string')
|
|
209
|
-
read.contents.push({ path: file.path, content: entry.content });
|
|
210
248
|
return true;
|
|
211
249
|
}
|
|
212
250
|
export async function chunkScope(body, room, arriving) {
|
|
213
|
-
const read = {
|
|
214
|
-
files: [],
|
|
215
|
-
contents: [],
|
|
216
|
-
folders: [],
|
|
217
|
-
};
|
|
251
|
+
const read = { files: [], folders: [] };
|
|
218
252
|
const reader = body.getReader();
|
|
219
253
|
const decoder = new TextDecoder();
|
|
220
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 = {
|
|
@@ -32,14 +32,19 @@ export type HouseAuthority = LogPosition & {
|
|
|
32
32
|
};
|
|
33
33
|
export type HouseDiscoveryDocument = {
|
|
34
34
|
member: Member;
|
|
35
|
+
timeZone: string | null;
|
|
35
36
|
bounds: HouseBounds;
|
|
36
37
|
authorities: readonly HouseAuthority[];
|
|
37
38
|
actions: readonly string[];
|
|
39
|
+
roomList: RoomList;
|
|
38
40
|
};
|
|
39
41
|
export type HouseAuthorityChange = {
|
|
40
42
|
member: Member;
|
|
43
|
+
timeZone: string | null;
|
|
41
44
|
authorities: readonly HouseAuthority[];
|
|
45
|
+
listed: readonly string[];
|
|
42
46
|
left: readonly string[];
|
|
47
|
+
roomList: RoomList;
|
|
43
48
|
};
|
|
44
49
|
export type TrackedAuthority = LogPosition & {
|
|
45
50
|
locator: string;
|
|
@@ -57,14 +62,22 @@ export type HouseSiteDiscovery = {
|
|
|
57
62
|
bounds: HouseBounds;
|
|
58
63
|
authorities: readonly HouseSiteAuthority[];
|
|
59
64
|
};
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
export declare const ROOM_OWN: {
|
|
66
|
+
readonly room_ref: true;
|
|
67
|
+
readonly room_handle: true;
|
|
68
|
+
readonly name: true;
|
|
69
|
+
readonly position: true;
|
|
70
|
+
readonly created: true;
|
|
71
|
+
readonly archived: true;
|
|
72
|
+
};
|
|
73
|
+
type RoomOwn = keyof typeof ROOM_OWN;
|
|
74
|
+
type Folded<A extends Record<'room_ref' | 'room_handle' | 'name' | 'position', unknown>> = {
|
|
62
75
|
readonly shapes: readonly Omit<A, RoomOwn>[];
|
|
63
|
-
readonly rooms: readonly (Pick<A, RoomOwn
|
|
76
|
+
readonly rooms: readonly (Pick<A, Extract<keyof A, RoomOwn>> & {
|
|
64
77
|
readonly shape: number;
|
|
65
78
|
})[];
|
|
66
79
|
};
|
|
67
|
-
export declare function foldedAuthorities<A extends Record<
|
|
80
|
+
export declare function foldedAuthorities<A extends Record<'room_ref' | 'room_handle' | 'name' | 'position', unknown>>(authorities: readonly A[]): Folded<A>;
|
|
68
81
|
export declare function parseDiscovery(body: unknown): HouseDiscoveryDocument | null;
|
|
69
82
|
export declare function parseAuthorityChange(body: unknown): HouseAuthorityChange | null;
|
|
70
83
|
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":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EAGT,MAAM,EACN,aAAa,EACb,SAAS,EACT,QAAQ,EAGT,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3E,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,cA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S_LEVELS = ['search', 'open', 'keep'];
|
|
18
|
+
const ROOM_ACCESS = [
|
|
19
|
+
'owner',
|
|
20
|
+
'manage',
|
|
21
|
+
'write',
|
|
22
|
+
'read',
|
|
23
|
+
'public',
|
|
24
|
+
];
|
|
18
25
|
function stringList(value) {
|
|
19
26
|
if (!Array.isArray(value))
|
|
20
27
|
return null;
|
|
@@ -44,6 +51,9 @@ function parseTypedSelection(value) {
|
|
|
44
51
|
return null;
|
|
45
52
|
return stringList(value) ?? undefined;
|
|
46
53
|
}
|
|
54
|
+
function parseTimeZone(value) {
|
|
55
|
+
return typeof value === 'string' ? value : null;
|
|
56
|
+
}
|
|
47
57
|
function parseMember(value) {
|
|
48
58
|
if (typeof value !== 'object' || value === null)
|
|
49
59
|
return null;
|
|
@@ -109,6 +119,89 @@ function parseAuthority(value) {
|
|
|
109
119
|
...at,
|
|
110
120
|
};
|
|
111
121
|
}
|
|
122
|
+
function parseOwner(value) {
|
|
123
|
+
if (typeof value !== 'object' || value === null)
|
|
124
|
+
return null;
|
|
125
|
+
const { user, name } = value;
|
|
126
|
+
return typeof user === 'string' && typeof name === 'string' ? { user, name } : null;
|
|
127
|
+
}
|
|
128
|
+
function parseSpaceRef(value) {
|
|
129
|
+
if (typeof value !== 'object' || value === null)
|
|
130
|
+
return null;
|
|
131
|
+
const { space_ref, name } = value;
|
|
132
|
+
return typeof space_ref === 'string' && typeof name === 'string' ? { space_ref, name } : null;
|
|
133
|
+
}
|
|
134
|
+
function parseListedRoom(value) {
|
|
135
|
+
if (typeof value !== 'object' || value === null)
|
|
136
|
+
return null;
|
|
137
|
+
const held = value;
|
|
138
|
+
const level = ACCESS_LEVELS.find((one) => one === held.level);
|
|
139
|
+
const access = ROOM_ACCESS.find((one) => one === held.access);
|
|
140
|
+
const owner = parseOwner(held.owner);
|
|
141
|
+
const space = held.space === undefined ? undefined : parseSpaceRef(held.space);
|
|
142
|
+
if (typeof held.room_ref !== 'string' ||
|
|
143
|
+
held.room_ref.length === 0 ||
|
|
144
|
+
typeof held.room_handle !== 'string' ||
|
|
145
|
+
held.room_handle.length === 0 ||
|
|
146
|
+
typeof held.name !== 'string' ||
|
|
147
|
+
typeof held.created !== 'string' ||
|
|
148
|
+
(held.archived !== undefined && typeof held.archived !== 'string') ||
|
|
149
|
+
(held.exportable !== undefined && held.exportable !== true) ||
|
|
150
|
+
level === undefined ||
|
|
151
|
+
access === undefined ||
|
|
152
|
+
owner === null ||
|
|
153
|
+
space === null)
|
|
154
|
+
return null;
|
|
155
|
+
return {
|
|
156
|
+
room_ref: held.room_ref,
|
|
157
|
+
room_handle: held.room_handle,
|
|
158
|
+
name: held.name,
|
|
159
|
+
level,
|
|
160
|
+
access,
|
|
161
|
+
owner,
|
|
162
|
+
created: held.created,
|
|
163
|
+
...(typeof held.archived === 'string' ? { archived: held.archived } : {}),
|
|
164
|
+
...(held.exportable === true ? { exportable: true } : {}),
|
|
165
|
+
...(space === undefined ? {} : { space }),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function parseListedSpace(value) {
|
|
169
|
+
const space = parseSpaceRef(value);
|
|
170
|
+
if (space === null)
|
|
171
|
+
return null;
|
|
172
|
+
const held = value;
|
|
173
|
+
const owner = parseOwner(held.owner);
|
|
174
|
+
if (owner === null ||
|
|
175
|
+
typeof held.created !== 'string' ||
|
|
176
|
+
(held.manages !== undefined && held.manages !== true))
|
|
177
|
+
return null;
|
|
178
|
+
return {
|
|
179
|
+
...space,
|
|
180
|
+
owner,
|
|
181
|
+
created: held.created,
|
|
182
|
+
...(held.manages === true ? { manages: true } : {}),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function parsedAll(value, parse) {
|
|
186
|
+
if (!Array.isArray(value))
|
|
187
|
+
return null;
|
|
188
|
+
const parsed = [];
|
|
189
|
+
for (const entry of value) {
|
|
190
|
+
const one = parse(entry);
|
|
191
|
+
if (one === null)
|
|
192
|
+
return null;
|
|
193
|
+
parsed.push(one);
|
|
194
|
+
}
|
|
195
|
+
return parsed;
|
|
196
|
+
}
|
|
197
|
+
function parseRoomList(authorities, listed, spaces) {
|
|
198
|
+
const held = parsedAll(authorities, parseListedRoom);
|
|
199
|
+
const only = parsedAll(listed, parseListedRoom);
|
|
200
|
+
const shown = parsedAll(spaces, parseListedSpace);
|
|
201
|
+
if (held === null || only === null || shown === null)
|
|
202
|
+
return null;
|
|
203
|
+
return { rooms: [...held, ...only], spaces: shown, listed: only };
|
|
204
|
+
}
|
|
112
205
|
function parseAuthorities(value) {
|
|
113
206
|
if (!Array.isArray(value))
|
|
114
207
|
return null;
|
|
@@ -121,17 +214,31 @@ function parseAuthorities(value) {
|
|
|
121
214
|
}
|
|
122
215
|
return authorities;
|
|
123
216
|
}
|
|
217
|
+
export const ROOM_OWN = {
|
|
218
|
+
room_ref: true,
|
|
219
|
+
room_handle: true,
|
|
220
|
+
name: true,
|
|
221
|
+
position: true,
|
|
222
|
+
created: true,
|
|
223
|
+
archived: true,
|
|
224
|
+
};
|
|
225
|
+
function ownKey(key) {
|
|
226
|
+
return Object.hasOwn(ROOM_OWN, key);
|
|
227
|
+
}
|
|
124
228
|
export function foldedAuthorities(authorities) {
|
|
125
229
|
const shapes = [];
|
|
126
230
|
const known = new Map();
|
|
127
|
-
const rooms = authorities.map((
|
|
231
|
+
const rooms = authorities.map((authority) => {
|
|
232
|
+
const entries = Object.entries(authority);
|
|
233
|
+
const shape = Object.fromEntries(entries.filter(([key]) => !ownKey(key)));
|
|
234
|
+
const own = Object.fromEntries(entries.filter(([key]) => ownKey(key)));
|
|
128
235
|
const key = JSON.stringify(shape);
|
|
129
236
|
let held = known.get(key);
|
|
130
237
|
if (held === undefined) {
|
|
131
238
|
held = shapes.push(shape) - 1;
|
|
132
239
|
known.set(key, held);
|
|
133
240
|
}
|
|
134
|
-
return {
|
|
241
|
+
return { ...own, shape: held };
|
|
135
242
|
});
|
|
136
243
|
return { shapes, rooms };
|
|
137
244
|
}
|
|
@@ -165,8 +272,19 @@ export function parseDiscovery(body) {
|
|
|
165
272
|
new Set(actions).size !== actions.length ||
|
|
166
273
|
actions.some((name) => name.length === 0))
|
|
167
274
|
return null;
|
|
168
|
-
const
|
|
169
|
-
|
|
275
|
+
const entries = unfolded(held.shapes, held.rooms);
|
|
276
|
+
const authorities = parseAuthorities(entries);
|
|
277
|
+
const listing = parseRoomList(entries, held.listed, held.spaces);
|
|
278
|
+
if (authorities === null || listing === null)
|
|
279
|
+
return null;
|
|
280
|
+
return {
|
|
281
|
+
member,
|
|
282
|
+
timeZone: parseTimeZone(held.time_zone),
|
|
283
|
+
bounds,
|
|
284
|
+
authorities,
|
|
285
|
+
actions,
|
|
286
|
+
roomList: { rooms: listing.rooms, spaces: listing.spaces },
|
|
287
|
+
};
|
|
170
288
|
}
|
|
171
289
|
export function parseAuthorityChange(body) {
|
|
172
290
|
if (typeof body !== 'object' || body === null)
|
|
@@ -174,10 +292,18 @@ export function parseAuthorityChange(body) {
|
|
|
174
292
|
const held = body;
|
|
175
293
|
const member = parseMember(held.member);
|
|
176
294
|
const authorities = parseAuthorities(held.authorities);
|
|
295
|
+
const listing = parseRoomList(held.authorities, held.listed, held.spaces);
|
|
177
296
|
const left = stringList(held.left);
|
|
178
|
-
if (member === null || authorities === null || left === null)
|
|
297
|
+
if (member === null || authorities === null || listing === null || left === null)
|
|
179
298
|
return null;
|
|
180
|
-
return {
|
|
299
|
+
return {
|
|
300
|
+
member,
|
|
301
|
+
timeZone: parseTimeZone(held.time_zone),
|
|
302
|
+
authorities,
|
|
303
|
+
listed: listing.listed.map((room) => room.room_ref),
|
|
304
|
+
left,
|
|
305
|
+
roomList: { rooms: listing.rooms, spaces: listing.spaces },
|
|
306
|
+
};
|
|
181
307
|
}
|
|
182
308
|
function parseSiteAuthority(value) {
|
|
183
309
|
if (typeof value !== 'object' || value === null)
|
package/dist/history.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { AcceptedMessage, ActionResult, ConversationHistoryRequest } from '@agentshouse/mdruntime';
|
|
2
2
|
import { type HouseDoor } from './transport.js';
|
|
3
3
|
export declare const HISTORY_PAGE = 100;
|
|
4
|
-
|
|
5
|
-
accepted_at: string;
|
|
6
|
-
message_id: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function cursorPosition(cursor: HistoryCursor): string;
|
|
4
|
+
export declare function changeCursor(change: number): string;
|
|
9
5
|
export declare function acceptedMessage(entry: unknown): AcceptedMessage | null;
|
|
10
6
|
export declare function houseHistory(transport: HouseDoor, request: ConversationHistoryRequest): Promise<ActionResult>;
|
|
11
|
-
export {};
|
package/dist/history.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAGZ,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAGZ,0BAA0B,EAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhE,eAAO,MAAM,YAAY,MAAM,CAAC;AAqBhC,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAatE;AA6BD,wBAAsB,YAAY,CAChC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,YAAY,CAAC,CAqBvB"}
|
package/dist/history.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { actionOutcome } from './actions.js';
|
|
2
2
|
import { houseDoorRoute } from './transport.js';
|
|
3
|
+
import { unusable } from './uncertain.js';
|
|
3
4
|
export const HISTORY_PAGE = 100;
|
|
4
5
|
const HISTORY = 'conversations/history/list';
|
|
6
|
+
const CHANGE_DIGITS = 16;
|
|
7
|
+
const CHANGE = new RegExp(`^[0-9]{${CHANGE_DIGITS}}$`);
|
|
5
8
|
function record(value) {
|
|
6
9
|
return typeof value === 'object' && value !== null ? value : {};
|
|
7
10
|
}
|
|
@@ -9,32 +12,23 @@ function text(value, name) {
|
|
|
9
12
|
const held = record(value)[name];
|
|
10
13
|
return typeof held === 'string' ? held : undefined;
|
|
11
14
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
const messageId = text(value, 'message_id');
|
|
15
|
-
if (acceptedAt === undefined || messageId === undefined)
|
|
16
|
-
return null;
|
|
17
|
-
return { accepted_at: acceptedAt, message_id: messageId };
|
|
18
|
-
}
|
|
19
|
-
export function cursorPosition(cursor) {
|
|
20
|
-
return JSON.stringify({ accepted_at: cursor.accepted_at, message_id: cursor.message_id });
|
|
15
|
+
function changeOf(value) {
|
|
16
|
+
return Number.isSafeInteger(value) && value > 0 ? value : null;
|
|
21
17
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
return historyCursor(JSON.parse(value));
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
18
|
+
export function changeCursor(change) {
|
|
19
|
+
return String(change).padStart(CHANGE_DIGITS, '0');
|
|
29
20
|
}
|
|
30
21
|
export function acceptedMessage(entry) {
|
|
31
|
-
const
|
|
32
|
-
|
|
22
|
+
const identity = text(entry, 'message_id');
|
|
23
|
+
const acceptedAt = text(entry, 'accepted_at');
|
|
24
|
+
const change = changeOf(record(entry).change);
|
|
25
|
+
if (identity === undefined || acceptedAt === undefined || change === null)
|
|
33
26
|
return null;
|
|
34
27
|
return {
|
|
35
|
-
identity
|
|
36
|
-
turn: text(entry, 'turn_id') ??
|
|
37
|
-
position:
|
|
28
|
+
identity,
|
|
29
|
+
turn: text(entry, 'turn_id') ?? identity,
|
|
30
|
+
position: JSON.stringify({ accepted_at: acceptedAt, message_id: identity }),
|
|
31
|
+
change: changeCursor(change),
|
|
38
32
|
text: text(entry, 'text') ?? '',
|
|
39
33
|
message: structuredClone(record(entry)),
|
|
40
34
|
};
|
|
@@ -51,20 +45,19 @@ function historyPage(entry) {
|
|
|
51
45
|
return null;
|
|
52
46
|
messages.push(message);
|
|
53
47
|
}
|
|
54
|
-
const next = held.next === null || held.next === undefined ? undefined :
|
|
48
|
+
const next = held.next === null || held.next === undefined ? undefined : changeOf(held.next);
|
|
55
49
|
if (next === null)
|
|
56
50
|
return null;
|
|
57
|
-
return { conversation, messages, ...(next === undefined ? {} : { next:
|
|
51
|
+
return { conversation, messages, ...(next === undefined ? {} : { next: changeCursor(next) }) };
|
|
58
52
|
}
|
|
59
53
|
function historyAsks(request) {
|
|
60
54
|
const asks = [];
|
|
61
55
|
for (const { conversation, after } of request.conversations) {
|
|
62
|
-
|
|
63
|
-
if (cursor === null)
|
|
56
|
+
if (after !== undefined && !CHANGE.test(after))
|
|
64
57
|
return null;
|
|
65
58
|
asks.push({
|
|
66
59
|
conversation_id: conversation,
|
|
67
|
-
...(
|
|
60
|
+
...(after === undefined ? {} : { after: Number(after) }),
|
|
68
61
|
});
|
|
69
62
|
}
|
|
70
63
|
return asks;
|
|
@@ -79,12 +72,12 @@ export async function houseHistory(transport, request) {
|
|
|
79
72
|
return outcome;
|
|
80
73
|
const answered = record(outcome.result).histories;
|
|
81
74
|
if (!Array.isArray(answered))
|
|
82
|
-
return
|
|
75
|
+
return unusable();
|
|
83
76
|
const histories = [];
|
|
84
77
|
for (const entry of answered) {
|
|
85
78
|
const page = historyPage(entry);
|
|
86
79
|
if (page === null)
|
|
87
|
-
return
|
|
80
|
+
return unusable();
|
|
88
81
|
histories.push(page);
|
|
89
82
|
}
|
|
90
83
|
const result = { histories };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +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
|
+
export { answeredFailure } from './refusal.js';
|
|
7
|
+
export { answering, documentEntry, kept, type Answered, type HouseManifestFile } from './read.js';
|
|
6
8
|
export { houseParts, type ChangeMapping } from './write.js';
|
|
7
|
-
export {
|
|
8
|
-
export { admittedPath, APP_PREFERENCES_HOME, AUTHORED_SEGMENT, AUTHORED_SEGMENT_MAX_CHARS, GENERATED_PROVENANCE, GENERATED_REVISIONS, LOCAL_COPY_MANIFEST, LOCAL_COPY_ROOT_NAMES, RESERVED_DERIVED, WHOLE_ESCAPED_NAMES, } from './authored-path.js';
|
|
9
|
-
export { HOUSE_MODEL_DECLARATION, HOUSE_MODEL_TYPES, HOUSE_TYPED_PATHS, type HouseDocumentFields, type HouseModelType, } from './house-model.js';
|
|
10
|
-
export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
|
|
11
|
-
export { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, type InboxChannelKind, } from './room-types.js';
|
|
9
|
+
export { admittedPath, AUTHORED_SEGMENT, AUTHORED_SEGMENT_MAX_CHARS, GENERATED_PROVENANCE, GENERATED_REVISIONS, LOCAL_COPY_MANIFEST, LOCAL_COPY_ROOT_NAMES, RESERVED_DERIVED, WHOLE_ESCAPED_NAMES, } from './authored-path.js';
|
|
12
10
|
export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, type HouseRuntimeAct, type HouseRuntimeFrame, } from './transport.js';
|
|
13
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,gBAAgB,EAChB,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,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,12 +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
|
+
export { answeredFailure } from './refusal.js';
|
|
7
|
+
export { answering, documentEntry, kept } from './read.js';
|
|
6
8
|
export { houseParts } from './write.js';
|
|
7
|
-
export {
|
|
8
|
-
export { admittedPath, APP_PREFERENCES_HOME, AUTHORED_SEGMENT, AUTHORED_SEGMENT_MAX_CHARS, GENERATED_PROVENANCE, GENERATED_REVISIONS, LOCAL_COPY_MANIFEST, LOCAL_COPY_ROOT_NAMES, RESERVED_DERIVED, WHOLE_ESCAPED_NAMES, } from './authored-path.js';
|
|
9
|
-
export { HOUSE_MODEL_DECLARATION, HOUSE_MODEL_TYPES, HOUSE_TYPED_PATHS, } from './house-model.js';
|
|
10
|
-
export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
|
|
11
|
-
export { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, } from './room-types.js';
|
|
9
|
+
export { admittedPath, AUTHORED_SEGMENT, AUTHORED_SEGMENT_MAX_CHARS, GENERATED_PROVENANCE, GENERATED_REVISIONS, LOCAL_COPY_MANIFEST, LOCAL_COPY_ROOT_NAMES, RESERVED_DERIVED, WHOLE_ESCAPED_NAMES, } from './authored-path.js';
|
|
12
10
|
export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, } 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>;
|