@agentshouse/app-bridge 0.1.0-cfb240c3fb89d → 0.1.0-cfb5ca35059bb

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 (56) hide show
  1. package/README.md +9 -9
  2. package/dist/index.d.ts +845 -8
  3. package/dist/mdmodel/condition.d.ts +41 -11
  4. package/dist/mdmodel/definition.d.ts +17 -1
  5. package/dist/mdmodel/document.d.ts +5 -5
  6. package/dist/mdmodel/index.d.ts +11 -9
  7. package/dist/mdmodel/links.d.ts +28 -0
  8. package/dist/mdmodel/paths.d.ts +9 -1
  9. package/dist/mdmodel/project.d.ts +1 -0
  10. package/dist/mdmodel/types.d.ts +28 -4
  11. package/dist/mdmodel/validate.d.ts +27 -3
  12. package/dist/mdruntime/adapter.d.ts +123 -66
  13. package/dist/mdruntime/binary.d.ts +0 -5
  14. package/dist/mdruntime/chain.d.ts +10 -0
  15. package/dist/mdruntime/change-set.d.ts +9 -16
  16. package/dist/mdruntime/change.d.ts +31 -1
  17. package/dist/mdruntime/client.d.ts +20 -9
  18. package/dist/mdruntime/collection.d.ts +10 -21
  19. package/dist/mdruntime/compile.d.ts +15 -0
  20. package/dist/mdruntime/connection.d.ts +37 -12
  21. package/dist/mdruntime/conversation.d.ts +27 -11
  22. package/dist/mdruntime/durability.d.ts +4 -1
  23. package/dist/mdruntime/fulltext.d.ts +26 -0
  24. package/dist/mdruntime/identity.d.ts +6 -0
  25. package/dist/mdruntime/media.d.ts +7 -0
  26. package/dist/mdruntime/messages.d.ts +27 -0
  27. package/dist/mdruntime/model.d.ts +9 -3
  28. package/dist/mdruntime/observation.d.ts +15 -0
  29. package/dist/mdruntime/opened.d.ts +21 -0
  30. package/dist/mdruntime/outcome.d.ts +45 -7
  31. package/dist/mdruntime/overlay.d.ts +3 -5
  32. package/dist/mdruntime/query.d.ts +39 -2
  33. package/dist/mdruntime/reach.d.ts +18 -6
  34. package/dist/mdruntime/readiness.d.ts +51 -0
  35. package/dist/mdruntime/recovery.d.ts +3 -2
  36. package/dist/mdruntime/replica.d.ts +55 -33
  37. package/dist/mdruntime/room-draft.d.ts +34 -4
  38. package/dist/mdruntime/save.d.ts +53 -14
  39. package/dist/mdruntime/search.d.ts +32 -43
  40. package/dist/mdruntime/seed.d.ts +15 -0
  41. package/dist/mdruntime/status.d.ts +5 -0
  42. package/dist/mdruntime/store.d.ts +96 -94
  43. package/dist/mdruntime/stored.d.ts +129 -0
  44. package/dist/mdruntime/tables.d.ts +324 -0
  45. package/dist/mdruntime/wire.d.ts +164 -32
  46. package/dist/test-host.d.ts +7 -1
  47. package/dist/test-host.js +18 -1
  48. package/docs/families.md +53 -12
  49. package/package.json +8 -3
  50. package/dist/calls.d.ts +0 -117
  51. package/dist/calls.js +0 -1
  52. package/dist/mdruntime/file.d.ts +0 -19
  53. package/dist/mdruntime/rows.d.ts +0 -36
  54. package/dist/mdruntime/shared.d.ts +0 -10
  55. package/dist/mdruntime/transfer.d.ts +0 -9
  56. package/dist/mdruntime/turn.d.ts +0 -6
