@agentshouse/app-bridge 0.1.0-c8d8dc6285bbd → 0.1.0-c8dd3de04bf64

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 (95) hide show
  1. package/README.md +7 -7
  2. package/dist/index.d.ts +910 -19
  3. package/dist/mdmodel/definition.d.ts +1 -1
  4. package/dist/mdmodel/document.d.ts +2 -1
  5. package/dist/mdmodel/event.d.ts +77 -0
  6. package/dist/mdmodel/facts.d.ts +14 -0
  7. package/dist/mdmodel/index.d.ts +19 -7
  8. package/dist/mdmodel/kinds.d.ts +17 -0
  9. package/dist/mdmodel/pattern.d.ts +9 -0
  10. package/dist/mdmodel/query/language.d.ts +253 -0
  11. package/dist/mdmodel/query/match.d.ts +13 -0
  12. package/dist/mdmodel/query/rows.d.ts +31 -0
  13. package/dist/mdmodel/query/sql.d.ts +38 -0
  14. package/dist/mdmodel/reserved.d.ts +5 -0
  15. package/dist/mdmodel/types.d.ts +11 -0
  16. package/dist/mdmodel/validate.d.ts +7 -5
  17. package/dist/mdruntime/actions.d.ts +19 -0
  18. package/dist/mdruntime/adapter.d.ts +107 -71
  19. package/dist/mdruntime/attached-model.d.ts +7 -0
  20. package/dist/mdruntime/bootstrap.d.ts +43 -0
  21. package/dist/mdruntime/cell.d.ts +5 -0
  22. package/dist/mdruntime/chain.d.ts +2 -1
  23. package/dist/mdruntime/change.d.ts +1 -0
  24. package/dist/mdruntime/client.d.ts +28 -11
  25. package/dist/mdruntime/collection.d.ts +7 -4
  26. package/dist/mdruntime/compile.d.ts +6 -6
  27. package/dist/mdruntime/conversation-live.d.ts +135 -0
  28. package/dist/mdruntime/conversation-row.d.ts +32 -0
  29. package/dist/mdruntime/conversation.d.ts +41 -45
  30. package/dist/mdruntime/durability.d.ts +15 -1
  31. package/dist/mdruntime/figures.d.ts +48 -0
  32. package/dist/mdruntime/holdings.d.ts +28 -0
  33. package/dist/mdruntime/identity.d.ts +0 -1
  34. package/dist/mdruntime/install.d.ts +55 -0
  35. package/dist/mdruntime/job.d.ts +32 -0
  36. package/dist/mdruntime/listing.d.ts +52 -0
  37. package/dist/mdruntime/live.d.ts +22 -0
  38. package/dist/mdruntime/log.d.ts +5 -0
  39. package/dist/mdruntime/media.d.ts +7 -0
  40. package/dist/mdruntime/messages.d.ts +27 -3
  41. package/dist/mdruntime/model.d.ts +8 -10
  42. package/dist/mdruntime/observation.d.ts +3 -2
  43. package/dist/mdruntime/outcome.d.ts +17 -6
  44. package/dist/mdruntime/overlay.d.ts +1 -0
  45. package/dist/mdruntime/preparation.d.ts +19 -0
  46. package/dist/mdruntime/query.d.ts +18 -208
  47. package/dist/mdruntime/reach.d.ts +20 -11
  48. package/dist/mdruntime/readiness.d.ts +3 -18
  49. package/dist/mdruntime/reads.d.ts +36 -0
  50. package/dist/mdruntime/recovery.d.ts +1 -0
  51. package/dist/mdruntime/refresh.d.ts +26 -0
  52. package/dist/mdruntime/replica.d.ts +11 -12
  53. package/dist/mdruntime/room-draft.d.ts +21 -7
  54. package/dist/mdruntime/room-drafts.d.ts +23 -0
  55. package/dist/mdruntime/runtime.d.ts +42 -0
  56. package/dist/mdruntime/save.d.ts +7 -1
  57. package/dist/mdruntime/saves.d.ts +69 -0
  58. package/dist/mdruntime/search.d.ts +12 -63
  59. package/dist/mdruntime/seed.d.ts +11 -2
  60. package/dist/mdruntime/socket/admission.d.ts +6 -0
  61. package/dist/mdruntime/socket/answers.d.ts +5 -0
  62. package/dist/mdruntime/socket/lanes.d.ts +19 -0
  63. package/dist/mdruntime/socket/rooms.d.ts +43 -0
  64. package/dist/mdruntime/socket/session.d.ts +37 -0
  65. package/dist/mdruntime/socket.d.ts +69 -0
  66. package/dist/mdruntime/source.d.ts +60 -0
  67. package/dist/mdruntime/status.d.ts +4 -5
  68. package/dist/mdruntime/store/fences.d.ts +15 -0
  69. package/dist/mdruntime/store/installs.d.ts +29 -0
  70. package/dist/mdruntime/store/readiness.d.ts +9 -0
  71. package/dist/mdruntime/store/records.d.ts +211 -0
  72. package/dist/mdruntime/store/room-held.d.ts +7 -0
  73. package/dist/mdruntime/store/space.d.ts +10 -0
  74. package/dist/mdruntime/store/watchers.d.ts +16 -0
  75. package/dist/mdruntime/store/writes.d.ts +23 -0
  76. package/dist/mdruntime/store.d.ts +105 -158
  77. package/dist/mdruntime/stored.d.ts +66 -55
  78. package/dist/mdruntime/surface.d.ts +87 -0
  79. package/dist/mdruntime/tables.d.ts +131 -69
  80. package/dist/mdruntime/tallies.d.ts +17 -0
  81. package/dist/mdruntime/transfer.d.ts +0 -5
  82. package/dist/mdruntime/turn.d.ts +8 -0
  83. package/dist/mdruntime/wire.d.ts +25 -9
  84. package/dist/test-host.d.ts +1 -4
  85. package/dist/test-host.js +2 -28
  86. package/docs/families.md +49 -53
  87. package/package.json +1 -1
  88. package/dist/calls.d.ts +0 -1007
  89. package/dist/calls.js +0 -1
  90. package/dist/mdmodel/condition.d.ts +0 -160
  91. package/dist/mdmodel/profile.d.ts +0 -5
  92. package/dist/mdruntime/connection.d.ts +0 -151
  93. package/dist/mdruntime/file.d.ts +0 -11
  94. package/dist/mdruntime/fulltext.d.ts +0 -26
  95. package/dist/mdruntime/shared.d.ts +0 -15
