@agentshouse/mdruntime-adapter 0.1.0-cc63dd043d0e2 → 0.1.0-cc710a8825617
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 +270 -183
- package/README.md +3 -3
- package/dist/actions.d.ts +63 -2
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +154 -138
- package/dist/adapter.d.ts +1 -0
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +325 -166
- package/dist/discovery.d.ts +6 -12
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +32 -36
- package/dist/gather.d.ts +1 -0
- package/dist/gather.d.ts.map +1 -1
- package/dist/gather.js +11 -6
- package/dist/handed.d.ts +15 -0
- package/dist/handed.d.ts.map +1 -0
- package/dist/handed.js +38 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/model.d.ts +7 -18
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +60 -39
- package/dist/read.d.ts +35 -7
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +164 -86
- package/dist/referrer.d.ts +7 -0
- package/dist/referrer.d.ts.map +1 -0
- package/dist/referrer.js +35 -0
- package/dist/refusal.d.ts +5 -9
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +31 -17
- package/dist/site.d.ts +1 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +191 -107
- package/dist/stream.d.ts +10 -4
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +391 -47
- package/dist/transport.d.ts +79 -11
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +3 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +10 -1
- package/dist/write.d.ts +2 -1
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +96 -14
- package/package.json +3 -4
- package/dist/links.d.ts +0 -12
- package/dist/links.d.ts.map +0 -1
- package/dist/links.js +0 -66
package/dist/discovery.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import type { Capability, DiscoveredRoom, Discovery,
|
|
1
|
+
import type { Capability, DiscoveredRoom, Discovery, Member, ProviderLimit, Retention } from '@agentshouse/mdruntime';
|
|
2
2
|
import { type LogPosition } from './version.js';
|
|
3
|
-
export declare const ROOM_CONTRACT_VERSION = 1;
|
|
4
|
-
export declare const MD_MODEL_IDENTITY = "@agentshouse/mdmodel";
|
|
5
|
-
export declare const ROOM_VERSION_NOTIFICATIONS = "room-version-notifications";
|
|
6
3
|
export declare const PROVIDER_ACTIONS = "provider-actions";
|
|
7
|
-
export declare const MOVE_REFERENCE_REWRITES = "move-reference-rewrites";
|
|
8
4
|
export declare const DISCOVER_PREFIXES: readonly string[];
|
|
9
|
-
export declare const PRIVATE_HANDLE = "private";
|
|
10
5
|
export type HouseBounds = {
|
|
11
6
|
max_authored_file_bytes: number;
|
|
12
7
|
max_batch_operations: number;
|
|
@@ -18,6 +13,7 @@ export type HouseBounds = {
|
|
|
18
13
|
max_inline_body_bytes: number;
|
|
19
14
|
max_upload_bytes: number;
|
|
20
15
|
max_prefixes: number;
|
|
16
|
+
max_held_files: number;
|
|
21
17
|
change_retention_seconds: number;
|
|
22
18
|
operation_retention_seconds: number;
|
|
23
19
|
};
|
|
@@ -42,8 +38,8 @@ export type HouseAuthority = LogPosition & {
|
|
|
42
38
|
operations: HouseOperations;
|
|
43
39
|
};
|
|
44
40
|
export type HouseDiscoveryDocument = {
|
|
41
|
+
member: Member;
|
|
45
42
|
bounds: HouseBounds;
|
|
46
|
-
mdModelVersion: string;
|
|
47
43
|
authorities: readonly HouseAuthority[];
|
|
48
44
|
actions: readonly string[];
|
|
49
45
|
};
|
|
@@ -62,18 +58,16 @@ export type HouseSiteAuthority = LogPosition & {
|
|
|
62
58
|
};
|
|
63
59
|
export type HouseSiteDiscovery = {
|
|
64
60
|
bounds: HouseBounds;
|
|
65
|
-
mdModelVersion: string;
|
|
66
61
|
authorities: readonly HouseSiteAuthority[];
|
|
67
62
|
};
|
|
68
63
|
export declare function parseDiscovery(body: unknown): HouseDiscoveryDocument | null;
|
|
69
64
|
export declare function parseSiteDiscovery(body: unknown): HouseSiteDiscovery | null;
|
|
70
65
|
export declare function siteTracked(document: HouseSiteDiscovery): TrackedAuthority[];
|
|
71
|
-
export declare function locatorOf(authority: HouseAuthority): string;
|
|
72
66
|
export declare function trackedFrom(document: HouseDiscoveryDocument): TrackedAuthority[];
|
|
73
67
|
export declare function providerLimits(bounds: HouseBounds): readonly ProviderLimit[];
|
|
74
68
|
export declare function declaredRetention(bounds: HouseBounds): Retention;
|
|
75
|
-
export declare function capabilities(
|
|
69
|
+
export declare function capabilities(document: HouseDiscoveryDocument): readonly Capability[];
|
|
76
70
|
export declare function siteCapabilities(): readonly Capability[];
|
|
77
|
-
export declare function discoveredRoom(authority: HouseAuthority
|
|
78
|
-
export declare function mapDiscovery(document: Pick<HouseDiscoveryDocument, 'bounds'
|
|
71
|
+
export declare function discoveredRoom(authority: HouseAuthority): DiscoveredRoom;
|
|
72
|
+
export declare function mapDiscovery(document: Pick<HouseDiscoveryDocument, 'bounds'>, rooms: readonly DiscoveredRoom[], declared: readonly Capability[]): Discovery;
|
|
79
73
|
//# sourceMappingURL=discovery.d.ts.map
|
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,EACT,
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACT,MAAM,EACN,aAAa,EACb,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAA6B,KAAK,WAAW,EAA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AAS,UAAU,EAAE,CAWpF;AAED,wBAAgB,gBAAgB,IAAI,SAAS,UAAU,EAAE,CAOxD;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,CAmBxE;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC,EAChD,KAAK,EAAE,SAAS,cAAc,EAAE,EAChC,QAAQ,EAAE,SAAS,UAAU,EAAE,GAC9B,SAAS,CAQX"}
|
package/dist/discovery.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { declaredActions,
|
|
2
|
-
import { PRIVATE_LOCATOR } from './transport.js';
|
|
1
|
+
import { declaredActions, houseConversationAgents, SITE_SUBMIT } from './actions.js';
|
|
3
2
|
import { readPosition, roomVersion } from './version.js';
|
|
4
|
-
export const ROOM_CONTRACT_VERSION = 1;
|
|
5
|
-
export const MD_MODEL_IDENTITY = '@agentshouse/mdmodel';
|
|
6
|
-
export const ROOM_VERSION_NOTIFICATIONS = 'room-version-notifications';
|
|
7
3
|
export const PROVIDER_ACTIONS = 'provider-actions';
|
|
8
|
-
export const MOVE_REFERENCE_REWRITES = 'move-reference-rewrites';
|
|
9
4
|
export const DISCOVER_PREFIXES = ['/'];
|
|
10
|
-
export const PRIVATE_HANDLE = 'private';
|
|
11
5
|
const BOUND_KEYS = [
|
|
12
6
|
'max_authored_file_bytes',
|
|
13
7
|
'max_batch_operations',
|
|
@@ -19,6 +13,7 @@ const BOUND_KEYS = [
|
|
|
19
13
|
'max_inline_body_bytes',
|
|
20
14
|
'max_upload_bytes',
|
|
21
15
|
'max_prefixes',
|
|
16
|
+
'max_held_files',
|
|
22
17
|
'change_retention_seconds',
|
|
23
18
|
'operation_retention_seconds',
|
|
24
19
|
];
|
|
@@ -52,6 +47,14 @@ function parseHouseModel(value) {
|
|
|
52
47
|
return undefined;
|
|
53
48
|
return { root: held.root, paths };
|
|
54
49
|
}
|
|
50
|
+
function parseMember(value) {
|
|
51
|
+
if (typeof value !== 'object' || value === null)
|
|
52
|
+
return null;
|
|
53
|
+
const { user, name } = value;
|
|
54
|
+
if (typeof user !== 'string' || typeof name !== 'string')
|
|
55
|
+
return null;
|
|
56
|
+
return { kind: 'user', id: user, name };
|
|
57
|
+
}
|
|
55
58
|
function parseOperations(value) {
|
|
56
59
|
if (typeof value !== 'object' || value === null)
|
|
57
60
|
return null;
|
|
@@ -104,11 +107,12 @@ export function parseDiscovery(body) {
|
|
|
104
107
|
if (typeof body !== 'object' || body === null)
|
|
105
108
|
return null;
|
|
106
109
|
const held = body;
|
|
110
|
+
const member = parseMember(held.member);
|
|
111
|
+
if (member === null)
|
|
112
|
+
return null;
|
|
107
113
|
const bounds = parseBounds(held.bounds);
|
|
108
114
|
if (bounds === null)
|
|
109
115
|
return null;
|
|
110
|
-
if (typeof held.md_model_version !== 'string' || held.md_model_version.length === 0)
|
|
111
|
-
return null;
|
|
112
116
|
const actions = stringList(held.actions);
|
|
113
117
|
if (actions === null ||
|
|
114
118
|
new Set(actions).size !== actions.length ||
|
|
@@ -123,7 +127,7 @@ export function parseDiscovery(body) {
|
|
|
123
127
|
return null;
|
|
124
128
|
authorities.push(authority);
|
|
125
129
|
}
|
|
126
|
-
return {
|
|
130
|
+
return { member, bounds, authorities, actions };
|
|
127
131
|
}
|
|
128
132
|
function parseSiteAuthority(value) {
|
|
129
133
|
if (typeof value !== 'object' || value === null)
|
|
@@ -154,8 +158,6 @@ export function parseSiteDiscovery(body) {
|
|
|
154
158
|
const bounds = parseBounds(held.bounds);
|
|
155
159
|
if (bounds === null)
|
|
156
160
|
return null;
|
|
157
|
-
if (typeof held.md_model_version !== 'string' || held.md_model_version.length === 0)
|
|
158
|
-
return null;
|
|
159
161
|
if (!Array.isArray(held.authorities))
|
|
160
162
|
return null;
|
|
161
163
|
const authorities = [];
|
|
@@ -165,7 +167,7 @@ export function parseSiteDiscovery(body) {
|
|
|
165
167
|
return null;
|
|
166
168
|
authorities.push(authority);
|
|
167
169
|
}
|
|
168
|
-
return { bounds,
|
|
170
|
+
return { bounds, authorities };
|
|
169
171
|
}
|
|
170
172
|
export function siteTracked(document) {
|
|
171
173
|
return document.authorities.map((authority) => ({
|
|
@@ -179,9 +181,6 @@ export function siteTracked(document) {
|
|
|
179
181
|
logEpoch: authority.logEpoch,
|
|
180
182
|
}));
|
|
181
183
|
}
|
|
182
|
-
export function locatorOf(authority) {
|
|
183
|
-
return authority.roomHandle === PRIVATE_HANDLE ? PRIVATE_LOCATOR : authority.roomRef;
|
|
184
|
-
}
|
|
185
184
|
function schemasOf(authority) {
|
|
186
185
|
return authority.houseModel === null
|
|
187
186
|
? [authority.schema]
|
|
@@ -189,7 +188,7 @@ function schemasOf(authority) {
|
|
|
189
188
|
}
|
|
190
189
|
export function trackedFrom(document) {
|
|
191
190
|
return document.authorities.map((authority) => ({
|
|
192
|
-
locator:
|
|
191
|
+
locator: authority.roomRef,
|
|
193
192
|
authority: authority.roomRef,
|
|
194
193
|
handle: authority.roomHandle,
|
|
195
194
|
schema: authority.schema,
|
|
@@ -217,27 +216,32 @@ export function declaredRetention(bounds) {
|
|
|
217
216
|
refreshHorizon: bounds.change_retention_seconds,
|
|
218
217
|
};
|
|
219
218
|
}
|
|
220
|
-
export function capabilities(
|
|
219
|
+
export function capabilities(document) {
|
|
220
|
+
const house = document.authorities.find((authority) => authority.houseModel !== null);
|
|
221
221
|
return [
|
|
222
|
-
{ name: ROOM_VERSION_NOTIFICATIONS },
|
|
223
222
|
{
|
|
224
223
|
name: PROVIDER_ACTIONS,
|
|
225
|
-
actions: declaredActions(actions),
|
|
226
|
-
|
|
224
|
+
actions: declaredActions(document.actions),
|
|
225
|
+
...(house === undefined
|
|
226
|
+
? {}
|
|
227
|
+
: { conversationAgents: houseConversationAgents(house.roomRef) }),
|
|
227
228
|
},
|
|
228
|
-
{ name: MOVE_REFERENCE_REWRITES },
|
|
229
229
|
];
|
|
230
230
|
}
|
|
231
231
|
export function siteCapabilities() {
|
|
232
232
|
return [
|
|
233
|
-
{
|
|
234
|
-
|
|
233
|
+
{
|
|
234
|
+
name: PROVIDER_ACTIONS,
|
|
235
|
+
actions: [{ name: SITE_SUBMIT, inputShape: {}, resultKind: 'house' }],
|
|
236
|
+
},
|
|
235
237
|
];
|
|
236
238
|
}
|
|
237
|
-
export function discoveredRoom(authority
|
|
239
|
+
export function discoveredRoom(authority) {
|
|
240
|
+
const locator = authority.roomRef;
|
|
238
241
|
return {
|
|
239
242
|
name: authority.name,
|
|
240
|
-
locator
|
|
243
|
+
locator,
|
|
244
|
+
handle: authority.roomHandle,
|
|
241
245
|
roomVersion: roomVersion(authority),
|
|
242
246
|
operations: {
|
|
243
247
|
read: [...authority.operations.read],
|
|
@@ -245,24 +249,16 @@ export function discoveredRoom(authority, attachedModel, selectionModel) {
|
|
|
245
249
|
write: [...authority.operations.write],
|
|
246
250
|
delete: [...authority.operations.delete],
|
|
247
251
|
},
|
|
248
|
-
replica: { selection:
|
|
249
|
-
attachedModel,
|
|
252
|
+
replica: { selection: locator, admission: authority.managedReplication },
|
|
250
253
|
...(authority.houseModel === null
|
|
251
254
|
? {}
|
|
252
|
-
: {
|
|
253
|
-
typedSelection: {
|
|
254
|
-
roots: [...authority.houseModel.paths],
|
|
255
|
-
attachedModel: selectionModel,
|
|
256
|
-
},
|
|
257
|
-
}),
|
|
255
|
+
: { typedSelection: { roots: [...authority.houseModel.paths] } }),
|
|
258
256
|
providerOwnedPaths: [...authority.protectedPaths, ...schemasOf(authority)],
|
|
259
257
|
};
|
|
260
258
|
}
|
|
261
259
|
export function mapDiscovery(document, rooms, declared) {
|
|
262
260
|
return {
|
|
263
261
|
kind: 'discovery',
|
|
264
|
-
supportedVersions: [ROOM_CONTRACT_VERSION],
|
|
265
|
-
mdModel: { identity: MD_MODEL_IDENTITY, version: document.mdModelVersion },
|
|
266
262
|
rooms,
|
|
267
263
|
capabilities: declared,
|
|
268
264
|
providerLimits: providerLimits(document.bounds),
|
package/dist/gather.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare function gatheredEach<A, R>(send: (asks: readonly A[], answer: (ask: number, result: R) => void) => Promise<void>): (ask: A) => Promise<R>;
|
|
1
2
|
export declare function gathered<A, R>(send: (asks: readonly A[]) => Promise<readonly R[]>): (ask: A) => Promise<R>;
|
|
2
3
|
export declare function selections<T>(items: readonly T[], weight: (item: T) => number, limit: number): readonly (readonly T[])[];
|
|
3
4
|
//# sourceMappingURL=gather.d.ts.map
|
package/dist/gather.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gather.d.ts","sourceRoot":"","sources":["../src/gather.ts"],"names":[],"mappings":"AAMA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAC3B,IAAI,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,KAAK,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,GAClD,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"gather.d.ts","sourceRoot":"","sources":["../src/gather.ts"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,IAAI,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,GACpF,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAwBxB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAC3B,IAAI,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,KAAK,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,GAClD,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAMxB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAC1B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,EAC3B,KAAK,EAAE,MAAM,GACZ,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAgB3B"}
|
package/dist/gather.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function gatheredEach(send) {
|
|
2
2
|
let held = [];
|
|
3
3
|
function flush() {
|
|
4
4
|
const taken = held;
|
|
5
5
|
held = [];
|
|
6
|
-
send(taken.map((entry) => entry.ask)
|
|
7
|
-
taken
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
}, (reason) => {
|
|
6
|
+
send(taken.map((entry) => entry.ask), (ask, result) => {
|
|
7
|
+
taken[ask]?.resolve(result);
|
|
8
|
+
}).catch((reason) => {
|
|
11
9
|
for (const entry of taken)
|
|
12
10
|
entry.reject(reason);
|
|
13
11
|
});
|
|
@@ -20,6 +18,13 @@ export function gathered(send) {
|
|
|
20
18
|
held.push({ ask, resolve, reject });
|
|
21
19
|
});
|
|
22
20
|
}
|
|
21
|
+
export function gathered(send) {
|
|
22
|
+
return gatheredEach(async (asks, answer) => {
|
|
23
|
+
(await send(asks)).forEach((result, ask) => {
|
|
24
|
+
answer(ask, result);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
23
28
|
export function selections(items, weight, limit) {
|
|
24
29
|
const parts = [];
|
|
25
30
|
let part = [];
|
package/dist/handed.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HeldRoom, MutationResult } from '@agentshouse/mdruntime';
|
|
2
|
+
import type { HouseScope, HouseView } from './read.js';
|
|
3
|
+
import type { StreamedAdvancement } from './stream.js';
|
|
4
|
+
export type HandedRoom = {
|
|
5
|
+
roomVersion: string;
|
|
6
|
+
revisions: ReadonlyMap<string, string>;
|
|
7
|
+
};
|
|
8
|
+
export declare function scopeHanded(scope: HouseScope): HandedRoom;
|
|
9
|
+
export declare function heldHanded(held: HeldRoom): HandedRoom;
|
|
10
|
+
export declare function acceptedHanded(held: HandedRoom, accepted: Extract<MutationResult, {
|
|
11
|
+
kind: 'accepted';
|
|
12
|
+
}>, roomVersion: string): HandedRoom;
|
|
13
|
+
export declare function enumeratedHanded(view: HouseView, earlier: HandedRoom | undefined): HandedRoom;
|
|
14
|
+
export declare function streamedHanded(held: HandedRoom, advanced: StreamedAdvancement): HandedRoom;
|
|
15
|
+
//# sourceMappingURL=handed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handed.d.ts","sourceRoot":"","sources":["../src/handed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CASzD;AAOD,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,CAErD;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,OAAO,CAAC,cAAc,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,EACvD,WAAW,EAAE,MAAM,GAClB,UAAU,CAKZ;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAM7F;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,mBAAmB,GAAG,UAAU,CAM1F"}
|
package/dist/handed.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { roomVersion } from './version.js';
|
|
2
|
+
export function scopeHanded(scope) {
|
|
3
|
+
return {
|
|
4
|
+
roomVersion: roomVersion(scope),
|
|
5
|
+
revisions: new Map(scope.files.flatMap(({ path, revision }) => revision === undefined ? [] : [[path, revision]])),
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function revised(revisions, path, revision) {
|
|
9
|
+
if (revision === undefined)
|
|
10
|
+
revisions.delete(path);
|
|
11
|
+
else
|
|
12
|
+
revisions.set(path, revision);
|
|
13
|
+
}
|
|
14
|
+
export function heldHanded(held) {
|
|
15
|
+
return { roomVersion: held.roomVersion, revisions: new Map(Object.entries(held.revisions)) };
|
|
16
|
+
}
|
|
17
|
+
export function acceptedHanded(held, accepted, roomVersion) {
|
|
18
|
+
const revisions = new Map(held.revisions);
|
|
19
|
+
for (const [path, revision] of Object.entries(accepted.revisions))
|
|
20
|
+
revisions.set(path, revision);
|
|
21
|
+
for (const path of accepted.removals)
|
|
22
|
+
revisions.delete(path);
|
|
23
|
+
return { roomVersion, revisions };
|
|
24
|
+
}
|
|
25
|
+
export function enumeratedHanded(view, earlier) {
|
|
26
|
+
const revisions = new Map(earlier?.revisions);
|
|
27
|
+
for (const change of view.changes) {
|
|
28
|
+
revised(revisions, change.path, 'removed' in change ? undefined : change.revision);
|
|
29
|
+
}
|
|
30
|
+
return { roomVersion: roomVersion(view), revisions };
|
|
31
|
+
}
|
|
32
|
+
export function streamedHanded(held, advanced) {
|
|
33
|
+
const revisions = new Map(held.revisions);
|
|
34
|
+
for (const entry of advanced.entries) {
|
|
35
|
+
revised(revisions, entry.path, entry.kind === 'removed' ? undefined : entry.revision);
|
|
36
|
+
}
|
|
37
|
+
return { roomVersion: advanced.page.roomVersion, revisions };
|
|
38
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter, type AgentsHouseAdapterOptions } from './adapter.js';
|
|
2
|
-
export {
|
|
3
|
-
export type { HouseByteAct,
|
|
2
|
+
export { HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS } from './actions.js';
|
|
3
|
+
export type { HouseByteAct, HouseByteTransfer, HouseBytesAnswer, HouseDemand, HouseDoorAnswer, HouseHeldRoom, HouseOpening, HouseStream, HouseStreamEntry, HouseStreamFrame, HouseSiteTransport, HouseTransport, } from './transport.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
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,eAAe,EAAE,MAAM,
|
|
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,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,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,2 +1,2 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter } from './adapter.js';
|
|
2
|
-
export {
|
|
2
|
+
export { HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS } from './actions.js';
|
package/dist/model.d.ts
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
export declare function failedModel(failure: AdapterFailure | {
|
|
9
|
-
kind: 'beyond-horizon';
|
|
10
|
-
}): ModelResult;
|
|
11
|
-
export declare function modelKey(locator: string, attached: ModelRequest['attached']): string;
|
|
12
|
-
export declare function heldModel(read: HouseSchema | null, identity: string, failure: ModelResult): Promise<HeldModel>;
|
|
13
|
-
export type ModelShelf = {
|
|
14
|
-
retain(key: string, acquired: HeldModel | undefined): HeldModel | undefined;
|
|
15
|
-
answer(request: ModelRequest): ModelResult;
|
|
16
|
-
keep(locators: readonly string[]): void;
|
|
17
|
-
};
|
|
18
|
-
export declare function modelShelf(): ModelShelf;
|
|
1
|
+
import type { RoomModels } from '@agentshouse/mdruntime';
|
|
2
|
+
import type { TrackedAuthority } from './discovery.js';
|
|
3
|
+
import { type HouseScope, type HouseView } from './read.js';
|
|
4
|
+
import type { HouseMode, HouseStreamEntry } from './transport.js';
|
|
5
|
+
export declare function partModels(scope: HouseScope, tracked: TrackedAuthority, seen: ReadonlySet<string>, final: boolean): Promise<RoomModels | undefined>;
|
|
6
|
+
export declare function viewModels(view: HouseView, tracked: TrackedAuthority): Promise<RoomModels | undefined>;
|
|
7
|
+
export declare function streamedModels(schemas: ReadonlyMap<string, HouseStreamEntry>, tracked: TrackedAuthority, mode: HouseMode): Promise<RoomModels | undefined>;
|
|
19
8
|
//# sourceMappingURL=model.d.ts.map
|
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,
|
|
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,EAA0C,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACpG,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAoClE,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EACzB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAKjC;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAcjC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC9C,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAWjC"}
|
package/dist/model.js
CHANGED
|
@@ -1,46 +1,67 @@
|
|
|
1
1
|
import { sha256Hex } from './digest.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (failure.kind === 'transport-uncertainty')
|
|
7
|
-
return { kind: 'transport-uncertainty' };
|
|
8
|
-
return MODEL_ABSENT;
|
|
9
|
-
}
|
|
10
|
-
export function modelKey(locator, attached) {
|
|
11
|
-
return `${locator} ${attached}`;
|
|
12
|
-
}
|
|
13
|
-
export async function heldModel(read, identity, failure) {
|
|
2
|
+
import { schemaOf, schemaPath } from './read.js';
|
|
3
|
+
const MODEL_ABSENT = { kind: 'model-unavailable', reason: 'not-readable' };
|
|
4
|
+
const ABSENT_SCHEMA = { schema: null, version: null, revision: null };
|
|
5
|
+
async function heldModel(read, identity) {
|
|
14
6
|
if (read === null)
|
|
15
|
-
return
|
|
7
|
+
return MODEL_ABSENT;
|
|
16
8
|
const version = await sha256Hex(JSON.stringify(read.version));
|
|
17
9
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
kind: 'model',
|
|
11
|
+
snapshot: { identity, version, schema: read.schema, revision: read.revision },
|
|
20
12
|
};
|
|
21
13
|
}
|
|
22
|
-
|
|
23
|
-
const models =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
14
|
+
async function modelsOf(tracked, read) {
|
|
15
|
+
const models = {};
|
|
16
|
+
const collection = read(tracked.schema);
|
|
17
|
+
if (collection !== undefined) {
|
|
18
|
+
models.collection = await heldModel(collection, schemaPath(tracked.handle, tracked.schema));
|
|
19
|
+
}
|
|
20
|
+
if (tracked.houseModel !== null) {
|
|
21
|
+
const root = tracked.houseModel.root;
|
|
22
|
+
const selection = read(root);
|
|
23
|
+
if (selection !== undefined) {
|
|
24
|
+
models.selection = await heldModel(selection, schemaPath(tracked.handle, root));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return models.collection === undefined && models.selection === undefined ? undefined : models;
|
|
28
|
+
}
|
|
29
|
+
export function partModels(scope, tracked, seen, final) {
|
|
30
|
+
return modelsOf(tracked, (schema) => {
|
|
31
|
+
if (scope.files.some((file) => file.path === schema))
|
|
32
|
+
return schemaOf(scope, schema);
|
|
33
|
+
return final && !seen.has(schema) ? ABSENT_SCHEMA : undefined;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export function viewModels(view, tracked) {
|
|
37
|
+
return modelsOf(tracked, (schema) => {
|
|
38
|
+
const change = view.changes.find((candidate) => candidate.path === schema);
|
|
39
|
+
if (change === undefined)
|
|
40
|
+
return undefined;
|
|
41
|
+
if ('removed' in change)
|
|
42
|
+
return ABSENT_SCHEMA;
|
|
43
|
+
if ('content' in change) {
|
|
44
|
+
return {
|
|
45
|
+
schema: change.content,
|
|
46
|
+
version: change.version,
|
|
47
|
+
revision: change.revision ?? null,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export function streamedModels(schemas, tracked, mode) {
|
|
54
|
+
return modelsOf(tracked, (schema) => {
|
|
55
|
+
const entry = schemas.get(schema);
|
|
56
|
+
if (entry === undefined)
|
|
57
|
+
return undefined;
|
|
58
|
+
if (entry.kind === 'removed')
|
|
59
|
+
return ABSENT_SCHEMA;
|
|
60
|
+
if (entry.text === undefined)
|
|
61
|
+
return null;
|
|
62
|
+
const version = mode === 'site' ? entry.sha256 : entry.revision;
|
|
63
|
+
return version === undefined
|
|
64
|
+
? null
|
|
65
|
+
: { schema: entry.text, version, revision: mode === 'site' ? null : version };
|
|
66
|
+
});
|
|
46
67
|
}
|
package/dist/read.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import type { BootstrapPage, RefreshResult
|
|
1
|
+
import type { AdapterFailure, BinaryFile, BootstrapPage, RefreshResult } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
3
3
|
import type { HouseMode } from './transport.js';
|
|
4
4
|
import { type LogPosition } from './version.js';
|
|
5
5
|
export type HeadChange = BootstrapPage['changes'][string];
|
|
6
|
+
export declare function identities(revisions: Readonly<Record<string, string>>): {
|
|
7
|
+
fileIds?: Record<string, string>;
|
|
8
|
+
};
|
|
6
9
|
export type HouseManifestFile = {
|
|
7
10
|
path: string;
|
|
8
11
|
revision: string | undefined;
|
|
9
12
|
version: string;
|
|
13
|
+
sha256?: string;
|
|
10
14
|
head?: HeadChange;
|
|
15
|
+
binary?: BinaryFile;
|
|
11
16
|
};
|
|
12
17
|
export type HouseContent = {
|
|
13
18
|
path: string;
|
|
@@ -17,10 +22,19 @@ export type HouseScope = LogPosition & {
|
|
|
17
22
|
anchor: string;
|
|
18
23
|
files: readonly HouseManifestFile[];
|
|
19
24
|
contents: readonly HouseContent[];
|
|
20
|
-
|
|
25
|
+
};
|
|
26
|
+
export type HouseCut = {
|
|
27
|
+
position: string;
|
|
28
|
+
log_epoch: string;
|
|
29
|
+
};
|
|
30
|
+
export type HouseCursor = {
|
|
31
|
+
room: string;
|
|
32
|
+
path: string | null;
|
|
33
|
+
cut?: HouseCut;
|
|
21
34
|
};
|
|
22
35
|
export type HouseEnvelope = {
|
|
23
36
|
scopes: readonly HouseScope[];
|
|
37
|
+
next?: HouseCursor;
|
|
24
38
|
};
|
|
25
39
|
export type HouseGrant = {
|
|
26
40
|
method: 'GET';
|
|
@@ -41,14 +55,23 @@ export type HouseChange = {
|
|
|
41
55
|
head?: HeadChange;
|
|
42
56
|
} | {
|
|
43
57
|
path: string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
binary: BinaryFile;
|
|
59
|
+
revision: string | undefined;
|
|
60
|
+
version: string;
|
|
61
|
+
head?: HeadChange;
|
|
62
|
+
};
|
|
63
|
+
export type HousePage = {
|
|
64
|
+
after: string;
|
|
65
|
+
through: string;
|
|
66
|
+
read: number;
|
|
47
67
|
};
|
|
48
68
|
export type HouseView = LogPosition & {
|
|
49
69
|
authority: string;
|
|
50
70
|
changes: readonly HouseChange[];
|
|
51
|
-
|
|
71
|
+
next?: HousePage;
|
|
72
|
+
};
|
|
73
|
+
type PageFailure = AdapterFailure | {
|
|
74
|
+
kind: 'beyond-horizon';
|
|
52
75
|
};
|
|
53
76
|
export type HouseEnumeration = {
|
|
54
77
|
authorities: readonly HouseView[];
|
|
@@ -61,18 +84,23 @@ export declare function headChange(held: {
|
|
|
61
84
|
readonly author?: unknown;
|
|
62
85
|
readonly created_at?: unknown;
|
|
63
86
|
}): HeadChange | undefined | null;
|
|
87
|
+
export declare function binaryFileOf(held: Readonly<Record<string, unknown>>): BinaryFile | undefined | null;
|
|
64
88
|
export declare function parseEnvelope(body: unknown): HouseEnvelope | null;
|
|
65
89
|
export declare function parseSiteBootstrap(body: unknown): HouseScope | null;
|
|
90
|
+
export declare function siteBootstrapNext(body: unknown): string | null;
|
|
91
|
+
export declare function siteBootstrapOffset(body: unknown): number | null;
|
|
66
92
|
export declare function parseEnumeration(body: unknown, mode: HouseMode): HouseEnumeration | null;
|
|
93
|
+
export declare function wholeView(first: HouseView, more: (page: HousePage) => Promise<HouseView | PageFailure>): Promise<HouseView | PageFailure>;
|
|
67
94
|
export declare function advancedScope(scope: HouseScope, view: HouseView): HouseScope;
|
|
68
95
|
export declare function matchesScope(scope: HouseScope, tracked: TrackedAuthority): boolean;
|
|
69
96
|
export declare function bootstrapOf(scope: HouseScope): BootstrapPage;
|
|
70
97
|
export type HouseSchema = {
|
|
71
98
|
schema: string | null;
|
|
72
99
|
version: string | null;
|
|
100
|
+
revision: string | null;
|
|
73
101
|
};
|
|
74
|
-
export declare function schemaFrom(envelope: HouseEnvelope, tracked: TrackedAuthority, schema: string): HouseSchema | null;
|
|
75
102
|
export declare function schemaOf(scope: HouseScope, schema: string): HouseSchema | null;
|
|
76
103
|
export declare function viewOf(enumeration: HouseEnumeration, tracked: TrackedAuthority): HouseView | undefined;
|
|
77
104
|
export declare function refreshFrom(view: HouseView, fromRoomVersion: string): RefreshResult;
|
|
105
|
+
export {};
|
|
78
106
|
//# sourceMappingURL=read.d.ts.map
|
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,KAAK,EACV,aAAa,EAEb,aAAa,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,a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