@agentshouse/mdruntime-adapter 0.1.0-cf059d0c8e9c0 → 0.1.0-cf1ebfb67feeb

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.
@@ -26,426 +26,12 @@ export const HOUSE_MODEL_DECLARATION = {
26
26
  maxLength: 512,
27
27
  pattern: '^(?:a_[A-Za-z0-9._-]+(?:\\/source)?|r_[A-Za-z0-9._-]+(?:\\/(?:settings|settings\\/schema|settings\\/model|settings\\/indexing|content))?)$',
28
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
- },
51
- 'house-account': {
52
- description: "The User's own identifier as `user`, their registration as `created`, their email verification and chosen language, every notification group with the channels it now reaches as `notifications`, `telegram: available` while the Building runs its Telegram bots and no Telegram account is linked to it, `linked` while one is, `started` once that account has also pressed Start in the Inbox bot, `meta`, the Building's Meta app as `application` and its signup configuration as `configuration` while it offers Connect Meta's signup, or `keys` while a business connects its own Meta app by its keys, `tiktok: available` while it offers Connect TikTok, `building: administrator` while the User is one of the Building's administrators, `full_house: true` while the User holds Full House, and the Building's caps of an App function's run as `function_limits`, its time in milliseconds as `time_ms`, its memory in bytes as `memory_bytes` and its external calls as `external_calls`.",
53
- properties: {
54
- reflected: { type: 'string', format: 'date-time' },
55
- user: { $ref: '#/$defs/id' },
56
- email_verified: { type: 'string', format: 'date-time' },
57
- language: { enum: ['en'] },
58
- notifications: {
59
- type: 'array',
60
- items: {
61
- type: 'object',
62
- additionalProperties: false,
63
- properties: {
64
- group: { type: 'string' },
65
- channels: { type: 'array', items: { type: 'string' } },
66
- },
67
- required: ['group', 'channels'],
68
- },
69
- },
70
- created: { type: 'string', format: 'date-time' },
71
- telegram: { enum: ['available', 'linked', 'started'] },
72
- meta: {
73
- anyOf: [
74
- { const: 'keys' },
75
- {
76
- type: 'object',
77
- additionalProperties: false,
78
- properties: {
79
- application: { type: 'string', pattern: '^\\d{1,32}$' },
80
- configuration: { type: 'string', pattern: '^\\d{1,32}$' },
81
- },
82
- required: ['application', 'configuration'],
83
- },
84
- ],
85
- },
86
- tiktok: { enum: ['available'] },
87
- building: { enum: ['administrator'] },
88
- full_house: { const: true },
89
- function_limits: {
90
- type: 'object',
91
- additionalProperties: false,
92
- properties: {
93
- // A Function run's time cap is the Building's, so the model only asks it be positive.
94
- time_ms: { type: 'integer', exclusiveMinimum: 0 },
95
- memory_bytes: { type: 'integer', exclusiveMinimum: 0 },
96
- external_calls: { type: 'integer', exclusiveMinimum: 0 },
97
- },
98
- required: ['time_ms', 'memory_bytes', 'external_calls'],
99
- },
100
- },
101
- required: [
102
- 'reflected',
103
- 'user',
104
- 'email_verified',
105
- 'notifications',
106
- 'created',
107
- 'function_limits',
108
- ],
109
- },
110
- 'house-agent': {
111
- description: 'One registered Agent this User owns, with the `profile` and `environment` it binds, when it was `created` and, once it is, `retired`.',
112
- properties: {
113
- reflected: { type: 'string', format: 'date-time' },
114
- agent: { $ref: '#/$defs/id' },
115
- name: { type: 'string' },
116
- profile: { $ref: '#/$defs/id' },
117
- environment: { $ref: '#/$defs/id' },
118
- launch_directory: { type: 'string' },
119
- created: { type: 'string', format: 'date-time' },
120
- retired: { type: 'string', format: 'date-time' },
121
- },
122
- required: [
123
- 'reflected',
124
- 'agent',
125
- 'name',
126
- 'profile',
127
- 'environment',
128
- 'launch_directory',
129
- 'created',
130
- ],
131
- },
132
- 'house-agent-profile': {
133
- description: 'One reusable Agent Profile this User owns, with the execution route it binds and the `arguments` that route passes its CLI. Its body is its instructions, whole, in Markdown.',
134
- properties: {
135
- reflected: { type: 'string', format: 'date-time' },
136
- profile: { $ref: '#/$defs/id' },
137
- name: { type: 'string' },
138
- revision: { type: 'integer', minimum: 0 },
139
- adapter_kind: { type: 'string' },
140
- model: { type: 'string' },
141
- effort: { type: 'string' },
142
- mode: { type: 'string' },
143
- arguments: { type: 'array', items: { type: 'string' } },
144
- },
145
- required: ['reflected', 'profile', 'name', 'revision'],
146
- },
147
- 'house-app': {
148
- description: "One App this User owns, holds or installed, `ownership` naming whether it is its own or one it holds, its `owner` by `name` when another User owns it, and `my_app` `true` on this User's My App alone, with the path of its window on the control origin as `address`, its tab icon for a light and for a dark appearance as image data addresses with, while the icon is generated, its one to four colours, blend and angle, its running release as `latest_release` by `release` and `sequence`, with the external origins it declares as `external_origins`, whether its code reaches this User's conversations as `conversations`, the Room slots it declares in order as `room_slots`, each `slot` with its `access` and `types`, and the names of the App functions it declares in order as `functions`, each installation this User holds, and every User who holds the App as `holders`, this User and its owner included, by `user`, `name` and `email`. Each installation entry names the `installation`, the App's running `release` and when it was installed as `created`. Each features entry names, for an App this User does not own, a `feature`, a browser feature, a House model type or a House act its release declares, and its `consent`, `allowed` or `denied` the first time the App asked; a feature never asked is absent. `features_version` is the version of this User's latest consent change for the App.",
149
- properties: {
150
- reflected: { type: 'string', format: 'date-time' },
151
- app: { $ref: '#/$defs/app' },
152
- address: {
153
- type: 'string',
154
- pattern: '^\\/app\\/a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
155
- },
156
- name: { type: 'string' },
157
- ownership: { enum: ['own', 'held'] },
158
- owner: {
159
- type: 'object',
160
- additionalProperties: false,
161
- properties: { name: { type: 'string' } },
162
- required: ['name'],
163
- },
164
- my_app: { const: true },
165
- created: { type: 'string', format: 'date-time' },
166
- tab_icon_light: { type: 'string', pattern: '^data:image\\/' },
167
- tab_icon_dark: { type: 'string', pattern: '^data:image\\/' },
168
- tab_icon_colours: { type: 'array', items: { type: 'string', pattern: '^#[0-9a-f]{6}$' } },
169
- tab_icon_blend: { enum: ['linear', 'radial'] },
170
- tab_icon_angle: { type: 'integer', minimum: 0, maximum: 359 },
171
- latest_release: {
172
- type: 'object',
173
- additionalProperties: false,
174
- properties: {
175
- release: { $ref: '#/$defs/id' },
176
- sequence: { type: 'integer', exclusiveMinimum: 0 },
177
- },
178
- required: ['release', 'sequence'],
179
- },
180
- external_origins: { type: 'array', items: { type: 'string', format: 'uri' } },
181
- conversations: { enum: ['yes', 'no'] },
182
- room_slots: {
183
- type: 'array',
184
- items: {
185
- type: 'object',
186
- additionalProperties: false,
187
- properties: {
188
- slot: { type: 'string' },
189
- access: { enum: ['read', 'write'] },
190
- types: { type: 'array', items: { type: 'string' } },
191
- },
192
- required: ['slot', 'access', 'types'],
193
- },
194
- },
195
- functions: { type: 'array', items: { type: 'string' } },
196
- installations: {
197
- type: 'array',
198
- items: {
199
- type: 'object',
200
- additionalProperties: false,
201
- properties: {
202
- installation: { $ref: '#/$defs/id' },
203
- release: { $ref: '#/$defs/id' },
204
- created: { type: 'string', format: 'date-time' },
205
- },
206
- required: ['installation', 'release', 'created'],
207
- },
208
- },
209
- holders: {
210
- type: 'array',
211
- items: {
212
- type: 'object',
213
- additionalProperties: false,
214
- properties: {
215
- user: { $ref: '#/$defs/id' },
216
- name: { type: 'string' },
217
- email: { type: 'string' },
218
- },
219
- required: ['user', 'name', 'email'],
220
- },
221
- },
222
- features: {
223
- type: 'array',
224
- items: {
225
- type: 'object',
226
- additionalProperties: false,
227
- properties: { feature: { type: 'string' }, consent: { enum: ['allowed', 'denied'] } },
228
- required: ['feature', 'consent'],
229
- },
230
- },
231
- features_version: { type: 'integer', exclusiveMinimum: 0 },
232
- },
233
- required: ['reflected', 'app', 'address', 'name', 'ownership', 'created'],
234
29
  },
