@agentshouse/mdruntime 0.1.0-c454894e67f74 → 0.1.0-c56a80355e230

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 (80) hide show
  1. package/AGENTS.md +105 -99
  2. package/dist/adapter.d.ts +16 -0
  3. package/dist/adapter.d.ts.map +1 -1
  4. package/dist/bootstrap.d.ts +2 -1
  5. package/dist/bootstrap.d.ts.map +1 -1
  6. package/dist/bootstrap.js +4 -0
  7. package/dist/change-set.d.ts.map +1 -1
  8. package/dist/change-set.js +2 -1
  9. package/dist/chat/kit.js +1 -1
  10. package/dist/chat/question.d.ts +1 -1
  11. package/dist/chat/question.d.ts.map +1 -1
  12. package/dist/chat/question.js +7 -18
  13. package/dist/client.d.ts +3 -1
  14. package/dist/client.d.ts.map +1 -1
  15. package/dist/client.js +14 -5
  16. package/dist/connection.d.ts +7 -2
  17. package/dist/connection.d.ts.map +1 -1
  18. package/dist/connection.js +355 -96
  19. package/dist/conversation.d.ts +1 -0
  20. package/dist/conversation.d.ts.map +1 -1
  21. package/dist/conversation.js +40 -5
  22. package/dist/entry.d.ts.map +1 -1
  23. package/dist/entry.js +1 -1
  24. package/dist/host.d.ts +8 -3
  25. package/dist/host.d.ts.map +1 -1
  26. package/dist/host.js +54 -6
  27. package/dist/index.d.ts +5 -4
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +1 -0
  30. package/dist/memory.d.ts +6 -1
  31. package/dist/memory.d.ts.map +1 -1
  32. package/dist/memory.js +20 -5
  33. package/dist/outcome.d.ts +8 -2
  34. package/dist/outcome.d.ts.map +1 -1
  35. package/dist/outcome.js +3 -0
  36. package/dist/overlay.d.ts +1 -0
  37. package/dist/overlay.d.ts.map +1 -1
  38. package/dist/overlay.js +27 -3
  39. package/dist/query.d.ts +6 -0
  40. package/dist/query.d.ts.map +1 -1
  41. package/dist/query.js +8 -2
  42. package/dist/reach.d.ts +1 -2
  43. package/dist/reach.d.ts.map +1 -1
  44. package/dist/reach.js +7 -4
  45. package/dist/react.d.ts +2 -1
  46. package/dist/react.d.ts.map +1 -1
  47. package/dist/react.js +6 -4
  48. package/dist/read-side.d.ts.map +1 -1
  49. package/dist/read-side.js +3 -0
  50. package/dist/reads.d.ts +11 -0
  51. package/dist/reads.d.ts.map +1 -0
  52. package/dist/reads.js +98 -0
  53. package/dist/refresh.d.ts +4 -4
  54. package/dist/refresh.d.ts.map +1 -1
  55. package/dist/refresh.js +6 -0
  56. package/dist/replica.d.ts +5 -1
  57. package/dist/replica.d.ts.map +1 -1
  58. package/dist/replica.js +30 -5
  59. package/dist/room-draft.d.ts +12 -0
  60. package/dist/room-draft.d.ts.map +1 -1
  61. package/dist/room-draft.js +2 -2
  62. package/dist/rows.d.ts +2 -1
  63. package/dist/rows.d.ts.map +1 -1
  64. package/dist/rows.js +3 -1
  65. package/dist/save.d.ts +1 -0
  66. package/dist/save.d.ts.map +1 -1
  67. package/dist/save.js +17 -1
  68. package/dist/search.d.ts +13 -5
  69. package/dist/search.d.ts.map +1 -1
  70. package/dist/search.js +29 -6
  71. package/dist/seed.d.ts +16 -0
  72. package/dist/seed.d.ts.map +1 -0
  73. package/dist/seed.js +61 -0
  74. package/dist/store.d.ts +12 -3
  75. package/dist/store.d.ts.map +1 -1
  76. package/dist/store.js +35 -4
  77. package/dist/wire.d.ts +8 -0
  78. package/dist/wire.d.ts.map +1 -1
  79. package/dist/wire.js +2 -0
  80. package/package.json +2 -2
package/AGENTS.md CHANGED
@@ -13,11 +13,9 @@ 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
21
  the latest complete value, `subscribe(listener)` hears each later value whole and returns
