@agentshouse/mdruntime 0.1.0-cd50a4607cb7d → 0.1.0-cd76160689224

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 (98) hide show
  1. package/AGENTS.md +118 -115
  2. package/dist/acquisition.d.ts +14 -0
  3. package/dist/acquisition.d.ts.map +1 -0
  4. package/dist/acquisition.js +24 -0
  5. package/dist/adapter.d.ts +25 -7
  6. package/dist/adapter.d.ts.map +1 -1
  7. package/dist/bootstrap.d.ts +2 -1
  8. package/dist/bootstrap.d.ts.map +1 -1
  9. package/dist/bootstrap.js +4 -0
  10. package/dist/change-set.d.ts.map +1 -1
  11. package/dist/change-set.js +2 -1
  12. package/dist/chat/kit.d.ts +2 -1
  13. package/dist/chat/kit.d.ts.map +1 -1
  14. package/dist/chat/kit.js +3 -3
  15. package/dist/chat/list.d.ts +2 -1
  16. package/dist/chat/list.d.ts.map +1 -1
  17. package/dist/chat/list.js +4 -3
  18. package/dist/chat/messages.d.ts +1 -0
  19. package/dist/chat/messages.d.ts.map +1 -1
  20. package/dist/chat/messages.js +4 -0
  21. package/dist/chat/provider.d.ts +1 -1
  22. package/dist/chat/provider.d.ts.map +1 -1
  23. package/dist/chat/provider.js +26 -17
  24. package/dist/chat/ready.d.ts +1 -0
  25. package/dist/chat/ready.d.ts.map +1 -1
  26. package/dist/chat/ready.js +2 -2
  27. package/dist/client.d.ts +7 -2
  28. package/dist/client.d.ts.map +1 -1
  29. package/dist/client.js +12 -2
  30. package/dist/connection.d.ts +18 -3
  31. package/dist/connection.d.ts.map +1 -1
  32. package/dist/connection.js +696 -79
  33. package/dist/conversation.d.ts +3 -0
  34. package/dist/conversation.d.ts.map +1 -1
  35. package/dist/conversation.js +115 -17
  36. package/dist/durability.d.ts +7 -1
  37. package/dist/durability.d.ts.map +1 -1
  38. package/dist/entry.d.ts.map +1 -1
  39. package/dist/entry.js +1 -1
  40. package/dist/host.d.ts +15 -2
  41. package/dist/host.d.ts.map +1 -1
  42. package/dist/host.js +83 -8
  43. package/dist/index.d.ts +7 -5
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +1 -0
  46. package/dist/memory.d.ts +8 -2
  47. package/dist/memory.d.ts.map +1 -1
  48. package/dist/memory.js +26 -6
  49. package/dist/model.d.ts +3 -2
  50. package/dist/model.d.ts.map +1 -1
  51. package/dist/model.js +1 -1
  52. package/dist/outcome.d.ts +8 -2
  53. package/dist/outcome.d.ts.map +1 -1
  54. package/dist/outcome.js +3 -0
  55. package/dist/overlay.d.ts +1 -0
  56. package/dist/overlay.d.ts.map +1 -1
  57. package/dist/overlay.js +27 -3
  58. package/dist/query.d.ts +8 -1
  59. package/dist/query.d.ts.map +1 -1
  60. package/dist/query.js +8 -2
  61. package/dist/reach.d.ts +6 -3
  62. package/dist/reach.d.ts.map +1 -1
  63. package/dist/reach.js +17 -2
  64. package/dist/react.d.ts +4 -1
  65. package/dist/react.d.ts.map +1 -1
  66. package/dist/react.js +6 -4
  67. package/dist/read-side.d.ts.map +1 -1
  68. package/dist/read-side.js +3 -0
  69. package/dist/readiness.d.ts +53 -0
  70. package/dist/readiness.d.ts.map +1 -0
  71. package/dist/readiness.js +33 -0
  72. package/dist/reads.d.ts +11 -0
  73. package/dist/reads.d.ts.map +1 -0
  74. package/dist/reads.js +98 -0
  75. package/dist/refresh.d.ts +4 -4
  76. package/dist/refresh.d.ts.map +1 -1
  77. package/dist/refresh.js +6 -0
  78. package/dist/replica.d.ts.map +1 -1
  79. package/dist/replica.js +11 -2
  80. package/dist/room-draft.d.ts +13 -1
  81. package/dist/room-draft.d.ts.map +1 -1
  82. package/dist/room-draft.js +2 -2
  83. package/dist/rows.d.ts +2 -1
  84. package/dist/rows.d.ts.map +1 -1
  85. package/dist/rows.js +3 -1
  86. package/dist/search.d.ts +14 -6
  87. package/dist/search.d.ts.map +1 -1
  88. package/dist/search.js +33 -12
  89. package/dist/seed.d.ts +16 -0
  90. package/dist/seed.d.ts.map +1 -0
  91. package/dist/seed.js +61 -0
  92. package/dist/store.d.ts +19 -3
  93. package/dist/store.d.ts.map +1 -1
  94. package/dist/store.js +59 -14
  95. package/dist/wire.d.ts +140 -32
  96. package/dist/wire.d.ts.map +1 -1
  97. package/dist/wire.js +49 -31
  98. package/package.json +2 -2