235
30
  'house-app-preferences': {
236
31
  description: "An App's preferences. Its own vocabulary is in the body.",
237
32
  properties: { app: { $ref: '#/$defs/app' } },
238
33
  required: ['app'],
239
34
  },
240
- 'house-app-room-binding': {
241
- description: "One durable App-Room binding this User holds: an ordered Room list, one Shared schema, or `rooms`, `all` for every Room this User has or `all_but_private` for every one but their Private Room, for a named Room slot of one `app`, shared by every device and browser installation they sign in from. Only this User's own bindings appear here. A Shared-schema binding names the `shared_schema` with its own structural `compatibility` and `findings`, the Rooms that currently use it and this User reads, and how many Rooms the instance bound leaves out. A `rooms` binding holds this User's Rooms that fit the slot, and `left_out` counts the others and those past the instance bound. Each entry names a `room` and the last structural comparison of the slot with its selected model as `compatibility`, `unchecked`, `compatible` or `incompatible`, and each finding a `room` and one exact structural `finding` of it against the slot. An explicit entry whose Room this User cannot read is absent until access returns; an empty explicit list has no document. An incompatible entry or Shared schema blocks nothing: the App still opens and the model still changes.",
242
- properties: {
243
- reflected: { type: 'string', format: 'date-time' },
244
- app: { $ref: '#/$defs/app' },
245
- slot: { type: 'string', pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' },
246
- types: { type: 'array', items: { type: 'string' } },
247
- slot_access: { enum: ['read', 'write'] },
248
- shared_schema: {
249
- type: 'object',
250
- additionalProperties: false,
251
- properties: {
252
- shared_schema: { $ref: '#/$defs/id' },
253
- compatibility: { enum: ['unchecked', 'compatible', 'incompatible'] },
254
- findings: { type: 'array', items: { type: 'string' } },
255
- },
256
- required: ['shared_schema', 'compatibility', 'findings'],
257
- },
258
- rooms: { enum: ['all', 'all_but_private'] },
259
- left_out: { type: 'integer', minimum: 0 },
260
- entries: {
261
- type: 'array',
262
- items: {
263
- type: 'object',
264
- additionalProperties: false,
265
- properties: {
266
- room: { $ref: '#/$defs/room' },
267
- compatibility: { enum: ['unchecked', 'compatible', 'incompatible'] },
268
- },
269
- required: ['room', 'compatibility'],
270
- },
271
- },
272
- findings: {
273
- type: 'array',
274
- items: {
275
- type: 'object',
276
- additionalProperties: false,
277
- properties: { room: { $ref: '#/$defs/room' }, finding: { type: 'string' } },
278
- required: ['room', 'finding'],
279
- },
280
- },
281
- },
282
- required: ['reflected', 'app', 'slot'],
283
- },
284
- 'house-client': {
285
- description: 'One MCP client this User authorized, named as it was created. Its last use and whether its credentials expired are read on request.',
286
- properties: {
287
- reflected: { type: 'string', format: 'date-time' },
288
- client: { $ref: '#/$defs/id' },
289
- name: { type: 'string' },
290
- kind: { enum: ['browser', 'headless'] },
291
- created: { type: 'string', format: 'date-time' },
292
- ended: { type: 'string', format: 'date-time' },
293
- end: { enum: ['revoked'] },
294
- },
295
- required: ['reflected', 'client', 'name', 'kind', 'created'],
296
- },
297
- 'house-environment': {
298
- description: "One Environment this User holds, with its configuration, its `name`, the one its User entered, when it was `created`, the Rooms it reaches, `all`, `all_but_private` or the `selected` ones `rooms` names, each by its `room`, `login_code`, `yes` while it holds a reusable login code, the agent CLI kinds House admits in `offered`, the kinds House last set in `wanted`, and the latest readiness its Kit reported in `agents`. `kind` is the kind of Environment, `sandbox`, a small Environment House runs with limited capacity, especially disk, `vps`, an always-on Environment House runs with better specs, or `own` for its owner's own computer. `lifecycle` is the state of that Sandbox or VPS: `provisioning` while House creates it, `starting` while it starts or House wakes it, `available` once its Kit connected, `stopped` or `failed`. For a Sandbox, `budget` is its runtime budget in hours a month and `budget_spent` is `yes` once its runtime this UTC month reached it. Each offered entry names one adapter kind the owner may select for this Environment. Each wanted entry names one adapter kind the Kit should hold. Each agent entry names the adapter `kind`, its installed `version` or null when the Kit could not install it, for a CLI below its adapter's minimum that `minimum`, `failure`, that install's cause, `installing`, true only while the Kit installs it, whether the CLI is `signed_in`, its `models`, each `model` with its `efforts` as the CLI's session options name them, its `modes`, each `mode` with the `name` the CLI gives it, and `full_access`, the mode that bypasses every permission, or null for a CLI that offers no mode and always runs so. A wanted kind no entry names is not yet reported. `transcribe` is whether the Kit transcribes a message's audio files, as House last set it, and `transcription` names whether the Kit has the engine `installed` and the `failure` of its last download or null, as the Kit last reported it. `os` is the operating system and version of the Environment, `kit_release` the installed Kit release and `form` the computer's form, `laptop`, `desktop` or `server`, as the Kit last reported them. Placement failure is projected on its transitions; `failed` names the failure's category and never its cause. For a VPS, `ssh` is its owner's root login on port 22.",
299
- properties: {
300
- reflected: { type: 'string', format: 'date-time' },
301
- environment: { $ref: '#/$defs/id' },
302
- name: { type: 'string' },
303
- created: { type: 'string', format: 'date-time' },
304
- revoked: { type: 'string', format: 'date-time' },
305
- reach: { enum: ['all', 'all_but_private', 'selected'] },
306
- rooms: {
307
- type: 'array',
308
- items: {
309
- type: 'object',
310
- additionalProperties: false,
311
- properties: { room: { $ref: '#/$defs/room' } },
312
- required: ['room'],
313
- },
314
- },
315
- login_code: { enum: ['yes', 'no'] },
316
- kind: { enum: ['sandbox', 'vps', 'own'] },
317
- lifecycle: { enum: ['provisioning', 'starting', 'available', 'stopped', 'failed'] },
318
- offered: { type: 'array', items: { type: 'string' } },
319
- wanted: { type: 'array', items: { type: 'string' } },
320
- agents: {
321
- type: 'array',
322
- items: {
323
- type: 'object',
324
- additionalProperties: false,
325
- properties: {
326
- kind: { type: 'string', minLength: 1, maxLength: 64 },
327
- version: { anyOf: [{ type: 'string', minLength: 1, maxLength: 64 }, { type: 'null' }] },
328
- minimum: {
329
- description: "Present only for a CLI below its adapter's minimum version: that minimum.",
330
- type: 'string',
331
- minLength: 1,
332
- maxLength: 64,
333
- },
334
- failure: {
335
- anyOf: [{ type: 'string', minLength: 1, maxLength: 4096 }, { type: 'null' }],
336
- },
337
- installing: {
338
- description: 'Present only while the Kit installs the CLI, whose version and failure are then null.',
339
- type: 'boolean',
340
- const: true,
341
- },
342
- signed_in: { type: 'boolean' },
343
- models: {
344
- maxItems: 256,
345
- type: 'array',
346
- items: {
347
- type: 'object',
348
- additionalProperties: false,
349
- properties: {
350
- model: { type: 'string', minLength: 1 },
351
- efforts: { maxItems: 32, type: 'array', items: { type: 'string', minLength: 1 } },
352
- },
353
- required: ['model', 'efforts'],
354
- },
355
- },
356
- modes: {
357
- maxItems: 32,
358
- type: 'array',
359
- items: {
360
- type: 'object',
361
- additionalProperties: false,
362
- properties: {
363
- mode: { type: 'string', minLength: 1 },
364
- name: { type: 'string', minLength: 1, maxLength: 128 },
365
- },
366
- required: ['mode', 'name'],
367
- },
368
- },
369
- full_access: { anyOf: [{ type: 'string', minLength: 1 }, { type: 'null' }] },
370
- },
371
- required: ['kind', 'version', 'failure', 'signed_in', 'models', 'modes', 'full_access'],
372
- },
373
- },
374
- transcribe: { enum: ['on', 'off'] },
375
- transcription: {
376
- type: 'object',
377
- additionalProperties: false,
378
- properties: {
379
- installed: { type: 'boolean' },
380
- failure: { anyOf: [{ type: 'string', minLength: 1, maxLength: 4096 }, { type: 'null' }] },
381
- },
382
- required: ['installed', 'failure'],
383
- },
384
- os: { type: 'string' },
385
- kit_release: { type: 'string' },
386
- form: { enum: ['laptop', 'desktop', 'server'] },
387
- failed: {
388
- enum: [
389
- 'provisioning_failed',
390
- 'bootstrap_timeout',
391
- 'provider_capacity',
392
- 'provider_unavailable',
393
- 'provider_removed',
394
- 'placement_conflict',
395
- 'placement_intervention',
396
- 'environment_authority_unavailable',
397
- ],
398
- },
399
- budget: { type: 'string', pattern: '^\\d+(?:\\.\\d+)?$' },
400
- budget_spent: { enum: ['yes', 'no'] },
401
- ssh: { type: 'string', pattern: '^root@\\S+$' },
402
- },
403
- required: [
404
- 'reflected',
405
- 'environment',
406
- 'name',
407
- 'created',
408
- 'reach',
409
- 'kind',
410
- 'offered',
411
- 'transcribe',
412
- ],
413
- },
414
- 'house-exports': {
415
- description: "This User's Exports, each with its `status`, when it was `created` and, once it has one, when it `expires`; a ready one names its download page as `page`.",
416
- properties: {
417
- reflected: { type: 'string', format: 'date-time' },
418
- exports: {
419
- type: 'array',
420
- items: {
421
- type: 'object',
422
- additionalProperties: false,
423
- properties: {
424
- export: { $ref: '#/$defs/id' },
425
- status: { enum: ['queued', 'running', 'ready', 'failed'] },
426
- created: { type: 'string', format: 'date-time' },
427
- expires: { type: 'string', format: 'date-time' },
428
- page: {
429
- type: 'string',
430
- pattern: '^\\/exports\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$',
431
- },
432
- },
433
- required: ['export', 'status', 'created'],
434
- },
435
- },
436
- },
437
- required: ['reflected'],
438
- },
439
- 'house-member': {
440
- description: "One User who shares a Room with this User, with their current display name and accepted about-me Markdown. Their email, the Rooms they share and each one's access are in the `roster` of each `house-room` document.",
441
- properties: {
442
- reflected: { type: 'string', format: 'date-time' },
443
- user: { $ref: '#/$defs/id' },
444
- name: { type: 'string' },
445
- about_me: { type: 'string' },
446
- },
447
- required: ['reflected', 'user', 'name'],
448
- },
449
35
  'house-notification': {
450
36
  description: "One kept Human Notification for this User: its kind, when it was sent as `created`, its way in, its email's subject and each fact of its value that is not sealed, named in snake_case. An entity a fact names is an object holding its identifier under the key of its kind, when the notification carries it, and its `name`, `email` and other facts beside it; a fact holding null is absent. `way_in` is either the House `path` it opens or the entity it is about, by its identifier under the key of its kind, a Trigger with its `room`. Its body is its email's words in Markdown. Both were worded once, in the User's language when it was delivered; an App may show them or word it itself from its kind and value. Read state belongs to each browser.",
451
37
  properties: {
@@ -457,7 +43,6 @@ export const HOUSE_MODEL_DECLARATION = {
457
43
  'join-request',
458
44
  'join-request-approved',
459
45
  'app-room-binding-incompatible',
460
- 'app-deleted',
461
46
  'app-call',
462
47
  'room-ownership-offer',
463
48
  'managed-environment-retention-opened',
@@ -465,20 +50,13 @@ export const HOUSE_MODEL_DECLARATION = {
465
50
  'storage-full',
466
51
  'sandbox-budget-spent',
467
52
  'break-glass-owner-disclosure',
468
- 'routine-start-approval-request',
469
- 'routine-request-declined',
470
- 'routine-request-started',
471
- 'routine-request-finished',
472
- 'routine-request-not-started',
53
+ 'agent-function-start-approval-request',
473
54
  'export-ready',
474
55
  'export-failed',
475
56
  'site-disabled',
476
57
  'site-binding-incompatible',
477
- 'site-room-left',
478
58
  'site-images-full',
479
59
  'custom',
480
- 'trigger-did-nothing',
481
- 'function-failed',
482
60
  ],
483
61
  },
484
62
  created: { type: 'string', format: 'date-time' },
@@ -489,10 +67,7 @@ export const HOUSE_MODEL_DECLARATION = {
489
67
  path: { type: 'string', pattern: '^\\/' },
490
68
  room: { $ref: '#/$defs/room' },
491
69
  app: { $ref: '#/$defs/app' },
492
- agent: { $ref: '#/$defs/id' },
493
70
  environment: { $ref: '#/$defs/id' },
494
- routine: { $ref: '#/$defs/id' },
495
- routine_request: { $ref: '#/$defs/id' },
496
71
  trigger: { $ref: '#/$defs/id' },
497
72
  site: { $ref: '#/$defs/id' },
498
73
  },
@@ -548,15 +123,10 @@ export const HOUSE_MODEL_DECLARATION = {
548
123
  properties: { app: { $ref: '#/$defs/app' }, name: { type: 'string' } },
549
124
  minProperties: 1,
550
125
  },
126
+ release: { type: 'integer', minimum: 1 },
551
127
  binding: { $ref: '#/$defs/id' },
552
128
  slot: { type: 'string' },
553
129
  findings: { type: 'array', items: { type: 'string' } },
554
- owner: {
555
- type: 'object',
556
- additionalProperties: false,
557
- properties: { name: { type: 'string' } },
558
- required: ['name'],
559
- },
560
130
  caller: {
561
131
  type: 'object',
562
132
  additionalProperties: false,
@@ -601,7 +171,7 @@ export const HOUSE_MODEL_DECLARATION = {
601
171
  access_ended_at: { type: 'string', format: 'date-time' },
602
172
  systems: { type: 'array', items: { type: 'string' } },
603
173
  case_reference: { type: 'string' },
604
- routine_request: { $ref: '#/$defs/id' },
174
+ agent_function_request: { $ref: '#/$defs/id' },
605
175
  requester: {
606
176
  type: 'object',
607
177
  additionalProperties: false,
@@ -615,23 +185,15 @@ export const HOUSE_MODEL_DECLARATION = {
615
185
  required: ['name'],
616
186
  },
617
187
  conversation: { $ref: '#/$defs/id' },
618
- routine: {
188
+ agent_function: {
619
189
  type: 'object',
620
190
  additionalProperties: false,
621
191
  properties: {
622
- routine: { $ref: '#/$defs/id' },
623
192
  name: { type: 'string' },
624
193
  version: { type: 'integer', minimum: 1 },
625
194
  },
626
195
  required: ['name'],
627
196
  },
628
- decliner: {
629
- type: 'object',
630
- additionalProperties: false,
631
- properties: { name: { type: 'string' } },
632
- required: ['name'],
633
- },
634
- input: { type: 'string' },
635
197
  export: { $ref: '#/$defs/id' },
636
198
  size_bytes: { type: 'integer', minimum: 0 },
637
199
  site: {
@@ -641,12 +203,6 @@ export const HOUSE_MODEL_DECLARATION = {
641
203
  required: ['site', 'name'],
642
204
  },
643
205
  address: { type: 'string', maxLength: 300, format: 'uri' },
644
- to: {
645
- type: 'object',
646
- additionalProperties: false,
647
- properties: { name: { type: 'string' } },
648
- required: ['name'],
649
- },
650
206
  copies: { type: 'integer', minimum: 0 },
651
207
  bound: { type: 'integer', minimum: 0 },
652
208
  title: { type: 'string' },
@@ -662,15 +218,6 @@ export const HOUSE_MODEL_DECLARATION = {
662
218
  required: ['kind', 'trigger', 'position'],
663
219
  },
664
220
  path: { type: 'string', maxLength: 4096, pattern: '^\\/.*' },
665
- trigger: {
666
- type: 'object',
667
- additionalProperties: false,
668
- properties: { trigger: { $ref: '#/$defs/id' }, name: { type: 'string' } },
669
- required: ['trigger', 'name'],
670
- },
671
- cause: { type: 'string' },
672
- function: { type: 'string' },
673
- error: { type: 'string' },
674
221
  },
675
222
  required: ['notification', 'kind', 'created', 'way_in', 'subject'],
676
223
  },
@@ -678,223 +225,11 @@ export const HOUSE_MODEL_DECLARATION = {
678
225
  description: "The panel's preferences at /rooms/private/settings/panel.md. Its own vocabulary is in the body.",
679
226
  properties: {},
680
227
  },
681
- 'house-profile': {
682
- description: "The User's display name, the email they sign in with and accepted about-me Markdown.",
683
- properties: {
684
- reflected: { type: 'string', format: 'date-time' },
685
- name: { type: 'string' },
686
- email: { type: 'string' },
687
- about_me: { type: 'string' },
688
- },
689
- required: ['reflected', 'name', 'email'],
690
- },
691
- 'house-public-room': {
692
- description: 'One Public Room this User added and reads without being its member. Its members are read with `list_members`, and `leave_room` removes it.',
693
- properties: {
694
- reflected: { type: 'string', format: 'date-time' },
695
- room: { $ref: '#/$defs/room' },
696
- handle: {
697
- type: 'string',
698
- minLength: 6,
699
- maxLength: 63,
700
- pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$',
701
- },
702
- name: { type: 'string' },
703
- archived: { type: 'string', format: 'date-time' },
704
- },
705
- required: ['reflected', 'room', 'handle', 'name'],
706
- },
707
- 'house-room': {
708
- description: "One Room this User reads, with the processing configuration that indexes it. `my_room` is `true` on this User's My Room alone, whatever its name and handle become. `admission` is `pending` while House is still settling this User into the Room, which finishes on its own and needs no act. `access` is this User's access word in the Room, `owner`, `manage`, `edit`, `keep`, `open` or `search`, with `only_while_online` on a `manage` or `edit` held at the Open level; `level` is the access level they hold on its content, `search`, `open` or `keep`, and `operations` are their own on its content. `policy` is whether House indexes the Room's documents, `Off` while it withholds indexing. Each indexing entry names a folder `path` and the `policy` set on it. `shared_schema` names the Shared schema whose copy is the Room's schema while the Room uses one, with its `name`. The owner alone sees `ownership_offer`, the `nominee` it is offered to and when it `expires`, while an offer is open, and `public`, the time they made the Room public, while every House User may read it; a member who does not own it sees its `owner` by name. `roster` lists the Room's members, each with when they were `admitted`, their member `document` and the access level and operations a Room Share could offer them without giving them anything new as `held`; it and `rights` carry the access this User may see, every member's to one who manages the Room and their own otherwise.",
709
- properties: {
710
- reflected: { type: 'string', format: 'date-time' },
711
- room: { $ref: '#/$defs/room' },
712
- handle: {
713
- type: 'string',
714
- minLength: 6,
715
- maxLength: 63,
716
- pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$',
717
- },
718
- name: { type: 'string' },
719
- my_room: { const: true },
720
- membership: { enum: ['owner', 'member'] },
721
- ownership_offer: {
722
- type: 'object',
723
- additionalProperties: false,
724
- properties: {
725
- nominee: {
726
- type: 'object',
727
- additionalProperties: false,
728
- properties: { user: { $ref: '#/$defs/id' }, name: { type: 'string' } },
729
- required: ['user', 'name'],
730
- },
731
- expires: { type: 'string', format: 'date-time' },
732
- },
733
- required: ['nominee', 'expires'],
734
- },
735
- access: { enum: ['owner', 'manage', 'edit', 'keep', 'open', 'search'] },
736
- level: { enum: ['search', 'open', 'keep'] },
737
- only_while_online: { const: true },
738
- operations: {
739
- type: 'array',
740
- items: { type: 'string', enum: ['write', 'delete', 'export', 'manageAccess'] },
741
- },
742
- owner: {
743
- type: 'object',
744
- additionalProperties: false,
745
- properties: { name: { type: 'string' } },
746
- required: ['name'],
747
- },
748
- members: { type: 'integer', minimum: 0 },
749
- triggers: { type: 'integer', minimum: 0 },
750
- published: { enum: ['yes', 'no'] },
751
- intake: { enum: ['yes', 'no'] },
752
- size: { type: 'number' },
753
- admission: { enum: ['admitted', 'pending'] },
754
- created: { type: 'string', format: 'date-time' },
755
- archived: { type: 'string', format: 'date-time' },
756
- public: { type: 'string', format: 'date-time' },
757
- policy: { enum: ['On', 'Off'] },
758
- indexing: {
759
- type: 'array',
760
- items: {
761
- type: 'object',
762
- additionalProperties: false,
763
- properties: { path: { type: 'string', minLength: 1 }, policy: { enum: ['On', 'Off'] } },
764
- required: ['path', 'policy'],
765
- },
766
- },
767
- shared_schema: {
768
- type: 'object',
769
- additionalProperties: false,
770
- properties: { shared_schema: { $ref: '#/$defs/id' }, name: { type: 'string' } },
771
- required: ['shared_schema', 'name'],
772
- },
773
- roster: {
774
- type: 'array',
775
- items: {
776
- type: 'object',
777
- additionalProperties: false,
778
- properties: {
779
- user: { $ref: '#/$defs/id' },
780
- name: { type: 'string' },
781
- owner: { type: 'boolean' },
782
- email: { type: 'string' },
783
- admitted: { type: 'string', format: 'date-time' },
784
- access: { type: 'string', enum: ['owner', 'manage', 'edit', 'keep', 'open', 'search'] },
785
- only_while_online: { const: true },
786
- document: { $ref: '#/$defs/document' },
787
- schema_roles: { type: 'array', items: { type: 'string' } },
788
- held: {
789
- type: 'object',
790
- additionalProperties: false,
791
- properties: {
792
- level: {
793
- anyOf: [{ type: 'string', enum: ['search', 'open', 'keep'] }, { type: 'null' }],
794
- },
795
- operations: {
796
- type: 'array',
797
- items: { type: 'string', enum: ['write', 'delete', 'export', 'manageAccess'] },
798
- },
799
- },
800
- required: ['level', 'operations'],
801
- },
802
- },
803
- required: ['user', 'name', 'owner', 'email'],
804
- },
805
- },
806
- rights: {
807
- type: 'array',
808
- items: {
809
- type: 'object',
810
- additionalProperties: false,
811
- properties: {
812
- user: { $ref: '#/$defs/id' },
813
- name: { type: 'string' },
814
- entries: {
815
- type: 'array',
816
- items: {
817
- type: 'object',
818
- additionalProperties: false,
819
- properties: {
820
- namespace: { $ref: '#/$defs/namespace' },
821
- level: {
822
- anyOf: [{ type: 'string', enum: ['search', 'open', 'keep'] }, { type: 'null' }],
823
- },
824
- operations: {
825
- type: 'array',
826
- items: { type: 'string', enum: ['write', 'delete', 'export', 'manageAccess'] },
827
- },
828
- sources: {
829
- type: 'array',
830
- items: {
831
- type: 'object',
832
- additionalProperties: false,
833
- properties: {
834
- kind: { type: 'string', enum: ['direct', 'inherited'] },
835
- namespace: { $ref: '#/$defs/namespace' },
836
- level: {
837
- anyOf: [
838
- { type: 'string', enum: ['search', 'open', 'keep'] },
839
- { type: 'null' },
840
- ],
841
- },
842
- operations: {
843
- type: 'array',
844
- items: {
845
- type: 'string',
846
- enum: ['write', 'delete', 'export', 'manageAccess'],
847
- },
848
- },
849
- },
850
- required: ['kind', 'namespace', 'level', 'operations'],
851
- },
852
- },
853
- },
854
- required: ['namespace', 'level', 'operations', 'sources'],
855
- },
856
- },
857
- direct: {
858
- type: 'array',
859
- items: {
860
- type: 'object',
861
- additionalProperties: false,
862
- properties: {
863
- namespace: { $ref: '#/$defs/namespace' },
864
- level: {
865
- anyOf: [{ type: 'string', enum: ['search', 'open', 'keep'] }, { type: 'null' }],
866
- },
867
- operations: {
868
- type: 'array',
869
- items: { type: 'string', enum: ['write', 'delete', 'export', 'manageAccess'] },
870
- },
871
- },
872
- required: ['namespace', 'level', 'operations'],
873
- },
874
- },
875
- admitted: { type: 'string', format: 'date-time' },
876
- schema_roles: { type: 'array', items: { type: 'string' } },
877
- },
878
- required: ['user', 'name', 'entries', 'direct', 'schema_roles'],
879
- },
880
- },
881
- },
882
- required: [
883
- 'reflected',
884
- 'room',
885
- 'name',
886
- 'membership',
887
- 'access',
888
- 'admission',
889
- 'created',
890
- 'policy',
891
- ],
892
- },
893
- 'house-routine': {
894
- description: "One Routine that serves this Room, which House alone writes from its owner's document in their Private Room: the `routine` by identifier, its `description`, the `input` a caller sends, empty when it takes nothing, and the `agent` it starts, by `agent` and the `name` that Agent had when this card was last written. The Routine's instruction is never written here.",
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.",
895
230
  properties: {
896
231
  reflected: { type: 'string', format: 'date-time' },
897
- routine: { $ref: '#/$defs/id' },
232
+ agent_function: { $ref: '#/$defs/id' },
898
233
  description: { type: 'string' },
899
234
  input: { type: 'string' },
900
235
  agent: {
@@ -904,233 +239,27 @@ export const HOUSE_MODEL_DECLARATION = {
904
239
  required: ['agent', 'name'],
905
240
  },
906
241
  },
907
- required: ['reflected', 'routine', 'description', 'input', 'agent'],
242
+ required: ['reflected', 'agent_function', 'description', 'input', 'agent'],
908
243
  },
909
- 'house-site': {
910
- description: "One Site this User owns: its `name`, its address under this environment's Site suffix, its own `app`, the tab icon it shows, the one this User set for the Site while `tab_icon_from` is `site` and that App's while it is `app`, 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, and is absent on a Building that offers no Public overage. `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.",
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.',
911
246
  properties: {
912
- reflected: { type: 'string', format: 'date-time' },
913
- site: { $ref: '#/$defs/id' },
914
- name: { type: 'string' },
915
- address: { type: 'string', format: 'uri' },
916
- addresses: { type: 'array', items: { type: 'string', format: 'uri' } },
917
- primary_address: { type: 'string', format: 'uri' },
918
- domains: {
919
- type: 'array',
920
- items: {
921
- type: 'object',
922
- additionalProperties: false,
923
- properties: {
924
- host: { type: 'string' },
925
- state: { enum: ['pending', 'active', 'failed'] },
926
- dns_target: { type: 'string' },
927
- reason: { type: 'string' },
928
- },
929
- required: ['host', 'state', 'dns_target'],
930
- },
931
- },
932
- app: { $ref: '#/$defs/app' },
933
- tab_icon_light: { type: 'string', pattern: '^data:image\\/' },
934
- tab_icon_dark: { type: 'string', pattern: '^data:image\\/' },
935
- tab_icon_colours: { type: 'array', items: { type: 'string', pattern: '^#[0-9a-f]{6}$' } },
936
- tab_icon_blend: { enum: ['linear', 'radial'] },
937
- tab_icon_angle: { type: 'integer', minimum: 0, maximum: 359 },
938
- tab_icon_from: { enum: ['site', 'app'] },
939
- release: {
940
- type: 'object',
941
- additionalProperties: false,
942
- properties: {
943
- release: { $ref: '#/$defs/id' },
944
- sequence: { type: 'integer', exclusiveMinimum: 0 },
945
- },
946
- required: ['release', 'sequence'],
947
- },
948
- title: { type: 'string' },
949
- description: { type: 'string' },
950
- screenshot: { type: 'string', format: 'uri' },
951
- analytics: { type: 'string', pattern: '^G-[A-Z0-9]{1,32}$' },
952
- intake_room: {
953
- type: 'object',
954
- additionalProperties: false,
955
- properties: { room: { $ref: '#/$defs/room' } },
956
- required: ['room'],
957
- },
958
- external_origins: { type: 'array', items: { type: 'string', format: 'uri' } },
959
- disabled: { enum: ['yes', 'no'] },
960
- disabled_reason: { type: 'string' },
961
- mode: { enum: ['snapshot', 'live'] },
962
- unpublished: { enum: ['yes', 'no'] },
963
- suspended: { enum: ['yes', 'no'] },
964
- suspended_reason: { type: 'string', enum: ['full_house_required', 'public_delivery_limit'] },
965
- public_overage: { enum: ['on', 'off'] },
966
- publication: { $ref: '#/$defs/id' },
967
- acts: { type: 'array', items: { type: 'string', enum: ['unpublish', 'republish'] } },
968
- indexing: { enum: ['yes', 'no'] },
969
- entry_fallback: {
970
- type: 'object',
971
- additionalProperties: false,
972
- properties: {
973
- cause: { enum: ['over_bound', 'query_refused', 'unavailable'] },
974
- route: { type: 'string' },
975
- recorded: { type: 'string', format: 'date-time' },
976
- },
977
- required: ['cause', 'route', 'recorded'],
978
- },
979
- created: { type: 'string', format: 'date-time' },
980
- new_browsers: { type: 'integer', minimum: 0 },
981
- submissions: { type: 'integer', minimum: 0 },
982
- notify_me: { enum: ['on', 'off'] },
983
- image_copies: { type: 'integer', minimum: 0 },
984
- image_copy_bound: { type: 'integer', minimum: 0 },
985
- image_copy_limit_reached: { enum: ['yes', 'no'] },
986
- slots: {
987
- type: 'array',
988
- items: {
989
- type: 'object',
990
- additionalProperties: false,
991
- properties: {
992
- slot: { type: 'string', pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' },
993
- entries: {
994
- type: 'array',
995
- items: {
996
- type: 'object',
997
- additionalProperties: false,
998
- properties: {
999
- room: { $ref: '#/$defs/room' },
1000
- segment: { type: 'string' },
1001
- compatibility: { enum: ['unchecked', 'compatible', 'incompatible'] },
1002
- },
1003
- required: ['room', 'segment', 'compatibility'],
1004
- },
1005
- },
1006
- },
1007
- required: ['slot', 'entries'],
1008
- },
1009
- },
1010
- findings: {
1011
- type: 'array',
1012
- items: {
1013
- type: 'object',
1014
- additionalProperties: false,
1015
- properties: {
1016
- slot: { type: 'string', pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' },
1017
- room: { $ref: '#/$defs/room' },
1018
- finding: { type: 'string' },
1019
- },
1020
- required: ['slot', 'room', 'finding'],
1021
- },
1022
- },
247
+ description: { type: 'string', maxLength: 2000, pattern: '\\S' },
248
+ input: { type: 'string' },
249
+ agent: { $ref: '#/$defs/id' },
1023
250
  },
1024
- required: [
1025
- 'reflected',
1026
- 'site',
1027
- 'name',
1028
- 'address',
1029
- 'primary_address',
1030
- 'app',
1031
- 'tab_icon_from',
1032
- 'disabled',
1033
- 'mode',
1034
- 'unpublished',
1035
- 'suspended',
1036
- 'indexing',
1037
- 'created',
1038
- 'new_browsers',
1039
- 'submissions',
1040
- 'notify_me',
1041
- 'image_copies',
1042
- 'image_copy_bound',
1043
- 'image_copy_limit_reached',
1044
- ],
251
+ required: ['description', 'input', 'agent'],
1045
252
  },
1046
253
  'house-trigger': {
1047
- description: "One Trigger of this Room as its acts wrote it, which House alone writes: its `description`, the `condition` it fires on, its `actions` in order, whether each action and the Trigger are `enabled`, `paused_by` `types` while a change of the Room's types paused it, its `creator` by `user` and the `name` they had then, and when it was `created`. A `notify` action reaches the `users` its `to` names, the members its `fields` name in the matched document and the holders of its `roles`; a `routine` action sends its `payload` to the Routine whose card under this Room's `house/routines/` its `card` names, absent while this Room holds no card of that Routine; a `function` action runs the `function` its `app`'s latest release declares, on House's servers, or, naming no `app`, the Room owner's Environment function of that name on its Environment, which only a Trigger of their Private Room holds. Whether an action's target holds is not written: it follows from the Room's members, the Routine's card, the App's latest release and the owner's functions.",
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.",
1048
255
  properties: {
1049
256
  reflected: { type: 'string', format: 'date-time' },
1050
257
  trigger: { $ref: '#/$defs/id' },
1051
258
  description: { type: 'string' },
1052
259
  condition: {
1053
- anyOf: [
1054
- {
1055
- type: 'object',
1056
- additionalProperties: false,
1057
- properties: {
1058
- on: { const: 'documents' },
1059
- scope: { $ref: '#/$defs/trigger_scope' },
1060
- mode: { const: 'starts_matching' },
1061
- new_documents: { type: 'boolean' },
1062
- match: { $ref: '#/$defs/trigger_test' },
1063
- by: { $ref: '#/$defs/trigger_test' },
1064
- moved_between_rooms: { type: 'boolean' },
1065
- },
1066
- required: ['on', 'scope', 'mode', 'new_documents', 'match'],
1067
- },
1068
- {
1069
- type: 'object',
1070
- additionalProperties: false,
1071
- properties: {
1072
- on: { const: 'documents' },
1073
- scope: { $ref: '#/$defs/trigger_scope' },
1074
- mode: { const: 'field_changes' },
1075
- field: { type: 'string' },
1076
- from: { anyOf: [{ $ref: '#/$defs/trigger_values' }, { const: 'new' }] },
1077
- to: { anyOf: [{ $ref: '#/$defs/trigger_values' }, { const: 'deleted' }] },
1078
- match: { $ref: '#/$defs/trigger_test' },
1079
- by: { $ref: '#/$defs/trigger_test' },
1080
- moved_between_rooms: { type: 'boolean' },
1081
- },
1082
- required: ['on', 'scope', 'mode', 'field'],
1083
- },
1084
- {
1085
- type: 'object',
1086
- additionalProperties: false,
1087
- properties: {
1088
- on: { const: 'items' },
1089
- source: { type: 'string' },
1090
- address: { type: 'string' },
1091
- match: { $ref: '#/$defs/trigger_test' },
1092
- },
1093
- required: ['on'],
1094
- },
1095
- {
1096
- type: 'object',
1097
- additionalProperties: false,
1098
- properties: {
1099
- on: { const: 'notifications' },
1100
- match: { $ref: '#/$defs/trigger_test' },
1101
- },
1102
- required: ['on'],
1103
- },
1104
- {
1105
- type: 'object',
1106
- additionalProperties: false,
1107
- properties: {
1108
- on: { const: 'clock' },
1109
- cron: { type: 'string' },
1110
- time_zone: { type: 'string' },
1111
- },
1112
- required: ['on', 'cron', 'time_zone'],
1113
- },
1114
- {
1115
- type: 'object',
1116
- additionalProperties: false,
1117
- properties: {
1118
- on: { const: 'clock' },
1119
- scope: {
1120
- type: 'object',
1121
- additionalProperties: false,
1122
- properties: { type: { type: 'string' } },
1123
- required: ['type'],
1124
- },
1125
- date: { type: 'string' },
1126
- days: { type: 'integer' },
1127
- at: { type: 'string' },
1128
- time_zone: { type: 'string' },
1129
- match: { $ref: '#/$defs/trigger_test' },
1130
- },
1131
- required: ['on', 'scope', 'date', 'days', 'at', 'time_zone'],
1132
- },
1133
- ],
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,
1134
263
  },
1135
264
  actions: {
1136
265
  type: 'array',
@@ -1169,13 +298,30 @@ export const HOUSE_MODEL_DECLARATION = {
1169
298
  type: 'object',
1170
299
  additionalProperties: false,
1171
300
  properties: {
1172
- kind: { const: 'routine' },
301
+ kind: { const: 'agent_function' },
1173
302
  enabled: { type: 'boolean' },
1174
303
  card: { type: 'string', minLength: 1 },
1175
304
  payload: { type: 'string' },
1176
305
  },
1177
306
  required: ['kind', 'enabled', 'payload'],
1178
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
+ },
1179
325
  {
1180
326
  type: 'object',
1181
327
  additionalProperties: false,
@@ -1235,3 +381,13 @@ function modelText(model) {
1235
381
  .join('\n')}\n`;
1236
382
  }
1237
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
+ ];