@agentshouse/mdruntime-adapter 0.1.0-cd61dfca5d699 → 0.1.0-cd75dfaf57319

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +2 -2
  2. package/dist/actions.d.ts +4 -66
  3. package/dist/actions.d.ts.map +1 -1
  4. package/dist/actions.js +7 -339
  5. package/dist/adapter.d.ts.map +1 -1
  6. package/dist/adapter.js +229 -371
  7. package/dist/app-reference.d.ts +2 -0
  8. package/dist/app-reference.d.ts.map +1 -0
  9. package/dist/app-reference.js +2 -0
  10. package/dist/crockford.d.ts +4 -0
  11. package/dist/crockford.d.ts.map +1 -0
  12. package/dist/crockford.js +3 -0
  13. package/dist/discovery.d.ts +23 -14
  14. package/dist/discovery.d.ts.map +1 -1
  15. package/dist/discovery.js +92 -54
  16. package/dist/history.d.ts +12 -0
  17. package/dist/history.d.ts.map +1 -0
  18. package/dist/history.js +92 -0
  19. package/dist/house-model.d.ts +719 -0
  20. package/dist/house-model.d.ts.map +1 -0
  21. package/dist/house-model.js +393 -0
  22. package/dist/index.d.ts +11 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +10 -1
  25. package/dist/model.d.ts +8 -3
  26. package/dist/model.d.ts.map +1 -1
  27. package/dist/model.js +37 -34
  28. package/dist/part.d.ts +14 -0
  29. package/dist/part.d.ts.map +1 -0
  30. package/dist/part.js +90 -0
  31. package/dist/read.d.ts +56 -63
  32. package/dist/read.d.ts.map +1 -1
  33. package/dist/read.js +240 -285
  34. package/dist/refusal.d.ts +0 -3
  35. package/dist/refusal.d.ts.map +1 -1
  36. package/dist/refusal.js +0 -5
  37. package/dist/room-stream.d.ts +20 -0
  38. package/dist/room-stream.d.ts.map +1 -0
  39. package/dist/room-stream.js +57 -0
  40. package/dist/room-types.d.ts +7 -0
  41. package/dist/room-types.d.ts.map +1 -0
  42. package/dist/room-types.js +123 -0
  43. package/dist/search.d.ts +5 -0
  44. package/dist/search.d.ts.map +1 -0
  45. package/dist/search.js +47 -0
  46. package/dist/site.d.ts.map +1 -1
  47. package/dist/site.js +88 -195
  48. package/dist/space-schema.d.ts +7 -0
  49. package/dist/space-schema.d.ts.map +1 -0
  50. package/dist/space-schema.js +18 -0
  51. package/dist/stream.d.ts +14 -14
  52. package/dist/stream.d.ts.map +1 -1
  53. package/dist/stream.js +170 -422
  54. package/dist/transport.d.ts +55 -40
  55. package/dist/transport.d.ts.map +1 -1
  56. package/dist/transport.js +54 -11
  57. package/dist/upload.d.ts +12 -0
  58. package/dist/upload.d.ts.map +1 -0
  59. package/dist/upload.js +63 -0
  60. package/dist/write.d.ts +18 -2
  61. package/dist/write.d.ts.map +1 -1
  62. package/dist/write.js +105 -75
  63. package/package.json +8 -4
  64. package/AGENTS.md +0 -299
  65. package/dist/gather.d.ts +0 -4
  66. package/dist/gather.d.ts.map +0 -1
  67. package/dist/gather.js +0 -45
  68. package/dist/handed.d.ts +0 -15
  69. package/dist/handed.d.ts.map +0 -1
  70. package/dist/handed.js +0 -38
  71. package/dist/referrer.d.ts +0 -7
  72. package/dist/referrer.d.ts.map +0 -1
  73. package/dist/referrer.js +0 -35
