@agentshouse/mdruntime-adapter 0.1.0-c8bfc1969f4fe → 0.1.0-c8d322eea4abd
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/README.md +2 -2
- package/dist/actions.d.ts +3 -2
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +22 -6
- package/dist/adapter.d.ts +0 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +78 -81
- package/dist/app-reference.d.ts +0 -1
- package/dist/authored-path.d.ts +10 -0
- package/dist/authored-path.d.ts.map +1 -0
- package/dist/authored-path.js +35 -0
- package/dist/chunks.d.ts +37 -0
- package/dist/chunks.d.ts.map +1 -0
- package/dist/chunks.js +247 -0
- package/dist/crockford.d.ts +0 -1
- package/dist/digest.d.ts +0 -1
- package/dist/discovery.d.ts +11 -6
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +39 -13
- package/dist/history.d.ts +0 -1
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +3 -2
- package/dist/house-model.d.ts +120 -366
- package/dist/house-model.d.ts.map +1 -1
- package/dist/house-model.js +104 -214
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/map.d.ts +0 -1
- package/dist/model.d.ts +5 -8
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +30 -18
- package/dist/read.d.ts +19 -10
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +46 -143
- package/dist/refusal.d.ts +1 -1
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +5 -1
- package/dist/room-types.d.ts +0 -3
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +6 -11
- package/dist/search.d.ts +4 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +47 -0
- package/dist/session-content/bounds.d.ts +7 -0
- package/dist/session-content/check.d.ts +18 -0
- package/dist/session-content/index.d.ts +7 -0
- package/dist/session-content/parts.d.ts +102 -0
- package/dist/session-content/state.d.ts +61 -0
- package/dist/session-content/turn.d.ts +328 -0
- package/dist/site.d.ts +0 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +38 -42
- package/dist/space-schema.d.ts +6 -0
- package/dist/space-schema.d.ts.map +1 -0
- package/dist/space-schema.js +18 -0
- package/dist/stream.d.ts +6 -5
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +101 -29
- package/dist/transport.d.ts +23 -18
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +13 -12
- package/dist/upload.d.ts +0 -1
- package/dist/version.d.ts +0 -1
- package/dist/write.d.ts +2 -3
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +11 -28
- package/package.json +2 -2
- package/dist/part.d.ts +0 -14
- package/dist/part.d.ts.map +0 -1
- package/dist/part.js +0 -90
- package/dist/room-stream.d.ts +0 -19
- package/dist/room-stream.d.ts.map +0 -1
- package/dist/room-stream.js +0 -57
|
@@ -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,14 @@ 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;
|
|
23
|
-
//# sourceMappingURL=stream.d.ts.map
|
|
24
|
+
export declare function houseNotifications(transport: HouseDoor, mode: HouseMode, discovering: HouseDiscovering, spaces: SpaceSchemas): HouseNotifications;
|
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,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAYtD,OAAO,EAEL,KAAK,SAAS,EAEd,KAAK,SAAS,EAGd,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AAaxB,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAE/E,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAAC;AAElG,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACnE,OAAO,CAAC,KAAK,EAAE,0BAA0B,GAAG,eAAe,GAAG,IAAI,CAAC;IACnE,OAAO,CAAC,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAC;IACvC,KAAK,CAAC,WAAW,EAAE,SAAS,gBAAgB,EAAE,GAAG,IAAI,CAAC;IACtD,aAAa,EAAE,kBAAkB,CAAC;IAClC,WAAW,EAAE,iBAAiB,CAAC;CAChC,CAAC;AA+FF,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,gBAAgB,EAC7B,MAAM,EAAE,YAAY,GACnB,kBAAkB,CA0XpB"}
|
package/dist/stream.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { ROW_WEIGHT, stepped, } from '@agentshouse/mdruntime';
|
|
2
2
|
import { acceptedMessage, cursorPosition, houseHistory } from './history.js';
|
|
3
|
-
import { streamedModels } from './model.js';
|
|
4
|
-
import { answered, answering, binaryFileOf, folded, forgotten, headChange, revised, } from './read.js';
|
|
3
|
+
import { keptSpaceSchemas, streamedModels } from './model.js';
|
|
4
|
+
import { answered, answering, binaryFileOf, createdOf, folded, forgotten, headChange, revised, } from './read.js';
|
|
5
|
+
import { classifyDoor } from './refusal.js';
|
|
5
6
|
import { houseDoorRoute, } from './transport.js';
|
|
6
|
-
import { DECIMAL, roomVersion } from './version.js';
|
|
7
|
+
import { DECIMAL, logPosition, presented, roomVersion } from './version.js';
|
|
7
8
|
function turnOperation(frame) {
|
|
8
|
-
|
|
9
|
-
return structuredClone(operation);
|
|
9
|
+
return 'at' in frame ? { op: 'begin', at: frame.at } : structuredClone(frame.operation);
|
|
10
10
|
}
|
|
11
11
|
async function houseAgents(transport) {
|
|
12
|
-
const answer = await transport.door(houseDoorRoute('agents/
|
|
12
|
+
const answer = await transport.door(houseDoorRoute('agents/list'), {});
|
|
13
|
+
if (classifyDoor(answer.status, answer.body, 'agents/list')?.kind === 'transport-uncertainty') {
|
|
14
|
+
throw new Error();
|
|
15
|
+
}
|
|
13
16
|
const agents = answer.status === 200 ? answer.body?.agents : null;
|
|
14
17
|
if (!Array.isArray(agents))
|
|
15
18
|
return null;
|
|
@@ -32,6 +35,7 @@ function listedConversation(listed) {
|
|
|
32
35
|
outcome: listed.outcome,
|
|
33
36
|
waiting: listed.waiting,
|
|
34
37
|
newest: listed.newest === null ? null : cursorPosition(listed.newest),
|
|
38
|
+
processEnded: listed.process_ended_at,
|
|
35
39
|
};
|
|
36
40
|
}
|
|
37
41
|
function position(value) {
|
|
@@ -50,6 +54,10 @@ function* changed(tracked, entries, version, schemas) {
|
|
|
50
54
|
if (entry.path === tracked.schema)
|
|
51
55
|
schemas.set(entry.path, entry);
|
|
52
56
|
forgotten(answer, entry.path);
|
|
57
|
+
if (entry.space !== undefined) {
|
|
58
|
+
answer.removals.add(entry.path);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
53
61
|
if (entry.kind === 'removed') {
|
|
54
62
|
answer.removals.add(entry.path);
|
|
55
63
|
continue;
|
|
@@ -59,38 +67,51 @@ function* changed(tracked, entries, version, schemas) {
|
|
|
59
67
|
answer.documents.set(entry.path, entry.text ?? '');
|
|
60
68
|
else if (binary !== null)
|
|
61
69
|
answer.binaryFiles.set(entry.path, binary);
|
|
70
|
+
if (binary === undefined && entry.facts !== undefined)
|
|
71
|
+
answer.facts.set(entry.path, entry.facts);
|
|
62
72
|
const revision = entry.revision ?? binary?.sha256;
|
|
63
73
|
if (revision !== undefined)
|
|
64
74
|
revised(answer, entry.path, revision);
|
|
65
75
|
const head = headChange(entry);
|
|
66
76
|
if (head)
|
|
67
77
|
answer.changes.set(entry.path, head);
|
|
78
|
+
const created = createdOf(entry);
|
|
79
|
+
if (created)
|
|
80
|
+
answer.created.set(entry.path, created);
|
|
68
81
|
}
|
|
69
82
|
return { kind: 'net-advancement', roomVersion: version, ...(yield* answered(answer)) };
|
|
70
83
|
}
|
|
71
|
-
async function changePage(tracked, entries, version, mode) {
|
|
84
|
+
async function changePage(tracked, entries, version, mode, spaces, whole) {
|
|
72
85
|
const schemas = new Map();
|
|
73
86
|
const page = await stepped(changed(tracked, entries, version, schemas));
|
|
74
|
-
const models = await streamedModels(schemas, tracked, mode);
|
|
87
|
+
const models = await streamedModels(schemas, tracked, mode, spaces, whole);
|
|
75
88
|
return models === undefined ? page : { ...page, models };
|
|
76
89
|
}
|
|
77
|
-
export function houseNotifications(transport, mode, discovering) {
|
|
90
|
+
export function houseNotifications(transport, mode, discovering, spaces) {
|
|
78
91
|
const stream = transport.stream;
|
|
79
92
|
const staged = new Map();
|
|
80
93
|
let socket = null;
|
|
81
94
|
const tracking = new Map();
|
|
82
95
|
const observers = new Set();
|
|
96
|
+
const replaying = new Map();
|
|
83
97
|
const conversationObservers = new Set();
|
|
84
98
|
const modeObservers = new Set();
|
|
85
99
|
let replicated = [];
|
|
86
100
|
let listedCursor = null;
|
|
101
|
+
const unanswered = [];
|
|
102
|
+
const heldAtZero = new Set();
|
|
87
103
|
const live = new Set();
|
|
88
104
|
let opening = null;
|
|
89
105
|
let announced = null;
|
|
90
106
|
const runtime = crypto.randomUUID();
|
|
91
107
|
function emit(event) {
|
|
92
|
-
for (const observer of observers)
|
|
93
|
-
observer
|
|
108
|
+
for (const observer of observers) {
|
|
109
|
+
const held = replaying.get(observer);
|
|
110
|
+
if (held === undefined)
|
|
111
|
+
observer(event);
|
|
112
|
+
else
|
|
113
|
+
held.push(event);
|
|
114
|
+
}
|
|
94
115
|
}
|
|
95
116
|
function emitConversation(event) {
|
|
96
117
|
if (event.kind === 'turn' ||
|
|
@@ -99,7 +120,7 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
99
120
|
event.kind === 'commands' ||
|
|
100
121
|
event.kind === 'options' ||
|
|
101
122
|
event.kind === 'starting' ||
|
|
102
|
-
event.kind === '
|
|
123
|
+
event.kind === 'state' ||
|
|
103
124
|
event.kind === 'link' ||
|
|
104
125
|
event.kind === 'deliveries') {
|
|
105
126
|
live.add(event.conversation);
|
|
@@ -112,6 +133,8 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
112
133
|
announced = null;
|
|
113
134
|
socket = next;
|
|
114
135
|
staged.clear();
|
|
136
|
+
unanswered.length = 0;
|
|
137
|
+
heldAtZero.clear();
|
|
115
138
|
const gapped = new Set([...replicated, ...live]);
|
|
116
139
|
live.clear();
|
|
117
140
|
for (const conversation of gapped)
|
|
@@ -152,7 +175,7 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
152
175
|
return;
|
|
153
176
|
emitConversation({ kind: 'commands', conversation, commands: [] });
|
|
154
177
|
emitConversation({ kind: 'options', conversation, options: [] });
|
|
155
|
-
emitConversation({ kind: '
|
|
178
|
+
emitConversation({ kind: 'state', conversation, state: null });
|
|
156
179
|
return;
|
|
157
180
|
}
|
|
158
181
|
if (frame.type === 'commands') {
|
|
@@ -171,12 +194,8 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
171
194
|
emitConversation({ kind: 'starting', conversation, step: frame.step });
|
|
172
195
|
return;
|
|
173
196
|
}
|
|
174
|
-
if (frame.type === '
|
|
175
|
-
emitConversation({
|
|
176
|
-
kind: 'subagents',
|
|
177
|
-
conversation,
|
|
178
|
-
subagents: structuredClone(frame.subagents),
|
|
179
|
-
});
|
|
197
|
+
if (frame.type === 'state') {
|
|
198
|
+
emitConversation({ kind: 'state', conversation, state: structuredClone(frame.state) });
|
|
180
199
|
return;
|
|
181
200
|
}
|
|
182
201
|
if (frame.type === 'link') {
|
|
@@ -213,6 +232,7 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
213
232
|
}
|
|
214
233
|
}
|
|
215
234
|
const next = held ?? { authority: frame.authority, parts: 0, entries: [] };
|
|
235
|
+
keptSpaceSchemas(frame.entries, spaces);
|
|
216
236
|
next.entries.push(...frame.entries);
|
|
217
237
|
next.parts += 1;
|
|
218
238
|
staged.set(frame.carry, next);
|
|
@@ -240,9 +260,13 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
240
260
|
return;
|
|
241
261
|
}
|
|
242
262
|
if (frame.type === 'caught_up') {
|
|
263
|
+
discovering.expired?.(frame.expired);
|
|
243
264
|
emit({
|
|
244
265
|
kind: 'caught-up',
|
|
245
|
-
expired:
|
|
266
|
+
expired: [
|
|
267
|
+
...frame.expired.flatMap((authority) => (tracking.get(authority) ?? []).map((tracked) => tracked.locator)),
|
|
268
|
+
...(unanswered.shift() ?? []),
|
|
269
|
+
],
|
|
246
270
|
});
|
|
247
271
|
return;
|
|
248
272
|
}
|
|
@@ -275,7 +299,7 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
275
299
|
frame.type === 'commands' ||
|
|
276
300
|
frame.type === 'options' ||
|
|
277
301
|
frame.type === 'starting' ||
|
|
278
|
-
frame.type === '
|
|
302
|
+
frame.type === 'state' ||
|
|
279
303
|
frame.type === 'link' ||
|
|
280
304
|
frame.type === 'deliveries' ||
|
|
281
305
|
frame.type === 'interactions' ||
|
|
@@ -293,7 +317,9 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
293
317
|
const after = position(frame.after);
|
|
294
318
|
if (at === null || after === null || after >= at)
|
|
295
319
|
return;
|
|
296
|
-
const from =
|
|
320
|
+
const from = after === 0n && !heldAtZero.has(frame.authority)
|
|
321
|
+
? null
|
|
322
|
+
: roomVersion({ position: frame.after, logEpoch: frame.log_epoch });
|
|
297
323
|
const version = roomVersion({ position: frame.position, logEpoch: frame.log_epoch });
|
|
298
324
|
for (const tracked of tracking.get(frame.authority) ?? []) {
|
|
299
325
|
emit({
|
|
@@ -301,18 +327,20 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
301
327
|
locator: tracked.locator,
|
|
302
328
|
from,
|
|
303
329
|
roomVersion: version,
|
|
304
|
-
read: () => changePage(tracked, entries, version, mode),
|
|
330
|
+
read: () => changePage(tracked, entries, version, mode, spaces, from === null),
|
|
305
331
|
});
|
|
306
332
|
}
|
|
307
333
|
}
|
|
308
334
|
stream.observe((frame) => handle(frame, socket));
|
|
309
335
|
stream.opened(reopened);
|
|
310
|
-
stream.closed(({ revoked, lost }) => {
|
|
336
|
+
stream.closed(({ revoked, lost, authorityChanged }) => {
|
|
311
337
|
opening = null;
|
|
312
338
|
announced = null;
|
|
313
339
|
socket = null;
|
|
314
340
|
staged.clear();
|
|
315
|
-
|
|
341
|
+
unanswered.length = 0;
|
|
342
|
+
heldAtZero.clear();
|
|
343
|
+
emit({ kind: 'closed', revoked, lost, authorityChanged });
|
|
316
344
|
});
|
|
317
345
|
return {
|
|
318
346
|
runtime,
|
|
@@ -346,11 +374,15 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
346
374
|
},
|
|
347
375
|
observe(notify) {
|
|
348
376
|
observers.add(notify);
|
|
349
|
-
|
|
350
|
-
|
|
377
|
+
if (opening !== null) {
|
|
378
|
+
const replayed = [{ kind: 'opened' }];
|
|
379
|
+
if (announced !== null)
|
|
380
|
+
replayed.push(announced);
|
|
381
|
+
replaying.set(notify, replayed);
|
|
351
382
|
queueMicrotask(() => {
|
|
383
|
+
replaying.delete(notify);
|
|
352
384
|
for (const event of replayed)
|
|
353
|
-
if (
|
|
385
|
+
if (observers.has(notify))
|
|
354
386
|
notify(event);
|
|
355
387
|
});
|
|
356
388
|
}
|
|
@@ -361,7 +393,47 @@ export function houseNotifications(transport, mode, discovering) {
|
|
|
361
393
|
send(rooms) {
|
|
362
394
|
opening = null;
|
|
363
395
|
announced = null;
|
|
364
|
-
socket
|
|
396
|
+
if (socket === null)
|
|
397
|
+
return;
|
|
398
|
+
const entries = new Map([...tracking.values()].flat().map((tracked) => [tracked.locator, tracked]));
|
|
399
|
+
const named = rooms.flatMap((room) => {
|
|
400
|
+
const entry = entries.get(room.locator);
|
|
401
|
+
const at = room.roomVersion === null ? null : logPosition(room.roomVersion);
|
|
402
|
+
return entry === undefined || at === null ? [] : [{ entry, at }];
|
|
403
|
+
});
|
|
404
|
+
const unheld = rooms.flatMap((room) => {
|
|
405
|
+
const entry = entries.get(room.locator);
|
|
406
|
+
return entry === undefined || room.roomVersion !== null ? [] : [entry];
|
|
407
|
+
});
|
|
408
|
+
for (const { entry, at } of named) {
|
|
409
|
+
if (at.position === '0')
|
|
410
|
+
heldAtZero.add(entry.authority);
|
|
411
|
+
else
|
|
412
|
+
heldAtZero.delete(entry.authority);
|
|
413
|
+
}
|
|
414
|
+
for (const entry of unheld)
|
|
415
|
+
heldAtZero.delete(entry.authority);
|
|
416
|
+
const site = mode === 'site';
|
|
417
|
+
unanswered.push(site ? unheld.map((entry) => entry.locator) : []);
|
|
418
|
+
socket.hold([
|
|
419
|
+
...named.map(({ entry, at }) => presented(entry.authority, at)),
|
|
420
|
+
...(site ? [] : unheld).map((entry) => presented(entry.authority, { position: '0', logEpoch: entry.logEpoch })),
|
|
421
|
+
], runtime, listedCursor);
|
|
422
|
+
if (site)
|
|
423
|
+
return;
|
|
424
|
+
const made = unheld.filter((entry) => entry.position === '0');
|
|
425
|
+
queueMicrotask(() => {
|
|
426
|
+
for (const entry of made) {
|
|
427
|
+
const version = roomVersion(entry);
|
|
428
|
+
emit({
|
|
429
|
+
kind: 'room-change',
|
|
430
|
+
locator: entry.locator,
|
|
431
|
+
from: null,
|
|
432
|
+
roomVersion: version,
|
|
433
|
+
read: () => changePage(entry, [], version, mode, spaces, true),
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
});
|
|
365
437
|
},
|
|
366
438
|
track(entries) {
|
|
367
439
|
tracking.clear();
|
package/dist/transport.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { ConversationEvent,
|
|
1
|
+
import type { ConversationEvent, SavedFacts } from '@agentshouse/mdruntime';
|
|
2
|
+
import type { Operation, SessionState } from './session-content/index.js';
|
|
2
3
|
export declare const HOUSE_RUNTIME_READS: {
|
|
3
|
-
readonly acts: readonly ['account/push', 'agents/
|
|
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', '
|
|
4
|
+
readonly acts: readonly ['account/push/set', 'agents/list', 'apps/features/set', 'apps/source/download', 'apps/source/top/read', 'conversations/history/list', 'files/attach', 'files/batch', 'files/batch-upload', 'files/finish', 'files/read', 'files/revisions/list', 'room-chunks/list', 'rooms/discover', 'rooms/search', 'sites/screenshot/read'];
|
|
5
|
+
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', 'state', 'tab-icon', 'turn'];
|
|
5
6
|
};
|
|
6
7
|
export type HouseRuntimeAct = (typeof HOUSE_RUNTIME_READS.acts)[number];
|
|
7
8
|
export type HouseRuntimeFrame = (typeof HOUSE_RUNTIME_READS.frames)[number];
|
|
8
9
|
export declare function houseDoorRoute(act: HouseRuntimeAct): string;
|
|
9
|
-
export declare function houseSiteRoute(act:
|
|
10
|
-
export declare const
|
|
10
|
+
export declare function houseSiteRoute(act: 'chunks' | 'discover'): string;
|
|
11
|
+
export declare const SITES_SUBMISSIONS_CREATE = "sites/submissions/create";
|
|
11
12
|
export declare const SITE_DOOR_SUBMIT = "/_house/door/submit";
|
|
12
13
|
export type HouseMode = 'credential' | 'site';
|
|
13
14
|
export type HouseDoorAnswer = {
|
|
@@ -15,14 +16,12 @@ export type HouseDoorAnswer = {
|
|
|
15
16
|
body: unknown;
|
|
16
17
|
};
|
|
17
18
|
export declare const SITE_FILES = "/_house/files/";
|
|
18
|
-
export type HouseByteAct = 'authored_batch_upload';
|
|
19
19
|
export type HouseBytesAnswer = {
|
|
20
20
|
status: number;
|
|
21
21
|
body: ReadableStream<Uint8Array> | null;
|
|
22
22
|
mediaType: string;
|
|
23
23
|
};
|
|
24
24
|
export type HouseByteTransfer = {
|
|
25
|
-
act: HouseByteAct;
|
|
26
25
|
url: string;
|
|
27
26
|
body: string;
|
|
28
27
|
};
|
|
@@ -42,7 +41,10 @@ export type HouseStreamEntry = {
|
|
|
42
41
|
site: string;
|
|
43
42
|
name: string;
|
|
44
43
|
};
|
|
44
|
+
changed_at?: string;
|
|
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;
|
|
@@ -61,6 +63,7 @@ export type HouseListedConversation = {
|
|
|
61
63
|
accepted_at: string;
|
|
62
64
|
message_id: string;
|
|
63
65
|
} | null;
|
|
66
|
+
process_ended_at: string | null;
|
|
64
67
|
};
|
|
65
68
|
type Listed<Frame extends {
|
|
66
69
|
readonly type: HouseRuntimeFrame;
|
|
@@ -84,7 +87,8 @@ export type HouseStreamFrame = Listed<{
|
|
|
84
87
|
member: unknown;
|
|
85
88
|
bounds: unknown;
|
|
86
89
|
actions: readonly unknown[];
|
|
87
|
-
|
|
90
|
+
shapes: readonly unknown[];
|
|
91
|
+
rooms: readonly unknown[];
|
|
88
92
|
} | {
|
|
89
93
|
type: 'caught_up';
|
|
90
94
|
expired: readonly string[];
|
|
@@ -93,11 +97,17 @@ export type HouseStreamFrame = Listed<{
|
|
|
93
97
|
member: unknown;
|
|
94
98
|
authorities: readonly unknown[];
|
|
95
99
|
left: readonly string[];
|
|
96
|
-
} |
|
|
100
|
+
} | {
|
|
101
|
+
type: 'turn';
|
|
102
|
+
conversation_id: string;
|
|
103
|
+
turn_id: string;
|
|
104
|
+
at: string;
|
|
105
|
+
} | {
|
|
97
106
|
type: 'turn';
|
|
98
107
|
conversation_id: string;
|
|
99
108
|
turn_id: string;
|
|
100
|
-
|
|
109
|
+
operation: Operation;
|
|
110
|
+
} | {
|
|
101
111
|
type: 'message';
|
|
102
112
|
conversation_id: string;
|
|
103
113
|
message: unknown;
|
|
@@ -126,9 +136,9 @@ export type HouseStreamFrame = Listed<{
|
|
|
126
136
|
conversation_id: string;
|
|
127
137
|
step: string | null;
|
|
128
138
|
} | {
|
|
129
|
-
type: '
|
|
139
|
+
type: 'state';
|
|
130
140
|
conversation_id: string;
|
|
131
|
-
|
|
141
|
+
state: SessionState;
|
|
132
142
|
} | {
|
|
133
143
|
type: 'link';
|
|
134
144
|
conversation_id: string;
|
|
@@ -162,21 +172,18 @@ export type HouseOpening = {
|
|
|
162
172
|
export type HouseClosing = {
|
|
163
173
|
revoked: boolean;
|
|
164
174
|
lost: boolean;
|
|
175
|
+
authorityChanged: boolean;
|
|
165
176
|
};
|
|
166
177
|
export type HouseStream = {
|
|
167
178
|
observe(receive: (frame: HouseStreamFrame) => void): () => void;
|
|
168
179
|
opened(notify: (opening: HouseOpening) => void): () => void;
|
|
169
180
|
closed(notify: (closing: HouseClosing) => void): () => void;
|
|
170
181
|
};
|
|
171
|
-
export type HouseStreamed = HouseDoorAnswer & {
|
|
172
|
-
room: ReadableStream<Uint8Array> | null;
|
|
173
|
-
};
|
|
174
182
|
export type HouseDoor = {
|
|
175
183
|
door(route: string, body: unknown): Promise<HouseDoorAnswer>;
|
|
176
184
|
stream: HouseStream;
|
|
177
185
|
};
|
|
178
186
|
export type HouseTransport = HouseDoor & {
|
|
179
|
-
streamed(route: string, body: unknown, signal: AbortSignal): Promise<HouseStreamed>;
|
|
180
187
|
transfer(request: HouseByteTransfer): Promise<HouseDoorAnswer>;
|
|
181
188
|
put(url: string, body: Blob, headers: Readonly<Record<string, string>>): Promise<number>;
|
|
182
189
|
download(url: string): Promise<HouseBytesAnswer>;
|
|
@@ -184,8 +191,6 @@ export type HouseTransport = HouseDoor & {
|
|
|
184
191
|
export type HouseSiteTransport = HouseDoor & {
|
|
185
192
|
online(): boolean;
|
|
186
193
|
read(route: string): Promise<HouseDoorAnswer>;
|
|
187
|
-
streamed(route: string, signal: AbortSignal): Promise<HouseStreamed>;
|
|
188
194
|
download(route: string): Promise<HouseBytesAnswer>;
|
|
189
195
|
};
|
|
190
196
|
export {};
|
|
191
|
-
//# sourceMappingURL=transport.d.ts.map
|
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,
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5E,eAAO,MAAM,mBAAmB;aAC9B,IAAI,YACF,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,4BAA4B,EAC5B,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,uBAAuB;aAEzB,MAAM,YACJ,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,UAAU,EACV,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,cAAc,EACd,MAAM,EACN,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,EACN,UAAU,EACV,O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AI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACzF,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG;IAC3C,MAAM,IAAI,OAAO,CAAC;IAClB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACpD,CAAC"}
|
package/dist/transport.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
export const HOUSE_RUNTIME_READS = {
|
|
2
2
|
acts: [
|
|
3
|
-
'account/push',
|
|
4
|
-
'agents/
|
|
3
|
+
'account/push/set',
|
|
4
|
+
'agents/list',
|
|
5
5
|
'apps/features/set',
|
|
6
6
|
'apps/source/download',
|
|
7
|
-
'apps/source/top',
|
|
8
|
-
'
|
|
9
|
-
'batch-upload',
|
|
10
|
-
'bootstrap',
|
|
11
|
-
'conversations/history',
|
|
12
|
-
'discover',
|
|
7
|
+
'apps/source/top/read',
|
|
8
|
+
'conversations/history/list',
|
|
13
9
|
'files/attach',
|
|
10
|
+
'files/batch',
|
|
11
|
+
'files/batch-upload',
|
|
14
12
|
'files/finish',
|
|
15
|
-
'files/
|
|
16
|
-
'revisions',
|
|
13
|
+
'files/read',
|
|
14
|
+
'files/revisions/list',
|
|
15
|
+
'room-chunks/list',
|
|
16
|
+
'rooms/discover',
|
|
17
|
+
'rooms/search',
|
|
17
18
|
'sites/screenshot/read',
|
|
18
19
|
],
|
|
19
20
|
frames: [
|
|
@@ -39,7 +40,7 @@ export const HOUSE_RUNTIME_READS = {
|
|
|
39
40
|
'signal',
|
|
40
41
|
'site',
|
|
41
42
|
'starting',
|
|
42
|
-
'
|
|
43
|
+
'state',
|
|
43
44
|
'tab-icon',
|
|
44
45
|
'turn',
|
|
45
46
|
],
|
|
@@ -50,6 +51,6 @@ export function houseDoorRoute(act) {
|
|
|
50
51
|
export function houseSiteRoute(act) {
|
|
51
52
|
return `/_house/door/${act}`;
|
|
52
53
|
}
|
|
53
|
-
export const
|
|
54
|
+
export const SITES_SUBMISSIONS_CREATE = 'sites/submissions/create';
|
|
54
55
|
export const SITE_DOOR_SUBMIT = '/_house/door/submit';
|
|
55
56
|
export const SITE_FILES = '/_house/files/';
|
package/dist/upload.d.ts
CHANGED
|
@@ -9,4 +9,3 @@ export type HouseUpload = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare function houseUpload(value: unknown): HouseUpload | null;
|
|
11
11
|
export declare function finishedUpload(transport: HouseTransport, first: HouseUpload, blob: Blob): Promise<HouseDoorAnswer | null>;
|
|
12
|
-
//# sourceMappingURL=upload.d.ts.map
|
package/dist/version.d.ts
CHANGED
|
@@ -14,4 +14,3 @@ export declare function presented(authority: string, at: LogPosition): Presented
|
|
|
14
14
|
export declare const DECIMAL: RegExp;
|
|
15
15
|
export declare function reachedVersion(roomVersion: string, target: string, currentEpoch: string | undefined): boolean;
|
|
16
16
|
export declare function followsVersion(roomVersion: string, next: string): boolean;
|
|
17
|
-
//# sourceMappingURL=version.d.ts.map
|
package/dist/write.d.ts
CHANGED
|
@@ -17,10 +17,11 @@ export declare function houseParts(saved: readonly {
|
|
|
17
17
|
export declare function houseMove(batch: ChangeBatch, source: string, destination: string): ChangeMapping;
|
|
18
18
|
export type OperationHead = {
|
|
19
19
|
readonly operation_id: string;
|
|
20
|
+
readonly room_ref: string;
|
|
20
21
|
readonly app_ref?: string;
|
|
21
22
|
readonly release?: string;
|
|
22
23
|
};
|
|
23
|
-
export declare function operationHead(batch: ChangeBatch): OperationHead;
|
|
24
|
+
export declare function operationHead(batch: ChangeBatch, room: string): OperationHead;
|
|
24
25
|
export declare function batchPaths(changes: readonly HouseOperation[]): readonly string[];
|
|
25
26
|
export declare function deltaBody(changes: readonly HouseOperation[]): string;
|
|
26
27
|
export declare function deltaBytes(delta: string): number;
|
|
@@ -55,7 +56,5 @@ export declare function revisionBody(input: {
|
|
|
55
56
|
pageToken?: string;
|
|
56
57
|
}): Record<string, unknown>;
|
|
57
58
|
export declare function historyOutcome(status: number, body: unknown, locator: string, request: {
|
|
58
|
-
path: string;
|
|
59
59
|
revision?: string;
|
|
60
60
|
}): HistoryResult;
|
|
61
|
-
//# sourceMappingURL=write.d.ts.map
|
package/dist/write.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../src/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAElB,KAAK,cAAc,EAEpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOlD,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE/D,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAwHrD,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAQ9E;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,EAAE,EACpE,MAAM,EAAE,MAAM,GACb,aAAa,CAEf;AAED,wBAAgB,SAAS,CAAC,KA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