@agentshouse/mdruntime-adapter 0.1.0-c819869684b89 → 0.1.0-c82da698a651e
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 +20 -7
- package/dist/adapter.d.ts +0 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +114 -109
- 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 +254 -0
- package/dist/crockford.d.ts +0 -1
- package/dist/digest.d.ts +0 -1
- package/dist/discovery.d.ts +2 -5
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +9 -10
- package/dist/history.d.ts +1 -7
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +22 -29
- package/dist/house-model.d.ts +225 -310
- package/dist/house-model.d.ts.map +1 -1
- package/dist/house-model.js +215 -252
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- 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 -10
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +46 -143
- package/dist/refusal.d.ts +3 -2
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +17 -7
- package/dist/room-types.d.ts +0 -3
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +64 -53
- package/dist/search.d.ts +0 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +5 -5
- 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 +45 -49
- 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 +130 -36
- package/dist/transport.d.ts +22 -22
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +13 -13
- package/dist/uncertain.d.ts +5 -0
- package/dist/uncertain.d.ts.map +1 -0
- package/dist/uncertain.js +11 -0
- package/dist/upload.d.ts +3 -2
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +8 -6
- 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 +20 -20
- 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 -19
- package/dist/room-stream.d.ts.map +0 -1
- package/dist/room-stream.js +0 -57
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,261 @@ 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
|
-
'agent-function-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
|
+
name: { title: 'Name', type: 'string' },
|
|
218
|
+
authorship: {
|
|
219
|
+
title: 'Authorship',
|
|
203
220
|
type: 'object',
|
|
204
221
|
additionalProperties: false,
|
|
205
|
-
properties: {
|
|
206
|
-
|
|
222
|
+
properties: {
|
|
223
|
+
kind: { title: 'Kind', type: 'string', const: 'trigger-action' },
|
|
224
|
+
trigger: { title: 'Trigger', $ref: '#/$defs/id' },
|
|
225
|
+
position: { title: 'Position', type: 'integer', minimum: 0 },
|
|
226
|
+
},
|
|
227
|
+
required: ['kind', 'trigger', 'position'],
|
|
207
228
|
},
|
|
208
|
-
|
|
209
|
-
|
|
229
|
+
path: { title: 'Path', type: 'string', maxLength: 4096, pattern: '^\\/.*' },
|
|
230
|
+
trigger: {
|
|
231
|
+
title: 'Trigger',
|
|
210
232
|
type: 'object',
|
|
211
233
|
additionalProperties: false,
|
|
212
234
|
properties: {
|
|
213
|
-
|
|
214
|
-
|
|
235
|
+
trigger: { title: 'Trigger', $ref: '#/$defs/id' },
|
|
236
|
+
description: { title: 'Description', type: 'string' },
|
|
215
237
|
},
|
|
216
|
-
required: ['
|
|
238
|
+
required: ['trigger', 'description'],
|
|
239
|
+
},
|
|
240
|
+
code: {
|
|
241
|
+
title: 'Code',
|
|
242
|
+
type: 'string',
|
|
243
|
+
enum: [
|
|
244
|
+
'failed',
|
|
245
|
+
'function_failed',
|
|
246
|
+
'function_not_started',
|
|
247
|
+
'agent_function_request_not_started',
|
|
248
|
+
],
|
|
217
249
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
250
|
+
action: { title: 'Action', type: 'integer', minimum: 0 },
|
|
251
|
+
moment: { title: 'Moment', type: 'string', format: 'date-time' },
|
|
252
|
+
error: { title: 'Error', type: 'string' },
|
|
253
|
+
agent_function: {
|
|
254
|
+
title: 'Agent function',
|
|
221
255
|
type: 'object',
|
|
222
256
|
additionalProperties: false,
|
|
223
|
-
properties: {
|
|
224
|
-
required: ['
|
|
257
|
+
properties: { name: { title: 'Name', type: 'string' } },
|
|
258
|
+
required: ['name'],
|
|
225
259
|
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
bound: { type: 'integer', minimum: 0 },
|
|
229
|
-
title: { type: 'string' },
|
|
230
|
-
body: { type: 'string' },
|
|
231
|
-
authorship: {
|
|
260
|
+
agent: {
|
|
261
|
+
title: 'Agent',
|
|
232
262
|
type: 'object',
|
|
233
263
|
additionalProperties: false,
|
|
234
|
-
properties: {
|
|
235
|
-
|
|
236
|
-
trigger: { $ref: '#/$defs/id' },
|
|
237
|
-
position: { type: 'integer', minimum: 0 },
|
|
238
|
-
},
|
|
239
|
-
required: ['kind', 'trigger', 'position'],
|
|
264
|
+
properties: { name: { title: 'Name', type: 'string' } },
|
|
265
|
+
required: ['name'],
|
|
240
266
|
},
|
|
241
|
-
|
|
267
|
+
ended: { title: 'Ended', type: 'string', enum: ['finished', 'failed'] },
|
|
268
|
+
duration: { title: 'Duration', type: 'integer', minimum: 1 },
|
|
242
269
|
},
|
|
243
270
|
required: ['notification', 'kind', 'created', 'way_in', 'subject'],
|
|
244
271
|
},
|
|
@@ -249,127 +276,47 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
249
276
|
'house-agent-function': {
|
|
250
277
|
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
278
|
properties: {
|
|
252
|
-
reflected: { type: 'string', format: 'date-time' },
|
|
253
|
-
agent_function: { $ref: '#/$defs/id' },
|
|
254
|
-
description: { type: 'string' },
|
|
255
|
-
input: { type: 'string' },
|
|
279
|
+
reflected: { title: 'Reflected', type: 'string', format: 'date-time' },
|
|
280
|
+
agent_function: { title: 'Agent function', $ref: '#/$defs/id' },
|
|
281
|
+
description: { title: 'Description', type: 'string' },
|
|
282
|
+
input: { title: 'Input', type: 'string' },
|
|
256
283
|
agent: {
|
|
284
|
+
title: 'Agent',
|
|
257
285
|
type: 'object',
|
|
258
286
|
additionalProperties: false,
|
|
259
|
-
properties: {
|
|
287
|
+
properties: {
|
|
288
|
+
agent: { title: 'Agent', $ref: '#/$defs/id' },
|
|
289
|
+
name: { title: 'Name', type: 'string' },
|
|
290
|
+
},
|
|
260
291
|
required: ['agent', 'name'],
|
|
261
292
|
},
|
|
262
293
|
},
|
|
263
294
|
required: ['reflected', 'agent_function', 'description', 'input', 'agent'],
|
|
264
295
|
},
|
|
265
296
|
'house-agent-function-document': {
|
|
266
|
-
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,
|
|
297
|
+
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.',
|
|
267
298
|
properties: {
|
|
268
|
-
description: { type: 'string', maxLength: 2000, pattern: '\\S' },
|
|
269
|
-
input: { type: 'string' },
|
|
270
|
-
agent: { $ref: '#/$defs/id' },
|
|
299
|
+
description: { title: 'Description', type: 'string', maxLength: 2000, pattern: '\\S' },
|
|
300
|
+
input: { title: 'Input', type: 'string' },
|
|
301
|
+
agent: { title: 'Agent', $ref: '#/$defs/id' },
|
|
302
|
+
afk: { title: 'AFK', type: 'boolean' },
|
|
271
303
|
},
|
|
272
304
|
required: ['description', 'input', 'agent'],
|
|
273
305
|
},
|
|
274
306
|
'house-trigger': {
|
|
275
307
|
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.",
|
|
276
308
|
properties: {
|
|
277
|
-
reflected: { type: 'string', format: 'date-time' },
|
|
278
|
-
trigger: { $ref: '#/$defs/id' },
|
|
279
|
-
description: { type: 'string' },
|
|
309
|
+
reflected: { title: 'Reflected', type: 'string', format: 'date-time' },
|
|
310
|
+
trigger: { title: 'Trigger', $ref: '#/$defs/id' },
|
|
311
|
+
description: { title: 'Description', type: 'string' },
|
|
280
312
|
condition: {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
properties: {
|
|
286
|
-
on: { const: 'documents' },
|
|
287
|
-
scope: { $ref: '#/$defs/trigger_scope' },
|
|
288
|
-
mode: { const: 'starts_matching' },
|
|
289
|
-
new_documents: { type: 'boolean' },
|
|
290
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
291
|
-
by: { $ref: '#/$defs/trigger_test' },
|
|
292
|
-
moved_between_rooms: { type: 'boolean' },
|
|
293
|
-
},
|
|
294
|
-
required: ['on', 'scope', 'mode', 'new_documents', 'match'],
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
type: 'object',
|
|
298
|
-
additionalProperties: false,
|
|
299
|
-
properties: {
|
|
300
|
-
on: { const: 'documents' },
|
|
301
|
-
scope: { $ref: '#/$defs/trigger_scope' },
|
|
302
|
-
mode: { const: 'field_changes' },
|
|
303
|
-
field: { type: 'string' },
|
|
304
|
-
from: { anyOf: [{ $ref: '#/$defs/trigger_values' }, { const: 'new' }] },
|
|
305
|
-
to: { anyOf: [{ $ref: '#/$defs/trigger_values' }, { const: 'deleted' }] },
|
|
306
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
307
|
-
by: { $ref: '#/$defs/trigger_test' },
|
|
308
|
-
moved_between_rooms: { type: 'boolean' },
|
|
309
|
-
},
|
|
310
|
-
required: ['on', 'scope', 'mode', 'field'],
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
type: 'object',
|
|
314
|
-
additionalProperties: false,
|
|
315
|
-
properties: {
|
|
316
|
-
on: { const: 'items' },
|
|
317
|
-
source: { type: 'string' },
|
|
318
|
-
address: { type: 'string' },
|
|
319
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
320
|
-
},
|
|
321
|
-
required: ['on'],
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
type: 'object',
|
|
325
|
-
additionalProperties: false,
|
|
326
|
-
properties: {
|
|
327
|
-
on: { const: 'notifications' },
|
|
328
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
329
|
-
},
|
|
330
|
-
required: ['on'],
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
type: 'object',
|
|
334
|
-
additionalProperties: false,
|
|
335
|
-
properties: {
|
|
336
|
-
on: { const: 'messages' },
|
|
337
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
338
|
-
},
|
|
339
|
-
required: ['on'],
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
type: 'object',
|
|
343
|
-
additionalProperties: false,
|
|
344
|
-
properties: {
|
|
345
|
-
on: { const: 'clock' },
|
|
346
|
-
cron: { type: 'string' },
|
|
347
|
-
time_zone: { type: 'string' },
|
|
348
|
-
},
|
|
349
|
-
required: ['on', 'cron', 'time_zone'],
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
type: 'object',
|
|
353
|
-
additionalProperties: false,
|
|
354
|
-
properties: {
|
|
355
|
-
on: { const: 'clock' },
|
|
356
|
-
scope: {
|
|
357
|
-
type: 'object',
|
|
358
|
-
additionalProperties: false,
|
|
359
|
-
properties: { type: { type: 'string' } },
|
|
360
|
-
required: ['type'],
|
|
361
|
-
},
|
|
362
|
-
date: { type: 'string' },
|
|
363
|
-
days: { type: 'integer' },
|
|
364
|
-
at: { type: 'string' },
|
|
365
|
-
time_zone: { type: 'string' },
|
|
366
|
-
match: { $ref: '#/$defs/trigger_test' },
|
|
367
|
-
},
|
|
368
|
-
required: ['on', 'scope', 'date', 'days', 'at', 'time_zone'],
|
|
369
|
-
},
|
|
370
|
-
],
|
|
313
|
+
title: 'Condition',
|
|
314
|
+
description: 'When it fires, as the Trigger reference page writes it, a document it names at its current path.',
|
|
315
|
+
type: 'object',
|
|
316
|
+
additionalProperties: true,
|
|
371
317
|
},
|
|
372
318
|
actions: {
|
|
319
|
+
title: 'Actions',
|
|
373
320
|
type: 'array',
|
|
374
321
|
items: {
|
|
375
322
|
anyOf: [
|
|
@@ -377,25 +324,27 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
377
324
|
type: 'object',
|
|
378
325
|
additionalProperties: false,
|
|
379
326
|
properties: {
|
|
380
|
-
kind: { const: 'notify' },
|
|
381
|
-
enabled: { type: 'boolean' },
|
|
382
|
-
title: { type: 'string' },
|
|
383
|
-
text: { type: 'string' },
|
|
327
|
+
kind: { title: 'Kind', const: 'notify' },
|
|
328
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
329
|
+
title: { title: 'Title', type: 'string' },
|
|
330
|
+
text: { title: 'Text', type: 'string' },
|
|
384
331
|
to: {
|
|
332
|
+
title: 'To',
|
|
385
333
|
type: 'object',
|
|
386
334
|
additionalProperties: false,
|
|
387
335
|
properties: {
|
|
388
336
|
users: {
|
|
337
|
+
title: 'Users',
|
|
389
338
|
type: 'array',
|
|
390
339
|
items: {
|
|
391
340
|
type: 'object',
|
|
392
341
|
additionalProperties: false,
|
|
393
|
-
properties: { user: { $ref: '#/$defs/id' } },
|
|
342
|
+
properties: { user: { title: 'User', $ref: '#/$defs/id' } },
|
|
394
343
|
required: ['user'],
|
|
395
344
|
},
|
|
396
345
|
},
|
|
397
|
-
fields: { type: 'array', items: { type: 'string' } },
|
|
398
|
-
roles: { type: 'array', items: { type: 'string' } },
|
|
346
|
+
fields: { title: 'Fields', type: 'array', items: { type: 'string' } },
|
|
347
|
+
roles: { title: 'Roles', type: 'array', items: { type: 'string' } },
|
|
399
348
|
},
|
|
400
349
|
required: ['users', 'fields', 'roles'],
|
|
401
350
|
},
|
|
@@ -406,10 +355,10 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
406
355
|
type: 'object',
|
|
407
356
|
additionalProperties: false,
|
|
408
357
|
properties: {
|
|
409
|
-
kind: { const: 'agent_function' },
|
|
410
|
-
enabled: { type: 'boolean' },
|
|
411
|
-
card: { type: 'string', minLength: 1 },
|
|
412
|
-
payload: { type: 'string' },
|
|
358
|
+
kind: { title: 'Kind', const: 'agent_function' },
|
|
359
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
360
|
+
card: { title: 'Card', type: 'string', minLength: 1 },
|
|
361
|
+
payload: { title: 'Payload', type: 'string' },
|
|
413
362
|
},
|
|
414
363
|
required: ['kind', 'enabled', 'payload'],
|
|
415
364
|
},
|
|
@@ -417,42 +366,49 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
417
366
|
type: 'object',
|
|
418
367
|
additionalProperties: false,
|
|
419
368
|
properties: {
|
|
420
|
-
kind: { const: 'message' },
|
|
421
|
-
enabled: { type: 'boolean' },
|
|
422
|
-
card: { type: 'string', minLength: 1 },
|
|
423
|
-
text: { type: 'string' },
|
|
369
|
+
kind: { title: 'Kind', const: 'message' },
|
|
370
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
371
|
+
card: { title: 'Card', type: 'string', minLength: 1 },
|
|
372
|
+
text: { title: 'Text', type: 'string' },
|
|
424
373
|
},
|
|
425
374
|
required: ['kind', 'enabled', 'text'],
|
|
426
375
|
},
|
|
427
376
|
{
|
|
428
377
|
type: 'object',
|
|
429
378
|
additionalProperties: false,
|
|
430
|
-
properties: {
|
|
379
|
+
properties: {
|
|
380
|
+
kind: { title: 'Kind', const: 'done' },
|
|
381
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
382
|
+
},
|
|
431
383
|
required: ['kind', 'enabled'],
|
|
432
384
|
},
|
|
433
385
|
{
|
|
434
386
|
type: 'object',
|
|
435
387
|
additionalProperties: false,
|
|
436
388
|
properties: {
|
|
437
|
-
kind: { const: 'function' },
|
|
438
|
-
enabled: { type: 'boolean' },
|
|
439
|
-
app: { $ref: '#/$defs/app' },
|
|
440
|
-
function: { type: 'string' },
|
|
389
|
+
kind: { title: 'Kind', const: 'function' },
|
|
390
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
391
|
+
app: { title: 'App', $ref: '#/$defs/app' },
|
|
392
|
+
function: { title: 'Function', type: 'string' },
|
|
441
393
|
},
|
|
442
394
|
required: ['kind', 'enabled', 'function'],
|
|
443
395
|
},
|
|
444
396
|
],
|
|
445
397
|
},
|
|
446
398
|
},
|
|
447
|
-
enabled: { type: 'boolean' },
|
|
448
|
-
paused_by: { enum: ['types'] },
|
|
399
|
+
enabled: { title: 'Enabled', type: 'boolean' },
|
|
400
|
+
paused_by: { title: 'Paused by', enum: ['types'] },
|
|
449
401
|
creator: {
|
|
402
|
+
title: 'Creator',
|
|
450
403
|
type: 'object',
|
|
451
404
|
additionalProperties: false,
|
|
452
|
-
properties: {
|
|
405
|
+
properties: {
|
|
406
|
+
user: { title: 'User', $ref: '#/$defs/id' },
|
|
407
|
+
name: { title: 'Name', type: 'string' },
|
|
408
|
+
},
|
|
453
409
|
required: ['user', 'name'],
|
|
454
410
|
},
|
|
455
|
-
created: { type: 'string', format: 'date-time' },
|
|
411
|
+
created: { title: 'Created', type: 'string', format: 'date-time' },
|
|
456
412
|
},
|
|
457
413
|
required: [
|
|
458
414
|
'reflected',
|
|
@@ -468,17 +424,24 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
468
424
|
'house-web-wizard': {
|
|
469
425
|
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.",
|
|
470
426
|
properties: {
|
|
471
|
-
reflected: { type: 'string', format: 'date-time' },
|
|
472
|
-
web_wizard: { $ref: '#/$defs/id' },
|
|
427
|
+
reflected: { title: 'Reflected', type: 'string', format: 'date-time' },
|
|
428
|
+
web_wizard: { title: 'Web Wizard', $ref: '#/$defs/id' },
|
|
473
429
|
environment: {
|
|
430
|
+
title: 'Environment',
|
|
474
431
|
type: 'object',
|
|
475
432
|
additionalProperties: false,
|
|
476
|
-
properties: {
|
|
433
|
+
properties: {
|
|
434
|
+
environment: { title: 'Environment', $ref: '#/$defs/id' },
|
|
435
|
+
name: { title: 'Name', type: 'string' },
|
|
436
|
+
},
|
|
477
437
|
required: ['environment', 'name'],
|
|
478
438
|
},
|
|
479
|
-
state: {
|
|
480
|
-
|
|
481
|
-
|
|
439
|
+
state: {
|
|
440
|
+
title: 'State',
|
|
441
|
+
enum: ['waiting', 'running', 'finished', 'failed', 'cancelled', 'lapsed', 'kept'],
|
|
442
|
+
},
|
|
443
|
+
exit_code: { title: 'Exit code', type: 'integer' },
|
|
444
|
+
function: { title: 'Function', type: 'string' },
|
|
482
445
|
},
|
|
483
446
|
required: ['reflected', 'web_wizard', 'environment', 'state'],
|
|
484
447
|
},
|
|
@@ -491,7 +454,7 @@ function modelText(model) {
|
|
|
491
454
|
export const HOUSE_MODEL_TYPES = modelText(HOUSE_MODEL_DECLARATION);
|
|
492
455
|
export const HOUSE_TYPED_PATHS = [
|
|
493
456
|
{ path: 'settings/panel.md', type: 'house-panel-preferences', named: true, body: false },
|
|
494
|
-
{ path:
|
|
457
|
+
{ path: `${APP_PREFERENCES_HOME}/*.md`, type: 'house-app-preferences', named: true, body: false },
|
|
495
458
|
{
|
|
496
459
|
path: 'rooms/*/agent-functions/*.md',
|
|
497
460
|
type: 'house-agent-function-document',
|