@@ -0,0 +1 @@
1
+ {"version":3,"file":"house-model.d.ts","sourceRoot":"","sources":["../src/house-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,eAAO,MAAM,uBAAuB;aAClC,KAAK;iBACH,IAAI;qBACF,WAAW,EAAE,sDAAsD;qBACnE,IAAI,EAAE,QAAQ;qBACd,OAAO,EAAE,kFAAkF;;iBAE7F,GAAG;qBACD,WAAW,EAAE,oDAAoD;qBACjE,IAAI,EAAE,QAAQ;qBACd,OAAO,EAAE,kFAAkF;;iBAE7F,QAAQ;qBACN,WAAW,EAAE,wEAAwE;qBACrF,IAAI,EAAE,QAAQ;qBACd,OAAO,EACL,oHAAoH;;iBAExH,EAAE;qBACA,WAAW,EACT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E,WAAW,MAAM,CAAC,EAAE,CAAA;CAAE,GAC/C,CAAC,SAAS,MAAM,WAAW,GACzB,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACrB,KAAK,GACP,CAAC,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;CAAE,GAClC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACX,CAAC,SAAS;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACvC,UAAU,CAAC,CAAC,CAAC,GACb,OAAO,CAAC;AAEtB,KAAK,QAAQ,CAAC,IAAI,SAAS,cAAc,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;CAAE,GAC7F,CAAC,GACD,EAAE,CAAC;AAEP,MAAM,MAAM,mBAAmB,CAAC,IAAI,SAAS,cAAc,IAAI,UAAU,CAAC;IACxE,QAAQ,CAAC,UAAU,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE;YAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAA;SAAE,CAAA;KAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClF,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;CAC9D,CAAC,CAAC"}
@@ -0,0 +1,393 @@
1
+ export const HOUSE_MODEL_DECLARATION = {
2
+ $defs: {
3
+ room: {
4
+ description: 'A Room, by its Room reference, under the key `room`.',
5
+ type: 'string',
6
+ pattern: '^r_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
7
+ },
8
+ app: {
9
+ description: 'An App, by its App reference, under the key `app`.',
10
+ type: 'string',
11
+ pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
12
+ },
13
+ document: {
14
+ description: 'A document of a Room, by its file reference, under the key `document`.',
15
+ type: 'string',
16
+ pattern: '^af_([123456789abcdefghjkmnpqrstvwxyz][0123456789abcdefghjkmnpqrstvwxyz]*)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
17
+ },
18
+ id: {
19
+ description: 'Any other entity, by its identifier, under the key of its kind. An entity a type says more about is an object holding it under that key beside its facts.',
20
+ type: 'string',
21
+ format: 'uuid',
22
+ },
23
+ namespace: {
24
+ description: 'The Namespace a grant entry covers, an App or a Room by its reference with the area of it.',
25
+ type: 'string',
26
+ maxLength: 512,
27
+ pattern: '^(?:a_[A-Za-z0-9._-]+(?:\\/source)?|r_[A-Za-z0-9._-]+(?:\\/(?:settings|settings\\/schema|settings\\/model|settings\\/indexing|content))?)$',
28
+ },
29
+ },
30
+ 'house-app-preferences': {
31
+ description: "An App's preferences. Its own vocabulary is in the body.",
32
+ properties: { app: { $ref: '#/$defs/app' } },
33
+ required: ['app'],
34
+ },
35
+ 'house-notification': {
36
+ description: "One kept Notification for this User: its kind, when it was sent as `created`, its way in, its email's subject and each fact of its value that is not sealed, named in snake_case. An entity a fact names is an object holding its identifier under the key of its kind, when the notification carries it, and its `name`, `email` and other facts beside it; a fact holding null is absent. `way_in` is either the House `path` it opens or the entity it is about, by its identifier under the key of its kind, a Trigger with its `room`. Its body is its email's words in Markdown. Both were worded once, in the User's language when it was delivered; an App may show them or word it itself from its kind and value. Read state belongs to each browser.",
37
+ properties: {
38
+ notification: { $ref: '#/$defs/id' },
39
+ kind: {
40
+ type: 'string',
41
+ enum: [
42
+ 'share-offer',
43
+ 'join-request',
44
+ 'join-request-approved',
45
+ 'app-room-binding-incompatible',
46
+ 'app-call',
47
+ 'room-ownership-offer',
48
+ 'managed-environment-retention-opened',
49
+ 'managed-environment-placement-intervention',
50
+ 'storage-full',
51
+ 'sandbox-budget-spent',
52
+ 'break-glass-owner-disclosure',
53
+ 'agent-function-start-approval-request',
54
+ 'export-ready',
55
+ 'export-failed',
56
+ 'site-disabled',
57
+ 'site-binding-incompatible',
58
+ 'site-images-full',
59
+ 'custom',
60
+ ],
61
+ },
62
+ created: { type: 'string', format: 'date-time' },
63
+ way_in: {
64
+ type: 'object',
65
+ additionalProperties: false,
66
+ properties: {
67
+ path: { type: 'string', pattern: '^\\/' },
68
+ room: { $ref: '#/$defs/room' },
69
+ app: { $ref: '#/$defs/app' },
70
+ environment: { $ref: '#/$defs/id' },
71
+ trigger: { $ref: '#/$defs/id' },
72
+ site: { $ref: '#/$defs/id' },
73
+ },
74
+ minProperties: 1,
75
+ },
76
+ subject: { type: 'string' },
77
+ share: { $ref: '#/$defs/id' },
78
+ issuer: {
79
+ type: 'object',
80
+ additionalProperties: false,
81
+ properties: { name: { type: 'string' }, email: { type: 'string', format: 'email' } },
82
+ required: ['name', 'email'],
83
+ },
84
+ rooms: {
85
+ type: 'array',
86
+ items: {
87
+ type: 'object',
88
+ additionalProperties: false,
89
+ properties: { name: { type: 'string' } },
90
+ required: ['name'],
91
+ },
92
+ },
93
+ apps: {
94
+ maxItems: 20,
95
+ type: 'array',
96
+ items: {
97
+ type: 'object',
98
+ additionalProperties: false,
99
+ properties: {
100
+ name: { type: 'string', minLength: 1, maxLength: 200 },
101
+ reaches: { type: 'array', items: { type: 'string', minLength: 1, maxLength: 512 } },
102
+ },
103
+ required: ['name', 'reaches'],
104
+ },
105
+ },
106
+ expires_at: { type: 'string', format: 'date-time' },
107
+ join_request: { $ref: '#/$defs/id' },
108
+ user: {
109
+ type: 'object',
110
+ additionalProperties: false,
111
+ properties: { name: { type: 'string' }, email: { type: 'string', format: 'email' } },
112
+ required: ['name', 'email'],
113
+ },
114
+ room: {
115
+ type: 'object',
116
+ additionalProperties: false,
117
+ properties: { room: { $ref: '#/$defs/room' }, name: { type: 'string' } },
118
+ minProperties: 1,
119
+ },
120
+ app: {
121
+ type: 'object',
122
+ additionalProperties: false,
123
+ properties: { app: { $ref: '#/$defs/app' }, name: { type: 'string' } },
124
+ minProperties: 1,
125
+ },
126
+ release: { type: 'integer', minimum: 1 },
127
+ binding: { $ref: '#/$defs/id' },
128
+ slot: { type: 'string' },
129
+ findings: { type: 'array', items: { type: 'string' } },
130
+ caller: {
131
+ type: 'object',
132
+ additionalProperties: false,
133
+ properties: { user: { $ref: '#/$defs/id' }, name: { type: 'string' } },
134
+ required: ['user', 'name'],
135
+ },
136
+ ownership_offer: { $ref: '#/$defs/id' },
137
+ offerer: {
138
+ type: 'object',
139
+ additionalProperties: false,
140
+ properties: { name: { type: 'string' }, email: { type: 'string', format: 'email' } },
141
+ required: ['name', 'email'],
142
+ },
143
+ environment: {
144
+ type: 'object',
145
+ additionalProperties: false,
146
+ properties: {
147
+ environment: { $ref: '#/$defs/id' },
148
+ name: { type: 'string' },
149
+ kind: { enum: ['vps', 'sandbox'] },
150
+ },
151
+ required: ['environment', 'name'],
152
+ },
153
+ reason: { type: 'string' },
154
+ deadline: { type: 'string', format: 'date-time' },
155
+ operation_kind: { type: 'string' },
156
+ free: {
157
+ type: 'object',
158
+ additionalProperties: false,
159
+ properties: {
160
+ held: { type: 'string', pattern: '^\\d+$' },
161
+ limit: { type: 'string', pattern: '^[1-9]\\d*$' },
162
+ measure: { type: 'string', enum: ['content', 'retained'] },
163
+ },
164
+ required: ['held', 'limit', 'measure'],
165
+ },
166
+ budget: { type: 'string', pattern: '^\\d+(?:\\.\\d+)?$' },
167
+ resets_at: { type: 'string', format: 'date-time' },
168
+ grant: { $ref: '#/$defs/id' },
169
+ category: { type: 'string' },
170
+ access_started_at: { type: 'string', format: 'date-time' },
171
+ access_ended_at: { type: 'string', format: 'date-time' },
172
+ systems: { type: 'array', items: { type: 'string' } },
173
+ case_reference: { type: 'string' },
174
+ agent_function_request: { $ref: '#/$defs/id' },
175
+ requester: {
176
+ type: 'object',
177
+ additionalProperties: false,
178
+ properties: { name: { type: 'string' } },
179
+ required: ['name'],
180
+ },
181
+ agent: {
182
+ type: 'object',
183
+ additionalProperties: false,
184
+ properties: { agent: { $ref: '#/$defs/id' }, name: { type: 'string' } },
185
+ required: ['name'],
186
+ },
187
+ conversation: { $ref: '#/$defs/id' },
188
+ agent_function: {
189
+ type: 'object',
190
+ additionalProperties: false,
191
+ properties: {
192
+ name: { type: 'string' },
193
+ version: { type: 'integer', minimum: 1 },
194
+ },
195
+ required: ['name'],
196
+ },
197
+ export: { $ref: '#/$defs/id' },
198
+ size_bytes: { type: 'integer', minimum: 0 },
199
+ site: {
200
+ type: 'object',
201
+ additionalProperties: false,
202
+ properties: { site: { $ref: '#/$defs/id' }, name: { type: 'string' } },
203
+ required: ['site', 'name'],
204
+ },
205
+ address: { type: 'string', maxLength: 300, format: 'uri' },
206
+ copies: { type: 'integer', minimum: 0 },
207
+ bound: { type: 'integer', minimum: 0 },
208
+ title: { type: 'string' },
209
+ body: { type: 'string' },
210
+ authorship: {
211
+ type: 'object',
212
+ additionalProperties: false,
213
+ properties: {
214
+ kind: { type: 'string', const: 'trigger-action' },
215
+ trigger: { $ref: '#/$defs/id' },
216
+ position: { type: 'integer', minimum: 0 },
217
+ },
218
+ required: ['kind', 'trigger', 'position'],
219
+ },
220
+ path: { type: 'string', maxLength: 4096, pattern: '^\\/.*' },
221
+ },
222
+ required: ['notification', 'kind', 'created', 'way_in', 'subject'],
223
+ },
224
+ 'house-panel-preferences': {
225
+ description: "The panel's preferences at /rooms/private/settings/panel.md. Its own vocabulary is in the body.",
226
+ properties: {},
227
+ },
228
+ 'house-agent-function': {
229
+ description: "One Agent function that serves this Room, which House alone writes from its owner's document in their Private Room: the `agent_function` by identifier, its `description`, the `input` a caller sends, empty when it takes nothing, and the `agent` it starts, by `agent` and the `name` that Agent had when this card was last written. The Agent function's instruction is never written here.",
230
+ properties: {
231
+ reflected: { type: 'string', format: 'date-time' },
232
+ agent_function: { $ref: '#/$defs/id' },
233
+ description: { type: 'string' },
234
+ input: { type: 'string' },
235
+ agent: {
236
+ type: 'object',
237
+ additionalProperties: false,
238
+ properties: { agent: { $ref: '#/$defs/id' }, name: { type: 'string' } },
239
+ required: ['agent', 'name'],
240
+ },
241
+ },
242
+ required: ['reflected', 'agent_function', 'description', 'input', 'agent'],
243
+ },
244
+ 'house-agent-function-document': {
245
+ description: 'One Agent function as its owner writes it in their Private Room at rooms/<room-handle>/agent-functions/<name>.md, a path that binds this type and a document that names no type: what it does as `description`, what a caller sends as `input`, empty when it takes nothing, and the `agent` it starts, by identifier. Its body is the instruction that Agent follows.',
246
+ properties: {
247
+ description: { type: 'string', maxLength: 2000, pattern: '\\S' },
248
+ input: { type: 'string' },
249
+ agent: { $ref: '#/$defs/id' },
250
+ },
251
+ required: ['description', 'input', 'agent'],
252
+ },
253
+ 'house-trigger': {
254
+ description: "One Trigger of this Room as its acts wrote it, which House alone writes: its `description`, the `condition` it fires on, its `actions` in order, whether each action and the Trigger are `enabled`, `paused_by` `types` while a change of the Room's types paused it, its `creator` by `user` and the `name` they had then, and when it was `created`. A `notify` action reaches the `users` its `to` names, the members its `fields` name in the matched document and the holders of its `roles`; an `agent_function` action sends its `payload` to the Agent function whose card under this Room's `house/agent-functions/` its `card` names, absent while this Room holds no card of that Agent function; a `message` action puts its `text` into the active conversation that Agent function started for what the Event is about, or starts that Agent function when none is active; a `done` action marks Done every active conversation an Agent function request of this Room started for the Event's document; a `function` action runs the `function` its `app`'s latest release declares, on House's servers, or, naming no `app`, the Room owner's Environment function of that name on its Environment, which only a Trigger of their Private Room holds. Whether an action's target holds is not written: it follows from the Room's members, the Agent function's card, the App's latest release and the owner's functions.",
255
+ properties: {
256
+ reflected: { type: 'string', format: 'date-time' },
257
+ trigger: { $ref: '#/$defs/id' },
258
+ description: { type: 'string' },
259
+ condition: {
260
+ description: 'When it fires, as the Trigger reference page writes it, a document it names at its current path.',
261
+ type: 'object',
262
+ additionalProperties: true,
263
+ },
264
+ actions: {
265
+ type: 'array',
266
+ items: {
267
+ anyOf: [
268
+ {
269
+ type: 'object',
270
+ additionalProperties: false,
271
+ properties: {
272
+ kind: { const: 'notify' },
273
+ enabled: { type: 'boolean' },
274
+ title: { type: 'string' },
275
+ text: { type: 'string' },
276
+ to: {
277
+ type: 'object',
278
+ additionalProperties: false,
279
+ properties: {
280
+ users: {
281
+ type: 'array',
282
+ items: {
283
+ type: 'object',
284
+ additionalProperties: false,
285
+ properties: { user: { $ref: '#/$defs/id' } },
286
+ required: ['user'],
287
+ },
288
+ },
289
+ fields: { type: 'array', items: { type: 'string' } },
290
+ roles: { type: 'array', items: { type: 'string' } },
291
+ },
292
+ required: ['users', 'fields', 'roles'],
293
+ },
294
+ },
295
+ required: ['kind', 'enabled', 'title', 'text', 'to'],
296
+ },
297
+ {
298
+ type: 'object',
299
+ additionalProperties: false,
300
+ properties: {
301
+ kind: { const: 'agent_function' },
302
+ enabled: { type: 'boolean' },
303
+ card: { type: 'string', minLength: 1 },
304
+ payload: { type: 'string' },
305
+ },
306
+ required: ['kind', 'enabled', 'payload'],
307
+ },
308
+ {
309
+ type: 'object',
310
+ additionalProperties: false,
311
+ properties: {
312
+ kind: { const: 'message' },
313
+ enabled: { type: 'boolean' },
314
+ card: { type: 'string', minLength: 1 },
315
+ text: { type: 'string' },
316
+ },
317
+ required: ['kind', 'enabled', 'text'],
318
+ },
319
+ {
320
+ type: 'object',
321
+ additionalProperties: false,
322
+ properties: { kind: { const: 'done' }, enabled: { type: 'boolean' } },
323
+ required: ['kind', 'enabled'],
324
+ },
325
+ {
326
+ type: 'object',
327
+ additionalProperties: false,
328
+ properties: {
329
+ kind: { const: 'function' },
330
+ enabled: { type: 'boolean' },
331
+ app: { $ref: '#/$defs/app' },
332
+ function: { type: 'string' },
333
+ },
334
+ required: ['kind', 'enabled', 'function'],
335
+ },
336
+ ],
337
+ },
338
+ },
339
+ enabled: { type: 'boolean' },
340
+ paused_by: { enum: ['types'] },
341
+ creator: {
342
+ type: 'object',
343
+ additionalProperties: false,
344
+ properties: { user: { $ref: '#/$defs/id' }, name: { type: 'string' } },
345
+ required: ['user', 'name'],
346
+ },
347
+ created: { type: 'string', format: 'date-time' },
348
+ },
349
+ required: [
350
+ 'reflected',
351
+ 'trigger',
352
+ 'description',
353
+ 'condition',
354
+ 'actions',
355
+ 'enabled',
356
+ 'creator',
357
+ 'created',
358
+ ],
359
+ },
360
+ 'house-web-wizard': {
361
+ description: "One Web Wizard an agent made for this User: the `environment` it runs on, with the `name` that Environment had when the Web Wizard was made, and its `state`, `waiting` until its owner presses Run or Keep, `running`, `finished` with the script's `exit_code`, `failed`, `cancelled` when its page closed before the script ended, `lapsed` when nobody ran it in its time, or `kept` when its owner kept the script, without running it, as their Environment function named `function`. Its body is the script, whole, in one fenced code block. The terminal's output is never kept.",
362
+ properties: {
363
+ reflected: { type: 'string', format: 'date-time' },
364
+ web_wizard: { $ref: '#/$defs/id' },
365
+ environment: {
366
+ type: 'object',
367
+ additionalProperties: false,
368
+ properties: { environment: { $ref: '#/$defs/id' }, name: { type: 'string' } },
369
+ required: ['environment', 'name'],
370
+ },
371
+ state: { enum: ['waiting', 'running', 'finished', 'failed', 'cancelled', 'lapsed', 'kept'] },
372
+ exit_code: { type: 'integer' },
373
+ function: { type: 'string' },
374
+ },
375
+ required: ['reflected', 'web_wizard', 'environment', 'state'],
376
+ },
377
+ };
378
+ function modelText(model) {
379
+ return `${Object.entries(model)
380
+ .map(([name, declared]) => `${name}: ${JSON.stringify(declared)}`)
381
+ .join('\n')}\n`;
382
+ }
383
+ export const HOUSE_MODEL_TYPES = modelText(HOUSE_MODEL_DECLARATION);
384
+ export const HOUSE_TYPED_PATHS = [
385
+ { path: 'settings/panel.md', type: 'house-panel-preferences', named: true, body: false },
386
+ { path: 'settings/apps/*.md', type: 'house-app-preferences', named: true, body: false },
387
+ {
388
+ path: 'rooms/*/agent-functions/*.md',
389
+ type: 'house-agent-function-document',
390
+ named: false,
391
+ body: true,
392
+ },
393
+ ];
package/dist/index.d.ts CHANGED
@@ -1,4 +1,13 @@
1
1
  export { createAgentsHouseAdapter, type AgentsHouseAdapterOptions } from './adapter.js';
2
- export { HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS } from './actions.js';
3
- export type { HouseByteAct, HouseByteTransfer, HouseBytesAnswer, HouseClosing, HouseDoorAnswer, HouseHeldRoom, HouseOpening, HouseStream, HouseStreamEntry, HouseStreamFrame, HouseSiteTransport, HouseTransport, } from './transport.js';
2
+ export { foldedAuthorities } from './discovery.js';
3
+ export { finishedUpload, houseUpload, type HouseUpload } from './upload.js';
4
+ export { houseAction, type HouseActDoor } from './actions.js';
5
+ export { HISTORY_PAGE } from './history.js';
6
+ export { houseParts, type ChangeMapping } from './write.js';
7
+ export { APP_REFERENCE_PATTERN } from './app-reference.js';
8
+ export { HOUSE_MODEL_DECLARATION, HOUSE_MODEL_TYPES, HOUSE_TYPED_PATHS, type HouseDocumentFields, type HouseModelType, } from './house-model.js';
9
+ export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
10
+ export { CHAT_MESSAGE_TYPE, CHAT_TYPE, HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, type InboxChannelKind, } from './room-types.js';
11
+ export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, type HouseRuntimeAct, type HouseRuntimeFrame, } from './transport.js';
12
+ export type { HouseByteAct, HouseByteTransfer, HouseBytesAnswer, HouseClosing, HouseDoorAnswer, HouseHeldRoom, HouseOpening, HouseStream, HouseStreamed, HouseStreamEntry, HouseStreamFrame, HouseSiteTransport, HouseTransport, } from './transport.js';
4
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACl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EACZ,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,11 @@
1
1
  export { createAgentsHouseAdapter } from './adapter.js';
