@agentshouse/app-bridge 0.1.0-ca559eade7c19 → 0.1.0-ca61ac777c0b7

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 (108) hide show
  1. package/README.md +11 -11
  2. package/dist/index.d.ts +1033 -20
  3. package/dist/mdmodel/definition.d.ts +18 -1
  4. package/dist/mdmodel/document.d.ts +10 -6
  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 +25 -11
  8. package/dist/mdmodel/kinds.d.ts +17 -0
  9. package/dist/mdmodel/markdown.d.ts +50 -0
  10. package/dist/mdmodel/paths.d.ts +9 -1
  11. package/dist/mdmodel/pattern.d.ts +9 -0
  12. package/dist/mdmodel/project.d.ts +1 -0
  13. package/dist/mdmodel/query/language.d.ts +253 -0
  14. package/dist/mdmodel/query/match.d.ts +13 -0
  15. package/dist/mdmodel/query/rows.d.ts +31 -0
  16. package/dist/mdmodel/query/sql.d.ts +38 -0
  17. package/dist/mdmodel/reserved.d.ts +5 -0
  18. package/dist/mdmodel/types.d.ts +46 -5
  19. package/dist/mdmodel/validate.d.ts +31 -4
  20. package/dist/mdruntime/actions.d.ts +19 -0
  21. package/dist/mdruntime/adapter.d.ts +161 -116
  22. package/dist/mdruntime/attached-model.d.ts +7 -0
  23. package/dist/mdruntime/binary.d.ts +0 -5
  24. package/dist/mdruntime/bootstrap.d.ts +43 -0
  25. package/dist/mdruntime/cell.d.ts +5 -0
  26. package/dist/mdruntime/chain.d.ts +11 -0
  27. package/dist/mdruntime/change-set.d.ts +13 -16
  28. package/dist/mdruntime/change.d.ts +32 -1
  29. package/dist/mdruntime/client.d.ts +36 -11
  30. package/dist/mdruntime/collection.d.ts +29 -21
  31. package/dist/mdruntime/compile.d.ts +15 -0
  32. package/dist/mdruntime/conversation-live.d.ts +135 -0
  33. package/dist/mdruntime/conversation-row.d.ts +32 -0
  34. package/dist/mdruntime/conversation.d.ts +54 -46
  35. package/dist/mdruntime/declaration.d.ts +9 -0
  36. package/dist/mdruntime/durability.d.ts +16 -4
  37. package/dist/mdruntime/failure.d.ts +1 -0
  38. package/dist/mdruntime/figures.d.ts +48 -0
  39. package/dist/mdruntime/holdings.d.ts +28 -0
  40. package/dist/mdruntime/identity.d.ts +5 -0
  41. package/dist/mdruntime/listing.d.ts +47 -0
  42. package/dist/mdruntime/live.d.ts +22 -0
  43. package/dist/mdruntime/log.d.ts +5 -0
  44. package/dist/mdruntime/media.d.ts +7 -0
  45. package/dist/mdruntime/messages.d.ts +48 -0
  46. package/dist/mdruntime/model.d.ts +8 -11
  47. package/dist/mdruntime/observation.d.ts +17 -2
  48. package/dist/mdruntime/opened.d.ts +21 -0
  49. package/dist/mdruntime/outcome.d.ts +49 -8
  50. package/dist/mdruntime/overlay.d.ts +4 -5
  51. package/dist/mdruntime/preparation.d.ts +19 -0
  52. package/dist/mdruntime/presence.d.ts +51 -0
  53. package/dist/mdruntime/query.d.ts +25 -191
  54. package/dist/mdruntime/reach.d.ts +20 -9
  55. package/dist/mdruntime/readiness.d.ts +13 -17
  56. package/dist/mdruntime/reads.d.ts +36 -0
  57. package/dist/mdruntime/recovery.d.ts +3 -2
  58. package/dist/mdruntime/refresh.d.ts +26 -0
  59. package/dist/mdruntime/replica.d.ts +50 -33
  60. package/dist/mdruntime/room-draft.d.ts +28 -11
  61. package/dist/mdruntime/room-drafts.d.ts +23 -0
  62. package/dist/mdruntime/runtime.d.ts +33 -0
  63. package/dist/mdruntime/save.d.ts +42 -48
  64. package/dist/mdruntime/saves.d.ts +31 -0
  65. package/dist/mdruntime/search.d.ts +12 -82
  66. package/dist/mdruntime/seed.d.ts +11 -2
  67. package/dist/mdruntime/socket/admission.d.ts +6 -0
  68. package/dist/mdruntime/socket/answers.d.ts +5 -0
  69. package/dist/mdruntime/socket/lanes.d.ts +19 -0
  70. package/dist/mdruntime/socket/session.d.ts +37 -0
  71. package/dist/mdruntime/socket.d.ts +66 -0
  72. package/dist/mdruntime/source.d.ts +60 -0
  73. package/dist/mdruntime/status.d.ts +4 -5
  74. package/dist/mdruntime/store/installs.d.ts +29 -0
  75. package/dist/mdruntime/store/readiness.d.ts +9 -0
  76. package/dist/mdruntime/store/records.d.ts +209 -0
  77. package/dist/mdruntime/store/room-held.d.ts +7 -0
  78. package/dist/mdruntime/store/space.d.ts +10 -0
  79. package/dist/mdruntime/store/watchers.d.ts +16 -0
  80. package/dist/mdruntime/store/writes.d.ts +23 -0
  81. package/dist/mdruntime/store.d.ts +109 -150
  82. package/dist/mdruntime/stored.d.ts +155 -0
  83. package/dist/mdruntime/surface.d.ts +87 -0
  84. package/dist/mdruntime/tables.d.ts +411 -0
  85. package/dist/mdruntime/tallies.d.ts +17 -0
  86. package/dist/mdruntime/transfer.d.ts +0 -5
  87. package/dist/mdruntime/wire.d.ts +54 -10
  88. package/dist/session-content/bounds.d.ts +7 -0
  89. package/dist/session-content/check.d.ts +18 -0
  90. package/dist/session-content/index.d.ts +7 -0
  91. package/dist/session-content/parts.d.ts +102 -0
  92. package/dist/session-content/state.d.ts +61 -0
  93. package/dist/session-content/turn.d.ts +328 -0
  94. package/dist/test-host.d.ts +7 -4
  95. package/dist/test-host.js +19 -29
  96. package/docs/families.md +69 -56
  97. package/package.json +8 -3
  98. package/dist/calls.d.ts +0 -118
  99. package/dist/calls.js +0 -1
  100. package/dist/mdmodel/blocks.d.ts +0 -10
  101. package/dist/mdmodel/condition.d.ts +0 -149
  102. package/dist/mdmodel/profile.d.ts +0 -5
  103. package/dist/mdruntime/acquisition.d.ts +0 -13
  104. package/dist/mdruntime/connection.d.ts +0 -141
  105. package/dist/mdruntime/file.d.ts +0 -19
  106. package/dist/mdruntime/rows.d.ts +0 -37
  107. package/dist/mdruntime/shared.d.ts +0 -10
  108. package/dist/mdruntime/turn.d.ts +0 -6
