@agentshouse/mdruntime-adapter 0.1.0-c392f202fd8ec → 0.1.0-c39809d14a99f

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.
Files changed (53) hide show
  1. package/dist/actions.d.ts +2 -163
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js +7 -222
  4. package/dist/adapter.d.ts.map +1 -1
  5. package/dist/adapter.js +65 -70
  6. package/dist/chunks.d.ts +38 -0
  7. package/dist/chunks.d.ts.map +1 -0
  8. package/dist/chunks.js +247 -0
  9. package/dist/discovery.d.ts +10 -3
  10. package/dist/discovery.d.ts.map +1 -1
  11. package/dist/discovery.js +35 -8
  12. package/dist/history.d.ts +12 -0
  13. package/dist/history.d.ts.map +1 -0
  14. package/dist/history.js +92 -0
  15. package/dist/house-model.d.ts +282 -2593
  16. package/dist/house-model.d.ts.map +1 -1
  17. package/dist/house-model.js +153 -1419
  18. package/dist/index.d.ts +6 -4
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +5 -3
  21. package/dist/model.d.ts +5 -7
  22. package/dist/model.d.ts.map +1 -1
  23. package/dist/model.js +30 -18
  24. package/dist/read.d.ts +19 -9
  25. package/dist/read.d.ts.map +1 -1
  26. package/dist/read.js +46 -143
  27. package/dist/room-types.d.ts +2 -2
  28. package/dist/room-types.d.ts.map +1 -1
  29. package/dist/room-types.js +6 -9
  30. package/dist/search.d.ts +5 -0
  31. package/dist/search.d.ts.map +1 -0
  32. package/dist/search.js +47 -0
  33. package/dist/site.d.ts.map +1 -1
  34. package/dist/site.js +34 -42
  35. package/dist/space-schema.d.ts +7 -0
  36. package/dist/space-schema.d.ts.map +1 -0
  37. package/dist/space-schema.js +18 -0
  38. package/dist/stream.d.ts +6 -4
  39. package/dist/stream.d.ts.map +1 -1
  40. package/dist/stream.js +119 -20
  41. package/dist/transport.d.ts +20 -11
  42. package/dist/transport.d.ts.map +1 -1
  43. package/dist/transport.js +5 -1
  44. package/dist/write.d.ts +2 -1
  45. package/dist/write.d.ts.map +1 -1
  46. package/dist/write.js +8 -23
  47. package/package.json +2 -2
  48. package/dist/part.d.ts +0 -14
  49. package/dist/part.d.ts.map +0 -1
  50. package/dist/part.js +0 -90
  51. package/dist/room-stream.d.ts +0 -19
  52. package/dist/room-stream.d.ts.map +0 -1
  53. package/dist/room-stream.js +0 -57
package/dist/site.js CHANGED
@@ -1,13 +1,13 @@
1
- import { stepped } from '@agentshouse/mdruntime';
2
- import { actionOutcome, SITE_SUBMIT } from './actions.js';
1
+ import { actionOutcome } from './actions.js';
2
+ import { chunkedHead, chunkPart, siteChunkList } from './chunks.js';
3
3
  import { mapDiscovery, parseSiteDiscovery, siteCapabilities, siteTracked, } from './discovery.js';
4
- import { bootstrapping } from './read.js';
5
- import { roomStreams } from './room-stream.js';
6
- import { classifyDoor, discoveryFailure } from './refusal.js';
4
+ import { spaceSchemas } from './space-schema.js';
5
+ import { discoveryFailure } from './refusal.js';
6
+ import { HOUSE_TYPED_PATHS } from './house-model.js';
7
7
  import { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES } from './room-types.js';
8
8
  import { houseNotifications } from './stream.js';
9
- import { houseSiteRoute, SITE_DOOR_SUBMIT, SITE_FILES, } from './transport.js';
10
- import { followsVersion, logPosition, presented, reachedVersion, roomVersion } from './version.js';
9
+ import { houseSiteRoute, SITE_DOOR_SUBMIT, SITE_FILES, SITE_SUBMISSION, } from './transport.js';
10
+ import { followsVersion, reachedVersion, roomVersion } from './version.js';
11
11
  const UNCERTAIN = { kind: 'transport-uncertainty' };
