@agentshouse/mdruntime-adapter 0.1.0-c8bfc1969f4fe → 0.1.0-c8c9697b9a064

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