@@ -43,22 +41,30 @@ identity>`: no conversation list removes it, a retired Agent's goes, and the fir
43
41
  to `conversation.create({ agent_id, operation_id })` moves it to the created conversation,
44
42
  where `conversation.send(conversation)` sends it; a replay of that create moves nothing.
45
43
 
44
+ Presentation State is one value per App, kept in the browser and shared by every tab of
45
+ the App. `presentation.read()` answers it, `null` before anything is kept, and
46
+ `observe('presentation')` hears it whole. `presentation.write(value)` replaces it whole.
47
+ `presentation.edit(members)` sets each member the object names and removes one named
48
+ `null`, in the state as it stands, so tabs changing different members never lose
49
+ each other's change: change a member with `edit`, never by writing back a value read
50
+ before, which drops what another tab changed meanwhile. Both reject when the browser does
51
+ not keep the change, and then no tab sees it.
52
+
46
53
  A binary file at a Path is a binary Path entry. Query lists it by `path`, and History
47
54
  each of its revisions, with its `binaryFile` record and never its bytes: `{ state:
48
55
  'accepted', revision, path, fileRef, byteLength, mediaType, sha256 }`, or, from a Save
49
- until the Provider accepts it, `{ state: 'pending', localId, path, byteLength,
50
- mediaType, sha256 }`. Write one with a Room Draft whose only part is `file: { blob }`,
51
- the `Blob`'s `type` its media type: Save keeps the bytes in its Pending Change, offline
52
- too, and acceptance gives the record the Provider's revision. Move or remove one as a
53
- Document, a pending one before or after Save too, its bytes following; once its Pending
54
- Change has gone to the Provider, Save refuses that as `unknown-revision` until it is
55
- accepted. `binaryFile.read(room, path, revision?)` answers a pending record's saved
56
- bytes, or asks the Provider again on every read of an accepted one or of a History
57
- revision, a removed file's last included, keeping nothing. Text, a Record attachment or
58
- a conversation message may name a file by its `fileRef`; read it with
59
- `binaryFile.readReference({ fileRef, referrer })`, the referrer being the `referrer` the
60
- Provider gave beside it, or `{ room, path }` of the document whose text names it. Both
61
- answer `{ kind: 'binary', blob }` or a refusal or failure.
56
+ until the Provider accepts it, `{ state: 'pending', localId, path, byteLength, mediaType,
57
+ sha256 }`. Write one with a Room Draft whose only part is `file: { blob }`, the `Blob`'s
58
+ `type` its media type: Save keeps the bytes in its Pending Change, offline too, and
59
+ acceptance gives the record the Provider's revision. Move or remove one as a Document, a
60
+ pending one before or after Save too, its bytes following; once its Pending Change has
61
+ gone to the Provider, Save refuses that as `unknown-revision` until it is accepted.
62
+ `binaryFile.read(room, path, revision?)` answers a pending record's saved bytes, or asks
63
+ the Provider on every read of an accepted one or a History revision, a removed file's
64
+ last included, keeping nothing. Text, a Record attachment or a conversation message may
65
+ name a file by its `fileRef`; read it with `binaryFile.readReference({ fileRef, referrer
66
+ })`, the `referrer` the Provider gave beside it, or `{ room, path }` of the document
67
+ whose text names it. Both answer `{ kind: 'binary', blob }` or a refusal or failure.
62
68
 
63
69
  Rooms, Query, Search, Observe, Types, Room Draft, Save, and Reached never touch the
64
70
  network. History, the binary file reads and Call go to the Provider through the Adapter.
@@ -108,27 +114,26 @@ observe the query to hear the complete one. A query is data:
108
114
  - **Fields.** Every frontmatter value is named by JSON Pointer: `/status`,
109
115
  `/shipping/city`, `~1` for a `/` and `~0` for a `~` in a key. A segment that meets a
110
116
  list applies to every item and a number names one item. `where` names pointers, ANDs
111
- them, and nests `$and` and `$or`; a pointer through a list holds when any item
112
- satisfies it. A bare value is equality; the operators are `$eq`, `$ne`, `$in`, `$nin`,
113
- `$gt`, `$gte`, `$lt`, `$lte`, `$all`, `$size` and `$exists`. Equality on a list asks
114
- whether it contains the value. Missing, null and empty differ: `$exists: false` keeps
115
- a missing field, `null` an explicit null, `''` empty text and `$size: 0` an empty
116
- list. A date compares in calendar order and never with a date-time. A reference
117
- compares by the Room Path it resolves to. Untyped frontmatter, and a value under
118
- `oneOf` or a conditional, is plain values. There is no text containment or regular
119
- expression.
117
+ them, and nests `$and` and `$or`; a pointer through a list holds if any item satisfies
118
+ it. A bare value is equality; the operators are `$eq`, `$ne`, `$in`, `$nin`, `$gt`,
119
+ `$gte`, `$lt`, `$lte`, `$all`, `$size` and `$exists`. Equality on a list asks if it
120
+ contains the value. Missing, null and empty differ: `$exists: false` keeps a missing
121
+ field, `null` an explicit null, `''` empty text and `$size: 0` an empty list. A date
122
+ compares in calendar order and never with a date-time. A reference compares by the
123
+ Room Path it resolves to. Untyped frontmatter, and a value under `oneOf` or a
124
+ conditional, is plain values. There is no text containment or regular expression.
120
125
  - **Relations.** `hop: { field, types, where, pathPrefix }` keeps Documents whose
121
126
  reference at pointer `field`, at any depth, points to a matching Document of the same
122
127
  Room. `backlinks: { field, types, where, pathPrefix }` keeps Documents that a matching
123
128
  Document of the same Room references. Each keeps a Document once.
124
129
  - **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
125
- `preamble`, `markdown`, `backlinks` and `change`, where `fields` is `'all'` or a list
126
- of pointers and `sections` `'all'` or a list of names. Selected pointers return the
127
- frontmatter holding only them, nested as written. A backlink names the referring Path,
128
- MD Type and the pointer it came from as `field`. Room and Path always return; a
129
- Markdown Document also returns its MD Type. A non-Markdown Document returns only Room
130
- and Path, and a binary Path entry Room, Path and its `binaryFile` record, whatever is
131
- selected. An unselected part is absent. Select only what a screen shows: a list that
130
+ `preamble`, `markdown`, `backlinks`, `change` and `fileId`, where `fields` is `'all'`
131
+ or a list of pointers and `sections` `'all'` or a list of names. Selected pointers
132
+ return the frontmatter holding only them, nested as written. A backlink names the
133
+ referring Path, MD Type and the pointer it came from as `field`. Room and Path always
134
+ return; a Markdown Document also returns its MD Type. A non-Markdown Document returns
135
+ only Room, Path and a selected `fileId`, and a binary Path entry its `binaryFile`
136
+ record too. An unselected part is absent. Select only what a screen shows: a list that
132
137
  selects the Markdown hears every edit of it.
133
138
  - **Change.** `change` is `{ author, time }` of the Document's head revision as the
134
139
  Provider last delivered it: `author` is `{ kind: 'user' | 'site', id, name }` or `null`
@@ -136,6 +141,10 @@ observe the query to hear the complete one. A query is data:
136
141
  time. It is `null` where the Provider delivered no time, as at a Site. An unsent edit
137
142
  or move keeps it, an unsent creation has none, and a saved write takes the Provider's
138
143
  own once it is Accepted. A Room's last change is its Document with the latest `time`.
144
+ - **File ID.** `fileId` is the Provider's Stable File ID of the file at the Path, or
145
+ `null` where the Provider supplies none. An unsent edit keeps it, an unsent move
146
+ carries it to the new Path, and an unsent creation has none until it is Accepted, so a
147
+ file ID that leaves one Path for another is the same file moved.
139
148
  - **Order and groups.** `orderBy` sorts by `room`, `path`, `type` or `{ field }` with
140
149
  TanStack DB's own options, and ties end with Room, then Path. `groupBy` by `room`,
141
150
  `type` or `{ field }` answers `{ groups: [{ key, count }] }`, counted over every match
@@ -146,39 +155,42 @@ observe the query to hear the complete one. A query is data:
146
155
  `current` false while a newer copy of that Room is being fetched, and the queued
147
156
  changes it includes as `overlay`; a Save in a Room changes the `overlay` of every
148
157
  query over it. An invalid query fails with the `code` `invalid-query`, `unknown-type`,
149
- `unknown-field` or `wrong-kind`, naming where, and never answers an empty result in
150
- its place.
158
+ `unknown-field` or `wrong-kind`, naming where, and never answers empty in its place.
151
159
 
152
160
  ## Local Search rules
153
161
 
154
- `search({ text, documents, conversations, limit })` answers once, by words, from local
155
- state, with MiniSearch's defaults. There is no observed search.
162
+ `search({ text, documents, collection, conversations, limit })` answers once, by words,
163
+ from local state, with MiniSearch's defaults. There is no observed search.
156
164
 
165
+ - **Declaration.** Only an App whose release declares Local Search searches, its first
166
+ readiness waiting for its index; any other App's `search` answers the never retryable
167
+ `undeclared` refusal `search-undeclared`, its `fields` naming `local_search`.
157
168
  - **What is found.** A Document by its field values, its sections' headings and text,
158
169
  its preamble and its Path; a message by its text. Frontmatter keys, Room Drafts, chat
159
170
  drafts and a running turn's parts are never found. There are no phrases, word forms,
160
171
  typo tolerance or prefix matching.
161
- - **Narrowing.** `documents` is a Local Query filter: `rooms`, `types`, `where`,
162
- `pathPrefix`, `hop` and `backlinks`. `conversations` names conversations. Both apply
163
- before `limit`, which bounds each list; without it every hit returns.
164
- - **Results.** `{ documents, messages, coverage }`, or `{ pending }` naming each Room or
165
- conversation the search waits for while its index is prepared: ask again, and never
172
+ - **Narrowing.** `documents` is a Local Query filter, and `collection: true` leaves out
173
+ what each Room's `typedSelection` roots hold; `conversations` names conversations. All
174
+ apply before `limit`, which bounds each list; without it every hit returns.
175
+ - **Results.** `{ documents, messages, coverage }`, or the same with `pending` naming each
176
+ Room or conversation the search still waits for: show its hits, ask again, and never
166
177
  read pending as no hits. `coverage` names the Rooms and conversations searched. Each
167
- list is ranked by `score`, which compares hits of one list of one search. A Document
168
- hit names its `room`, `path` and `type`, a message hit its `conversation` and
169
- `identity`, and `matches` maps each matched word to the parts it matched in: `fields`,
170
- `sections`, `preamble` or `path`, or `text`. A hit carries no position; mark the words
171
- in the text you show. An invalid filter fails with its Local Query error.
178
+ list is ranked by `score`, comparable only within it; tied Documents come by `room`,
179
+ then `path`. A Document hit names its `room`, `path` and `type`, a message hit its
180
+ `conversation` and `identity`; `matches` maps each matched word to the parts it matched
181
+ in: `fields`, `sections`, `preamble`, `path` or `text`. A hit carries no position: mark
182
+ the words in the text you show. An invalid filter fails with its Local Query error.
172
183
 
173
184
  ## Room Draft, Save, and outcome rules
174
185
 
175
186
  The MD Runtime owns one Room Draft per Room and Path, shared by every App and tab. It is
176
- durable: it survives reload and navigation. A Room that Discovery stops listing takes its
187
+ durable: it survives reload and navigation. A Room the Provider reports lost takes its
177
188
  Room Drafts and its queue with it. Write a Room Draft with `roomDraft.write(room, path,
178
189
  revision, parts)`, naming the revision you read, or `null` when there was none, and every
179
190
  part it should now change: fields, sections and the preamble, or the whole Markdown, a
180
191
  creation, a move, or a removal. A part new to the Room Draft names its base, the value
181
- you showed when it was opened; the MD Runtime keeps a part's first base; a binary Path
192
+ you showed when it was opened, a field's as `{ value }` or `null` when the Document had no
193
+ such field; the MD Runtime keeps a part's first base; a binary Path
182
194
  entry's move or removal takes `null` as its base. A write or a discard from an older
183
195
  revision is refused as `stale` with the current Room Draft; read it and write again.
184
196
 
@@ -187,23 +199,20 @@ locally, and on success appends one Change Batch to that Room's queue and remove
187
199
  Room Drafts. It is refused with the `code` `stale`, `changed-underneath` naming each
188
200
  part whose base no longer matches the visible state, or a local validation rule, and
189
201
  then creates nothing and leaves every Room Draft in place. A directory move or removal
190
- is a move or removal part on each Document and binary Path entry beneath it, saved
191
- together.
192
-
193
- Outcomes follow the Provider's answer. An Accepted Change Batch stays in the queue,
194
- drawn over the confirmed layer, until the confirmed layer reaches the Room Version it
195
- was accepted at, and then leaves it. Conflicted and Rejected, an expired operation, and
196
- a change that no longer applies over the Room each leave the queue and return as Room
197
- Drafts on the Documents they changed, marked with why: the Provider's structured refusal
198
- code and fields as returned, not known to have applied, or withdrawn locally. The rest
199
- of the queue keeps synchronizing, and Sync Status requires attention until each returned
200
- Room Draft is saved again or discarded. A Change Batch keeps no outcome once it leaves
201
- the queue; `observe('queue', room)` shows each Pending one, and a returned Room Draft
202
- says why it returned. Transport failure and Provider unavailability keep work Pending
203
- and do not infer a rejection. A refusal the Provider marks retryable stays Pending until
204
- the reset it names; the MD Runtime retries the same Change Batch identity and payload
205
- and never infers an outcome from transport uncertainty. The MD Runtime never combines,
206
- reorders, or rebases.
202
+ is that part on each Document and binary Path entry beneath it, saved together.
203
+
204
+ Outcomes follow the Provider's answer. An Accepted Change Batch stays in the queue, drawn
205
+ over the confirmed layer, until that layer reaches the Room Version it was accepted at,
206
+ then leaves it. Conflicted and Rejected, an expired operation, and a change that no
207
+ longer applies over the Room each leave the queue and return as Room Drafts on their
208
+ Documents, marked with why: the Provider's structured refusal code and fields as
209
+ returned, not known to have applied, or withdrawn locally. The rest of the queue keeps
210
+ synchronizing, and Sync Status requires attention until each returned Room Draft is saved
211
+ or discarded. A Change Batch keeps no outcome once it leaves the queue; `observe('queue',
212
+ room)` shows each Pending one. Transport failure and Provider unavailability keep work
213
+ Pending, as does a refusal the Provider marks retryable until the reset it names; the MD
214
+ Runtime retries the same Change Batch identity and payload, never infers an outcome from
215
+ transport uncertainty, and never combines, reorders, or rebases.
207
216
 
208
217
  On a Site, every Save stays in the visitor's browser. Write grants and revisions do not
209
218
  refuse it, and its Pending Change shows in every query and across reloads until the
@@ -212,50 +221,46 @@ browser's storage is cleared. It is never sent: `observe('queue', room)` shows i
212
221
  applies, it leaves the queue and returns no Room Draft.
213
222
 
214
223
  `observe('service-mode')` answers the Provider's Service Mode, `open` or `write-halted`.
215
- While writes are halted, Save still succeeds, its Change Batch waits unsent, and the
216
- queue is submitted in order once the Provider reopens writes. An Action is never held: a
217
- write the Provider refuses for the halt returns that refusal to its caller. Show the
218
- Provider as read-only instead of retrying.
219
-
224
+ While writes are halted, Save still succeeds, its Change Batch waits unsent, and the queue
225
+ is submitted in order once writes reopen. An Action is never held: one the halt refuses
226
+ returns that refusal to its caller. Show the Provider as read-only instead of retrying.
220
227
  `observe('readiness')` tells whether the App's code and bound Rooms are held locally
221
228
  (`ready`), each Room's state, each refused Room's file and rule, the persistence answer
222
229
  and a paused preparation's `capacity` cause; `retry()` resumes a paused preparation.
223
230
 
224
- ## The neutrality rule
225
-
226
- No module outside an Adapter package imports, names, or special-cases a Provider. MD UI
227
- and every App reach data only through the client entry.
228
-
229
231
  ## Content-safety rules
230
232
 
231
- The Provider authorization belongs to the Runtime host and is never readable by the
232
- App's code. The App's code reaches the network only at the external origins its manifest
233
- declares, empty by default, and the Provider enforces that set. Every request to the
234
- Provider itself goes through the MD Runtime. Rendered Markdown never executes scripts,
235
- renders raw HTML only for the details and summary elements, and loads images and other
236
- resources only from origins the Provider's policy allows.
233
+ The Provider authorization belongs to the Runtime host and is never readable by the App's
234
+ code. The App's code reaches the network only at the external origins its manifest
235
+ declares, empty by default, and the Provider enforces that set. Rendered Markdown never
236
+ executes scripts, renders raw HTML only for the details and summary elements, and loads
237
+ images and other resources only from origins the Provider's policy allows.
237
238
 
238
239
  ## Launch promises MD UI keeps
239
240
 
240
241
  MD UI uses semantic HTML, is fully operable from a keyboard with visible focus and
241
242
  labelled controls, and lays out from a 360 pixel wide viewport to a desktop. Its strings
242
243
  are English only, dates and numbers follow the browser locale, and content is never
243
- translated. Light and dark themes come from CSS custom properties with the browser's
244
- preference as the default and an App's override respected. What an App Creator's agent
245
- adds carries none of these promises by itself. Reading, querying and searching never
246
- wait for the network. Data lives only in the App Creator's browser and with the
247
- Provider.
244
+ translated. Light and dark themes come from CSS custom properties, defaulting to the
245
+ browser's preference and respecting an App's override. What an agent adds carries none of
246
+ these promises by itself. Data lives only in the App Creator's browser and the Provider.
248
247
 
249
248
  ## App code takes the client its host hands it and never constructs a Runtime
250
249
 
251
- App code takes the client its host hands it: in House, `houseBridge().runtime` from
252
- `@agentshouse/app-bridge` resolves to the client House built into the page. It imports
253
- only types from `@agentshouse/mdruntime/client`, never calls `connectMdRuntime` or
254
- `serveMdRuntime`, and never imports the package main, the host entry or the Adapter
255
- package, which hosts and tests use. The in-memory Adapter at
250
+ No module outside an Adapter package imports, names, or special-cases a Provider, and
251
+ every App and MD UI reach data only through the client entry. In House,
252
+ `houseBridge().runtime` from `@agentshouse/app-bridge` resolves to the client House built
253
+ into the page. App code imports only types from `@agentshouse/mdruntime/client`, never
254
+ calls `connectMdRuntime` or `serveMdRuntime`, and never imports the package main, the host
255
+ entry or the Adapter package, which hosts and tests use. The in-memory Adapter at
256
256
  `@agentshouse/mdruntime/memory` is for tests and ships in no bundle. A Site's page fills
257
257
  its Entry Data Contract's `{"$param": name}` arguments with `boundQuery` from
258
- `@agentshouse/mdruntime/entry`, as House did for its HTML.
258
+ `@agentshouse/mdruntime/entry`, as House did for its HTML. While the Site prepares, each
259
+ query a route's `interaction` names answers from the entry's result when the page observes
260
+ that same descriptor, and every other stays pending. House replaces its HTML with the page
261
+ once its document changed after those answers, or readiness is `ready`, and then held
262
+ still for two animation frames, unless the visitor uses the HTML: draw the route from them
263
+ at once, never behind a placeholder. Before readiness is `ready`, `push` loads a new page.
259
264
 
260
265
  A React App may observe and save through `@agentshouse/mdruntime/react`, which names
261
266
  React as a peer dependency. `useObserve(client, topic, ...input)` takes the arguments of
@@ -266,8 +271,10 @@ nothing and stays loading. `useSave(client)` returns `busy`, the last `outcome`
266
271
  Draft already there, keeping the bases its parts have, or onto a new one, and saves them
267
272
  together. A refused Save leaves the Room Drafts for the App to save again or discard; a
268
273
  failure is recorded and rejects. `saveRoomDrafts(client, room, roomDrafts)` is that save
269
- outside a component. A react-admin or Refine App reads and writes its Rooms through the
270
- data providers of `@agentshouse/mdruntime-families`.
274
+ outside a component. An App that writes its Room Drafts itself saves them with
275
+ `saveWritten(room, roomDrafts)`, each named with the revision its last write returned: one
276
+ another tab wrote since is refused as `stale`, and nothing is saved. A react-admin or
277
+ Refine App uses the data providers of `@agentshouse/mdruntime-families`.
271
278
 
272
279
  ## The Chat
273
280
 
@@ -292,9 +299,8 @@ Mix `ChatMessageList` (`components` takes your `UserMessage` and `AssistantMessa
292
299
  compose assistant-ui's primitives there; `useChat()` gives `send`, the conversations,