@@ -1,15 +1,16 @@
1
1
  import { type QueryAnswer, type QueryRoom } from './compile.js';
2
- import type { KeptReceipt } from './adapter.js';
3
- import type { Composition } from './collection.js';
4
- import { type SearchAsk } from './fulltext.js';
5
- import { type ConversationWrite, type HeldConversation, type MessageWindow } from './messages.js';
6
- import type { Plan } from './query.js';
7
- import type { SearchWindow } from './search.js';
8
- import { type Committed, type CountedRoom, type HeldEntry, type ReplicaOpened, type Referrer, type RoomCommit, type StoredEntry, type TypedEntry, type View, type Walked } from './stored.js';
9
- export type { Committed, CountedRoom, HeldEntry, OverlayEntry, ReplicaOpened, Referrer, RoomCommit, StoredEntry, TypedEntry, View, Walked, } from './stored.js';
2
+ import type { Composed } from './collection.js';
3
+ import type { UnsentWork } from './durability.js';
4
+ import type { JobMarker } from './job.js';
5
+ import { type ConversationWrite, type HeldConversation, type HeldRow, type MessageWindow } from './messages.js';
6
+ import type { GroupTotal, Plan } from './query.js';
7
+ import { type ReadAt } from './reads.js';
8
+ import { type ConversationTally, type RoomTally } from './tallies.js';
9
+ import { type Committed, type Covering, type HeldEntry, type HeldLocators, type HeldRoomRow, type HeldRoomWork, type ReplicaOpened, type Referrer, type Resumed, type RoomCommit, type StoredEntry, type TypedEntry, type View } from './stored.js';
10
+ export type { Committed, Covering, HeldEntry, HeldLocators, HeldRoomRow, HeldRoomWork, OverlayEntry, ReplicaOpened, Referrer, Resumed, RoomCommit, StoredEntry, TypedEntry, View, } from './stored.js';
10
11
  export type { QueryAnswer, QueryRoom } from './compile.js';
