@agentshouse/app-bridge 0.1.0-c1bc683ed8f4e → 0.1.0-c1ccced28150f

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 (57) hide show
  1. package/README.md +9 -9
  2. package/dist/index.d.ts +826 -18
  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 +121 -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 +15 -8
  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 +28 -14
  21. package/dist/mdruntime/conversation.d.ts +26 -11
  22. package/dist/mdruntime/durability.d.ts +2 -5
  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 +6 -1
  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 +38 -2
  33. package/dist/mdruntime/reach.d.ts +14 -6
  34. package/dist/mdruntime/readiness.d.ts +14 -15
  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 +33 -3
  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 +4 -3
  42. package/dist/mdruntime/store.d.ts +93 -98
  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 +33 -5
  46. package/dist/test-host.d.ts +7 -4
  47. package/dist/test-host.js +18 -28
  48. package/docs/families.md +52 -47
  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/acquisition.d.ts +0 -13
  53. package/dist/mdruntime/file.d.ts +0 -19
  54. package/dist/mdruntime/rows.d.ts +0 -36
  55. package/dist/mdruntime/shared.d.ts +0 -10
  56. package/dist/mdruntime/transfer.d.ts +0 -9
  57. package/dist/mdruntime/turn.d.ts +0 -6
package/dist/index.d.ts CHANGED
@@ -1,9 +1,805 @@
1
1
  import type { MdRuntimeClient, Open } from './mdruntime/client.js';
