@agentshouse/app-bridge 0.1.0-c3aff7d33e077 → 0.1.0-c3ee7fcd01608

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 (103) hide show
  1. package/README.md +2 -2
  2. package/dist/index.d.ts +173 -422
  3. package/dist/mdmodel/body.d.ts +84 -0
  4. package/dist/mdmodel/built-in.d.ts +3 -0
  5. package/dist/mdmodel/definition.d.ts +23 -10
  6. package/dist/mdmodel/document.d.ts +14 -8
  7. package/dist/mdmodel/event.d.ts +1 -2
  8. package/dist/mdmodel/fields.d.ts +1 -1
  9. package/dist/mdmodel/house-model.d.ts +869 -0
  10. package/dist/mdmodel/house-references/crockford.d.ts +3 -0
  11. package/dist/mdmodel/house-references/patterns.d.ts +8 -0
  12. package/dist/mdmodel/index.d.ts +31 -15
  13. package/dist/mdmodel/indexed.d.ts +8 -0
  14. package/dist/mdmodel/kinds.d.ts +4 -2
  15. package/dist/mdmodel/markdown.d.ts +74 -0
  16. package/dist/mdmodel/media-type.d.ts +71 -0
  17. package/dist/mdmodel/moment.d.ts +6 -0
  18. package/dist/mdmodel/not-ready.d.ts +1 -0
  19. package/dist/mdmodel/paths.d.ts +15 -1
  20. package/dist/mdmodel/query/language.d.ts +2 -1
  21. package/dist/mdmodel/query/match.d.ts +1 -1
  22. package/dist/mdmodel/query/rows.d.ts +1 -1
  23. package/dist/mdmodel/query/sql.d.ts +5 -1
  24. package/dist/mdmodel/query/walk.d.ts +62 -0
  25. package/dist/mdmodel/references.d.ts +2 -2
  26. package/dist/mdmodel/reserved.d.ts +1 -0
  27. package/dist/mdmodel/room-types.d.ts +6 -0
  28. package/dist/mdmodel/types.d.ts +11 -17
  29. package/dist/mdmodel/validate.d.ts +6 -2
  30. package/dist/mdmodel/yaml.d.ts +4 -4
  31. package/dist/mdruntime/actions.d.ts +8 -2
  32. package/dist/mdruntime/adapter.d.ts +120 -57
  33. package/dist/mdruntime/attached-model.d.ts +0 -1
  34. package/dist/mdruntime/authored.d.ts +87 -0
  35. package/dist/mdruntime/bootstrap.d.ts +1 -1
  36. package/dist/mdruntime/change-set.d.ts +4 -0
  37. package/dist/mdruntime/change.d.ts +4 -0
  38. package/dist/mdruntime/client.d.ts +19 -21
  39. package/dist/mdruntime/collection.d.ts +26 -4
  40. package/dist/mdruntime/compile.d.ts +2 -0
  41. package/dist/mdruntime/conversation-live.d.ts +28 -12
  42. package/dist/mdruntime/conversation-row.d.ts +8 -1
  43. package/dist/mdruntime/conversation.d.ts +37 -12
  44. package/dist/mdruntime/declaration.d.ts +9 -0
  45. package/dist/mdruntime/durability.d.ts +5 -0
  46. package/dist/mdruntime/failure.d.ts +3 -0
  47. package/dist/mdruntime/figures.d.ts +1 -0
  48. package/dist/mdruntime/house-query.d.ts +14 -0
  49. package/dist/mdruntime/install.d.ts +10 -6
  50. package/dist/mdruntime/listing.d.ts +29 -22
  51. package/dist/mdruntime/live.d.ts +5 -3
  52. package/dist/mdruntime/media.d.ts +19 -2
  53. package/dist/mdruntime/messages.d.ts +12 -6
  54. package/dist/mdruntime/modal.d.ts +1 -0
  55. package/dist/mdruntime/model.d.ts +4 -3
  56. package/dist/mdruntime/observation.d.ts +29 -12
  57. package/dist/mdruntime/opened.d.ts +1 -1
  58. package/dist/mdruntime/outcome.d.ts +13 -1
  59. package/dist/mdruntime/overlay.d.ts +6 -2
  60. package/dist/mdruntime/preparation.d.ts +33 -7
  61. package/dist/mdruntime/presence.d.ts +57 -0
  62. package/dist/mdruntime/query.d.ts +0 -1
  63. package/dist/mdruntime/reach.d.ts +15 -6
  64. package/dist/mdruntime/readiness.d.ts +20 -5
  65. package/dist/mdruntime/reads.d.ts +4 -2
  66. package/dist/mdruntime/recovery.d.ts +4 -1
  67. package/dist/mdruntime/replica.d.ts +5 -10
  68. package/dist/mdruntime/retried.d.ts +29 -0
  69. package/dist/mdruntime/room-draft.d.ts +31 -8
  70. package/dist/mdruntime/runtime.d.ts +11 -19
  71. package/dist/mdruntime/save.d.ts +42 -88
  72. package/dist/mdruntime/saves.d.ts +4 -40
  73. package/dist/mdruntime/socket/lanes.d.ts +12 -4
  74. package/dist/mdruntime/socket/session.d.ts +4 -2
  75. package/dist/mdruntime/socket.d.ts +4 -6
  76. package/dist/mdruntime/source.d.ts +5 -7
  77. package/dist/mdruntime/store/installs.d.ts +2 -2
  78. package/dist/mdruntime/store/readiness.d.ts +5 -4
  79. package/dist/mdruntime/store/records.d.ts +23 -8
  80. package/dist/mdruntime/store/rooms-shown.d.ts +7 -0
  81. package/dist/mdruntime/store/space.d.ts +1 -1
  82. package/dist/mdruntime/store.d.ts +26 -16
  83. package/dist/mdruntime/stored.d.ts +33 -15
  84. package/dist/mdruntime/surface.d.ts +12 -6
  85. package/dist/mdruntime/tables.d.ts +19 -58
  86. package/dist/mdruntime/wire.d.ts +66 -7
  87. package/dist/session-content/check.d.ts +17 -0
  88. package/dist/session-content/index.d.ts +6 -0
  89. package/dist/session-content/parts.d.ts +30 -0
  90. package/dist/session-content/state.d.ts +59 -0
  91. package/dist/session-content/turn.d.ts +137 -0
  92. package/dist/test-host.d.ts +8 -1
  93. package/dist/test-host.js +44 -1
  94. package/docs/families.md +61 -33
  95. package/package.json +2 -2
  96. package/dist/mdmodel/blocks.d.ts +0 -10
  97. package/dist/mdmodel/links.d.ts +0 -28
  98. package/dist/mdmodel/profile.d.ts +0 -5
  99. package/dist/mdruntime/job.d.ts +0 -32
  100. package/dist/mdruntime/log.d.ts +0 -5
  101. package/dist/mdruntime/socket/rooms.d.ts +0 -42
  102. package/dist/mdruntime/store/fences.d.ts +0 -15
  103. package/dist/mdruntime/turn.d.ts +0 -8
