@agentshouse/mdruntime-adapter 0.1.0-cdcec0737ac0e → 0.1.0-cdd3671d36a47
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 +1 -1
- package/dist/actions.d.ts +2 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +15 -3
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +67 -75
- package/dist/authored-path.d.ts +11 -0
- package/dist/authored-path.d.ts.map +1 -0
- package/dist/authored-path.js +35 -0
- package/dist/chunks.d.ts +38 -0
- package/dist/chunks.d.ts.map +1 -0
- package/dist/chunks.js +247 -0
- package/dist/discovery.d.ts +2 -2
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +8 -5
- package/dist/history.js +1 -1
- package/dist/house-model.d.ts +93 -102
- package/dist/house-model.d.ts.map +1 -1
- package/dist/house-model.js +79 -55
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/model.d.ts +3 -7
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +3 -13
- package/dist/read.d.ts +9 -9
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +24 -143
- package/dist/refusal.d.ts +1 -0
- package/dist/refusal.d.ts.map +1 -1
- package/dist/refusal.js +4 -0
- package/dist/room-types.d.ts +0 -2
- package/dist/room-types.d.ts.map +1 -1
- package/dist/room-types.js +2 -5
- package/dist/search.js +1 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +30 -40
- package/dist/stream.d.ts +4 -3
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +83 -14
- package/dist/transport.d.ts +4 -8
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +12 -12
- package/dist/write.d.ts.map +1 -1
- package/dist/write.js +3 -5
- package/package.json +2 -2
- package/dist/part.d.ts +0 -14
- package/dist/part.d.ts.map +0 -1
- package/dist/part.js +0 -90
- package/dist/room-stream.d.ts +0 -20
- package/dist/room-stream.d.ts.map +0 -1
- package/dist/room-stream.js +0 -57
package/dist/house-model.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { APP_PREFERENCES_HOME } from './authored-path.js';
|
|
1
2
|
export const HOUSE_MODEL_DECLARATION = {
|
|
2
3
|
$defs: {
|
|
3
4
|
room: {
|
|
@@ -10,6 +11,11 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
10
11
|
type: 'string',
|
|
11
12
|
pattern: '^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
|
|
12
13
|
},
|
|
14
|
+
space: {
|
|
15
|
+
description: 'A Space, by its Space reference, under the key `space`.',
|
|
16
|
+
type: 'string',
|
|
17
|
+
pattern: '^sp_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$',
|
|
18
|
+
},
|
|
13
19
|
document: {
|
|
14
20
|
description: 'A document of a Room, by its file reference, under the key `document`.',
|
|
15
21
|
type: 'string',
|
|
@@ -33,7 +39,7 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
33
39
|
required: ['app'],
|
|
34
40
|
},
|
|
35
41
|
'house-notification': {
|
|
36
|
-
description: "One kept
|
|
42
|
+
description: "One kept Notification for this User: its kind, when it was sent as `created`, its way in, its email's subject and each fact of its value that is not sealed, named in snake_case. An entity a fact names is an object holding its identifier under the key of its kind, when the notification carries it, and its `name`, `email` and other facts beside it; a fact holding null is absent. `way_in` is either the House `path` it opens or the entity it is about, by its identifier under the key of its kind, a Trigger with its `room`. Its body is its email's words in Markdown. Both were worded once, in the User's language when it was delivered; an App may show them or word it itself from its kind and value. `read` is when the User opened it or marked it read, on any device: the one field House adds after delivery.",
|
|
37
43
|
properties: {
|
|
38
44
|
notification: { $ref: '#/$defs/id' },
|
|
39
45
|
kind: {
|
|
@@ -42,34 +48,29 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
42
48
|
'share-offer',
|
|
43
49
|
'join-request',
|
|
44
50
|
'join-request-approved',
|
|
45
|
-
'app-room-binding-incompatible',
|
|
46
|
-
'app-call',
|
|
47
51
|
'room-ownership-offer',
|
|
48
52
|
'managed-environment-retention-opened',
|
|
49
|
-
'managed-environment-placement-intervention',
|
|
50
53
|
'storage-full',
|
|
51
54
|
'sandbox-budget-spent',
|
|
55
|
+
'trigger-failed',
|
|
56
|
+
'room-telegram-chat-paused',
|
|
52
57
|
'break-glass-owner-disclosure',
|
|
53
|
-
'agent-function-start-approval-request',
|
|
54
58
|
'export-ready',
|
|
55
59
|
'export-failed',
|
|
56
|
-
'site-disabled',
|
|
57
|
-
'site-binding-incompatible',
|
|
58
|
-
'site-images-full',
|
|
59
60
|
'custom',
|
|
61
|
+
'agent-function-request-finished',
|
|
60
62
|
],
|
|
61
63
|
},
|
|
62
64
|
created: { type: 'string', format: 'date-time' },
|
|
65
|
+
read: { type: 'string', format: 'date-time' },
|
|
63
66
|
way_in: {
|
|
64
67
|
type: 'object',
|
|
65
68
|
additionalProperties: false,
|
|
66
69
|
properties: {
|
|
67
70
|
path: { type: 'string', pattern: '^\\/' },
|
|
68
71
|
room: { $ref: '#/$defs/room' },
|
|
69
|
-
app: { $ref: '#/$defs/app' },
|
|
70
72
|
environment: { $ref: '#/$defs/id' },
|
|
71
73
|
trigger: { $ref: '#/$defs/id' },
|
|
72
|
-
site: { $ref: '#/$defs/id' },
|
|
73
74
|
},
|
|
74
75
|
minProperties: 1,
|
|
75
76
|
},
|
|
@@ -103,13 +104,22 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
103
104
|
required: ['name', 'reaches'],
|
|
104
105
|
},
|
|
105
106
|
},
|
|
107
|
+
spaces: {
|
|
108
|
+
type: 'array',
|
|
109
|
+
items: {
|
|
110
|
+
type: 'object',
|
|
111
|
+
additionalProperties: false,
|
|
112
|
+
properties: { name: { type: 'string' } },
|
|
113
|
+
required: ['name'],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
106
116
|
expires_at: { type: 'string', format: 'date-time' },
|
|
107
117
|
join_request: { $ref: '#/$defs/id' },
|
|
108
118
|
user: {
|
|
109
119
|
type: 'object',
|
|
110
120
|
additionalProperties: false,
|
|
111
121
|
properties: { name: { type: 'string' }, email: { type: 'string', format: 'email' } },
|
|
112
|
-
required: ['name'
|
|
122
|
+
required: ['name'],
|
|
113
123
|
},
|
|
114
124
|
room: {
|
|
115
125
|
type: 'object',
|
|
@@ -120,18 +130,14 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
120
130
|
app: {
|
|
121
131
|
type: 'object',
|
|
122
132
|
additionalProperties: false,
|
|
123
|
-
properties: { app: { $ref: '#/$defs/app' }
|
|
124
|
-
|
|
133
|
+
properties: { app: { $ref: '#/$defs/app' } },
|
|
134
|
+
required: ['app'],
|
|
125
135
|
},
|
|
126
|
-
|
|
127
|
-
binding: { $ref: '#/$defs/id' },
|
|
128
|
-
slot: { type: 'string' },
|
|
129
|
-
findings: { type: 'array', items: { type: 'string' } },
|
|
130
|
-
caller: {
|
|
136
|
+
space: {
|
|
131
137
|
type: 'object',
|
|
132
138
|
additionalProperties: false,
|
|
133
|
-
properties: {
|
|
134
|
-
required: ['
|
|
139
|
+
properties: { space: { $ref: '#/$defs/space' } },
|
|
140
|
+
required: ['space'],
|
|
135
141
|
},
|
|
136
142
|
ownership_offer: { $ref: '#/$defs/id' },
|
|
137
143
|
offerer: {
|
|
@@ -152,7 +158,6 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
152
158
|
},
|
|
153
159
|
reason: { type: 'string' },
|
|
154
160
|
deadline: { type: 'string', format: 'date-time' },
|
|
155
|
-
operation_kind: { type: 'string' },
|
|
156
161
|
free: {
|
|
157
162
|
type: 'object',
|
|
158
163
|
additionalProperties: false,
|
|
@@ -163,6 +168,24 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
163
168
|
},
|
|
164
169
|
required: ['held', 'limit', 'measure'],
|
|
165
170
|
},
|
|
171
|
+
chat: { type: 'string' },
|
|
172
|
+
missing: {
|
|
173
|
+
type: 'array',
|
|
174
|
+
items: {
|
|
175
|
+
type: 'string',
|
|
176
|
+
enum: [
|
|
177
|
+
'private',
|
|
178
|
+
'topics',
|
|
179
|
+
'ban_users',
|
|
180
|
+
'invite_users',
|
|
181
|
+
'manage_topics',
|
|
182
|
+
'post_messages',
|
|
183
|
+
'edit_messages',
|
|
184
|
+
'inbox_manage_topics',
|
|
185
|
+
'inbox_delete_messages',
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
166
189
|
budget: { type: 'string', pattern: '^\\d+(?:\\.\\d+)?$' },
|
|
167
190
|
resets_at: { type: 'string', format: 'date-time' },
|
|
168
191
|
grant: { $ref: '#/$defs/id' },
|
|
@@ -171,40 +194,8 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
171
194
|
access_ended_at: { type: 'string', format: 'date-time' },
|
|
172
195
|
systems: { type: 'array', items: { type: 'string' } },
|
|
173
196
|
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
197
|
export: { $ref: '#/$defs/id' },
|
|
198
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
199
|
title: { type: 'string' },
|
|
209
200
|
body: { type: 'string' },
|
|
210
201
|
authorship: {
|
|
@@ -218,6 +209,38 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
218
209
|
required: ['kind', 'trigger', 'position'],
|
|
219
210
|
},
|
|
220
211
|
path: { type: 'string', maxLength: 4096, pattern: '^\\/.*' },
|
|
212
|
+
trigger: {
|
|
213
|
+
type: 'object',
|
|
214
|
+
additionalProperties: false,
|
|
215
|
+
properties: { trigger: { $ref: '#/$defs/id' }, description: { type: 'string' } },
|
|
216
|
+
required: ['trigger', 'description'],
|
|
217
|
+
},
|
|
218
|
+
code: {
|
|
219
|
+
type: 'string',
|
|
220
|
+
enum: [
|
|
221
|
+
'failed',
|
|
222
|
+
'function_failed',
|
|
223
|
+
'function_not_started',
|
|
224
|
+
'agent_function_request_not_started',
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
action: { type: 'integer', minimum: 0 },
|
|
228
|
+
moment: { type: 'string', format: 'date-time' },
|
|
229
|
+
error: { type: 'string' },
|
|
230
|
+
agent_function: {
|
|
231
|
+
type: 'object',
|
|
232
|
+
additionalProperties: false,
|
|
233
|
+
properties: { name: { type: 'string' } },
|
|
234
|
+
required: ['name'],
|
|
235
|
+
},
|
|
236
|
+
agent: {
|
|
237
|
+
type: 'object',
|
|
238
|
+
additionalProperties: false,
|
|
239
|
+
properties: { name: { type: 'string' } },
|
|
240
|
+
required: ['name'],
|
|
241
|
+
},
|
|
242
|
+
ended: { type: 'string', enum: ['finished', 'failed'] },
|
|
243
|
+
duration: { type: 'integer', minimum: 1 },
|
|
221
244
|
},
|
|
222
245
|
required: ['notification', 'kind', 'created', 'way_in', 'subject'],
|
|
223
246
|
},
|
|
@@ -242,11 +265,12 @@ export const HOUSE_MODEL_DECLARATION = {
|
|
|
242
265
|
required: ['reflected', 'agent_function', 'description', 'input', 'agent'],
|
|
243
266
|
},
|
|
244
267
|
'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,
|
|
268
|
+
description: 'One Agent function as its owner writes it in their Private Room at rooms/<room-handle>/agent-functions/<name>.md, a path that binds this type and a document that names no type: what it does as `description`, what a caller sends as `input`, empty when it takes nothing, the `agent` it starts, by identifier, and `afk`, true for a run nobody watches, off when absent. Its body is the instruction that Agent follows.',
|
|
246
269
|
properties: {
|
|
247
270
|
description: { type: 'string', maxLength: 2000, pattern: '\\S' },
|
|
248
271
|
input: { type: 'string' },
|
|
249
272
|
agent: { $ref: '#/$defs/id' },
|
|
273
|
+
afk: { type: 'boolean' },
|
|
250
274
|
},
|
|
251
275
|
required: ['description', 'input', 'agent'],
|
|
252
276
|
},
|
|
@@ -383,7 +407,7 @@ function modelText(model) {
|
|
|
383
407
|
export const HOUSE_MODEL_TYPES = modelText(HOUSE_MODEL_DECLARATION);
|
|
384
408
|
export const HOUSE_TYPED_PATHS = [
|
|
385
409
|
{ path: 'settings/panel.md', type: 'house-panel-preferences', named: true, body: false },
|
|
386
|
-
{ path:
|
|
410
|
+
{ path: `${APP_PREFERENCES_HOME}/*.md`, type: 'house-app-preferences', named: true, body: false },
|
|
387
411
|
{
|
|
388
412
|
path: 'rooms/*/agent-functions/*.md',
|
|
389
413
|
type: 'house-agent-function-document',
|
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ export { houseAction, type HouseActDoor } from './actions.js';
|
|
|
5
5
|
export { HISTORY_PAGE } from './history.js';
|
|
6
6
|
export { houseParts, type ChangeMapping } from './write.js';
|
|
7
7
|
export { APP_REFERENCE_PATTERN } from './app-reference.js';
|
|
8
|
+
export { admittedPath, APP_PREFERENCES_HOME, AUTHORED_SEGMENT, AUTHORED_SEGMENT_MAX_CHARS, GENERATED_PROVENANCE, GENERATED_REVISIONS, LOCAL_COPY_MANIFEST, LOCAL_COPY_ROOT_NAMES, RESERVED_DERIVED, WHOLE_ESCAPED_NAMES, } from './authored-path.js';
|
|
8
9
|
export { HOUSE_MODEL_DECLARATION, HOUSE_MODEL_TYPES, HOUSE_TYPED_PATHS, type HouseDocumentFields, type HouseModelType, } from './house-model.js';
|
|
9
10
|
export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
|
|
10
|
-
export {
|
|
11
|
+
export { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, type InboxChannelKind, } from './room-types.js';
|
|
11
12
|
export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, type HouseRuntimeAct, type HouseRuntimeFrame, } from './transport.js';
|
|
12
|
-
export type { HouseByteAct, HouseByteTransfer, HouseBytesAnswer, HouseClosing, HouseDoorAnswer, HouseHeldRoom, HouseOpening, HouseStream,
|
|
13
|
+
export type { HouseByteAct, HouseByteTransfer, HouseBytesAnswer, HouseClosing, HouseDoorAnswer, HouseHeldRoom, HouseOpening, HouseStream, HouseStreamEntry, HouseStreamFrame, HouseSiteTransport, HouseTransport, } from './transport.js';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,yBAAyB,EAAE,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,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,8 @@ export { houseAction } from './actions.js';
|
|
|
5
5
|
export { HISTORY_PAGE } from './history.js';
|
|
6
6
|
export { houseParts } from './write.js';
|
|
7
7
|
export { APP_REFERENCE_PATTERN } from './app-reference.js';
|
|
8
|
+
export { admittedPath, APP_PREFERENCES_HOME, AUTHORED_SEGMENT, AUTHORED_SEGMENT_MAX_CHARS, GENERATED_PROVENANCE, GENERATED_REVISIONS, LOCAL_COPY_MANIFEST, LOCAL_COPY_ROOT_NAMES, RESERVED_DERIVED, WHOLE_ESCAPED_NAMES, } from './authored-path.js';
|
|
8
9
|
export { HOUSE_MODEL_DECLARATION, HOUSE_MODEL_TYPES, HOUSE_TYPED_PATHS, } from './house-model.js';
|
|
9
10
|
export { CROCKFORD_ALPHABET, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, } from './crockford.js';
|
|
10
|
-
export {
|
|
11
|
+
export { HOUSE_NAMEABLE_ROOM_TYPES, HOUSE_ROOM_TYPES, INBOX_CHANNEL_KINDS, } from './room-types.js';
|
|
11
12
|
export { HOUSE_RUNTIME_READS, houseDoorRoute, houseSiteRoute, } from './transport.js';
|
package/dist/model.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import type { RoomModels } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { TrackedAuthority } from './discovery.js';
|
|
3
|
-
import { type HouseRoomHead
|
|
3
|
+
import { type HouseRoomHead } from './read.js';
|
|
4
4
|
import { type SpaceSchemas } from './space-schema.js';
|
|
5
5
|
import type { HouseMode, HouseStreamEntry } from './transport.js';
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function manifestedModels(room: HouseRoomHead, tracked: TrackedAuthority, spaces: SpaceSchemas): Promise<{
|
|
8
|
-
readonly models: RoomModels | undefined;
|
|
9
|
-
readonly seen: string[];
|
|
10
|
-
}>;
|
|
6
|
+
export declare function manifestedModels(room: HouseRoomHead, tracked: TrackedAuthority, spaces: SpaceSchemas): Promise<RoomModels | undefined>;
|
|
11
7
|
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
|
+
export declare function streamedModels(schemas: ReadonlyMap<string, HouseStreamEntry>, tracked: TrackedAuthority, mode: HouseMode, spaces: SpaceSchemas, whole: boolean): Promise<RoomModels | undefined>;
|
|
13
9
|
//# sourceMappingURL=model.d.ts.map
|
package/dist/model.d.ts.map
CHANGED
|
@@ -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,EAIL,KAAK,aAAa,
|
|
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,EAGnB,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,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAQjC;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,EACpB,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAajC"}
|
package/dist/model.js
CHANGED
|
@@ -23,22 +23,12 @@ async function modelsOf(tracked, read) {
|
|
|
23
23
|
return undefined;
|
|
24
24
|
return { collection: await heldModel(collection, schemaPath(tracked.handle, tracked.schema)) };
|
|
25
25
|
}
|
|
26
|
-
export function partModels(scope, tracked, seen, final) {
|
|
27
|
-
return modelsOf(tracked, (schema) => {
|
|
28
|
-
if (scope.files.some((file) => file.path === schema))
|
|
29
|
-
return schemaOf(scope, schema);
|
|
30
|
-
return final && !seen.has(schema) ? ABSENT_SCHEMA : undefined;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
26
|
export async function manifestedModels(room, tracked, spaces) {
|
|
34
27
|
const scope = modelScope(room);
|
|
35
28
|
const held = schemaOf(scope, tracked.schema);
|
|
36
29
|
if (held?.space !== undefined && held.schema !== null && held.revision !== null)
|
|
37
30
|
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
|
-
};
|
|
31
|
+
return modelsOf(tracked, (schema) => scope.files.some((file) => file.path === schema) ? schemaOf(scope, schema) : ABSENT_SCHEMA);
|
|
42
32
|
}
|
|
43
33
|
export function keptSpaceSchemas(entries, spaces) {
|
|
44
34
|
for (const entry of entries) {
|
|
@@ -51,11 +41,11 @@ function streamedText(entry, spaces) {
|
|
|
51
41
|
return entry.text;
|
|
52
42
|
return spaces.held(entry.space, entry.revision);
|
|
53
43
|
}
|
|
54
|
-
export function streamedModels(schemas, tracked, mode, spaces) {
|
|
44
|
+
export function streamedModels(schemas, tracked, mode, spaces, whole) {
|
|
55
45
|
return modelsOf(tracked, (schema) => {
|
|
56
46
|
const entry = schemas.get(schema);
|
|
57
47
|
if (entry === undefined)
|
|
58
|
-
return undefined;
|
|
48
|
+
return whole ? ABSENT_SCHEMA : undefined;
|
|
59
49
|
const space = entry.space === undefined ? {} : { space: entry.space };
|
|
60
50
|
if (entry.kind === 'removed')
|
|
61
51
|
return { ...ABSENT_SCHEMA, ...space };
|
package/dist/read.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BinaryFile, type BootstrapPage, type SavedFacts
|
|
1
|
+
import { type BinaryFile, type BootstrapPage, type SavedFacts } from '@agentshouse/mdruntime';
|
|
2
2
|
import type { HouseMode } from './transport.js';
|
|
3
3
|
import { type LogPosition } from './version.js';
|
|
4
4
|
export type HeadChange = BootstrapPage['changes'][string];
|
|
@@ -7,6 +7,7 @@ export type Answered = {
|
|
|
7
7
|
readonly facts: Map<string, SavedFacts>;
|
|
8
8
|
readonly revisions: Map<string, string>;
|
|
9
9
|
readonly fileIds: Map<string, string>;
|
|
10
|
+
readonly created: Map<string, string>;
|
|
10
11
|
readonly changes: Map<string, HeadChange>;
|
|
11
12
|
readonly binaryFiles: Map<string, BinaryFile>;
|
|
12
13
|
readonly removals: Set<string>;
|
|
@@ -22,6 +23,7 @@ export declare function answered(answer: Answered): Generator<number, {
|
|
|
22
23
|
facts: Readonly<Record<string, SavedFacts>>;
|
|
23
24
|
revisions: Readonly<Record<string, string>>;
|
|
24
25
|
fileIds?: Readonly<Record<string, string>>;
|
|
26
|
+
created?: Readonly<Record<string, string>>;
|
|
25
27
|
changes: Readonly<Record<string, HeadChange>>;
|
|
26
28
|
binaryFiles: Readonly<Record<string, BinaryFile>>;
|
|
27
29
|
removals: readonly string[];
|
|
@@ -34,6 +36,7 @@ export type HouseManifestFile = {
|
|
|
34
36
|
version: string;
|
|
35
37
|
sha256?: string;
|
|
36
38
|
head?: HeadChange;
|
|
39
|
+
created?: string;
|
|
37
40
|
binary?: BinaryFile;
|
|
38
41
|
facts?: SavedFacts;
|
|
39
42
|
space?: string;
|
|
@@ -72,22 +75,19 @@ export declare function parseGrant(body: unknown): HouseGrant | null;
|
|
|
72
75
|
export declare function parseFileAddress(body: unknown): HouseFileAddress | null;
|
|
73
76
|
export declare function headChange(held: {
|
|
74
77
|
readonly author?: unknown;
|
|
75
|
-
readonly
|
|
78
|
+
readonly changed_at?: unknown;
|
|
76
79
|
}): HeadChange | undefined | null;
|
|
80
|
+
export declare function createdOf(held: {
|
|
81
|
+
readonly created_at?: unknown;
|
|
82
|
+
}): string | undefined | null;
|
|
77
83
|
export declare function binaryFileOf(held: Readonly<Record<string, unknown>>): BinaryFile | undefined | null;
|
|
78
84
|
export declare function carriedFacts(held: Readonly<Record<string, unknown>>): {
|
|
79
85
|
facts?: undefined;
|
|
80
86
|
} | {
|
|
81
87
|
facts: SavedFacts;
|
|
82
88
|
};
|
|
83
|
-
export declare function
|
|
84
|
-
export declare function manifested(room: HouseRoomHead, pageToken: string, models: RoomModels | undefined): BootstrapPage;
|
|
89
|
+
export declare function parseFile(value: unknown, mode: HouseMode): HouseManifestFile | null;
|
|
85
90
|
export declare function modelScope(room: HouseRoomHead): HouseScope;
|
|
86
|
-
export declare function emptyScope(room: HouseRoomHead): HouseScope;
|
|
87
|
-
export declare function housePart(room: HouseRoomHead, payload: Uint8Array<ArrayBuffer>, mode: HouseMode): Promise<{
|
|
88
|
-
scope: HouseScope;
|
|
89
|
-
ended: boolean;
|
|
90
|
-
} | TransportUncertainty>;
|
|
91
91
|
export declare function bootstrapping(scope: HouseScope): Generator<number, BootstrapPage, void>;
|
|
92
92
|
export type HouseSchema = {
|
|
93
93
|
schema: string | null;
|
package/dist/read.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../src/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,aAAa,EAElB,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3E,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAQ1D,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAA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