@agentshouse/mdruntime-adapter 0.1.0-ccd2ccb1f7214 → 0.1.0-ccdfb41af2abb

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 (70) hide show
  1. package/README.md +2 -2
  2. package/dist/actions.d.ts +3 -65
  3. package/dist/actions.d.ts.map +1 -1
  4. package/dist/actions.js +1 -337
  5. package/dist/adapter.d.ts.map +1 -1
  6. package/dist/adapter.js +248 -369
  7. package/dist/app-reference.d.ts +2 -0
  8. package/dist/app-reference.d.ts.map +1 -0
  9. package/dist/app-reference.js +2 -0
  10. package/dist/crockford.d.ts +4 -0
  11. package/dist/crockford.d.ts.map +1 -0
  12. package/dist/crockford.js +3 -0
  13. package/dist/discovery.d.ts +13 -12
  14. package/dist/discovery.d.ts.map +1 -1
  15. package/dist/discovery.js +62 -51
  16. package/dist/history.d.ts +12 -0
  17. package/dist/history.d.ts.map +1 -0
  18. package/dist/history.js +91 -0
  19. package/dist/house-model.d.ts +892 -0
  20. package/dist/house-model.d.ts.map +1 -0
  21. package/dist/house-model.js +482 -0
  22. package/dist/index.d.ts +10 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +9 -1
  25. package/dist/model.d.ts +5 -2
  26. package/dist/model.d.ts.map +1 -1
  27. package/dist/model.js +10 -29
  28. package/dist/part.d.ts +14 -0
  29. package/dist/part.d.ts.map +1 -0
  30. package/dist/part.js +90 -0
  31. package/dist/read.d.ts +50 -63
  32. package/dist/read.d.ts.map +1 -1
  33. package/dist/read.js +242 -284
  34. package/dist/refusal.d.ts +0 -3
  35. package/dist/refusal.d.ts.map +1 -1
  36. package/dist/refusal.js +0 -5
  37. package/dist/room-stream.d.ts +19 -0
  38. package/dist/room-stream.d.ts.map +1 -0
  39. package/dist/room-stream.js +57 -0
  40. package/dist/room-types.d.ts +7 -0
  41. package/dist/room-types.d.ts.map +1 -0
  42. package/dist/room-types.js +125 -0
  43. package/dist/search.d.ts +5 -0
  44. package/dist/search.d.ts.map +1 -0
  45. package/dist/search.js +47 -0
  46. package/dist/site.d.ts.map +1 -1
  47. package/dist/site.js +84 -195
  48. package/dist/stream.d.ts +13 -14
  49. package/dist/stream.d.ts.map +1 -1
  50. package/dist/stream.js +169 -423
  51. package/dist/transport.d.ts +52 -39
  52. package/dist/transport.d.ts.map +1 -1
  53. package/dist/transport.js +55 -11
  54. package/dist/upload.d.ts +12 -0
  55. package/dist/upload.d.ts.map +1 -0
  56. package/dist/upload.js +63 -0
  57. package/dist/write.d.ts +18 -2
  58. package/dist/write.d.ts.map +1 -1
  59. package/dist/write.js +105 -70
  60. package/package.json +8 -4
  61. package/AGENTS.md +0 -299
  62. package/dist/gather.d.ts +0 -4
  63. package/dist/gather.d.ts.map +0 -1
  64. package/dist/gather.js +0 -45
  65. package/dist/handed.d.ts +0 -15
  66. package/dist/handed.d.ts.map +0 -1
  67. package/dist/handed.js +0 -38
  68. package/dist/referrer.d.ts +0 -7
  69. package/dist/referrer.d.ts.map +0 -1
  70. package/dist/referrer.js +0 -35