@@ -0,0 +1,869 @@
1
+ import type { TypedPath } from './types.js';
2
+ export declare const APP_PREFERENCES_HOME = "settings/apps";
3
+ export declare const HOUSE_MODEL_DECLARATION: {
4
+ readonly $defs: {
5
+ readonly room: {
6
+ readonly description: 'A Room, by its Room reference, under the key `room`.';
7
+ readonly type: 'string';
8
+ readonly pattern: string;
9
+ };
10
+ readonly app: {
11
+ readonly description: 'An App, by its App reference, under the key `app`.';
12
+ readonly type: 'string';
13
+ readonly pattern: string;
14
+ };
15
+ readonly space: {
16
+ readonly description: 'A Space, by its Space reference, under the key `space`.';
17
+ readonly type: 'string';
18
+ readonly pattern: string;
19
+ };
20
+ readonly id: {
21
+ readonly description: 'Any other entity, by its identifier, under the key of its kind. An entity a type says more about is an object holding it under that key beside its facts.';
22
+ readonly type: 'string';
23
+ readonly format: 'uuid';
24
+ };
25
+ };
26
+ readonly 'house-app-preferences': {
27
+ readonly description: "An App's preferences. Its own vocabulary is in the body.";
28
+ readonly properties: {
29
+ readonly app: {
30
+ readonly title: 'App';
31
+ readonly $ref: '#/$defs/app';
32
+ };
33
+ };
34
+ readonly required: readonly ['app'];
35
+ };
36
+ readonly 'house-notification': {
37
+ readonly description: "One kept Notification for this User: its kind, when it was sent as `created`, its way in, its email's subject and each fact of its value that is not sealed, named in snake_case. An entity a fact names is an object holding its identifier under the key of its kind, when the notification carries it, and its `name`, `email` and other facts beside it; a fact holding null is absent. `way_in` is either the House `path` it opens or the entity it is about, by its identifier under the key of its kind, a Trigger with its `room`. Its body is its email's words in Markdown. Both were worded once, in the User's language when it was delivered; an App may show them or word it itself from its kind and value. `read` is when the User opened it or marked it read, on any device: the one field House adds after delivery.";
38
+ readonly properties: {
39
+ readonly notification: {
40
+ readonly title: 'Notification';
41
+ readonly $ref: '#/$defs/id';
42
+ };
43
+ readonly kind: {
44
+ readonly title: 'Kind';
45
+ readonly type: 'string';
46
+ readonly enum: readonly ['share-offer', 'join-request', 'join-request-approved', 'room-ownership-offer', 'managed-environment-retention-opened', 'storage-full', 'sandbox-budget-spent', 'trigger-failed', 'room-telegram-chat-paused', 'break-glass-owner-disclosure', 'export-ready', 'export-failed', 'custom', 'agent-function-request-finished', 'storage-past-included'];
47
+ };
48
+ readonly created: {
49
+ readonly title: 'Created';
50
+ readonly type: 'string';
51
+ readonly format: 'date-time';
52
+ };
53
+ readonly read: {
54
+ readonly title: 'Read';
55
+ readonly type: 'string';
56
+ readonly format: 'date-time';
57
+ };
58
+ readonly way_in: {
59
+ readonly title: 'Way in';
60
+ readonly type: 'object';
61
+ readonly additionalProperties: false;
62
+ readonly properties: {
63
+ readonly path: {
64
+ readonly title: 'Path';
65
+ readonly type: 'string';
66
+ readonly pattern: '^\\/';
67
+ };
68
+ readonly room: {
69
+ readonly title: 'Room';
70
+ readonly $ref: '#/$defs/room';
71
+ };
72
+ readonly environment: {
73
+ readonly title: 'Environment';
74
+ readonly $ref: '#/$defs/id';
75
+ };
76
+ readonly trigger: {
77
+ readonly title: 'Trigger';
78
+ readonly $ref: '#/$defs/id';
79
+ };
80
+ };
81
+ readonly minProperties: 1;
82
+ };
83
+ readonly subject: {
84
+ readonly title: 'Subject';
85
+ readonly type: 'string';
86
+ };
87
+ readonly share: {
88
+ readonly title: 'Share';
89
+ readonly $ref: '#/$defs/id';
90
+ };
91
+ readonly issuer: {
92
+ readonly title: 'Issuer';
93
+ readonly type: 'object';
94
+ readonly additionalProperties: false;
95
+ readonly properties: {
96
+ readonly name: {
97
+ readonly title: 'Name';
98
+ readonly type: 'string';
99
+ };
100
+ readonly email: {
101
+ readonly title: 'Email';
102
+ readonly type: 'string';
103
+ readonly format: 'email';
104
+ };
105
+ };
106
+ readonly required: readonly ['name'];
107
+ };
108
+ readonly rooms: {
109
+ readonly title: 'Rooms';
110
+ readonly type: 'array';
111
+ readonly items: {
112
+ readonly type: 'object';
113
+ readonly additionalProperties: false;
114
+ readonly properties: {
115
+ readonly name: {
116
+ readonly title: 'Name';
117
+ readonly type: 'string';
118
+ };
119
+ };
120
+ readonly required: readonly ['name'];
121
+ };
122
+ };
123
+ readonly apps: {
124
+ readonly title: 'Apps';
125
+ readonly type: 'array';
126
+ readonly items: {
127
+ readonly type: 'object';
128
+ readonly additionalProperties: false;
129
+ readonly properties: {
130
+ readonly name: {
131
+ readonly title: 'Name';
132
+ readonly type: 'string';
133
+ readonly minLength: 1;
134
+ readonly maxLength: 200;
135
+ };
136
+ readonly reaches: {
137
+ readonly title: 'Reaches';
138
+ readonly type: 'array';
139
+ readonly items: {
140
+ readonly type: 'string';
141
+ readonly minLength: 1;
142
+ readonly maxLength: 512;
143
+ };
144
+ };
145
+ };
146
+ readonly required: readonly ['name', 'reaches'];
147
+ };
148
+ };
149
+ readonly spaces: {
150
+ readonly title: 'Spaces';
151
+ readonly type: 'array';
152
+ readonly items: {
153
+ readonly type: 'object';
154
+ readonly additionalProperties: false;
155
+ readonly properties: {
156
+ readonly name: {
157
+ readonly title: 'Name';
158
+ readonly type: 'string';
159
+ };
160
+ };
161
+ readonly required: readonly ['name'];
162
+ };
163
+ };
164
+ readonly expires_at: {
165
+ readonly title: 'Expires at';
166
+ readonly type: 'string';
167
+ readonly format: 'date-time';
168
+ };
169
+ readonly join_request: {
170
+ readonly title: 'Join request';
171
+ readonly $ref: '#/$defs/id';
172
+ };
173
+ readonly user: {
174
+ readonly title: 'User';
175
+ readonly type: 'object';
176
+ readonly additionalProperties: false;
177
+ readonly properties: {
178
+ readonly name: {
179
+ readonly title: 'Name';
180
+ readonly type: 'string';
181
+ };
182
+ readonly email: {
183
+ readonly title: 'Email';
184
+ readonly type: 'string';
185
+ readonly format: 'email';
186
+ };
187
+ };
188
+ readonly required: readonly ['name'];
189
+ };
190
+ readonly room: {
191
+ readonly title: 'Room';
192
+ readonly type: 'object';
193
+ readonly additionalProperties: false;
194
+ readonly properties: {
195
+ readonly room: {
196
+ readonly title: 'Room';
197
+ readonly $ref: '#/$defs/room';
198
+ };
199
+ readonly name: {
200
+ readonly title: 'Name';
201
+ readonly type: 'string';
202
+ };
203
+ };
204
+ readonly minProperties: 1;
205
+ };
206
+ readonly app: {
207
+ readonly title: 'App';
208
+ readonly type: 'object';
209
+ readonly additionalProperties: false;
210
+ readonly properties: {
211
+ readonly app: {
212
+ readonly title: 'App';
213
+ readonly $ref: '#/$defs/app';
214
+ };
215
+ };
216
+ readonly required: readonly ['app'];
217
+ };
218
+ readonly space: {
219
+ readonly title: 'Space';
220
+ readonly type: 'object';
221
+ readonly additionalProperties: false;
222
+ readonly properties: {
223
+ readonly space: {
224
+ readonly title: 'Space';
225
+ readonly $ref: '#/$defs/space';
226
+ };
227
+ };
228
+ readonly required: readonly ['space'];
229
+ };
230
+ readonly ownership_offer: {
231
+ readonly title: 'Ownership offer';
232
+ readonly $ref: '#/$defs/id';
233
+ };
234
+ readonly offerer: {
235
+ readonly title: 'Offerer';
236
+ readonly type: 'object';
237
+ readonly additionalProperties: false;
238
+ readonly properties: {
239
+ readonly name: {
240
+ readonly title: 'Name';
241
+ readonly type: 'string';
242
+ };
243
+ readonly email: {
244
+ readonly title: 'Email';
245
+ readonly type: 'string';
246
+ readonly format: 'email';
247
+ };
248
+ };
249
+ readonly required: readonly ['name'];
250
+ };
251
+ readonly environment: {
252
+ readonly title: 'Environment';
253
+ readonly type: 'object';
254
+ readonly additionalProperties: false;
255
+ readonly properties: {
256
+ readonly environment: {
257
+ readonly title: 'Environment';
258
+ readonly $ref: '#/$defs/id';
259
+ };
260
+ readonly name: {
261
+ readonly title: 'Name';
262
+ readonly type: 'string';
263
+ };
264
+ readonly kind: {
265
+ readonly title: 'Kind';
266
+ readonly enum: readonly ['vps', 'sandbox'];
267
+ };
268
+ };
269
+ readonly required: readonly ['environment', 'name'];
270
+ };
271
+ readonly reason: {
272
+ readonly title: 'Reason';
273
+ readonly type: 'string';
274
+ };
275
+ readonly deadline: {
276
+ readonly title: 'Deadline';
277
+ readonly type: 'string';
278
+ readonly format: 'date-time';
279
+ };
280
+ readonly free: {
281
+ readonly title: 'Free';
282
+ readonly type: 'object';
283
+ readonly additionalProperties: false;
284
+ readonly properties: {
285
+ readonly held: {
286
+ readonly title: 'Held';
287
+ readonly type: 'string';
288
+ readonly pattern: '^\\d+$';
289
+ };
290
+ readonly limit: {
291
+ readonly title: 'Limit';
292
+ readonly type: 'string';
293
+ readonly pattern: '^[1-9]\\d*$';
294
+ };
295
+ readonly measure: {
296
+ readonly title: 'Measure';
297
+ readonly type: 'string';
298
+ readonly enum: readonly ['content', 'retained'];
299
+ };
300
+ };
301
+ readonly required: readonly ['held', 'limit', 'measure'];
302
+ };
303
+ readonly chat: {
304
+ readonly title: 'Chat';
305
+ readonly type: 'string';
306
+ };
307
+ readonly missing: {
308
+ readonly title: 'Missing';
309
+ readonly type: 'array';
310
+ readonly items: {
311
+ readonly type: 'string';
312
+ readonly enum: readonly ['private', 'topics', 'ban_users', 'invite_users', 'manage_topics', 'post_messages', 'edit_messages', 'inbox_manage_topics', 'inbox_delete_messages'];
313
+ };
314
+ };
315
+ readonly budget: {
316
+ readonly title: 'Budget';
317
+ readonly type: 'string';
318
+ readonly pattern: '^\\d+(?:\\.\\d+)?$';
319
+ };
320
+ readonly resets_at: {
321
+ readonly title: 'Resets at';
322
+ readonly type: 'string';
323
+ readonly format: 'date-time';
324
+ };
325
+ readonly grant: {
326
+ readonly title: 'Grant';
327
+ readonly $ref: '#/$defs/id';
328
+ };
329
+ readonly category: {
330
+ readonly title: 'Category';
331
+ readonly type: 'string';
332
+ };
333
+ readonly access_started_at: {
334
+ readonly title: 'Access started at';
335
+ readonly type: 'string';
336
+ readonly format: 'date-time';
337
+ };
338
+ readonly access_ended_at: {
339
+ readonly title: 'Access ended at';
340
+ readonly type: 'string';
341
+ readonly format: 'date-time';
342
+ };
343
+ readonly systems: {
344
+ readonly title: 'Systems';
345
+ readonly type: 'array';
346
+ readonly items: {
347
+ readonly type: 'string';
348
+ };
349
+ };
350
+ readonly case_reference: {
351
+ readonly title: 'Case reference';
352
+ readonly type: 'string';
353
+ };
354
+ readonly export: {
355
+ readonly title: 'Export';
356
+ readonly $ref: '#/$defs/id';
357
+ };
358
+ readonly size_bytes: {
359
+ readonly title: 'Size in bytes';
360
+ readonly type: 'integer';
361
+ readonly minimum: 0;
362
+ };
363
+ readonly name: {
364
+ readonly title: 'Name';
365
+ readonly type: 'string';
366
+ };
367
+ readonly authorship: {
368
+ readonly title: 'Authorship';
369
+ readonly type: 'object';
370
+ readonly additionalProperties: false;
371
+ readonly properties: {
372
+ readonly kind: {
373
+ readonly title: 'Kind';
374
+ readonly type: 'string';
375
+ readonly const: 'trigger-action';
376
+ };
377
+ readonly trigger: {
378
+ readonly title: 'Trigger';
379
+ readonly $ref: '#/$defs/id';
380
+ };
381
+ readonly position: {
382
+ readonly title: 'Position';
383
+ readonly type: 'integer';
384
+ readonly minimum: 0;
385
+ };
386
+ };
387
+ readonly required: readonly ['kind', 'trigger', 'position'];
388
+ };
389
+ readonly path: {
390
+ readonly title: 'Path';
391
+ readonly type: 'string';
392
+ readonly maxLength: 4096;
393
+ readonly pattern: '^\\/.*';
394
+ };
395
+ readonly trigger: {
396
+ readonly title: 'Trigger';
397
+ readonly type: 'object';
398
+ readonly additionalProperties: false;
399
+ readonly properties: {
400
+ readonly trigger: {
401
+ readonly title: 'Trigger';
402
+ readonly $ref: '#/$defs/id';
403
+ };
404
+ readonly description: {
405
+ readonly title: 'Description';
406
+ readonly type: 'string';
407
+ };
408
+ };
409
+ readonly required: readonly ['trigger', 'description'];
410
+ };
411
+ readonly code: {
412
+ readonly title: 'Code';
413
+ readonly type: 'string';
414
+ readonly enum: readonly ['failed', 'internal_error', 'agent_function_unreadable', 'function_failed', 'function_not_started', 'agent_function_request_not_started', 'post_not_confirmed'];
415
+ };
416
+ readonly action: {
417
+ readonly title: 'Action';
418
+ readonly type: 'integer';
419
+ readonly minimum: 0;
420
+ };
421
+ readonly moment: {
422
+ readonly title: 'Moment';
423
+ readonly type: 'string';
424
+ readonly format: 'date-time';
425
+ };
426
+ readonly error: {
427
+ readonly title: 'Error';
428
+ readonly type: 'string';
429
+ };
430
+ readonly document_path: {
431
+ readonly title: 'Document path';
432
+ readonly type: 'string';
433
+ };
434
+ readonly agent_function: {
435
+ readonly title: 'Agent function';
436
+ readonly type: 'object';
437
+ readonly additionalProperties: false;
438
+ readonly properties: {
439
+ readonly name: {
440
+ readonly title: 'Name';
441
+ readonly type: 'string';
442
+ };
443
+ };
444
+ readonly required: readonly ['name'];
445
+ };
446
+ readonly agent: {
447
+ readonly title: 'Agent';
448
+ readonly type: 'object';
449
+ readonly additionalProperties: false;
450
+ readonly properties: {
451
+ readonly name: {
452
+ readonly title: 'Name';
453
+ readonly type: 'string';
454
+ };
455
+ };
456
+ readonly required: readonly ['name'];
457
+ };
458
+ readonly ended: {
459
+ readonly title: 'Ended';
460
+ readonly type: 'string';
461
+ readonly enum: readonly ['finished', 'failed'];
462
+ };
463
+ readonly duration: {
464
+ readonly title: 'Duration';
465
+ readonly type: 'integer';
466
+ readonly minimum: 1;
467
+ };
468
+ readonly meter: {
469
+ readonly title: 'Meter';
470
+ readonly type: 'string';
471
+ readonly enum: readonly ['indexed_text', 'blob'];
472
+ };
473
+ readonly average_bytes: {
474
+ readonly title: 'Average in bytes';
475
+ readonly type: 'integer';
476
+ readonly minimum: 0;
477
+ };
478
+ readonly included_bytes: {
479
+ readonly title: 'Included in bytes';
480
+ readonly type: 'integer';
481
+ readonly minimum: 1;
482
+ };
483
+ readonly block_bytes: {
484
+ readonly title: 'Block in bytes';
485
+ readonly type: 'integer';
486
+ readonly minimum: 1;
487
+ };
488
+ readonly block_usd: {
489
+ readonly title: 'Block price in USD';
490
+ readonly type: 'number';
491
+ readonly exclusiveMinimum: 0;
492
+ };
493
+ readonly amount_usd: {
494
+ readonly title: 'Amount in USD';
495
+ readonly type: 'number';
496
+ readonly exclusiveMinimum: 0;
497
+ };
498
+ };
499
+ readonly required: readonly ['notification', 'kind', 'created', 'way_in', 'subject'];
500
+ };
501
+ readonly 'house-panel-preferences': {
502
+ readonly description: "The panel's preferences at /rooms/private/settings/panel.md. Its own vocabulary is in the body.";
503
+ readonly properties: {};
504
+ };
505
+ readonly 'house-agent-function': {
506
+ readonly description: "One Agent function that serves this Room, which House alone writes from its owner's document in their Private Room and their Standing answer for it: the `agent_function` by identifier, its `description`, the `input` a caller sends, empty when it takes nothing, the `agent` it starts, by `agent` and the `name` that Agent had when this card was last written, and its `answer`, how a request from anyone but its owner starts: `at_once`, `ask_me`, which waits for its owner's approval, or `off`, which refuses it. The Agent function's instruction is never written here.";
507
+ readonly properties: {
508
+ readonly reflected: {
509
+ readonly title: 'Reflected';
510
+ readonly type: 'string';
511
+ readonly format: 'date-time';
512
+ };
513
+ readonly agent_function: {
514
+ readonly title: 'Agent function';
515
+ readonly $ref: '#/$defs/id';
516
+ };
517
+ readonly description: {
518
+ readonly title: 'Description';
519
+ readonly type: 'string';
520
+ };
521
+ readonly input: {
522
+ readonly title: 'Input';
523
+ readonly type: 'string';
524
+ };
525
+ readonly agent: {
526
+ readonly title: 'Agent';
527
+ readonly type: 'object';
528
+ readonly additionalProperties: false;
529
+ readonly properties: {
530
+ readonly agent: {
531
+ readonly title: 'Agent';
532
+ readonly $ref: '#/$defs/id';
533
+ };
534
+ readonly name: {
535
+ readonly title: 'Name';
536
+ readonly type: 'string';
537
+ };
538
+ };
539
+ readonly required: readonly ['agent', 'name'];
540
+ };
541
+ readonly answer: {
542
+ readonly title: 'Answer';
543
+ readonly type: 'string';
544
+ readonly enum: readonly ['at_once', 'ask_me', 'off'];
545
+ };
546
+ };
547
+ readonly required: readonly ['reflected', 'agent_function', 'description', 'input', 'agent', 'answer'];
548
+ };
549
+ readonly 'house-agent-function-document': {
550
+ readonly description: 'One Agent function as its owner writes it in their Private Room at rooms/<room-handle>/agent-functions/<name>.md, a path that binds this type and a document that names no type: what it does as `description`, what a caller sends as `input`, empty when it takes nothing, the `agent` it starts, by identifier, and `afk`, true for a run nobody watches, off when absent. Its body is the instruction that Agent follows.';
551
+ readonly properties: {
552
+ readonly description: {
553
+ readonly title: 'Description';
554
+ readonly type: 'string';
555
+ readonly maxLength: 2000;
556
+ readonly pattern: '\\S';
557
+ };
558
+ readonly input: {
559
+ readonly title: 'Input';
560
+ readonly type: 'string';
561
+ };
562
+ readonly agent: {
563
+ readonly title: 'Agent';
564
+ readonly $ref: '#/$defs/id';
565
+ };
566
+ readonly afk: {
567
+ readonly title: 'AFK';
568
+ readonly type: 'boolean';
569
+ };
570
+ };
571
+ readonly required: readonly ['description', 'input', 'agent'];
572
+ };
573
+ readonly 'house-trigger': {
574
+ readonly description: "One Trigger of this Room as its acts wrote it, which House alone writes: its `description`, the `condition` it fires on, its `actions` in order, whether each action and the Trigger are `enabled`, `paused_by` `types` while a change of the Room's types paused it, its `creator` by `user` and the `name` they had then, and when it was `created`. A `notify` action reaches the `users` its `to` names, the members its `fields` name in the matched document and the holders of its `roles`, or, `in_group`, posts once in this Room's Telegram group in their place, mentioning each; an `agent_function` action sends its `payload` to the Agent function whose card under this Room's `house/agent-functions/` its `card` names, absent while this Room holds no card of that Agent function; a `message` action puts its `text` into the active conversation that Agent function started for what the Event is about, or starts that Agent function when none is active; a `done` action marks Done every active conversation an Agent function request of this Room started for the Event's document; a `function` action runs the `function` its `app`'s latest release declares, on House's servers, or, naming no `app`, the Room owner's Environment function of that name on its Environment, which only a Trigger of their Private Room holds. Whether an action's target holds is not written: it follows from the Room's members, the Agent function's card, the App's latest release and the owner's functions.";
575
+ readonly properties: {
576
+ readonly reflected: {
577
+ readonly title: 'Reflected';
578
+ readonly type: 'string';
579
+ readonly format: 'date-time';
580
+ };
581
+ readonly trigger: {
582
+ readonly title: 'Trigger';
583
+ readonly $ref: '#/$defs/id';
584
+ };
585
+ readonly description: {
586
+ readonly title: 'Description';
587
+ readonly type: 'string';
588
+ };
589
+ readonly condition: {
590
+ readonly title: 'Condition';
591
+ readonly description: 'When it fires, as the Trigger reference page writes it, a document it names at its current path.';
592
+ readonly type: 'object';
593
+ readonly additionalProperties: true;
594
+ };
595
+ readonly actions: {
596
+ readonly title: 'Actions';
597
+ readonly type: 'array';
598
+ readonly items: {
599
+ readonly anyOf: readonly [{
600
+ readonly type: 'object';
601
+ readonly additionalProperties: false;
602
+ readonly properties: {
603
+ readonly kind: {
604
+ readonly title: 'Kind';
605
+ readonly const: 'notify';
606
+ };
607
+ readonly enabled: {
608
+ readonly title: 'Enabled';
609
+ readonly type: 'boolean';
610
+ };
611
+ readonly title: {
612
+ readonly title: 'Title';
613
+ readonly type: 'string';
614
+ };
615
+ readonly text: {
616
+ readonly title: 'Text';
617
+ readonly type: 'string';
618
+ };
619
+ readonly to: {
620
+ readonly title: 'To';
621
+ readonly type: 'object';
622
+ readonly additionalProperties: false;
623
+ readonly properties: {
624
+ readonly users: {
625
+ readonly title: 'Users';
626
+ readonly type: 'array';
627
+ readonly items: {
628
+ readonly type: 'object';
629
+ readonly additionalProperties: false;
630
+ readonly properties: {
631
+ readonly user: {
632
+ readonly title: 'User';
633
+ readonly $ref: '#/$defs/id';
634
+ };
635
+ };
636
+ readonly required: readonly ['user'];
637
+ };
638
+ };
639
+ readonly fields: {
640
+ readonly title: 'Fields';
641
+ readonly type: 'array';
642
+ readonly items: {
643
+ readonly type: 'string';
644
+ };
645
+ };
646
+ readonly roles: {
647
+ readonly title: 'Roles';
648
+ readonly type: 'array';
649
+ readonly items: {
650
+ readonly type: 'string';
651
+ };
652
+ };
653
+ };
654
+ readonly required: readonly ['users', 'fields', 'roles'];
655
+ };
656
+ readonly in_group: {
657
+ readonly title: 'In group';
658
+ readonly const: true;
659
+ };
660
+ };
661
+ readonly required: readonly ['kind', 'enabled', 'title', 'text', 'to'];
662
+ }, {
663
+ readonly type: 'object';
664
+ readonly additionalProperties: false;
665
+ readonly properties: {
666
+ readonly kind: {
667
+ readonly title: 'Kind';
668
+ readonly const: 'agent_function';
669
+ };
670
+ readonly enabled: {
671
+ readonly title: 'Enabled';
672
+ readonly type: 'boolean';
673
+ };
674
+ readonly card: {
675
+ readonly title: 'Card';
676
+ readonly type: 'string';
677
+ readonly minLength: 1;
678
+ };
679
+ readonly payload: {
680
+ readonly title: 'Payload';
681
+ readonly type: 'string';
682
+ };
683
+ };
684
+ readonly required: readonly ['kind', 'enabled', 'payload'];
685
+ }, {
686
+ readonly type: 'object';
687
+ readonly additionalProperties: false;
688
+ readonly properties: {
689
+ readonly kind: {
690
+ readonly title: 'Kind';
691
+ readonly const: 'message';
692
+ };
693
+ readonly enabled: {
694
+ readonly title: 'Enabled';
695
+ readonly type: 'boolean';
696
+ };
697
+ readonly card: {
698
+ readonly title: 'Card';
699
+ readonly type: 'string';
700
+ readonly minLength: 1;
701
+ };
702
+ readonly text: {
703
+ readonly title: 'Text';
704
+ readonly type: 'string';
705
+ };
706
+ };
707
+ readonly required: readonly ['kind', 'enabled', 'text'];
708
+ }, {
709
+ readonly type: 'object';
710
+ readonly additionalProperties: false;
711
+ readonly properties: {
712
+ readonly kind: {
713
+ readonly title: 'Kind';
714
+ readonly const: 'done';
715
+ };
716
+ readonly enabled: {
717
+ readonly title: 'Enabled';
718
+ readonly type: 'boolean';
719
+ };
720
+ };
721
+ readonly required: readonly ['kind', 'enabled'];
722
+ }, {
723
+ readonly type: 'object';
724
+ readonly additionalProperties: false;
725
+ readonly properties: {
726
+ readonly kind: {
727
+ readonly title: 'Kind';
728
+ readonly const: 'function';
729
+ };
730
+ readonly enabled: {
731
+ readonly title: 'Enabled';
732
+ readonly type: 'boolean';
733
+ };
734
+ readonly app: {
735
+ readonly title: 'App';
736
+ readonly $ref: '#/$defs/app';
737
+ };
738
+ readonly function: {
739
+ readonly title: 'Function';
740
+ readonly type: 'string';
741
+ };
742
+ };
743
+ readonly required: readonly ['kind', 'enabled', 'function'];
744
+ }];
745
+ };
746
+ };
747
+ readonly enabled: {
748
+ readonly title: 'Enabled';
749
+ readonly type: 'boolean';
750
+ };
751
+ readonly paused_by: {
752
+ readonly title: 'Paused by';
753
+ readonly enum: readonly ['types'];
754
+ };
755
+ readonly creator: {
756
+ readonly title: 'Creator';
757
+ readonly type: 'object';
758
+ readonly additionalProperties: false;
759
+ readonly properties: {
760
+ readonly user: {
761
+ readonly title: 'User';
762
+ readonly $ref: '#/$defs/id';
763
+ };
764
+ readonly name: {
765
+ readonly title: 'Name';
766
+ readonly type: 'string';
767
+ };
768
+ };
769
+ readonly required: readonly ['user', 'name'];
770
+ };
771
+ readonly created: {
772
+ readonly title: 'Created';
773
+ readonly type: 'string';
774
+ readonly format: 'date-time';
775
+ };
776
+ };
777
+ readonly required: readonly ['reflected', 'trigger', 'description', 'condition', 'actions', 'enabled', 'creator', 'created'];
778
+ };
779
+ readonly 'house-web-wizard': {
780
+ readonly description: "One Web Wizard an agent made for this User: the `environment` it runs on, with the `name` that Environment had when the Web Wizard was made, and its `state`, `waiting` until its owner presses Run or Keep, `running`, `finished` with the script's `exit_code`, `failed`, `cancelled` when its page closed before the script ended, `lapsed` when nobody ran it in its time, or `kept` when its owner kept the script, without running it, as their Environment function named `function`. Its body is the script, whole, in one fenced code block. The terminal's output is never kept.";
781
+ readonly properties: {
782
+ readonly reflected: {
783
+ readonly title: 'Reflected';
784
+ readonly type: 'string';
785
+ readonly format: 'date-time';
786
+ };
787
+ readonly web_wizard: {
788
+ readonly title: 'Web Wizard';
789
+ readonly $ref: '#/$defs/id';
790
+ };
791
+ readonly environment: {
792
+ readonly title: 'Environment';
793
+ readonly type: 'object';
794
+ readonly additionalProperties: false;
795
+ readonly properties: {
796
+ readonly environment: {
797
+ readonly title: 'Environment';
798
+ readonly $ref: '#/$defs/id';
799
+ };
800
+ readonly name: {
801
+ readonly title: 'Name';
802
+ readonly type: 'string';
803
+ };
804
+ };
805
+ readonly required: readonly ['environment', 'name'];
806
+ };
807
+ readonly state: {
808
+ readonly title: 'State';
809
+ readonly enum: readonly ['waiting', 'running', 'finished', 'failed', 'cancelled', 'lapsed', 'kept'];
810
+ };
811
+ readonly exit_code: {
812
+ readonly title: 'Exit code';
813
+ readonly type: 'integer';
814
+ };
815
+ readonly function: {
816
+ readonly title: 'Function';
817
+ readonly type: 'string';
818
+ };
819
+ };
820
+ readonly required: readonly ['reflected', 'web_wizard', 'environment', 'state'];
821
+ };
822
+ };
823
+ export declare const HOUSE_TYPED_PATHS: readonly TypedPath[];
824
+ type Model = typeof HOUSE_MODEL_DECLARATION;
825
+ type Definitions = Model['$defs'];
826
+ export type HouseModelType = Exclude<keyof Model, '$defs'>;
827
+ type Needed<S> = S extends {
828
+ readonly required: readonly (infer Name)[];
829
+ } ? Name : never;
830
+ type Shape<T> = {
831
+ [K in keyof T]: T[K];
832
+ } & {};
833
+ type Properties<S> = S extends {
834
+ readonly properties: infer P;
835
+ } ? Shape<{
836
+ readonly [K in keyof P as K extends Needed<S> ? K : never]: Value<P[K]>;
837
+ } & {
838
+ readonly [K in keyof P as K extends Needed<S> ? never : K]?: Value<P[K]>;
839
+ }> : S extends {
840
+ readonly additionalProperties: false;
841
+ } ? Readonly<Record<string, never>> : Readonly<Record<string, unknown>>;
842
+ type Typed<T, S> = T extends 'string' ? string : T extends 'integer' ? number : T extends 'boolean' ? boolean : T extends 'array' ? readonly (S extends {
843
+ readonly items: infer I;
844
+ } ? Value<I> : unknown)[] : T extends 'object' ? Properties<S> : never;
845
+ type Value<S> = S extends {
846
+ readonly const: infer C;
847
+ } ? C : S extends {
848
+ readonly enum: readonly (infer E)[];
849
+ } ? E : S extends {
850
+ readonly anyOf: readonly (infer A)[];
851
+ } ? Value<A> : S extends {
852
+ readonly $ref: `#/$defs/${infer D}`;
853
+ } ? D extends keyof Definitions ? Value<Definitions[D]> : never : S extends {
854
+ readonly type: infer T;
855
+ } ? Typed<T, S> : S extends {
856
+ readonly properties: object;
857
+ } ? Properties<S> : unknown;
858
+ type Declared<Type extends HouseModelType> = Model[Type] extends {
859
+ readonly properties: infer P;
860
+ } ? P : {};
861
+ export type HouseDocumentFields<Type extends HouseModelType> = Properties<{
862
+ readonly properties: {
863
+ readonly type: {
864
+ readonly const: Type;
865
+ };
866
+ } & Declared<Type>;
867
+ readonly required: readonly ('type' | Needed<Model[Type]>)[];
868
+ }>;
869
+ export {};