package/dist/index.d.ts CHANGED
@@ -1,9 +1,1007 @@
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 "agent-functions/requests/list": {
4
+ readonly params: {
5
+ readonly room_ref: string;
6
+ };
7
+ readonly result: {
8
+ readonly current: readonly {
9
+ readonly document: string;
10
+ readonly name: string;
11
+ }[];
12
+ readonly history: readonly {
13
+ readonly document: string;
14
+ readonly name: string;
15
+ }[];
16
+ };
17
+ };
18
+ readonly "apps/features/list": {
19
+ readonly params: {};
20
+ readonly result: {
21
+ readonly features: readonly {
22
+ readonly allowed: boolean;
23
+ readonly feature: string;
24
+ }[];
25
+ };
26
+ };
27
+ readonly "apps/holders/list": {
28
+ readonly params: {};
29
+ readonly result: {
30
+ readonly holders: readonly {
31
+ readonly name: string;
32
+ readonly user: string;
33
+ }[];
34
+ };
35
+ };
36
+ readonly "apps/messages/send": {
37
+ readonly params: {
38
+ readonly body: unknown;
39
+ readonly to: string;
40
+ };
41
+ readonly result: {
42
+ readonly [key: string]: never;
43
+ };
44
+ };
45
+ readonly "apps/relay/read": {
46
+ readonly params: {
47
+ readonly [key: string]: never;
48
+ };
49
+ readonly result: {
50
+ readonly expires_at: string;
51
+ readonly ice_servers: readonly {
52
+ readonly credential: string;
53
+ readonly urls: readonly string[];
54
+ readonly username: string;
55
+ }[];
56
+ };
57
+ };
58
+ readonly "apps/ring": {
59
+ readonly params: {
60
+ readonly to: string;
61
+ };
62
+ readonly result: {
63
+ readonly authority: string;
64
+ readonly log_epoch: string;
65
+ readonly position: string;
66
+ };
67
+ };
68
+ readonly "chats/assign": {
69
+ readonly params: {
70
+ readonly assignee: null | {
71
+ readonly agent: string;
72
+ } | {
73
+ readonly user: string;
74
+ };
75
+ readonly operation_id: string;
76
+ readonly path: string;
77
+ readonly room_ref: string;
78
+ };
79
+ readonly result: {
80
+ readonly assignee: null | {
81
+ readonly agent: string;
82
+ readonly name: string;
83
+ } | {
84
+ readonly name: string;
85
+ readonly user: string;
86
+ };
87
+ readonly authority: string;
88
+ readonly log_epoch: string;
89
+ readonly path: string;
90
+ readonly position: string;
91
+ readonly return_to: null | {
92
+ readonly agent: string;
93
+ readonly name: string;
94
+ };
95
+ readonly room_ref: string;
96
+ readonly url: string;
97
+ };
98
+ };
99
+ readonly "chats/reply": {
100
+ readonly params: {
101
+ readonly operation_id: string;
102
+ readonly path: string;
103
+ readonly room_ref: string;
104
+ readonly template?: {
105
+ readonly language: string;
106
+ readonly name: string;
107
+ };
108
+ readonly text?: string;
109
+ readonly values?: {
110
+ readonly [key: string]: string;
111
+ };
112
+ };
113
+ readonly result: {
114
+ readonly authority: string;
115
+ readonly log_epoch: string;
116
+ readonly path: string;
117
+ readonly position: string;
118
+ readonly room_ref: string;
119
+ readonly url: string;
120
+ };
121
+ };
122
+ readonly "chats/return": {
123
+ readonly params: {
124
+ readonly path: string;
125
+ readonly room_ref: string;
126
+ };
127
+ readonly result: {
128
+ readonly assignee: null | {
129
+ readonly agent: string;
130
+ readonly name: string;
131
+ } | {
132
+ readonly name: string;
133
+ readonly user: string;
134
+ };
135
+ readonly authority: string;
136
+ readonly log_epoch: string;
137
+ readonly path: string;
138
+ readonly position: string;
139
+ readonly return_to: null | {
140
+ readonly agent: string;
141
+ readonly name: string;
142
+ };
143
+ readonly room_ref: string;
144
+ readonly url: string;
145
+ };
146
+ };
147
+ readonly "chats/take-control": {
148
+ readonly params: {
149
+ readonly operation_id: string;
150
+ readonly path: string;
151
+ readonly room_ref: string;
152
+ };
153
+ readonly result: {
154
+ readonly assignee: null | {
155
+ readonly agent: string;
156
+ readonly name: string;
157
+ } | {
158
+ readonly name: string;
159
+ readonly user: string;
160
+ };
161
+ readonly authority: string;
162
+ readonly log_epoch: string;
163
+ readonly path: string;
164
+ readonly position: string;
165
+ readonly return_to: null | {
166
+ readonly agent: string;
167
+ readonly name: string;
168
+ };
169
+ readonly room_ref: string;
170
+ readonly url: string;
171
+ };
172
+ };
173
+ readonly "conversations/create": {
174
+ readonly params: {
175
+ readonly agent_id: string;
176
+ readonly operation_id: string;
177
+ };
178
+ readonly result: {
179
+ readonly agent_id: string;
180
+ readonly authority: string;
181
+ readonly conversation_id: string;
182
+ readonly log_epoch: string;
183
+ readonly position: string;
184
+ readonly url: string;
185
+ };
186
+ };
187
+ readonly "conversations/delete": {
188
+ readonly params: {
189
+ readonly conversation_id: string;
190
+ readonly operation_id: string;
191
+ };
192
+ readonly result: {
193
+ readonly authority: string;
194
+ readonly conversation_id: string;
195
+ readonly log_epoch: string;
196
+ readonly outcome: "deleted";
197
+ readonly position: string;
198
+ };
199
+ };
200
+ readonly "conversations/history/list": {
201
+ readonly params: {
202
+ readonly conversations: readonly {
203
+ readonly after?: number;
204
+ readonly conversation_id: string;
205
+ }[];
206
+ readonly limit?: number;
207
+ };
208
+ readonly result: {
209
+ readonly histories: readonly {
210
+ readonly agent_id: string;
211
+ readonly conversation_id: string;
212
+ readonly messages: readonly {
213
+ readonly accepted_at: string;
214
+ readonly change: number;
215
+ readonly content: null | {
216
+ readonly parts: readonly ({
217
+ readonly calls: null | number;
218
+ readonly duration: null | number;
219
+ readonly kind: "agent" | "fork" | "workflow";
220
+ readonly name: null | string;
221
+ readonly parent: null | number;
222
+ readonly report: null | string;
223
+ readonly status: "done" | "failed" | "running" | "stopped";
224
+ readonly step: null | string;
225
+ readonly task: string;
226
+ readonly tokens: null | number;
227
+ readonly type: "subagent";
228
+ } | {
229
+ readonly command: string;
230
+ readonly parent: null | number;
231
+ readonly target: null | string;
232
+ readonly type: "message";
233
+ } | {
234
+ readonly duration: null | number;
235
+ readonly exit: null | number;
236
+ readonly kind: "command";
237
+ readonly line: string;
238
+ readonly output: string;
239
+ readonly parent: null | number;
240
+ readonly status: "done" | "failed" | "running" | "stopped";
241
+ readonly type: "call";
242
+ } | {
243
+ readonly duration: null | number;
244
+ readonly files: readonly {
245
+ readonly added: number;
246
+ readonly diff: null | string;
247
+ readonly path: string;
248
+ readonly removed: number;
249
+ }[];
250
+ readonly kind: "edit";
251
+ readonly line: string;
252
+ readonly parent: null | number;
253
+ readonly status: "done" | "failed" | "running" | "stopped";
254
+ readonly type: "call";
255
+ } | {
256
+ readonly duration: null | number;
257
+ readonly kind: "fetch" | "other" | "tool";
258
+ readonly line: string;
259
+ readonly output: string;
260
+ readonly parent: null | number;
261
+ readonly status: "done" | "failed" | "running" | "stopped";
262
+ readonly type: "call";
263
+ } | {
264
+ readonly duration: null | number;
265
+ readonly kind: "read" | "search";
266
+ readonly line: string;
267
+ readonly parent: null | number;
268
+ readonly returned: null | number;
269
+ readonly status: "done" | "failed" | "running" | "stopped";
270
+ readonly type: "call";
271
+ } | {
272
+ readonly entries: readonly {
273
+ readonly content: string;
274
+ readonly status: "done" | "pending" | "running";
275
+ }[];
276
+ readonly parent: null | number;
277
+ readonly type: "plan";
278
+ } | {
279
+ readonly file: string;
280
+ readonly media_type: string;
281
+ readonly name: string;
282
+ readonly parent: null | number;
283
+ readonly type: "image";
284
+ } | {
285
+ readonly kind: "compaction" | "error" | "info" | "mode" | "model" | "retry" | "warning";
286
+ readonly parent: null | number;
287
+ readonly text: string;
288
+ readonly type: "notice";
289
+ } | {
290
+ readonly kind: "monitor" | "schedule" | "shell" | "task";
291
+ readonly label: string;
292
+ readonly parent: null | number;
293
+ readonly status: "done" | "failed" | "running" | "stopped";
294
+ readonly type: "background";
295
+ } | {
296
+ readonly parent: null | number;
297
+ readonly text: string;
298
+ readonly type: "reasoning" | "text";
299
+ })[];
300
+ readonly state: {
301
+ readonly branch: null | string;
302
+ readonly context: null | {
303
+ readonly breakdown: readonly {
304
+ readonly name: string;
305
+ readonly tokens: number;
306
+ }[];
307
+ readonly used: number;
308
+ readonly window: number;
309
+ };
310
+ readonly cost: null | {
311
+ readonly amount: number;
312
+ readonly currency: string;
313
+ };
314
+ readonly duration: null | number;
315
+ readonly effort: null | string;
316
+ readonly files: readonly {
317
+ readonly added: number;
318
+ readonly path: string;
319
+ readonly removed: number;
320
+ }[];
321
+ readonly limits: readonly {
322
+ readonly minutes: number;
323
+ readonly name: null | string;
324
+ readonly percent: number;
325
+ readonly resets: null | string;
326
+ }[];
327
+ readonly mode: null | string;
328
+ readonly model: null | string;
329
+ readonly pull: null | {
330
+ readonly number: number;
331
+ readonly url: string;
332
+ };
333
+ readonly running: readonly {
334
+ readonly kind: "monitor" | "schedule" | "shell" | "subagent" | "task";
335
+ readonly label: string;
336
+ readonly next: null | string;
337
+ readonly progress: null | string;
338
+ }[];
339
+ readonly suggestion: null | string;
340
+ readonly title: null | string;
341
+ readonly tokens: null | {
342
+ readonly cache_read: number;
343
+ readonly cache_write: number;
344
+ readonly input: number;
345
+ readonly output: number;
346
+ };
347
+ readonly worktree: null | string;
348
+ };
349
+ readonly tokens: null | {
350
+ readonly cache_read: number;
351
+ readonly cache_write: number;
352
+ readonly input: number;
353
+ readonly output: number;
354
+ };
355
+ };
356
+ readonly conversation_id: string;
357
+ readonly failure: null | string;
358
+ readonly message_id: string;
359
+ readonly removed?: true;
360
+ readonly role: "assistant" | "house" | "user";
361
+ readonly sender?: "conversation" | "customer" | "owner" | "replier" | "report" | "requester" | "trigger";
362
+ readonly source?: {
363
+ readonly agent: {
364
+ readonly id: string;
365
+ readonly name: string;
366
+ readonly url: string;
367
+ };
368
+ readonly approved_at?: string;
369
+ readonly declined_at?: string;
370
+ readonly kind: "mail";
371
+ readonly owner: {
372
+ readonly name: string;
373
+ readonly user: string;
374
+ };
375
+ readonly request: string;
376
+ readonly room: string;
377
+ } | {
378
+ readonly agent: {
379
+ readonly id: string;
380
+ readonly name: string;
381
+ readonly url: string;
382
+ };
383
+ readonly conversation: {
384
+ readonly id: string;
385
+ readonly name: string;
386
+ readonly url: string;
387
+ };
388
+ readonly kind: "conversation";
389
+ } | {
390
+ readonly agent: {
391
+ readonly id: string;
392
+ readonly name: string;
393
+ readonly url: string;
394
+ };
395
+ readonly kind: "declined";
396
+ readonly owner: {
397
+ readonly name: string;
398
+ readonly user: string;
399
+ };
400
+ readonly request: string;
401
+ } | {
402
+ readonly agent_function: null | {
403
+ readonly id: string;
404
+ readonly name: string;
405
+ readonly version: number;
406
+ };
407
+ readonly approved_at: null | string;
408
+ readonly kind: "request";
409
+ readonly request: string;
410
+ readonly requester: {
411
+ readonly name: string;
412
+ readonly room: string;
413
+ readonly url: string;
414
+ } | {
415
+ readonly name: string;
416
+ readonly user: string;
417
+ };
418
+ readonly room: {
419
+ readonly handle: string;
420
+ readonly name: string;
421
+ readonly ref: string;
422
+ readonly url: string;
423
+ };
424
+ } | {
425
+ readonly kind: "reply";
426
+ readonly name: string;
427
+ } | {
428
+ readonly kind: "trigger";
429
+ readonly path: null | string;
430
+ readonly room: {
431
+ readonly handle: string;
432
+ readonly name: string;
433
+ readonly ref: string;
434
+ readonly url: string;
435
+ };
436
+ readonly trigger: {
437
+ readonly description: string;
438
+ readonly id: string;
439
+ };
440
+ };
441
+ readonly telegram_undelivered?: true;
442
+ readonly text: string;
443
+ readonly transcripts?: readonly {
444
+ readonly path: string;
445
+ readonly text: string;
446
+ }[];
447
+ readonly turn_id: null | string;
448
+ readonly url?: string;
449
+ readonly waiting?: true;
450
+ }[];
451
+ readonly next: null | number;
452
+ readonly url: string;
453
+ }[];
454
+ };
455
+ };
456
+ readonly "conversations/interaction/answer": {
457
+ readonly params: {
458
+ readonly conversation_id: string;
459
+ readonly interaction_id: string;
460
+ readonly operation_id: string;
461
+ readonly response: readonly unknown[] | boolean | null | number | {
462
+ readonly [key: string]: unknown;
463
+ } | string;
464
+ };
465
+ readonly result: {
466
+ readonly agent_id: string;
467
+ readonly authority: string;
468
+ readonly conversation_id: string;
469
+ readonly interaction_id: string;
470
+ readonly log_epoch: string;
471
+ readonly position: string;
472
+ readonly url: string;
473
+ };
474
+ };
475
+ readonly "conversations/interrupt": {
476
+ readonly params: {
477
+ readonly conversation_id: string;
478
+ readonly operation_id: string;
479
+ };
480
+ readonly result: {
481
+ readonly agent_id: string;
482
+ readonly authority: string;
483
+ readonly conversation_id: string;
484
+ readonly log_epoch: string;
485
+ readonly position: string;
486
+ readonly url: string;
487
+ };
488
+ };
489
+ readonly "conversations/kill": {
490
+ readonly params: {
491
+ readonly conversation_id: string;
492
+ readonly operation_id: string;
493
+ };
494
+ readonly result: {
495
+ readonly agent_id: string;
496
+ readonly authority: string;
497
+ readonly conversation_id: string;
498
+ readonly log_epoch: string;
499
+ readonly position: string;
500
+ readonly url: string;
501
+ };
502
+ };
503
+ readonly "conversations/option/set": {
504
+ readonly params: {
505
+ readonly conversation_id: string;
506
+ readonly operation_id: string;
507
+ readonly option: string;
508
+ readonly value: boolean | string;
509
+ };
510
+ readonly result: {
511
+ readonly agent_id: string;
512
+ readonly authority: string;
513
+ readonly conversation_id: string;
514
+ readonly log_epoch: string;
515
+ readonly position: string;
516
+ readonly url: string;
517
+ };
518
+ };
519
+ readonly "conversations/rename": {
520
+ readonly params: {
521
+ readonly conversation_id: string;
522
+ readonly name: string;
523
+ readonly operation_id: string;
524
+ };
525
+ readonly result: {
526
+ readonly agent_id: string;
527
+ readonly authority: string;
528
+ readonly conversation_id: string;
529
+ readonly log_epoch: string;
530
+ readonly name: string;
531
+ readonly position: string;
532
+ readonly url: string;
533
+ };
534
+ };
535
+ readonly "conversations/retry": {
536
+ readonly params: {
537
+ readonly conversation_id: string;
538
+ readonly message_id: string;
539
+ readonly operation_id: string;
540
+ };
541
+ readonly result: {
542
+ readonly agent_id: string;
543
+ readonly authority: string;
544
+ readonly conversation_id: string;
545
+ readonly log_epoch: string;
546
+ readonly message_id: string;
547
+ readonly position: string;
548
+ readonly url: string;
549
+ };
550
+ };
551
+ readonly "conversations/send": {
552
+ readonly params: {
553
+ readonly conversation_id: string;
554
+ readonly operation_id: string;
555
+ readonly text: string;
556
+ };
557
+ readonly result: {
558
+ readonly agent_id: string;
559
+ readonly authority: string;
560
+ readonly conversation_id: string;
561
+ readonly log_epoch: string;
562
+ readonly message_id: string;
563
+ readonly position: string;
564
+ readonly url: string;
565
+ };
566
+ };
567
+ readonly "conversations/take-out": {
568
+ readonly params: {
569
+ readonly conversation_id: string;
570
+ readonly message_id: string;
571
+ readonly operation_id: string;
572
+ };
573
+ readonly result: {
574
+ readonly agent_id: string;
575
+ readonly authority: string;
576
+ readonly conversation_id: string;
577
+ readonly log_epoch: string;
578
+ readonly message_id: string;
579
+ readonly position: string;
580
+ readonly url: string;
581
+ };
582
+ };
583
+ readonly "records/list": {
584
+ readonly params: {
585
+ readonly order?: "asc" | "desc";
586
+ readonly room_ref: string;
587
+ };
588
+ readonly result: {
589
+ readonly records: readonly {
590
+ readonly body: null | string;
591
+ readonly claimed: unknown;
592
+ readonly created_at: string;
593
+ readonly record: string;
594
+ readonly ref: string;
595
+ }[];
596
+ };
597
+ };
598
+ readonly "rooms/access/list": {
599
+ readonly params: {
600
+ readonly room_ref: string;
601
+ };
602
+ readonly result: {
603
+ readonly authority: "administrator" | "member" | "owner";
604
+ readonly members: readonly {
605
+ readonly admitted_at: null | string;
606
+ readonly direct: readonly {
607
+ readonly level: null | "keep" | "open" | "search";
608
+ readonly namespace: string;
609
+ readonly operations: readonly ("erase" | "export" | "manageAccess" | "write")[];
610
+ }[];
611
+ readonly entries: readonly {
612
+ readonly level: null | "keep" | "open" | "search";
613
+ readonly namespace: string;
614
+ readonly operations: readonly ("erase" | "export" | "manageAccess" | "write")[];
615
+ readonly sources: readonly {
616
+ readonly kind: "direct" | "inherited";
617
+ readonly level: null | "keep" | "open" | "search";
618
+ readonly namespace: string;
619
+ readonly operations: readonly ("erase" | "export" | "manageAccess" | "write")[];
620
+ }[];
621
+ }[];
622
+ readonly key: null | string;
623
+ readonly schema_roles: readonly string[];
624
+ readonly through_space?: true;
625
+ readonly user: string;
626
+ readonly user_name: string;
627
+ }[];
628
+ readonly namespaces: readonly string[];
629
+ readonly owner: string;
630
+ readonly room_ref: string;
631
+ readonly url: string;
632
+ readonly viewer: string;
633
+ };
634
+ };
635
+ readonly "rooms/members/list": {
636
+ readonly params: {
637
+ readonly history?: boolean;
638
+ readonly room_ref: string;
639
+ };
640
+ readonly result: {
641
+ readonly history?: readonly {
642
+ readonly at: string;
643
+ readonly kind: "granted" | "revoked";
644
+ readonly user: string;
645
+ }[];
646
+ readonly members: readonly {
647
+ readonly access?: "manage" | "owner" | "read" | "write";
648
+ readonly copies?: "online_only" | "search_only";
649
+ readonly display_name: string;
650
+ readonly email?: string;
651
+ readonly member_document: null | string;
652
+ readonly owner: boolean;
653
+ readonly schema_roles?: readonly string[];
654
+ readonly since: null | string;
655
+ readonly through_space?: true;
656
+ readonly user: string;
657
+ }[];
658
+ };
659
+ };
660
+ readonly "rooms/settings/processing/read": {
661
+ readonly params: {
662
+ readonly path: string;
663
+ readonly room_ref: string;
664
+ };
665
+ readonly result: {
666
+ readonly embedding: {
667
+ readonly condition: null | {
668
+ readonly kind: "demand_failed" | "embed_again_failed";
669
+ readonly path: string;
670
+ };
671
+ readonly embedding_estimate: null | {
672
+ readonly documents: number;
673
+ readonly measured_tokens: number;
674
+ readonly unmeasured_documents: number;
675
+ };
676
+ readonly finished: boolean;
677
+ readonly indexed_chunks: number;
678
+ };
679
+ readonly explicit: readonly {
680
+ readonly path: string;
681
+ readonly policy: "Off" | "On";
682
+ }[];
683
+ readonly path: string;
684
+ readonly policy: {
685
+ readonly from: null | string;
686
+ readonly origin: "default" | "explicit" | "inherited";
687
+ readonly reason: null | "room_too_large" | "unfunded";
688
+ readonly value: "Off" | "On";
689
+ };
690
+ readonly writable: boolean;
691
+ };
692
+ };
693
+ readonly "sites/submissions/create": {
694
+ readonly params: {
695
+ readonly content: string;
696
+ };
697
+ readonly result: {
698
+ readonly submitted: true;
699
+ };
700
+ };
701
+ readonly "storage/inventory/read": {
702
+ readonly params: {
703
+ readonly room_ref?: string;
704
+ readonly rooms?: "owned";
705
+ };
706
+ readonly result: {
707
+ readonly blob: {
708
+ readonly bytes: string;
709
+ readonly gigabytes: string;
710
+ };
711
+ readonly freshness: {
712
+ readonly state: "settled";
713
+ };
714
+ readonly indexed_text: {
715
+ readonly approximate_pages: null | string;
716
+ readonly bytes: string;
717
+ readonly gigabytes: string;
718
+ };
719
+ readonly measurement: {
720
+ readonly page_reference: null | {
721
+ readonly bytes_per_page: string;
722
+ readonly encoding: string;
723
+ readonly font: string;
724
+ readonly font_size_pt: string;
725
+ readonly layout: string;
726
+ };
727
+ };
728
+ readonly room_ref: string;
729
+ readonly total: {
730
+ readonly bytes: string;
731
+ readonly gigabytes: string;
732
+ };
733
+ readonly url: string;
734
+ } | {
735
+ readonly blob: {
736
+ readonly bytes: string;
737
+ readonly gigabytes: string;
738
+ };
739
+ readonly freshness: {
740
+ readonly state: "settled";
741
+ };
742
+ readonly indexed_text: {
743
+ readonly approximate_pages: null | string;
744
+ readonly bytes: string;
745
+ readonly gigabytes: string;
746
+ };
747
+ readonly measurement: {
748
+ readonly page_reference: null | {
749
+ readonly bytes_per_page: string;
750
+ readonly encoding: string;
751
+ readonly font: string;
752
+ readonly font_size_pt: string;
753
+ readonly layout: string;
754
+ };
755
+ };
756
+ readonly rooms?: readonly {
757
+ readonly blob: {
758
+ readonly bytes: string;
759
+ readonly gigabytes: string;
760
+ };
761
+ readonly freshness: {
762
+ readonly state: "settled";
763
+ };
764
+ readonly indexed_text: {
765
+ readonly approximate_pages: null | string;
766
+ readonly bytes: string;
767
+ readonly gigabytes: string;
768
+ };
769
+ readonly measurement: {
770
+ readonly page_reference: null | {
771
+ readonly bytes_per_page: string;
772
+ readonly encoding: string;
773
+ readonly font: string;
774
+ readonly font_size_pt: string;
775
+ readonly layout: string;
776
+ };
777
+ };
778
+ readonly room_ref: string;
779
+ readonly total: {
780
+ readonly bytes: string;
781
+ readonly gigabytes: string;
782
+ };
783
+ readonly url: string;
784
+ }[];
785
+ readonly site_images: {
786
+ readonly bound: string;
787
+ readonly bytes: string;
788
+ readonly payloads: string;
789
+ };
790
+ readonly total: {
791
+ readonly bytes: string;
792
+ readonly gigabytes: string;
793
+ };
794
+ } | {
795
+ readonly blob: {
796
+ readonly bytes: string;
797
+ readonly gigabytes: string;
798
+ };
799
+ readonly freshness: {
800
+ readonly state: "settled";
801
+ };
802
+ readonly indexed_text: {
803
+ readonly approximate_pages: null | string;
804
+ readonly bytes: string;
805
+ readonly gigabytes: string;
806
+ };
807
+ readonly measurement: {
808
+ readonly page_reference: null | {
809
+ readonly bytes_per_page: string;
810
+ readonly encoding: string;
811
+ readonly font: string;
812
+ readonly font_size_pt: string;
813
+ readonly layout: string;
814
+ };
815
+ };
816
+ readonly rooms?: readonly {
817
+ readonly blob: {
818
+ readonly bytes: string;
819
+ readonly gigabytes: string;
820
+ };
821
+ readonly freshness: {
822
+ readonly state: "settled";
823
+ };
824
+ readonly indexed_text: {
825
+ readonly approximate_pages: null | string;
826
+ readonly bytes: string;
827
+ readonly gigabytes: string;
828
+ };
829
+ readonly measurement: {
830
+ readonly page_reference: null | {
831
+ readonly bytes_per_page: string;
832
+ readonly encoding: string;
833
+ readonly font: string;
834
+ readonly font_size_pt: string;
835
+ readonly layout: string;
836
+ };
837
+ };
838
+ readonly room_ref: string;
839
+ readonly total: {
840
+ readonly bytes: string;
841
+ readonly gigabytes: string;
842
+ };
843
+ readonly url: string;
844
+ }[];
845
+ readonly total: {
846
+ readonly bytes: string;
847
+ readonly gigabytes: string;
848
+ };
849
+ };
850
+ };
851
+ readonly "triggers/fired/list": {
852
+ readonly params: {
853
+ readonly room_ref?: string;
854
+ };
855
+ readonly result: {
856
+ readonly events: readonly {
857
+ readonly actions: readonly ({
858
+ readonly cap: "address_submissions" | "app_sockets" | "environment_functions" | "export_starts" | "kit_connections" | "live_shares" | "open_uploads" | "ownership_offers" | "push_addresses" | "push_deliveries" | "room_triggers" | "service_keys" | "share_creations" | "share_room_creations" | "site_published_bytes" | "site_rooms" | "slot_rooms" | "spaces" | "waiting_web_wizards" | "writes";
859
+ readonly code: "cap_reached";
860
+ readonly outcome: "refused";
861
+ readonly position: number;
862
+ readonly retry_at: string;
863
+ } | {
864
+ readonly cap: "address_submissions" | "app_sockets" | "environment_functions" | "export_starts" | "kit_connections" | "live_shares" | "open_uploads" | "ownership_offers" | "push_addresses" | "push_deliveries" | "room_triggers" | "service_keys" | "share_creations" | "share_room_creations" | "site_published_bytes" | "site_rooms" | "slot_rooms" | "spaces" | "waiting_web_wizards" | "writes";
865
+ readonly code: "cap_reached";
866
+ readonly outcome: "refused";
867
+ readonly position: number;
868
+ } | {
869
+ readonly code: "agent_unavailable";
870
+ readonly outcome: "withdrawn";
871
+ readonly position: number;
872
+ } | {
873
+ readonly code: "function_failed";
874
+ readonly cut?: boolean;
875
+ readonly error: string;
876
+ readonly exit_code?: number;
877
+ readonly final: true;
878
+ readonly outcome: "failed";
879
+ readonly output?: string;
880
+ readonly position: number;
881
+ readonly run: string;
882
+ } | {
883
+ readonly code: "function_failed";
884
+ readonly error: string;
885
+ readonly final: true;
886
+ readonly outcome: "failed";
887
+ readonly position: number;
888
+ readonly release: string;
889
+ } | {
890
+ readonly code: "function_not_started";
891
+ readonly final?: true;
892
+ readonly outcome: "failed";
893
+ readonly position: number;
894
+ readonly tries: number;
895
+ } | {
896
+ readonly code: "limit_reached";
897
+ readonly limit: "reads";
898
+ readonly outcome: "refused";
899
+ readonly period: "day" | "minute";
900
+ readonly position: number;
901
+ readonly retry_at: string;
902
+ readonly value: string;
903
+ } | {
904
+ readonly code: "limit_reached";
905
+ readonly limit: "writes";
906
+ readonly outcome: "refused";
907
+ readonly period: "day" | "minute";
908
+ readonly position: number;
909
+ readonly retry_at: string;
910
+ } | {
911
+ readonly code: "limit_reached";
912
+ readonly limit: "blob" | "indexed_text";
913
+ readonly outcome: "refused";
914
+ readonly position: number;
915
+ readonly used: string;
916
+ readonly value: string;
917
+ } | {
918
+ readonly code: "limit_reached";
919
+ readonly limit: "custom_domains" | "external_calls" | "publish_data" | "sites";
920
+ readonly outcome: "refused";
921
+ readonly position: number;
922
+ readonly retry_at: string;
923
+ } | {
924
+ readonly code: "limit_reached";
925
+ readonly limit: "custom_domains" | "external_calls" | "publish_data" | "sites";
926
+ readonly outcome: "refused";
927
+ readonly position: number;
928
+ } | {
929
+ readonly code: "agent_function_request_not_started" | "internal_error";
930
+ readonly outcome: "failed";
931
+ readonly position: number;
932
+ } | {
933
+ readonly code: "agent_function_retired" | "environment_offline" | "no_recipient" | "not_found" | "target_agent_unavailable";
934
+ readonly outcome: "no_target";
935
+ readonly position: number;
936
+ } | {
937
+ readonly code: string;
938
+ readonly outcome: "refused";
939
+ readonly position: number;
940
+ } | {
941
+ readonly conversations: number;
942
+ readonly outcome: "marked";
943
+ readonly position: number;
944
+ } | {
945
+ readonly cut?: boolean;
946
+ readonly exit_code?: number;
947
+ readonly outcome: "ran";
948
+ readonly output?: string;
949
+ readonly position: number;
950
+ readonly run: string;
951
+ } | {
952
+ readonly outcome: "continued";
953
+ readonly position: number;
954
+ readonly request: string;
955
+ } | {
956
+ readonly outcome: "notified";
957
+ readonly position: number;
958
+ readonly reached: number;
959
+ } | {
960
+ readonly outcome: "paused";
961
+ readonly position: number;
962
+ } | {
963
+ readonly outcome: "ran";
964
+ readonly position: number;
965
+ readonly release: string;
966
+ } | {
967
+ readonly outcome: "requested";
968
+ readonly position: number;
969
+ readonly request: string;
970
+ } | {
971
+ readonly outcome: "running";
972
+ readonly position: number;
973
+ readonly release: string;
974
+ } | {
975
+ readonly outcome: "running";
976
+ readonly position: number;
977
+ readonly run: string;
978
+ } | {
979
+ readonly outcome: "waiting";
980
+ readonly position: number;
981
+ })[];
982
+ readonly code?: "cap_reached";
983
+ readonly created_at: string;
984
+ readonly missed?: "failed" | "skipped";
985
+ readonly moment?: string;
986
+ readonly path?: string;
987
+ readonly room_ref?: string;
988
+ readonly trigger: string;
989
+ readonly url?: string;
990
+ }[];
991
+ };
992
+ };
993
+ }
994
+ export type HouseParams<Name extends string> = Name extends keyof HouseMethods ? HouseMethods[Name]['params'] : unknown;
995
+ type CallResult = Awaited<ReturnType<MdRuntimeClient['call']>>;
996
+ export type HouseResult<Name extends string> = Exclude<CallResult, {
997
+ readonly kind: 'action';
998
+ }> | (Extract<CallResult, {
999
+ readonly kind: 'action';
1000
+ }> & {
1001
+ readonly result: Name extends keyof HouseMethods ? HouseMethods[Name]['result'] : unknown;
1002
+ });
5
1003
  export interface HouseRuntime extends Omit<MdRuntimeClient, 'call'> {
6
- call<Name extends Open<keyof HouseCalls>>(name: Name, input: HouseCallInput<Name>): ReturnType<MdRuntimeClient['call']>;
1004
+ call<Name extends Open<keyof HouseMethods>>(method: Name, params: HouseParams<Name>): Promise<HouseResult<Name>>;
7
1005
  }