package/dist/index.d.ts CHANGED
@@ -1,10 +1,820 @@
1
- import type { MdRuntimeClient } from './mdruntime/client.js';
2
- import type { HouseCalls } from './calls.js';
3
- export type { HouseCalls } from './calls.js';
4
- type Open<Value extends string> = Value | (string & {});
5
- export type HouseCallInput<Name extends string> = Name extends keyof HouseCalls ? HouseCalls[Name] : unknown;
1
+ import type { MdRuntimeClient, Open } from './mdruntime/client.js';
2
+ export interface HouseMethods {
3
+ readonly "apps/features/read": {
4
+ readonly params: {};
5
+ readonly result: {
6
+ readonly features: readonly {
7
+ readonly allowed: boolean;
8
+ readonly feature: string;
9
+ }[];
10
+ };
11
+ };
12
+ readonly "apps/holders": {
13
+ readonly params: {};
14
+ readonly result: {
15
+ readonly holders: readonly {
16
+ readonly email: string;
17
+ readonly name: string;
18
+ readonly user: string;
19
+ }[];
20
+ };
21
+ };
22
+ readonly "apps/messages/send": {
23
+ readonly params: {
24
+ readonly body: unknown;
25
+ readonly to: string;
26
+ };
27
+ readonly result: {
28
+ readonly [key: string]: never;
29
+ };
30
+ };
31
+ readonly "apps/relay": {
32
+ readonly params: {
33
+ readonly [key: string]: never;
34
+ };
35
+ readonly result: {
36
+ readonly expires_at: string;
37
+ readonly ice_servers: readonly {
38
+ readonly credential: string;
39
+ readonly urls: readonly string[];
40
+ readonly username: string;
41
+ }[];
42
+ };
43
+ };
44
+ readonly "apps/ring": {
45
+ readonly params: {
46
+ readonly to: string;
47
+ };
48
+ readonly result: {
49
+ readonly authority: string;
50
+ readonly log_epoch: string;
51
+ readonly position: string;
52
+ };
53
+ };
54
+ readonly "chats/assign": {
55
+ readonly params: {
56
+ readonly assignee: null | {
57
+ readonly agent: string;
58
+ } | {
59
+ readonly user: string;
60
+ };
61
+ readonly path: string;
62
+ readonly room_ref: string;
63
+ };
64
+ readonly result: {
65
+ readonly assignee: null | {
66
+ readonly agent: string;
67
+ readonly name: string;
68
+ } | {
69
+ readonly name: string;
70
+ readonly user: string;
71
+ };
72
+ readonly authority: string;
73
+ readonly log_epoch: string;
74
+ readonly path: string;
75
+ readonly position: string;
76
+ readonly return_to: null | {
77
+ readonly agent: string;
78
+ readonly name: string;
79
+ };
80
+ readonly room_ref: string;
81
+ readonly url: string;
82
+ };
83
+ };
84
+ readonly "chats/return": {
85
+ readonly params: {
86
+ readonly path: string;
87
+ readonly room_ref: string;
88
+ };
89
+ readonly result: {
90
+ readonly assignee: null | {
91
+ readonly agent: string;
92
+ readonly name: string;
93
+ } | {
94
+ readonly name: string;
95
+ readonly user: string;
96
+ };
97
+ readonly authority: string;
98
+ readonly log_epoch: string;
99
+ readonly path: string;
100
+ readonly position: string;
101
+ readonly return_to: null | {
102
+ readonly agent: string;
103
+ readonly name: string;
104
+ };
105
+ readonly room_ref: string;
106
+ readonly url: string;
107
+ };
108
+ };
109
+ readonly "chats/take-control": {
110
+ readonly params: {
111
+ readonly path: string;
112
+ readonly room_ref: string;
113
+ };
114
+ readonly result: {
115
+ readonly assignee: null | {
116
+ readonly agent: string;
117
+ readonly name: string;
118
+ } | {
119
+ readonly name: string;
120
+ readonly user: string;
121
+ };
122
+ readonly authority: string;
123
+ readonly log_epoch: string;
124
+ readonly path: string;
125
+ readonly position: string;
126
+ readonly return_to: null | {
127
+ readonly agent: string;
128
+ readonly name: string;
129
+ };
130
+ readonly room_ref: string;
131
+ readonly url: string;
132
+ };
133
+ };
134
+ readonly "conversations/create": {
135
+ readonly params: {
136
+ readonly agent_id: string;
137
+ readonly operation_id: string;
138
+ readonly replaces?: string;
139
+ };
140
+ readonly result: {
141
+ readonly agent_id: string;
142
+ readonly authority: string;
143
+ readonly conversation_id: string;
144
+ readonly log_epoch: string;
145
+ readonly position: string;
146
+ readonly url: string;
147
+ };
148
+ };
149
+ readonly "conversations/delete": {
150
+ readonly params: {
151
+ readonly conversation_id: string;
152
+ readonly operation_id: string;
153
+ };
154
+ readonly result: {
155
+ readonly authority: string;
156
+ readonly conversation_id: string;
157
+ readonly log_epoch: string;
158
+ readonly outcome: "deleted";
159
+ readonly position: string;
160
+ };
161
+ };
162
+ readonly "conversations/done": {
163
+ readonly params: {
164
+ readonly conversation_id?: string;
165
+ readonly operation_id: string;
166
+ readonly result?: string;
167
+ };
168
+ readonly result: {
169
+ readonly agent_id: string;
170
+ readonly authority: string;
171
+ readonly conversation_id: string;
172
+ readonly done: null | string;
173
+ readonly log_epoch: string;
174
+ readonly position: string;
175
+ readonly url: string;
176
+ };
177
+ };
178
+ readonly "conversations/history": {
179
+ readonly params: {
180
+ readonly conversations: readonly {
181
+ readonly after?: {
182
+ readonly accepted_at: string;
183
+ readonly message_id: string;
184
+ };
185
+ readonly conversation_id: string;
186
+ }[];
187
+ readonly limit?: number;
188
+ };
189
+ readonly result: {
190
+ readonly histories: readonly {
191
+ readonly agent_id: string;
192
+ readonly conversation_id: string;
193
+ readonly messages: readonly {
194
+ readonly accepted_at: string;
195
+ readonly context: null | {
196
+ readonly used: number;
197
+ readonly window: number;
198
+ };
199
+ readonly conversation_id: string;
200
+ readonly failure: null | string;
201
+ readonly message_id: string;
202
+ readonly parts: readonly ({
203
+ readonly command: string;
204
+ readonly target: null | string;
205
+ readonly type: "message";
206
+ } | {
207
+ readonly count: number;
208
+ readonly type: "commands";
209
+ } | {
210
+ readonly description: string;
211
+ readonly result: null | string;
212
+ readonly status: "done" | "running";
213
+ readonly type: "subagent";
214
+ } | {
215
+ readonly entries: readonly {
216
+ readonly content: string;
217
+ readonly status: string;
218
+ }[];
219
+ readonly type: "plan";
220
+ } | {
221
+ readonly file: string;
222
+ readonly media_type: string;
223
+ readonly name: string;
224
+ readonly type: "image";
225
+ } | {
226
+ readonly marker: "compaction" | "job" | "mode" | "model" | "retry";
227
+ readonly text: string;
228
+ readonly type: "marker";
229
+ } | {
230
+ readonly text: string;
231
+ readonly type: "reasoning";
232
+ } | {
233
+ readonly text: string;
234
+ readonly type: "text";
235
+ })[];
236
+ readonly role: "assistant" | "house" | "user";
237
+ readonly sender?: "conversation" | "customer" | "owner" | "report" | "requester" | "trigger";
238
+ readonly source?: {
239
+ readonly agent: {
240
+ readonly id: string;
241
+ readonly name: string;
242
+ readonly url: string;
243
+ };
244
+ readonly approved_at?: string;
245
+ readonly declined_at?: string;
246
+ readonly kind: "mail";
247
+ readonly owner: {
248
+ readonly name: string;
249
+ readonly user: string;
250
+ };
251
+ readonly request: string;
252
+ readonly room: string;
253
+ } | {
254
+ readonly agent: {
255
+ readonly id: string;
256
+ readonly name: string;
257
+ readonly url: string;
258
+ };
259
+ readonly kind: "declined";
260
+ readonly owner: {
261
+ readonly name: string;
262
+ readonly user: string;
263
+ };
264
+ readonly request: string;
265
+ } | {
266
+ readonly approved_at: null | string;
267
+ readonly kind: "request";
268
+ readonly request: string;
269
+ readonly requester: {
270
+ readonly name: string;
271
+ readonly room: string;
272
+ readonly url: string;
273
+ } | {
274
+ readonly name: string;
275
+ readonly user: string;
276
+ };
277
+ readonly room: {
278
+ readonly handle: string;
279
+ readonly name: string;
280
+ readonly ref: string;
281
+ readonly url: string;
282
+ };
283
+ readonly routine: null | {
284
+ readonly id: string;
285
+ readonly name: string;
286
+ readonly version: number;
287
+ };
288
+ } | {
289
+ readonly kind: "trigger";
290
+ readonly path: null | string;
291
+ readonly room: {
292
+ readonly handle: string;
293
+ readonly name: string;
294
+ readonly ref: string;
295
+ readonly url: string;
296
+ };
297
+ readonly trigger: {
298
+ readonly description: string;
299
+ readonly id: string;
300
+ };
301
+ };
302
+ readonly telegram_undelivered?: true;
303
+ readonly text: string;
304
+ readonly transcripts?: readonly {
305
+ readonly path: string;
306
+ readonly text: string;
307
+ }[];
308
+ readonly turn_id: null | string;
309
+ readonly url?: string;
310
+ readonly waiting?: true;
311
+ }[];
312
+ readonly next: null | {
313
+ readonly accepted_at: string;
314
+ readonly message_id: string;
315
+ };
316
+ readonly url: string;
317
+ }[];
318
+ };
319
+ };
320
+ readonly "conversations/interaction/answer": {
321
+ readonly params: {
322
+ readonly conversation_id: string;
323
+ readonly interaction_id: string;
324
+ readonly operation_id: string;
325
+ readonly response: readonly unknown[] | boolean | null | number | {
326
+ readonly [key: string]: unknown;
327
+ } | string;
328
+ };
329
+ readonly result: {
330
+ readonly agent_id: string;
331
+ readonly authority: string;
332
+ readonly conversation_id: string;
333
+ readonly interaction_id: string;
334
+ readonly log_epoch: string;
335
+ readonly position: string;
336
+ readonly url: string;
337
+ };
338
+ };
339
+ readonly "conversations/interrupt": {
340
+ readonly params: {
341
+ readonly conversation_id: string;
342
+ readonly operation_id: string;
343
+ };
344
+ readonly result: {
345
+ readonly agent_id: string;
346
+ readonly authority: string;
347
+ readonly conversation_id: string;
348
+ readonly log_epoch: string;
349
+ readonly position: string;
350
+ readonly url: string;
351
+ };
352
+ };
353
+ readonly "conversations/kill": {
354
+ readonly params: {
355
+ readonly conversation_id: string;
356
+ readonly operation_id: string;
357
+ };
358
+ readonly result: {
359
+ readonly agent_id: string;
360
+ readonly authority: string;
361
+ readonly conversation_id: string;
362
+ readonly log_epoch: string;
363
+ readonly position: string;
364
+ readonly url: string;
365
+ };
366
+ };
367
+ readonly "conversations/option": {
368
+ readonly params: {
369
+ readonly conversation_id: string;
370
+ readonly operation_id: string;
371
+ readonly option: string;
372
+ readonly value: boolean | string;
373
+ };
374
+ readonly result: {
375
+ readonly agent_id: string;
376
+ readonly authority: string;
377
+ readonly conversation_id: string;
378
+ readonly log_epoch: string;
379
+ readonly position: string;
380
+ readonly url: string;
381
+ };
382
+ };
383
+ readonly "conversations/rename": {
384
+ readonly params: {
385
+ readonly conversation_id: string;
386
+ readonly name: string;
387
+ readonly operation_id: string;
388
+ };
389
+ readonly result: {
390
+ readonly agent_id: string;
391
+ readonly authority: string;
392
+ readonly conversation_id: string;
393
+ readonly log_epoch: string;
394
+ readonly name: string;
395
+ readonly position: string;
396
+ readonly url: string;
397
+ };
398
+ };
399
+ readonly "conversations/retry": {
400
+ readonly params: {
401
+ readonly conversation_id: string;
402
+ readonly message_id: string;
403
+ readonly operation_id: string;
404
+ };
405
+ readonly result: {
406
+ readonly agent_id: string;
407
+ readonly authority: string;
408
+ readonly conversation_id: string;
409
+ readonly log_epoch: string;
410
+ readonly message_id: string;
411
+ readonly position: string;
412
+ readonly url: string;
413
+ };
414
+ };
415
+ readonly "conversations/send": {
416
+ readonly params: {
417
+ readonly conversation_id: string;
418
+ readonly operation_id: string;
419
+ readonly text: string;
420
+ };
421
+ readonly result: {
422
+ readonly agent_id: string;
423
+ readonly authority: string;
424
+ readonly conversation_id: string;
425
+ readonly log_epoch: string;
426
+ readonly message_id: string;
427
+ readonly position: string;
428
+ readonly url: string;
429
+ };
430
+ };
431
+ readonly "records/read": {
432
+ readonly params: {
433
+ readonly cursor?: string;
434
+ readonly limit?: number;
435
+ readonly order?: "asc" | "desc";
436
+ readonly room_ref: string;
437
+ };
438
+ readonly result: {
439
+ readonly next_cursor?: string;
440
+ readonly records: readonly {
441
+ readonly body: null | string;
442
+ readonly claimed: unknown;
443
+ readonly created_at: string;
444
+ readonly record: string;
445
+ readonly ref: string;
446
+ }[];
447
+ };
448
+ };
449
+ readonly "rooms/access/read": {
450
+ readonly params: {
451
+ readonly room_ref: string;
452
+ readonly statistics?: boolean;
453
+ };
454
+ readonly result: {
455
+ readonly authority: "administrator" | "member" | "owner";
456
+ readonly members: readonly {
457
+ readonly admitted_at: null | string;
458
+ readonly direct: readonly {
459
+ readonly level: null | "keep" | "open" | "search";
460
+ readonly namespace: string;
461
+ readonly operations: readonly ("delete" | "export" | "manageAccess" | "write")[];
462
+ }[];
463
+ readonly downloads_per_day?: number;
464
+ readonly entries: readonly {
465
+ readonly level: null | "keep" | "open" | "search";
466
+ readonly namespace: string;
467
+ readonly operations: readonly ("delete" | "export" | "manageAccess" | "write")[];
468
+ readonly sources: readonly {
469
+ readonly kind: "direct" | "inherited";
470
+ readonly level: null | "keep" | "open" | "search";
471
+ readonly namespace: string;
472
+ readonly operations: readonly ("delete" | "export" | "manageAccess" | "write")[];
473
+ }[];
474
+ }[];
475
+ readonly key: null | string;
476
+ readonly requests_per_day?: number;
477
+ readonly schema_roles: readonly string[];
478
+ readonly user: string;
479
+ readonly user_name: string;
480
+ }[];
481
+ readonly namespaces: readonly string[];
482
+ readonly owner: string;
483
+ readonly room_ref: string;
484
+ readonly statistics?: readonly {
485
+ readonly day: string;
486
+ readonly downloads: number;
487
+ readonly requests: number;
488
+ readonly text_bytes: number;
489
+ readonly user: string;
490
+ }[];
491
+ readonly url: string;
492
+ readonly viewer: string;
493
+ };
494
+ };
495
+ readonly "rooms/members": {
496
+ readonly params: {
497
+ readonly cursor?: string;
498
+ readonly history?: boolean;
499
+ readonly limit?: number;
500
+ readonly room_ref: string;
501
+ };
502
+ readonly result: {
503
+ readonly history?: readonly {
504
+ readonly at: string;
505
+ readonly kind: "granted" | "revoked";
506
+ readonly user: string;
507
+ }[];
508
+ readonly members: readonly {
509
+ readonly access?: "edit" | "keep" | "manage" | "open" | "owner" | "search";
510
+ readonly display_name: string;
511
+ readonly email?: string;
512
+ readonly member_document: null | string;
513
+ readonly only_while_online?: true;
514
+ readonly owner: boolean;
515
+ readonly schema_roles?: readonly string[];
516
+ readonly since: null | string;
517
+ readonly user: string;
518
+ }[];
519
+ readonly next_cursor?: string;
520
+ };
521
+ };
522
+ readonly "rooms/settings/processing/read": {
523
+ readonly params: {
524
+ readonly path: string;
525
+ readonly room_ref: string;
526
+ };
527
+ readonly result: {
528
+ readonly embedding: {
529
+ readonly condition: null | {
530
+ readonly kind: "demand_failed" | "embed_again_failed";
531
+ readonly path: string;
532
+ };
533
+ readonly embedding_estimate: null | {
534
+ readonly documents: number;
535
+ readonly measured_tokens: number;
536
+ readonly unmeasured_documents: number;
537
+ };
538
+ readonly finished: boolean;
539
+ readonly indexed_chunks: number;
540
+ };
541
+ readonly explicit: readonly {
542
+ readonly path: string;
543
+ readonly policy: "Off" | "On";
544
+ }[];
545
+ readonly path: string;
546
+ readonly policy: {
547
+ readonly from: null | string;
548
+ readonly origin: "default" | "explicit" | "inherited";
549
+ readonly reason: null | "room_too_large" | "unfunded";
550
+ readonly value: "Off" | "On";
551
+ };
552
+ readonly writable: boolean;
553
+ };
554
+ };
555
+ readonly "routines/requests": {
556
+ readonly params: {
557
+ readonly room_ref: string;
558
+ };
559
+ readonly result: {
560
+ readonly current: readonly {
561
+ readonly document: string;
562
+ readonly name: string;
563
+ }[];
564
+ readonly history: readonly {
565
+ readonly document: string;
566
+ readonly name: string;
567
+ }[];
568
+ };
569
+ };
570
+ readonly "site/submission": {
571
+ readonly params: {
572
+ readonly content: string;
573
+ };
574
+ readonly result: {
575
+ readonly submitted: true;
576
+ };
577
+ };
578
+ readonly "storage/inventory": {
579
+ readonly params: {
580
+ readonly room_ref?: string;
581
+ };
582
+ readonly result: {
583
+ readonly blob: {
584
+ readonly bytes: string;
585
+ readonly gigabytes: string;
586
+ };
587
+ readonly freshness: {
588
+ readonly state: "settled";
589
+ };
590
+ readonly indexed_text: {
591
+ readonly approximate_pages: null | string;
592
+ readonly bytes: string;
593
+ readonly gigabytes: string;
594
+ };
595
+ readonly measurement: {
596
+ readonly page_reference: null | {
597
+ readonly bytes_per_page: string;
598
+ readonly encoding: string;
599
+ readonly font: string;
600
+ readonly font_size_pt: string;
601
+ readonly layout: string;
602
+ };
603
+ };
604
+ readonly room_ref: string;
605
+ readonly total: {
606
+ readonly bytes: string;
607
+ readonly gigabytes: string;
608
+ };
609
+ readonly url: string;
610
+ } | {
611
+ readonly blob: {
612
+ readonly bytes: string;
613
+ readonly gigabytes: string;
614
+ };
615
+ readonly freshness: {
616
+ readonly state: "settled";
617
+ };
618
+ readonly indexed_text: {
619
+ readonly approximate_pages: null | string;
620
+ readonly bytes: string;
621
+ readonly gigabytes: string;
622
+ };
623
+ readonly measurement: {
624
+ readonly page_reference: null | {
625
+ readonly bytes_per_page: string;
626
+ readonly encoding: string;
627
+ readonly font: string;
628
+ readonly font_size_pt: string;
629
+ readonly layout: string;
630
+ };
631
+ };
632
+ readonly site_images: {
633
+ readonly bound: string;
634
+ readonly bytes: string;
635
+ readonly payloads: string;
636
+ };
637
+ readonly total: {
638
+ readonly bytes: string;
639
+ readonly gigabytes: string;
640
+ };
641
+ } | {
642
+ readonly blob: {
643
+ readonly bytes: string;
644
+ readonly gigabytes: string;
645
+ };
646
+ readonly freshness: {
647
+ readonly state: "settled";
648
+ };
649
+ readonly indexed_text: {
650
+ readonly approximate_pages: null | string;
651
+ readonly bytes: string;
652
+ readonly gigabytes: string;
653
+ };
654
+ readonly measurement: {
655
+ readonly page_reference: null | {
656
+ readonly bytes_per_page: string;
657
+ readonly encoding: string;
658
+ readonly font: string;
659
+ readonly font_size_pt: string;
660
+ readonly layout: string;
661
+ };
662
+ };
663
+ readonly total: {
664
+ readonly bytes: string;
665
+ readonly gigabytes: string;
666
+ };
667
+ };
668
+ };
669
+ readonly "triggers/fired": {
670
+ readonly params: {
671
+ readonly room_ref: string;
672
+ };
673
+ readonly result: {
674
+ readonly events: readonly {
675
+ readonly actions: readonly ({
676
+ readonly cap: "address_submissions" | "app_sockets" | "environment_functions" | "export_starts" | "folder_subscriptions" | "kit_connections" | "live_shares" | "open_uploads" | "ownership_offers" | "push_addresses" | "push_deliveries" | "room_triggers" | "service_keys" | "share_creations" | "share_room_creations" | "shared_schemas" | "site_rooms" | "slot_rooms" | "waiting_web_wizards" | "writes";
677
+ readonly code: "cap_reached";
678
+ readonly outcome: "refused";
679
+ readonly position: number;
680
+ readonly retry_at: string;
681
+ } | {
682
+ readonly cap: "address_submissions" | "app_sockets" | "environment_functions" | "export_starts" | "folder_subscriptions" | "kit_connections" | "live_shares" | "open_uploads" | "ownership_offers" | "push_addresses" | "push_deliveries" | "room_triggers" | "service_keys" | "share_creations" | "share_room_creations" | "shared_schemas" | "site_rooms" | "slot_rooms" | "waiting_web_wizards" | "writes";
683
+ readonly code: "cap_reached";
684
+ readonly outcome: "refused";
685
+ readonly position: number;
686
+ } | {
687
+ readonly code: "agent_unavailable";
688
+ readonly outcome: "withdrawn";
689
+ readonly position: number;
690
+ } | {
691
+ readonly code: "function_failed";
692
+ readonly cut?: boolean;
693
+ readonly error: string;
694
+ readonly exit_code?: number;
695
+ readonly final: true;
696
+ readonly outcome: "failed";
697
+ readonly output?: string;
698
+ readonly position: number;
699
+ readonly run: string;
700
+ } | {
701
+ readonly code: "function_failed";
702
+ readonly error: string;
703
+ readonly final: true;
704
+ readonly outcome: "failed";
705
+ readonly position: number;
706
+ readonly release: string;
707
+ } | {
708
+ readonly code: "function_not_started";
709
+ readonly final?: true;
710
+ readonly outcome: "failed";
711
+ readonly position: number;
712
+ readonly tries: number;
713
+ } | {
714
+ readonly code: "limit_reached";
715
+ readonly limit: "reads";
716
+ readonly outcome: "refused";
717
+ readonly period: "day" | "minute";
718
+ readonly position: number;
719
+ readonly retry_at: string;
720
+ readonly value: string;
721
+ } | {
722
+ readonly code: "limit_reached";
723
+ readonly limit: "writes";
724
+ readonly outcome: "refused";
725
+ readonly period: "day" | "minute";
726
+ readonly position: number;
727
+ readonly retry_at: string;
728
+ } | {
729
+ readonly code: "limit_reached";
730
+ readonly limit: "blob" | "indexed_text";
731
+ readonly outcome: "refused";
732
+ readonly position: number;
733
+ readonly used: string;
734
+ readonly value: string;
735
+ } | {
736
+ readonly code: "limit_reached";
737
+ readonly limit: "custom_domains" | "external_calls" | "mcp_downloads" | "mcp_reads" | "publish_data" | "site_submissions" | "sites";
738
+ readonly outcome: "refused";
739
+ readonly position: number;
740
+ readonly retry_at: string;
741
+ } | {
742
+ readonly code: "limit_reached";
743
+ readonly limit: "custom_domains" | "external_calls" | "mcp_downloads" | "mcp_reads" | "publish_data" | "site_submissions" | "sites";
744
+ readonly outcome: "refused";
745
+ readonly position: number;
746
+ } | {
747
+ readonly code: "app_function_not_found" | "app_not_found" | "environment_function_not_found" | "environment_offline" | "no_recipient" | "routine_not_found" | "routine_retired" | "target_agent_unavailable";
748
+ readonly outcome: "no_target";
749
+ readonly position: number;
750
+ } | {
751
+ readonly code: "internal_error" | "routine_request_not_started";
752
+ readonly outcome: "failed";
753
+ readonly position: number;
754
+ } | {
755
+ readonly code: string;
756
+ readonly outcome: "refused";
757
+ readonly position: number;
758
+ } | {
759
+ readonly cut?: boolean;
760
+ readonly exit_code?: number;
761
+ readonly outcome: "ran";
762
+ readonly output?: string;
763
+ readonly position: number;
764
+ readonly run: string;
765
+ } | {
766
+ readonly outcome: "continued";
767
+ readonly position: number;
768
+ readonly request: string;
769
+ } | {
770
+ readonly outcome: "notified";
771
+ readonly position: number;
772
+ readonly reached: number;
773
+ } | {
774
+ readonly outcome: "paused";
775
+ readonly position: number;
776
+ } | {
777
+ readonly outcome: "ran";
778
+ readonly position: number;
779
+ readonly release: string;
780
+ } | {
781
+ readonly outcome: "requested";
782
+ readonly position: number;
783
+ readonly request: string;
784
+ } | {
785
+ readonly outcome: "running";
786
+ readonly position: number;
787
+ readonly release: string;
788
+ } | {
789
+ readonly outcome: "running";
790
+ readonly position: number;
791
+ readonly run: string;
792
+ } | {
793
+ readonly outcome: "waiting";
794
+ readonly position: number;
795
+ })[];
796
+ readonly code?: "cap_reached";
797
+ readonly created_at: string;
798
+ readonly missed?: "failed" | "skipped";
799
+ readonly moment?: string;
800
+ readonly path?: string;
801
+ readonly trigger: string;
802
+ readonly url?: string;
803
+ }[];
804
+ };
805
+ };
806
+ }
807
+ export type HouseParams<Name extends string> = Name extends keyof HouseMethods ? HouseMethods[Name]['params'] : unknown;
808
+ type CallResult = Awaited<ReturnType<MdRuntimeClient['call']>>;
809
+ export type HouseResult<Name extends string> = Exclude<CallResult, {
810
+ readonly kind: 'action';
811
+ }> | (Extract<CallResult, {
812
+ readonly kind: 'action';
813
+ }> & {
814
+ readonly result: Name extends keyof HouseMethods ? HouseMethods[Name]['result'] : unknown;
815
+ });
6
816
  export interface HouseRuntime extends Omit<MdRuntimeClient, 'call'> {
7
- call<Name extends Open<keyof HouseCalls>>(name: Name, input: HouseCallInput<Name>): ReturnType<MdRuntimeClient['call']>;
817
+ call<Name extends Open<keyof HouseMethods>>(method: Name, params: HouseParams<Name>): Promise<HouseResult<Name>>;
8
818
  }