2
- import type { HouseCalls } from './calls.js';
3
- export type { HouseCalls } from './calls.js';
4
- export type HouseCallInput<Name extends string> = Name extends keyof HouseCalls ? HouseCalls[Name] : unknown;
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 kind: "mail";
245
+ readonly owner: {
246
+ readonly name: string;
247
+ readonly user: string;
248
+ };
249
+ readonly request: string;
250
+ } | {
251
+ readonly approved_at: null | string;
252
+ readonly kind: "request";
253
+ readonly request: string;
254
+ readonly requester: {
255
+ readonly name: string;
256
+ readonly room: string;
257
+ readonly url: string;
258
+ } | {
259
+ readonly name: string;
260
+ readonly user: string;
261
+ };
262
+ readonly room: {
263
+ readonly handle: string;
264
+ readonly name: string;
265
+ readonly ref: string;
266
+ readonly url: string;
267
+ };
268
+ readonly routine: null | {
269
+ readonly id: string;
270
+ readonly name: string;
271
+ readonly version: number;
272
+ };
273
+ } | {
274
+ readonly kind: "trigger";
275
+ readonly path: null | string;
276
+ readonly room: {
277
+ readonly handle: string;
278
+ readonly name: string;
279
+ readonly ref: string;
280
+ readonly url: string;
281
+ };
282
+ readonly trigger: {
283
+ readonly description: string;
284
+ readonly id: string;
285
+ };
286
+ };
287
+ readonly telegram_undelivered?: true;
288
+ readonly text: string;
289
+ readonly transcripts?: readonly {
290
+ readonly path: string;
291
+ readonly text: string;
292
+ }[];
293
+ readonly turn_id: null | string;
294
+ readonly url?: string;
295
+ readonly waiting?: true;
296
+ }[];
297
+ readonly next: null | {
298
+ readonly accepted_at: string;
299
+ readonly message_id: string;
300
+ };
301
+ readonly url: string;
302
+ }[];
303
+ };
304
+ };
305
+ readonly "conversations/interaction/answer": {
306
+ readonly params: {
307
+ readonly conversation_id: string;
308
+ readonly interaction_id: string;
309
+ readonly operation_id: string;
310
+ readonly response: readonly unknown[] | boolean | null | number | {
311
+ readonly [key: string]: unknown;
312
+ } | string;
313
+ };
314
+ readonly result: {
315
+ readonly agent_id: string;
316
+ readonly authority: string;
317
+ readonly conversation_id: string;
318
+ readonly interaction_id: string;
319
+ readonly log_epoch: string;
320
+ readonly position: string;
321
+ readonly url: string;
322
+ };
323
+ };
324
+ readonly "conversations/interrupt": {
325
+ readonly params: {
326
+ readonly conversation_id: string;
327
+ readonly operation_id: string;
328
+ };
329
+ readonly result: {
330
+ readonly agent_id: string;
331
+ readonly authority: string;
332
+ readonly conversation_id: string;
333
+ readonly log_epoch: string;
334
+ readonly position: string;
335
+ readonly url: string;
336
+ };
337
+ };
338
+ readonly "conversations/kill": {
339
+ readonly params: {
340
+ readonly conversation_id: string;
341
+ readonly operation_id: string;
342
+ };
343
+ readonly result: {
344
+ readonly agent_id: string;
345
+ readonly authority: string;
346
+ readonly conversation_id: string;
347
+ readonly log_epoch: string;
348
+ readonly position: string;
349
+ readonly url: string;
350
+ };
351
+ };
352
+ readonly "conversations/option": {
353
+ readonly params: {
354
+ readonly conversation_id: string;
355
+ readonly operation_id: string;
356
+ readonly option: string;
357
+ readonly value: boolean | string;
358
+ };
359
+ readonly result: {
360
+ readonly agent_id: string;
361
+ readonly authority: string;
362
+ readonly conversation_id: string;
363
+ readonly log_epoch: string;
364
+ readonly position: string;
365
+ readonly url: string;
366
+ };
367
+ };
368
+ readonly "conversations/rename": {
369
+ readonly params: {
370
+ readonly conversation_id: string;
371
+ readonly name: string;
372
+ readonly operation_id: 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 name: string;
380
+ readonly position: string;
381
+ readonly url: string;
382
+ };
383
+ };
384
+ readonly "conversations/retry": {
385
+ readonly params: {
386
+ readonly conversation_id: string;
387
+ readonly message_id: string;
388
+ readonly operation_id: string;
389
+ };
390
+ readonly result: {
391
+ readonly agent_id: string;
392
+ readonly authority: string;
393
+ readonly conversation_id: string;
394
+ readonly log_epoch: string;
395
+ readonly message_id: string;
396
+ readonly position: string;
397
+ readonly url: string;
398
+ };
399
+ };
400
+ readonly "conversations/send": {
401
+ readonly params: {
402
+ readonly conversation_id: string;
403
+ readonly operation_id: string;
404
+ readonly text: string;
405
+ };
406
+ readonly result: {
407
+ readonly agent_id: string;
408
+ readonly authority: string;
409
+ readonly conversation_id: string;
410
+ readonly log_epoch: string;
411
+ readonly message_id: string;
412
+ readonly position: string;
413
+ readonly url: string;
414
+ };
415
+ };
416
+ readonly "records/read": {
417
+ readonly params: {
418
+ readonly cursor?: string;
419
+ readonly limit?: number;
420
+ readonly order?: "asc" | "desc";
421
+ readonly room_ref: string;
422
+ };
423
+ readonly result: {
424
+ readonly next_cursor?: string;
425
+ readonly records: readonly {
426
+ readonly body: null | string;
427
+ readonly claimed: unknown;
428
+ readonly created_at: string;
429
+ readonly record: string;
430
+ readonly ref: string;
431
+ }[];
432
+ };
433
+ };
434
+ readonly "rooms/access/read": {
435
+ readonly params: {
436
+ readonly room_ref: string;
437
+ readonly statistics?: boolean;
438
+ };
439
+ readonly result: {
440
+ readonly authority: "administrator" | "member" | "owner";
441
+ readonly members: readonly {
442
+ readonly admitted_at: null | string;
443
+ readonly direct: readonly {
444
+ readonly level: null | "keep" | "open" | "search";
445
+ readonly namespace: string;
446
+ readonly operations: readonly ("delete" | "export" | "manageAccess" | "write")[];
447
+ }[];
448
+ readonly downloads_per_day?: number;
449
+ readonly entries: readonly {
450
+ readonly level: null | "keep" | "open" | "search";
451
+ readonly namespace: string;
452
+ readonly operations: readonly ("delete" | "export" | "manageAccess" | "write")[];
453
+ readonly sources: readonly {
454
+ readonly kind: "direct" | "inherited";
455
+ readonly level: null | "keep" | "open" | "search";
456
+ readonly namespace: string;
457
+ readonly operations: readonly ("delete" | "export" | "manageAccess" | "write")[];
458
+ }[];
459
+ }[];
460
+ readonly key: null | string;
461
+ readonly requests_per_day?: number;
462
+ readonly schema_roles: readonly string[];
463
+ readonly user: string;
464
+ readonly user_name: string;
465
+ }[];
466
+ readonly namespaces: readonly string[];
467
+ readonly owner: string;
468
+ readonly room_ref: string;
469
+ readonly statistics?: readonly {
470
+ readonly day: string;
471
+ readonly downloads: number;
472
+ readonly requests: number;
473
+ readonly text_bytes: number;
474
+ readonly user: string;
475
+ }[];
476
+ readonly url: string;
477
+ readonly viewer: string;
478
+ };
479
+ };
480
+ readonly "rooms/members": {
481
+ readonly params: {
482
+ readonly cursor?: string;
483
+ readonly history?: boolean;
484
+ readonly limit?: number;
485
+ readonly room_ref: string;
486
+ };
487
+ readonly result: {
488
+ readonly history?: readonly {
489
+ readonly at: string;
490
+ readonly kind: "granted" | "revoked";
491
+ readonly user: string;
492
+ }[];
493
+ readonly members: readonly {
494
+ readonly access?: "edit" | "keep" | "manage" | "open" | "owner" | "search";
495
+ readonly display_name: string;
496
+ readonly email?: string;
497
+ readonly member_document: null | string;
498
+ readonly only_while_online?: true;
499
+ readonly owner: boolean;
500
+ readonly schema_roles?: readonly string[];
501
+ readonly since: null | string;
502
+ readonly user: string;
503
+ }[];
504
+ readonly next_cursor?: string;
505
+ };
506
+ };
507
+ readonly "rooms/settings/processing/read": {
508
+ readonly params: {
509
+ readonly path: string;
510
+ readonly room_ref: string;
511
+ };
512
+ readonly result: {
513
+ readonly embedding: {
514
+ readonly condition: null | {
515
+ readonly kind: "demand_failed" | "embed_again_failed";
516
+ readonly path: string;
517
+ };
518
+ readonly embedding_estimate: null | {
519
+ readonly documents: number;
520
+ readonly measured_tokens: number;
521
+ readonly unmeasured_documents: number;
522
+ };
523
+ readonly finished: boolean;
524
+ readonly indexed_chunks: number;
525
+ };
526
+ readonly explicit: readonly {
527
+ readonly path: string;
528
+ readonly policy: "Off" | "On";
529
+ }[];
530
+ readonly path: string;
531
+ readonly policy: {
532
+ readonly from: null | string;
533
+ readonly origin: "default" | "explicit" | "inherited";
534
+ readonly reason: null | "room_too_large" | "unfunded";
535
+ readonly value: "Off" | "On";
536
+ };
537
+ readonly writable: boolean;
538
+ };
539
+ };
540
+ readonly "routines/requests": {
541
+ readonly params: {
542
+ readonly room_ref: string;
543
+ };
544
+ readonly result: {
545
+ readonly current: readonly {
546
+ readonly document: string;
547
+ readonly name: string;
548
+ }[];
549
+ readonly history: readonly {
550
+ readonly document: string;
551
+ readonly name: string;
552
+ }[];
553
+ };
554
+ };
555
+ readonly "site/submission": {
556
+ readonly params: {
557
+ readonly content: string;
558
+ };
559
+ readonly result: {
560
+ readonly submitted: true;
561
+ };
562
+ };
563
+ readonly "storage/inventory": {
564
+ readonly params: {
565
+ readonly room_ref?: string;
566
+ };
567
+ readonly result: {
568
+ readonly blob: {
569
+ readonly bytes: string;
570
+ readonly gigabytes: string;
571
+ };
572
+ readonly freshness: {
573
+ readonly state: "settled";
574
+ };
575
+ readonly indexed_text: {
576
+ readonly approximate_pages: null | string;
577
+ readonly bytes: string;
578
+ readonly gigabytes: string;
579
+ };
580
+ readonly measurement: {
581
+ readonly page_reference: null | {
582
+ readonly bytes_per_page: string;
583
+ readonly encoding: string;
584
+ readonly font: string;
585
+ readonly font_size_pt: string;
586
+ readonly layout: string;
587
+ };
588
+ };
589
+ readonly room_ref: string;
590
+ readonly total: {
591
+ readonly bytes: string;
592
+ readonly gigabytes: string;
593
+ };
594
+ readonly url: string;
595
+ } | {
596
+ readonly blob: {
597
+ readonly bytes: string;
598
+ readonly gigabytes: string;
599
+ };
600
+ readonly freshness: {
601
+ readonly state: "settled";
602
+ };
603
+ readonly indexed_text: {
604
+ readonly approximate_pages: null | string;
605
+ readonly bytes: string;
606
+ readonly gigabytes: string;
607
+ };
608
+ readonly measurement: {
609
+ readonly page_reference: null | {
610
+ readonly bytes_per_page: string;
611
+ readonly encoding: string;
612
+ readonly font: string;
613
+ readonly font_size_pt: string;
614
+ readonly layout: string;
615
+ };
616
+ };
617
+ readonly site_images: {
618
+ readonly bound: string;
619
+ readonly bytes: string;
620
+ readonly payloads: string;
621
+ };
622
+ readonly total: {
623
+ readonly bytes: string;
624
+ readonly gigabytes: string;
625
+ };
626
+ } | {
627
+ readonly blob: {
628
+ readonly bytes: string;
629
+ readonly gigabytes: string;
630
+ };
631
+ readonly freshness: {
632
+ readonly state: "settled";
633
+ };
634
+ readonly indexed_text: {
635
+ readonly approximate_pages: null | string;
636
+ readonly bytes: string;
637
+ readonly gigabytes: string;
638
+ };
639
+ readonly measurement: {
640
+ readonly page_reference: null | {
641
+ readonly bytes_per_page: string;
642
+ readonly encoding: string;
643
+ readonly font: string;
644
+ readonly font_size_pt: string;
645
+ readonly layout: string;
646
+ };
647
+ };
648
+ readonly total: {
649
+ readonly bytes: string;
650
+ readonly gigabytes: string;
651
+ };
652
+ };
653
+ };
654
+ readonly "triggers/fired": {
655
+ readonly params: {
656
+ readonly room_ref: string;
657
+ };
658
+ readonly result: {
659
+ readonly events: readonly {
660
+ readonly actions: readonly ({
661
+ 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";
662
+ readonly code: "cap_reached";
663
+ readonly outcome: "refused";
664
+ readonly position: number;
665
+ readonly retry_at: string;
666
+ } | {
667
+ 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";
668
+ readonly code: "cap_reached";
669
+ readonly outcome: "refused";
670
+ readonly position: number;
671
+ } | {
672
+ readonly code: "agent_unavailable";
673
+ readonly outcome: "withdrawn";
674
+ readonly position: number;
675
+ } | {
676
+ readonly code: "function_failed";
677
+ readonly cut?: boolean;
678
+ readonly error: string;
679
+ readonly exit_code?: number;
680
+ readonly final: true;
681
+ readonly outcome: "failed";
682
+ readonly output?: string;
683
+ readonly position: number;
684
+ readonly run: string;
685
+ } | {
686
+ readonly code: "function_failed";
687
+ readonly error: string;
688
+ readonly final: true;
689
+ readonly outcome: "failed";
690
+ readonly position: number;
691
+ readonly release: string;
692
+ } | {
693
+ readonly code: "function_not_started";
694
+ readonly final?: true;
695
+ readonly outcome: "failed";
696
+ readonly position: number;
697
+ readonly tries: number;
698
+ } | {
699
+ readonly code: "limit_reached";
700
+ readonly limit: "reads";
701
+ readonly outcome: "refused";
702
+ readonly period: "day" | "minute";
703
+ readonly position: number;
704
+ readonly retry_at: string;
705
+ readonly value: string;
706
+ } | {
707
+ readonly code: "limit_reached";
708
+ readonly limit: "writes";
709
+ readonly outcome: "refused";
710
+ readonly period: "day" | "minute";
711
+ readonly position: number;
712
+ readonly retry_at: string;
713
+ } | {
714
+ readonly code: "limit_reached";
715
+ readonly limit: "blob" | "indexed_text";
716
+ readonly outcome: "refused";
717
+ readonly position: number;
718
+ readonly used: string;
719
+ readonly value: string;
720
+ } | {
721
+ readonly code: "limit_reached";
722
+ readonly limit: "custom_domains" | "external_calls" | "mcp_downloads" | "mcp_reads" | "publish_data" | "site_submissions" | "sites";
723
+ readonly outcome: "refused";
724
+ readonly position: number;
725
+ readonly retry_at: string;
726
+ } | {
727
+ readonly code: "limit_reached";
728
+ readonly limit: "custom_domains" | "external_calls" | "mcp_downloads" | "mcp_reads" | "publish_data" | "site_submissions" | "sites";
729
+ readonly outcome: "refused";
730
+ readonly position: number;
731
+ } | {
732
+ 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";
733
+ readonly outcome: "no_target";
734
+ readonly position: number;
735
+ } | {
736
+ readonly code: "internal_error" | "routine_request_not_started";
737
+ readonly outcome: "failed";
738
+ readonly position: number;
739
+ } | {
740
+ readonly code: string;
741
+ readonly outcome: "refused";
742
+ readonly position: number;
743
+ } | {
744
+ readonly cut?: boolean;
745
+ readonly exit_code?: number;
746
+ readonly outcome: "ran";
747
+ readonly output?: string;
748
+ readonly position: number;
749
+ readonly run: string;
750
+ } | {
751
+ readonly outcome: "continued";
752
+ readonly position: number;
753
+ readonly request: string;
754
+ } | {
755
+ readonly outcome: "notified";
756
+ readonly position: number;
757
+ readonly reached: number;
758
+ } | {
759
+ readonly outcome: "paused";
760
+ readonly position: number;
761
+ } | {
762
+ readonly outcome: "ran";
763
+ readonly position: number;
764
+ readonly release: string;
765
+ } | {
766
+ readonly outcome: "requested";
767
+ readonly position: number;
768
+ readonly request: string;
769
+ } | {
770
+ readonly outcome: "running";
771
+ readonly position: number;
772
+ readonly release: string;
773
+ } | {
774
+ readonly outcome: "running";
775
+ readonly position: number;
776
+ readonly run: string;
777
+ } | {
778
+ readonly outcome: "waiting";
779
+ readonly position: number;
780
+ })[];
781
+ readonly code?: "cap_reached";
782
+ readonly created_at: string;
783
+ readonly missed?: "failed" | "skipped";
784
+ readonly moment?: string;
785
+ readonly path?: string;
786
+ readonly trigger: string;
787
+ readonly url?: string;
788
+ }[];
789
+ };
790
+ };
791
+ }
792
+ export type HouseParams<Name extends string> = Name extends keyof HouseMethods ? HouseMethods[Name]['params'] : unknown;
793
+ type CallResult = Awaited<ReturnType<MdRuntimeClient['call']>>;
794
+ export type HouseResult<Name extends string> = Exclude<CallResult, {
795
+ readonly kind: 'action';
796
+ }> | (Extract<CallResult, {
797
+ readonly kind: 'action';
798
+ }> & {
799
+ readonly result: Name extends keyof HouseMethods ? HouseMethods[Name]['result'] : unknown;
800
+ });
5
801
  export interface HouseRuntime extends Omit<MdRuntimeClient, 'call'> {
6
- call<Name extends Open<keyof HouseCalls>>(name: Name, input: HouseCallInput<Name>): ReturnType<MdRuntimeClient['call']>;
802
+ call<Name extends Open<keyof HouseMethods>>(method: Name, params: HouseParams<Name>): Promise<HouseResult<Name>>;
7
803
  }
