@agentshouse/mdruntime-adapter 0.1.0-cc449e4611fbd → 0.1.0-cc65657e82614
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/README.md +2 -2
- package/dist/actions.d.ts +2 -1
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +15 -3
- package/dist/adapter.d.ts +0 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +72 -88
- package/dist/app-reference.d.ts +0 -1
- package/dist/authored-path.d.ts +10 -0
- package/dist/authored-path.d.ts.map +1 -0
- package/dist/authored-path.js +35 -0
- package/dist/chunks.d.ts +37 -0
- package/dist/chunks.d.ts.map +1 -0
- package/dist/chunks.js +247 -0
- package/dist/crockford.d.ts +0 -1
- package/dist/digest.d.ts +0 -1
- package/dist/discovery.d.ts +11 -6
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +39 -13
- package/dist/history.d.ts +1 -7
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +19 -27
- package/dist/house-model.d.ts +252 -314
- package/dist/house-model.d.ts.map +1 -1
- package/dist/house-model.js +234 -251
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/map.d.ts +0 -1
- package/dist/model.d.ts +5 -8
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +30 -18
- package/dist/read.d.ts +19 -14
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +46 -169
- package/dist/refusal.d.ts +1 -1
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +5 -1
- package/dist/room-types.d.ts +0 -3
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +50 -40
- package/dist/search.d.ts +0 -1
- package/dist/search.js +1 -1
- package/dist/session-content/bounds.d.ts +7 -0
- package/dist/session-content/check.d.ts +18 -0
- package/dist/session-content/index.d.ts +7 -0
- package/dist/session-content/parts.d.ts +102 -0
- package/dist/session-content/state.d.ts +61 -0
- package/dist/session-content/turn.d.ts +328 -0
- package/dist/site.d.ts +0 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +38 -50
- package/dist/space-schema.d.ts +6 -0
- package/dist/space-schema.d.ts.map +1 -0
- package/dist/space-schema.js +18 -0
- package/dist/stream.d.ts +6 -5
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +131 -42
- package/dist/transport.d.ts +24 -23
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +13 -14
- package/dist/upload.d.ts +0 -1
- package/dist/version.d.ts +0 -1
- package/dist/write.d.ts +0 -2
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +4 -11
- package/package.json +2 -2
- package/dist/part.d.ts +0 -14
- package/dist/part.d.ts.map +0 -1
- package/dist/part.js +0 -90
- package/dist/room-stream.d.ts +0 -20
- package/dist/room-stream.d.ts.map +0 -1
- package/dist/room-stream.js +0 -78
package/dist/house-model.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { APP_PREFERENCES_HOME } from './authored-path.js';
|
|
1
2
|
export const HOUSE_MODEL_DECLARATION = {
|
|
2
3
|
$defs: {
|
|
3
4
|
room: {
|
|
@@ -10,235 +11,262 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
10
11
|
type: 'string',
|
|
11
12
|
pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
|
|
12
13
|
},
|
|
13
|
-
|
|
14
|
-
description: 'A
|
|
14
|
+
space: {
|
|
15
|
+
description: 'A Space, by its Space reference, under the key `space`.',
|
|
15
16
|
type: 'string',
|
|
16
|
-
pattern: '^
|
|
17
|
+
pattern: '^sp_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
|
|
17
18
|
},
|
|
18
19
|
id: {
|
|
19
20
|
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
|
type: 'string',
|
|
21
22
|
format: 'uuid',
|
|
22
23
|
},
|
|
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
|
-
trigger_test: {
|
|
30
|
-
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
|
-
type: 'object',
|
|
32
|
-
additionalProperties: true,
|
|
33
|
-
},
|
|
34
|
-
trigger_values: {
|
|
35
|
-
type: 'array',
|
|
36
|
-
items: { anyOf: [{ type: 'string' }, { type: 'number' }, { type: 'boolean' }] },
|
|
37
|
-
},
|
|
38
|
-
trigger_scope: {
|
|
39
|
-
description: 'The documents a Trigger condition watches, by `type`, by `folder` or one document at its `path`, which `create_trigger` takes as `document`.',
|
|
40
|
-
type: 'object',
|
|
41
|
-
additionalProperties: false,
|
|
42
|
-
properties: {
|
|
43
|
-
type: { type: 'string' },
|
|
44
|
-
folder: { type: 'string' },
|
|
45
|
-
path: { type: 'string' },
|
|
46
|
-
},
|
|
47
|
-
minProperties: 1,
|
|
48
|
-
maxProperties: 1,
|
|
49
|
-
},
|
|
50
24
|
},
|
|
51
25
|
'house-app-preferences': {
|
|
52
26
|
description: "An App's preferences. Its own vocabulary is in the body.",
|
|
53
|
-
properties: { app: { $ref: '#/$defs/app' } },
|
|
27
|
+
properties: { app: { title: 'App', $ref: '#/$defs/app' } },
|
|
54
28
|
required: ['app'],
|
|
55
29
|
},
|
|
56
30
|
'house-notification': {
|
|
57
|
-
description: "One kept
|
|
31
|
+
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.",
|
|
58
32
|
properties: {
|
|
59
|
-
notification: { $ref: '#/$defs/id' },
|
|
33
|
+
notification: { title: 'Notification', $ref: '#/$defs/id' },
|
|
60
34
|
kind: {
|
|
35
|
+
title: 'Kind',
|
|
61
36
|
type: 'string',
|
|
62
37
|
enum: [
|
|
63
38
|
'share-offer',
|
|
64
39
|
'join-request',
|
|
65
40
|
'join-request-approved',
|
|
66
|
-
'app-room-binding-incompatible',
|
|
67
|
-
'app-call',
|
|
68
41
|
'room-ownership-offer',
|
|
69
42
|
'managed-environment-retention-opened',
|
|
70
|
-
'managed-environment-placement-intervention',
|
|
71
43
|
'storage-full',
|
|
72
44
|
'sandbox-budget-spent',
|
|
45
|
+
'trigger-failed',
|
|
46
|
+
'room-telegram-chat-paused',
|
|
73
47
|
'break-glass-owner-disclosure',
|
|
74
|
-
'routine-start-approval-request',
|
|
75
48
|
'export-ready',
|
|
76
49
|
'export-failed',
|
|
77
|
-
'site-disabled',
|
|
78
|
-
'site-binding-incompatible',
|
|
79
|
-
'site-images-full',
|
|
80
50
|
'custom',
|
|
51
|
+
'agent-function-request-finished',
|
|
81
52
|
],
|
|
82
53
|
},
|
|
83
|
-
created: { type: 'string', format: 'date-time' },
|
|
54
|
+
created: { title: 'Created', type: 'string', format: 'date-time' },
|
|
55
|
+
read: { title: 'Read', type: 'string', format: 'date-time' },
|
|
84
56
|
way_in: {
|
|
57
|
+
title: 'Way in',
|
|
85
58
|
type: 'object',
|
|
86
59
|
additionalProperties: false,
|
|
87
60
|
properties: {
|
|
88
|
-
path: { type: 'string', pattern: '^\\/' },
|
|
89
|
-
room: { $ref: '#/$defs/room' },
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
trigger: { $ref: '#/$defs/id' },
|
|
93
|
-
site: { $ref: '#/$defs/id' },
|
|
61
|
+
path: { title: 'Path', type: 'string', pattern: '^\\/' },
|
|
62
|
+
room: { title: 'Room', $ref: '#/$defs/room' },
|
|
63
|
+
environment: { title: 'Environment', $ref: '#/$defs/id' },
|
|
64
|
+
trigger: { title: 'Trigger', $ref: '#/$defs/id' },
|
|
94
65
|
},
|
|
95
66
|
minProperties: 1,
|
|
96
67
|
},
|
|
97
|
-
subject: { type: 'string' },
|
|
98
|
-
share: { $ref: '#/$defs/id' },
|
|
68
|
+
subject: { title: 'Subject', type: 'string' },
|
|
69
|
+
share: { title: 'Share', $ref: '#/$defs/id' },
|
|
99
70
|
issuer: {
|
|
71
|
+
title: 'Issuer',
|
|
100
72
|
type: 'object',
|
|
101
73
|
additionalProperties: false,
|
|
102
|
-
properties: {
|
|
74
|
+
properties: {
|
|
75
|
+
name: { title: 'Name', type: 'string' },
|
|
76
|
+
email: { title: 'Email', type: 'string', format: 'email' },
|
|
77
|
+
},
|
|
103
78
|
required: ['name', 'email'],
|
|
104
79
|
},
|
|
105
80
|
rooms: {
|
|
81
|
+
title: 'Rooms',
|
|
106
82
|
type: 'array',
|
|
107
83
|
items: {
|
|
108
84
|
type: 'object',
|
|
109
85
|
additionalProperties: false,
|
|
110
|
-
properties: { name: { type: 'string' } },
|
|
86
|
+
properties: { name: { title: 'Name', type: 'string' } },
|
|
111
87
|
required: ['name'],
|
|
112
88
|
},
|
|
113
89
|
},
|
|
114
90
|
apps: {
|
|
115
|
-
|
|
91
|
+
title: 'Apps',
|
|
116
92
|
type: 'array',
|
|
117
93
|
items: {
|
|
118
94
|
type: 'object',
|
|
119
95
|
additionalProperties: false,
|
|
120
96
|
properties: {
|
|
121
|
-
name: { type: 'string', minLength: 1, maxLength: 200 },
|
|
122
|
-
reaches: {
|
|
97
|
+
name: { title: 'Name', type: 'string', minLength: 1, maxLength: 200 },
|
|
98
|
+
reaches: {
|
|
99
|
+
title: 'Reaches',
|
|
100
|
+
type: 'array',
|
|
101
|
+
items: { type: 'string', minLength: 1, maxLength: 512 },
|
|
102
|
+
},
|
|
123
103
|
},
|
|
124
104
|
required: ['name', 'reaches'],
|
|
125
105
|
},
|
|
126
106
|
},
|
|
127
|
-
|
|
128
|
-
|
|
107
|
+
spaces: {
|
|
108
|
+
title: 'Spaces',
|
|
109
|
+
type: 'array',
|
|
110
|
+
items: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
properties: { name: { title: 'Name', type: 'string' } },
|
|
114
|
+
required: ['name'],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
expires_at: { title: 'Expires at', type: 'string', format: 'date-time' },
|
|
118
|
+
join_request: { title: 'Join request', $ref: '#/$defs/id' },
|
|
129
119
|
user: {
|
|
120
|
+
title: 'User',
|
|
130
121
|
type: 'object',
|
|
131
122
|
additionalProperties: false,
|
|
132
|
-
properties: {
|
|
133
|
-
|
|
123
|
+
properties: {
|
|
124
|
+
name: { title: 'Name', type: 'string' },
|
|
125
|
+
email: { title: 'Email', type: 'string', format: 'email' },
|
|
126
|
+
},
|
|
127
|
+
required: ['name'],
|
|
134
128
|
},
|
|
135
129
|
room: {
|
|
130
|
+
title: 'Room',
|
|
136
131
|
type: 'object',
|
|
137
132
|
additionalProperties: false,
|
|
138
|
-
properties: {
|
|
133
|
+
properties: {
|
|
134
|
+
room: { title: 'Room', $ref: '#/$defs/room' },
|
|
135
|
+
name: { title: 'Name', type: 'string' },
|
|
136
|
+
},
|
|
139
137
|
minProperties: 1,
|
|
140
138
|
},
|
|
141
139
|
app: {
|
|
140
|
+
title: 'App',
|
|
142
141
|
type: 'object',
|
|
143
142
|
additionalProperties: false,
|
|
144
|
-
properties: { app: { $ref: '#/$defs/app' }
|
|
145
|
-
|
|
143
|
+
properties: { app: { title: 'App', $ref: '#/$defs/app' } },
|
|
144
|
+
required: ['app'],
|
|
146
145
|
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
slot: { type: 'string' },
|
|
150
|
-
findings: { type: 'array', items: { type: 'string' } },
|
|
151
|
-
caller: {
|
|
146
|
+
space: {
|
|
147
|
+
title: 'Space',
|
|
152
148
|
type: 'object',
|
|
153
149
|
additionalProperties: false,
|
|
154
|
-
properties: {
|
|
155
|
-
required: ['
|
|
150
|
+
properties: { space: { title: 'Space', $ref: '#/$defs/space' } },
|
|
151
|
+
required: ['space'],
|
|
156
152
|
},
|
|
157
|
-
ownership_offer: { $ref: '#/$defs/id' },
|
|
153
|
+
ownership_offer: { title: 'Ownership offer', $ref: '#/$defs/id' },
|
|
158
154
|
offerer: {
|
|
155
|
+
title: 'Offerer',
|
|
159
156
|
type: 'object',
|
|
160
157
|
additionalProperties: false,
|
|
161
|
-
properties: {
|
|
158
|
+
properties: {
|
|
159
|
+
name: { title: 'Name', type: 'string' },
|
|
160
|
+
email: { title: 'Email', type: 'string', format: 'email' },
|
|
161
|
+
},
|
|
162
162
|
required: ['name', 'email'],
|
|
163
163
|
},
|
|
164
164
|
environment: {
|
|
165
|
+
title: 'Environment',
|
|
165
166
|
type: 'object',
|
|
166
167
|
additionalProperties: false,
|
|
167
168
|
properties: {
|
|
168
|
-
environment: { $ref: '#/$defs/id' },
|
|
169
|
-
name: { type: 'string' },
|
|
170
|
-
kind: { enum: ['vps', 'sandbox'] },
|
|
169
|
+
environment: { title: 'Environment', $ref: '#/$defs/id' },
|
|
170
|
+
name: { title: 'Name', type: 'string' },
|
|
171
|
+
kind: { title: 'Kind', enum: ['vps', 'sandbox'] },
|
|
171
172
|
},
|
|
172
173
|
required: ['environment', 'name'],
|
|
173
174
|
},
|
|
174
|
-
reason: { type: 'string' },
|
|
175
|
-
deadline: { type: 'string', format: 'date-time' },
|
|
176
|
-
operation_kind: { type: 'string' },
|
|
175
|
+
reason: { title: 'Reason', type: 'string' },
|
|
176
|
+
deadline: { title: 'Deadline', type: 'string', format: 'date-time' },
|
|
177
177
|
free: {
|
|
178
|
+
title: 'Free',
|
|
178
179
|
type: 'object',
|
|
179
180
|
additionalProperties: false,
|
|
180
181
|
properties: {
|
|
181
|
-
held: { type: 'string', pattern: '^\\d+$' },
|
|
182
|
-
limit: { type: 'string', pattern: '^[1-9]\\d*$' },
|
|
183
|
-
measure: { type: 'string', enum: ['content', 'retained'] },
|
|
182
|
+
held: { title: 'Held', type: 'string', pattern: '^\\d+$' },
|
|
183
|
+
limit: { title: 'Limit', type: 'string', pattern: '^[1-9]\\d*$' },
|
|
184
|
+
measure: { title: 'Measure', type: 'string', enum: ['content', 'retained'] },
|
|
184
185
|
},
|
|
185
186
|
required: ['held', 'limit', 'measure'],
|
|
186
187
|
},
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
188
|
+
chat: { title: 'Chat', type: 'string' },
|
|
189
|
+
missing: {
|
|
190
|
+
title: 'Missing',
|
|
191
|
+
type: 'array',
|
|
192
|
+
items: {
|
|
193
|
+
type: 'string',
|
|
194
|
+
enum: [
|
|
195
|
+
'private',
|
|
196
|
+
'topics',
|
|
197
|
+
'ban_users',
|
|
198
|
+
'invite_users',
|
|
199
|
+
'manage_topics',
|
|
200
|
+
'post_messages',
|
|
201
|
+
'edit_messages',
|
|
202
|
+
'inbox_manage_topics',
|
|
203
|
+
'inbox_delete_messages',
|
|
204
|
+
],
|
|
205
|
+
},
|
|
201
206
|
},
|
|
202
|
-
|
|
207
|
+
budget: { title: 'Budget', type: 'string', pattern: '^\\d+(?:\\.\\d+)?$' },
|
|
208
|
+
resets_at: { title: 'Resets at', type: 'string', format: 'date-time' },
|
|
209
|
+
grant: { title: 'Grant', $ref: '#/$defs/id' },
|
|
210
|
+
category: { title: 'Category', type: 'string' },
|
|
211
|
+
access_started_at: { title: 'Access started at', type: 'string', format: 'date-time' },
|
|
212
|
+
access_ended_at: { title: 'Access ended at', type: 'string', format: 'date-time' },
|
|
213
|
+
systems: { title: 'Systems', type: 'array', items: { type: 'string' } },
|
|
214
|
+
case_reference: { title: 'Case reference', type: 'string' },
|
|
215
|
+
export: { title: 'Export', $ref: '#/$defs/id' },
|
|
216
|
+
size_bytes: { title: 'Size in bytes', type: 'integer', minimum: 0 },
|
|
217
|
+
title: { title: 'Title', type: 'string' },
|
|
218
|
+
body: { title: 'Body', type: 'string' },
|
|
219
|
+
authorship: {
|
|
220
|
+
title: 'Authorship',
|
|
203
221
|
type: 'object',
|
|
204
222
|
additionalProperties: false,
|
|
205
|
-
properties: {
|
|
206
|
-
|
|
223
|
+
properties: {
|
|
224
|
+
kind: { title: 'Kind', type: 'string', const: 'trigger-action' },
|
|
225
|
+
trigger: { title: 'Trigger', $ref: '#/$defs/id' },
|
|
226
|
+
position: { title: 'Position', type: 'integer', minimum: 0 },
|
|
227
|
+
},
|
|
228
|
+
required: ['kind', 'trigger', 'position'],
|
|
207
229
|
},
|
|
208
|
-
|
|
209
|
-
|
|
230
|
+
path: { title: 'Path', type: 'string', maxLength: 4096, pattern: '^\\/.*' },
|
|
231
|
+
trigger: {
|
|
232
|
+
title: 'Trigger',
|
|
210
233
|
type: 'object',
|
|
211
234
|
additionalProperties: false,
|
|
212
235
|
properties: {
|
|
213
|
-
|
|
214
|
-
|
|
236
|
+
trigger: { title: 'Trigger', $ref: '#/$defs/id' },
|
|
237
|
+
description: { title: 'Description', type: 'string' },
|
|
215
238
|
},
|
|
216
|
-
required: ['
|
|
239
|
+
required: ['trigger', 'description'],
|
|
217
240
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
241
|
+
code: {
|
|
242
|
+
title: 'Code',
|
|
243
|
+
type: 'string',
|
|
244
|
+
enum: [
|
|
245
|
+
'failed',
|
|
246
|
+
'function_failed',
|
|
247
|
+
'function_not_started',
|
|
248
|
+
'agent_function_request_not_started',
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
action: { title: 'Action', type: 'integer', minimum: 0 },
|
|
252
|
+
moment: { title: 'Moment', type: 'string', format: 'date-time' },
|
|
253
|
+
error: { title: 'Error', type: 'string' },
|
|
254
|
+
agent_function: {
|
|
255
|
+
title: 'Agent function',
|
|
221
256
|
type: 'object',
|
|
222
257
|
additionalProperties: false,
|
|
223
|
-
properties: {
|
|
224
|
-
required: ['
|
|
258
|
+
properties: { name: { title: 'Name', type: 'string' } },
|
|
259
|
+
required: ['name'],
|
|
225
260
|
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
bound: { type: 'integer', minimum: 0 },
|
|
229
|
-
title: { type: 'string' },
|
|
230
|
-
body: { type: 'string' },
|
|
231
|
-
authorship: {
|
|
261
|
+
agent: {
|
|
262
|
+
title: 'Agent',
|
|
232
263
|
type: 'object',
|
|
233
264
|
additionalProperties: false,
|
|
234
|
-
properties: {
|
|
235
|
-
|
|
236
|
-
trigger: { $ref: '#/$defs/id' },
|
|
237
|
-
position: { type: 'integer', minimum: 0 },
|
|
238
|
-
},
|
|
239
|
-
required: ['kind', 'trigger', 'position'],
|
|
265
|
+
properties: { name: { title: 'Name', type: 'string' } },
|
|
266
|
+
required: ['name'],
|
|
240
267
|
},
|
|
241
|
-
|
|
268
|
+
ended: { title: 'Ended', type: 'string', enum: ['finished', 'failed'] },
|
|
269
|
+
duration: { title: 'Duration', type: 'integer', minimum: 1 },
|
|
242
270
|
},
|
|
243
271
|
required: ['notification', 'kind', 'created', 'way_in', 'subject'],
|
|
244
272
|
},
|
|
@@ -246,121 +274,50 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
246
274
|
description: "The panel's preferences at /rooms/private/settings/panel.md. Its own vocabulary is in the body.",
|
|
247
275
|
properties: {},
|
|
248
276
|
},
|
|
249
|
-
'house-
|
|
250
|
-
description: "One
|
|
277
|
+
'house-agent-function': {
|
|
278
|
+
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.",
|
|
251
279
|
properties: {
|
|
252
|
-
reflected: { type: 'string', format: 'date-time' },
|
|
253
|
-
|
|
254
|
-
description: { type: 'string' },
|
|
255
|
-
input: { type: 'string' },
|
|
280
|
+
reflected: { title: 'Reflected', type: 'string', format: 'date-time' },
|
|
281
|
+
agent_function: { title: 'Agent function', $ref: '#/$defs/id' },
|
|
282
|
+
description: { title: 'Description', type: 'string' },
|
|
283
|
+
input: { title: 'Input', type: 'string' },
|
|
256
284
|
agent: {
|
|
285
|
+
title: 'Agent',
|
|
257
286
|
type: 'object',
|
|
258
287
|
additionalProperties: false,
|
|
259
|
-
properties: {
|
|
288
|
+
properties: {
|
|
289
|
+
agent: { title: 'Agent', $ref: '#/$defs/id' },
|
|
290
|
+
name: { title: 'Name', type: 'string' },
|
|
291
|
+
},
|
|
260
292
|
required: ['agent', 'name'],
|
|
261
293
|
},
|
|
262
294
|
},
|
|
263
|
-
required: ['reflected', '
|
|
295
|
+
required: ['reflected', 'agent_function', 'description', 'input', 'agent'],
|
|
296
|
+
},
|
|
297
|
+
'house-agent-function-document': {
|
|
298
|
+
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.',
|
|
299
|
+
properties: {
|
|
300
|
+
description: { title: 'Description', type: 'string', maxLength: 2000, pattern: '\\S' },
|
|
301
|
+
input: { title: 'Input', type: 'string' },
|
|
302
|
+
agent: { title: 'Agent', $ref: '#/$defs/id' },
|
|
303
|
+
afk: { title: 'AFK', type: 'boolean' },
|
|
304
|
+
},
|
|
305
|
+
required: ['description', 'input', 'agent'],
|
|
264
306
|
},
|
|
265
307
|
'house-trigger': {
|
|
266
|
-
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`;
|
|
308
|
+
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.",
|
|
267
309
|
properties: {
|
|
268
|
-
reflected: { type: 'string', format: 'date-time' },
|
|
269
|
-
trigger: { $ref: '#/$defs/id' },
|
|
270
|
-
description: { type: 'string' },
|
|
310
|
+
reflected: { title: 'Reflected', type: 'string', format: 'date-time' },
|
|
311
|
+
trigger: { title: 'Trigger', $ref: '#/$defs/id' },
|
|
312
|
+
description: { title: 'Description', type: 'string' },
|
|
271
313
|
condition: {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
properties: {
|
|
277
|
-
on: { const: 'documents' },
|
|
278
|
-
scope: { $ref: '#/$defs/trigger_scope' },
|
|
279
|
-
mode: { const: 'starts_matching' },
|
|
280
|
-
new_documents: { type: 'boolean' },
|
|
281
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
282
|
-
by: { $ref: '#/$defs/trigger_test' },
|
|
283
|
-
moved_between_rooms: { type: 'boolean' },
|
|
284
|
-
},
|
|
285
|
-
required: ['on', 'scope', 'mode', 'new_documents', 'match'],
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
type: 'object',
|
|
289
|
-
additionalProperties: false,
|
|
290
|
-
properties: {
|
|
291
|
-
on: { const: 'documents' },
|
|
292
|
-
scope: { $ref: '#/$defs/trigger_scope' },
|
|
293
|
-
mode: { const: 'field_changes' },
|
|
294
|
-
field: { type: 'string' },
|
|
295
|
-
from: { anyOf: [{ $ref: '#/$defs/trigger_values' }, { const: 'new' }] },
|
|
296
|
-
to: { anyOf: [{ $ref: '#/$defs/trigger_values' }, { const: 'deleted' }] },
|
|
297
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
298
|
-
by: { $ref: '#/$defs/trigger_test' },
|
|
299
|
-
moved_between_rooms: { type: 'boolean' },
|
|
300
|
-
},
|
|
301
|
-
required: ['on', 'scope', 'mode', 'field'],
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
type: 'object',
|
|
305
|
-
additionalProperties: false,
|
|
306
|
-
properties: {
|
|
307
|
-
on: { const: 'items' },
|
|
308
|
-
source: { type: 'string' },
|
|
309
|
-
address: { type: 'string' },
|
|
310
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
311
|
-
},
|
|
312
|
-
required: ['on'],
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
type: 'object',
|
|
316
|
-
additionalProperties: false,
|
|
317
|
-
properties: {
|
|
318
|
-
on: { const: 'notifications' },
|
|
319
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
320
|
-
},
|
|
321
|
-
required: ['on'],
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
type: 'object',
|
|
325
|
-
additionalProperties: false,
|
|
326
|
-
properties: {
|
|
327
|
-
on: { const: 'messages' },
|
|
328
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
329
|
-
},
|
|
330
|
-
required: ['on'],
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
type: 'object',
|
|
334
|
-
additionalProperties: false,
|
|
335
|
-
properties: {
|
|
336
|
-
on: { const: 'clock' },
|
|
337
|
-
cron: { type: 'string' },
|
|
338
|
-
time_zone: { type: 'string' },
|
|
339
|
-
},
|
|
340
|
-
required: ['on', 'cron', 'time_zone'],
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
type: 'object',
|
|
344
|
-
additionalProperties: false,
|
|
345
|
-
properties: {
|
|
346
|
-
on: { const: 'clock' },
|
|
347
|
-
scope: {
|
|
348
|
-
type: 'object',
|
|
349
|
-
additionalProperties: false,
|
|
350
|
-
properties: { type: { type: 'string' } },
|
|
351
|
-
required: ['type'],
|
|
352
|
-
},
|
|
353
|
-
date: { type: 'string' },
|
|
354
|
-
days: { type: 'integer' },
|
|
355
|
-
at: { type: 'string' },
|
|
356
|
-
time_zone: { type: 'string' },
|
|
357
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
358
|
-
},
|
|
359
|
-
required: ['on', 'scope', 'date', 'days', 'at', 'time_zone'],
|
|
360
|
-
},
|
|
361
|
-
],
|
|
314
|
+
title: 'Condition',
|
|
315
|
+
description: 'When it fires, as the Trigger reference page writes it, a document it names at its current path.',
|
|
316
|
+
type: 'object',
|
|
317
|
+
additionalProperties: true,
|
|
362
318
|
},
|
|
363
319
|
actions: {
|
|
320
|
+
title: 'Actions',
|
|
364
321
|
type: 'array',
|
|
365
322
|
items: {
|
|
366
323
|
anyOf: [
|
|
@@ -368,25 +325,27 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
368
325
|
type: 'object',
|
|
369
326
|
additionalProperties: false,
|
|
370
327
|
properties: {
|
|
371
|
-
kind: { const: 'notify' },
|
|
372
|
-
enabled: { type: 'boolean' },
|
|
373
|
-
title: { type: 'string' },
|
|
374
|
-
text: { type: 'string' },
|
|
328
|
+
kind: { title: 'Kind', const: 'notify' },
|
|
329
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
330
|
+
title: { title: 'Title', type: 'string' },
|
|
331
|
+
text: { title: 'Text', type: 'string' },
|
|
375
332
|
to: {
|
|
333
|
+
title: 'To',
|
|
376
334
|
type: 'object',
|
|
377
335
|
additionalProperties: false,
|
|
378
336
|
properties: {
|
|
379
337
|
users: {
|
|
338
|
+
title: 'Users',
|
|
380
339
|
type: 'array',
|
|
381
340
|
items: {
|
|
382
341
|
type: 'object',
|
|
383
342
|
additionalProperties: false,
|
|
384
|
-
properties: { user: { $ref: '#/$defs/id' } },
|
|
343
|
+
properties: { user: { title: 'User', $ref: '#/$defs/id' } },
|
|
385
344
|
required: ['user'],
|
|
386
345
|
},
|
|
387
346
|
},
|
|
388
|
-
fields: { type: 'array', items: { type: 'string' } },
|
|
389
|
-
roles: { type: 'array', items: { type: 'string' } },
|
|
347
|
+
fields: { title: 'Fields', type: 'array', items: { type: 'string' } },
|
|
348
|
+
roles: { title: 'Roles', type: 'array', items: { type: 'string' } },
|
|
390
349
|
},
|
|
391
350
|
required: ['users', 'fields', 'roles'],
|
|
392
351
|
},
|
|
@@ -397,10 +356,10 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
397
356
|
type: 'object',
|
|
398
357
|
additionalProperties: false,
|
|
399
358
|
properties: {
|
|
400
|
-
kind: { const: '
|
|
401
|
-
enabled: { type: 'boolean' },
|
|
402
|
-
card: { type: 'string', minLength: 1 },
|
|
403
|
-
payload: { type: 'string' },
|
|
359
|
+
kind: { title: 'Kind', const: 'agent_function' },
|
|
360
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
361
|
+
card: { title: 'Card', type: 'string', minLength: 1 },
|
|
362
|
+
payload: { title: 'Payload', type: 'string' },
|
|
404
363
|
},
|
|
405
364
|
required: ['kind', 'enabled', 'payload'],
|
|
406
365
|
},
|
|
@@ -408,42 +367,49 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
408
367
|
type: 'object',
|
|
409
368
|
additionalProperties: false,
|
|
410
369
|
properties: {
|
|
411
|
-
kind: { const: 'message' },
|
|
412
|
-
enabled: { type: 'boolean' },
|
|
413
|
-
card: { type: 'string', minLength: 1 },
|
|
414
|
-
text: { type: 'string' },
|
|
370
|
+
kind: { title: 'Kind', const: 'message' },
|
|
371
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
372
|
+
card: { title: 'Card', type: 'string', minLength: 1 },
|
|
373
|
+
text: { title: 'Text', type: 'string' },
|
|
415
374
|
},
|
|
416
375
|
required: ['kind', 'enabled', 'text'],
|
|
417
376
|
},
|
|
418
377
|
{
|
|
419
378
|
type: 'object',
|
|
420
379
|
additionalProperties: false,
|
|
421
|
-
properties: {
|
|
380
|
+
properties: {
|
|
381
|
+
kind: { title: 'Kind', const: 'done' },
|
|
382
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
383
|
+
},
|
|
422
384
|
required: ['kind', 'enabled'],
|
|
423
385
|
},
|
|
424
386
|
{
|
|
425
387
|
type: 'object',
|
|
426
388
|
additionalProperties: false,
|
|
427
389
|
properties: {
|
|
428
|
-
kind: { const: 'function' },
|
|
429
|
-
enabled: { type: 'boolean' },
|
|
430
|
-
app: { $ref: '#/$defs/app' },
|
|
431
|
-
function: { type: 'string' },
|
|
390
|
+
kind: { title: 'Kind', const: 'function' },
|
|
391
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
392
|
+
app: { title: 'App', $ref: '#/$defs/app' },
|
|
393
|
+
function: { title: 'Function', type: 'string' },
|
|
432
394
|
},
|
|
433
395
|
required: ['kind', 'enabled', 'function'],
|
|
434
396
|
},
|
|
435
397
|
],
|
|
436
398
|
},
|
|
437
399
|
},
|
|
438
|
-
enabled: { type: 'boolean' },
|
|
439
|
-
paused_by: { enum: ['types'] },
|
|
400
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
401
|
+
paused_by: { title: 'Paused by', enum: ['types'] },
|
|
440
402
|
creator: {
|
|
403
|
+
title: 'Creator',
|
|
441
404
|
type: 'object',
|
|
442
405
|
additionalProperties: false,
|
|
443
|
-
properties: {
|
|
406
|
+
properties: {
|
|
407
|
+
user: { title: 'User', $ref: '#/$defs/id' },
|
|
408
|
+
name: { title: 'Name', type: 'string' },
|
|
409
|
+
},
|
|
444
410
|
required: ['user', 'name'],
|
|
445
411
|
},
|
|
446
|
-
created: { type: 'string', format: 'date-time' },
|
|
412
|
+
created: { title: 'Created', type: 'string', format: 'date-time' },
|
|
447
413
|
},
|
|
448
414
|
required: [
|
|
449
415
|
'reflected',
|
|
@@ -459,17 +425,24 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
459
425
|
'house-web-wizard': {
|
|
460
426
|
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.",
|
|
461
427
|
properties: {
|
|
462
|
-
reflected: { type: 'string', format: 'date-time' },
|
|
463
|
-
web_wizard: { $ref: '#/$defs/id' },
|
|
428
|
+
reflected: { title: 'Reflected', type: 'string', format: 'date-time' },
|
|
429
|
+
web_wizard: { title: 'Web Wizard', $ref: '#/$defs/id' },
|
|
464
430
|
environment: {
|
|
431
|
+
title: 'Environment',
|
|
465
432
|
type: 'object',
|
|
466
433
|
additionalProperties: false,
|
|
467
|
-
properties: {
|
|
434
|
+
properties: {
|
|
435
|
+
environment: { title: 'Environment', $ref: '#/$defs/id' },
|
|
436
|
+
name: { title: 'Name', type: 'string' },
|
|
437
|
+
},
|
|
468
438
|
required: ['environment', 'name'],
|
|
469
439
|
},
|
|
470
|
-
state: {
|
|
471
|
-
|
|
472
|
-
|
|
440
|
+
state: {
|
|
441
|
+
title: 'State',
|
|
442
|
+
enum: ['waiting', 'running', 'finished', 'failed', 'cancelled', 'lapsed', 'kept'],
|
|
443
|
+
},
|
|
444
|
+
exit_code: { title: 'Exit code', type: 'integer' },
|
|
445
|
+
function: { title: 'Function', type: 'string' },
|
|
473
446
|
},
|
|
474
447
|
required: ['reflected', 'web_wizard', 'environment', 'state'],
|
|
475
448
|
},
|
|
@@ -480,3 +453,13 @@ function modelText(model) {
|
|
|
480
453
|
.join('\n')}\n`;
|
|
481
454
|
}
|
|
482
455
|
export const HOUSE_MODEL_TYPES = modelText(HOUSE_MODEL_DECLARATION);
|
|
456
|
+
export const HOUSE_TYPED_PATHS = [
|
|
457
|
+
{ path: 'settings/panel.md', type: 'house-panel-preferences', named: true, body: false },
|
|
458
|
+
{ path: `${APP_PREFERENCES_HOME}/*.md`, type: 'house-app-preferences', named: true, body: false },
|
|
459
|
+
{
|
|
460
|
+
path: 'rooms/*/agent-functions/*.md',
|
|
461
|
+
type: 'house-agent-function-document',
|
|
462
|
+
named: false,
|
|
463
|
+
body: true,
|
|
464
|
+
},
|
|
465
|
+
];
|