@agentshouse/mdruntime-adapter 0.1.0-cd673d02b6e50 → 0.1.0-cd75dfaf57319
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.
- package/dist/actions.d.ts +2 -47
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +7 -225
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +69 -214
- package/dist/discovery.d.ts +18 -5
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +60 -26
- package/dist/history.d.ts +12 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +92 -0
- package/dist/house-model.d.ts +718 -1
- package/dist/house-model.d.ts.map +1 -1
- package/dist/house-model.js +393 -486
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/model.d.ts +5 -4
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +27 -22
- package/dist/read.d.ts +11 -44
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +25 -174
- package/dist/refusal.d.ts +0 -3
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +0 -5
- package/dist/room-stream.d.ts +2 -1
- package/dist/room-stream.d.ts.map +1 -1
- package/dist/room-stream.js +2 -2
- package/dist/room-types.d.ts +2 -2
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +7 -9
- package/dist/search.d.ts +5 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +47 -0
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +50 -92
- package/dist/space-schema.d.ts +7 -0
- package/dist/space-schema.d.ts.map +1 -0
- package/dist/space-schema.js +18 -0
- package/dist/stream.d.ts +14 -14
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +169 -424
- package/dist/transport.d.ts +44 -35
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +54 -12
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +2 -2
- package/dist/write.d.ts +2 -1
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +8 -23
- package/package.json +2 -2
- package/dist/gather.d.ts +0 -3
- package/dist/gather.d.ts.map +0 -1
- package/dist/gather.js +0 -35
package/dist/house-model.js
CHANGED
|
@@ -1,486 +1,393 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
expires: { type: string, format: date-time }
|
|
395
|
-
required: [ reflected, share, share_link, created, expires ]
|
|
396
|
-
house-share-offer:
|
|
397
|
-
description: "One live Share offered to this User by email while an item of it is still offered, \`from\` its issuer by display \`name\` and account \`email\`. Each item names its \`kind\`, \`room\` or \`app\`, its \`name\`, its \`state\` for this User, \`offerable\`, \`held\`, \`accepted\`, \`declined\` or \`superseded\`, for a Room item the \`level\` it grants and the \`operations\` it grants; it carries no reference. A Room item's access level and operations are the ones its issuer chose for the Room's content; its holder reads the Room's settings at that level, and holds \`manageAccess\` over its document model when it names \`manageAccess\`. A Room item naming Schema Roles names them as \`roles\`, which accepting the Share adds to this User's own in that Room. An App item grants use of the App and never its source, is never shown \`held\`, and names as \`origins\` the external origins its latest release declared when this document was written, when it declared any, which accepting the Share lets its code reach. Each pack entry names an offered \`app\`, one of its \`slot\`s, and the offered \`room\` that fills it, each by \`name\`. Names are as House held them when this document was written. The page is the House approval path where this User accepts or declines the whole Share."
|
|
398
|
-
properties:
|
|
399
|
-
reflected: { type: string, format: date-time }
|
|
400
|
-
share: { $ref: '#/$defs/id' }
|
|
401
|
-
from: { type: object, additionalProperties: false, properties: { name: { type: string }, email: { type: string, format: email } }, required: [ name, email ] }
|
|
402
|
-
page: { type: string, pattern: '^\\/approve\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' }
|
|
403
|
-
items: { type: array, items: { type: object, additionalProperties: false, properties: { kind: { enum: [ room, app ] }, name: { type: string }, state: { enum: [ offerable, held, accepted, declined, superseded ] }, level: { enum: [ search, open, keep ] }, operations: { type: array, items: { type: string, enum: [ write, delete, export, manageAccess ] } }, roles: { type: array, items: { type: string } }, origins: { type: array, items: { type: string, format: uri } } }, required: [ kind, name, state, operations ] } }
|
|
404
|
-
pack: { type: array, items: { type: object, additionalProperties: false, properties: { app: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }, slot: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' }, room: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] } }, required: [ app, slot, room ] } }
|
|
405
|
-
created: { type: string, format: date-time }
|
|
406
|
-
expires: { type: string, format: date-time }
|
|
407
|
-
required: [ reflected, share, from, page, created, expires ]
|
|
408
|
-
house-site:
|
|
409
|
-
description: "One Site this User owns: its \`name\`, its address under this environment's Site suffix, its own \`app\` with that App's tab icon as a Site shows it, the running \`release\` of that App, which the Site serves, by \`release\` and \`sequence\`, its title and \`intake_room\`, the Intake Room by its \`room\`, whether an operator disabled it, its mode, and every Room slot of that release in its order. Each slot names its \`slot\` and as \`entries\` each Room its list holds, in list order, by its \`room\`, with that entry's address \`segment\` and the last \`compatibility\` outcome of that entry; a slot that lists no Room has no entry. Each finding names its \`slot\`, its \`room\` and one exact structural \`finding\` of that Room against the slot. An incompatible entry stays listed and blocks nothing. \`release\` is absent until that App's first release. \`disabled\` is \`yes\` while an operator holds the Site disabled, and \`disabled_reason\` carries the reason the operator stated; visitors then find the Site unavailable, this User may still change or delete it, and only an operator enables it again. \`mode\` is \`snapshot\` while visitors see the Published Snapshot \`publication\` names, or \`live\` while they see what its Rooms hold as it changes, which needs Full House; only this User changes it. \`unpublished\` is \`yes\` while this User holds the Site unpublished: visitors then find it unavailable at every address and nothing else changes, and only this User's republication serves it again; an operator's enable never does. \`suspended\` is \`yes\` while visitors find the Site unavailable at every address for the reason \`suspended_reason\` names: \`full_house_required\` while the Site is \`live\` and this User lacks Full House, or \`public_delivery_limit\` while what House's server sent for this User's Sites this UTC month has reached this User's Public delivery limit, unless \`public_overage\` is \`on\` while this User holds Full House. A suspension keeps the publication, the addresses, the Custom domains and every act of this User's, and ends by itself at the next UTC month, when this User gains Full House or when \`public_overage\` turns \`on\` while this User holds Full House; it lifts no Unpublish and no operator's disable. \`public_overage\` is \`on\` while this User keeps the Site serving past the Public delivery limit, which it does only while this User holds Full House; what it sends past the limit is charged as overage. It stays \`on\` when Full House ends and acts again when Full House returns. \`publication\` is the Published Snapshot the Site serves, or serves once republished, absent while it holds none. \`acts\` names the publication acts this User may take now: \`unpublish\` while the Site is published, \`republish\` while it is unpublished and holds a publication to serve; Publish data also serves an unpublished Site again, with what its Rooms hold. A cleared title is absent. \`description\` carries presentation. \`screenshot\` is the address of the image House captured of the Site at its primary address after a release, which a shared link to the Site shows, absent before the first capture. \`analytics\` is the owner's measurement ID the Site loads its analytics tag with, absent while unset. \`indexing\` is the search-engines-and-agents switch: while it is \`yes\`, the Site serves its documents as Markdown and lists them in its indexes. \`entry_fallback\` names the last time this release's Entry Data Contract could not serve an Entry Page as HTML: its \`cause\` (\`over_bound\`, \`query_refused\` or \`unavailable\`), the \`route\` and when it was \`recorded\`; that page then started the App as usual. \`external_origins\` names the declared external origins of that release. \`notify_me\` is \`on\` while the Site's notification Trigger is present and enabled in its Intake Room. \`addresses\` lists every address the Site answers at: its address under the Site suffix and each active Custom domain; every address other than \`primary_address\` redirects to it. Each \`domains\` entry names one Custom domain's \`host\`, its \`state\`, \`pending\`, \`active\` or \`failed\`, the DNS alias target its hostname must point at as \`dns_target\`, which is this environment's and the same for every domain, and the edge's \`reason\` when it gives one."
|
|
410
|
-
properties:
|
|
411
|
-
reflected: { type: string, format: date-time }
|
|
412
|
-
site: { $ref: '#/$defs/id' }
|
|
413
|
-
name: { type: string }
|
|
414
|
-
address: { type: string, format: uri }
|
|
415
|
-
addresses: { type: array, items: { type: string, format: uri } }
|
|
416
|
-
primary_address: { type: string, format: uri }
|
|
417
|
-
domains: { type: array, items: { type: object, additionalProperties: false, properties: { host: { type: string }, state: { enum: [ pending, active, failed ] }, dns_target: { type: string }, reason: { type: string } }, required: [ host, state, dns_target ] } }
|
|
418
|
-
app: { $ref: '#/$defs/app' }
|
|
419
|
-
tab_icon_light: { type: string, pattern: ^data:image\\/ }
|
|
420
|
-
tab_icon_dark: { type: string, pattern: ^data:image\\/ }
|
|
421
|
-
tab_icon_colours: { type: array, items: { type: string, pattern: '^#[0-9a-f]{6}$' } }
|
|
422
|
-
tab_icon_blend: { enum: [ linear, radial ] }
|
|
423
|
-
tab_icon_angle: { type: integer, minimum: 0, maximum: 359 }
|
|
424
|
-
release: { type: object, additionalProperties: false, properties: { release: { $ref: '#/$defs/id' }, sequence: { type: integer, exclusiveMinimum: 0 } }, required: [ release, sequence ] }
|
|
425
|
-
title: { type: string }
|
|
426
|
-
description: { type: string }
|
|
427
|
-
screenshot: { type: string, format: uri }
|
|
428
|
-
analytics: { type: string, pattern: '^G-[A-Z0-9]{1,32}$' }
|
|
429
|
-
intake_room: { type: object, additionalProperties: false, properties: { room: { $ref: '#/$defs/room' } }, required: [ room ] }
|
|
430
|
-
external_origins: { type: array, items: { type: string, format: uri } }
|
|
431
|
-
disabled: { enum: [ yes, no ] }
|
|
432
|
-
disabled_reason: { type: string }
|
|
433
|
-
mode: { enum: [ snapshot, live ] }
|
|
434
|
-
unpublished: { enum: [ yes, no ] }
|
|
435
|
-
suspended: { enum: [ yes, no ] }
|
|
436
|
-
suspended_reason: { type: string, enum: [ full_house_required, public_delivery_limit ] }
|
|
437
|
-
public_overage: { enum: [ on, off ] }
|
|
438
|
-
publication: { $ref: '#/$defs/id' }
|
|
439
|
-
acts: { type: array, items: { type: string, enum: [ unpublish, republish ] } }
|
|
440
|
-
indexing: { enum: [ yes, no ] }
|
|
441
|
-
entry_fallback: { type: object, additionalProperties: false, properties: { cause: { enum: [ over_bound, query_refused, unavailable ] }, route: { type: string }, recorded: { type: string, format: date-time } }, required: [ cause, route, recorded ] }
|
|
442
|
-
created: { type: string, format: date-time }
|
|
443
|
-
new_browsers: { type: integer, minimum: 0 }
|
|
444
|
-
submissions: { type: integer, minimum: 0 }
|
|
445
|
-
notify_me: { enum: [ on, off ] }
|
|
446
|
-
image_copies: { type: integer, minimum: 0 }
|
|
447
|
-
image_copy_bound: { type: integer, minimum: 0 }
|
|
448
|
-
image_copy_limit_reached: { enum: [ yes, no ] }
|
|
449
|
-
slots: { type: array, items: { type: object, additionalProperties: false, properties: { slot: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' }, entries: { type: array, items: { type: object, additionalProperties: false, properties: { room: { $ref: '#/$defs/room' }, segment: { type: string }, compatibility: { enum: [ unchecked, compatible, incompatible ] } }, required: [ room, segment, compatibility ] } } }, required: [ slot, entries ] } }
|
|
450
|
-
findings: { type: array, items: { type: object, additionalProperties: false, properties: { slot: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' }, room: { $ref: '#/$defs/room' }, finding: { type: string } }, required: [ slot, room, finding ] } }
|
|
451
|
-
required: [ reflected, site, name, address, primary_address, app, disabled, mode, unpublished, suspended, public_overage, indexing, created, new_browsers, submissions, notify_me, image_copies, image_copy_bound, image_copy_limit_reached ]
|
|
452
|
-
house-trigger:
|
|
453
|
-
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\` through its \`routine_access\`; a \`function\` action runs the \`function\` its \`app\`'s latest release declares, on House's servers. Whether an action's target holds is not written: it follows from the Room's members, the Routine Access and the App's latest release."
|
|
454
|
-
properties:
|
|
455
|
-
reflected: { type: string, format: date-time }
|
|
456
|
-
trigger: { $ref: '#/$defs/id' }
|
|
457
|
-
description: { type: string }
|
|
458
|
-
condition:
|
|
459
|
-
anyOf:
|
|
460
|
-
- { type: object, additionalProperties: false, properties: { on: { const: documents }, scope: { $ref: '#/$defs/trigger_scope' }, mode: { const: starts_matching }, new_documents: { type: boolean }, match: { $ref: '#/$defs/trigger_test' }, by: { $ref: '#/$defs/trigger_test' }, moved_between_rooms: { type: boolean } }, required: [ on, scope, mode, new_documents, match ] }
|
|
461
|
-
- { type: object, additionalProperties: false, properties: { on: { const: documents }, scope: { $ref: '#/$defs/trigger_scope' }, mode: { const: field_changes }, field: { type: string }, from: { anyOf: [ { $ref: '#/$defs/trigger_values' }, { const: new } ] }, to: { anyOf: [ { $ref: '#/$defs/trigger_values' }, { const: deleted } ] }, match: { $ref: '#/$defs/trigger_test' }, by: { $ref: '#/$defs/trigger_test' }, moved_between_rooms: { type: boolean } }, required: [ on, scope, mode, field ] }
|
|
462
|
-
- { type: object, additionalProperties: false, properties: { on: { const: items }, source: { type: string }, address: { type: string }, match: { $ref: '#/$defs/trigger_test' } }, required: [ on ] }
|
|
463
|
-
- { type: object, additionalProperties: false, properties: { on: { const: clock }, cron: { type: string }, time_zone: { type: string } }, required: [ on, cron, time_zone ] }
|
|
464
|
-
- { type: object, additionalProperties: false, properties: { on: { const: clock }, scope: { type: object, additionalProperties: false, properties: { type: { type: string } }, required: [ type ] }, date: { type: string }, days: { type: integer }, at: { type: string }, time_zone: { type: string }, match: { $ref: '#/$defs/trigger_test' } }, required: [ on, scope, date, days, at, time_zone ] }
|
|
465
|
-
actions:
|
|
466
|
-
type: array
|
|
467
|
-
items:
|
|
468
|
-
anyOf:
|
|
469
|
-
- { type: object, additionalProperties: false, properties: { kind: { const: notify }, enabled: { type: boolean }, title: { type: string }, text: { type: string }, to: { type: object, additionalProperties: false, properties: { users: { type: array, items: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' } }, required: [ user ] } }, fields: { type: array, items: { type: string } }, roles: { type: array, items: { type: string } } }, required: [ users, fields, roles ] } }, required: [ kind, enabled, title, text, to ] }
|
|
470
|
-
- { type: object, additionalProperties: false, properties: { kind: { const: routine }, enabled: { type: boolean }, routine_access: { $ref: '#/$defs/id' }, payload: { type: string } }, required: [ kind, enabled, payload ] }
|
|
471
|
-
- { type: object, additionalProperties: false, properties: { kind: { const: function }, enabled: { type: boolean }, app: { $ref: '#/$defs/app' }, function: { type: string } }, required: [ kind, enabled, app, function ] }
|
|
472
|
-
enabled: { type: boolean }
|
|
473
|
-
paused_by: { enum: [ types ] }
|
|
474
|
-
creator: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ user, name ] }
|
|
475
|
-
created: { type: string, format: date-time }
|
|
476
|
-
required: [ reflected, trigger, description, condition, actions, enabled, creator, created ]
|
|
477
|
-
house-web-wizard:
|
|
478
|
-
description: "One Web Wizard an agent made for this User: the \`environment\` it runs on, with that Environment's \`name\`, and its \`state\`, \`waiting\` until its owner presses Run, \`running\`, \`finished\` with the script's \`exit_code\`, \`failed\`, \`cancelled\` when its page closed before the script ended, or \`lapsed\` when nobody ran it in its time. Its body is the script, whole, in one fenced code block. The terminal's output is never kept."
|
|
479
|
-
properties:
|
|
480
|
-
reflected: { type: string, format: date-time }
|
|
481
|
-
web_wizard: { $ref: '#/$defs/id' }
|
|
482
|
-
environment: { type: object, additionalProperties: false, properties: { environment: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ environment, name ] }
|
|
483
|
-
state: { enum: [ waiting, running, finished, failed, cancelled, lapsed ] }
|
|
484
|
-
exit_code: { type: integer }
|
|
485
|
-
required: [ reflected, web_wizard, environment, state ]
|
|
486
|
-
`;
|
|
1
|
+
export const HOUSE_MODEL_DECLARATION = {
|
|
2
|
+
$defs: {
|
|
3
|
+
room: {
|
|
4
|
+
description: 'A Room, by its Room reference, under the key `room`.',
|
|
5
|
+
type: 'string',
|
|
6
|
+
pattern: '^r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
|
|
7
|
+
},
|
|
8
|
+
app: {
|
|
9
|
+
description: 'An App, by its App reference, under the key `app`.',
|
|
10
|
+
type: 'string',
|
|
11
|
+
pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
|
|
12
|
+
},
|
|
13
|
+
document: {
|
|
14
|
+
description: 'A document of a Room, by its file reference, under the key `document`.',
|
|
15
|
+
type: 'string',
|
|
16
|
+
pattern: '^af_([123456789abcdefghjkmnpqrstvwxyz][0123456789abcdefghjkmnpqrstvwxyz]*)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
|
|
17
|
+
},
|
|
18
|
+
id: {
|
|
19
|
+
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
|
+
type: 'string',
|
|
21
|
+
format: 'uuid',
|
|
22
|
+
},
|
|
23
|
+
namespace: {
|
|
24
|
+
description: 'The Namespace a grant entry covers, an App or a Room by its reference with the area of it.',
|
|
25
|
+
type: 'string',
|
|
26
|
+
maxLength: 512,
|
|
27
|
+
pattern: '^(?:a_[A-Za-z0-9._-]+(?:\\/source)?|r_[A-Za-z0-9._-]+(?:\\/(?:settings|settings\\/schema|settings\\/model|settings\\/indexing|content))?)$',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
'house-app-preferences': {
|
|
31
|
+
description: "An App's preferences. Its own vocabulary is in the body.",
|
|
32
|
+
properties: { app: { $ref: '#/$defs/app' } },
|
|
33
|
+
required: ['app'],
|
|
34
|
+
},
|
|
35
|
+
'house-notification': {
|
|
36
|
+
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 state belongs to each browser.",
|
|
37
|
+
properties: {
|
|
38
|
+
notification: { $ref: '#/$defs/id' },
|
|
39
|
+
kind: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
enum: [
|
|
42
|
+
'share-offer',
|
|
43
|
+
'join-request',
|
|
44
|
+
'join-request-approved',
|
|
45
|
+
'app-room-binding-incompatible',
|
|
46
|
+
'app-call',
|
|
47
|
+
'room-ownership-offer',
|
|
48
|
+
'managed-environment-retention-opened',
|
|
49
|
+
'managed-environment-placement-intervention',
|
|
50
|
+
'storage-full',
|
|
51
|
+
'sandbox-budget-spent',
|
|
52
|
+
'break-glass-owner-disclosure',
|
|
53
|
+
'agent-function-start-approval-request',
|
|
54
|
+
'export-ready',
|
|
55
|
+
'export-failed',
|
|
56
|
+
'site-disabled',
|
|
57
|
+
'site-binding-incompatible',
|
|
58
|
+
'site-images-full',
|
|
59
|
+
'custom',
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
created: { type: 'string', format: 'date-time' },
|
|
63
|
+
way_in: {
|
|
64
|
+
type: 'object',
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
properties: {
|
|
67
|
+
path: { type: 'string', pattern: '^\\/' },
|
|
68
|
+
room: { $ref: '#/$defs/room' },
|
|
69
|
+
app: { $ref: '#/$defs/app' },
|
|
70
|
+
environment: { $ref: '#/$defs/id' },
|
|
71
|
+
trigger: { $ref: '#/$defs/id' },
|
|
72
|
+
site: { $ref: '#/$defs/id' },
|
|
73
|
+
},
|
|
74
|
+
minProperties: 1,
|
|
75
|
+
},
|
|
76
|
+
subject: { type: 'string' },
|
|
77
|
+
share: { $ref: '#/$defs/id' },
|
|
78
|
+
issuer: {
|
|
79
|
+
type: 'object',
|
|
80
|
+
additionalProperties: false,
|
|
81
|
+
properties: { name: { type: 'string' }, email: { type: 'string', format: 'email' } },
|
|
82
|
+
required: ['name', 'email'],
|
|
83
|
+
},
|
|
84
|
+
rooms: {
|
|
85
|
+
type: 'array',
|
|
86
|
+
items: {
|
|
87
|
+
type: 'object',
|
|
88
|
+
additionalProperties: false,
|
|
89
|
+
properties: { name: { type: 'string' } },
|
|
90
|
+
required: ['name'],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
apps: {
|
|
94
|
+
maxItems: 20,
|
|
95
|
+
type: 'array',
|
|
96
|
+
items: {
|
|
97
|
+
type: 'object',
|
|
98
|
+
additionalProperties: false,
|
|
99
|
+
properties: {
|
|
100
|
+
name: { type: 'string', minLength: 1, maxLength: 200 },
|
|
101
|
+
reaches: { type: 'array', items: { type: 'string', minLength: 1, maxLength: 512 } },
|
|
102
|
+
},
|
|
103
|
+
required: ['name', 'reaches'],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
expires_at: { type: 'string', format: 'date-time' },
|
|
107
|
+
join_request: { $ref: '#/$defs/id' },
|
|
108
|
+
user: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
additionalProperties: false,
|
|
111
|
+
properties: { name: { type: 'string' }, email: { type: 'string', format: 'email' } },
|
|
112
|
+
required: ['name', 'email'],
|
|
113
|
+
},
|
|
114
|
+
room: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
additionalProperties: false,
|
|
117
|
+
properties: { room: { $ref: '#/$defs/room' }, name: { type: 'string' } },
|
|
118
|
+
minProperties: 1,
|
|
119
|
+
},
|
|
120
|
+
app: {
|
|
121
|
+
type: 'object',
|
|
122
|
+
additionalProperties: false,
|
|
123
|
+
properties: { app: { $ref: '#/$defs/app' }, name: { type: 'string' } },
|
|
124
|
+
minProperties: 1,
|
|
125
|
+
},
|
|
126
|
+
release: { type: 'integer', minimum: 1 },
|
|
127
|
+
binding: { $ref: '#/$defs/id' },
|
|
128
|
+
slot: { type: 'string' },
|
|
129
|
+
findings: { type: 'array', items: { type: 'string' } },
|
|
130
|
+
caller: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
additionalProperties: false,
|
|
133
|
+
properties: { user: { $ref: '#/$defs/id' }, name: { type: 'string' } },
|
|
134
|
+
required: ['user', 'name'],
|
|
135
|
+
},
|
|
136
|
+
ownership_offer: { $ref: '#/$defs/id' },
|
|
137
|
+
offerer: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
additionalProperties: false,
|
|
140
|
+
properties: { name: { type: 'string' }, email: { type: 'string', format: 'email' } },
|
|
141
|
+
required: ['name', 'email'],
|
|
142
|
+
},
|
|
143
|
+
environment: {
|
|
144
|
+
type: 'object',
|
|
145
|
+
additionalProperties: false,
|
|
146
|
+
properties: {
|
|
147
|
+
environment: { $ref: '#/$defs/id' },
|
|
148
|
+
name: { type: 'string' },
|
|
149
|
+
kind: { enum: ['vps', 'sandbox'] },
|
|
150
|
+
},
|
|
151
|
+
required: ['environment', 'name'],
|
|
152
|
+
},
|
|
153
|
+
reason: { type: 'string' },
|
|
154
|
+
deadline: { type: 'string', format: 'date-time' },
|
|
155
|
+
operation_kind: { type: 'string' },
|
|
156
|
+
free: {
|
|
157
|
+
type: 'object',
|
|
158
|
+
additionalProperties: false,
|
|
159
|
+
properties: {
|
|
160
|
+
held: { type: 'string', pattern: '^\\d+$' },
|
|
161
|
+
limit: { type: 'string', pattern: '^[1-9]\\d*$' },
|
|
162
|
+
measure: { type: 'string', enum: ['content', 'retained'] },
|
|
163
|
+
},
|
|
164
|
+
required: ['held', 'limit', 'measure'],
|
|
165
|
+
},
|
|
166
|
+
budget: { type: 'string', pattern: '^\\d+(?:\\.\\d+)?$' },
|
|
167
|
+
resets_at: { type: 'string', format: 'date-time' },
|
|
168
|
+
grant: { $ref: '#/$defs/id' },
|
|
169
|
+
category: { type: 'string' },
|
|
170
|
+
access_started_at: { type: 'string', format: 'date-time' },
|
|
171
|
+
access_ended_at: { type: 'string', format: 'date-time' },
|
|
172
|
+
systems: { type: 'array', items: { type: 'string' } },
|
|
173
|
+
case_reference: { type: 'string' },
|
|
174
|
+
agent_function_request: { $ref: '#/$defs/id' },
|
|
175
|
+
requester: {
|
|
176
|
+
type: 'object',
|
|
177
|
+
additionalProperties: false,
|
|
178
|
+
properties: { name: { type: 'string' } },
|
|
179
|
+
required: ['name'],
|
|
180
|
+
},
|
|
181
|
+
agent: {
|
|
182
|
+
type: 'object',
|
|
183
|
+
additionalProperties: false,
|
|
184
|
+
properties: { agent: { $ref: '#/$defs/id' }, name: { type: 'string' } },
|
|
185
|
+
required: ['name'],
|
|
186
|
+
},
|
|
187
|
+
conversation: { $ref: '#/$defs/id' },
|
|
188
|
+
agent_function: {
|
|
189
|
+
type: 'object',
|
|
190
|
+
additionalProperties: false,
|
|
191
|
+
properties: {
|
|
192
|
+
name: { type: 'string' },
|
|
193
|
+
version: { type: 'integer', minimum: 1 },
|
|
194
|
+
},
|
|
195
|
+
required: ['name'],
|
|
196
|
+
},
|
|
197
|
+
export: { $ref: '#/$defs/id' },
|
|
198
|
+
size_bytes: { type: 'integer', minimum: 0 },
|
|
199
|
+
site: {
|
|
200
|
+
type: 'object',
|
|
201
|
+
additionalProperties: false,
|
|
202
|
+
properties: { site: { $ref: '#/$defs/id' }, name: { type: 'string' } },
|
|
203
|
+
required: ['site', 'name'],
|
|
204
|
+
},
|
|
205
|
+
address: { type: 'string', maxLength: 300, format: 'uri' },
|
|
206
|
+
copies: { type: 'integer', minimum: 0 },
|
|
207
|
+
bound: { type: 'integer', minimum: 0 },
|
|
208
|
+
title: { type: 'string' },
|
|
209
|
+
body: { type: 'string' },
|
|
210
|
+
authorship: {
|
|
211
|
+
type: 'object',
|
|
212
|
+
additionalProperties: false,
|
|
213
|
+
properties: {
|
|
214
|
+
kind: { type: 'string', const: 'trigger-action' },
|
|
215
|
+
trigger: { $ref: '#/$defs/id' },
|
|
216
|
+
position: { type: 'integer', minimum: 0 },
|
|
217
|
+
},
|
|
218
|
+
required: ['kind', 'trigger', 'position'],
|
|
219
|
+
},
|
|
220
|
+
path: { type: 'string', maxLength: 4096, pattern: '^\\/.*' },
|
|
221
|
+
},
|
|
222
|
+
required: ['notification', 'kind', 'created', 'way_in', 'subject'],
|
|
223
|
+
},
|
|
224
|
+
'house-panel-preferences': {
|
|
225
|
+
description: "The panel's preferences at /rooms/private/settings/panel.md. Its own vocabulary is in the body.",
|
|
226
|
+
properties: {},
|
|
227
|
+
},
|
|
228
|
+
'house-agent-function': {
|
|
229
|
+
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.",
|
|
230
|
+
properties: {
|
|
231
|
+
reflected: { type: 'string', format: 'date-time' },
|
|
232
|
+
agent_function: { $ref: '#/$defs/id' },
|
|
233
|
+
description: { type: 'string' },
|
|
234
|
+
input: { type: 'string' },
|
|
235
|
+
agent: {
|
|
236
|
+
type: 'object',
|
|
237
|
+
additionalProperties: false,
|
|
238
|
+
properties: { agent: { $ref: '#/$defs/id' }, name: { type: 'string' } },
|
|
239
|
+
required: ['agent', 'name'],
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
required: ['reflected', 'agent_function', 'description', 'input', 'agent'],
|
|
243
|
+
},
|
|
244
|
+
'house-agent-function-document': {
|
|
245
|
+
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, and the `agent` it starts, by identifier. Its body is the instruction that Agent follows.',
|
|
246
|
+
properties: {
|
|
247
|
+
description: { type: 'string', maxLength: 2000, pattern: '\\S' },
|
|
248
|
+
input: { type: 'string' },
|
|
249
|
+
agent: { $ref: '#/$defs/id' },
|
|
250
|
+
},
|
|
251
|
+
required: ['description', 'input', 'agent'],
|
|
252
|
+
},
|
|
253
|
+
'house-trigger': {
|
|
254
|
+
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.",
|
|
255
|
+
properties: {
|
|
256
|
+
reflected: { type: 'string', format: 'date-time' },
|
|
257
|
+
trigger: { $ref: '#/$defs/id' },
|
|
258
|
+
description: { type: 'string' },
|
|
259
|
+
condition: {
|
|
260
|
+
description: 'When it fires, as the Trigger reference page writes it, a document it names at its current path.',
|
|
261
|
+
type: 'object',
|
|
262
|
+
additionalProperties: true,
|
|
263
|
+
},
|
|
264
|
+
actions: {
|
|
265
|
+
type: 'array',
|
|
266
|
+
items: {
|
|
267
|
+
anyOf: [
|
|
268
|
+
{
|
|
269
|
+
type: 'object',
|
|
270
|
+
additionalProperties: false,
|
|
271
|
+
properties: {
|
|
272
|
+
kind: { const: 'notify' },
|
|
273
|
+
enabled: { type: 'boolean' },
|
|
274
|
+
title: { type: 'string' },
|
|
275
|
+
text: { type: 'string' },
|
|
276
|
+
to: {
|
|
277
|
+
type: 'object',
|
|
278
|
+
additionalProperties: false,
|
|
279
|
+
properties: {
|
|
280
|
+
users: {
|
|
281
|
+
type: 'array',
|
|
282
|
+
items: {
|
|
283
|
+
type: 'object',
|
|
284
|
+
additionalProperties: false,
|
|
285
|
+
properties: { user: { $ref: '#/$defs/id' } },
|
|
286
|
+
required: ['user'],
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
fields: { type: 'array', items: { type: 'string' } },
|
|
290
|
+
roles: { type: 'array', items: { type: 'string' } },
|
|
291
|
+
},
|
|
292
|
+
required: ['users', 'fields', 'roles'],
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
required: ['kind', 'enabled', 'title', 'text', 'to'],
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
type: 'object',
|
|
299
|
+
additionalProperties: false,
|
|
300
|
+
properties: {
|
|
301
|
+
kind: { const: 'agent_function' },
|
|
302
|
+
enabled: { type: 'boolean' },
|
|
303
|
+
card: { type: 'string', minLength: 1 },
|
|
304
|
+
payload: { type: 'string' },
|
|
305
|
+
},
|
|
306
|
+
required: ['kind', 'enabled', 'payload'],
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
type: 'object',
|
|
310
|
+
additionalProperties: false,
|
|
311
|
+
properties: {
|
|
312
|
+
kind: { const: 'message' },
|
|
313
|
+
enabled: { type: 'boolean' },
|
|
314
|
+
card: { type: 'string', minLength: 1 },
|
|
315
|
+
text: { type: 'string' },
|
|
316
|
+
},
|
|
317
|
+
required: ['kind', 'enabled', 'text'],
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
type: 'object',
|
|
321
|
+
additionalProperties: false,
|
|
322
|
+
properties: { kind: { const: 'done' }, enabled: { type: 'boolean' } },
|
|
323
|
+
required: ['kind', 'enabled'],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
type: 'object',
|
|
327
|
+
additionalProperties: false,
|
|
328
|
+
properties: {
|
|
329
|
+
kind: { const: 'function' },
|
|
330
|
+
enabled: { type: 'boolean' },
|
|
331
|
+
app: { $ref: '#/$defs/app' },
|
|
332
|
+
function: { type: 'string' },
|
|
333
|
+
},
|
|
334
|
+
required: ['kind', 'enabled', 'function'],
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
enabled: { type: 'boolean' },
|
|
340
|
+
paused_by: { enum: ['types'] },
|
|
341
|
+
creator: {
|
|
342
|
+
type: 'object',
|
|
343
|
+
additionalProperties: false,
|
|
344
|
+
properties: { user: { $ref: '#/$defs/id' }, name: { type: 'string' } },
|
|
345
|
+
required: ['user', 'name'],
|
|
346
|
+
},
|
|
347
|
+
created: { type: 'string', format: 'date-time' },
|
|
348
|
+
},
|
|
349
|
+
required: [
|
|
350
|
+
'reflected',
|
|
351
|
+
'trigger',
|
|
352
|
+
'description',
|
|
353
|
+
'condition',
|
|
354
|
+
'actions',
|
|
355
|
+
'enabled',
|
|
356
|
+
'creator',
|
|
357
|
+
'created',
|
|
358
|
+
],
|
|
359
|
+
},
|
|
360
|
+
'house-web-wizard': {
|
|
361
|
+
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.",
|
|
362
|
+
properties: {
|
|
363
|
+
reflected: { type: 'string', format: 'date-time' },
|
|
364
|
+
web_wizard: { $ref: '#/$defs/id' },
|
|
365
|
+
environment: {
|
|
366
|
+
type: 'object',
|
|
367
|
+
additionalProperties: false,
|
|
368
|
+
properties: { environment: { $ref: '#/$defs/id' }, name: { type: 'string' } },
|
|
369
|
+
required: ['environment', 'name'],
|
|
370
|
+
},
|
|
371
|
+
state: { enum: ['waiting', 'running', 'finished', 'failed', 'cancelled', 'lapsed', 'kept'] },
|
|
372
|
+
exit_code: { type: 'integer' },
|
|
373
|
+
function: { type: 'string' },
|
|
374
|
+
},
|
|
375
|
+
required: ['reflected', 'web_wizard', 'environment', 'state'],
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
function modelText(model) {
|
|
379
|
+
return `${Object.entries(model)
|
|
380
|
+
.map(([name, declared]) => `${name}: ${JSON.stringify(declared)}`)
|
|
381
|
+
.join('\n')}\n`;
|
|
382
|
+
}
|
|
383
|
+
export const HOUSE_MODEL_TYPES = modelText(HOUSE_MODEL_DECLARATION);
|
|
384
|
+
export const HOUSE_TYPED_PATHS = [
|
|
385
|
+
{ path: 'settings/panel.md', type: 'house-panel-preferences', named: true, body: false },
|
|
386
|
+
{ path: 'settings/apps/*.md', type: 'house-app-preferences', named: true, body: false },
|
|
387
|
+
{
|
|
388
|
+
path: 'rooms/*/agent-functions/*.md',
|
|
389
|
+
type: 'house-agent-function-document',
|
|
390
|
+
named: false,
|
|
391
|
+
body: true,
|
|
392
|
+
},
|
|
393
|
+
];
|