2
- export { HOUSE_APP_ACTS, HOUSE_APP_BATCHES, HOUSE_SITE_ACTS } from './actions.js';
2
+ export { foldedAuthorities } from './discovery.js';
3
+ export { finishedUpload, houseUpload } from './upload.js';
4
+ export { houseAction } from './actions.js';
5
+ export { HISTORY_PAGE } from './history.js';
6
+ export { houseParts } from './write.js';
7
+ export { APP_REFERENCE_PATTERN } from './app-reference.js';
8
+ export { HOUSE_MODEL_DECLARATION, HOUSE_MODEL_TYPES, HOUSE_TYPED_PATHS, } from './house-model.js';
9
+ export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
10
+ export { CHAT_MESSAGE_TYPE, CHAT_TYPE, HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, } from './room-types.js';
11
+ export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, } from './transport.js';
package/dist/model.d.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  import type { RoomModels } from '@agentshouse/mdruntime';
2
2
  import type { TrackedAuthority } from './discovery.js';
3
- import { type HouseScope, type HouseView } from './read.js';
3
+ import { type HouseRoomHead, type HouseScope } from './read.js';
4
+ import { type SpaceSchemas } from './space-schema.js';
4
5
  import type { HouseMode, HouseStreamEntry } from './transport.js';
5
6
  export declare function partModels(scope: HouseScope, tracked: TrackedAuthority, seen: ReadonlySet<string>, final: boolean): Promise<RoomModels | undefined>;
