@agentshouse/mdruntime-adapter 0.1.0-cd519a0f878dc → 0.1.0-cd59e72d7f397
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 +14 -59
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +194 -289
- package/dist/adapter.d.ts +0 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +234 -423
- package/dist/authored-path.d.ts +61 -0
- package/dist/authored-path.d.ts.map +1 -0
- package/dist/authored-path.js +166 -0
- package/dist/chunks.d.ts +36 -0
- package/dist/chunks.d.ts.map +1 -0
- package/dist/chunks.js +281 -0
- package/dist/digest.d.ts +0 -1
- package/dist/discovery.d.ts +42 -12
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +231 -51
- package/dist/history.d.ts +6 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +85 -0
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -6
- package/dist/map.d.ts +0 -1
- package/dist/model.d.ts +6 -10
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +27 -42
- package/dist/read.d.ts +22 -74
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +110 -363
- package/dist/refusal.d.ts +6 -5
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +27 -11
- package/dist/renamed.d.ts +10 -0
- package/dist/renamed.d.ts.map +1 -0
- package/dist/renamed.js +20 -0
- package/dist/room-query.d.ts +4 -0
- package/dist/room-query.d.ts.map +1 -0
- package/dist/room-query.js +63 -0
- package/dist/search.d.ts +4 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +47 -0
- package/dist/session-content/check.d.ts +20 -0
- package/dist/session-content/index.d.ts +6 -0
- package/dist/session-content/parts.d.ts +30 -0
- package/dist/session-content/state.d.ts +59 -0
- package/dist/session-content/turn.d.ts +152 -0
- package/dist/site.d.ts +0 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +120 -175
- package/dist/space-schema.d.ts +6 -0
- package/dist/space-schema.d.ts.map +1 -0
- package/dist/space-schema.js +11 -0
- package/dist/stream.d.ts +16 -16
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +306 -430
- package/dist/transport.d.ts +113 -46
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +92 -11
- 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 +7 -2
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +51 -8
- package/dist/version.d.ts +0 -1
- package/dist/write.d.ts +2 -4
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +100 -127
- package/package.json +4 -3
- package/dist/app-reference.d.ts +0 -2
- package/dist/app-reference.d.ts.map +0 -1
- package/dist/app-reference.js +0 -2
- package/dist/crockford.d.ts +0 -4
- package/dist/crockford.d.ts.map +0 -1
- package/dist/crockford.js +0 -3
- package/dist/gather.d.ts +0 -4
- package/dist/gather.d.ts.map +0 -1
- package/dist/gather.js +0 -35
- package/dist/house-model.d.ts +0 -2
- package/dist/house-model.d.ts.map +0 -1
- package/dist/house-model.js +0 -441
- package/dist/part.d.ts +0 -15
- package/dist/part.d.ts.map +0 -1
- package/dist/part.js +0 -82
- package/dist/room-types.d.ts +0 -7
- package/dist/room-types.d.ts.map +0 -1
- package/dist/room-types.js +0 -124
package/dist/write.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { departure, ROW_WEIGHT, } from '@agentshouse/mdruntime';
|
|
2
|
-
import { answered, answering,
|
|
1
|
+
import { departure, isPart, ROW_WEIGHT, } from '@agentshouse/mdruntime';
|
|
2
|
+
import { answered, answering, attachmentOf, headChange, revised } from './read.js';
|
|
3
3
|
import { sha256Hex, textBytes } from './digest.js';
|
|
4
4
|
import { nativePath, roomLocalPath } from './map.js';
|
|
5
|
-
import { classifyDoor, doorRefusal, scopedRefusal } from './refusal.js';
|
|
5
|
+
import { answeredFailure, classifyDoor, doorRefusal, resetOf, scopedRefusal } from './refusal.js';
|
|
6
6
|
import { readPosition, roomVersion } from './version.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
function priorPreamble(batch, path) {
|
|
14
|
-
return batch.preconditions.find((precondition) => precondition.kind === 'preamble' && precondition.path === path);
|
|
7
|
+
import { unusable } from './uncertain.js';
|
|
8
|
+
function priorPart(batch, change) {
|
|
9
|
+
return batch.preconditions.find((held) => held.kind === change.kind &&
|
|
10
|
+
held.path === change.path &&
|
|
11
|
+
(change.kind === 'preamble' || ('name' in held && held.name === change.name)));
|
|
15
12
|
}
|
|
16
13
|
function priorAbsence(batch, path) {
|
|
17
14
|
return batch.preconditions.find((precondition) => precondition.kind === 'absent' && precondition.path === path);
|
|
@@ -22,60 +19,30 @@ function priorExistence(batch, path) {
|
|
|
22
19
|
return undefined;
|
|
23
20
|
return precondition.kind === 'revision' ? { base: precondition.revision } : { kind: 'presence' };
|
|
24
21
|
}
|
|
25
|
-
function
|
|
26
|
-
if (
|
|
27
|
-
return {
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
function textOf(batch, change, path, document) {
|
|
23
|
+
if (isPart(change) && priorPart(batch, change) === undefined)
|
|
24
|
+
return { rule: 'precondition-missing' };
|
|
25
|
+
if (change.kind === 'create' && priorAbsence(batch, change.path) === undefined)
|
|
26
|
+
return { rule: 'precondition-missing' };
|
|
27
|
+
if (change.kind === 'replace' && priorExistence(batch, change.path) === undefined)
|
|
28
|
+
return { rule: 'precondition-missing' };
|
|
29
|
+
if (document === null || document === undefined)
|
|
30
30
|
return null;
|
|
31
|
-
|
|
31
|
+
if (document.stale)
|
|
32
|
+
return { rule: 'precondition-stale' };
|
|
33
|
+
if (document.created)
|
|
34
|
+
return { operation: { op: 'write', path, content: document.content } };
|
|
35
|
+
if (document.base === null)
|
|
36
|
+
return { rule: 'presence-base-unrepresentable' };
|
|
37
|
+
return { operation: { op: 'write', path, base: document.base, content: document.content } };
|
|
32
38
|
}
|
|
33
|
-
function operationOf(batch,
|
|
39
|
+
function operationOf(batch, index, handle, written) {
|
|
40
|
+
const change = batch.changes[index];
|
|
34
41
|
const path = nativePath(change.path, handle);
|
|
35
|
-
if (change.kind === '
|
|
36
|
-
|
|
37
|
-
if (prior === undefined)
|
|
38
|
-
return { rule: 'precondition-missing' };
|
|
39
|
-
return {
|
|
40
|
-
operation: {
|
|
41
|
-
op: 'set_field',
|
|
42
|
-
path,
|
|
43
|
-
field: change.name,
|
|
44
|
-
value: change.value,
|
|
45
|
-
...(prior.value === undefined ? {} : { base: prior.value }),
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
if (change.kind === 'section') {
|
|
50
|
-
const prior = priorSection(batch, change.path, change.name);
|
|
51
|
-
if (prior === undefined)
|
|
52
|
-
return { rule: 'precondition-missing' };
|
|
53
|
-
return {
|
|
54
|
-
operation: {
|
|
55
|
-
op: 'replace_section',
|
|
56
|
-
path,
|
|
57
|
-
section: change.name,
|
|
58
|
-
base: prior.value,
|
|
59
|
-
content: change.value,
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
if (change.kind === 'preamble') {
|
|
64
|
-
const prior = priorPreamble(batch, change.path);
|
|
65
|
-
if (prior === undefined)
|
|
66
|
-
return { rule: 'precondition-missing' };
|
|
67
|
-
return {
|
|
68
|
-
operation: { op: 'replace_preamble', path, base: prior.value, content: change.value },
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
if (change.kind === 'create') {
|
|
72
|
-
if (priorAbsence(batch, change.path) === undefined)
|
|
73
|
-
return { rule: 'precondition-missing' };
|
|
74
|
-
const operation = created(change, path);
|
|
75
|
-
return operation === null ? { rule: 'type-missing' } : { operation };
|
|
76
|
-
}
|
|
42
|
+
if (isPart(change) || change.kind === 'create' || change.kind === 'replace')
|
|
43
|
+
return textOf(batch, change, path, written[index]);
|
|
77
44
|
if (change.kind === 'binary') {
|
|
78
|
-
const
|
|
45
|
+
const uploaded = {
|
|
79
46
|
op: 'upload',
|
|
80
47
|
path,
|
|
81
48
|
local_id: change.localId,
|
|
@@ -83,42 +50,61 @@ function operationOf(batch, change, handle) {
|
|
|
83
50
|
sha256: change.sha256,
|
|
84
51
|
media_type: change.mediaType,
|
|
85
52
|
};
|
|
86
|
-
const from = departure(batch.changes,
|
|
53
|
+
const from = departure(batch.changes, index);
|
|
87
54
|
if (from === change.path && priorAbsence(batch, change.path) !== undefined)
|
|
88
|
-
return { operation:
|
|
55
|
+
return { operation: uploaded };
|
|
89
56
|
const replaced = priorExistence(batch, from);
|
|
90
57
|
if (replaced === undefined)
|
|
91
58
|
return { rule: 'precondition-missing' };
|
|
92
59
|
if (!('base' in replaced))
|
|
93
60
|
return { rule: 'presence-base-unrepresentable' };
|
|
94
|
-
return { operation: { ...
|
|
61
|
+
return { operation: { ...uploaded, base: replaced.base } };
|
|
95
62
|
}
|
|
96
63
|
const existence = priorExistence(batch, change.path);
|
|
97
64
|
if (existence === undefined)
|
|
98
65
|
return { rule: 'precondition-missing' };
|
|
99
66
|
if (!('base' in existence))
|
|
100
67
|
return { rule: 'presence-base-unrepresentable' };
|
|
101
|
-
if (change.kind === 'replace') {
|
|
102
|
-
return { operation: { op: 'replace', path, base: existence.base, content: change.content } };
|
|
103
|
-
}
|
|
104
68
|
if (change.kind === 'move') {
|
|
105
69
|
if (priorAbsence(batch, change.to) === undefined)
|
|
106
70
|
return { rule: 'precondition-missing' };
|
|
107
71
|
return {
|
|
108
|
-
operation: { op: '
|
|
72
|
+
operation: { op: 'move', path, to: nativePath(change.to, handle), base: existence.base },
|
|
109
73
|
};
|
|
110
74
|
}
|
|
111
|
-
return { operation: { op: '
|
|
75
|
+
return { operation: { op: 'delete', path, base: existence.base } };
|
|
112
76
|
}
|
|
113
|
-
export function houseChanges(batch, handle) {
|
|
77
|
+
export function houseChanges(batch, handle, written) {
|
|
114
78
|
const changes = [];
|
|
115
|
-
|
|
116
|
-
|
|
79
|
+
const moves = new Map();
|
|
80
|
+
const before = new Map();
|
|
81
|
+
for (const [index, change] of batch.changes.entries()) {
|
|
82
|
+
const mapped = operationOf(batch, index, handle, written);
|
|
83
|
+
if (mapped === null)
|
|
84
|
+
continue;
|
|
117
85
|
if ('rule' in mapped)
|
|
118
86
|
return { kind: 'unmapped', path: change.path, rule: mapped.rule };
|
|
119
|
-
|
|
87
|
+
const { operation } = mapped;
|
|
88
|
+
const from = departure(batch.changes, index);
|
|
89
|
+
if (change.kind === 'move' && !moves.has(from))
|
|
90
|
+
moves.set(from, changes.length);
|
|
91
|
+
const moved = moves.get(from);
|
|
92
|
+
if (change.kind !== 'move' &&
|
|
93
|
+
moved !== undefined &&
|
|
94
|
+
operation.op === 'write' &&
|
|
95
|
+
'base' in operation) {
|
|
96
|
+
before.set(moved, { ...operation, path: nativePath(from, handle) });
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
changes.push(operation);
|
|
120
100
|
}
|
|
121
|
-
return {
|
|
101
|
+
return {
|
|
102
|
+
kind: 'changes',
|
|
103
|
+
changes: changes.flatMap((operation, at) => {
|
|
104
|
+
const written = before.get(at);
|
|
105
|
+
return written === undefined ? [operation] : [written, operation];
|
|
106
|
+
}),
|
|
107
|
+
};
|
|
122
108
|
}
|
|
123
109
|
export function houseMove(batch, source, destination) {
|
|
124
110
|
const changes = [];
|
|
@@ -130,7 +116,7 @@ export function houseMove(batch, source, destination) {
|
|
|
130
116
|
return { kind: 'unmapped', path, rule: 'presence-base-unrepresentable' };
|
|
131
117
|
}
|
|
132
118
|
changes.push({
|
|
133
|
-
op: '
|
|
119
|
+
op: 'move',
|
|
134
120
|
path: nativePath(path, source),
|
|
135
121
|
to: nativePath(to, destination),
|
|
136
122
|
base: existence.base,
|
|
@@ -140,13 +126,12 @@ export function houseMove(batch, source, destination) {
|
|
|
140
126
|
}
|
|
141
127
|
export function operationHead(batch) {
|
|
142
128
|
const writer = batch.writtenBy;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
: { operation_id: batch.id, app_ref: writer.app, release: writer.release };
|
|
129
|
+
const head = { operation_id: batch.id };
|
|
130
|
+
return writer === undefined ? head : { ...head, app_ref: writer.app, release: writer.release };
|
|
146
131
|
}
|
|
147
132
|
export function batchPaths(changes) {
|
|
148
133
|
return [
|
|
149
|
-
...new Set(changes.flatMap((change) => change.op === '
|
|
134
|
+
...new Set(changes.flatMap((change) => change.op === 'move' ? [String(change.path), String(change.to)] : [String(change.path)])),
|
|
150
135
|
];
|
|
151
136
|
}
|
|
152
137
|
export function deltaBody(changes) {
|
|
@@ -179,7 +164,7 @@ function* material(value, handle, within = () => true) {
|
|
|
179
164
|
return null;
|
|
180
165
|
if (file.revision !== null && file.revision !== undefined && typeof file.revision !== 'string')
|
|
181
166
|
return null;
|
|
182
|
-
const binary =
|
|
167
|
+
const binary = attachmentOf(file);
|
|
183
168
|
if (binary === null)
|
|
184
169
|
return null;
|
|
185
170
|
const head = headChange(file);
|
|
@@ -222,14 +207,14 @@ function* acceptedOf(at, contents) {
|
|
|
222
207
|
if (entry.content !== null)
|
|
223
208
|
answer.documents.set(entry.path, entry.content);
|
|
224
209
|
if (entry.binary !== undefined)
|
|
225
|
-
answer.
|
|
210
|
+
answer.attachments.set(entry.path, entry.binary);
|
|
226
211
|
revised(answer, entry.path, entry.revision);
|
|
227
212
|
if (entry.head !== undefined)
|
|
228
213
|
answer.changes.set(entry.path, entry.head);
|
|
229
214
|
}
|
|
230
|
-
const unbinaried = answer.
|
|
231
|
-
const {
|
|
232
|
-
return { roomVersion: roomVersion(at), ...room, ...(unbinaried ? {} : {
|
|
215
|
+
const unbinaried = answer.attachments.size === 0;
|
|
216
|
+
const { attachments, facts: _facts, ...room } = yield* answered(answer);
|
|
217
|
+
return { roomVersion: roomVersion(at), ...room, ...(unbinaried ? {} : { attachments }) };
|
|
233
218
|
}
|
|
234
219
|
function* movedOutcome(held, move) {
|
|
235
220
|
const authorities = Array.isArray(held.authorities) ? held.authorities : [];
|
|
@@ -242,12 +227,12 @@ function* movedOutcome(held, move) {
|
|
|
242
227
|
const left = at(move.source.authority);
|
|
243
228
|
const arrived = at(move.destination.authority);
|
|
244
229
|
if (left === null || arrived === null)
|
|
245
|
-
return
|
|
230
|
+
return unusable();
|
|
246
231
|
const under = (handle) => (path) => path.startsWith(`/rooms/${handle}/`);
|
|
247
232
|
const leaving = yield* material(held.contents, move.source.handle, under(move.source.handle));
|
|
248
233
|
const arriving = yield* material(held.contents, move.destination.handle, under(move.destination.handle));
|
|
249
234
|
if (leaving === null || arriving === null)
|
|
250
|
-
return
|
|
235
|
+
return unusable();
|
|
251
236
|
return {
|
|
252
237
|
kind: 'accepted',
|
|
253
238
|
...(yield* acceptedOf(left, leaving)),
|
|
@@ -259,11 +244,6 @@ export function* mutationOutcome(status, body, locator, handle, move) {
|
|
|
259
244
|
if (refusal !== null && refusal.code === 'service_mode_write_halted') {
|
|
260
245
|
return { kind: 'write-halted' };
|
|
261
246
|
}
|
|
262
|
-
if (refusal !== null && refusal.code === 'expired') {
|
|
263
|
-
return refusal.fields.restored === true
|
|
264
|
-
? { kind: 'expired', restored: true }
|
|
265
|
-
: { kind: 'expired' };
|
|
266
|
-
}
|
|
267
247
|
if (refusal !== null && refusal.code === 'edit_conflict') {
|
|
268
248
|
const { current, ...fields } = refusal.fields;
|
|
269
249
|
const held = (yield* material(current, handle)) ?? [];
|
|
@@ -279,10 +259,8 @@ export function* mutationOutcome(status, body, locator, handle, move) {
|
|
|
279
259
|
return scopedRefusal(locator, 'undisclosed', refusal);
|
|
280
260
|
}
|
|
281
261
|
const classified = classifyDoor(status, body, locator);
|
|
282
|
-
const reset = refusal
|
|
283
|
-
if (refusal?.
|
|
284
|
-
typeof reset === 'string' &&
|
|
285
|
-
classified?.kind === 'transport-uncertainty') {
|
|
262
|
+
const reset = resetOf(refusal);
|
|
263
|
+
if (refusal !== null && reset !== undefined && classified?.kind === 'transport-uncertainty') {
|
|
286
264
|
return {
|
|
287
265
|
kind: 'retryable-refusal',
|
|
288
266
|
code: refusal.code,
|
|
@@ -305,18 +283,19 @@ export function* mutationOutcome(status, body, locator, handle, move) {
|
|
|
305
283
|
retryable: refusal.retryable,
|
|
306
284
|
};
|
|
307
285
|
}
|
|
308
|
-
if (status !== 200
|
|
309
|
-
return
|
|
310
|
-
|
|
286
|
+
if (status !== 200)
|
|
287
|
+
return answeredFailure(status, body);
|
|
288
|
+
if (typeof body !== 'object' || body === null)
|
|
289
|
+
return unusable();
|
|
311
290
|
const held = body;
|
|
312
291
|
if (move !== undefined)
|
|
313
292
|
return yield* movedOutcome(held, move);
|
|
314
293
|
const at = readPosition(held);
|
|
315
294
|
if (at === null)
|
|
316
|
-
return
|
|
295
|
+
return unusable();
|
|
317
296
|
const contents = yield* material(held.contents, handle);
|
|
318
297
|
if (contents === null)
|
|
319
|
-
return
|
|
298
|
+
return unusable();
|
|
320
299
|
return { kind: 'accepted', ...(yield* acceptedOf(at, contents)) };
|
|
321
300
|
}
|
|
322
301
|
export function rejectedMapping(mapping) {
|
|
@@ -337,14 +316,17 @@ export function revisionBody(input) {
|
|
|
337
316
|
}
|
|
338
317
|
function revisionAuthor(entry) {
|
|
339
318
|
const user = entry.author_user;
|
|
319
|
+
const userName = entry.author_user_name;
|
|
340
320
|
const site = entry.author_site;
|
|
341
321
|
const siteName = entry.author_site_name;
|
|
342
322
|
const inbox = entry.author_inbox;
|
|
343
323
|
const inboxName = entry.author_inbox_name;
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
if (user
|
|
324
|
+
const app = entry.author_app;
|
|
325
|
+
const appName = entry.author_app_name;
|
|
326
|
+
const named = [site, siteName, inbox, inboxName, app, appName].filter((held) => held !== undefined);
|
|
327
|
+
if (typeof user === 'string' && typeof userName === 'string' && named.length === 0)
|
|
328
|
+
return { kind: 'user', id: user, name: userName };
|
|
329
|
+
if (user !== null || userName !== undefined || named.length !== 2)
|
|
348
330
|
return null;
|
|
349
331
|
if (typeof site === 'string' && typeof siteName === 'string') {
|
|
350
332
|
return { kind: 'site', id: site, name: siteName };
|
|
@@ -352,6 +334,9 @@ function revisionAuthor(entry) {
|
|
|
352
334
|
if (typeof inbox === 'string' && typeof inboxName === 'string') {
|
|
353
335
|
return { kind: 'inbox', id: inbox, name: inboxName };
|
|
354
336
|
}
|
|
337
|
+
if (typeof app === 'string' && typeof appName === 'string') {
|
|
338
|
+
return { kind: 'app', id: app, name: appName };
|
|
339
|
+
}
|
|
355
340
|
return null;
|
|
356
341
|
}
|
|
357
342
|
export function historyOutcome(status, body, locator, request) {
|
|
@@ -359,35 +344,23 @@ export function historyOutcome(status, body, locator, request) {
|
|
|
359
344
|
if (classified !== null)
|
|
360
345
|
return classified;
|
|
361
346
|
if (status !== 200 || typeof body !== 'object' || body === null) {
|
|
362
|
-
return
|
|
347
|
+
return unusable();
|
|
363
348
|
}
|
|
364
349
|
const held = body;
|
|
365
350
|
if (!Array.isArray(held.revisions))
|
|
366
|
-
return
|
|
351
|
+
return unusable();
|
|
367
352
|
const entries = [];
|
|
368
353
|
for (const entry of held.revisions) {
|
|
369
354
|
if (typeof entry !== 'object' || entry === null)
|
|
370
|
-
return
|
|
355
|
+
return unusable();
|
|
371
356
|
entries.push(entry);
|
|
372
357
|
}
|
|
373
|
-
|
|
374
|
-
|
|
358
|
+
const named = entries[0];
|
|
359
|
+
if (request.revision !== undefined && typeof named?.media_type !== 'string') {
|
|
375
360
|
if (named === undefined)
|
|
376
361
|
return { kind: 'no-history' };
|
|
377
|
-
if (named.unavailable === true) {
|
|
378
|
-
return {
|
|
379
|
-
kind: 'scoped-refusal',
|
|
380
|
-
locator,
|
|
381
|
-
scope: 'operation',
|
|
382
|
-
code: 'retained_history_unavailable',
|
|
383
|
-
fields: { path: request.path, revision: request.revision },
|
|
384
|
-
retryable: false,
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
if (typeof named.media_type === 'string')
|
|
388
|
-
return { kind: 'no-history' };
|
|
389
362
|
if (typeof named.content !== 'string')
|
|
390
|
-
return
|
|
363
|
+
return unusable();
|
|
391
364
|
return { kind: 'revision', content: named.content };
|
|
392
365
|
}
|
|
393
366
|
if (entries.length === 0)
|
|
@@ -398,16 +371,16 @@ export function historyOutcome(status, body, locator, request) {
|
|
|
398
371
|
if (typeof entry.revision !== 'string' ||
|
|
399
372
|
author === null ||
|
|
400
373
|
typeof entry.created_at !== 'string') {
|
|
401
|
-
return
|
|
374
|
+
return unusable();
|
|
402
375
|
}
|
|
403
|
-
const
|
|
404
|
-
if (
|
|
405
|
-
return
|
|
376
|
+
const attachment = attachmentOf(entry);
|
|
377
|
+
if (attachment === null)
|
|
378
|
+
return unusable();
|
|
406
379
|
revisions.push({
|
|
407
380
|
revision: entry.revision,
|
|
408
381
|
author,
|
|
409
382
|
time: entry.created_at,
|
|
410
|
-
...(
|
|
383
|
+
...(attachment === undefined ? {} : { attachment }),
|
|
411
384
|
});
|
|
412
385
|
}
|
|
413
386
|
const next = held.next_before;
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/mdruntime-adapter",
|
|
3
|
-
"version": "0.1.0-cd519a0f878dc",
|
|
4
3
|
"description": "Agents House Adapter for the MD Runtime",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"type": "module",
|
|
@@ -24,11 +23,13 @@
|
|
|
24
23
|
"LICENSE"
|
|
25
24
|
],
|
|
26
25
|
"dependencies": {
|
|
27
|
-
"@agentshouse/
|
|
26
|
+
"@agentshouse/mdmodel": "0.1.0-c839e4b34c8dc",
|
|
27
|
+
"@agentshouse/mdruntime": "0.1.0-c665086c82675"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
31
31
|
"url": "git+https://github.com/agentshouse/core.git",
|
|
32
32
|
"directory": "mdruntime/packages/mdruntime-adapter"
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
|
+
"version": "0.1.0-cd59e72d7f397"
|
|
34
35
|
}
|
package/dist/app-reference.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-reference.d.ts","sourceRoot":"","sources":["../src/app-reference.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,QAEjC,CAAC"}
|
package/dist/app-reference.js
DELETED
package/dist/crockford.d.ts
DELETED
package/dist/crockford.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crockford.d.ts","sourceRoot":"","sources":["../src/crockford.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;AAErE,eAAO,MAAM,mBAAmB,uCAA4B,CAAC;AAE7D,eAAO,MAAM,2BAA2B,QAAqC,CAAC"}
|
package/dist/crockford.js
DELETED
package/dist/gather.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function gatheredEach<A, R>(send: (asks: readonly A[], answer: (ask: number, result: R) => void) => Promise<void>): (ask: A) => Promise<R>;
|
|
2
|
-
export declare function gathered<A, R>(send: (asks: readonly A[]) => Promise<readonly R[]>): (ask: A) => Promise<R>;
|
|
3
|
-
export declare function selections<T>(items: readonly T[], limit: number): readonly (readonly T[])[];
|
|
4
|
-
//# sourceMappingURL=gather.d.ts.map
|
package/dist/gather.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gather.d.ts","sourceRoot":"","sources":["../src/gather.ts"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,IAAI,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,GACpF,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAwBxB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAC3B,IAAI,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,KAAK,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,GAClD,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAMxB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAO3F"}
|
package/dist/gather.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export function gatheredEach(send) {
|
|
2
|
-
let held = [];
|
|
3
|
-
function flush() {
|
|
4
|
-
const taken = held;
|
|
5
|
-
held = [];
|
|
6
|
-
send(taken.map((entry) => entry.ask), (ask, result) => {
|
|
7
|
-
taken[ask]?.resolve(result);
|
|
8
|
-
}).catch((reason) => {
|
|
9
|
-
for (const entry of taken)
|
|
10
|
-
entry.reject(reason);
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
return (ask) => new Promise((resolve, reject) => {
|
|
14
|
-
if (held.length === 0) {
|
|
15
|
-
// Asks made in one task wait a single event-loop turn so they leave as one batch.
|
|
16
|
-
setTimeout(flush, 0);
|
|
17
|
-
}
|
|
18
|
-
held.push({ ask, resolve, reject });
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
export function gathered(send) {
|
|
22
|
-
return gatheredEach(async (asks, answer) => {
|
|
23
|
-
(await send(asks)).forEach((result, ask) => {
|
|
24
|
-
answer(ask, result);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
export function selections(items, limit) {
|
|
29
|
-
const size = Math.max(1, limit);
|
|
30
|
-
const parts = [];
|
|
31
|
-
for (let start = 0; start < items.length; start += size) {
|
|
32
|
-
parts.push(items.slice(start, start + size));
|
|
33
|
-
}
|
|
34
|
-
return parts;
|
|
35
|
-
}
|
package/dist/house-model.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const HOUSE_MODEL_TYPES = "$defs:\n room:\n description: A Room, by its Room reference, under the key `room`.\n type: string\n pattern: '^r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$'\n app:\n description: An App, by its App reference, under the key `app`.\n type: string\n pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$'\n document:\n description: A document of a Room, by its file reference, under the key `document`.\n type: string\n pattern: '^af_([123456789abcdefghjkmnpqrstvwxyz][0123456789abcdefghjkmnpqrstvwxyz]*)\\.([0123456789abcdefghjkmnpqrstvwxyz])$'\n id:\n 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.\n type: string\n format: uuid\n namespace:\n description: The Namespace a grant entry covers, an App or a Room by its reference with the area of it.\n type: string\n maxLength: 512\n pattern: '^(?:a_[A-Za-z0-9._-]+(?:\\/source)?|r_[A-Za-z0-9._-]+(?:\\/(?:settings|settings\\/schema|settings\\/model|settings\\/indexing|content))?)$'\n request:\n description: One Routine Request of a Room.\n type: object\n additionalProperties: false\n properties:\n routine_request: { $ref: '#/$defs/id' }\n conversation: { $ref: '#/$defs/id' }\n origin: { enum: [ user, trigger ] }\n state: { enum: [ awaiting_approval, started, finished, not_started, withdrawn_by_author, withdrawn_admission, declined ] }\n target: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' } }, required: [ user ] }\n record: { $ref: '#/$defs/id' }\n routine_access: { $ref: '#/$defs/id' }\n agent: { $ref: '#/$defs/id' }\n routine: { type: object, additionalProperties: false, properties: { name: { type: string }, version: { type: integer, exclusiveMinimum: 0 } }, minProperties: 1 }\n approved: { type: string, format: date-time }\n approved_by: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' } }, required: [ user ] }\n settled_by: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' } }, required: [ user ] }\n failure_category: { enum: [ routine_access_not_found, routine_retired, target_agent_unavailable, agent_unavailable, admission_lapsed ] }\n created: { type: string, format: date-time }\n activated: { type: string, format: date-time }\n settled: { type: string, format: date-time }\n environment_starting: { const: true }\n result: { type: string }\n url: { type: string, format: uri }\n required: [ routine_request, origin, state, target, created ]\nhouse-account:\n 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 a Telegram bot and no Telegram account is linked to it, `linked` while one is, `meta`, the Building's Meta app as `application` and its signup configuration as `configuration`, with `business_app` where its signup offers to keep the WhatsApp Business app on the number's phone, while it offers Connect Meta, `tiktok: available` while it offers Connect TikTok, and `building: administrator` while the User is one of the Building's administrators.\"\n properties:\n reflected: { type: string, format: date-time }\n user: { $ref: '#/$defs/id' }\n email_verified: { type: string, format: date-time }\n language: { enum: [ en ] }\n notifications: { type: array, items: { type: object, additionalProperties: false, properties: { group: { type: string }, channels: { type: array, items: { type: string } } }, required: [ group, channels ] } }\n created: { type: string, format: date-time }\n telegram: { enum: [ available, linked ] }\n meta: { type: object, additionalProperties: false, properties: { application: { type: string, pattern: '^\\d{1,32}$' }, configuration: { type: string, pattern: '^\\d{1,32}$' }, business_app: { const: true } }, required: [ application, configuration ] }\n tiktok: { enum: [ available ] }\n building: { enum: [ administrator ] }\n required: [ reflected, user, email_verified, notifications, created ]\nhouse-agent:\n description: One registered Agent this User owns.\n properties:\n reflected: { type: string, format: date-time }\n agent: { type: string, format: uuid }\n name: { type: string }\n profile: { type: string, format: uuid }\n environment: { type: string, format: uuid }\n launch_directory: { type: string }\n declared: { type: string, format: date-time }\n retired: { type: string, format: date-time }\n required: [ reflected, agent, name, profile, environment, launch_directory, declared ]\nhouse-agent-profile:\n 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.\n properties:\n reflected: { type: string, format: date-time }\n profile: { type: string, format: uuid }\n name: { type: string }\n revision: { type: integer, minimum: 0 }\n adapter_kind: { type: string }\n model: { type: string }\n effort: { type: string }\n mode: { type: string }\n arguments: { type: array, items: { type: string } }\n required: [ reflected, profile, name, revision ]\nhouse-app:\n description: One App this User owns, holds or installed, `ownership` naming whether it is its own or one it holds, 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 with the external origins it declares as `external_origins`, whether its code reaches this User's conversations as `conversations` and the Room slots it declares in order as `room_slots`, each installation this User holds, and every User who holds the App as `holders`, this User and its owner included, by name. Each installation entry names the installation, the App's running release and when it was installed. Each features entry names a browser feature of an App this User does not own and whether this User allowed or denied it 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, which apps/features/set answers as `features_version`.\n properties:\n reflected: { type: string, format: date-time }\n app: { type: string, format: uuid }\n app_ref: { type: string, pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$' }\n address: { type: string, pattern: '^\\/app\\/a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$' }\n display_name: { type: string }\n ownership: { enum: [ own, held ] }\n owner_name: { type: string }\n created: { type: string, format: date-time }\n forked_from: { type: string, format: uuid }\n tab_icon_light: { type: string, pattern: ^data:image\\/ }\n tab_icon_dark: { type: string, pattern: ^data:image\\/ }\n tab_icon_colours: { type: array, items: { type: string, pattern: '^#[0-9a-f]{6}$' } }\n tab_icon_blend: { enum: [ linear, radial ] }\n tab_icon_angle: { type: integer, minimum: 0, maximum: 359 }\n latest_release: { type: string, pattern: '^(?<release>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\t(?<sequence>\\d+)$' }\n external_origins: { type: array, items: { type: string, format: uri } }\n conversations: { enum: [ yes, no ] }\n room_slots: { type: string, contentMediaType: application/json, contentSchema: { type: array, items: { type: object, properties: { slot: { type: string }, access: { type: string, enum: [ read, write ] }, types: { type: array, items: { type: string } } }, required: [ slot, access, types ], additionalProperties: false } } }\n installations: { type: array, items: { type: string, pattern: '^(?<installation>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\t(?<release>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\t(?<installed>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)$' } }\n holders: { type: string, contentMediaType: application/json, contentSchema: { type: array, items: { type: object, properties: { user: { type: string, format: uuid }, name: { type: string }, email: { type: string } }, required: [ user, name, email ], additionalProperties: false } } }\n features: { type: array, items: { type: string, pattern: ^(?<feature>microphone|camera|geolocation|clipboard-read|notifications)\\t(?<consent>allowed|denied)$ } }\n features_version: { type: integer, exclusiveMinimum: 0 }\n required: [ reflected, app, app_ref, address, display_name, ownership, created ]\nhouse-app-preferences:\n description: An App's preferences. Its own vocabulary is in the body.\n properties:\n app: { type: string, pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$' }\n required: [ app ]\nhouse-app-room-binding:\n 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, 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, `unchecked`, `compatible` or `incompatible`. 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.\"\n properties:\n reflected: { type: string, format: date-time }\n app: { type: string, format: uuid }\n app_ref: { type: string, pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$' }\n slot: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' }\n types: { type: array, items: { type: string } }\n slot_access: { enum: [ read, write ] }\n shared_schema: { type: string, format: uuid }\n shared_schema_compatibility: { enum: [ unchecked, compatible, incompatible ] }\n shared_schema_findings: { type: array, items: { type: string } }\n rooms: { enum: [ all, all_but_private ] }\n left_out: { type: integer, minimum: 0 }\n entries: { type: array, items: { type: string, pattern: '^(?<room>r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz]))\\t(?<compatibility>unchecked|compatible|incompatible)$' } }\n findings: { type: array, items: { type: string, pattern: '^(?<room>r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz]))\\t(?<finding>[\\s\\S]+)$' } }\n required: [ reflected, app, app_ref, slot ]\nhouse-client:\n description: One MCP client this User authorized, named as it was created. Its last use and whether its credentials expired are read on request.\n properties:\n reflected: { type: string, format: date-time }\n client: { $ref: '#/$defs/id' }\n name: { type: string }\n kind: { enum: [ browser, headless ] }\n created: { type: string, format: date-time }\n ended: { type: string, format: date-time }\n end: { enum: [ revoked ] }\n required: [ reflected, client, name, kind, created ]\nhouse-environment:\n description: \"One Environment this User holds, with its configuration, its `label`, the name its User entered, the Rooms it reaches, `all`, `all_but_private` or the `selected` ones `rooms` names by reference, `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`. `hosting` is the kind of Environment House runs, `sandbox`, a small Environment with limited capacity, especially disk, or `vps`, an always-on Environment 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 is JSON naming the adapter kind, its installed `release` 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` is JSON naming 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, `kit_wire` the number of the Kit wire it speaks, and `form` the computer's form, `laptop`, `desktop` or `server`, as the Kit last reported them; `house_wire` is the number of the Kit wire House speaks now. 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 and `ssh_host_key` the SSH host-key fingerprint its Kit reported.\"\n properties:\n reflected: { type: string, format: date-time }\n environment: { type: string, format: uuid }\n label: { type: string }\n issued: { type: string, format: date-time }\n revoked: { type: string, format: date-time }\n reach: { enum: [ all, all_but_private, selected ] }\n rooms: { type: array, items: { type: string, pattern: ^(?<room>\\S+)$ } }\n login_code: { enum: [ yes, no ] }\n hosting: { enum: [ sandbox, vps, own ] }\n lifecycle: { enum: [ provisioning, starting, available, stopped, failed ] }\n offered: { type: array, items: { type: string, pattern: ^(?<kind>\\S+)$ } }\n wanted: { type: array, items: { type: string, pattern: ^(?<kind>\\S+)$ } }\n agents: { type: array, items: { type: string, contentMediaType: application/json, contentSchema: { type: object, properties: { kind: { type: string, minLength: 1, maxLength: 64 }, release: { anyOf: [ { type: string, minLength: 1, maxLength: 64 }, { type: 'null' } ] }, minimum: { description: \"Present only for a CLI below its adapter's minimum release: that minimum.\", type: string, minLength: 1, maxLength: 64 }, failure: { anyOf: [ { type: string, minLength: 1, maxLength: 4096 }, { type: 'null' } ] }, installing: { description: 'Present only while the Kit installs the CLI, whose release and failure are then null.', type: boolean, const: true }, signed_in: { type: boolean }, models: { maxItems: 256, type: array, items: { type: object, properties: { model: { type: string, minLength: 1 }, efforts: { maxItems: 32, type: array, items: { type: string, minLength: 1 } } }, required: [ model, efforts ], additionalProperties: false } }, modes: { maxItems: 32, type: array, items: { type: object, properties: { mode: { type: string, minLength: 1 }, name: { type: string, minLength: 1, maxLength: 128 } }, required: [ mode, name ], additionalProperties: false } }, full_access: { anyOf: [ { type: string, minLength: 1 }, { type: 'null' } ] } }, required: [ kind, release, failure, signed_in, models, modes, full_access ], additionalProperties: false } } }\n transcribe: { enum: [ on, off ] }\n transcription: { type: string, contentMediaType: application/json, contentSchema: { type: object, properties: { installed: { type: boolean }, failure: { anyOf: [ { type: string, minLength: 1, maxLength: 4096 }, { type: 'null' } ] } }, required: [ installed, failure ], additionalProperties: false } }\n os: { type: string }\n kit_release: { type: string }\n kit_wire: { type: integer, exclusiveMinimum: 0 }\n house_wire: { type: integer, exclusiveMinimum: 0 }\n form: { enum: [ laptop, desktop, server ] }\n failed: { enum: [ provisioning_failed, bootstrap_timeout, provider_capacity, provider_unavailable, provider_removed, placement_conflict, placement_intervention, environment_authority_unavailable ] }\n budget: { type: string, pattern: ^(?<budget>\\d+(?:\\.\\d+)?)$ }\n budget_spent: { enum: [ yes, no ] }\n ssh: { type: string, pattern: ^root@(?<address>\\S+)$ }\n ssh_host_key: { type: string }\n required: [ reflected, environment, label, issued, reach, hosting, offered, transcribe ]\nhouse-exports:\n 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`.\n properties:\n reflected: { type: string, format: date-time }\n exports: { type: array, items: { type: object, additionalProperties: false, properties: { export: { $ref: '#/$defs/id' }, status: { enum: [ queued, running, ready, failed ] }, created: { type: string, format: date-time }, expires: { type: string, format: date-time }, page: { type: string, pattern: '^\\/exports\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' } }, required: [ export, status, created ] } }\n required: [ reflected ]\nhouse-external-account:\n description: \"One outside account this User owns, or may use through a Room it is added to, `ownership` naming which, never its key: the origin it is sent to, the `form` it is sent in, its `kind` with the header or query parameter `name` or the path `prefix`, the address of its origin's icon once House kept one, and as `connections` each App slot connected to it in a Room this User belongs to, with that Room. To its owner, `rooms` names each Room the account is added to, the Schema Roles that may use it there and whether its use there is `suspended` until its owner adds it again.\"\n properties:\n reflected: { type: string, format: date-time }\n external_account: { $ref: '#/$defs/id' }\n name: { type: string }\n origin: { type: string, format: uri }\n form: { type: object, additionalProperties: false, properties: { kind: { enum: [ bearer, header, query, basic, path ] }, name: { type: string }, prefix: { type: string } }, required: [ kind ] }\n ownership: { enum: [ own, used ] }\n icon: { type: string, pattern: '^\\/external-accounts\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\/icon$' }\n rooms: { type: array, items: { type: object, additionalProperties: false, properties: { room: { $ref: '#/$defs/room' }, schema_roles: { type: array, items: { type: string } }, suspended: { type: boolean } }, required: [ room, schema_roles, suspended ] } }\n connections: { type: array, items: { type: object, additionalProperties: false, properties: { app: { $ref: '#/$defs/app' }, slot: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' }, room: { $ref: '#/$defs/room' } }, required: [ app, slot, room ] } }\n required: [ reflected, external_account, name, origin, form, ownership ]\nhouse-member:\n 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.\n properties:\n reflected: { type: string, format: date-time }\n user: { $ref: '#/$defs/id' }\n name: { type: string }\n about_me: { type: string }\n required: [ reflected, user, name ]\nhouse-notification:\n 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.\"\n properties:\n notification: { $ref: '#/$defs/id' }\n kind: { type: string, enum: [ share-offer, join-request, join-request-approved, app-room-binding-incompatible, app-deleted, app-call, room-ownership-offer, managed-environment-retention-opened, managed-environment-placement-intervention, storage-full, sandbox-budget-spent, break-glass-owner-disclosure, routine-start-approval-request, routine-request-declined, routine-request-started, routine-request-finished, routine-request-not-started, export-ready, export-failed, site-disabled, site-binding-incompatible, site-room-left, site-images-full, custom, trigger-did-nothing ] }\n created: { type: string, format: date-time }\n way_in: { type: object, additionalProperties: false, properties: { path: { type: string, pattern: ^\\/ }, room: { $ref: '#/$defs/room' }, app: { $ref: '#/$defs/app' }, agent: { $ref: '#/$defs/id' }, environment: { $ref: '#/$defs/id' }, routine: { $ref: '#/$defs/id' }, routine_request: { $ref: '#/$defs/id' }, trigger: { $ref: '#/$defs/id' }, site: { $ref: '#/$defs/id' } }, minProperties: 1 }\n subject: { type: string }\n share: { $ref: '#/$defs/id' }\n issuer: { type: object, additionalProperties: false, properties: { name: { type: string }, email: { type: string, format: email } }, required: [ name, email ] }\n rooms: { type: array, items: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] } }\n apps: { maxItems: 20, type: array, items: { type: object, additionalProperties: false, properties: { name: { type: string, minLength: 1, maxLength: 200 }, reaches: { type: array, items: { type: string, minLength: 1, maxLength: 512 } } }, required: [ name, reaches ] } }\n expires_at: { type: string, format: date-time }\n join_request: { $ref: '#/$defs/id' }\n user: { type: object, additionalProperties: false, properties: { name: { type: string }, email: { type: string, format: email } }, required: [ name, email ] }\n room: { type: object, additionalProperties: false, properties: { room: { $ref: '#/$defs/room' }, name: { type: string } }, minProperties: 1 }\n app: { type: object, additionalProperties: false, properties: { app: { $ref: '#/$defs/app' }, name: { type: string } }, minProperties: 1 }\n binding: { $ref: '#/$defs/id' }\n slot: { type: string }\n findings: { type: array, items: { type: string } }\n owner: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }\n caller: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ user, name ] }\n ownership_offer: { $ref: '#/$defs/id' }\n offerer: { type: object, additionalProperties: false, properties: { name: { type: string }, email: { type: string, format: email } }, required: [ name, email ] }\n environment: { type: object, additionalProperties: false, properties: { environment: { $ref: '#/$defs/id' }, name: { type: string }, kind: { enum: [ vps, sandbox ] } }, required: [ environment, name ] }\n reason: { type: string }\n deadline: { type: string, format: date-time }\n operation_kind: { type: string }\n free: { type: object, additionalProperties: false, properties: { held: { type: string, pattern: ^\\d+$ }, limit: { type: string, pattern: '^[1-9]\\d*$' }, measure: { type: string, enum: [ content, retained ] } }, required: [ held, limit, measure ] }\n budget: { type: string, pattern: ^\\d+(?:\\.\\d+)?$ }\n resets_at: { type: string, format: date-time }\n grant: { $ref: '#/$defs/id' }\n category: { type: string }\n access_started_at: { type: string, format: date-time }\n access_ended_at: { type: string, format: date-time }\n systems: { type: array, items: { type: string } }\n case_reference: { type: string }\n routine_request: { $ref: '#/$defs/id' }\n requester: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }\n agent: { type: object, additionalProperties: false, properties: { agent: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ name ] }\n conversation: { $ref: '#/$defs/id' }\n routine: { type: object, additionalProperties: false, properties: { routine: { $ref: '#/$defs/id' }, name: { type: string }, version: { type: integer, minimum: 1 } }, required: [ name ] }\n decliner: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }\n input: { type: string }\n export: { $ref: '#/$defs/id' }\n size_bytes: { type: integer, minimum: 0 }\n site: { type: object, additionalProperties: false, properties: { site: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ site, name ] }\n address: { type: string, maxLength: 300, format: uri }\n to: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }\n copies: { type: integer, minimum: 0 }\n bound: { type: integer, minimum: 0 }\n title: { type: string }\n body: { type: string }\n authorship: { type: object, additionalProperties: false, properties: { kind: { type: string, const: trigger-action }, trigger: { $ref: '#/$defs/id' }, position: { type: integer, minimum: 0 } }, required: [ kind, trigger, position ] }\n path: { type: string, maxLength: 4096, pattern: ^\\/.* }\n trigger: { type: object, additionalProperties: false, properties: { trigger: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ trigger, name ] }\n cause: { type: string }\n required: [ notification, kind, created, way_in, subject ]\nhouse-ownership-offer:\n description: One open Room ownership offer addressed to this User. The Room's name and the name of the owner it is `from` are captured when the offer is made. The page is the House approval path where this User accepts or declines.\n properties:\n reflected: { type: string, format: date-time }\n ownership_offer: { $ref: '#/$defs/id' }\n room: { type: object, additionalProperties: false, properties: { room: { $ref: '#/$defs/room' }, name: { type: string } }, required: [ room, name ] }\n from: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }\n page: { type: string, pattern: '^\\/approve\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' }\n created: { type: string, format: date-time }\n expires: { type: string, format: date-time }\n required: [ reflected, ownership_offer, room, from, page, created, expires ]\nhouse-panel-preferences:\n description: The panel's preferences at /rooms/private/settings/panel.md. Its own vocabulary is in the body.\n properties: {}\nhouse-profile:\n description: The User's display name, the email they sign in with and accepted about-me Markdown.\n properties:\n reflected: { type: string, format: date-time }\n name: { type: string }\n email: { type: string }\n about_me: { type: string }\n required: [ reflected, name, email ]\nhouse-public-room:\n 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.\n properties:\n reflected: { type: string, format: date-time }\n room: { $ref: '#/$defs/room' }\n handle: { type: string, minLength: 6, maxLength: 63, pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$' }\n name: { type: string }\n archived: { type: string, format: date-time }\n required: [ reflected, room, handle, name ]\nhouse-push-address:\n description: \"One push address this User minted, never its secret: the Room it captures into, the Source it names, and where an outside service's post carries its event's identifier, the header `event_header` or the JSON pointer `event_json`.\"\n properties:\n reflected: { type: string, format: date-time }\n push_address: { $ref: '#/$defs/id' }\n room: { $ref: '#/$defs/room' }\n source: { type: string }\n event_header: { type: string }\n event_json: { type: string }\n required: [ reflected, push_address, room, source ]\nhouse-requests:\n description: \"The Routine Requests of one Room this User reads by Local Read: each one waiting or started under `current` and the 50 that changed last under `history`. Each names its `routine` by `name` and `version`, the `target` User whose Agent it asks, the `agent` that took it, the `routine_access` and `record` it went through, the Users it was `approved_by` and `settled_by`, and when it was `created`, `approved`, `activated` and `settled`; a fact it does not hold is absent. Only the Agent\u2019s owner sees a request\u2019s conversation. A Room with no request has no such document.\"\n properties:\n reflected: { type: string, format: date-time }\n room: { $ref: '#/$defs/room' }\n current: { type: array, items: { $ref: '#/$defs/request' } }\n history: { type: array, items: { $ref: '#/$defs/request' } }\n required: [ reflected, room, current, history ]\nhouse-room:\n 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. `read` is how this User reads the Room, `mcp`, `online` or `local`, 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 read 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; `routines` lists the Routine Accesses this User or the Room's Triggers may call in it, each with its `routine`, by `name`, `description`, `input` and `version`, its `agent` and that Agent's `owner` by name: `starts_without_approval` on one this User may call and `triggers: true` on one the Triggers may call.\"\n properties:\n reflected: { type: string, format: date-time }\n room: { $ref: '#/$defs/room' }\n handle: { type: string, minLength: 6, maxLength: 63, pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$' }\n name: { type: string }\n my_room: { const: true }\n membership: { enum: [ owner, member ] }\n ownership_offer: { type: object, additionalProperties: false, properties: { nominee: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ user, name ] }, expires: { type: string, format: date-time } }, required: [ nominee, expires ] }\n access: { enum: [ owner, manage, edit, read ] }\n read: { enum: [ mcp, online, local ] }\n operations: { type: array, items: { type: string, enum: [ write, delete, export, manageAccess ] } }\n owner: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }\n members: { type: integer, minimum: 0 }\n triggers: { type: integer, minimum: 0 }\n published: { enum: [ yes, no ] }\n intake: { enum: [ yes, no ] }\n size: { type: number }\n admission: { enum: [ admitted, pending ] }\n created: { type: string, format: date-time }\n archived: { type: string, format: date-time }\n public: { type: string, format: date-time }\n policy: { enum: [ On, Off ] }\n indexing: { type: array, items: { type: object, additionalProperties: false, properties: { path: { type: string, minLength: 1 }, policy: { enum: [ On, Off ] } }, required: [ path, policy ] } }\n shared_schema: { type: object, additionalProperties: false, properties: { shared_schema: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ shared_schema, name ] }\n roster: { type: array, items: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' }, name: { type: string }, owner: { type: boolean }, email: { type: string }, admitted: { type: string, format: date-time }, access: { type: string, enum: [ owner, manage, edit, read ] }, document: { $ref: '#/$defs/document' }, schema_roles: { type: array, items: { type: string } }, held: { type: object, additionalProperties: false, properties: { read: { anyOf: [ { type: string, enum: [ mcp, online, local ] }, { type: 'null' } ] }, operations: { type: array, items: { type: string, enum: [ write, delete, export, manageAccess ] } } }, required: [ read, operations ] } }, required: [ user, name, owner, email ] } }\n rights: { type: array, items: { type: object, additionalProperties: false, properties: { user: { $ref: '#/$defs/id' }, name: { type: string }, entries: { type: array, items: { type: object, additionalProperties: false, properties: { namespace: { $ref: '#/$defs/namespace' }, read: { anyOf: [ { type: string, enum: [ mcp, online, local ] }, { type: 'null' } ] }, operations: { type: array, items: { type: string, enum: [ write, delete, export, manageAccess ] } }, sources: { type: array, items: { type: object, additionalProperties: false, properties: { kind: { type: string, enum: [ direct, inherited ] }, namespace: { $ref: '#/$defs/namespace' }, read: { anyOf: [ { type: string, enum: [ mcp, online, local ] }, { type: 'null' } ] }, operations: { type: array, items: { type: string, enum: [ write, delete, export, manageAccess ] } } }, required: [ kind, namespace, read, operations ] } } }, required: [ namespace, read, operations, sources ] } }, direct: { type: array, items: { type: object, additionalProperties: false, properties: { namespace: { $ref: '#/$defs/namespace' }, read: { anyOf: [ { type: string, enum: [ mcp, online, local ] }, { type: 'null' } ] }, operations: { type: array, items: { type: string, enum: [ write, delete, export, manageAccess ] } } }, required: [ namespace, read, operations ] } }, admitted: { type: string, format: date-time }, schema_roles: { type: array, items: { type: string } } }, required: [ user, name, entries, direct, schema_roles ] } }\n routines: { type: array, items: { type: object, additionalProperties: false, properties: { routine_access: { $ref: '#/$defs/id' }, agent: { $ref: '#/$defs/id' }, owner: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }, routine: { type: object, additionalProperties: false, properties: { name: { type: string }, description: { type: string }, input: { type: string }, version: { type: integer, exclusiveMinimum: 0 } }, required: [ name, description, input, version ] }, starts_without_approval: { type: boolean }, triggers: { type: boolean, const: true } }, required: [ routine_access, agent, owner, routine ] } }\n required: [ reflected, room, name, membership, access, admission, created, policy ]\nhouse-routine-access:\n description: \"One Routine Access this User granted, with the name of its Routine in `routine_name`. While a scope is `selected_users`, each invokers or starters entry names one User by identifier, account email and display name as of the last write of this document, or by identifier alone once that User has left the Room. An entry naming the Access's Room by its reference admits the Room's Triggers as a caller, or lets them start without approval, whatever the scope. `allowance` is the daily request allowance every caller is under, absent when open, `0` excluding them. Each allowances entry names a caller under a value of their own instead: the User or the Room and their allowance, or the caller alone when they have none. While `follow_up_scope` is `selected_users`, each follow_ups entry names one User who may send follow-up mail to the conversations their requests started, as invokers entries name them; `all_admitted` lets every User caller send it, and the Agent's owner always may. `mail_allowance` is the daily follow-up mail allowance every User caller is under, and each mail_allowances entry names a User under an allowance of their own. `last_failure` is the latest withdrawn request, whatever starts after it: its origin, `user` or `trigger`, its time and its reason.\"\n properties:\n reflected: { type: string, format: date-time }\n access: { type: string, format: uuid }\n routine: { type: string, format: uuid }\n routine_name: { type: string }\n agent: { type: string, format: uuid }\n room: { type: string, pattern: '^r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$' }\n invoker_scope: { type: string, enum: [ all_members, selected_users ] }\n start_scope: { type: string, enum: [ none, all_admitted, selected_users ] }\n follow_up_scope: { type: string, enum: [ none, all_admitted, selected_users ] }\n granted: { type: string, format: date-time }\n revoked: { type: string, format: date-time }\n invokers: { type: array, items: { type: string, pattern: '^(?:(?<user>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\\t(?<email>\\S+)\\t(?<name>[\\s\\S]+))?|(?<room>r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])))$' } }\n starters: { type: array, items: { type: string, pattern: '^(?:(?<user>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\\t(?<email>\\S+)\\t(?<name>[\\s\\S]+))?|(?<room>r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])))$' } }\n follow_ups: { type: array, items: { type: string, pattern: '^(?<user>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\\t(?<email>\\S+)\\t(?<name>[\\s\\S]+))?$' } }\n allowance: { type: integer, minimum: 0 }\n allowances: { type: array, items: { type: string, pattern: '^(?:(?<user>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(?<room>r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])))(?:\\t(?<daily_requests>\\d+))?$' } }\n mail_allowance: { type: integer, minimum: 0 }\n mail_allowances: { type: array, items: { type: string, pattern: '^(?<user>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\t(?<daily_mail>\\d+)$' } }\n last_failure: { type: string, pattern: '^(?<origin>user|trigger)\\t(?<at>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)\\t(?<reason>[\\s\\S]+)$' }\n required: [ reflected, access, routine, routine_name, agent, room, invoker_scope, start_scope, follow_up_scope, granted ]\nhouse-share:\n description: \"One Share this User issued, kept until it expires or is cancelled. An email delivery carries `share_to`, the address this User entered; a link delivery never carries the link. Each item names its `kind`, `room` or `app`, the Room or App under that key with its `name`, its `state`, `offerable`, `held`, `accepted`, `declined` or `superseded`, for a Room item the `read` level it grants, the `operations` it grants as this User chose them and the Schema Roles its member gets as `roles` when it names any, and for an App item the external `origins` its latest release declared when this document was written, when it declared any. An App item is never shown `held`. Each pack entry names an App item's `app`, one of its `slot`s, and the `room` of the Room item that fills it, with that Room's `name`. Each `join_requests` entry of a link delivery names one Join request, its `state`, `waiting`, `approved` or `declined`, and the User it is `from` by account `email` and display `name` as House held them when this document was written, oldest first; the House approval path of a Join request is `/approve/` followed by its identifier.\"\n properties:\n reflected: { type: string, format: date-time }\n share: { $ref: '#/$defs/id' }\n share_link: { enum: [ yes, no ] }\n share_to: { type: string, format: email }\n items: { type: array, items: { type: object, additionalProperties: false, properties: { kind: { enum: [ room, app ] }, name: { type: string }, state: { enum: [ offerable, held, accepted, declined, superseded ] }, read: { enum: [ mcp, online, local ] }, operations: { type: array, items: { type: string, enum: [ write, delete, export, manageAccess ] } }, roles: { type: array, items: { type: string } }, origins: { type: array, items: { type: string, format: uri } }, room: { $ref: '#/$defs/room' }, app: { $ref: '#/$defs/app' } }, required: [ kind, name, state, operations ] } }\n pack: { type: array, items: { type: object, additionalProperties: false, properties: { app: { $ref: '#/$defs/app' }, slot: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' }, room: { type: object, additionalProperties: false, properties: { room: { $ref: '#/$defs/room' }, name: { type: string } }, required: [ room, name ] } }, required: [ app, slot, room ] } }\n join_requests: { type: array, items: { type: object, additionalProperties: false, properties: { join_request: { $ref: '#/$defs/id' }, state: { enum: [ waiting, approved, declined ] }, from: { type: object, additionalProperties: false, properties: { email: { type: string }, name: { type: string } }, required: [ email, name ] } }, required: [ join_request, state, from ] } }\n created: { type: string, format: date-time }\n expires: { type: string, format: date-time }\n required: [ reflected, share, share_link, created, expires ]\nhouse-share-offer:\n description: \"One live Share offered to this User by email while an item of it is still offered, `from` its issuer by display `name` and account `email`. Each item names its `kind`, `room` or `app`, its `name`, its `state` for this User, `offerable`, `held`, `accepted`, `declined` or `superseded`, for a Room item the `read` level it grants and the `operations` it grants; it carries no reference. A Room item's read level and operations are the ones its issuer chose for the Room's content; its holder reads the Room's settings at that level, and holds `manageAccess` over its document model when it names `manageAccess`. A Room item naming Schema Roles names them as `roles`, which accepting the Share adds to this User's own in that Room. An App item grants use of the App and never its source, is never shown `held`, and names as `origins` the external origins its latest release declared when this document was written, when it declared any, which accepting the Share lets its code reach. Each pack entry names an offered `app`, one of its `slot`s, and the offered `room` that fills it, each by `name`. Names are as House held them when this document was written. The page is the House approval path where this User accepts or declines the whole Share.\"\n properties:\n reflected: { type: string, format: date-time }\n share: { $ref: '#/$defs/id' }\n from: { type: object, additionalProperties: false, properties: { name: { type: string }, email: { type: string, format: email } }, required: [ name, email ] }\n page: { type: string, pattern: '^\\/approve\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' }\n items: { type: array, items: { type: object, additionalProperties: false, properties: { kind: { enum: [ room, app ] }, name: { type: string }, state: { enum: [ offerable, held, accepted, declined, superseded ] }, read: { enum: [ mcp, online, local ] }, operations: { type: array, items: { type: string, enum: [ write, delete, export, manageAccess ] } }, roles: { type: array, items: { type: string } }, origins: { type: array, items: { type: string, format: uri } } }, required: [ kind, name, state, operations ] } }\n pack: { type: array, items: { type: object, additionalProperties: false, properties: { app: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] }, slot: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$' }, room: { type: object, additionalProperties: false, properties: { name: { type: string } }, required: [ name ] } }, required: [ app, slot, room ] } }\n created: { type: string, format: date-time }\n expires: { type: string, format: date-time }\n required: [ reflected, share, from, page, created, expires ]\nhouse-site:\n description: \"One Site this User owns: its name, its address under this environment's Site suffix, its own App with that App's tab icon as a Site shows it, the running release of that App, which the Site serves, its title and Intake Room, whether an operator disabled it, its mode, and every Room slot of that release in its order. Each slot entry names the slot, one Room its list holds, that entry's address segment and the last compatibility outcome of that entry, in list order, or the slot and `empty` for a slot that lists no Room; each finding names its slot, its Room and one exact structural finding of that Room against the slot. An incompatible entry stays listed and blocks nothing. `release` is absent until that App's first release. `disabled` is `yes` while an operator holds the Site disabled, and `disabled_reason` carries the reason the operator stated; visitors then find the Site unavailable, this User may still change or delete it, and only an operator enables it again. `mode` is `snapshot` while visitors see the Published Snapshot `publication` names, or `live` while they see what its Rooms hold as it changes, which needs Full House; only this User changes it. `unpublished` is `yes` while this User holds the Site unpublished: visitors then find it unavailable at every address and nothing else changes, and only this User's republication serves it again; an operator's enable never does. `suspended` is `yes` while visitors find the Site unavailable at every address for the reason `suspended_reason` names: `full_house_required` while the Site is `live` and this User lacks Full House, or `public_delivery_limit` while what House's server sent for this User's Sites this UTC month has reached this User's Public delivery limit, unless `public_overage` is `on` while this User holds Full House. A suspension keeps the publication, the addresses, the Custom domains and every act of this User's, and ends by itself at the next UTC month, when this User gains Full House or when `public_overage` turns `on` while this User holds Full House; it lifts no Unpublish and no operator's disable. `public_overage` is `on` while this User keeps the Site serving past the Public delivery limit, which it does only while this User holds Full House; what it sends past the limit is charged as overage. It stays `on` when Full House ends and acts again when Full House returns. `publication` is the Published Snapshot the Site serves, or serves once republished, absent while it holds none. `acts` names the publication acts this User may take now: `unpublish` while the Site is published, `republish` while it is unpublished and holds a publication to serve; Publish data also serves an unpublished Site again, with what its Rooms hold. A cleared title is absent. `description` carries presentation. `screenshot` is the address of the image House captured of the Site at its primary address after a release, which a shared link to the Site shows, absent before the first capture. `google_analytics_id` 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: why (`over_bound`, `query_refused` or `unavailable`), the route and when; 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, its state `pending`, `active` or `failed`, the DNS alias target its hostname must point at, which is this environment's and the same for every domain, and the edge's reason when it gives one.\"\n properties:\n reflected: { type: string, format: date-time }\n site: { type: string, format: uuid }\n name: { type: string }\n address: { type: string, format: uri }\n addresses: { type: array, items: { type: string, format: uri } }\n primary_address: { type: string, format: uri }\n domains: { type: array, items: { type: string, pattern: '^(?<host>\\S+)\\t(?<state>pending|active|failed)\\t(?<dns_target>\\S+)(?:\\t(?<reason>[\\s\\S]+))?$' } }\n app: { type: string, format: uuid }\n app_ref: { type: string, pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$' }\n tab_icon_light: { type: string, pattern: ^data:image\\/ }\n tab_icon_dark: { type: string, pattern: ^data:image\\/ }\n tab_icon_colours: { type: array, items: { type: string, pattern: '^#[0-9a-f]{6}$' } }\n tab_icon_blend: { enum: [ linear, radial ] }\n tab_icon_angle: { type: integer, minimum: 0, maximum: 359 }\n release: { type: string, pattern: '^(?<release>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\t(?<sequence>\\d+)$' }\n title: { type: string }\n description: { type: string }\n screenshot: { type: string, format: uri }\n google_analytics_id: { type: string, pattern: '^G-[A-Z0-9]{1,32}$' }\n intake_room: { type: string, pattern: '^r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$' }\n external_origins: { type: array, items: { type: string, format: uri } }\n disabled: { enum: [ yes, no ] }\n disabled_reason: { type: string }\n mode: { enum: [ snapshot, live ] }\n unpublished: { enum: [ yes, no ] }\n suspended: { enum: [ yes, no ] }\n suspended_reason: { type: string, enum: [ full_house_required, public_delivery_limit ] }\n public_overage: { enum: [ on, off ] }\n publication: { type: string, format: uuid }\n acts: { type: array, items: { type: string, enum: [ unpublish, republish ] } }\n indexing: { enum: [ yes, no ] }\n entry_fallback: { type: string, pattern: ^(?<cause>over_bound|query_refused|unavailable)\\t(?<route>\\S+)\\t(?<recorded>\\S+)$ }\n created: { type: string, format: date-time }\n new_browsers: { type: integer, minimum: 0 }\n submissions: { type: integer, minimum: 0 }\n notify_me: { enum: [ on, off ] }\n image_copies: { type: integer, minimum: 0 }\n image_copy_bound: { type: integer, minimum: 0 }\n image_copy_limit_reached: { enum: [ yes, no ] }\n slots: { type: array, items: { type: string, pattern: '^(?<slot>[a-z0-9]([a-z0-9-]*[a-z0-9])?)\\t(?:(?<empty>empty)|(?<room>r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz]))\\t(?<segment>\\S+)\\t(?<compatibility>unchecked|compatible|incompatible))$' } }\n findings: { type: array, items: { type: string, pattern: '^(?<slot>[a-z0-9]([a-z0-9-]*[a-z0-9])?)\\t(?<room>r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz]))\\t(?<finding>[\\s\\S]+)$' } }\n required: [ reflected, site, name, address, primary_address, app, app_ref, disabled, mode, unpublished, suspended, public_overage, indexing, created, new_browsers, submissions, notify_me, image_copies, image_copy_bound, image_copy_limit_reached ]\nhouse-web-wizard:\n description: \"One Web Wizard an agent made for this User: the `environment` it runs on, with that Environment's `name`, and its `state`, `waiting` until its owner presses Run, `running`, `finished` with the script's `exit_code`, `failed`, `cancelled` when its page closed before the script ended, or `lapsed` when nobody ran it in its time. Its body is the script, whole, in one fenced code block. The terminal's output is never kept.\"\n properties:\n reflected: { type: string, format: date-time }\n web_wizard: { $ref: '#/$defs/id' }\n environment: { type: object, additionalProperties: false, properties: { environment: { $ref: '#/$defs/id' }, name: { type: string } }, required: [ environment, name ] }\n state: { enum: [ waiting, running, finished, failed, cancelled, lapsed ] }\n exit_code: { type: integer }\n required: [ reflected, web_wizard, environment, state ]\n";
|
|
2
|
-
//# sourceMappingURL=house-model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"house-model.d.ts","sourceRoot":"","sources":["../src/house-model.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,k/pDAwb7B,CAAC"}
|