@agentshouse/mdruntime-adapter 0.1.0-c05dbdfc6acd9 → 0.1.0-c068fdf374af0
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 +120 -9
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +6 -52
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +80 -139
- package/dist/discovery.d.ts +3 -3
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +8 -9
- package/dist/gather.d.ts +0 -1
- package/dist/gather.d.ts.map +1 -1
- package/dist/gather.js +1 -1
- package/dist/house-model.d.ts +2938 -1
- package/dist/house-model.d.ts.map +1 -1
- package/dist/house-model.js +1618 -484
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/model.d.ts +2 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/part.d.ts +11 -12
- package/dist/part.d.ts.map +1 -1
- package/dist/part.js +63 -55
- package/dist/read.d.ts +10 -15
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +35 -47
- package/dist/room-stream.d.ts +19 -0
- package/dist/room-stream.d.ts.map +1 -0
- package/dist/room-stream.js +57 -0
- package/dist/room-types.d.ts +1 -1
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +2 -0
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +33 -77
- package/dist/stream.d.ts +3 -6
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +37 -287
- package/dist/transport.d.ts +13 -20
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +1 -0
- package/dist/write.d.ts +4 -0
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +10 -2
- package/package.json +2 -2
package/dist/discovery.js
CHANGED
|
@@ -2,6 +2,7 @@ import { declaredActions, houseConversationAgents, SITE_SUBMIT } from './actions
|
|
|
2
2
|
import { readPosition, roomVersion } from './version.js';
|
|
3
3
|
export const PROVIDER_ACTIONS = 'provider-actions';
|
|
4
4
|
export const DISCOVER_PREFIXES = ['/'];
|
|
5
|
+
const PRIVATE_HANDLE = 'private';
|
|
5
6
|
const BOUND_KEYS = [
|
|
6
7
|
'max_authored_file_bytes',
|
|
7
8
|
'max_batch_operations',
|
|
@@ -18,7 +19,7 @@ const BOUND_KEYS = [
|
|
|
18
19
|
'operation_retention_seconds',
|
|
19
20
|
];
|
|
20
21
|
const OPERATION_KEYS = ['write', 'delete'];
|
|
21
|
-
const
|
|
22
|
+
const ACCESS_LEVELS = ['search', 'open', 'keep'];
|
|
22
23
|
function stringList(value) {
|
|
23
24
|
if (!Array.isArray(value))
|
|
24
25
|
return null;
|
|
@@ -86,11 +87,11 @@ function parseAuthority(value) {
|
|
|
86
87
|
const typedSelection = parseTypedSelection(held.typed_selection);
|
|
87
88
|
const protectedPaths = stringList(held.protected_paths);
|
|
88
89
|
const operations = parseOperations(held.operations);
|
|
89
|
-
const
|
|
90
|
+
const level = ACCESS_LEVELS.find((one) => one === held.level);
|
|
90
91
|
if (at === null ||
|
|
91
92
|
typedSelection === undefined ||
|
|
92
93
|
protectedPaths === null ||
|
|
93
|
-
|
|
94
|
+
level === undefined ||
|
|
94
95
|
operations === null)
|
|
95
96
|
return null;
|
|
96
97
|
if (typeof held.room_ref !== 'string' || held.room_ref.length === 0)
|
|
@@ -105,7 +106,7 @@ function parseAuthority(value) {
|
|
|
105
106
|
typedSelection,
|
|
106
107
|
managedReplication: held.managed_replication,
|
|
107
108
|
protectedPaths,
|
|
108
|
-
|
|
109
|
+
level,
|
|
109
110
|
operations,
|
|
110
111
|
...at,
|
|
111
112
|
};
|
|
@@ -220,14 +221,12 @@ export function declaredRetention(bounds) {
|
|
|
220
221
|
};
|
|
221
222
|
}
|
|
222
223
|
export function capabilities(actions, rooms) {
|
|
223
|
-
const
|
|
224
|
+
const own = rooms.find((room) => room.handle === PRIVATE_HANDLE);
|
|
224
225
|
return [
|
|
225
226
|
{
|
|
226
227
|
name: PROVIDER_ACTIONS,
|
|
227
228
|
actions: declaredActions(actions),
|
|
228
|
-
...(
|
|
229
|
-
? {}
|
|
230
|
-
: { conversationAgents: houseConversationAgents(house.authority) }),
|
|
229
|
+
...(own === undefined ? {} : { conversationAgents: houseConversationAgents(own.authority) }),
|
|
231
230
|
},
|
|
232
231
|
];
|
|
233
232
|
}
|
|
@@ -253,7 +252,7 @@ export function discoveredRoom(authority) {
|
|
|
253
252
|
replica: {
|
|
254
253
|
selection: locator,
|
|
255
254
|
admission: authority.managedReplication,
|
|
256
|
-
offline: authority.
|
|
255
|
+
offline: authority.level === 'open' ? 'locked' : 'open',
|
|
257
256
|
},
|
|
258
257
|
...(authority.typedSelection === null
|
|
259
258
|
? {}
|
package/dist/gather.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare function gatheredEach<A, R>(send: (asks: readonly A[], answer: (ask: number, result: R) => void) => Promise<void>): (ask: A) => Promise<R>;
|
|
2
1
|
export declare function gathered<A, R>(send: (asks: readonly A[]) => Promise<readonly R[]>): (ask: A) => Promise<R>;
|
|
3
2
|
export declare function selections<T>(items: readonly T[], limit: number): readonly (readonly T[])[];
|
|
4
3
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"gather.d.ts","sourceRoot":"","sources":["../src/gather.ts"],"names":[],"mappings":"AAkCA,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,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAO3F"}
|
package/dist/gather.js
CHANGED