11
- export type { SearchAsk } from './fulltext.js';
12
- export type { ConversationWrite, HeldConversation, MessageWindow } from './messages.js';
12
+ export type { ConversationWrite, HeldConversation, HeldRow, MessageWindow } from './messages.js';
13
+ export type { ConversationTally, RoomTally } from './tallies.js';
13
14
  export type Value = string | number | bigint | Uint8Array | null;
14
15
  export type Row = Readonly<Record<string, Value>>;
15
16
  export interface Connection {
@@ -37,6 +38,10 @@ export interface SqliteStatement {
37
38
  }
38
39
  export interface SqliteDatabase {
39
40
  readonly pointer: number;
41
+ createFunction(name: string, run: (context: number, ...values: Value[]) => Value, options: {
42
+ readonly arity: number;
43
+ readonly deterministic: true;
44
+ }): unknown;
40
45
  exec(options: {
41
46
  readonly sql: string;
42
47
  readonly bind: readonly Value[];
@@ -48,7 +53,7 @@ export interface SqliteDatabase {
48
53
  export declare function sqliteConnection(engine: SqliteEngine, database: SqliteDatabase): Connection;
49
54
  export declare const FILE_PART_BYTES = 1048576;
50
55
  export declare const RUNTIME_TABLES: readonly string[];
51
- export type AuthoredFact = 'holder' | 'binding' | 'generation';
56
+ export type AuthoredFact = 'holder' | 'generation';
52
57
  export type StoredFile = {
53
58
  readonly key: string;
54
59
  readonly blob: Blob;
@@ -64,6 +69,8 @@ export type KeptPending = {
64
69
  readonly batch: string;
65
70
  readonly state: string;
66
71
  readonly files: readonly string[];
72
+ readonly paths: readonly string[];
73
+ readonly moving: boolean;
67
74
  };
68
75
  export type KeptRecord = {
69
76
  readonly record: string;
@@ -78,10 +85,6 @@ export type AuthoredRows = {
78
85
  readonly path: string;
79
86
  })[];
80
87
  readonly consumedRoomDrafts?: readonly string[];
81
- readonly amendments?: readonly {
82
- readonly id: string;
83
- readonly amendment: string;
84
- }[];
85
88
  };
86
89
  export type HeldQueues = {
87
90
  readonly queues: readonly {
@@ -95,11 +98,31 @@ export type HeldQueues = {
95
98
  readonly state: string;
96
99
  }[];
97
100
  };
101
+ export type HeldStatus = {
102
+ readonly queued: readonly string[];
103
+ readonly lastCompleted: string | null;
104
+ readonly changes: readonly {
105
+ readonly locator: string;
106
+ readonly path: string;
107
+ }[];
108
+ readonly resets: readonly {
109
+ readonly locator: string;
110
+ readonly reset: string;
111
+ }[];
112
+ readonly returned: readonly string[];
113
+ };
98
114
  export type OpenedFile = {
99
115
  readonly key: string;
100
116
  readonly byteLength: number;
101
117
  readonly mediaType: string;
102
118
  };
119
+ export type OpenedRoom = GroupTotal & {
120
+ readonly room: string;
121
+ };
122
+ export type OpenedHeld = {
123
+ readonly rooms: readonly OpenedRoom[];
124
+ readonly cleanable: number;
125
+ };
103
126
  type Asked<A, R> = {
104
127
  readonly asked: A;
105
128
  readonly answer: R;
@@ -112,14 +135,36 @@ export type AuthoredWrite = {
112
135
  readonly writes: readonly AuthoredRows[];
113
136
  readonly files: readonly StoredFile[];
114
137
  readonly whole: boolean;
115
- readonly discards?: readonly string[];
116
138
  };
117
139
  export interface RuntimeRequests {
118
- readonly 'authored.queues': Asked<Nothing, HeldQueues>;
119
- readonly 'authored.roomDrafts': Asked<Nothing, readonly string[]>;
140
+ readonly 'authored.status': Asked<Nothing, HeldStatus>;
141
+ readonly 'authored.moving': Asked<Nothing, HeldQueues>;
142
+ readonly 'authored.pending': Asked<{
143
+ readonly locator: string;
144
+ readonly id: string;
145
+ }, {
146
+ readonly state: string | null;
147
+ readonly room: boolean;
148
+ }>;
149
+ readonly 'authored.batch': Asked<{
150
+ readonly locator: string;
151
+ readonly id: string;
152
+ }, string | null>;
153
+ readonly 'authored.order': Asked<{
154
+ readonly locator: string;
155
+ }, readonly string[]>;
156
+ readonly 'authored.queued': Asked<Nothing, readonly string[]>;
157
+ readonly 'authored.roomDrafts': Asked<{
158
+ readonly locator: string | null;
159
+ readonly paths: readonly string[] | null;
160
+ }, readonly string[]>;
161
+ readonly 'authored.chatDraft.read': Asked<{
162
+ readonly conversation: string;
163
+ }, string | null>;
120
164
  readonly 'authored.chatDrafts': Asked<Nothing, readonly string[]>;
121
165
  readonly 'authored.calls': Asked<Nothing, readonly string[]>;
122
166
  readonly 'authored.fences': Asked<Nothing, readonly string[]>;
167
+ readonly 'authored.unsent': Asked<Nothing, readonly UnsentWork[]>;
123
168
  readonly 'authored.fact': Asked<{
124
169
  readonly name: AuthoredFact;
125
170
  }, string | null>;
@@ -161,11 +206,32 @@ export interface RuntimeRequests {
161
206
  readonly holder: string | null;
162
207
  }, boolean>;
163
208
  readonly 'replica.open': Asked<Nothing, ReplicaOpened>;
209
+ readonly 'replica.rooms': Asked<{
210
+ readonly locators: readonly string[] | null;
211
+ }, readonly HeldRoomRow[]>;
212
+ readonly 'replica.room': Asked<{
213
+ readonly locator: string;
214
+ }, HeldRoomWork>;
215
+ readonly 'replica.covering': Asked<Nothing, Covering>;
216
+ readonly 'replica.offline': Asked<{
217
+ readonly locator: string;
218
+ }, string | null>;
219
+ readonly 'replica.held': Asked<Nothing, HeldLocators>;
220
+ readonly 'replica.demote': Asked<Nothing, null>;
221
+ readonly 'replica.facts': Asked<Nothing, Readonly<Record<string, string>>>;
222
+ readonly 'replica.presentation': Asked<{
223
+ readonly app: string;
224
+ }, string | null>;
164
225
  readonly 'replica.query': Asked<{
165
226
  readonly plan: Plan;
166
227
  readonly rooms: readonly QueryRoom[];
167
228
  readonly budget: number | null;
168
229
  }, QueryAnswer>;
230
+ readonly 'replica.tallies': Asked<{
231
+ readonly totals: Plan;
232
+ readonly rooms: readonly QueryRoom[];
233
+ readonly since: string;
234
+ }, readonly RoomTally[]>;
169
235
  readonly 'replica.entries': Asked<{
170
236
  readonly key: number;
171
237
  readonly view: View;
@@ -180,59 +246,36 @@ export interface RuntimeRequests {
180
246
  readonly key: number;
181
247
  readonly view: View;
182
248
  readonly targets: readonly string[];
183
- readonly kinds: readonly string[];
184
249
  }, readonly Referrer[]>;
185
- readonly 'replica.walk': Asked<{
186
- readonly key: number;
187
- readonly view: View;
188
- readonly after: string | null;
189
- readonly bytes: number;
190
- }, Walked>;
191
- readonly 'replica.files': Asked<{
250
+ readonly 'replica.folders': Asked<{
192
251
  readonly key: number;
193
- readonly view: View;
194
- readonly after: string | null;
195
- readonly limit: number;
196
- }, readonly {
197
- readonly path: string;
198
- readonly revision: string;
199
- }[]>;
252
+ readonly paths: readonly string[];
253
+ }, readonly string[]>;
200
254
  readonly 'replica.typedWithin': Asked<{
201
255
  readonly key: number;
202
256
  readonly view: View;
203
257
  readonly roots: readonly string[];
204
258
  readonly within: boolean;
205
259
  }, boolean>;
206
- readonly 'replica.counts': Asked<{
207
- readonly rooms: readonly CountedRoom[];
208
- }, readonly number[]>;
209
- readonly 'replica.search': Asked<SearchAsk, SearchWindow>;
210
- readonly 'replica.received': Asked<Nothing, readonly KeptReceipt[]>;
211
- readonly 'replica.receivedParts': Asked<{
212
- readonly key: string;
213
- readonly count: number;
214
- }, readonly unknown[]>;
215
260
  readonly 'replica.stage': Asked<{
216
261
  readonly locator: string;
217
262
  readonly transfer: string;
218
- readonly record: string;
219
263
  readonly key: number | null;
220
- readonly composition: Composition;
264
+ readonly fingerprint: string;
221
265
  readonly entries: readonly StoredEntry[];
222
266
  readonly folders: readonly string[];
223
- readonly written?: string;
267
+ readonly part: string | null;
224
268
  }, number | null>;
225
- readonly 'replica.transferPart': Asked<{
269
+ readonly 'replica.resume': Asked<{
226
270
  readonly locator: string;
227
- readonly token: string;
228
- }, Uint8Array | null>;
229
- readonly 'replica.keepPart': Asked<{
230
- readonly locator: string;
231
- readonly token: string;
232
- readonly part: Uint8Array;
233
- }, null>;
271
+ readonly transfer: string;
272
+ readonly fingerprint: string;
273
+ readonly parts: readonly string[];
274
+ readonly published: number | null;
275
+ }, Resumed | null>;
234
276
  readonly 'replica.refresh': Asked<{
235
277
  readonly key: number;
278
+ readonly composed: Composed;
236
279
  readonly entries: readonly StoredEntry[];
237
280
  readonly removals: readonly string[];
238
281
  readonly folders: readonly string[];
@@ -256,16 +299,22 @@ export interface RuntimeRequests {
256
299
  }>;
257
300
  readonly 'replica.abandon': Asked<{
258
301
  readonly locator: string;
259
- readonly kept: boolean;
260
- }, number | null>;
302
+ }, null>;
303
+ readonly 'replica.unfence': Asked<{
304
+ readonly locators: readonly string[];
305
+ }, readonly string[]>;
261
306
  readonly 'replica.release': Asked<{
262
307
  readonly key: number;
263
308
  }, null>;
264
309
  readonly 'replica.rederive': Asked<{
265
310
  readonly key: number;
266
- readonly limit: number;
311
+ readonly composed: Composed;
312
+ readonly bytes: number;
313
+ readonly ms: number;
314
+ readonly floor: number;
267
315
  }, {
268
316
  readonly done: boolean;
317
+ readonly text: number;
269
318
  }>;
270
319
  readonly 'replica.fact': Asked<{
271
320
  readonly name: string;
@@ -275,17 +324,6 @@ export interface RuntimeRequests {
275
324
  readonly app: string;
276
325
  readonly value: string;
277
326
  }, null>;
278
- readonly 'replica.receive': Asked<{
279
- readonly key: string;
280
- readonly head: string;
281
- readonly part?: {
282
- readonly index: number;
283
- readonly value: string;
284
- };
285
- }, null>;
286
- readonly 'replica.unreceive': Asked<{
287
- readonly keys: readonly string[];
288
- }, null>;
289
327
  readonly 'opened.find': Asked<{
290
328
  readonly locator: string;
291
329
  readonly path: string;
@@ -313,28 +351,50 @@ export interface RuntimeRequests {
313
351
  readonly key: string;
314
352
  }, null>;
315
353
  readonly 'opened.clean': Asked<Nothing, number>;
354
+ readonly 'opened.held': Asked<Nothing, OpenedHeld>;
316
355
  readonly 'file.part': Asked<{
317
356
  readonly key: string;
318
357
  readonly part: number;
319
358
  }, Uint8Array | null>;
320
- readonly 'conversation.held': Asked<Nothing, readonly HeldConversation[]>;
359
+ readonly 'conversation.held': Asked<{
360
+ readonly conversations: readonly string[] | null;
361
+ }, readonly HeldConversation[]>;
321
362
  readonly 'conversation.keep': Asked<ConversationWrite, null>;
322
363
  readonly 'conversation.window': Asked<{
323
364
  readonly conversation: string;
324
365
  readonly limit: number;
325
366
  readonly before: readonly [string, string] | null;
367
+ readonly phrase: string | null;
326
368
  }, MessageWindow>;
327
369
  readonly 'conversation.count': Asked<{
328
370
  readonly conversation: string;
371
+ readonly phrase: string | null;
329
372
  }, number>;
330
373
  readonly 'conversation.turn': Asked<{
331
374
  readonly conversation: string;
332
375
  readonly turn: string;
333
376
  }, boolean>;
377
+ readonly 'conversation.rows': Asked<{
378
+ readonly conversations: readonly string[];
379
+ }, readonly HeldRow[]>;
380
+ readonly 'conversation.jobs': Asked<{
381
+ readonly conversation: string;
382
+ }, readonly JobMarker[]>;
383
+ readonly 'conversation.tallies': Asked<{
384
+ readonly conversations: readonly string[] | null;
385
+ readonly since: string;
386
+ }, readonly ConversationTally[]>;
334
387
  readonly 'conversation.drop': Asked<{
335
388
  readonly conversations: readonly string[];
336
389
  }, null>;
337
390
  readonly 'space.probe': Asked<Nothing, null>;
391
+ readonly 'read.stored': Asked<ReadAt, string | null>;
392
+ readonly 'read.keep': Asked<ReadAt & {
393
+ readonly answer: string;
394
+ }, null>;
395
+ readonly 'read.builds': Asked<{
396
+ readonly build: string;
397
+ }, null>;
338
398
  }
339
399
  export type RuntimeKind = keyof RuntimeRequests;
340
400
  export type RuntimeRequest<K extends RuntimeKind = RuntimeKind> = {
@@ -349,5 +409,7 @@ export interface RuntimeDatabase {
349
409
  export declare function isRuntime(request: {
350
410
  readonly kind: string;
351
411
  }): request is RuntimeRequest;
352
- export declare function readsRuntime(request: RuntimeRequest): boolean;
412
+ export declare function readsRuntime(request: {
413
+ readonly kind: string;
414
+ }): boolean;
353
415
  export declare function answerRuntime(connection: Connection, request: RuntimeRequest, spool: FileSpool): unknown;
@@ -0,0 +1,17 @@
1
+ import { type QueryRoom } from './compile.js';
2
+ import type { GroupTotal, Plan } from './query.js';
3
+ import type { Connection } from './tables.js';
4
+ export type RoomTally = {
5
+ readonly key: number;
6
+ readonly documents: GroupTotal;
7
+ readonly files: GroupTotal;
8
+ readonly documentTimes: readonly (readonly [string | null, string | null])[];
9
+ readonly chatTimes: readonly string[];
10
+ readonly messageTimes: readonly string[];
11
+ };
12
+ export type ConversationTally = {
13
+ readonly conversation: string;
14
+ readonly said: readonly string[];
15
+ };
16
+ export declare function roomTallies(connection: Connection, totals: Plan, rooms: readonly QueryRoom[], since: string): RoomTally[];
17
+ export declare function conversationTallies(connection: Connection, conversations: readonly string[] | null, since: string): ConversationTally[];
@@ -1,9 +1,4 @@
1
- import type { Refusal } from '../mdmodel/index.js';
2
1
  export type Unconfirmed = {
3
2
  kind: 'unconfirmed';
4
3
  };
5
- export type Refused = {
6
- kind: 'refused';
7
- refusal: Refusal;
8
- };
9
4
  export declare const unconfirmed: Unconfirmed;
@@ -0,0 +1,8 @@
1
+ export declare function yielded(): Promise<void>;
2
+ export declare const ROW_WEIGHT = 256;
3
+ export type Later<T> = T | Promise<T>;
4
+ export declare function after<T, R>(value: Later<T>, next: (value: T) => Later<R>): Later<R>;
5
+ export declare function paced(): (weight: number) => Later<void>;
6
+ export declare function inUnits<T>(items: Iterable<T>, each: (item: T) => number, ended?: () => void, paused?: () => Promise<void>): Later<void>;
7
+ export declare function finished<R>(steps: Generator<number, R, void>): R;
8
+ export declare function stepped<R>(steps: Generator<number, R, void>): Later<R>;
@@ -1,4 +1,4 @@
1
- import type { ConnectionRefusal } from './connection.js';
1
+ import type { ConnectionRefusal } from './socket.js';
2
2
  import type { Described } from './failure.js';
3
3
  export type RuntimePort = {
4
4
  postMessage(message: unknown): void;
@@ -54,6 +54,14 @@ declare const MEMBERS: {
54
54
  readonly reach: 'within';
55
55
  readonly effect: 'read';
56
56
  };
57
+ readonly 'binaryFile.show': {
58
+ readonly reach: 'within';
59
+ readonly effect: 'read';
60
+ };
61
+ readonly 'binaryFile.attach': {
62
+ readonly reach: 'within';
63
+ readonly effect: 'action';
64
+ };
57
65
  readonly 'binaryFile.part': {
58
66
  readonly reach: 'within';
59
67
  readonly effect: 'read';
@@ -74,6 +82,18 @@ declare const MEMBERS: {
74
82
  readonly reach: 'whole';
75
83
  readonly effect: 'write';
76
84
  };
85
+ readonly unsent: {
86
+ readonly reach: 'whole';
87
+ readonly effect: 'read';
88
+ };
89
+ readonly reset: {
90
+ readonly reach: 'whole';
91
+ readonly effect: 'write';
92
+ };
93
+ readonly readAgain: {
94
+ readonly reach: 'whole';
95
+ readonly effect: 'read';
96
+ };
77
97
  readonly persistence: {
78
98
  readonly reach: 'runtime';
79
99
  readonly effect: 'read';
@@ -130,10 +150,6 @@ declare const MEMBERS: {
130
150
  readonly reach: 'within';
131
151
  readonly effect: 'action';
132
152
  };
133
- readonly 'conversation.attach': {
134
- readonly reach: 'within';
135
- readonly effect: 'action';
136
- };
137
153
  readonly 'conversation.answer': {
138
154
  readonly reach: 'within';
139
155
  readonly effect: 'action';
@@ -146,10 +162,6 @@ declare const MEMBERS: {
146
162
  readonly reach: 'within';
147
163
  readonly effect: 'action';
148
164
  };
149
- readonly 'conversation.cancel': {
150
- readonly reach: 'within';
151
- readonly effect: 'action';
152
- };
153
165
  readonly 'conversation.delete': {
154
166
  readonly reach: 'within';
155
167
  readonly effect: 'action';
@@ -176,6 +188,7 @@ declare const TOPICS: {
176
188
  readonly 'sync-status': 'within';
177
189
  readonly 'service-mode': 'runtime';
178
190
  readonly member: 'runtime';
191
+ readonly 'authority-changes': 'runtime';
179
192
  readonly query: 'within';
180
193
  readonly queue: 'within';
181
194
  readonly 'room-drafts': 'within';
@@ -183,6 +196,9 @@ declare const TOPICS: {
183
196
  readonly conversation: 'within';
184
197
  readonly conversations: 'within';
185
198
  readonly agents: 'within';
199
+ readonly figures: 'whole';
200
+ readonly holdings: 'whole';
201
+ readonly read: 'whole';
186
202
  };
187
203
  export declare const WIRE: {
188
204
  readonly members: Readonly<Record<string, WireCall>>;
@@ -1,5 +1,5 @@
1
1
  import type { MdRuntimeClient } from './mdruntime/client.js';
2
- import type { HouseActivation, HouseAnalyticsChoice, HouseAppMessage, HouseChatOptions, HouseExternalAnswer, HouseExternalRequest, HouseNavigationMode, HouseRefusal, HouseSourceDownload, HouseSourceTop, HouseStatus, HouseTab, HouseTask } from './index.js';
2
+ import type { HouseAnalyticsChoice, HouseAppMessage, HouseChatOptions, HouseExternalAnswer, HouseExternalRequest, HouseNavigationMode, HouseRefusal, HouseSourceDownload, HouseSourceTop, HouseStatus, HouseTab } from './index.js';
3
3
  export interface HouseBridgeNavigation {
4
4
  readonly mode: HouseNavigationMode;
5
5
  readonly address: string;
@@ -21,9 +21,6 @@ export interface HouseBridgeTestHost {
21
21
  publish(status: HouseStatus): void;
22
22
  message(message: HouseAppMessage): void;
23
23
  attachRuntime(runtime: MdRuntimeClient): void;
24
- checkpoint(): Promise<HouseTask>;
25
- restore(task: HouseTask | null): Promise<boolean>;
26
- settle(activation: HouseActivation): void;
27
24
  }
28
25
  export interface HouseBridgeTestHostOptions {
29
26
  readonly address?: string;
package/dist/test-host.js CHANGED
@@ -58,7 +58,6 @@ export function createHouseBridgeTestHost(options = {}) {
58
58
  let published = options.status ?? null;
59
59
  let shown = null;
60
60
  let seen = null;
61
- let cooperation = null;
62
61
  let attached = () => { };
63
62
  const runtime = new Promise((resolve) => {
64
63
  attached = resolve;
@@ -130,7 +129,7 @@ export function createHouseBridgeTestHost(options = {}) {
130
129
  },
131
130
  install: () => Promise.resolve('manual'),
132
131
  notifications: () => Promise.resolve('unavailable'),
133
- setBadge: () => Promise.resolve(),
132
+ telegram: () => Promise.resolve({ state: 'unavailable', name: null, username: null }),
134
133
  setTab(tab) {
135
134
  tabs.push(tab);
136
135
  },
@@ -160,19 +159,8 @@ export function createHouseBridgeTestHost(options = {}) {
160
159
  consents.push(choice);
161
160
  publish({ ...published, analytics: { measures: true, choice } });
162
161
  },
163
- cooperate(given) {
164
- cooperation = given;
165
- return () => {
166
- if (cooperation === given)
167
- cooperation = null;
168
- };
169
- },
162
+ cooperate: () => () => { },
170
163
  };
171
- function cooperating() {
172
- if (cooperation === null)
173
- throw new Error('the App registered no cooperation');
174
- return cooperation;
175
- }
176
164
  Object.defineProperty(globalThis, 'houseBridge', { value: bridge, configurable: true });
177
165
  if (published !== null)
178
166
  publish(published);
@@ -198,19 +186,5 @@ export function createHouseBridgeTestHost(options = {}) {
198
186
  attachRuntime(client) {
199
187
  attached(client);
200
188
  },
201
- async checkpoint() {
202
- const held = cooperating();
203
- await held.checkpoint();
204
- await held.persist();
205
- return JSON.parse(JSON.stringify((await held.capture()) ?? null));
206
- },
207
- async restore(task) {
208
- const held = cooperating();
209
- await held.restore(task);
210
- return (await held.ready()) === true;
211
- },
212
- settle(activation) {
213
- cooperating().settle(activation);
214
- },
215
189
  };
216
190
  }