12
12
  function unfound() {
13
13
  return { kind: 'rejected', code: 'file_not_found', fields: {}, retryable: false };
@@ -18,50 +18,47 @@ function siteRoom(tracked) {
18
18
  locator: tracked.locator,
19
19
  handle: tracked.handle,
20
20
  roomVersion: roomVersion(tracked),
21
- operations: { write: [], delete: [] },
21
+ operations: { write: [], erase: [] },
22
22
  replica: { selection: tracked.locator, admission: 'admitted', offline: 'open' },
23
23
  providerOwnedPaths: [],
24
24
  };
25
25
  }
26
26
  export function createSiteAdapter(transport, snapshot = false) {
27
+ const spaces = spaceSchemas();
27
28
  const notifications = houseNotifications(transport, 'site', {
28
29
  opened: async () => {
29
30
  const found = await discovered();
30
31
  return found.kind === 'discovery' ? found : null;
31
32
  },
32
33
  changed: () => null,
33
- });
34
+ }, spaces);
34
35
  const tracked = new Map();
35
- const read = new Map();
36
- const rooms = roomStreams('site');
36
+ const chunked = new Map();
37
37
  function fileRoute(request) {
38
38
  const entry = tracked.get(request.locator);
39
39
  if (entry === undefined)
40
40
  return { kind: 'room-not-readable', locator: request.locator };
41
41
  return `${SITE_FILES}${entry.authority}/${encodeURIComponent(request.revision)}/${encodeURIComponent(request.path)}`;
42
42
  }