@@ -0,0 +1,892 @@
1
+ export declare const HOUSE_MODEL_DECLARATION: {
2
+ readonly $defs: {
3
+ readonly room: {
4
+ readonly description: 'A Room, by its Room reference, under the key `room`.';
5
+ readonly type: 'string';
6
+ readonly pattern: '^r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$';
7
+ };
8
+ readonly app: {
9
+ readonly description: 'An App, by its App reference, under the key `app`.';
10
+ readonly type: 'string';
11
+ readonly pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$';
12
+ };
13
+ readonly document: {
14
+ readonly description: 'A document of a Room, by its file reference, under the key `document`.';
15
+ readonly type: 'string';
16
+ readonly pattern: '^af_([123456789abcdefghjkmnpqrstvwxyz][0123456789abcdefghjkmnpqrstvwxyz]*)\\.([0123456789abcdefghjkmnpqrstvwxyz])$';
17
+ };
18
+ readonly id: {
19
+ 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.';
20
+ readonly type: 'string';
21
+ readonly format: 'uuid';
22
+ };
23
+ readonly namespace: {
24
+ readonly description: 'The Namespace a grant entry covers, an App or a Room by its reference with the area of it.';
25
+ readonly type: 'string';
26
+ readonly maxLength: 512;
27
+ readonly pattern: '^(?:a_[A-Za-z0-9._-]+(?:\\/source)?|r_[A-Za-z0-9._-]+(?:\\/(?:settings|settings\\/schema|settings\\/model|settings\\/indexing|content))?)$';
28
+ };
29
+ readonly trigger_test: {
30
+ readonly description: 'One test of a Trigger condition as the Trigger reference page writes one, a value compared at a `path` or `all`, `any` or `not` of tests.';
31
+ readonly type: 'object';
32
+ readonly additionalProperties: true;
33
+ };
34
+ readonly trigger_values: {
35
+ readonly type: 'array';
36
+ readonly items: {
37
+ readonly anyOf: readonly [{
38
+ readonly type: 'string';
39
+ }, {
40
+ readonly type: 'number';
41
+ }, {
42
+ readonly type: 'boolean';
43
+ }];
44
+ };
45
+ };
46
+ readonly trigger_scope: {
47
+ readonly description: 'The documents a Trigger condition watches, by `type`, by `folder` or one document at its `path`, which `create_trigger` takes as `document`.';
48
+ readonly type: 'object';
49
+ readonly additionalProperties: false;
50
+ readonly properties: {
51
+ readonly type: {
52
+ readonly type: 'string';
53
+ };
54
+ readonly folder: {
55
+ readonly type: 'string';
56
+ };
57
+ readonly path: {
58
+ readonly type: 'string';
59
+ };
60
+ };
61
+ readonly minProperties: 1;
62
+ readonly maxProperties: 1;
63
+ };
64
+ };
65
+ readonly 'house-app-preferences': {
66
+ readonly description: "An App's preferences. Its own vocabulary is in the body.";
67
+ readonly properties: {
68
+ readonly app: {
69
+ readonly $ref: '#/$defs/app';
70
+ };
71
+ };
72
+ readonly required: readonly ['app'];
73
+ };
74
+ readonly 'house-notification': {
75
+ readonly description: "One kept Human 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 state belongs to each browser.";
76
+ readonly properties: {
77
+ readonly notification: {
78
+ readonly $ref: '#/$defs/id';
79
+ };
80
+ readonly kind: {
81
+ readonly type: 'string';
82
+ readonly enum: readonly ['share-offer', 'join-request', 'join-request-approved', 'app-room-binding-incompatible', 'app-call', 'room-ownership-offer', 'managed-environment-retention-opened', 'managed-environment-placement-intervention', 'storage-full', 'sandbox-budget-spent', 'break-glass-owner-disclosure', 'routine-start-approval-request', 'export-ready', 'export-failed', 'site-disabled', 'site-binding-incompatible', 'site-images-full', 'custom'];
83
+ };
84
+ readonly created: {
85
+ readonly type: 'string';
86
+ readonly format: 'date-time';
87
+ };
88
+ readonly way_in: {
89
+ readonly type: 'object';
90
+ readonly additionalProperties: false;
91
+ readonly properties: {
92
+ readonly path: {
93
+ readonly type: 'string';
94
+ readonly pattern: '^\\/';
95
+ };
96
+ readonly room: {
97
+ readonly $ref: '#/$defs/room';
98
+ };
99
+ readonly app: {
100
+ readonly $ref: '#/$defs/app';
101
+ };
102
+ readonly environment: {
103
+ readonly $ref: '#/$defs/id';
104
+ };
105
+ readonly trigger: {
106
+ readonly $ref: '#/$defs/id';
107
+ };
108
+ readonly site: {
109
+ readonly $ref: '#/$defs/id';
110
+ };
111
+ };
112
+ readonly minProperties: 1;
113
+ };
114
+ readonly subject: {
115
+ readonly type: 'string';
116
+ };
117
+ readonly share: {
118
+ readonly $ref: '#/$defs/id';
119
+ };
120
+ readonly issuer: {
121
+ readonly type: 'object';
122
+ readonly additionalProperties: false;
123
+ readonly properties: {
124
+ readonly name: {
125
+ readonly type: 'string';
126
+ };
127
+ readonly email: {
128
+ readonly type: 'string';
129
+ readonly format: 'email';
130
+ };
131
+ };
132
+ readonly required: readonly ['name', 'email'];
133
+ };
134
+ readonly rooms: {
135
+ readonly type: 'array';
136
+ readonly items: {
137
+ readonly type: 'object';
138
+ readonly additionalProperties: false;
139
+ readonly properties: {
140
+ readonly name: {
141
+ readonly type: 'string';
142
+ };
143
+ };
144
+ readonly required: readonly ['name'];
145
+ };
146
+ };
147
+ readonly apps: {
148
+ readonly maxItems: 20;
149
+ readonly type: 'array';
150
+ readonly items: {
151
+ readonly type: 'object';
152
+ readonly additionalProperties: false;
153
+ readonly properties: {
154
+ readonly name: {
155
+ readonly type: 'string';
156
+ readonly minLength: 1;
157
+ readonly maxLength: 200;
158
+ };
159
+ readonly reaches: {
160
+ readonly type: 'array';
161
+ readonly items: {
162
+ readonly type: 'string';
163
+ readonly minLength: 1;
164
+ readonly maxLength: 512;
165
+ };
166
+ };
167
+ };
168
+ readonly required: readonly ['name', 'reaches'];
169
+ };
170
+ };
171
+ readonly expires_at: {
172
+ readonly type: 'string';
173
+ readonly format: 'date-time';
174
+ };
175
+ readonly join_request: {
176
+ readonly $ref: '#/$defs/id';
177
+ };
178
+ readonly user: {
179
+ readonly type: 'object';
180
+ readonly additionalProperties: false;
181
+ readonly properties: {
182
+ readonly name: {
183
+ readonly type: 'string';
184
+ };
185
+ readonly email: {
186
+ readonly type: 'string';
187
+ readonly format: 'email';
188
+ };
189
+ };
190
+ readonly required: readonly ['name', 'email'];
191
+ };
192
+ readonly room: {
193
+ readonly type: 'object';
194
+ readonly additionalProperties: false;
195
+ readonly properties: {
196
+ readonly room: {
197
+ readonly $ref: '#/$defs/room';
198
+ };
199
+ readonly name: {
200
+ readonly type: 'string';
201
+ };
202
+ };
203
+ readonly minProperties: 1;
204
+ };
205
+ readonly app: {
206
+ readonly type: 'object';
207
+ readonly additionalProperties: false;
208
+ readonly properties: {
209
+ readonly app: {
210
+ readonly $ref: '#/$defs/app';
211
+ };
212
+ readonly name: {
213
+ readonly type: 'string';
214
+ };
215
+ };
216
+ readonly minProperties: 1;
217
+ };
218
+ readonly release: {
219
+ readonly type: 'integer';
220
+ readonly minimum: 1;
221
+ };
222
+ readonly binding: {
223
+ readonly $ref: '#/$defs/id';
224
+ };
225
+ readonly slot: {
226
+ readonly type: 'string';
227
+ };
228
+ readonly findings: {
229
+ readonly type: 'array';
230
+ readonly items: {
231
+ readonly type: 'string';
232
+ };
233
+ };
234
+ readonly caller: {
235
+ readonly type: 'object';
236
+ readonly additionalProperties: false;
237
+ readonly properties: {
238
+ readonly user: {
239
+ readonly $ref: '#/$defs/id';
240
+ };
241
+ readonly name: {
242
+ readonly type: 'string';
243
+ };
244
+ };
245
+ readonly required: readonly ['user', 'name'];
246
+ };
247
+ readonly ownership_offer: {
248
+ readonly $ref: '#/$defs/id';
249
+ };
250
+ readonly offerer: {
251
+ readonly type: 'object';
252
+ readonly additionalProperties: false;
253
+ readonly properties: {
254
+ readonly name: {
255
+ readonly type: 'string';
256
+ };
257
+ readonly email: {
258
+ readonly type: 'string';
259
+ readonly format: 'email';
260
+ };
261
+ };
262
+ readonly required: readonly ['name', 'email'];
263
+ };
264
+ readonly environment: {
265
+ readonly type: 'object';
266
+ readonly additionalProperties: false;
267
+ readonly properties: {
268
+ readonly environment: {
269
+ readonly $ref: '#/$defs/id';
270
+ };
271
+ readonly name: {
272
+ readonly type: 'string';
273
+ };
274
+ readonly kind: {
275
+ readonly enum: readonly ['vps', 'sandbox'];
276
+ };
277
+ };
278
+ readonly required: readonly ['environment', 'name'];
279
+ };
280
+ readonly reason: {
281
+ readonly type: 'string';
282
+ };
283
+ readonly deadline: {
284
+ readonly type: 'string';
285
+ readonly format: 'date-time';
286
+ };
287
+ readonly operation_kind: {
288
+ readonly type: 'string';
289
+ };
290
+ readonly free: {
291
+ readonly type: 'object';
292
+ readonly additionalProperties: false;
293
+ readonly properties: {
294
+ readonly held: {
295
+ readonly type: 'string';
296
+ readonly pattern: '^\\d+$';
297
+ };
298
+ readonly limit: {
299
+ readonly type: 'string';
300
+ readonly pattern: '^[1-9]\\d*$';
301
+ };
302
+ readonly measure: {
303
+ readonly type: 'string';
304
+ readonly enum: readonly ['content', 'retained'];
305
+ };
306
+ };
307
+ readonly required: readonly ['held', 'limit', 'measure'];
308
+ };
309
+ readonly budget: {
310
+ readonly type: 'string';
311
+ readonly pattern: '^\\d+(?:\\.\\d+)?$';
312
+ };
313
+ readonly resets_at: {
314
+ readonly type: 'string';
315
+ readonly format: 'date-time';
316
+ };
317
+ readonly grant: {
318
+ readonly $ref: '#/$defs/id';
319
+ };
320
+ readonly category: {
321
+ readonly type: 'string';
322
+ };
323
+ readonly access_started_at: {
324
+ readonly type: 'string';
325
+ readonly format: 'date-time';
326
+ };
327
+ readonly access_ended_at: {
328
+ readonly type: 'string';
329
+ readonly format: 'date-time';
330
+ };
331
+ readonly systems: {
332
+ readonly type: 'array';
333
+ readonly items: {
334
+ readonly type: 'string';
335
+ };
336
+ };
337
+ readonly case_reference: {
338
+ readonly type: 'string';
339
+ };
340
+ readonly routine_request: {
341
+ readonly $ref: '#/$defs/id';
342
+ };
343
+ readonly requester: {
344
+ readonly type: 'object';
345
+ readonly additionalProperties: false;
346
+ readonly properties: {
347
+ readonly name: {
348
+ readonly type: 'string';
349
+ };
350
+ };
351
+ readonly required: readonly ['name'];
352
+ };
353
+ readonly agent: {
354
+ readonly type: 'object';
355
+ readonly additionalProperties: false;
356
+ readonly properties: {
357
+ readonly agent: {
358
+ readonly $ref: '#/$defs/id';
359
+ };
360
+ readonly name: {
361
+ readonly type: 'string';
362
+ };
363
+ };
364
+ readonly required: readonly ['name'];
365
+ };
366
+ readonly conversation: {
367
+ readonly $ref: '#/$defs/id';
368
+ };
369
+ readonly routine: {
370
+ readonly type: 'object';
371
+ readonly additionalProperties: false;
372
+ readonly properties: {
373
+ readonly name: {
374
+ readonly type: 'string';
375
+ };
376
+ readonly version: {
377
+ readonly type: 'integer';
378
+ readonly minimum: 1;
379
+ };
380
+ };
381
+ readonly required: readonly ['name'];
382
+ };
383
+ readonly export: {
384
+ readonly $ref: '#/$defs/id';
385
+ };
386
+ readonly size_bytes: {
387
+ readonly type: 'integer';
388
+ readonly minimum: 0;
389
+ };
390
+ readonly site: {
391
+ readonly type: 'object';
392
+ readonly additionalProperties: false;
393
+ readonly properties: {
394
+ readonly site: {
395
+ readonly $ref: '#/$defs/id';
396
+ };
397
+ readonly name: {
398
+ readonly type: 'string';
399
+ };
400
+ };
401
+ readonly required: readonly ['site', 'name'];
402
+ };
403
+ readonly address: {
404
+ readonly type: 'string';
405
+ readonly maxLength: 300;
406
+ readonly format: 'uri';
407
+ };
408
+ readonly copies: {
409
+ readonly type: 'integer';
410
+ readonly minimum: 0;
411
+ };
412
+ readonly bound: {
413
+ readonly type: 'integer';
414
+ readonly minimum: 0;
415
+ };
416
+ readonly title: {
417
+ readonly type: 'string';
418
+ };
419
+ readonly body: {
420
+ readonly type: 'string';
421
+ };
422
+ readonly authorship: {
423
+ readonly type: 'object';
424
+ readonly additionalProperties: false;
425
+ readonly properties: {
426
+ readonly kind: {
427
+ readonly type: 'string';
428
+ readonly const: 'trigger-action';
429
+ };
430
+ readonly trigger: {
431
+ readonly $ref: '#/$defs/id';
432
+ };
433
+ readonly position: {
434
+ readonly type: 'integer';
435
+ readonly minimum: 0;
436
+ };
437
+ };
438
+ readonly required: readonly ['kind', 'trigger', 'position'];
439
+ };
440
+ readonly path: {
441
+ readonly type: 'string';
442
+ readonly maxLength: 4096;
443
+ readonly pattern: '^\\/.*';
444
+ };
445
+ };
446
+ readonly required: readonly ['notification', 'kind', 'created', 'way_in', 'subject'];
447
+ };
448
+ readonly 'house-panel-preferences': {
449
+ readonly description: "The panel's preferences at /rooms/private/settings/panel.md. Its own vocabulary is in the body.";
450
+ readonly properties: {};
451
+ };
452
+ readonly 'house-routine': {
453
+ readonly description: "One Routine that serves this Room, which House alone writes from its owner's document in their Private Room: the `routine` by identifier, its `description`, the `input` a caller sends, empty when it takes nothing, and the `agent` it starts, by `agent` and the `name` that Agent had when this card was last written. The Routine's instruction is never written here.";
454
+ readonly properties: {
455
+ readonly reflected: {
456
+ readonly type: 'string';
457
+ readonly format: 'date-time';
458
+ };
459
+ readonly routine: {
460
+ readonly $ref: '#/$defs/id';
461
+ };
462
+ readonly description: {
463
+ readonly type: 'string';
464
+ };
465
+ readonly input: {
466
+ readonly type: 'string';
467
+ };
468
+ readonly agent: {
469
+ readonly type: 'object';
470
+ readonly additionalProperties: false;
471
+ readonly properties: {
472
+ readonly agent: {
473
+ readonly $ref: '#/$defs/id';
474
+ };
475
+ readonly name: {
476
+ readonly type: 'string';
477
+ };
478
+ };
479
+ readonly required: readonly ['agent', 'name'];
480
+ };
481
+ };
482
+ readonly required: readonly ['reflected', 'routine', 'description', 'input', 'agent'];
483
+ };
484
+ readonly 'house-trigger': {
485
+ 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`; a `routine` action sends its `payload` to the Routine whose card under this Room's `house/routines/` its `card` names, absent while this Room holds no card of that Routine; a `message` action puts its `text` into the active conversation that Routine started for what the Event is about, or starts that Routine when none is active; a `done` action marks Done every active conversation a Routine 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 Routine's card, the App's latest release and the owner's functions.";
486
+ readonly properties: {
487
+ readonly reflected: {
488
+ readonly type: 'string';
489
+ readonly format: 'date-time';
490
+ };
491
+ readonly trigger: {
492
+ readonly $ref: '#/$defs/id';
493
+ };
494
+ readonly description: {
495
+ readonly type: 'string';
496
+ };
497
+ readonly condition: {
498
+ readonly anyOf: readonly [{
499
+ readonly type: 'object';
500
+ readonly additionalProperties: false;
501
+ readonly properties: {
502
+ readonly on: {
503
+ readonly const: 'documents';
504
+ };
505
+ readonly scope: {
506
+ readonly $ref: '#/$defs/trigger_scope';
507
+ };
508
+ readonly mode: {
509
+ readonly const: 'starts_matching';
510
+ };
511
+ readonly new_documents: {
512
+ readonly type: 'boolean';
513
+ };
514
+ readonly match: {
515
+ readonly $ref: '#/$defs/trigger_test';
516
+ };
517
+ readonly by: {
518
+ readonly $ref: '#/$defs/trigger_test';
519
+ };
520
+ readonly moved_between_rooms: {
521
+ readonly type: 'boolean';
522
+ };
523
+ };
524
+ readonly required: readonly ['on', 'scope', 'mode', 'new_documents', 'match'];
525
+ }, {
526
+ readonly type: 'object';
527
+ readonly additionalProperties: false;
528
+ readonly properties: {
529
+ readonly on: {
530
+ readonly const: 'documents';
531
+ };
532
+ readonly scope: {
533
+ readonly $ref: '#/$defs/trigger_scope';
534
+ };
535
+ readonly mode: {
536
+ readonly const: 'field_changes';
537
+ };
538
+ readonly field: {
539
+ readonly type: 'string';
540
+ };
541
+ readonly from: {
542
+ readonly anyOf: readonly [{
543
+ readonly $ref: '#/$defs/trigger_values';
544
+ }, {
545
+ readonly const: 'new';
546
+ }];
547
+ };
548
+ readonly to: {
549
+ readonly anyOf: readonly [{
550
+ readonly $ref: '#/$defs/trigger_values';
551
+ }, {
552
+ readonly const: 'deleted';
553
+ }];
554
+ };
555
+ readonly match: {
556
+ readonly $ref: '#/$defs/trigger_test';
557
+ };
558
+ readonly by: {
559
+ readonly $ref: '#/$defs/trigger_test';
560
+ };
561
+ readonly moved_between_rooms: {
562
+ readonly type: 'boolean';
563
+ };
564
+ };
565
+ readonly required: readonly ['on', 'scope', 'mode', 'field'];
566
+ }, {
567
+ readonly type: 'object';
568
+ readonly additionalProperties: false;
569
+ readonly properties: {
570
+ readonly on: {
571
+ readonly const: 'items';
572
+ };
573
+ readonly source: {
574
+ readonly type: 'string';
575
+ };
576
+ readonly address: {
577
+ readonly type: 'string';
578
+ };
579
+ readonly match: {
580
+ readonly $ref: '#/$defs/trigger_test';
581
+ };
582
+ };
583
+ readonly required: readonly ['on'];
584
+ }, {
585
+ readonly type: 'object';
586
+ readonly additionalProperties: false;
587
+ readonly properties: {
588
+ readonly on: {
589
+ readonly const: 'notifications';
590
+ };
591
+ readonly match: {
592
+ readonly $ref: '#/$defs/trigger_test';
593
+ };
594
+ };
595
+ readonly required: readonly ['on'];
596
+ }, {
597
+ readonly type: 'object';
598
+ readonly additionalProperties: false;
599
+ readonly properties: {
600
+ readonly on: {
601
+ readonly const: 'messages';
602
+ };
603
+ readonly match: {
604
+ readonly $ref: '#/$defs/trigger_test';
605
+ };
606
+ };
607
+ readonly required: readonly ['on'];
608
+ }, {
609
+ readonly type: 'object';
610
+ readonly additionalProperties: false;
611
+ readonly properties: {
612
+ readonly on: {
613
+ readonly const: 'clock';
614
+ };
615
+ readonly cron: {
616
+ readonly type: 'string';
617
+ };
618
+ readonly time_zone: {
619
+ readonly type: 'string';
620
+ };
621
+ };
622
+ readonly required: readonly ['on', 'cron', 'time_zone'];
623
+ }, {
624
+ readonly type: 'object';
625
+ readonly additionalProperties: false;
626
+ readonly properties: {
627
+ readonly on: {
628
+ readonly const: 'clock';
629
+ };
630
+ readonly scope: {
631
+ readonly type: 'object';
632
+ readonly additionalProperties: false;
633
+ readonly properties: {
634
+ readonly type: {
635
+ readonly type: 'string';
636
+ };
637
+ };
638
+ readonly required: readonly ['type'];
639
+ };
640
+ readonly date: {
641
+ readonly type: 'string';
642
+ };
643
+ readonly days: {
644
+ readonly type: 'integer';
645
+ };
646
+ readonly at: {
647
+ readonly type: 'string';
648
+ };
649
+ readonly time_zone: {
650
+ readonly type: 'string';
651
+ };
652
+ readonly match: {
653
+ readonly $ref: '#/$defs/trigger_test';
654
+ };
655
+ };
656
+ readonly required: readonly ['on', 'scope', 'date', 'days', 'at', 'time_zone'];
657
+ }];
658
+ };
659
+ readonly actions: {
660
+ readonly type: 'array';
661
+ readonly items: {
662
+ readonly anyOf: readonly [{
663
+ readonly type: 'object';
664
+ readonly additionalProperties: false;
665
+ readonly properties: {
666
+ readonly kind: {
667
+ readonly const: 'notify';
668
+ };
669
+ readonly enabled: {
670
+ readonly type: 'boolean';
671
+ };
672
+ readonly title: {
673
+ readonly type: 'string';
674
+ };
675
+ readonly text: {
676
+ readonly type: 'string';
677
+ };
678
+ readonly to: {
679
+ readonly type: 'object';
680
+ readonly additionalProperties: false;
681
+ readonly properties: {
682
+ readonly users: {
683
+ readonly type: 'array';
684
+ readonly items: {
685
+ readonly type: 'object';
686
+ readonly additionalProperties: false;
687
+ readonly properties: {
688
+ readonly user: {
689
+ readonly $ref: '#/$defs/id';
690
+ };
691
+ };
692
+ readonly required: readonly ['user'];
693
+ };
694
+ };
695
+ readonly fields: {
696
+ readonly type: 'array';
697
+ readonly items: {
698
+ readonly type: 'string';
699
+ };
700
+ };
701
+ readonly roles: {
702
+ readonly type: 'array';
703
+ readonly items: {
704
+ readonly type: 'string';
705
+ };
706
+ };
707
+ };
708
+ readonly required: readonly ['users', 'fields', 'roles'];
709
+ };
710
+ };
711
+ readonly required: readonly ['kind', 'enabled', 'title', 'text', 'to'];
712
+ }, {
713
+ readonly type: 'object';
714
+ readonly additionalProperties: false;
715
+ readonly properties: {
716
+ readonly kind: {
717
+ readonly const: 'routine';
718
+ };
719
+ readonly enabled: {
720
+ readonly type: 'boolean';
721
+ };
722
+ readonly card: {
723
+ readonly type: 'string';
724
+ readonly minLength: 1;
725
+ };
726
+ readonly payload: {
727
+ readonly type: 'string';
728
+ };
729
+ };
730
+ readonly required: readonly ['kind', 'enabled', 'payload'];
731
+ }, {
732
+ readonly type: 'object';
733
+ readonly additionalProperties: false;
734
+ readonly properties: {
735
+ readonly kind: {
736
+ readonly const: 'message';
737
+ };
738
+ readonly enabled: {
739
+ readonly type: 'boolean';
740
+ };
741
+ readonly card: {
742
+ readonly type: 'string';
743
+ readonly minLength: 1;
744
+ };
745
+ readonly text: {
746
+ readonly type: 'string';
747
+ };
748
+ };
749
+ readonly required: readonly ['kind', 'enabled', 'text'];
750
+ }, {
751
+ readonly type: 'object';
752
+ readonly additionalProperties: false;
753
+ readonly properties: {
754
+ readonly kind: {
755
+ readonly const: 'done';
756
+ };
757
+ readonly enabled: {
758
+ readonly type: 'boolean';
759
+ };
760
+ };
761
+ readonly required: readonly ['kind', 'enabled'];
762
+ }, {
763
+ readonly type: 'object';
764
+ readonly additionalProperties: false;
765
+ readonly properties: {
766
+ readonly kind: {
767
+ readonly const: 'function';
768
+ };
769
+ readonly enabled: {
770
+ readonly type: 'boolean';
771
+ };
772
+ readonly app: {
773
+ readonly $ref: '#/$defs/app';
774
+ };
775
+ readonly function: {
776
+ readonly type: 'string';
777
+ };
778
+ };
779
+ readonly required: readonly ['kind', 'enabled', 'function'];
780
+ }];
781
+ };
782
+ };
783
+ readonly enabled: {
784
+ readonly type: 'boolean';
785
+ };
786
+ readonly paused_by: {
787
+ readonly enum: readonly ['types'];
788
+ };
789
+ readonly creator: {
790
+ readonly type: 'object';
791
+ readonly additionalProperties: false;
792
+ readonly properties: {
793
+ readonly user: {
794
+ readonly $ref: '#/$defs/id';
795
+ };
796
+ readonly name: {
797
+ readonly type: 'string';
798
+ };
799
+ };
800
+ readonly required: readonly ['user', 'name'];
801
+ };
802
+ readonly created: {
803
+ readonly type: 'string';
804
+ readonly format: 'date-time';
805
+ };
806
+ };
807
+ readonly required: readonly ['reflected', 'trigger', 'description', 'condition', 'actions', 'enabled', 'creator', 'created'];
808
+ };
809
+ readonly 'house-web-wizard': {
810
+ 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.";
811
+ readonly properties: {
812
+ readonly reflected: {
813
+ readonly type: 'string';
814
+ readonly format: 'date-time';
815
+ };
816
+ readonly web_wizard: {
817
+ readonly $ref: '#/$defs/id';
818
+ };
819
+ readonly environment: {
820
+ readonly type: 'object';
821
+ readonly additionalProperties: false;
822
+ readonly properties: {
823
+ readonly environment: {
824
+ readonly $ref: '#/$defs/id';
825
+ };
826
+ readonly name: {
827
+ readonly type: 'string';
828
+ };
829
+ };
830
+ readonly required: readonly ['environment', 'name'];
831
+ };
832
+ readonly state: {
833
+ readonly enum: readonly ['waiting', 'running', 'finished', 'failed', 'cancelled', 'lapsed', 'kept'];
834
+ };
835
+ readonly exit_code: {
836
+ readonly type: 'integer';
837
+ };
838
+ readonly function: {
839
+ readonly type: 'string';
840
+ };
841
+ };
842
+ readonly required: readonly ['reflected', 'web_wizard', 'environment', 'state'];
843
+ };
844
+ };
845
+ export declare const HOUSE_MODEL_TYPES: string;
846
+ type Model = typeof HOUSE_MODEL_DECLARATION;
847
+ type Definitions = Model['$defs'];
848
+ export type HouseModelType = Exclude<keyof Model, '$defs'>;
849
+ type Needed<S> = S extends {
850
+ readonly required: readonly (infer Name)[];
851
+ } ? Name : never;
852
+ type Shape<T> = {
853
+ [K in keyof T]: T[K];
854
+ } & {};
855
+ type Properties<S> = S extends {
856
+ readonly properties: infer P;
857
+ } ? Shape<{
858
+ readonly [K in keyof P as K extends Needed<S> ? K : never]: Value<P[K]>;
859
+ } & {
860
+ readonly [K in keyof P as K extends Needed<S> ? never : K]?: Value<P[K]>;
861
+ }> : S extends {
862
+ readonly additionalProperties: false;
863
+ } ? Readonly<Record<string, never>> : Readonly<Record<string, unknown>>;
864
+ type Typed<T, S> = T extends 'string' ? string : T extends 'integer' | 'number' ? number : T extends 'boolean' ? boolean : T extends 'null' ? null : T extends 'array' ? readonly (S extends {
865
+ readonly items: infer I;
866
+ } ? Value<I> : unknown)[] : T extends 'object' ? Properties<S> : never;
867
+ type Value<S> = S extends {
868
+ readonly const: infer C;
869
+ } ? C : S extends {
870
+ readonly enum: readonly (infer E)[];
871
+ } ? E : S extends {
872
+ readonly anyOf: readonly (infer A)[];
873
+ } ? Value<A> : S extends {
874
+ readonly $ref: `#/$defs/${infer D}`;
875
+ } ? D extends keyof Definitions ? Value<Definitions[D]> : never : S extends {
876
+ readonly type: infer T;
877
+ } ? Typed<T, S> : S extends {
878
+ readonly properties: object;
879
+ } ? Properties<S> : unknown;
880
+ type Declared<Type extends HouseModelType> = Model[Type] extends {
881
+ readonly properties: infer P;
882
+ } ? P : {};
883
+ export type HouseDocumentFields<Type extends HouseModelType> = Properties<{
884
+ readonly properties: {
885
+ readonly type: {
886
+ readonly const: Type;
887
+ };
888
+ } & Declared<Type>;
889
+ readonly required: readonly ('type' | Needed<Model[Type]>)[];
890
+ }>;
891
+ export {};
892
+ //# sourceMappingURL=house-model.d.ts.map