8
1006
  export interface HouseSyncState {
9
1007
  readonly state: string;
@@ -13,6 +1011,7 @@ export interface HouseCredentialState {
13
1011
  readonly state: Open<'none' | 'held' | 'rejected'>;
14
1012
  readonly expiresAt: number | null;
15
1013
  }
1014
+ export type HouseDatabaseFailure = 'unsupported' | 'damaged';
16
1015
  export type HouseAnalyticsChoice = 'accept' | 'decline';
17
1016
  export interface HouseAnalytics {
18
1017
  readonly measures: boolean;
@@ -29,9 +1028,9 @@ export interface HouseStatus {
29
1028
  readonly sync: HouseSyncState | null;
30
1029
  readonly refusal: {
31
1030
  readonly code: string;
32
- readonly retryable: boolean;
33
1031
  } | null;
34
1032
  readonly loss: string | null;
1033
+ readonly database: Open<HouseDatabaseFailure> | null;
35
1034
  readonly analytics: HouseAnalytics;
36
1035
  readonly serviceMode: Open<'open' | 'write-halted'> | null;
37
1036
  readonly offline: boolean;
@@ -70,8 +1069,6 @@ export interface HouseExternalRequest {
70
1069
  readonly headers?: Readonly<Record<string, string>>;
71
1070
  readonly body?: string;
72
1071
  readonly body_base64?: string;
73
- readonly account?: string;
74
- readonly slot?: string;
75
1072
  readonly room_ref?: string;
76
1073
  }
77
1074
  export type HouseExternalAnswer = {
@@ -94,6 +1091,11 @@ export interface HouseAppMessage {
94
1091
  }
95
1092
  export type HouseInstallation = Open<'accepted' | 'dismissed' | 'manual'>;
96
1093
  export type HouseNotifications = Open<'on' | 'off' | 'blocked' | 'unavailable'>;
1094
+ export interface HouseTelegram {
1095
+ readonly state: Open<'available' | 'linked' | 'unavailable'>;
1096
+ readonly name: string | null;
1097
+ readonly username: string | null;
1098
+ }
97
1099
  export interface HouseCeremonyRefused extends Error {
98
1100
  readonly name: 'HouseCeremonyRefused';
99
1101
  readonly code: Open<'house_ceremony_refused'>;
@@ -110,22 +1112,32 @@ export interface HouseBrowserRefused extends Error {
110
1112
  readonly code: string;
111
1113
  readonly retryable: boolean;
112
1114
  }
113
- export interface HouseTrialWithheld {
114
- readonly code: Open<'house_trial_withheld'>;
115
- readonly retryable: true;
116
- }
117
- export type HouseTask = unknown;
118
- export type HouseActivation = Open<'committed' | 'abandoned'>;
119
1115
  export interface HouseCooperation {
120
- checkpoint(): Promise<void> | void;
121
- persist(): Promise<void> | void;
122
- capture(): Promise<HouseTask> | HouseTask;
123
- restore(task: HouseTask | null): Promise<void> | void;
124
- ready(): Promise<boolean> | boolean;
125
- settle(activation: HouseActivation): void;
1116
+ placed(): Promise<void> | void;
1117
+ }
1118
+ export type HouseChatWidth = 'full' | '3/4' | '1/2' | '1/3';
1119
+ export interface HouseChatOpened {
1120
+ readonly conversation: string | null;
1121
+ readonly agent: string | null;
1122
+ }
1123
+ export interface HouseChatOptions {
1124
+ readonly conversation?: string | null;
1125
+ readonly agent?: string | null;
1126
+ readonly showChats?: boolean;
1127
+ readonly width?: HouseChatWidth;
1128
+ readonly onOpen?: (opened: HouseChatOpened) => void;
1129
+ readonly onLink?: (href: string) => void;
1130
+ }
1131
+ export interface HouseMountedChat {
1132
+ update(options: HouseChatOptions): void;
1133
+ unmount(): void;
1134
+ }
1135
+ export interface HouseChat {
1136
+ mount(element: object, options?: HouseChatOptions): Promise<HouseMountedChat>;
126
1137
  }
127
1138
  export interface HouseBridge {
128
1139
  readonly runtime: Promise<HouseRuntime>;
1140
+ readonly chat: HouseChat;
129
1141
  address(): string | null;
130
1142
  onAddress(listener: (address: string) => void): () => void;
131
1143
  push(address: string): Promise<string>;
@@ -133,7 +1145,7 @@ export interface HouseBridge {
133
1145
  ceremony(path: string): Promise<never>;
134
1146
  install(): Promise<HouseInstallation>;
135
1147
  notifications(on?: boolean): Promise<HouseNotifications>;
136
- setBadge(unread: readonly string[]): Promise<void>;
1148
+ telegram(link?: true): Promise<HouseTelegram>;
137
1149
  setTab(tab: HouseTab): void;
138
1150
  sourceTop(app: string, release?: string): Promise<HouseSourceTop | HouseRefusal | null>;
139
1151
  sourceDownload(app: string, release?: string): Promise<HouseSourceDownload | HouseRefusal | null>;
@@ -150,3 +1162,4 @@ export interface HouseHeld {
150
1162
  readonly houseBridge: HouseBridge;
151
1163
  }
152
1164
  export declare const houseBridge: () => HouseBridge;
1165
+ export {};