43
- async function openedRoom(entry, arriving, signal) {
44
- const cut = read.get(entry.locator);
45
- const answered = await transport.streamed(`${houseSiteRoute('bootstrap')}/${entry.authority}${cut === undefined ? '' : `?expired=${cut}`}`, signal ?? new AbortController().signal);
46
- if (answered.room === null)
47
- return classifyDoor(answered.status, answered.body, entry.locator) ?? UNCERTAIN;
48
- const head = await rooms.head(entry, answered.room, arriving, signal);
49
- const at = head.kind === 'bootstrap' ? logPosition(head.roomVersion) : null;
50
- if (at !== null)
51
- read.set(entry.locator, at.position);
43
+ async function listedRoom(entry) {
44
+ const past = chunked.get(entry.locator)?.position;
45
+ const listed = siteChunkList(await transport.read(`${houseSiteRoute('chunks')}/${entry.authority}${past === undefined ? '' : `?expired=${past}`}`), entry.locator);
46
+ if ('kind' in listed)
47
+ return listed;
48
+ const head = await chunkedHead(listed, entry, spaces);
49
+ if (head.kind === 'bootstrap')
50
+ chunked.set(entry.locator, listed);
52
51
  return head;
53
52
  }
54
- async function streamedPage(entry, token) {
55
- const part = await rooms.part(entry, token);
56
- if ('kind' in part)
57
- return part;
58
- const { folders: _folders, ...page } = await stepped(bootstrapping(part.scope));
59
- return {
60
- ...page,
61
- ...(part.models === undefined ? {} : { models: part.models }),
62
- ...(part.pageToken === undefined ? {} : { pageToken: part.pageToken }),
63
- bytes: part.bytes,
64
- };
53
+ async function chunkPage(entry, id, arriving) {
54
+ const room = chunked.get(entry.locator);
55
+ const address = room?.chunks.get(id);
56
+ if (room === undefined || address === undefined)
57
+ return UNCERTAIN;
58
+ const read = await transport.download(address.url);
59
+ if (read.status !== 200)
60
+ return UNCERTAIN;
61
+ return chunkPart(read.body, room, id, arriving);
65
62
  }
66
63
  async function discovered() {
67
64
  const answer = await transport.read(houseSiteRoute('discover'));
@@ -82,6 +79,7 @@ export function createSiteAdapter(transport, snapshot = false) {
82
79
  localSaves: true,
83
80
  roomTypes: HOUSE_ROOM_TYPES,
84
81
  nameableRoomTypes: HOUSE_NAMEABLE_ROOM_TYPES,
82
+ typedPaths: HOUSE_TYPED_PATHS,
85
83
  async authorize() {
86
84
  return {};
87
85
  },
@@ -90,8 +88,8 @@ export function createSiteAdapter(transport, snapshot = false) {
90
88
  if (entry === undefined)
91
89
  return { kind: 'room-not-readable', locator: request.locator };
92
90
  return request.pageToken === undefined
93
- ? openedRoom(entry, request.arriving, request.signal)
94
- : streamedPage(entry, request.pageToken);
91
+ ? listedRoom(entry)
92
+ : chunkPage(entry, request.pageToken, request.arriving);
95
93
  },
96
94
  ...(snapshot
97
95
  ? {
@@ -145,7 +143,7 @@ export function createSiteAdapter(transport, snapshot = false) {
145
143
  return followsVersion(version, next);
146
144
  },
147
145
  async action(_authorization, request) {
148
- if (request.name !== SITE_SUBMIT) {
146
+ if (request.name !== SITE_SUBMISSION) {
149
147
  return {
150
148
  kind: 'rejected',
151
149
  code: 'action-unimplemented',
@@ -155,18 +153,12 @@ export function createSiteAdapter(transport, snapshot = false) {
155
153
  }
156
154
  if (!transport.online())
157
155
  return UNCERTAIN;
158
- return actionOutcome(await transport.door(SITE_DOOR_SUBMIT, request.input), SITE_SUBMIT);
156
+ return actionOutcome(await transport.door(SITE_DOOR_SUBMIT, request.input), SITE_SUBMISSION, request.input);
159
157
  },
160
158
  roomStream: snapshot
161
159
  ? undefined
162
160
  : {
163
- hold(rooms) {
164
- notifications.send(rooms.flatMap((room) => {
165
- const entry = tracked.get(room.locator);
166
- const at = logPosition(room.roomVersion);
167
- return entry === undefined || at === null ? [] : [presented(entry.authority, at)];
168
- }));
169
- },
161
+ hold: notifications.send,
170
162
  observe: notifications.observe,
171
163
  },
172
164
  serviceMode: notifications.serviceMode,
@@ -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 { type HouseDoor, type HouseHeldRoom, type HouseMode, type HouseStreamFrame } from './transport.js';
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 HouseHeldRoom[]): void;
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
@@ -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,EAIvB,KAAK,eAAe,EAEpB,KAAK,i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B,CAChC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,gBAAgB,EAC7B,MAAM,EAAE,YAAY,GACnB,kBAAkB,CA8XpB"}
package/dist/stream.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ROW_WEIGHT, stepped, } from '@agentshouse/mdruntime';
2
- import { acceptedMessage, cursorPosition } from './actions.js';
3
- import { streamedModels } from './model.js';
4
- import { answered, answering, binaryFileOf, folded, forgotten, headChange, revised, } from './read.js';
2
+ import { acceptedMessage, cursorPosition, houseHistory } from './history.js';
3
+ import { keptSpaceSchemas, streamedModels } from './model.js';
4
+ import { answered, answering, binaryFileOf, createdOf, 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);
@@ -32,6 +32,7 @@ function listedConversation(listed) {
32
32
  outcome: listed.outcome,
33
33
  waiting: listed.waiting,
34
34
  newest: listed.newest === null ? null : cursorPosition(listed.newest),
35
+ processEnded: listed.process_ended_at,
35
36
  };
36
37
  }
37
38
  function position(value) {
@@ -50,6 +51,10 @@ function* changed(tracked, entries, version, schemas) {
50
51
  if (entry.path === tracked.schema)
51
52
  schemas.set(entry.path, entry);
52
53
  forgotten(answer, entry.path);
54
+ if (entry.space !== undefined) {
55
+ answer.removals.add(entry.path);
56
+ continue;
57
+ }
53
58
  if (entry.kind === 'removed') {
54
59
  answer.removals.add(entry.path);
55
60
  continue;
@@ -59,37 +64,51 @@ function* changed(tracked, entries, version, schemas) {
59
64
  answer.documents.set(entry.path, entry.text ?? '');
60
65
  else if (binary !== null)
61
66
  answer.binaryFiles.set(entry.path, binary);
67
+ if (binary === undefined && entry.facts !== undefined)
68
+ answer.facts.set(entry.path, entry.facts);
62
69
  const revision = entry.revision ?? binary?.sha256;
63
70
  if (revision !== undefined)
64
71
  revised(answer, entry.path, revision);
65
72
  const head = headChange(entry);
66
73
  if (head)
67
74
  answer.changes.set(entry.path, head);
75
+ const created = createdOf(entry);
76
+ if (created)
77
+ answer.created.set(entry.path, created);
68
78
  }
69
79
  return { kind: 'net-advancement', roomVersion: version, ...(yield* answered(answer)) };
70
80
  }
71
- async function changePage(tracked, entries, version, mode) {
81
+ async function changePage(tracked, entries, version, mode, spaces, whole) {
72
82
  const schemas = new Map();
73
83
  const page = await stepped(changed(tracked, entries, version, schemas));
74
- const models = await streamedModels(schemas, tracked, mode);
84
+ const models = await streamedModels(schemas, tracked, mode, spaces, whole);
75
85
  return models === undefined ? page : { ...page, models };
76
86
  }
77
- export function houseNotifications(transport, mode, discovering) {
87
+ export function houseNotifications(transport, mode, discovering, spaces) {
78
88
  const stream = transport.stream;
79
89
  const staged = new Map();
80
90
  let socket = null;
81
91
  const tracking = new Map();
82
92
  const observers = new Set();
93
+ const replaying = new Map();
83
94
  const conversationObservers = new Set();
84
95
  const modeObservers = new Set();
85
96
  let replicated = [];
97
+ let listedCursor = null;
98
+ const unanswered = [];
99
+ const heldAtZero = new Set();
86
100
  const live = new Set();
87
101
  let opening = null;
88
102
  let announced = null;
89
103
  const runtime = crypto.randomUUID();
90
104
  function emit(event) {
91
- for (const observer of observers)
92
- observer(event);
105
+ for (const observer of observers) {
106
+ const held = replaying.get(observer);
107
+ if (held === undefined)
108
+ observer(event);
109
+ else
110
+ held.push(event);
111
+ }
93
112
  }
94
113
  function emitConversation(event) {
95
114
  if (event.kind === 'turn' ||
@@ -98,6 +117,7 @@ export function houseNotifications(transport, mode, discovering) {
98
117
  event.kind === 'commands' ||
99
118
  event.kind === 'options' ||
100
119
  event.kind === 'starting' ||
120
+ event.kind === 'subagents' ||
101
121
  event.kind === 'link' ||
102
122
  event.kind === 'deliveries') {
103
123
  live.add(event.conversation);
@@ -110,6 +130,8 @@ export function houseNotifications(transport, mode, discovering) {
110
130
  announced = null;
111
131
  socket = next;
112
132
  staged.clear();
133
+ unanswered.length = 0;
134
+ heldAtZero.clear();
113
135
  const gapped = new Set([...replicated, ...live]);
114
136
  live.clear();
115
137
  for (const conversation of gapped)
@@ -150,6 +172,7 @@ export function houseNotifications(transport, mode, discovering) {
150
172
  return;
151
173
  emitConversation({ kind: 'commands', conversation, commands: [] });
152
174
  emitConversation({ kind: 'options', conversation, options: [] });
175
+ emitConversation({ kind: 'subagents', conversation, subagents: [] });
153
176
  return;
154
177
  }
155
178
  if (frame.type === 'commands') {
@@ -168,6 +191,14 @@ export function houseNotifications(transport, mode, discovering) {
168
191
  emitConversation({ kind: 'starting', conversation, step: frame.step });
169
192
  return;
170
193
  }
194
+ if (frame.type === 'subagents') {
195
+ emitConversation({
196
+ kind: 'subagents',
197
+ conversation,
198
+ subagents: structuredClone(frame.subagents),
199
+ });
200
+ return;
201
+ }
171
202
  if (frame.type === 'link') {
172
203
  emitConversation({ kind: 'link', conversation, connected: frame.connected });
173
204
  return;
@@ -202,6 +233,7 @@ export function houseNotifications(transport, mode, discovering) {
202
233
  }
203
234
  }
204
235
  const next = held ?? { authority: frame.authority, parts: 0, entries: [] };
236
+ keptSpaceSchemas(frame.entries, spaces);
205
237
  next.entries.push(...frame.entries);
206
238
  next.parts += 1;
207
239
  staged.set(frame.carry, next);
@@ -229,9 +261,13 @@ export function houseNotifications(transport, mode, discovering) {
229
261
  return;
230
262
  }
231
263
  if (frame.type === 'caught_up') {
264
+ discovering.expired?.(frame.expired);
232
265
  emit({
233
266
  kind: 'caught-up',
234
- expired: frame.expired.flatMap((authority) => (tracking.get(authority) ?? []).map((tracked) => tracked.locator)),
267
+ expired: [
268
+ ...frame.expired.flatMap((authority) => (tracking.get(authority) ?? []).map((tracked) => tracked.locator)),
269
+ ...(unanswered.shift() ?? []),
270
+ ],
235
271
  });
236
272
  return;
237
273
  }
@@ -242,7 +278,13 @@ export function houseNotifications(transport, mode, discovering) {
242
278
  return;
243
279
  }
244
280
  if (frame.type === 'conversations') {
245
- emitConversation({ kind: 'list', entries: frame.conversations.map(listedConversation) });
281
+ emitConversation({
282
+ kind: 'list',
283
+ entries: frame.conversations.map(listedConversation),
284
+ whole: frame.whole,
285
+ more: frame.more,
286
+ cursor: frame.cursor,
287
+ });
246
288
  return;
247
289
  }
248
290
  if (frame.type === 'conversation') {
@@ -258,6 +300,7 @@ export function houseNotifications(transport, mode, discovering) {
258
300
  frame.type === 'commands' ||
259
301
  frame.type === 'options' ||
260
302
  frame.type === 'starting' ||
303
+ frame.type === 'subagents' ||
261
304
  frame.type === 'link' ||
262
305
  frame.type === 'deliveries' ||
263
306
  frame.type === 'interactions' ||
@@ -275,7 +318,9 @@ export function houseNotifications(transport, mode, discovering) {
275
318
  const after = position(frame.after);
276
319
  if (at === null || after === null || after >= at)
277
320
  return;
278
- const from = roomVersion({ position: frame.after, logEpoch: frame.log_epoch });
321
+ const from = after === 0n && !heldAtZero.has(frame.authority)
322
+ ? null
323
+ : roomVersion({ position: frame.after, logEpoch: frame.log_epoch });
279
324
  const version = roomVersion({ position: frame.position, logEpoch: frame.log_epoch });
280
325
  for (const tracked of tracking.get(frame.authority) ?? []) {
281
326
  emit({
@@ -283,18 +328,20 @@ export function houseNotifications(transport, mode, discovering) {
283
328
  locator: tracked.locator,
284
329
  from,
285
330
  roomVersion: version,
286
- read: () => changePage(tracked, entries, version, mode),
331
+ read: () => changePage(tracked, entries, version, mode, spaces, from === null),
287
332
  });
288
333
  }
289
334
  }
290
335
  stream.observe((frame) => handle(frame, socket));
291
336
  stream.opened(reopened);
292
- stream.closed(({ revoked, lost }) => {
337
+ stream.closed(({ revoked, lost, authorityChanged }) => {
293
338
  opening = null;
294
339
  announced = null;
295
340
  socket = null;
296
341
  staged.clear();
297
- emit({ kind: 'closed', revoked, lost });
342
+ unanswered.length = 0;
343
+ heldAtZero.clear();
344
+ emit({ kind: 'closed', revoked, lost, authorityChanged });
298
345
  });
299
346
  return {
300
347
  runtime,
@@ -310,21 +357,33 @@ export function houseNotifications(transport, mode, discovering) {
310
357
  replicate(next) {
311
358
  replicated = [...next];
312
359
  },
360
+ hold(cursor) {
361
+ listedCursor = cursor;
362
+ },
313
363
  observe(notify) {
314
364
  conversationObservers.add(notify);
315
365
  return () => {
316
366
  conversationObservers.delete(notify);
317
367
  };
318
368
  },
319
- ...(mode === 'credential' ? { agents: () => houseAgents(transport) } : {}),
369
+ ...(mode === 'credential'
370
+ ? {
371
+ agents: () => houseAgents(transport),
372
+ history: (request) => houseHistory(transport, request),
373
+ }
374
+ : {}),
320
375
  },
321
376
  observe(notify) {
322
377
  observers.add(notify);
323
- const replayed = opening === null ? [] : [{ kind: 'opened' }, announced];
324
- if (replayed.length > 0) {
378
+ if (opening !== null) {
379
+ const replayed = [{ kind: 'opened' }];
380
+ if (announced !== null)
381
+ replayed.push(announced);
382
+ replaying.set(notify, replayed);
325
383
  queueMicrotask(() => {
384
+ replaying.delete(notify);
326
385
  for (const event of replayed)
327
- if (event !== null && observers.has(notify))
386
+ if (observers.has(notify))
328
387
  notify(event);
329
388
  });
330
389
  }
@@ -335,7 +394,47 @@ export function houseNotifications(transport, mode, discovering) {
335
394
  send(rooms) {
336
395
  opening = null;
337
396
  announced = null;
338
- socket?.hold(rooms, runtime);
397
+ if (socket === null)
398
+ return;
399
+ const entries = new Map([...tracking.values()].flat().map((tracked) => [tracked.locator, tracked]));
400
+ const named = rooms.flatMap((room) => {
401
+ const entry = entries.get(room.locator);
402
+ const at = room.roomVersion === null ? null : logPosition(room.roomVersion);
403
+ return entry === undefined || at === null ? [] : [{ entry, at }];
404
+ });
405
+ const unheld = rooms.flatMap((room) => {
406
+ const entry = entries.get(room.locator);
407
+ return entry === undefined || room.roomVersion !== null ? [] : [entry];
408
+ });
409
+ for (const { entry, at } of named) {
410
+ if (at.position === '0')
411
+ heldAtZero.add(entry.authority);
412
+ else
413
+ heldAtZero.delete(entry.authority);
414
+ }
415
+ for (const entry of unheld)
416
+ heldAtZero.delete(entry.authority);
417
+ const site = mode === 'site';
418
+ unanswered.push(site ? unheld.map((entry) => entry.locator) : []);
419
+ socket.hold([
420
+ ...named.map(({ entry, at }) => presented(entry.authority, at)),
421
+ ...(site ? [] : unheld).map((entry) => presented(entry.authority, { position: '0', logEpoch: entry.logEpoch })),
422
+ ], runtime, listedCursor);
423
+ if (site)
424
+ return;
425
+ const made = unheld.filter((entry) => entry.position === '0');
426
+ queueMicrotask(() => {
427
+ for (const entry of made) {
428
+ const version = roomVersion(entry);
429
+ emit({
430
+ kind: 'room-change',
431
+ locator: entry.locator,
432
+ from: null,
433
+ roomVersion: version,
434
+ read: () => changePage(entry, [], version, mode, spaces, true),
435
+ });
436
+ }
437
+ });
339
438
  },
340
439
  track(entries) {
341
440
  tracking.clear();
@@ -1,12 +1,13 @@
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', 'discover', 'files/attach', 'files/finish', 'files/get', 'revisions', 'sites/screenshot/read'];
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', 'tab-icon', 'turn'];
3
+ readonly acts: readonly ['account/push', 'agents/read', 'apps/features/set', 'apps/source/download', 'apps/source/top', 'batch', 'batch-upload', 'conversations/history', 'discover', 'files/attach', 'files/finish', 'files/get', 'revisions', 'room-chunks/list', 'search', 'sites/screenshot/read'];
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];
7
7
  export type HouseRuntimeFrame = (typeof HOUSE_RUNTIME_READS.frames)[number];
8
8
  export declare function houseDoorRoute(act: HouseRuntimeAct): string;
9
- export declare function houseSiteRoute(act: Extract<HouseRuntimeAct, 'bootstrap' | 'discover'>): string;
9
+ export declare function houseSiteRoute(act: 'chunks' | 'discover'): string;
10
+ export declare const SITE_SUBMISSION = "site/submission";
10
11
  export declare const SITE_DOOR_SUBMIT = "/_house/door/submit";
11
12
  export type HouseMode = 'credential' | 'site';
12
13
  export type HouseDoorAnswer = {
@@ -41,7 +42,10 @@ export type HouseStreamEntry = {
41
42
  site: string;
42
43
  name: string;
43
44
  };
45
+ changed_at?: string;
44
46
  created_at?: string;
47
+ facts?: SavedFacts;
48
+ space?: string;
45
49
  };
46
50
  type LiveFact<K extends ConversationEvent['kind']> = Extract<ConversationEvent, {
47
51
  kind: K;
@@ -60,6 +64,7 @@ export type HouseListedConversation = {
60
64
  accepted_at: string;
61
65
  message_id: string;
62
66
  } | null;
67
+ process_ended_at: string | null;
63
68
  };
64
69
  type Listed<Frame extends {
65
70
  readonly type: HouseRuntimeFrame;
@@ -83,7 +88,8 @@ export type HouseStreamFrame = Listed<{
83
88
  member: unknown;
84
89
  bounds: unknown;
85
90
  actions: readonly unknown[];
86
- authorities: readonly unknown[];
91
+ shapes: readonly unknown[];
92
+ rooms: readonly unknown[];
87
93
  } | {
88
94
  type: 'caught_up';
89
95
  expired: readonly string[];
@@ -124,6 +130,10 @@ export type HouseStreamFrame = Listed<{
124
130
  type: 'starting';
125
131
  conversation_id: string;
126
132
  step: string | null;
133
+ } | {
134
+ type: 'subagents';
135
+ conversation_id: string;
136
+ subagents: LiveFact<'subagents'>['subagents'];
127
137
  } | {
128
138
  type: 'link';
129
139
  conversation_id: string;
@@ -131,6 +141,9 @@ export type HouseStreamFrame = Listed<{
131
141
  } | {
132
142
  type: 'conversations';
133
143
  conversations: readonly HouseListedConversation[];
144
+ whole: boolean;
145
+ more: boolean;
146
+ cursor: string | null;
134
147
  } | {
135
148
  type: 'conversation';
136
149
  conversation: HouseListedConversation;
@@ -147,28 +160,25 @@ export type HouseHeldRoom = {
147
160
  log_epoch: string;
148
161
  };
149
162
  export type HouseOpening = {
150
- hold(rooms: readonly HouseHeldRoom[], runtime: string): void;
163
+ hold(rooms: readonly HouseHeldRoom[], runtime: string, conversations: string | null): void;
151
164
  received(authority: string, carry: string, index: number): void;
152
165
  close(): void;
153
166
  };
154
167
  export type HouseClosing = {
155
168
  revoked: boolean;
156
169
  lost: boolean;
170
+ authorityChanged: boolean;
157
171
  };
158
172
  export type HouseStream = {
159
173
  observe(receive: (frame: HouseStreamFrame) => void): () => void;
160
174
  opened(notify: (opening: HouseOpening) => void): () => void;
161
175
  closed(notify: (closing: HouseClosing) => void): () => void;
162
176
  };
163
- export type HouseStreamed = HouseDoorAnswer & {
164
- room: ReadableStream<Uint8Array> | null;
165
- };
166
177
  export type HouseDoor = {
167
178
  door(route: string, body: unknown): Promise<HouseDoorAnswer>;
168
179
  stream: HouseStream;
169
180
  };
170
181
  export type HouseTransport = HouseDoor & {
171
- streamed(route: string, body: unknown, signal: AbortSignal): Promise<HouseStreamed>;
172
182
  transfer(request: HouseByteTransfer): Promise<HouseDoorAnswer>;
173
183
  put(url: string, body: Blob, headers: Readonly<Record<string, string>>): Promise<number>;
174
184
  download(url: string): Promise<HouseBytesAnswer>;
@@ -176,7 +186,6 @@ export type HouseTransport = HouseDoor & {
176
186
  export type HouseSiteTransport = HouseDoor & {
177
187
  online(): boolean;
178
188
  read(route: string): Promise<HouseDoorAnswer>;
179
- streamed(route: string, signal: AbortSignal): Promise<HouseStreamed>;
180
189
  download(route: string): Promise<HouseBytesAnswer>;
181
190
  };
182
191
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","s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