package/AGENTS.md CHANGED
@@ -8,22 +8,19 @@ Repository, change it, build, and push. They are documentation, not enforcement.
8
8
  App code reaches the MD Runtime through the remote client. The surfaces are Rooms,
9
9
  Query, Search, Observe, Types, Room Draft, Save, History, the binary file reads, Call,
10
10
  Reached, Log, the reported persistence answer, reauthorization, conversation, the chat
11
- draft, and Presentation State. Sync Status, the Service Mode, the storage-loss
11
+ draft, and Presentation State. Sync Status, readiness, the Service Mode, the storage-loss
12
12
  statement, the deployment facts and the signed-in member are observations only.
13
13
 
14
14
  The host attaches each port with its reach, and every member and observation answers
15
15
  within it: a Room outside it answers as one the replica does not hold, Rooms lists only
16
- the Rooms reached whole, a Room reached for single Documents shows only those Documents
17
- and the Types of the models that govern them, and without conversations the conversation
18
- members, the chat draft and the conversation observation hold none. A change of the
19
- reach reaches every open observation as its new value, a query keeping unchanged
20
- Documents the same objects.
16
+ the Rooms reached whole, a Room reached for single Documents shows only them and the Types
17
+ of their models, and without conversations the conversation members, chat draft and
18
+ observation hold none. A changed reach reaches every open observation as its new value.
21
19
 
22
20
  Every `observe` resolves, once its first value has arrived, to a handle: `current()` is
23
- the latest complete value, `subscribe(listener)` hears each later value whole and
24
- returns its unsubscribe, and `close()` ends the observation. Closing the port ends every
25
- handle and rejects every pending call and observation; a client that reconnects observes
26
- again.
21
+ the latest complete value, `subscribe(listener)` hears each later value whole and returns
22
+ its unsubscribe, and `close()` ends the observation. Closing the port ends every handle
23
+ and rejects every pending call and observation; a client that reconnects observes again.
27
24
 
28
25
  `observe('agents')` answers every Agent a new conversation can go to, each `{ identity,
29
26
  name }`, whether or not it has a conversation yet. Each conversation the Provider's
@@ -39,24 +36,26 @@ questions, the process state, and the CLI's commands and options. These live onl
39
36
  memory: the message accepted under the turn's id replaces the running turn, and none of
40
37
  them is stored or searchable. `chatDraft.write` and `chatDraft.discard` keep what the
41
38
  App Creator composes; sending it is a Provider Action that needs the Provider reachable