6
- export declare function viewModels(view: HouseView, tracked: TrackedAuthority): Promise<RoomModels | undefined>;
7
- export declare function streamedModels(schemas: ReadonlyMap<string, HouseStreamEntry>, tracked: TrackedAuthority, mode: HouseMode): Promise<RoomModels | undefined>;
7
+ export declare function manifestedModels(room: HouseRoomHead, tracked: TrackedAuthority, spaces: SpaceSchemas): Promise<{
8
+ readonly models: RoomModels | undefined;
9
+ readonly seen: string[];
10
+ }>;
11
+ export declare function keptSpaceSchemas(entries: readonly HouseStreamEntry[], spaces: SpaceSchemas): void;
12
+ export declare function streamedModels(schemas: ReadonlyMap<string, HouseStreamEntry>, tracked: TrackedAuthority, mode: HouseMode, spaces: SpaceSchemas): Promise<RoomModels | undefined>;
8
13
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAA0C,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACpG,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAoClE,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EACzB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAKjC;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAcjC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC9C,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAWjC"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAIL,KAAK,aAAa,EAElB,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA+BlE,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EACzB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAKjC;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAS/E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAKjG;AAQD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC9C,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAajC"}
package/dist/model.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { sha256Hex } from './digest.js';
2
- import { schemaOf, schemaPath } from './read.js';
2
+ import { modelScope, schemaOf, schemaPath, } from './read.js';
3
+ import { spaceIdentity } from './space-schema.js';
3
4
  const MODEL_ABSENT = { kind: 'model-unavailable', reason: 'not-readable' };
