@agentshouse/mdruntime-adapter 0.1.0-c819869684b89 → 0.1.0-c82ec25e72f2f
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/adapter.d.ts.map +1 -1
- package/dist/adapter.js +75 -67
- package/dist/chunks.d.ts +28 -0
- package/dist/chunks.d.ts.map +1 -0
- package/dist/chunks.js +206 -0
- package/dist/discovery.d.ts +1 -2
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +2 -3
- package/dist/house-model.d.ts +38 -308
- package/dist/house-model.d.ts.map +1 -1
- package/dist/house-model.js +26 -166
- package/dist/model.d.ts +4 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +29 -7
- package/dist/read.d.ts +12 -1
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +24 -2
- package/dist/room-stream.d.ts +2 -1
- package/dist/room-stream.d.ts.map +1 -1
- package/dist/room-stream.js +2 -2
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +0 -2
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +7 -11
- package/dist/space-schema.d.ts +7 -0
- package/dist/space-schema.d.ts.map +1 -0
- package/dist/space-schema.js +18 -0
- package/dist/stream.d.ts +6 -4
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +83 -14
- package/dist/transport.d.ts +4 -3
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +1 -0
- package/dist/write.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SpaceSchemas = {
|
|
2
|
+
held(space: string, revision: string): string | undefined;
|
|
3
|
+
keep(space: string, revision: string, text: string): void;
|
|
4
|
+
};
|
|
5
|
+
export declare function spaceSchemas(): SpaceSchemas;
|
|
6
|
+
export declare function spaceIdentity(space: string): string;
|
|
7
|
+
//# sourceMappingURL=space-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-schema.d.ts","sourceRoot":"","sources":["../src/space-schema.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3D,CAAC;AAEF,wBAAgB,YAAY,IAAI,YAAY,CAY3C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const HELD_TEXTS = 16;
|
|
2
|
+
export function spaceSchemas() {
|
|
3
|
+
const texts = new Map();
|
|
4
|
+
const key = (space, revision) => `${space} ${revision}`;
|
|
5
|
+
return {
|
|
6
|
+
held: (space, revision) => texts.get(key(space, revision)),
|
|
7
|
+
keep(space, revision, text) {
|
|
8
|
+
const named = key(space, revision);
|
|
9
|
+
texts.delete(named);
|
|
10
|
+
texts.set(named, text);
|
|
11
|
+
if (texts.size > HELD_TEXTS)
|
|
12
|
+
texts.delete(texts.keys().next().value);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function spaceIdentity(space) {
|
|
17
|
+
return `space:${space}`;
|
|
18
|
+
}
|
package/dist/stream.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type AuthorityChange, type Discovery, type ConversationStream, type RoomStreamEvent, type ServiceModeSignal } from '@agentshouse/mdruntime';
|
|
1
|
+
import { type AuthorityChange, type Discovery, type ConversationStream, type HeldRoom, type RoomStreamEvent, type ServiceModeSignal } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
3
|
-
import
|
|
3
|
+
import type { SpaceSchemas } from './space-schema.js';
|
|
4
|
+
import { type HouseDoor, type HouseMode, type HouseStreamFrame } from './transport.js';
|
|
4
5
|
export type HouseOpeningFrame = Extract<HouseStreamFrame, {
|
|
5
6
|
type: 'opening';
|
|
6
7
|
}>;
|
|
@@ -10,14 +11,15 @@ export type HouseAuthorityChangedFrame = Extract<HouseStreamFrame, {
|
|
|
10
11
|
export type HouseDiscovering = {
|
|
11
12
|
opened(frame: HouseOpeningFrame | null): Promise<Discovery | null>;
|
|
12
13
|
changed(frame: HouseAuthorityChangedFrame): AuthorityChange | null;
|
|
14
|
+
expired?(authorities: readonly string[]): void;
|
|
13
15
|
};
|
|
14
16
|
export type HouseNotifications = {
|
|
15
17
|
runtime: string;
|
|
16
18
|
observe(notify: (event: RoomStreamEvent) => void): () => void;
|
|
17
|
-
send(rooms: readonly
|
|
19
|
+
send(rooms: readonly HeldRoom[]): void;
|
|
18
20
|
track(authorities: readonly TrackedAuthority[]): void;
|
|
19
21
|
conversations: ConversationStream;
|
|
20
22
|
serviceMode: ServiceModeSignal;
|
|
21
23
|
};
|
|
22
|
-
export declare function houseNotifications(transport: HouseDoor, mode: HouseMode, discovering: HouseDiscovering): HouseNotifications;
|
|
24
|
+
export declare function houseNotifications(transport: HouseDoor, mode: HouseMode, discovering: HouseDiscovering, spaces: SpaceSchemas): HouseNotifications;
|
|
23
25
|
//# sourceMappingURL=stream.d.ts.map
|
package/dist/stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAEpB,KAAK,SAAS,EACd,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAEpB,KAAK,SAAS,EACd,KAAK,kBAAkB,EAEvB,KAAK,QAAQ,EAGb,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EAEvB,MAAM,wBAA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,CA8XpB"}
|
package/dist/stream.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ROW_WEIGHT, stepped, } from '@agentshouse/mdruntime';
|
|
2
2
|
import { acceptedMessage, cursorPosition, houseHistory } from './history.js';
|
|
3
|
-
import { streamedModels } from './model.js';
|
|
3
|
+
import { keptSpaceSchemas, streamedModels } from './model.js';
|
|
4
4
|
import { answered, answering, binaryFileOf, folded, forgotten, headChange, revised, } from './read.js';
|
|
5
5
|
import { houseDoorRoute, } from './transport.js';
|
|
6
|
-
import { DECIMAL, roomVersion } from './version.js';
|
|
6
|
+
import { DECIMAL, logPosition, presented, roomVersion } from './version.js';
|
|
7
7
|
function turnOperation(frame) {
|
|
8
8
|
const { type: _type, conversation_id: _conversation, turn_id: _turn, ...operation } = frame;
|
|
9
9
|
return structuredClone(operation);
|
|
@@ -51,6 +51,10 @@ function* changed(tracked, entries, version, schemas) {
|
|
|
51
51
|
if (entry.path === tracked.schema)
|
|
52
52
|
schemas.set(entry.path, entry);
|
|
53
53
|
forgotten(answer, entry.path);
|
|
54
|
+
if (entry.space !== undefined) {
|
|
55
|
+
answer.removals.add(entry.path);
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
54
58
|
if (entry.kind === 'removed') {
|
|
55
59
|
answer.removals.add(entry.path);
|
|
56
60
|
continue;
|
|
@@ -60,6 +64,8 @@ function* changed(tracked, entries, version, schemas) {
|
|
|
60
64
|
answer.documents.set(entry.path, entry.text ?? '');
|
|
61
65
|
else if (binary !== null)
|
|
62
66
|
answer.binaryFiles.set(entry.path, binary);
|
|
67
|
+
if (binary === undefined && entry.facts !== undefined)
|
|
68
|
+
answer.facts.set(entry.path, entry.facts);
|
|
63
69
|
const revision = entry.revision ?? binary?.sha256;
|
|
64
70
|
if (revision !== undefined)
|
|
65
71
|
revised(answer, entry.path, revision);
|
|
@@ -69,29 +75,37 @@ function* changed(tracked, entries, version, schemas) {
|
|
|
69
75
|
}
|
|
70
76
|
return { kind: 'net-advancement', roomVersion: version, ...(yield* answered(answer)) };
|
|
71
77
|
}
|
|
72
|
-
async function changePage(tracked, entries, version, mode) {
|
|
78
|
+
async function changePage(tracked, entries, version, mode, spaces, whole) {
|
|
73
79
|
const schemas = new Map();
|
|
74
80
|
const page = await stepped(changed(tracked, entries, version, schemas));
|
|
75
|
-
const models = await streamedModels(schemas, tracked, mode);
|
|
81
|
+
const models = await streamedModels(schemas, tracked, mode, spaces, whole);
|
|
76
82
|
return models === undefined ? page : { ...page, models };
|
|
77
83
|
}
|
|
78
|
-
export function houseNotifications(transport, mode, discovering) {
|
|
84
|
+
export function houseNotifications(transport, mode, discovering, spaces) {
|
|
79
85
|
const stream = transport.stream;
|
|
80
86
|
const staged = new Map();
|
|
81
87
|
let socket = null;
|
|
82
88
|
const tracking = new Map();
|
|
83
89
|
const observers = new Set();
|
|
90
|
+
const replaying = new Map();
|
|
84
91
|
const conversationObservers = new Set();
|
|
85
92
|
const modeObservers = new Set();
|
|
86
93
|
let replicated = [];
|
|
87
94
|
let listedCursor = null;
|
|
95
|
+
const unanswered = [];
|
|
96
|
+
const heldAtZero = new Set();
|
|
88
97
|
const live = new Set();
|
|
89
98
|
let opening = null;
|
|
90
99
|
let announced = null;
|
|
91
100
|
const runtime = crypto.randomUUID();
|
|
92
101
|
function emit(event) {
|
|
93
|
-
for (const observer of observers)
|
|
94
|
-
observer
|
|
102
|
+
for (const observer of observers) {
|
|
103
|
+
const held = replaying.get(observer);
|
|
104
|
+
if (held === undefined)
|
|
105
|
+
observer(event);
|
|
106
|
+
else
|
|
107
|
+
held.push(event);
|
|
108
|
+
}
|
|
95
109
|
}
|
|
96
110
|
function emitConversation(event) {
|
|
97
111
|
if (event.kind === 'turn' ||
|
|
@@ -113,6 +127,8 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
113
127
|
announced = null;
|
|
114
128
|
socket = next;
|
|
115
129
|
staged.clear();
|
|
130
|
+
unanswered.length = 0;
|
|
131
|
+
heldAtZero.clear();
|
|
116
132
|
const gapped = new Set([...replicated, ...live]);
|
|
117
133
|
live.clear();
|
|
118
134
|
for (const conversation of gapped)
|
|
@@ -214,6 +230,7 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
214
230
|
}
|
|
215
231
|
}
|
|
216
232
|
const next = held ?? { authority: frame.authority, parts: 0, entries: [] };
|
|
233
|
+
keptSpaceSchemas(frame.entries, spaces);
|
|
217
234
|
next.entries.push(...frame.entries);
|
|
218
235
|
next.parts += 1;
|
|
219
236
|
staged.set(frame.carry, next);
|
|
@@ -241,9 +258,13 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
241
258
|
return;
|
|
242
259
|
}
|
|
243
260
|
if (frame.type === 'caught_up') {
|
|
261
|
+
discovering.expired?.(frame.expired);
|
|
244
262
|
emit({
|
|
245
263
|
kind: 'caught-up',
|
|
246
|
-
expired:
|
|
264
|
+
expired: [
|
|
265
|
+
...frame.expired.flatMap((authority) => (tracking.get(authority) ?? []).map((tracked) => tracked.locator)),
|
|
266
|
+
...(unanswered.shift() ?? []),
|
|
267
|
+
],
|
|
247
268
|
});
|
|
248
269
|
return;
|
|
249
270
|
}
|
|
@@ -294,7 +315,9 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
294
315
|
const after = position(frame.after);
|
|
295
316
|
if (at === null || after === null || after >= at)
|
|
296
317
|
return;
|
|
297
|
-
const from =
|
|
318
|
+
const from = after === 0n && !heldAtZero.has(frame.authority)
|
|
319
|
+
? null
|
|
320
|
+
: roomVersion({ position: frame.after, logEpoch: frame.log_epoch });
|
|
298
321
|
const version = roomVersion({ position: frame.position, logEpoch: frame.log_epoch });
|
|
299
322
|
for (const tracked of tracking.get(frame.authority) ?? []) {
|
|
300
323
|
emit({
|
|
@@ -302,7 +325,7 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
302
325
|
locator: tracked.locator,
|
|
303
326
|
from,
|
|
304
327
|
roomVersion: version,
|
|
305
|
-
read: () => changePage(tracked, entries, version, mode),
|
|
328
|
+
read: () => changePage(tracked, entries, version, mode, spaces, from === null),
|
|
306
329
|
});
|
|
307
330
|
}
|
|
308
331
|
}
|
|
@@ -313,6 +336,8 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
313
336
|
announced = null;
|
|
314
337
|
socket = null;
|
|
315
338
|
staged.clear();
|
|
339
|
+
unanswered.length = 0;
|
|
340
|
+
heldAtZero.clear();
|
|
316
341
|
emit({ kind: 'closed', revoked, lost, authorityChanged });
|
|
317
342
|
});
|
|
318
343
|
return {
|
|
@@ -347,11 +372,15 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
347
372
|
},
|
|
348
373
|
observe(notify) {
|
|
349
374
|
observers.add(notify);
|
|
350
|
-
|
|
351
|
-
|
|
375
|
+
if (opening !== null) {
|
|
376
|
+
const replayed = [{ kind: 'opened' }];
|
|
377
|
+
if (announced !== null)
|
|
378
|
+
replayed.push(announced);
|
|
379
|
+
replaying.set(notify, replayed);
|
|
352
380
|
queueMicrotask(() => {
|
|
381
|
+
replaying.delete(notify);
|
|
353
382
|
for (const event of replayed)
|
|
354
|
-
if (
|
|
383
|
+
if (observers.has(notify))
|
|
355
384
|
notify(event);
|
|
356
385
|
});
|
|
357
386
|
}
|
|
@@ -362,7 +391,47 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
362
391
|
send(rooms) {
|
|
363
392
|
opening = null;
|
|
364
393
|
announced = null;
|
|
365
|
-
socket
|
|
394
|
+
if (socket === null)
|
|
395
|
+
return;
|
|
396
|
+
const entries = new Map([...tracking.values()].flat().map((tracked) => [tracked.locator, tracked]));
|
|
397
|
+
const named = rooms.flatMap((room) => {
|
|
398
|
+
const entry = entries.get(room.locator);
|
|
399
|
+
const at = room.roomVersion === null ? null : logPosition(room.roomVersion);
|
|
400
|
+
return entry === undefined || at === null ? [] : [{ entry, at }];
|
|
401
|
+
});
|
|
402
|
+
const unheld = rooms.flatMap((room) => {
|
|
403
|
+
const entry = entries.get(room.locator);
|
|
404
|
+
return entry === undefined || room.roomVersion !== null ? [] : [entry];
|
|
405
|
+
});
|
|
406
|
+
for (const { entry, at } of named) {
|
|
407
|
+
if (at.position === '0')
|
|
408
|
+
heldAtZero.add(entry.authority);
|
|
409
|
+
else
|
|
410
|
+
heldAtZero.delete(entry.authority);
|
|
411
|
+
}
|
|
412
|
+
for (const entry of unheld)
|
|
413
|
+
heldAtZero.delete(entry.authority);
|
|
414
|
+
const site = mode === 'site';
|
|
415
|
+
unanswered.push(site ? unheld.map((entry) => entry.locator) : []);
|
|
416
|
+
socket.hold([
|
|
417
|
+
...named.map(({ entry, at }) => presented(entry.authority, at)),
|
|
418
|
+
...(site ? [] : unheld).map((entry) => presented(entry.authority, { position: '0', logEpoch: entry.logEpoch })),
|
|
419
|
+
], runtime, listedCursor);
|
|
420
|
+
if (site)
|
|
421
|
+
return;
|
|
422
|
+
const made = unheld.filter((entry) => entry.position === '0');
|
|
423
|
+
queueMicrotask(() => {
|
|
424
|
+
for (const entry of made) {
|
|
425
|
+
const version = roomVersion(entry);
|
|
426
|
+
emit({
|
|
427
|
+
kind: 'room-change',
|
|
428
|
+
locator: entry.locator,
|
|
429
|
+
from: null,
|
|
430
|
+
roomVersion: version,
|
|
431
|
+
read: () => changePage(entry, [], version, mode, spaces, true),
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
});
|
|
366
435
|
},
|
|
367
436
|
track(entries) {
|
|
368
437
|
tracking.clear();
|
package/dist/transport.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ConversationEvent, TurnOperation } from '@agentshouse/mdruntime';
|
|
1
|
+
import type { ConversationEvent, SavedFacts, TurnOperation } from '@agentshouse/mdruntime';
|
|
2
2
|
export declare const HOUSE_RUNTIME_READS: {
|
|
3
|
-
readonly acts: readonly ['account/push', 'agents/read', 'apps/features/set', 'apps/source/download', 'apps/source/top', 'batch', 'batch-upload', 'bootstrap', 'conversations/history', 'discover', 'files/attach', 'files/finish', 'files/get', 'revisions', 'search', 'sites/screenshot/read'];
|
|
3
|
+
readonly acts: readonly ['account/push', 'agents/read', 'apps/features/set', 'apps/source/download', 'apps/source/top', 'batch', 'batch-upload', 'bootstrap', 'conversations/history', 'discover', 'files/attach', 'files/finish', 'files/get', 'revisions', 'room-chunks/list', 'search', 'sites/screenshot/read'];
|
|
4
4
|
readonly frames: readonly ['app-message', 'authority_changed', 'carried', 'caught_up', 'commands', 'conversation', 'conversation_deleted', 'conversations', 'deliveries', 'deployment', 'held', 'interactions', 'link', 'message', 'opening', 'options', 'part', 'process', 'received', 'signal', 'site', 'starting', 'subagents', 'tab-icon', 'turn'];
|
|
5
5
|
};
|
|
6
6
|
export type HouseRuntimeAct = (typeof HOUSE_RUNTIME_READS.acts)[number];
|
|
@@ -43,6 +43,8 @@ export type HouseStreamEntry = {
|
|
|
43
43
|
name: string;
|
|
44
44
|
};
|
|
45
45
|
created_at?: string;
|
|
46
|
+
facts?: SavedFacts;
|
|
47
|
+
space?: string;
|
|
46
48
|
};
|
|
47
49
|
type LiveFact<K extends ConversationEvent['kind']> = Extract<ConversationEvent, {
|
|
48
50
|
kind: K;
|
|
@@ -179,7 +181,6 @@ export type HouseDoor = {
|
|
|
179
181
|
stream: HouseStream;
|
|
180
182
|
};
|
|
181
183
|
export type HouseTransport = HouseDoor & {
|
|
182
|
-
streamed(route: string, body: unknown, signal: AbortSignal): Promise<HouseStreamed>;
|
|
183
184
|
transfer(request: HouseByteTransfer): Promise<HouseDoorAnswer>;
|
|
184
185
|
put(url: string, body: Blob, headers: Readonly<Record<string, string>>): Promise<number>;
|
|
185
186
|
download(url: string): Promise<HouseBytesAnswer>;
|
package/dist/transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","s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AC,gBAAgB,CAAC,CAAC;CACpD,CAAC"}
|
package/dist/transport.js
CHANGED
package/dist/write.js
CHANGED
|
@@ -230,7 +230,7 @@ function* acceptedOf(at, contents) {
|
|
|
230
230
|
answer.changes.set(entry.path, entry.head);
|
|
231
231
|
}
|
|
232
232
|
const unbinaried = answer.binaryFiles.size === 0;
|
|
233
|
-
const { binaryFiles, ...room } = yield* answered(answer);
|
|
233
|
+
const { binaryFiles, facts: _facts, ...room } = yield* answered(answer);
|
|
234
234
|
return { roomVersion: roomVersion(at), ...room, ...(unbinaried ? {} : { binaryFiles }) };
|
|
235
235
|
}
|
|
236
236
|
function* movedOutcome(held, move) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/mdruntime-adapter",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-c82ec25e72f2f",
|
|
4
4
|
"description": "Agents House Adapter for the MD Runtime",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"LICENSE"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@agentshouse/mdruntime": "0.1.0-
|
|
27
|
+
"@agentshouse/mdruntime": "0.1.0-c37ed9e81aef7"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|