42
- and is never queued.
39
+ and is never queued. A new conversation's chat draft is the one keyed `new:<Agent
40
+ identity>`: no conversation list removes it, a retired Agent's goes, and the first answer
41
+ to `conversation.create({ agent_id, operation_id })` moves it to the created conversation,
42
+ where `conversation.send(conversation)` sends it; a replay of that create moves nothing.
43
43
 
44
44
  A binary file at a Path is a binary Path entry. Query lists it by `path`, and History
45
45
  each of its revisions, with its `binaryFile` record and never its bytes: `{ state:
46
46
  'accepted', revision, path, fileRef, byteLength, mediaType, sha256 }`, or, from a Save
47
- until the Provider accepts it, `{ state: 'pending', localId, path, byteLength,
48
- mediaType, sha256 }`. Write one with a Room Draft whose only part is `file: { blob }`,
49
- the `Blob`'s `type` its media type: Save keeps the bytes in its Pending Change, offline
50
- too, and acceptance gives the record the Provider's revision. Move or remove one as a
51
- Document, a pending one before or after Save too, its bytes following; once its Pending
52
- Change has gone to the Provider, Save refuses that as `unknown-revision` until it is
53
- accepted. `binaryFile.read(room, path, revision?)` answers a pending record's saved
54
- bytes, or asks the Provider again on every read of an accepted one or of a History
55
- revision, a removed file's last included, keeping nothing. Text, a Record attachment or
56
- a conversation message may name a file by its `fileRef`; read it with
57
- `binaryFile.readReference({ fileRef, referrer })`, the referrer being the `referrer` the
58
- Provider gave beside it, or `{ room, path }` of the document whose text names it. Both
59
- answer `{ kind: 'binary', blob }` or a refusal or failure.
47
+ until the Provider accepts it, `{ state: 'pending', localId, path, byteLength, mediaType,
48
+ sha256 }`. Write one with a Room Draft whose only part is `file: { blob }`, the `Blob`'s
49
+ `type` its media type: Save keeps the bytes in its Pending Change, offline too, and
50
+ acceptance gives the record the Provider's revision. Move or remove one as a Document, a
51
+ pending one before or after Save too, its bytes following; once its Pending Change has
52
+ gone to the Provider, Save refuses that as `unknown-revision` until it is accepted.
53
+ `binaryFile.read(room, path, revision?)` answers a pending record's saved bytes, or asks
54
+ the Provider on every read of an accepted one or a History revision, a removed file's
55
+ last included, keeping nothing. Text, a Record attachment or a conversation message may
56
+ name a file by its `fileRef`; read it with `binaryFile.readReference({ fileRef, referrer
57
+ })`, the `referrer` the Provider gave beside it, or `{ room, path }` of the document
58
+ whose text names it. Both answer `{ kind: 'binary', blob }` or a refusal or failure.
60
59
 
61
60
  Rooms, Query, Search, Observe, Types, Room Draft, Save, and Reached never touch the
62
61
  network. History, the binary file reads and Call go to the Provider through the Adapter.
@@ -77,7 +76,9 @@ other than its result, a refused Save or Room Draft write, a returned Room Draft
77
76
  reason, a Room's refusal and the Connection Refusal, and every error a member rejects
78
77
  with, beside its message. A Provider refusal carries the Provider's own `retryable`.
79
78
  Every code and every value the API answers is open: handle one you do not know by its
80
- `code` and `retryable`.
79
+ `code` and `retryable`. Only a tag telling which fields a value carries, such as an
80
+ answer's `kind`, is closed so it narrows: keep a branch for a tag you do not know. A
81
+ model with no usable types answers `types: null`, whatever its `status`.
81
82
 
82
83
  Read the deployment facts with `observe('deployment-facts')`, an opaque value the host's
83
84
  contract interprets. `observe('member')` answers who uses the App: the User the Provider
@@ -104,35 +105,37 @@ observe the query to hear the complete one. A query is data:
104
105
  - **Fields.** Every frontmatter value is named by JSON Pointer: `/status`,
105
106
  `/shipping/city`, `~1` for a `/` and `~0` for a `~` in a key. A segment that meets a
106
107
  list applies to every item and a number names one item. `where` names pointers, ANDs
107
- them, and nests `$and` and `$or`; a pointer through a list holds when any item
108
- satisfies it. A bare value is equality; the operators are `$eq`, `$ne`, `$in`, `$nin`,
109
- `$gt`, `$gte`, `$lt`, `$lte`, `$all`, `$size` and `$exists`. Equality on a list asks
110
- whether it contains the value. Missing, null and empty differ: `$exists: false` keeps
111
- a missing field, `null` an explicit null, `''` empty text and `$size: 0` an empty
112
- list. A date compares in calendar order and never with a date-time. A reference
113
- compares by the Room Path it resolves to. Untyped frontmatter, and a value under
114
- `oneOf` or a conditional, is plain values. There is no text containment or regular
115
- expression.
108
+ them, and nests `$and` and `$or`; a pointer through a list holds if any item satisfies
109
+ it. A bare value is equality; the operators are `$eq`, `$ne`, `$in`, `$nin`, `$gt`,
110
+ `$gte`, `$lt`, `$lte`, `$all`, `$size` and `$exists`. Equality on a list asks if it
111
+ contains the value. Missing, null and empty differ: `$exists: false` keeps a missing
112
+ field, `null` an explicit null, `''` empty text and `$size: 0` an empty list. A date
113
+ compares in calendar order and never with a date-time. A reference compares by the
114
+ Room Path it resolves to. Untyped frontmatter, and a value under `oneOf` or a
115
+ conditional, is plain values. There is no text containment or regular expression.
116
116
  - **Relations.** `hop: { field, types, where, pathPrefix }` keeps Documents whose
117
117
  reference at pointer `field`, at any depth, points to a matching Document of the same
118
118
  Room. `backlinks: { field, types, where, pathPrefix }` keeps Documents that a matching
119
119
  Document of the same Room references. Each keeps a Document once.
120
120
  - **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
121
- `preamble`, `markdown`, `backlinks` and `change`, where `fields` is `'all'` or a list
122
- of pointers and `sections` `'all'` or a list of names. Selected pointers return the
123
- frontmatter holding only them, nested as written. A backlink names the referring Path,
124
- MD Type and the pointer it came from as `field`. Room and Path always return; a
125
- Markdown Document also returns its MD Type. A non-Markdown Document returns only Room
126
- and Path, and a binary Path entry Room, Path and its `binaryFile` record, whatever is
127
- selected. An unselected part is absent. Select only what a screen shows: a list that
121
+ `preamble`, `markdown`, `backlinks`, `change` and `fileId`, where `fields` is `'all'`
122
+ or a list of pointers and `sections` `'all'` or a list of names. Selected pointers
123
+ return the frontmatter holding only them, nested as written. A backlink names the
124
+ referring Path, MD Type and the pointer it came from as `field`. Room and Path always
125
+ return; a Markdown Document also returns its MD Type. A non-Markdown Document returns
126
+ only Room, Path and a selected `fileId`, and a binary Path entry its `binaryFile`
127
+ record too. An unselected part is absent. Select only what a screen shows: a list that
128
128
  selects the Markdown hears every edit of it.
129
129
  - **Change.** `change` is `{ author, time }` of the Document's head revision as the
130
- Provider last delivered it: `author` is `{ kind: 'user' | 'site', id, name }` or
131
- `null` for a write the Provider made itself, and `time` is the Provider's ISO 8601
132
- change time. It is `null` where the Provider delivered no time, as at a Site. An
133
- unsent edit or move keeps it, an unsent creation has none, and a saved write takes the
134
- Provider's own once it is Accepted. A Room's last change is its Document with the
135
- latest `time`.
130
+ Provider last delivered it: `author` is `{ kind: 'user' | 'site', id, name }` or `null`
131
+ for a write the Provider made itself, and `time` is the Provider's ISO 8601 change
132
+ time. It is `null` where the Provider delivered no time, as at a Site. An unsent edit
133
+ or move keeps it, an unsent creation has none, and a saved write takes the Provider's
134
+ own once it is Accepted. A Room's last change is its Document with the latest `time`.
135
+ - **File ID.** `fileId` is the Provider's Stable File ID of the file at the Path, or
136
+ `null` where the Provider supplies none. An unsent edit keeps it, an unsent move
137
+ carries it to the new Path, and an unsent creation has none until it is Accepted, so a
138
+ file ID that leaves one Path for another is the same file moved.
136
139
  - **Order and groups.** `orderBy` sorts by `room`, `path`, `type` or `{ field }` with
137
140
  TanStack DB's own options, and ties end with Room, then Path. `groupBy` by `room`,
138
141
  `type` or `{ field }` answers `{ groups: [{ key, count }] }`, counted over every match
@@ -143,65 +146,63 @@ observe the query to hear the complete one. A query is data:
143
146
  `current` false while a newer copy of that Room is being fetched, and the queued
144
147
  changes it includes as `overlay`; a Save in a Room changes the `overlay` of every
145
148
  query over it. An invalid query fails with the `code` `invalid-query`, `unknown-type`,
146
- `unknown-field` or `wrong-kind`, naming where, and never answers an empty result in
147
- its place.
149
+ `unknown-field` or `wrong-kind`, naming where, and never answers empty in its place.
148
150
 
149
151
  ## Local Search rules
150
152
 
151
- `search({ text, documents, conversations, limit })` answers once, by words, from local
152
- state, with MiniSearch's defaults. There is no observed search.
153
+ `search({ text, documents, collection, conversations, limit })` answers once, by words,
154
+ from local state, with MiniSearch's defaults. There is no observed search.
153
155
 
156
+ - **Declaration.** Only an App whose release declares Local Search searches, its first
157
+ readiness waiting for its index; any other App's `search` answers the never retryable
158
+ `undeclared` refusal `search-undeclared`, its `fields` naming `local_search`.
154
159
  - **What is found.** A Document by its field values, its sections' headings and text,
155
160
  its preamble and its Path; a message by its text. Frontmatter keys, Room Drafts, chat
156
161
  drafts and a running turn's parts are never found. There are no phrases, word forms,
157
162
  typo tolerance or prefix matching.
158
- - **Narrowing.** `documents` is a Local Query filter: `rooms`, `types`, `where`,
159
- `pathPrefix`, `hop` and `backlinks`. `conversations` names conversations. Both apply
160
- before `limit`, which bounds each list; without it every hit returns.
161
- - **Results.** `{ documents, messages, coverage }`, or `{ pending }` naming each Room or
162
- conversation the search waits for while its index is prepared: ask again, and never
163
+ - **Narrowing.** `documents` is a Local Query filter, and `collection: true` leaves out
164
+ what each Room's `typedSelection` roots hold; `conversations` names conversations. All
165
+ apply before `limit`, which bounds each list; without it every hit returns.
166
+ - **Results.** `{ documents, messages, coverage }`, or the same with `pending` naming each
167
+ Room or conversation the search still waits for: show its hits, ask again, and never
163
168
  read pending as no hits. `coverage` names the Rooms and conversations searched. Each
164
- list is ranked by `score`, which compares hits of one list of one search. A Document
165
- hit names its `room`, `path` and `type`, a message hit its `conversation` and
166
- `identity`, and `matches` maps each matched word to the parts it matched in: `fields`,
167
- `sections`, `preamble` or `path`, or `text`. A hit carries no position; mark the words
168
- in the text you show. An invalid filter fails with its Local Query error.
169
+ list is ranked by `score`, comparable only within it; tied Documents come by `room`,
170
+ then `path`. A Document hit names its `room`, `path` and `type`, a message hit its
171
+ `conversation` and `identity`; `matches` maps each matched word to the parts it matched
172
+ in: `fields`, `sections`, `preamble`, `path` or `text`. A hit carries no position: mark
173
+ the words in the text you show. An invalid filter fails with its Local Query error.
169
174
 
170
175
  ## Room Draft, Save, and outcome rules
171
176
 
172
177
  The MD Runtime owns one Room Draft per Room and Path, shared by every App and tab. It is
173
- durable: it survives reload and navigation. A Room that Discovery stops listing takes
174
- its Room Drafts and its queue with it. Write a Room Draft with `roomDraft.write(room,
175
- path, revision, parts)`, naming the revision you read, or `null` when there was none,
176
- and every part it should now change: fields, sections and the preamble, or the whole
177
- Markdown, a creation, a move, or a removal. A part new to the Room Draft names its base,
178
- the value you showed when it was opened; the MD Runtime keeps a part's first base; a
179
- binary Path entry's move or removal takes `null` as its base. A write or a discard from
180
- an older revision is refused as `stale` with the current Room Draft; read it and write
181
- again.
178
+ durable: it survives reload and navigation. A Room the Provider reports lost takes its
179
+ Room Drafts and its queue with it. Write a Room Draft with `roomDraft.write(room, path,
180
+ revision, parts)`, naming the revision you read, or `null` when there was none, and every
181
+ part it should now change: fields, sections and the preamble, or the whole Markdown, a
182
+ creation, a move, or a removal. A part new to the Room Draft names its base, the value
183
+ you showed when it was opened; the MD Runtime keeps a part's first base; a binary Path
184
+ entry's move or removal takes `null` as its base. A write or a discard from an older
185
+ revision is refused as `stale` with the current Room Draft; read it and write again.
182
186
 
183
187
  Save takes one Room and the Room Drafts of it to save, each with its revision, validates
184
188
  locally, and on success appends one Change Batch to that Room's queue and removes those
185
189
  Room Drafts. It is refused with the `code` `stale`, `changed-underneath` naming each
186
190
  part whose base no longer matches the visible state, or a local validation rule, and
187
191
  then creates nothing and leaves every Room Draft in place. A directory move or removal
188
- is a move or removal part on each Document and binary Path entry beneath it, saved
189
- together.
190
-
191
- Outcomes follow the Provider's answer. An Accepted Change Batch stays in the queue,
192
- drawn over the confirmed layer, until the confirmed layer reaches the Room Version it
193
- was accepted at, and then leaves it. Conflicted and Rejected, an expired operation, and
194
- a change that no longer applies over the Room each leave the queue and return as Room
195
- Drafts on the Documents they changed, marked with why: the Provider's structured refusal
196
- code and fields as returned, not known to have applied, or withdrawn locally. The rest
197
- of the queue keeps synchronizing, and Sync Status requires attention until each returned
198
- Room Draft is saved again or discarded. A Change Batch keeps no outcome once it leaves
199
- the queue; `observe('queue', room)` shows each Pending one, and a returned Room Draft
200
- says why it returned. Transport failure and Provider unavailability keep work Pending
201
- and do not infer a rejection. A refusal the Provider marks retryable stays Pending until
202
- the reset it names; the MD Runtime retries the same Change Batch identity and payload
203
- and never infers an outcome from transport uncertainty. The MD Runtime never combines,
204
- reorders, or rebases.
192
+ is that part on each Document and binary Path entry beneath it, saved together.
193
+
194
+ Outcomes follow the Provider's answer. An Accepted Change Batch stays in the queue, drawn
195
+ over the confirmed layer, until that layer reaches the Room Version it was accepted at,
196
+ then leaves it. Conflicted and Rejected, an expired operation, and a change that no
197
+ longer applies over the Room each leave the queue and return as Room Drafts on their
198
+ Documents, marked with why: the Provider's structured refusal code and fields as
199
+ returned, not known to have applied, or withdrawn locally. The rest of the queue keeps
200
+ synchronizing, and Sync Status requires attention until each returned Room Draft is saved
201
+ or discarded. A Change Batch keeps no outcome once it leaves the queue; `observe('queue',
202
+ room)` shows each Pending one. Transport failure and Provider unavailability keep work
203
+ Pending, as does a refusal the Provider marks retryable until the reset it names; the MD
204
+ Runtime retries the same Change Batch identity and payload, never infers an outcome from
205
+ transport uncertainty, and never combines, reorders, or rebases.
205
206
 
206
207
  On a Site, every Save stays in the visitor's browser. Write grants and revisions do not
207
208
  refuse it, and its Pending Change shows in every query and across reloads until the
@@ -210,46 +211,46 @@ browser's storage is cleared. It is never sent: `observe('queue', room)` shows i
210
211
  applies, it leaves the queue and returns no Room Draft.
211
212
 
212
213
  `observe('service-mode')` answers the Provider's Service Mode, `open` or `write-halted`.
213
- While writes are halted, Save still succeeds, its Change Batch waits unsent, and the
214
- queue is submitted in order once the Provider reopens writes. An Action is never held: a
215
- write the Provider refuses for the halt returns that refusal to its caller. Show the
216
- Provider as read-only instead of retrying.
217
-
218
- ## The neutrality rule
219
-
220
- No module outside an Adapter package imports, names, or special-cases a Provider. MD UI
221
- and every App reach data only through the client entry.
214
+ While writes are halted, Save still succeeds, its Change Batch waits unsent, and the queue
215
+ is submitted in order once writes reopen. An Action is never held: one the halt refuses
216
+ returns that refusal to its caller. Show the Provider as read-only instead of retrying.
217
+ `observe('readiness')` tells whether the App's code and bound Rooms are held locally
218
+ (`ready`), each Room's state, each refused Room's file and rule, the persistence answer
219
+ and a paused preparation's `capacity` cause; `retry()` resumes a paused preparation.
222
220
 
223
221
  ## Content-safety rules
224
222
 
225
- The Provider authorization belongs to the Runtime host and is never readable by the
226
- App's code. The App's code reaches the network only at the external origins its manifest
227
- declares, empty by default, and the Provider enforces that set. Every request to the
228
- Provider itself goes through the MD Runtime. Rendered Markdown never executes scripts,
229
- renders raw HTML only for the details and summary elements, and loads images and other
230
- resources only from origins the Provider's policy allows.
223
+ The Provider authorization belongs to the Runtime host and is never readable by the App's
224
+ code. The App's code reaches the network only at the external origins its manifest
225
+ declares, empty by default, and the Provider enforces that set. Rendered Markdown never
226
+ executes scripts, renders raw HTML only for the details and summary elements, and loads
227
+ images and other resources only from origins the Provider's policy allows.
231
228
 
232
229
  ## Launch promises MD UI keeps
233
230
 
234
231
  MD UI uses semantic HTML, is fully operable from a keyboard with visible focus and
235
232
  labelled controls, and lays out from a 360 pixel wide viewport to a desktop. Its strings
236
233
  are English only, dates and numbers follow the browser locale, and content is never
237
- translated. Light and dark themes come from CSS custom properties with the browser's
238
- preference as the default and an App's override respected. What an App Creator's agent
239
- adds carries none of these promises by itself. Reading, querying and searching never
240
- wait for the network. Data lives only in the App Creator's browser and with the
241
- Provider.
234
+ translated. Light and dark themes come from CSS custom properties, defaulting to the
235
+ browser's preference and respecting an App's override. What an agent adds carries none of
236
+ these promises by itself. Data lives only in the App Creator's browser and the Provider.
242
237
 
243
238
  ## App code takes the client its host hands it and never constructs a Runtime
244
239
 
245
- App code takes the client its host hands it: in House, `houseBridge().runtime` from
246
- `@agentshouse/app-bridge` resolves to the client House built into the page. It imports
247
- only types from `@agentshouse/mdruntime/client`, never calls `connectMdRuntime` or
248
- `serveMdRuntime`, and never imports the package main, the host entry or the Adapter
249
- package, which hosts and tests use. The in-memory Adapter at
240
+ No module outside an Adapter package imports, names, or special-cases a Provider, and
241
+ every App and MD UI reach data only through the client entry. In House,
242
+ `houseBridge().runtime` from `@agentshouse/app-bridge` resolves to the client House built
243
+ into the page. App code imports only types from `@agentshouse/mdruntime/client`, never
244
+ calls `connectMdRuntime` or `serveMdRuntime`, and never imports the package main, the host
245
+ entry or the Adapter package, which hosts and tests use. The in-memory Adapter at
250
246
  `@agentshouse/mdruntime/memory` is for tests and ships in no bundle. A Site's page fills
251
247
  its Entry Data Contract's `{"$param": name}` arguments with `boundQuery` from
252
- `@agentshouse/mdruntime/entry`, as House did for its HTML.
248
+ `@agentshouse/mdruntime/entry`, as House did for its HTML. While the Site prepares, each
249
+ query a route's `interaction` names answers from the entry's result when the page observes
250
+ that same descriptor, and every other stays pending. House replaces its HTML with the page
251
+ once its document changed after those answers, or readiness is `ready`, and then held
252
+ still for two animation frames, unless the visitor uses the HTML: draw the route from them
253
+ at once, never behind a placeholder. Before readiness is `ready`, `push` loads a new page.
253
254
 
254
255
  A React App may observe and save through `@agentshouse/mdruntime/react`, which names
255
256
  React as a peer dependency. `useObserve(client, topic, ...input)` takes the arguments of
@@ -260,8 +261,10 @@ nothing and stays loading. `useSave(client)` returns `busy`, the last `outcome`
260
261
  Draft already there, keeping the bases its parts have, or onto a new one, and saves them
261
262
  together. A refused Save leaves the Room Drafts for the App to save again or discard; a
262
263
  failure is recorded and rejects. `saveRoomDrafts(client, room, roomDrafts)` is that save
263
- outside a component. A react-admin or Refine App reads and writes its Rooms through the
264
- data providers of `@agentshouse/mdruntime-families`.
264
+ outside a component. An App that writes its Room Drafts itself saves them with
265
+ `saveWritten(room, roomDrafts)`, each named with the revision its last write returned: one
266
+ another tab wrote since is refused as `stale`, and nothing is saved. A react-admin or
267
+ Refine App uses the data providers of `@agentshouse/mdruntime-families`.
265
268
 
266
269
  ## The Chat
267
270
 
@@ -0,0 +1,14 @@
1
+ export type RuntimeDemand = {
2
+ readonly whole: boolean;
3
+ readonly rooms: readonly string[];
4
+ readonly handles: readonly string[];
5
+ readonly conversations: boolean;
6
+ };
7
+ export declare const WHOLE_DEMAND: RuntimeDemand;
8
+ export declare function demanded(demand: RuntimeDemand, room: {
9
+ readonly locator: string;
10
+ readonly handle: string;
11
+ }): boolean;
12
+ export declare function wider(next: RuntimeDemand, current: RuntimeDemand): boolean;
13
+ export declare function narrower(next: RuntimeDemand, current: RuntimeDemand): boolean;
14
+ //# sourceMappingURL=acquisition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acquisition.d.ts","sourceRoot":"","sources":["../src/acquisition.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,aAK1B,CAAC;AAEF,wBAAgB,QAAQ,CACtB,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC1D,OAAO,CAIT;AAYD,wBAAgB,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAE1E;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAE7E"}
@@ -0,0 +1,24 @@
1
+ export const WHOLE_DEMAND = {
2
+ whole: true,
3
+ rooms: [],
4
+ handles: [],
5
+ conversations: true,
6
+ };
7
+ export function demanded(demand, room) {
8
+ return (demand.whole || demand.rooms.includes(room.locator) || demand.handles.includes(room.handle));
9
+ }
10
+ function adds(next, current) {
11
+ if (current.whole)
12
+ return false;
13
+ if (next.whole)
14
+ return true;
15
+ return ((next.conversations && !current.conversations) ||
16
+ next.rooms.some((room) => !current.rooms.includes(room)) ||
17
+ next.handles.some((handle) => !current.handles.includes(handle)));
18
+ }
19
+ export function wider(next, current) {
20
+ return adds(next, current);
21
+ }
22
+ export function narrower(next, current) {
23
+ return adds(current, next);
24
+ }
package/dist/adapter.d.ts CHANGED
@@ -238,17 +238,15 @@ export type ContractUnavailable = ProviderRefusal & {
238
238
  export type DiscoverResult = Discovery | TransportUncertainty | RevokedAuthorization | ContractUnavailable;
239
239
  export type PageToken = string;
240
240
  export type ChangeAuthor = {
241
- kind: 'user';
241
+ kind: Open<'user' | 'site'>;
242
242
  id: string;
243
243
  name: string;
244
- } | {
245
- kind: 'site';
244
+ };
245
+ export type Member = {
246
+ kind: Open<'user'>;
246
247
  id: string;
247
248
  name: string;
248
249
  };
249
- export type Member = Extract<ChangeAuthor, {
250
- kind: 'user';
251
- }>;
252
250
  export type HeadChange = {
253
251
  author: ChangeAuthor | null;
254
252
  time: string;
@@ -279,6 +277,7 @@ export type BootstrapPage = {
279
277
  models?: RoomModels;
280
278
  documents: Readonly<Record<string, string>>;
281
279
  revisions: Readonly<Record<string, string>>;
280
+ fileIds?: Readonly<Record<string, string>>;
282
281
  changes: Readonly<Record<string, HeadChange>>;
283
282
  binaryFiles: Readonly<Record<string, BinaryFile>>;
284
283
  pageToken?: PageToken;
@@ -298,6 +297,7 @@ export type RefreshPage = {
298
297
  models?: RoomModels;
299
298
  documents: Readonly<Record<string, string>>;
300
299
  revisions: Readonly<Record<string, string>>;
300
+ fileIds?: Readonly<Record<string, string>>;
301
301
  changes: Readonly<Record<string, HeadChange>>;
302
302
  binaryFiles: Readonly<Record<string, BinaryFile>>;
303
303
  removals: readonly string[];
@@ -326,6 +326,7 @@ export type MutationResult = {
326
326
  roomVersion: string;
327
327
  documents: Readonly<Record<string, string>>;
328
328
  revisions: Readonly<Record<string, string>>;
329
+ fileIds?: Readonly<Record<string, string>>;
329
330
  changes: Readonly<Record<string, HeadChange>>;
330
331
  removals: readonly string[];
331
332
  binaryFiles?: Readonly<Record<string, BinaryFile>>;
@@ -399,6 +400,13 @@ export type BinaryResult = {
399
400
  } | (ProviderRefusal & {
400
401
  kind: 'rejected';
401
402
  }) | AdapterFailure;
403
+ export type BinaryLinkResult = {
404
+ kind: 'link';
405
+ url: string;
406
+ name: string;
407
+ } | (ProviderRefusal & {
408
+ kind: 'rejected';
409
+ }) | AdapterFailure;
402
410
  export type ActionRequest = {
403
411
  name: string;
404
412
  input: unknown;
@@ -425,9 +433,12 @@ export type RoomStreamEvent = {
425
433
  } | {
426
434
  kind: 'closed';
427
435
  revoked: boolean;
436
+ lost: boolean;
428
437
  } | {
429
438
  kind: 'opening';
430
439
  expired: readonly string[];
440
+ } | {
441
+ kind: 'authority-changed';
431
442
  } | {
432
443
  kind: 'room-version';
433
444
  locator: string;
@@ -446,8 +457,12 @@ export type StreamReceipts = {
446
457
  }): Promise<void>;
447
458
  drop(keys: readonly string[]): Promise<void>;
448
459
  };
460
+ export type AcquiredDemand = {
461
+ rooms: readonly string[];
462
+ conversations: boolean;
463
+ };
449
464
  export type RoomStream = {
450
- hold(rooms: readonly HeldRoom[]): void;
465
+ hold(rooms: readonly HeldRoom[], demand: AcquiredDemand | null): void;
451
466
  reopen(): void;
452
467
  published(locator: string, roomVersion: string): void;
453
468
  observe(notify: (event: RoomStreamEvent) => void, receipts: StreamReceipts): () => void;
@@ -462,6 +477,9 @@ export type Adapter = {
462
477
  mutate(authorization: Authorization, request: MutationRequest, keep: (upload: unknown) => Promise<void>): Promise<MutationResult>;
463
478
  history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
464
479
  binary(authorization: Authorization, request: BinaryRequest): Promise<BinaryResult>;
480
+ link(authorization: Authorization, request: Extract<BinaryRequest, {
481
+ kind: 'path';
482
+ }>): Promise<BinaryLinkResult>;
465
483
  referrerScope(referrer: unknown): ReferrerScope | null;
466
484
  action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
467
485
  reached(locator: string, roomVersion: string, target: string): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"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a,GAAG,IAAI,CAAC;IACvD,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACpF,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACvE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACrE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC,CAAC"}
@@ -14,11 +14,12 @@ export type HeldModels = {
14
14
  selection: ModelState;
15
15
  };
16
16
  export type Remodel = (models: RoomModels | undefined, held: HeldModels) => HeldModels;
17
+ export type Reads = Pick<Adapter, 'bootstrap' | 'refresh' | 'reached'>;
17
18
  export type Staging = {
18
19
  held(locator: string): TransferRecord | null;
19
20
  staged(record: TransferRecord): Promise<StagedLayer>;
20
21
  stage(record: TransferRecord, page: StagedLayer): Promise<boolean>;
21
22
  abandon(locator: string): Promise<void>;
22
23
  };
23
- export declare function bootstrapRoom(adapter: Adapter, authorization: Authorization, room: DiscoveredRoom, held: HeldModels, remodel: Remodel, continuing: () => boolean, staging: Staging, reuse: HeldContent | null): Promise<BootstrapOutcome>;
24
+ export declare function bootstrapRoom(adapter: Reads, authorization: Authorization, room: DiscoveredRoom, held: HeldModels, remodel: Remodel, continuing: () => boolean, staging: Staging, reuse: HeldContent | null): Promise<BootstrapOutcome>;
24
25
  //# sourceMappingURL=bootstrap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,OAAO,EAC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AM,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACrD,KAAK,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC,CAAC;AA0CF,wBAAsB,aAAa,CACjC,OAAO,EAAE,KAAK,EACd,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,OAAO,EACzB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,WAAW,GAAG,IAAI,GACxB,OAAO,CAAC,gBAAgB,CAAC,CA4B3B"}
package/dist/bootstrap.js CHANGED
@@ -12,6 +12,7 @@ function pageLayer(page) {
12
12
  return {
13
13
  documents: page.documents,
14
14
  revisions: page.revisions,
15
+ fileIds: page.fileIds ?? {},
15
16
  changes: page.changes,
16
17
  written: Object.fromEntries(Object.keys(page.documents).map((path) => [path, page.roomVersion])),
17
18
  binaries: acceptedBinaries(page.binaryFiles),
@@ -49,6 +50,7 @@ async function bundle(adapter, authorization, room, held, remodel, continuing, s
49
50
  const selection = room.replica.selection;
50
51
  const documents = { ...kept?.layer.documents };
51
52
  const revisions = { ...kept?.layer.revisions };
53
+ const fileIds = { ...kept?.layer.fileIds };
52
54
  const changes = { ...kept?.layer.changes };
53
55
  const written = { ...kept?.layer.written };
54
56
  const binaries = { ...kept?.layer.binaries };
@@ -87,6 +89,7 @@ async function bundle(adapter, authorization, room, held, remodel, continuing, s
87
89
  return unconfirmed;
88
90
  Object.assign(documents, staged.documents);
89
91
  Object.assign(revisions, staged.revisions);
92
+ Object.assign(fileIds, staged.fileIds);
90
93
  Object.assign(changes, staged.changes);
91
94
  Object.assign(written, staged.written);
92
95
  Object.assign(binaries, staged.binaries);
@@ -106,6 +109,7 @@ async function bundle(adapter, authorization, room, held, remodel, continuing, s
106
109
  documents,
107
110
  binaries,
108
111
  revisions,
112
+ fileIds,
109
113
  changes,
110
114
  written,
111
115
  };
@@ -1 +1 @@
1
- {"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiC,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAwB,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,EAAE,CAAC;IACvB,KAAK,EAAE,SAAS,GAAG,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE5F,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IACrC,MAAM,EAAE,SAAS;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrD,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IACnC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,CAAC;AAuBF,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,OAAO,GAAG,IAAI,EACtB,KAAK,EAAE,OAAO,GAAG,IAAI,EACrB,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,IAAI,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