4
5
  const ABSENT_SCHEMA = { schema: null, version: null, revision: null };
5
6
  async function heldModel(read, identity) {
@@ -8,23 +9,19 @@ async function heldModel(read, identity) {
8
9
  const version = await sha256Hex(JSON.stringify(read.version));
9
10
  return {
10
11
  kind: 'model',
11
- snapshot: { identity, version, schema: read.schema, revision: read.revision },
12
+ snapshot: {
13
+ identity: read.space === undefined ? identity : spaceIdentity(read.space),
14
+ version,
15
+ schema: read.schema,
16
+ revision: read.revision,
17
+ },
12
18
  };
13
19
  }
14
20
  async function modelsOf(tracked, read) {
15
- const models = {};
16
21
  const collection = read(tracked.schema);
17
- if (collection !== undefined) {
18
- models.collection = await heldModel(collection, schemaPath(tracked.handle, tracked.schema));
19
- }
20
- if (tracked.houseModel !== null) {
21
- const root = tracked.houseModel.root;
22
- const selection = read(root);
23
- if (selection !== undefined) {
24
- models.selection = await heldModel(selection, schemaPath(tracked.handle, root));
25
- }
26
- }
27
- return models.collection === undefined && models.selection === undefined ? undefined : models;
22
+ if (collection === undefined)
23
+ return undefined;
24
+ return { collection: await heldModel(collection, schemaPath(tracked.handle, tracked.schema)) };
28
25
  }
29
26
  export function partModels(scope, tracked, seen, final) {
30
27
  return modelsOf(tracked, (schema) => {
@@ -33,35 +30,41 @@ export function partModels(scope, tracked, seen, final) {
33
30
  return final && !seen.has(schema) ? ABSENT_SCHEMA : undefined;
34
31
  });
35
32
  }
36
- export function viewModels(view, tracked) {
37
- return modelsOf(tracked, (schema) => {
38
- const change = view.changes.find((candidate) => candidate.path === schema);
39
- if (change === undefined)
40
- return undefined;
41
- if ('removed' in change)
42
- return ABSENT_SCHEMA;
43
- if ('content' in change) {
44
- return {
45
- schema: change.content,
46
- version: change.version,
47
- revision: change.revision ?? null,
48
- };
49
- }
50
- return null;
51
- });
33
+ export async function manifestedModels(room, tracked, spaces) {
34
+ const scope = modelScope(room);
35
+ const held = schemaOf(scope, tracked.schema);
36
+ if (held?.space !== undefined && held.schema !== null && held.revision !== null)
37
+ spaces.keep(held.space, held.revision, held.schema);
38
+ return {
39
+ models: await partModels(scope, tracked, new Set(), true),
40
+ seen: scope.files.some((file) => file.path === tracked.schema) ? [tracked.schema] : [],
41
+ };
42
+ }
43
+ export function keptSpaceSchemas(entries, spaces) {
44
+ for (const entry of entries) {
45
+ if (entry.space !== undefined && entry.text !== undefined && entry.revision !== undefined)
46
+ spaces.keep(entry.space, entry.revision, entry.text);
47
+ }
48
+ }
49
+ function streamedText(entry, spaces) {
50
+ if (entry.text !== undefined || entry.space === undefined || entry.revision === undefined)
51
+ return entry.text;
52
+ return spaces.held(entry.space, entry.revision);
52
53
  }
53
- export function streamedModels(schemas, tracked, mode) {
54
+ export function streamedModels(schemas, tracked, mode, spaces) {
54
55
  return modelsOf(tracked, (schema) => {
55
56
  const entry = schemas.get(schema);
56
57
  if (entry === undefined)
57
58
  return undefined;
59
+ const space = entry.space === undefined ? {} : { space: entry.space };
58
60
  if (entry.kind === 'removed')
59
- return ABSENT_SCHEMA;
60
- if (entry.text === undefined)
61
+ return { ...ABSENT_SCHEMA, ...space };
62
+ const text = streamedText(entry, spaces);
63
+ if (text === undefined)
61
64
  return null;
62
65
  const version = mode === 'site' ? entry.sha256 : entry.revision;
63
66
  return version === undefined
64
67
  ? null
65
- : { schema: entry.text, version, revision: mode === 'site' ? null : version };
68
+ : { schema: text, version, revision: mode === 'site' ? null : version, ...space };
66
69
  });
67
70
  }
package/dist/part.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ export type RoomFrame = {
2
+ readonly kind: 'frame';
3
+ readonly payload: Uint8Array<ArrayBuffer>;
4
+ readonly bytes: number;
5
+ } | {
6
+ readonly kind: 'ended';
7
+ } | {
8
+ readonly kind: 'broken';
9
+ };
10
+ export type RoomFrames = () => Promise<RoomFrame>;
11
+ export declare function checkedPayload(frame: Uint8Array<ArrayBuffer>): Promise<Uint8Array<ArrayBuffer> | null>;
12
+ export declare function roomFrames(room: ReadableStream<Uint8Array>, arrived?: (bytes: number) => void, signal?: AbortSignal): RoomFrames;
13
+ export declare function gunzipped(payload: Uint8Array<ArrayBuffer>): ReadableStream<string>;
14
+ //# sourceMappingURL=part.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"part.d.ts","sourceRoot":"","sources":["../src/part.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GACjB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC7F;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEhC,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;AAQlD,wBAAsB,cAAc,CAClC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,GAC7B,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CASzC;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,EAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EACjC,MAAM,CAAC,EAAE,WAAW,GACnB,UAAU,CAwDZ;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,CAKlF"}