8
804
  export interface HouseSyncState {
9
805
  readonly state: string;
@@ -13,6 +809,7 @@ export interface HouseCredentialState {
13
809
  readonly state: Open<'none' | 'held' | 'rejected'>;
14
810
  readonly expiresAt: number | null;
15
811
  }
812
+ export type HouseDatabaseFailure = 'unsupported' | 'damaged';
16
813
  export type HouseAnalyticsChoice = 'accept' | 'decline';
17
814
  export interface HouseAnalytics {
18
815
  readonly measures: boolean;
@@ -32,6 +829,7 @@ export interface HouseStatus {
32
829
  readonly retryable: boolean;
33
830
  } | null;
34
831
  readonly loss: string | null;
832
+ readonly database: Open<HouseDatabaseFailure> | null;
35
833
  readonly analytics: HouseAnalytics;
36
834
  readonly serviceMode: Open<'open' | 'write-halted'> | null;
37
835
  readonly offline: boolean;
@@ -70,8 +868,7 @@ export interface HouseExternalRequest {
70
868
  readonly headers?: Readonly<Record<string, string>>;
71
869
  readonly body?: string;
72
870
  readonly body_base64?: string;
73
- readonly account?: string;
74
- readonly slot?: string;
871
+ readonly room_ref?: string;
75
872
  }
76
873
  export type HouseExternalAnswer = {
77
874
  readonly status: number;
@@ -109,22 +906,32 @@ export interface HouseBrowserRefused extends Error {
109
906
  readonly code: string;
110
907
  readonly retryable: boolean;
111
908
  }
112
- export interface HouseTrialWithheld {
113
- readonly code: Open<'house_trial_withheld'>;
114
- readonly retryable: true;
115
- }
116
- export type HouseTask = unknown;
117
- export type HouseActivation = Open<'committed' | 'abandoned'>;
118
909
  export interface HouseCooperation {
119
- checkpoint(): Promise<void> | void;
120
- persist(): Promise<void> | void;
121
- capture(): Promise<HouseTask> | HouseTask;
122
- restore(task: HouseTask | null): Promise<void> | void;
123
- ready(): Promise<boolean> | boolean;
124
- settle(activation: HouseActivation): void;
910
+ placed(): Promise<void> | void;
911
+ }
912
+ export type HouseChatWidth = 'full' | '3/4' | '1/2' | '1/3';
913
+ export interface HouseChatOpened {
914
+ readonly conversation: string | null;
915
+ readonly agent: string | null;
916
+ }
917
+ export interface HouseChatOptions {
918
+ readonly conversation?: string | null;
919
+ readonly agent?: string | null;
920
+ readonly showChats?: boolean;
921
+ readonly width?: HouseChatWidth;
922
+ readonly onOpen?: (opened: HouseChatOpened) => void;
923
+ readonly onLink?: (href: string) => void;
924
+ }
925
+ export interface HouseMountedChat {
926
+ update(options: HouseChatOptions): void;
927
+ unmount(): void;
928
+ }
929
+ export interface HouseChat {
930
+ mount(element: object, options?: HouseChatOptions): Promise<HouseMountedChat>;
125
931
  }
126
932
  export interface HouseBridge {
127
933
  readonly runtime: Promise<HouseRuntime>;
934
+ readonly chat: HouseChat;
128
935
  address(): string | null;
129
936
  onAddress(listener: (address: string) => void): () => void;
130
937
  push(address: string): Promise<string>;
@@ -149,3 +956,4 @@ export interface HouseHeld {
149
956
  readonly houseBridge: HouseBridge;
150
957
  }
151
958
  export declare const houseBridge: () => HouseBridge;
959
+ export {};