@agentshouse/mdruntime-adapter 0.1.0-cf863e7a50d6e → 0.1.0-cfcea2fad4cce

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 +120 -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 +239 -368
  24. package/dist/house-model.d.ts.map +1 -1
  25. package/dist/house-model.js +231 -288
  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 +68 -57
  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 +0 -2
  71. package/dist/write.d.ts.map +1 -1
  72. package/dist/write.js +24 -38
  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
- };
225
- readonly minProperties: 1;
226
- };
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: {
240
- readonly type: 'object';
241
- readonly additionalProperties: false;
242
- readonly properties: {
243
- readonly name: {
244
- readonly type: 'string';
245
- };
246
214
  };
247
- readonly required: readonly ['name'];
215
+ readonly required: readonly ['app'];
248
216
  };
249
- readonly caller: {
217
+ readonly space: {
218
+ readonly title: 'Space';
250
219
  readonly type: 'object';
251
220
  readonly additionalProperties: false;
252
221
  readonly properties: {
253
- readonly user: {
254
- readonly $ref: '#/$defs/id';
255
- };
256
- readonly name: {
257
- readonly type: 'string';
222
+ readonly space: {
223
+ readonly title: 'Space';
224
+ readonly $ref: '#/$defs/space';
258
225
  };
259
226
  };
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,233 +248,217 @@ 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: {
350
+ readonly title: 'Case reference';
353
351
  readonly type: 'string';
354
352
  };
355
- readonly routine_request: {
353
+ readonly export: {
354
+ readonly title: 'Export';
356
355
  readonly $ref: '#/$defs/id';
357
356
  };
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'];
357
+ readonly size_bytes: {
358
+ readonly title: 'Size in bytes';
359
+ readonly type: 'integer';
360
+ readonly minimum: 0;
367
361
  };
368
- readonly agent: {
362
+ readonly name: {
363
+ readonly title: 'Name';
364
+ readonly type: 'string';
365
+ };
366
+ readonly authorship: {
367
+ readonly title: 'Authorship';
369
368
  readonly type: 'object';
370
369
  readonly additionalProperties: false;
371
370
  readonly properties: {
372
- readonly agent: {
373
- readonly $ref: '#/$defs/id';
374
- };
375
- readonly name: {
371
+ readonly kind: {
372
+ readonly title: 'Kind';
376
373
  readonly type: 'string';
374
+ readonly const: 'trigger-action';
377
375
  };
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: {
376
+ readonly trigger: {
377
+ readonly title: 'Trigger';
389
378
  readonly $ref: '#/$defs/id';
390
379
  };
391
- readonly name: {
392
- readonly type: 'string';
393
- };
394
- readonly version: {
380
+ readonly position: {
381
+ readonly title: 'Position';
395
382
  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';
383
+ readonly minimum: 0;
407
384
  };
408
385
  };
409
- readonly required: readonly ['name'];
386
+ readonly required: readonly ['kind', 'trigger', 'position'];
410
387
  };
411
- readonly input: {
388
+ readonly path: {
389
+ readonly title: 'Path';
412
390
  readonly type: 'string';
391
+ readonly maxLength: 4096;
392
+ readonly pattern: '^\\/.*';
413
393
  };
414
- readonly export: {
415
- readonly $ref: '#/$defs/id';
416
- };
417
- readonly size_bytes: {
418
- readonly type: 'integer';
419
- readonly minimum: 0;
420
- };
421
- readonly site: {
394
+ readonly trigger: {
395
+ readonly title: 'Trigger';
422
396
  readonly type: 'object';
423
397
  readonly additionalProperties: false;
424
398
  readonly properties: {
425
- readonly site: {
399
+ readonly trigger: {
400
+ readonly title: 'Trigger';
426
401
  readonly $ref: '#/$defs/id';
427
402
  };
428
- readonly name: {
403
+ readonly description: {
404
+ readonly title: 'Description';
429
405
  readonly type: 'string';
430
406
  };
431
407
  };
432
- readonly required: readonly ['site', 'name'];
408
+ readonly required: readonly ['trigger', 'description'];
433
409
  };
434
- readonly address: {
410
+ readonly code: {
411
+ readonly title: 'Code';
435
412
  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;
413
+ readonly enum: readonly ['failed', 'function_failed', 'function_not_started', 'agent_function_request_not_started'];
452
414
  };
453
- readonly bound: {
415
+ readonly action: {
416
+ readonly title: 'Action';
454
417
  readonly type: 'integer';
455
418
  readonly minimum: 0;
456
419
  };
457
- readonly title: {
420
+ readonly moment: {
421
+ readonly title: 'Moment';
458
422
  readonly type: 'string';
423
+ readonly format: 'date-time';
459
424
  };
460
- readonly body: {
425
+ readonly error: {
426
+ readonly title: 'Error';
461
427
  readonly type: 'string';
462
428
  };
463
- readonly authorship: {
429
+ readonly agent_function: {
430
+ readonly title: 'Agent function';
464
431
  readonly type: 'object';
465
432
  readonly additionalProperties: false;
466
433
  readonly properties: {
467
- readonly kind: {
434
+ readonly name: {
435
+ readonly title: 'Name';
468
436
  readonly type: 'string';
469
- readonly const: 'trigger-action';
470
- };
471
- readonly trigger: {
472
- readonly $ref: '#/$defs/id';
473
- };
474
- readonly position: {
475
- readonly type: 'integer';
476
- readonly minimum: 0;
477
437
  };
478
438
  };
479
- readonly required: readonly ['kind', 'trigger', 'position'];
480
- };
481
- readonly path: {
482
- readonly type: 'string';
483
- readonly maxLength: 4096;
484
- readonly pattern: '^\\/.*';
439
+ readonly required: readonly ['name'];
485
440
  };
486
- readonly trigger: {
441
+ readonly agent: {
442
+ readonly title: 'Agent';
487
443
  readonly type: 'object';
488
444
  readonly additionalProperties: false;
489
445
  readonly properties: {
490
- readonly trigger: {
491
- readonly $ref: '#/$defs/id';
492
- };
493
446
  readonly name: {
447
+ readonly title: 'Name';
494
448
  readonly type: 'string';
495
449
  };
496
450
  };
497
- readonly required: readonly ['trigger', 'name'];
498
- };
499
- readonly cause: {
500
- readonly type: 'string';
451
+ readonly required: readonly ['name'];
501
452
  };
502
- readonly function: {
453
+ readonly ended: {
454
+ readonly title: 'Ended';
503
455
  readonly type: 'string';
456
+ readonly enum: readonly ['finished', 'failed'];
504
457
  };
505
- readonly error: {
506
- readonly type: 'string';
458
+ readonly duration: {
459
+ readonly title: 'Duration';
460
+ readonly type: 'integer';
461
+ readonly minimum: 1;
507
462
  };
508
463
  };
509
464
  readonly required: readonly ['notification', 'kind', 'created', 'way_in', 'subject'];
@@ -512,214 +467,93 @@ export declare const HOUSE_MODEL_DECLARATION: {
512
467
  readonly description: "The panel's preferences at /rooms/private/settings/panel.md. Its own vocabulary is in the body.";
513
468
  readonly properties: {};
514
469
  };
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.";
470
+ readonly 'house-agent-function': {
471
+ 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
472
  readonly properties: {
518
473
  readonly reflected: {
474
+ readonly title: 'Reflected';
519
475
  readonly type: 'string';
520
476
  readonly format: 'date-time';
521
477
  };
522
- readonly routine: {
478
+ readonly agent_function: {
479
+ readonly title: 'Agent function';
523
480
  readonly $ref: '#/$defs/id';
524
481
  };
525
482
  readonly description: {
483
+ readonly title: 'Description';
526
484
  readonly type: 'string';
527
485
  };
528
486
  readonly input: {
487
+ readonly title: 'Input';
529
488
  readonly type: 'string';
530
489
  };
531
490
  readonly agent: {
491
+ readonly title: 'Agent';
532
492
  readonly type: 'object';
533
493
  readonly additionalProperties: false;
534
494
  readonly properties: {
535
495
  readonly agent: {
496
+ readonly title: 'Agent';
536
497
  readonly $ref: '#/$defs/id';
537
498
  };
538
499
  readonly name: {
500
+ readonly title: 'Name';
539
501
  readonly type: 'string';
540
502
  };
541
503
  };
542
504
  readonly required: readonly ['agent', 'name'];
543
505
  };
544
506
  };
545
- readonly required: readonly ['reflected', 'routine', 'description', 'input', 'agent'];
507
+ readonly required: readonly ['reflected', 'agent_function', 'description', 'input', 'agent'];
508
+ };
509
+ readonly 'house-agent-function-document': {
510
+ 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.';
511
+ readonly properties: {
512
+ readonly description: {
513
+ readonly title: 'Description';
514
+ readonly type: 'string';
515
+ readonly maxLength: 2000;
516
+ readonly pattern: '\\S';
517
+ };
518
+ readonly input: {
519
+ readonly title: 'Input';
520
+ readonly type: 'string';
521
+ };
522
+ readonly agent: {
523
+ readonly title: 'Agent';
524
+ readonly $ref: '#/$defs/id';
525
+ };
526
+ readonly afk: {
527
+ readonly title: 'AFK';
528
+ readonly type: 'boolean';
529
+ };
530
+ };
531
+ readonly required: readonly ['description', 'input', 'agent'];
546
532
  };
547
533
  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 `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.";
534
+ 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
535
  readonly properties: {
550
536
  readonly reflected: {
537
+ readonly title: 'Reflected';
551
538
  readonly type: 'string';
552
539
  readonly format: 'date-time';
553
540
  };
554
541
  readonly trigger: {
542
+ readonly title: 'Trigger';
555
543
  readonly $ref: '#/$defs/id';
556
544
  };
557
545
  readonly description: {
546
+ readonly title: 'Description';
558
547
  readonly type: 'string';
559
548
  };
560
549
  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
- }];
550
+ readonly title: 'Condition';
551
+ readonly description: 'When it fires, as the Trigger reference page writes it, a document it names at its current path.';
552
+ readonly type: 'object';
553
+ readonly additionalProperties: true;
721
554
  };
722
555
  readonly actions: {
556
+ readonly title: 'Actions';
723
557
  readonly type: 'array';
724
558
  readonly items: {
725
559
  readonly anyOf: readonly [{
@@ -727,28 +561,35 @@ export declare const HOUSE_MODEL_DECLARATION: {
727
561
  readonly additionalProperties: false;
728
562
  readonly properties: {
729
563
  readonly kind: {
564
+ readonly title: 'Kind';
730
565
  readonly const: 'notify';
731
566
  };
732
567
  readonly enabled: {
568
+ readonly title: 'Enabled';
733
569
  readonly type: 'boolean';
734
570
  };
735
571
  readonly title: {
572
+ readonly title: 'Title';
736
573
  readonly type: 'string';
737
574
  };
738
575
  readonly text: {
576
+ readonly title: 'Text';
739
577
  readonly type: 'string';
740
578
  };
741
579
  readonly to: {
580
+ readonly title: 'To';
742
581
  readonly type: 'object';
743
582
  readonly additionalProperties: false;
744
583
  readonly properties: {
745
584
  readonly users: {
585
+ readonly title: 'Users';
746
586
  readonly type: 'array';
747
587
  readonly items: {
748
588
  readonly type: 'object';
749
589
  readonly additionalProperties: false;
750
590
  readonly properties: {
751
591
  readonly user: {
592
+ readonly title: 'User';
752
593
  readonly $ref: '#/$defs/id';
753
594
  };
754
595
  };
@@ -756,12 +597,14 @@ export declare const HOUSE_MODEL_DECLARATION: {
756
597
  };
757
598
  };
758
599
  readonly fields: {
600
+ readonly title: 'Fields';
759
601
  readonly type: 'array';
760
602
  readonly items: {
761
603
  readonly type: 'string';
762
604
  };
763
605
  };
764
606
  readonly roles: {
607
+ readonly title: 'Roles';
765
608
  readonly type: 'array';
766
609
  readonly items: {
767
610
  readonly type: 'string';
@@ -777,16 +620,20 @@ export declare const HOUSE_MODEL_DECLARATION: {
777
620
  readonly additionalProperties: false;
778
621
  readonly properties: {
779
622
  readonly kind: {
780
- readonly const: 'routine';
623
+ readonly title: 'Kind';
624
+ readonly const: 'agent_function';
781
625
  };
782
626
  readonly enabled: {
627
+ readonly title: 'Enabled';
783
628
  readonly type: 'boolean';
784
629
  };
785
630
  readonly card: {
631
+ readonly title: 'Card';
786
632
  readonly type: 'string';
787
633
  readonly minLength: 1;
788
634
  };
789
635
  readonly payload: {
636
+ readonly title: 'Payload';
790
637
  readonly type: 'string';
791
638
  };
792
639
  };
@@ -796,16 +643,20 @@ export declare const HOUSE_MODEL_DECLARATION: {
796
643
  readonly additionalProperties: false;
797
644
  readonly properties: {
798
645
  readonly kind: {
646
+ readonly title: 'Kind';
799
647
  readonly const: 'message';
800
648
  };
801
649
  readonly enabled: {
650
+ readonly title: 'Enabled';
802
651
  readonly type: 'boolean';
803
652
  };
804
653
  readonly card: {
654
+ readonly title: 'Card';
805
655
  readonly type: 'string';
806
656
  readonly minLength: 1;
807
657
  };
808
658
  readonly text: {
659
+ readonly title: 'Text';
809
660
  readonly type: 'string';
810
661
  };
811
662
  };
@@ -815,9 +666,11 @@ export declare const HOUSE_MODEL_DECLARATION: {
815
666
  readonly additionalProperties: false;
816
667
  readonly properties: {
817
668
  readonly kind: {
669
+ readonly title: 'Kind';
818
670
  readonly const: 'done';
819
671
  };
820
672
  readonly enabled: {
673
+ readonly title: 'Enabled';
821
674
  readonly type: 'boolean';
822
675
  };
823
676
  };
@@ -827,15 +680,19 @@ export declare const HOUSE_MODEL_DECLARATION: {
827
680
  readonly additionalProperties: false;
828
681
  readonly properties: {
829
682
  readonly kind: {
683
+ readonly title: 'Kind';
830
684
  readonly const: 'function';
831
685
  };
832
686
  readonly enabled: {
687
+ readonly title: 'Enabled';
833
688
  readonly type: 'boolean';
834
689
  };
835
690
  readonly app: {
691
+ readonly title: 'App';
836
692
  readonly $ref: '#/$defs/app';
837
693
  };
838
694
  readonly function: {
695
+ readonly title: 'Function';
839
696
  readonly type: 'string';
840
697
  };
841
698
  };
@@ -844,25 +701,31 @@ export declare const HOUSE_MODEL_DECLARATION: {
844
701
  };
845
702
  };
846
703
  readonly enabled: {
704
+ readonly title: 'Enabled';
847
705
  readonly type: 'boolean';
848
706
  };
849
707
  readonly paused_by: {
708
+ readonly title: 'Paused by';
850
709
  readonly enum: readonly ['types'];
851
710
  };
852
711
  readonly creator: {
712
+ readonly title: 'Creator';
853
713
  readonly type: 'object';
854
714
  readonly additionalProperties: false;
855
715
  readonly properties: {
856
716
  readonly user: {
717
+ readonly title: 'User';
857
718
  readonly $ref: '#/$defs/id';
858
719
  };
859
720
  readonly name: {
721
+ readonly title: 'Name';
860
722
  readonly type: 'string';
861
723
  };
862
724
  };
863
725
  readonly required: readonly ['user', 'name'];
864
726
  };
865
727
  readonly created: {
728
+ readonly title: 'Created';
866
729
  readonly type: 'string';
867
730
  readonly format: 'date-time';
868
731
  };
@@ -873,32 +736,40 @@ export declare const HOUSE_MODEL_DECLARATION: {
873
736
  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.";
874
737
  readonly properties: {
875
738
  readonly reflected: {
739
+ readonly title: 'Reflected';
876
740
  readonly type: 'string';
877
741
  readonly format: 'date-time';
878
742
  };
879
743
  readonly web_wizard: {
744
+ readonly title: 'Web Wizard';
880
745
  readonly $ref: '#/$defs/id';
881
746
  };
882
747
  readonly environment: {
748
+ readonly title: 'Environment';
883
749
  readonly type: 'object';
884
750
  readonly additionalProperties: false;
885
751
  readonly properties: {
886
752
  readonly environment: {
753
+ readonly title: 'Environment';
887
754
  readonly $ref: '#/$defs/id';
888
755
  };
889
756
  readonly name: {
757
+ readonly title: 'Name';
890
758
  readonly type: 'string';
891
759
  };
892
760
  };
893
761
  readonly required: readonly ['environment', 'name'];
894
762
  };
895
763
  readonly state: {
764
+ readonly title: 'State';
896
765
  readonly enum: readonly ['waiting', 'running', 'finished', 'failed', 'cancelled', 'lapsed', 'kept'];
897
766
  };
898
767
  readonly exit_code: {
768
+ readonly title: 'Exit code';
899
769
  readonly type: 'integer';
900
770
  };
901
771
  readonly function: {
772
+ readonly title: 'Function';
902
773
  readonly type: 'string';
903
774
  };
904
775
  };
@@ -906,6 +777,7 @@ export declare const HOUSE_MODEL_DECLARATION: {
906
777
  };
907
778
  };
908
779
  export declare const HOUSE_MODEL_TYPES: string;
780
+ export declare const HOUSE_TYPED_PATHS: readonly TypedPath[];
909
781
  type Model = typeof HOUSE_MODEL_DECLARATION;
910
782
  type Definitions = Model['$defs'];
911
783
  export type HouseModelType = Exclude<keyof Model, '$defs'>;
@@ -924,7 +796,7 @@ type Properties<S> = S extends {
924
796
  }> : S extends {
925
797
  readonly additionalProperties: false;
926
798
  } ? Readonly<Record<string, never>> : Readonly<Record<string, unknown>>;
927
- 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 {
799
+ type Typed<T, S> = T extends 'string' ? string : T extends 'integer' ? number : T extends 'boolean' ? boolean : T extends 'array' ? readonly (S extends {
928
800
  readonly items: infer I;
929
801
  } ? Value<I> : unknown)[] : T extends 'object' ? Properties<S> : never;
930
802
  type Value<S> = S extends {
@@ -952,4 +824,3 @@ export type HouseDocumentFields<Type extends HouseModelType> = Properties<{
952
824
  readonly required: readonly ('type' | Needed<Model[Type]>)[];
953
825
  }>;
954
826
  export {};
955
- //# sourceMappingURL=house-model.d.ts.map