@agentshouse/mdruntime-adapter 0.1.0-cc63dd043d0e2 → 0.1.0-cca5d676bc88e
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 +24 -8
- package/README.md +3 -3
- package/dist/actions.d.ts +2 -2
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +4 -4
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +67 -101
- package/dist/discovery.d.ts +3 -9
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +9 -27
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/links.d.ts +9 -1
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +40 -2
- package/dist/model.d.ts +7 -18
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +48 -41
- package/dist/read.d.ts +1 -1
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +5 -8
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +38 -72
- package/dist/stream.d.ts +8 -4
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +89 -37
- package/dist/transport.d.ts +31 -1
- package/dist/transport.d.ts.map +1 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +9 -0
- package/dist/write.d.ts +9 -2
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +5 -0
- package/package.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -26,7 +26,11 @@ value whole and returns its unsubscribe, and `close()` ends the observation.
|
|
|
26
26
|
Closing the port ends every handle and rejects every pending call and
|
|
27
27
|
observation; a client that reconnects observes again.
|
|
28
28
|
|
|
29
|
-
Each conversation
|
|
29
|
+
Each conversation the Provider's conversation list names is held complete in the
|
|
30
|
+
browser. `conversation.list()` and `observe('conversations')` answer each with its
|
|
31
|
+
Agent's identity and name, its name, created and finished times, last outcome and live
|
|
32
|
+
`state`: `asking` while a question waits, `working` while a turn runs, else `idle`,
|
|
33
|
+
and `started`, when the running turn began, or `null`.
|
|
30
34
|
Observe one with `observe('conversation', id, { limit })`: the view
|
|
31
35
|
holds its latest `limit` messages, or all of them, oldest first, its chat
|
|
32
36
|
draft, and what the Provider streams for it whether or not anything views it:
|
|
@@ -201,13 +205,25 @@ an App's override respected. What an App Creator's agent adds carries none
|
|
|
201
205
|
of these promises by itself. Reading, querying and searching never wait for
|
|
202
206
|
the network. Data lives only in the App Creator's browser and with the Provider.
|
|
203
207
|
|
|
204
|
-
## App code
|
|
205
|
-
|
|
206
|
-
App code
|
|
207
|
-
`
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
## App code takes the client its host hands it and never constructs a Runtime
|
|
209
|
+
|
|
210
|
+
App code takes the client its host hands it: in House,
|
|
211
|
+
`connectHouseBridge().runtime` from `@agentshouse/app-bridge` resolves to the
|
|
212
|
+
client House built into the page. It never constructs a Runtime or a client.
|
|
213
|
+
It imports only types from `@agentshouse/mdruntime/client`, does not call
|
|
214
|
+
`connectMdRuntime` or `serveMdRuntime`, and does not import the package main,
|
|
215
|
+
the host entry, or the Adapter package. Hosts and tests use those entries; the
|
|
216
|
+
served App does not.
|
|
217
|
+
|
|
218
|
+
A React App may observe and save through `@agentshouse/mdruntime/react`, which
|
|
219
|
+
names React as a peer dependency. `useObserve(client, topic, ...input)` takes
|
|
220
|
+
the arguments of `observe` and returns the topic's current value, `undefined`
|
|
221
|
+
until it arrives, re-rendering on each change; a `null` client observes
|
|
222
|
+
nothing. `useSave(client)` returns `busy`, the last `outcome` or `failure`, and
|
|
223
|
+
`save(room, roomDrafts)`, which writes each Path's parts onto the Room Draft
|
|
224
|
+
already there, keeping the bases its parts have, or onto a new one, and saves
|
|
225
|
+
them together. A refused Save leaves the Room Drafts for the App to save again
|
|
226
|
+
or discard; a failure is recorded and rejects.
|
|
211
227
|
|
|
212
228
|
## What an agent must never do
|
|
213
229
|
|
package/README.md
CHANGED
|
@@ -19,12 +19,12 @@ import { serveMdRuntime } from '@agentshouse/mdruntime/host';
|
|
|
19
19
|
import { createAgentsHouseAdapter } from '@agentshouse/mdruntime-adapter';
|
|
20
20
|
|
|
21
21
|
const adapter = createAgentsHouseAdapter({ transport, authorize });
|
|
22
|
-
const host = serveMdRuntime({ adapter, shell
|
|
22
|
+
const host = serveMdRuntime({ adapter, shell });
|
|
23
23
|
host.attach(port, 'my-app');
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
App code never imports this package; it reaches the Runtime only through
|
|
27
|
-
|
|
26
|
+
App code never imports this package; it reaches the Runtime only through the
|
|
27
|
+
client its host hands it. The rules an App's agent follows are in the
|
|
28
28
|
package's `AGENTS.md`.
|
|
29
29
|
|
|
30
30
|
## License
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AcceptedMessage, type ActionDeclaration, type ActionRequest, type ActionResult, type
|
|
1
|
+
import { type AcceptedMessage, type ActionDeclaration, type ActionRequest, type ActionResult, type ConversationAgents } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { HouseDoorAnswer, HouseTransport } from './transport.js';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const HOUSE_CONVERSATION_AGENTS: ConversationAgents;
|
|
4
4
|
export declare function declaredActions(routes: readonly string[]): readonly ActionDeclaration[];
|
|
5
5
|
export declare function houseAction(transport: HouseTransport, request: ActionRequest): Promise<ActionResult>;
|
|
6
6
|
export declare function actionOutcome(answer: HouseDoorAnswer, name: string): ActionResult;
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAkBtE,eAAO,MAAM,yBAAyB,EAAE,kBAKvC,CAAC;AAEF,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,iBAAiB,EAAE,CASvF;AAED,wBAAgB,WAAW,CACzB,SAAS,EAAE,cAAc,EACzB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,YAAY,CAAC,CAQvB;AA4DD,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,CAWjF;AAuLD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAUtE"}
|
package/dist/actions.js
CHANGED
|
@@ -13,11 +13,11 @@ const CONVERSATION_ROUTES = new Map([
|
|
|
13
13
|
['conversation.delete', '/door/conversations/delete'],
|
|
14
14
|
['conversation.history', '/door/conversations/history'],
|
|
15
15
|
]);
|
|
16
|
-
export const
|
|
16
|
+
export const HOUSE_CONVERSATION_AGENTS = {
|
|
17
17
|
locator: PRIVATE_LOCATOR,
|
|
18
|
-
type: 'house-
|
|
19
|
-
identity: '
|
|
20
|
-
|
|
18
|
+
type: 'house-agent',
|
|
19
|
+
identity: 'agent',
|
|
20
|
+
name: 'name',
|
|
21
21
|
};
|
|
22
22
|
export function declaredActions(routes) {
|
|
23
23
|
const mapped = new Map([...CONVERSATION_ROUTES].map(([name, route]) => [route.slice('/door/'.length), name]));
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,OAAO,EACP,aAAa,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,OAAO,EACP,aAAa,EAWd,MAAM,wBAAwB,CAAC;AAqChC,OAAO,EAQL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAyBxB,MAAM,MAAM,yBAAyB,GACjC;IACE,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;CACrC,GACD;IAAE,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAsBjC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CA0WpF"}
|
package/dist/adapter.js
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import { DISCOVER_PREFIXES, capabilities, discoveredRoom,
|
|
2
|
-
import {
|
|
1
|
+
import { DISCOVER_PREFIXES, capabilities, discoveredRoom, mapDiscovery, parseDiscovery, trackedFrom, } from './discovery.js';
|
|
2
|
+
import { scopeModels, streamedModels, viewModels } from './model.js';
|
|
3
3
|
import { gathered, selections } from './gather.js';
|
|
4
4
|
import { createSiteAdapter } from './site.js';
|
|
5
|
-
import { bootstrapOf, contentPrefixes, matchesScope, parseEnumeration, parseEnvelope, parseGrant, refreshFrom,
|
|
6
|
-
import { enumeratedLinks, scopeLinks, streamedLinks } from './links.js';
|
|
5
|
+
import { bootstrapOf, contentPrefixes, matchesScope, parseEnumeration, parseEnvelope, parseGrant, refreshFrom, viewOf, } from './read.js';
|
|
6
|
+
import { acceptedLinks, enumeratedLinks, heldLinks, scopeLinks, streamedLinks, } from './links.js';
|
|
7
7
|
import { houseAction } from './actions.js';
|
|
8
8
|
import { classifyDoor, discoveryFailure, doorRefusal } from './refusal.js';
|
|
9
9
|
import { houseNotifications } from './stream.js';
|
|
10
10
|
import { DOOR_BATCH, DOOR_BATCH_UPLOAD, DOOR_BOOTSTRAP, DOOR_DISCOVER, DOOR_ENUMERATE, DOOR_REVISIONS, PRIVATE_LOCATOR, } from './transport.js';
|
|
11
11
|
import { batchPaths, deltaBody, deltaBytes, deltaDigest, historyOutcome, houseChanges, mutationOutcome, operationHead, rejectedMapping, revisionBody, uploadable, } from './write.js';
|
|
12
|
-
import { logPosition, presented, reachedVersion, roomVersion, } from './version.js';
|
|
12
|
+
import { followsVersion, logPosition, presented, reachedVersion, roomVersion, } from './version.js';
|
|
13
13
|
const UNCERTAIN = { kind: 'transport-uncertainty' };
|
|
14
14
|
const UNCERTAIN_READ = { kind: 'transport-uncertainty' };
|
|
15
15
|
function lapsedGrant(outcome) {
|
|
16
16
|
return outcome.kind === 'rejected' && outcome.code === 'upload_unavailable';
|
|
17
17
|
}
|
|
18
|
-
function modelFailure(classified, envelope) {
|
|
19
|
-
if (classified === null) {
|
|
20
|
-
return envelope === null ? { kind: 'transport-uncertainty' } : MODEL_ABSENT;
|
|
21
|
-
}
|
|
22
|
-
return failedModel(classified);
|
|
23
|
-
}
|
|
24
18
|
export function createAgentsHouseAdapter(options) {
|
|
25
19
|
if ('site' in options)
|
|
26
20
|
return createSiteAdapter(options.site);
|
|
@@ -28,80 +22,75 @@ export function createAgentsHouseAdapter(options) {
|
|
|
28
22
|
const notifications = houseNotifications(transport, 'credential');
|
|
29
23
|
const tracked = new Map();
|
|
30
24
|
const handed = new Map();
|
|
31
|
-
const models = modelShelf();
|
|
32
25
|
let bounds;
|
|
33
26
|
function declared() {
|
|
34
27
|
if (bounds === undefined)
|
|
35
28
|
throw new Error('no Discovery declared the bounds');
|
|
36
29
|
return bounds;
|
|
37
30
|
}
|
|
38
|
-
function bootstrappedRoom(envelope, entry) {
|
|
31
|
+
async function bootstrappedRoom(envelope, entry) {
|
|
39
32
|
const scope = envelope.scopes.find((candidate) => matchesScope(candidate, entry));
|
|
40
33
|
if (scope === undefined)
|
|
41
34
|
return { kind: 'room-not-readable', locator: entry.locator };
|
|
42
35
|
handed.set(entry.locator, scopeLinks(scope));
|
|
43
|
-
notifications.
|
|
44
|
-
|
|
36
|
+
notifications.reach(entry.authority, scope);
|
|
37
|
+
const models = await scopeModels(scope, entry);
|
|
38
|
+
return { ...bootstrapOf(scope), ...(models === undefined ? {} : { models }) };
|
|
45
39
|
}
|
|
46
|
-
function enumeratedRoom(enumeration, ask) {
|
|
40
|
+
async function enumeratedRoom(enumeration, ask) {
|
|
47
41
|
const view = viewOf(enumeration, ask.entry);
|
|
48
42
|
if (view === undefined)
|
|
49
43
|
return { kind: 'room-not-readable', locator: ask.entry.locator };
|
|
50
|
-
notifications.
|
|
44
|
+
notifications.reach(ask.entry.authority, view);
|
|
51
45
|
const answer = refreshFrom(view, ask.fromRoomVersion);
|
|
52
|
-
if (answer.kind
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
if (answer.kind !== 'net-advancement')
|
|
47
|
+
return answer;
|
|
48
|
+
handed.set(ask.entry.locator, enumeratedLinks(view, handed.get(ask.entry.locator)));
|
|
49
|
+
const models = await viewModels(view, ask.entry);
|
|
50
|
+
return models === undefined ? answer : { ...answer, models };
|
|
56
51
|
}
|
|
57
|
-
function streamed(entry, request, from) {
|
|
52
|
+
async function streamed(entry, request, from) {
|
|
58
53
|
const links = handed.get(entry.locator);
|
|
59
54
|
if (links?.roomVersion !== request.fromRoomVersion)
|
|
60
55
|
return null;
|
|
61
56
|
const advanced = notifications.advance(entry, from, (path, revision) => links.revisions.get(path) === revision);
|
|
62
57
|
if (advanced === null)
|
|
63
58
|
return null;
|
|
64
|
-
if (request.minPosition !== undefined &&
|
|
65
|
-
!reachedVersion(advanced.page.roomVersion, request.minPosition, entry.logEpoch))
|
|
66
|
-
return null;
|
|
67
59
|
const relinked = streamedLinks(links, advanced);
|
|
68
60
|
if (relinked === null)
|
|
69
61
|
return null;
|
|
70
62
|
handed.set(entry.locator, relinked);
|
|
71
|
-
|
|
63
|
+
const models = await streamedModels(advanced.schemas, entry, 'credential');
|
|
64
|
+
return models === undefined ? advanced.page : { ...advanced.page, models };
|
|
72
65
|
}
|
|
73
|
-
function held(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
85
|
-
const classified = classifyDoor(answer.status, answer.body, PRIVATE_LOCATOR);
|
|
86
|
-
const envelope = classified === null ? parseEnvelope(await bundled(answer.body)) : null;
|
|
87
|
-
const failure = modelFailure(classified, envelope);
|
|
88
|
-
for (const entry of part) {
|
|
89
|
-
acquired.set(modelKey(entry.locator, 'collection'), await held(envelope, entry, entry.schema, failure));
|
|
90
|
-
if (entry.houseModel === null)
|
|
91
|
-
continue;
|
|
92
|
-
acquired.set(modelKey(entry.locator, 'typed-selection'), await held(envelope, entry, entry.houseModel.root, failure));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return acquired;
|
|
66
|
+
function held(rooms) {
|
|
67
|
+
const kept = rooms.flatMap((room) => {
|
|
68
|
+
const entry = tracked.get(room.locator);
|
|
69
|
+
const at = logPosition(room.roomVersion);
|
|
70
|
+
if (entry === undefined || at === null)
|
|
71
|
+
return [];
|
|
72
|
+
handed.set(room.locator, heldLinks(room));
|
|
73
|
+
notifications.reach(entry.authority, at);
|
|
74
|
+
return [presented(entry.authority, at)];
|
|
75
|
+
});
|
|
76
|
+
notifications.send(kept);
|
|
96
77
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
78
|
+
function adopted(entry, outcome) {
|
|
79
|
+
if (outcome.kind !== 'accepted')
|
|
80
|
+
return outcome;
|
|
81
|
+
const { originals, ...accepted } = outcome;
|
|
82
|
+
const links = handed.get(entry.locator);
|
|
83
|
+
if (links === undefined)
|
|
84
|
+
return accepted;
|
|
85
|
+
const follows = followsVersion(links.roomVersion, accepted.roomVersion);
|
|
86
|
+
const relinked = acceptedLinks(links, accepted, follows ? accepted.roomVersion : links.roomVersion, originals);
|
|
87
|
+
handed.set(entry.locator, relinked.links);
|
|
88
|
+
const at = logPosition(accepted.roomVersion);
|
|
89
|
+
if (follows && at !== null)
|
|
90
|
+
notifications.reach(entry.authority, at);
|
|
91
|
+
return relinked.attachments === undefined
|
|
92
|
+
? accepted
|
|
93
|
+
: { ...accepted, attachments: relinked.attachments };
|
|
105
94
|
}
|
|
106
95
|
function authorityFor(locator) {
|
|
107
96
|
return tracked.get(locator);
|
|
@@ -147,14 +136,14 @@ export function createAgentsHouseAdapter(options) {
|
|
|
147
136
|
});
|
|
148
137
|
const classified = part.map((entry) => classifyDoor(answer.status, answer.body, entry.locator));
|
|
149
138
|
const envelope = classified[0] === null ? parseEnvelope(await bundled(answer.body)) : null;
|
|
150
|
-
part.
|
|
139
|
+
for (const [index, entry] of part.entries()) {
|
|
151
140
|
const failure = classified[index];
|
|
152
141
|
if (failure === null || failure === undefined) {
|
|
153
|
-
answers.push(envelope === null ? UNCERTAIN_READ : bootstrappedRoom(envelope, entry));
|
|
154
|
-
|
|
142
|
+
answers.push(envelope === null ? UNCERTAIN_READ : await bootstrappedRoom(envelope, entry));
|
|
143
|
+
continue;
|
|
155
144
|
}
|
|
156
145
|
answers.push(failure.kind === 'beyond-horizon' ? UNCERTAIN_READ : failure);
|
|
157
|
-
}
|
|
146
|
+
}
|
|
158
147
|
}
|
|
159
148
|
return answers;
|
|
160
149
|
}
|
|
@@ -176,23 +165,8 @@ export function createAgentsHouseAdapter(options) {
|
|
|
176
165
|
while (open.length > 0) {
|
|
177
166
|
const answer = await transport.door(DOOR_ENUMERATE, {
|
|
178
167
|
prefixes: open.flatMap((ask) => contentPrefixes(ask.entry)),
|
|
179
|
-
positions: open.map((ask) => (
|
|
180
|
-
...presented(ask.entry.authority, ask.from),
|
|
181
|
-
...(ask.minPosition === undefined ? {} : { min_position: ask.minPosition }),
|
|
182
|
-
})),
|
|
168
|
+
positions: open.map((ask) => presented(ask.entry.authority, ask.from)),
|
|
183
169
|
});
|
|
184
|
-
const refusal = doorRefusal(answer.body);
|
|
185
|
-
if (refusal?.code === 'replica_behind') {
|
|
186
|
-
const named = open.filter((ask) => ask.entry.authority === refusal.fields.authority);
|
|
187
|
-
const behind = named.length === 0 ? open : named;
|
|
188
|
-
for (const ask of behind) {
|
|
189
|
-
answers.set(ask, refusal.retryable
|
|
190
|
-
? { kind: 'retryable-refusal', code: refusal.code, fields: refusal.fields }
|
|
191
|
-
: (classifyDoor(answer.status, answer.body, ask.entry.locator) ?? UNCERTAIN_READ));
|
|
192
|
-
}
|
|
193
|
-
open = open.filter((ask) => !behind.includes(ask));
|
|
194
|
-
continue;
|
|
195
|
-
}
|
|
196
170
|
const classified = open.map((ask) => classifyDoor(answer.status, answer.body, ask.entry.locator));
|
|
197
171
|
if (classified[0]?.kind === 'beyond-horizon') {
|
|
198
172
|
const named = doorRefusal(answer.body)?.fields.authority;
|
|
@@ -205,14 +179,14 @@ export function createAgentsHouseAdapter(options) {
|
|
|
205
179
|
continue;
|
|
206
180
|
}
|
|
207
181
|
const enumeration = classified[0] === null ? parseEnumeration(answer.body, 'credential') : null;
|
|
208
|
-
open.
|
|
182
|
+
for (const [index, ask] of open.entries()) {
|
|
209
183
|
const failure = classified[index];
|
|
210
184
|
if (failure !== null && failure !== undefined) {
|
|
211
185
|
answers.set(ask, failure);
|
|
212
|
-
|
|
186
|
+
continue;
|
|
213
187
|
}
|
|
214
|
-
answers.set(ask, enumeration === null ? UNCERTAIN_READ : enumeratedRoom(enumeration, ask));
|
|
215
|
-
}
|
|
188
|
+
answers.set(ask, enumeration === null ? UNCERTAIN_READ : await enumeratedRoom(enumeration, ask));
|
|
189
|
+
}
|
|
216
190
|
open = [];
|
|
217
191
|
}
|
|
218
192
|
}
|
|
@@ -224,7 +198,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
224
198
|
const paths = batchPaths(changes);
|
|
225
199
|
const sha256 = await deltaDigest(delta);
|
|
226
200
|
if (handed !== undefined && handed.sha256 === sha256) {
|
|
227
|
-
return { body: { ...head, paths, upload: handed } };
|
|
201
|
+
return { body: { ...head, paths, upload: handed, runtime: notifications.runtime } };
|
|
228
202
|
}
|
|
229
203
|
const minted = await transport.door(DOOR_BATCH_UPLOAD, { ...head, paths, bytes, sha256 });
|
|
230
204
|
if (minted.status !== 200) {
|
|
@@ -247,10 +221,10 @@ export function createAgentsHouseAdapter(options) {
|
|
|
247
221
|
return { outcome: UNCERTAIN };
|
|
248
222
|
const upload = { url: holding.url, operation: holding.operation, bytes, sha256 };
|
|
249
223
|
await keep(upload);
|
|
250
|
-
return { body: { ...head, paths, upload } };
|
|
224
|
+
return { body: { ...head, paths, upload, runtime: notifications.runtime } };
|
|
251
225
|
}
|
|
252
226
|
async function submit(head, changes, delta, bytes, entry, handed, keep) {
|
|
253
|
-
const inline = { ...head, changes };
|
|
227
|
+
const inline = { ...head, changes, runtime: notifications.runtime };
|
|
254
228
|
const prepared = uploadable(inline, bytes, declared())
|
|
255
229
|
? await uploaded(head, changes, delta, bytes, entry, handed, keep)
|
|
256
230
|
: { body: inline };
|
|
@@ -263,9 +237,6 @@ export function createAgentsHouseAdapter(options) {
|
|
|
263
237
|
async authorize() {
|
|
264
238
|
return options.authorize();
|
|
265
239
|
},
|
|
266
|
-
async model(_authorization, request) {
|
|
267
|
-
return models.answer(request);
|
|
268
|
-
},
|
|
269
240
|
async discover(_authorization) {
|
|
270
241
|
const answer = await transport.door(DOOR_DISCOVER, { prefixes: [...DISCOVER_PREFIXES] });
|
|
271
242
|
const classified = classifyDoor(answer.status, answer.body, PRIVATE_LOCATOR);
|
|
@@ -283,9 +254,7 @@ export function createAgentsHouseAdapter(options) {
|
|
|
283
254
|
if (!tracked.has(locator))
|
|
284
255
|
handed.delete(locator);
|
|
285
256
|
notifications.track(entries);
|
|
286
|
-
|
|
287
|
-
models.keep(entries.map((entry) => entry.locator));
|
|
288
|
-
return mapDiscovery(document, document.authorities.map((authority) => roomOf(authority, acquired)), capabilities(document.actions));
|
|
257
|
+
return mapDiscovery(document, document.authorities.map((authority) => discoveredRoom(authority)), capabilities(document.actions));
|
|
289
258
|
},
|
|
290
259
|
async bootstrap(_authorization, request) {
|
|
291
260
|
const entry = authorityFor(request.locator);
|
|
@@ -304,16 +273,10 @@ export function createAgentsHouseAdapter(options) {
|
|
|
304
273
|
const from = logPosition(request.fromRoomVersion);
|
|
305
274
|
if (from === null)
|
|
306
275
|
return { kind: 'beyond-horizon' };
|
|
307
|
-
const answered = streamed(entry, request, from);
|
|
276
|
+
const answered = await streamed(entry, request, from);
|
|
308
277
|
if (answered !== null)
|
|
309
278
|
return answered;
|
|
310
|
-
|
|
311
|
-
return enumerateTogether({
|
|
312
|
-
entry,
|
|
313
|
-
from,
|
|
314
|
-
fromRoomVersion: request.fromRoomVersion,
|
|
315
|
-
...(minPosition?.logEpoch === from.logEpoch ? { minPosition: minPosition.position } : {}),
|
|
316
|
-
});
|
|
279
|
+
return enumerateTogether({ entry, from, fromRoomVersion: request.fromRoomVersion });
|
|
317
280
|
},
|
|
318
281
|
async mutate(_authorization, request, keep) {
|
|
319
282
|
const entry = authorityFor(request.locator);
|
|
@@ -328,8 +291,8 @@ export function createAgentsHouseAdapter(options) {
|
|
|
328
291
|
const handed = request.upload;
|
|
329
292
|
const outcome = await submit(head, mapped.changes, delta, bytes, entry, handed, keep);
|
|
330
293
|
if (handed === undefined || !lapsedGrant(outcome))
|
|
331
|
-
return outcome;
|
|
332
|
-
return submit(head, mapped.changes, delta, bytes, entry, undefined, keep);
|
|
294
|
+
return adopted(entry, outcome);
|
|
295
|
+
return adopted(entry, await submit(head, mapped.changes, delta, bytes, entry, undefined, keep));
|
|
333
296
|
},
|
|
334
297
|
async history(_authorization, request) {
|
|
335
298
|
const entry = authorityFor(request.locator);
|
|
@@ -349,10 +312,13 @@ export function createAgentsHouseAdapter(options) {
|
|
|
349
312
|
reached(locator, version, target) {
|
|
350
313
|
return reachedVersion(version, target, authorityFor(locator)?.logEpoch);
|
|
351
314
|
},
|
|
315
|
+
follows(_locator, version, next) {
|
|
316
|
+
return followsVersion(version, next);
|
|
317
|
+
},
|
|
352
318
|
async action(_authorization, request) {
|
|
353
319
|
return withAt(await houseAction(transport, request));
|
|
354
320
|
},
|
|
355
|
-
|
|
321
|
+
roomStream: { hold: held, observe: notifications.observe },
|
|
356
322
|
conversations: notifications.conversations,
|
|
357
323
|
serviceMode: notifications.serviceMode,
|
|
358
324
|
};
|
package/dist/discovery.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import type { Capability, DiscoveredRoom, Discovery,
|
|
1
|
+
import type { Capability, DiscoveredRoom, Discovery, 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
5
|
export declare const PRIVATE_HANDLE = "private";
|
|
10
6
|
export type HouseBounds = {
|
|
@@ -43,7 +39,6 @@ export type HouseAuthority = LogPosition & {
|
|
|
43
39
|
};
|
|
44
40
|
export type HouseDiscoveryDocument = {
|
|
45
41
|
bounds: HouseBounds;
|
|
46
|
-
mdModelVersion: string;
|
|
47
42
|
authorities: readonly HouseAuthority[];
|
|
48
43
|
actions: readonly string[];
|
|
49
44
|
};
|
|
@@ -62,7 +57,6 @@ export type HouseSiteAuthority = LogPosition & {
|
|
|
62
57
|
};
|
|
63
58
|
export type HouseSiteDiscovery = {
|
|
64
59
|
bounds: HouseBounds;
|
|
65
|
-
mdModelVersion: string;
|
|
66
60
|
authorities: readonly HouseSiteAuthority[];
|
|
67
61
|
};
|
|
68
62
|
export declare function parseDiscovery(body: unknown): HouseDiscoveryDocument | null;
|
|
@@ -74,6 +68,6 @@ export declare function providerLimits(bounds: HouseBounds): readonly ProviderLi
|
|
|
74
68
|
export declare function declaredRetention(bounds: HouseBounds): Retention;
|
|
75
69
|
export declare function capabilities(actions: readonly string[]): 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,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"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"}
|
package/dist/discovery.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { declaredActions,
|
|
1
|
+
import { declaredActions, HOUSE_CONVERSATION_AGENTS } from './actions.js';
|
|
2
2
|
import { PRIVATE_LOCATOR } from './transport.js';
|
|
3
3
|
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
4
|
export const PROVIDER_ACTIONS = 'provider-actions';
|
|
8
|
-
export const MOVE_REFERENCE_REWRITES = 'move-reference-rewrites';
|
|
9
5
|
export const DISCOVER_PREFIXES = ['/'];
|
|
10
6
|
export const PRIVATE_HANDLE = 'private';
|
|
11
7
|
const BOUND_KEYS = [
|
|
@@ -107,8 +103,6 @@ export function parseDiscovery(body) {
|
|
|
107
103
|
const bounds = parseBounds(held.bounds);
|
|
108
104
|
if (bounds === null)
|
|
109
105
|
return null;
|
|
110
|
-
if (typeof held.md_model_version !== 'string' || held.md_model_version.length === 0)
|
|
111
|
-
return null;
|
|
112
106
|
const actions = stringList(held.actions);
|
|
113
107
|
if (actions === null ||
|
|
114
108
|
new Set(actions).size !== actions.length ||
|
|
@@ -123,7 +117,7 @@ export function parseDiscovery(body) {
|
|
|
123
117
|
return null;
|
|
124
118
|
authorities.push(authority);
|
|
125
119
|
}
|
|
126
|
-
return { bounds,
|
|
120
|
+
return { bounds, authorities, actions };
|
|
127
121
|
}
|
|
128
122
|
function parseSiteAuthority(value) {
|
|
129
123
|
if (typeof value !== 'object' || value === null)
|
|
@@ -154,8 +148,6 @@ export function parseSiteDiscovery(body) {
|
|
|
154
148
|
const bounds = parseBounds(held.bounds);
|
|
155
149
|
if (bounds === null)
|
|
156
150
|
return null;
|
|
157
|
-
if (typeof held.md_model_version !== 'string' || held.md_model_version.length === 0)
|
|
158
|
-
return null;
|
|
159
151
|
if (!Array.isArray(held.authorities))
|
|
160
152
|
return null;
|
|
161
153
|
const authorities = [];
|
|
@@ -165,7 +157,7 @@ export function parseSiteDiscovery(body) {
|
|
|
165
157
|
return null;
|
|
166
158
|
authorities.push(authority);
|
|
167
159
|
}
|
|
168
|
-
return { bounds,
|
|
160
|
+
return { bounds, authorities };
|
|
169
161
|
}
|
|
170
162
|
export function siteTracked(document) {
|
|
171
163
|
return document.authorities.map((authority) => ({
|
|
@@ -219,25 +211,23 @@ export function declaredRetention(bounds) {
|
|
|
219
211
|
}
|
|
220
212
|
export function capabilities(actions) {
|
|
221
213
|
return [
|
|
222
|
-
{ name: ROOM_VERSION_NOTIFICATIONS },
|
|
223
214
|
{
|
|
224
215
|
name: PROVIDER_ACTIONS,
|
|
225
216
|
actions: declaredActions(actions),
|
|
226
|
-
|
|
217
|
+
conversationAgents: HOUSE_CONVERSATION_AGENTS,
|
|
227
218
|
},
|
|
228
|
-
{ name: MOVE_REFERENCE_REWRITES },
|
|
229
219
|
];
|
|
230
220
|
}
|
|
231
221
|
export function siteCapabilities() {
|
|
232
222
|
return [
|
|
233
|
-
{ name: ROOM_VERSION_NOTIFICATIONS },
|
|
234
223
|
{ name: PROVIDER_ACTIONS, actions: [{ name: 'submit', inputShape: {}, resultKind: 'house' }] },
|
|
235
224
|
];
|
|
236
225
|
}
|
|
237
|
-
export function discoveredRoom(authority
|
|
226
|
+
export function discoveredRoom(authority) {
|
|
227
|
+
const locator = locatorOf(authority);
|
|
238
228
|
return {
|
|
239
229
|
name: authority.name,
|
|
240
|
-
locator
|
|
230
|
+
locator,
|
|
241
231
|
roomVersion: roomVersion(authority),
|
|
242
232
|
operations: {
|
|
243
233
|
read: [...authority.operations.read],
|
|
@@ -245,24 +235,16 @@ export function discoveredRoom(authority, attachedModel, selectionModel) {
|
|
|
245
235
|
write: [...authority.operations.write],
|
|
246
236
|
delete: [...authority.operations.delete],
|
|
247
237
|
},
|
|
248
|
-
replica: { selection:
|
|
249
|
-
attachedModel,
|
|
238
|
+
replica: { selection: locator, admission: authority.managedReplication },
|
|
250
239
|
...(authority.houseModel === null
|
|
251
240
|
? {}
|
|
252
|
-
: {
|
|
253
|
-
typedSelection: {
|
|
254
|
-
roots: [...authority.houseModel.paths],
|
|
255
|
-
attachedModel: selectionModel,
|
|
256
|
-
},
|
|
257
|
-
}),
|
|
241
|
+
: { typedSelection: { roots: [...authority.houseModel.paths] } }),
|
|
258
242
|
providerOwnedPaths: [...authority.protectedPaths, ...schemasOf(authority)],
|
|
259
243
|
};
|
|
260
244
|
}
|
|
261
245
|
export function mapDiscovery(document, rooms, declared) {
|
|
262
246
|
return {
|
|
263
247
|
kind: 'discovery',
|
|
264
|
-
supportedVersions: [ROOM_CONTRACT_VERSION],
|
|
265
|
-
mdModel: { identity: MD_MODEL_IDENTITY, version: document.mdModelVersion },
|
|
266
248
|
rooms,
|
|
267
249
|
capabilities: declared,
|
|
268
250
|
providerLimits: providerLimits(document.bounds),
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createAgentsHouseAdapter, type AgentsHouseAdapterOptions } from './adapter.js';
|
|
2
2
|
export { PRIVATE_LOCATOR } from './transport.js';
|
|
3
|
-
export type { HouseByteAct, HouseByteAnswer, HouseByteTransfer, HouseDoorAnswer, HouseStream, HouseStreamEntry, HouseStreamFrame, HouseSiteTransport, HouseTransport, } from './transport.js';
|
|
3
|
+
export type { HouseByteAct, HouseByteAnswer, HouseByteTransfer, 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,gBAAgB,CAAC;AACjD,YAAY,EACV,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EACV,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
package/dist/links.d.ts
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import type { HeldRoom, MutationResult, RoomAttachment } from '@agentshouse/mdruntime';
|
|
1
2
|
import type { HouseScope, HouseView } from './read.js';
|
|
2
3
|
import type { StreamedAdvancement } from './stream.js';
|
|
3
4
|
export type RoomLinks = {
|
|
4
5
|
roomVersion: string;
|
|
5
|
-
handed:
|
|
6
|
+
handed: ReadonlyMap<string, RoomAttachment>;
|
|
6
7
|
paths: ReadonlyMap<string, ReadonlySet<string>>;
|
|
7
8
|
revisions: ReadonlyMap<string, string>;
|
|
8
9
|
};
|
|
9
10
|
export declare function scopeLinks(scope: HouseScope): RoomLinks;
|
|
11
|
+
export declare function heldLinks(held: HeldRoom): RoomLinks;
|
|
12
|
+
export declare function acceptedLinks(held: RoomLinks, accepted: Extract<MutationResult, {
|
|
13
|
+
kind: 'accepted';
|
|
14
|
+
}>, roomVersion: string, originals: readonly RoomAttachment[]): {
|
|
15
|
+
links: RoomLinks;
|
|
16
|
+
attachments?: readonly RoomAttachment[];
|
|
17
|
+
};
|
|
10
18
|
export declare function enumeratedLinks(view: HouseView, earlier: RoomLinks | undefined): RoomLinks;
|
|
11
19
|
export declare function streamedLinks(held: RoomLinks, advanced: StreamedAdvancement): RoomLinks | null;
|
|
12
20
|
//# sourceMappingURL=links.d.ts.map
|
package/dist/links.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../src/links.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../src/links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOvD,MAAM,MAAM,SAAS,GAAG;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC,CAAC;AAcF,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAWvD;AAOD,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAOnD;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,OAAO,CAAC,cAAc,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,EACvD,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,WAAW,CAAC,EAAE,SAAS,cAAc,EAAE,CAAA;CAAE,CA2B/D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAgB1F;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,mBAAmB,GAAG,SAAS,GAAG,IAAI,CAoB9F"}
|