293
300
  the Agents, questions to `answer`, `options` to `choose`, `commands`, the queue to
294
301
  `edit` or `unqueue`, `stop`, `kill` and outcomes; never replace its messages, sending or
295
- store. A secret question is never answered here; typed answers live in Presentation
296
- State's `typed` key: keep it, and change Presentation State only inside `inTurn(client,
297
- work)` from `@agentshouse/mdruntime/client`. `Markdown` draws Markdown safely.
302
+ store. A secret question is never answered here; typed answers live in the Presentation
303
+ State members named `typed:…`: leave them. `Markdown` draws Markdown safely.
298
304
 
299
305
  ## What an agent must never do
300
306
 
package/dist/adapter.d.ts CHANGED
@@ -277,6 +277,7 @@ export type BootstrapPage = {
277
277
  models?: RoomModels;
278
278
  documents: Readonly<Record<string, string>>;
279
279
  revisions: Readonly<Record<string, string>>;
280
+ fileIds?: Readonly<Record<string, string>>;
280
281
  changes: Readonly<Record<string, HeadChange>>;
281
282
  binaryFiles: Readonly<Record<string, BinaryFile>>;
282
283
  pageToken?: PageToken;
@@ -296,6 +297,7 @@ export type RefreshPage = {
296
297
  models?: RoomModels;
297
298
  documents: Readonly<Record<string, string>>;
298
299
  revisions: Readonly<Record<string, string>>;
300
+ fileIds?: Readonly<Record<string, string>>;
299
301
  changes: Readonly<Record<string, HeadChange>>;
300
302
  binaryFiles: Readonly<Record<string, BinaryFile>>;
301
303
  removals: readonly string[];
@@ -324,6 +326,7 @@ export type MutationResult = {
324
326
  roomVersion: string;
325
327
  documents: Readonly<Record<string, string>>;
326
328
  revisions: Readonly<Record<string, string>>;
329
+ fileIds?: Readonly<Record<string, string>>;
327
330
  changes: Readonly<Record<string, HeadChange>>;
328
331
  removals: readonly string[];
329
332
  binaryFiles?: Readonly<Record<string, BinaryFile>>;
@@ -397,6 +400,13 @@ export type BinaryResult = {
397
400
  } | (ProviderRefusal & {
398
401
  kind: 'rejected';
399
402
  }) | AdapterFailure;
403
+ export type BinaryLinkResult = {
404
+ kind: 'link';
405
+ url: string;
406
+ name: string;
407
+ } | (ProviderRefusal & {
408
+ kind: 'rejected';
409
+ }) | AdapterFailure;
400
410
  export type ActionRequest = {
401
411
  name: string;
402
412
  input: unknown;
@@ -423,9 +433,12 @@ export type RoomStreamEvent = {
423
433
  } | {
424
434
  kind: 'closed';
425
435
  revoked: boolean;
436
+ lost: boolean;
426
437
  } | {
427
438
  kind: 'opening';
428
439
  expired: readonly string[];
440
+ } | {
441
+ kind: 'authority-changed';
429
442
  } | {
430
443
  kind: 'room-version';
431
444
  locator: string;
@@ -464,6 +477,9 @@ export type Adapter = {
464
477
  mutate(authorization: Authorization, request: MutationRequest, keep: (upload: unknown) => Promise<void>): Promise<MutationResult>;
465
478
  history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
466
479
  binary(authorization: Authorization, request: BinaryRequest): Promise<BinaryResult>;
480
+ link(authorization: Authorization, request: Extract<BinaryRequest, {
481
+ kind: 'path';
482
+ }>): Promise<BinaryLinkResult>;
467
483
  referrerScope(referrer: unknown): ReferrerScope | null;
468
484
  action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
469
485
  reached(locator: string, roomVersion: string, target: string): bo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ACpF,IAAI,CACF,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,CAAC,aAAa,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,GAChD,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7B,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,aAAa,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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M,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;AAEvE,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC;IAC7C,MAAM,CAAC,MAAM,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;C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rC,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;AAwBF,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,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CAClB,GACL,SAAS,CA+DX;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAiB/F;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,SAAS,aAAa,EAAE,EAClC,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,SAAS,CAUX;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,CAUrE"}
@@ -13,7 +13,7 @@ function rowsAt(locator, replica, path) {
13
13
  const binary = visible.binaries[path];
14
14
  if (!held && binary === undefined)
15
15
  return [];
16
- return rowsOf(locator, path, document ?? null, compositionOf(replica.confirmed.record), visible.changes[path] ?? null, binary === undefined ? null : binaryRecord(path, binary, visible.revisions[path]));
16
+ return rowsOf(locator, path, document ?? null, compositionOf(replica.confirmed.record), visible.changes[path] ?? null, visible.fileIds[path] ?? null, binary === undefined ? null : binaryRecord(path, binary, visible.revisions[path]));
17
17
  }
18
18
  function modelShape(model) {
19
19
  return model.status === 'unavailable' ? 'unavailable' : JSON.stringify(model.types);
@@ -48,6 +48,7 @@ export function changeSet(locator, before, after, changed = {}) {
48
48
  if (before?.visible.documents[path] === after?.visible.documents[path] &&
49
49
  sameBinary(before?.visible.binaries[path], after?.visible.binaries[path]) &&
50
50
  before?.visible.revisions[path] === after?.visible.revisions[path] &&
51
+ before?.visible.fileIds[path] === after?.visible.fileIds[path] &&
51
52
  sameChange(before?.visible.changes[path], after?.visible.changes[path]) &&
52
53
  !retyped &&
53
54
  !reclassified)
package/dist/chat/kit.js CHANGED
@@ -106,7 +106,7 @@ export function Working({ label = 'Working', step, }) {
106
106
  }
107
107
  const SAID = {
108
108
  sending: 'Sending…',
109
- offline: 'You are offline. Nothing was sent.',
109
+ offline: 'House can’t be reached. Nothing was sent.',
110
110
  };
111
111
  const UNANSWERED = 'House did not answer.';
112
112
  export function ChatNote({ outcome, again }) {
@@ -1,5 +1,5 @@
1
1
  import { type ReactElement } from 'react';
2
- import { type MdRuntimeClient } from '../client.js';
2
+ import type { MdRuntimeClient } from '../client.js';
3
3
  import type { ChatQuestion } from './questions.js';
4
4
  export declare function forgetAnswers(client: MdRuntimeClient, conversation: string, interaction?: string): Promise<void>;
5
5
  export type ChatQuestionCardProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../src/chat/question.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAM5D,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAoB9D,wBAAgB,aAAa,CAC3B,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,MAAM,EACpB,WAAW,SAAK,GACf,OAAO,CAAC,IAAI,CAAC,CAQf;AAeD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;CACjC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,GAAG,YAAY,CAmHlF"}
1
+ {"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../src/chat/question.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAMpD,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAO9D,wBAAsB,aAAa,CACjC,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,MAAM,EACpB,WAAW,SAAK,GACf,OAAO,CAAC,IAAI,CAAC,CAOf;AAeD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;CACjC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,GAAG,YAAY,CAmHlF"}
@@ -2,41 +2,30 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
2
2
  import { useContext, useState } from 'react';
3
3
  import Check from 'lucide-react/dist/esm/icons/check.mjs';
4
4
  import CircleHelp from 'lucide-react/dist/esm/icons/circle-help.mjs';
5
- import { inTurn } from '../client.js';
6
5
  import { useObserve } from '../react.js';
7
6
  import { Button, Scoped } from './kit.js';
8
7
  import { Markdown } from './markdown.js';
9
8
  import { Linked, Undelivered } from './message.js';
10
9
  import { useChat, useChatScope } from './provider.js';
11
10
  import { record, text } from './read.js';
12
- const TYPED = 'typed';
13
11
  function answerKey(conversation, interaction) {
14
- return `answer:${conversation}:${interaction}`;
12
+ return `typed:answer:${conversation}:${interaction}`;
15
13
  }
16
- function changeTyped(client, update) {
17
- return inTurn(client, async () => {
18
- const held = record(await client.presentation.read());
19
- const typed = update(record(held[TYPED]));
20
- if (typed !== null)
21
- await client.presentation.write({ ...held, [TYPED]: typed });
22
- });
23
- }
24
- export function forgetAnswers(client, conversation, interaction = '') {
14
+ export async function forgetAnswers(client, conversation, interaction = '') {
25
15
  const at = answerKey(conversation, interaction);
26
- return changeTyped(client, (typed) => {
27
- const kept = Object.entries(typed).filter(([key]) => interaction === '' ? !key.startsWith(at) : key !== at);
28
- return kept.length === Object.keys(typed).length ? null : Object.fromEntries(kept);
29
- });
16
+ const gone = Object.keys(record(await client.presentation.read())).filter((key) => interaction === '' ? key.startsWith(at) : key === at);
17
+ if (gone.length > 0)
18
+ await client.presentation.edit(Object.fromEntries(gone.map((key) => [key, null])));
30
19
  }
31
20
  function useTyped(client, key) {
32
21
  const held = useObserve(client, 'presentation');
33
- const kept = record(record(record(held.state === 'ready' ? held.value : null)[TYPED])[key]);
22
+ const kept = record(record(held.state === 'ready' ? held.value : null)[key]);
34
23
  const [local, setLocal] = useState(null);
35
24
  return [
36
25
  local !== null && local.key === key ? local.value : kept,
37
26
  (next) => {
38
27
  setLocal({ key, value: next });
39
- void changeTyped(client, (typed) => ({ ...typed, [key]: next }));
28
+ void client.presentation.edit({ [key]: next });
40
29
  },
41
30
  ];
42
31
  }