9
819
  export interface HouseSyncState {
10
820
  readonly state: string;
@@ -14,6 +824,7 @@ export interface HouseCredentialState {
14
824
  readonly state: Open<'none' | 'held' | 'rejected'>;
15
825
  readonly expiresAt: number | null;
16
826
  }
827
+ export type HouseDatabaseFailure = 'unsupported' | 'damaged';
17
828
  export type HouseAnalyticsChoice = 'accept' | 'decline';
18
829
  export interface HouseAnalytics {
19
830
  readonly measures: boolean;
@@ -33,6 +844,7 @@ export interface HouseStatus {
33
844
  readonly retryable: boolean;
34
845
  } | null;
35
846
  readonly loss: string | null;
847
+ readonly database: Open<HouseDatabaseFailure> | null;
36
848
  readonly analytics: HouseAnalytics;
37
849
  readonly serviceMode: Open<'open' | 'write-halted'> | null;
38
850
  readonly offline: boolean;
@@ -71,8 +883,7 @@ export interface HouseExternalRequest {
71
883
  readonly headers?: Readonly<Record<string, string>>;
72
884
  readonly body?: string;
73
885
  readonly body_base64?: string;
74
- readonly account?: string;
75
- readonly slot?: string;
886
+ readonly room_ref?: string;
76
887
  }
77
888
  export type HouseExternalAnswer = {
78
889
  readonly status: number;
@@ -110,8 +921,32 @@ export interface HouseBrowserRefused extends Error {
110
921
  readonly code: string;
111
922
  readonly retryable: boolean;
112
923
  }
924
+ export interface HouseCooperation {
925
+ placed(): Promise<void> | void;
926
+ }
927
+ export type HouseChatWidth = 'full' | '3/4' | '1/2' | '1/3';
928
+ export interface HouseChatOpened {
929
+ readonly conversation: string | null;
930
+ readonly agent: string | null;
931
+ }
932
+ export interface HouseChatOptions {
933
+ readonly conversation?: string | null;
934
+ readonly agent?: string | null;
935
+ readonly showChats?: boolean;
936
+ readonly width?: HouseChatWidth;
937
+ readonly onOpen?: (opened: HouseChatOpened) => void;
938
+ readonly onLink?: (href: string) => void;
939
+ }
940
+ export interface HouseMountedChat {
941
+ update(options: HouseChatOptions): void;
942
+ unmount(): void;
943
+ }
944
+ export interface HouseChat {
945
+ mount(element: object, options?: HouseChatOptions): Promise<HouseMountedChat>;
946
+ }
113
947
  export interface HouseBridge {
114
948
  readonly runtime: Promise<HouseRuntime>;
949
+ readonly chat: HouseChat;
115
950
  address(): string | null;
116
951
  onAddress(listener: (address: string) => void): () => void;
117
952
  push(address: string): Promise<string>;
@@ -130,8 +965,10 @@ export interface HouseBridge {
130
965
  onStatus(listener: (status: HouseStatus) => void): () => void;
131
966
  messages(listener: (message: HouseAppMessage) => void): () => void;
132
967
  analyticsConsent(choice: HouseAnalyticsChoice): void;
968
+ cooperate(cooperation: HouseCooperation): () => void;
133
969
  }
134
970
  export interface HouseHeld {
135
971
  readonly houseBridge: HouseBridge;
136
972
  }
137
973
  export declare const houseBridge: () => HouseBridge;
974
+ export {};