@agentshouse/mdruntime 0.1.0-cedb03eaa48b6 → 0.1.0-cee9c8aa4cd86

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 (192) hide show
  1. package/AGENTS.md +86 -71
  2. package/README.md +9 -8
  3. package/dist/adapter.d.ts +44 -18
  4. package/dist/adapter.d.ts.map +1 -1
  5. package/dist/attached-model.d.ts +4 -1
  6. package/dist/attached-model.d.ts.map +1 -1
  7. package/dist/attached-model.js +13 -3
  8. package/dist/bootstrap.d.ts +13 -6
  9. package/dist/bootstrap.d.ts.map +1 -1
  10. package/dist/bootstrap.js +90 -61
  11. package/dist/chain.d.ts +11 -0
  12. package/dist/chain.d.ts.map +1 -0
  13. package/dist/chain.js +64 -0
  14. package/dist/change-set.d.ts +9 -16
  15. package/dist/change-set.d.ts.map +1 -1
  16. package/dist/change-set.js +11 -89
  17. package/dist/change.d.ts +31 -1
  18. package/dist/change.d.ts.map +1 -1
  19. package/dist/change.js +10 -1
  20. package/dist/chat/house.d.ts +25 -0
  21. package/dist/chat/house.d.ts.map +1 -0
  22. package/dist/chat/house.js +38 -0
  23. package/dist/chat/input.d.ts +3 -1
  24. package/dist/chat/input.d.ts.map +1 -1
  25. package/dist/chat/input.js +11 -18
  26. package/dist/chat/list.d.ts +2 -1
  27. package/dist/chat/list.d.ts.map +1 -1
  28. package/dist/chat/list.js +7 -3
  29. package/dist/chat/markdown.d.ts +1 -0
  30. package/dist/chat/markdown.d.ts.map +1 -1
  31. package/dist/chat/markdown.js +78 -20
  32. package/dist/chat/message.d.ts +1 -0
  33. package/dist/chat/message.d.ts.map +1 -1
  34. package/dist/chat/message.js +73 -11
  35. package/dist/chat/messages.d.ts +14 -1
  36. package/dist/chat/messages.d.ts.map +1 -1
  37. package/dist/chat/messages.js +79 -24
  38. package/dist/chat/name.d.ts +1 -0
  39. package/dist/chat/name.d.ts.map +1 -1
  40. package/dist/chat/name.js +1 -1
  41. package/dist/chat/opened.d.ts +1 -0
  42. package/dist/chat/opened.d.ts.map +1 -1
  43. package/dist/chat/opened.js +2 -0
  44. package/dist/chat/overlay.d.ts +1 -0
  45. package/dist/chat/overlay.d.ts.map +1 -1
  46. package/dist/chat/overlay.js +11 -5
  47. package/dist/chat/parts.d.ts +1 -0
  48. package/dist/chat/parts.d.ts.map +1 -1
  49. package/dist/chat/parts.js +3 -2
  50. package/dist/chat/pieces.d.ts +62 -0
  51. package/dist/chat/pieces.d.ts.map +1 -0
  52. package/dist/chat/pieces.js +1110 -0
  53. package/dist/chat/provider.d.ts +8 -1
  54. package/dist/chat/provider.d.ts.map +1 -1
  55. package/dist/chat/provider.js +88 -81
  56. package/dist/chat/ready.d.ts +5 -2
  57. package/dist/chat/ready.d.ts.map +1 -1
  58. package/dist/chat/ready.js +7 -5
  59. package/dist/chat/room-file.d.ts +8 -0
  60. package/dist/chat/room-file.d.ts.map +1 -0
  61. package/dist/chat/room-file.js +72 -0
  62. package/dist/chat/steady.d.ts +3 -0
  63. package/dist/chat/steady.d.ts.map +1 -0
  64. package/dist/chat/steady.js +26 -0
  65. package/dist/chat/style.d.ts.map +1 -1
  66. package/dist/chat/style.js +5 -0
  67. package/dist/chat.d.ts +3 -2
  68. package/dist/chat.d.ts.map +1 -1
  69. package/dist/chat.js +2 -2
  70. package/dist/client.d.ts +6 -1
  71. package/dist/client.d.ts.map +1 -1
  72. package/dist/client.js +29 -2
  73. package/dist/collection.d.ts +6 -19
  74. package/dist/collection.d.ts.map +1 -1
  75. package/dist/collection.js +30 -317
  76. package/dist/compile.d.ts +16 -0
  77. package/dist/compile.d.ts.map +1 -0
  78. package/dist/compile.js +718 -0
  79. package/dist/connection.d.ts +11 -5
  80. package/dist/connection.d.ts.map +1 -1
  81. package/dist/connection.js +1931 -706
  82. package/dist/conversation.d.ts +9 -3
  83. package/dist/conversation.d.ts.map +1 -1
  84. package/dist/conversation.js +85 -61
  85. package/dist/digest.d.ts +7 -0
  86. package/dist/digest.d.ts.map +1 -0
  87. package/dist/digest.js +113 -0
  88. package/dist/durability.d.ts +2 -1
  89. package/dist/durability.d.ts.map +1 -1
  90. package/dist/entry.d.ts +3 -1
  91. package/dist/entry.d.ts.map +1 -1
  92. package/dist/entry.js +18 -24
  93. package/dist/file.d.ts +2 -10
  94. package/dist/file.d.ts.map +1 -1
  95. package/dist/file.js +3 -120
  96. package/dist/fulltext.d.ts +27 -0
  97. package/dist/fulltext.d.ts.map +1 -0
  98. package/dist/fulltext.js +368 -0
  99. package/dist/host.d.ts +0 -1
  100. package/dist/host.d.ts.map +1 -1
  101. package/dist/host.js +10 -3
  102. package/dist/identity.d.ts +0 -1
  103. package/dist/identity.d.ts.map +1 -1
  104. package/dist/identity.js +0 -3
  105. package/dist/index.d.ts +8 -5
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +3 -0
  108. package/dist/live.d.ts +22 -0
  109. package/dist/live.d.ts.map +1 -0
  110. package/dist/live.js +123 -0
  111. package/dist/memory.d.ts +1 -0
  112. package/dist/memory.d.ts.map +1 -1
  113. package/dist/memory.js +22 -6
  114. package/dist/messages.d.ts +28 -0
  115. package/dist/messages.d.ts.map +1 -0
  116. package/dist/messages.js +90 -0
  117. package/dist/name.d.ts +4 -0
  118. package/dist/name.d.ts.map +1 -0
  119. package/dist/name.js +122 -0
  120. package/dist/observation.d.ts +12 -0
  121. package/dist/observation.d.ts.map +1 -1
  122. package/dist/observation.js +84 -0
  123. package/dist/opened.d.ts +22 -0
  124. package/dist/opened.d.ts.map +1 -0
  125. package/dist/opened.js +107 -0
  126. package/dist/outcome.d.ts +29 -4
  127. package/dist/outcome.d.ts.map +1 -1
  128. package/dist/outcome.js +25 -0
  129. package/dist/overlay.d.ts +2 -5
  130. package/dist/overlay.d.ts.map +1 -1
  131. package/dist/overlay.js +86 -171
  132. package/dist/query.d.ts +2 -1
  133. package/dist/query.d.ts.map +1 -1
  134. package/dist/query.js +1 -0
  135. package/dist/reach.d.ts +5 -1
  136. package/dist/reach.d.ts.map +1 -1
  137. package/dist/reach.js +158 -52
  138. package/dist/readiness.d.ts +3 -3
  139. package/dist/readiness.d.ts.map +1 -1
  140. package/dist/reads.js +1 -1
  141. package/dist/recovery.d.ts +2 -2
  142. package/dist/recovery.d.ts.map +1 -1
  143. package/dist/recovery.js +8 -7
  144. package/dist/refresh.d.ts +10 -13
  145. package/dist/refresh.d.ts.map +1 -1
  146. package/dist/refresh.js +74 -51
  147. package/dist/replica.d.ts +54 -36
  148. package/dist/replica.d.ts.map +1 -1
  149. package/dist/replica.js +277 -184
  150. package/dist/room-draft.d.ts +3 -1
  151. package/dist/room-draft.d.ts.map +1 -1
  152. package/dist/room-draft.js +29 -22
  153. package/dist/rows.d.ts +29 -31
  154. package/dist/rows.d.ts.map +1 -1
  155. package/dist/rows.js +113 -69
  156. package/dist/save.d.ts +50 -14
  157. package/dist/save.d.ts.map +1 -1
  158. package/dist/save.js +502 -178
  159. package/dist/search.d.ts +11 -43
  160. package/dist/search.d.ts.map +1 -1
  161. package/dist/search.js +0 -213
  162. package/dist/shared.d.ts +8 -3
  163. package/dist/shared.d.ts.map +1 -1
  164. package/dist/shared.js +129 -66
  165. package/dist/store.d.ts +79 -93
  166. package/dist/store.d.ts.map +1 -1
  167. package/dist/store.js +318 -687
  168. package/dist/stored.d.ts +138 -0
  169. package/dist/stored.d.ts.map +1 -0
  170. package/dist/stored.js +544 -0
  171. package/dist/tables.d.ts +332 -0
  172. package/dist/tables.d.ts.map +1 -0
  173. package/dist/tables.js +570 -0
  174. package/dist/turn.d.ts +4 -2
  175. package/dist/turn.d.ts.map +1 -1
  176. package/dist/turn.js +46 -22
  177. package/dist/validation.d.ts +30 -0
  178. package/dist/validation.d.ts.map +1 -0
  179. package/dist/validation.js +162 -0
  180. package/dist/windows.d.ts +2 -6
  181. package/dist/windows.d.ts.map +1 -1
  182. package/dist/windows.js +30 -34
  183. package/dist/wire.d.ts +16 -0
  184. package/dist/wire.d.ts.map +1 -1
  185. package/dist/wire.js +4 -0
  186. package/dist/words.d.ts +19 -0
  187. package/dist/words.d.ts.map +1 -0
  188. package/dist/words.js +150 -0
  189. package/package.json +10 -4
  190. package/dist/read-side.d.ts +0 -27
  191. package/dist/read-side.d.ts.map +0 -1
  192. package/dist/read-side.js +0 -824
package/AGENTS.md CHANGED
@@ -5,8 +5,8 @@ change it, build, and push. They are documentation, not enforcement.
5
5
 
6
6
  ## The MD Runtime API
7
7
 
8
- App code reaches the MD Runtime through the remote client. The surfaces are Rooms,
9
- Query, Search, Observe, Types, Room Draft, Save, History, the binary file reads, Call,
8
+ App code reaches the MD Runtime through the remote client. The surfaces are Rooms, Query,
9
+ Search, Observe, Types, Room Draft, Save, History, Resolve, the binary file reads, Call,
10
10
  Reached, Log, the reported persistence answer, reauthorization, conversation, the chat
11
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.
@@ -35,9 +35,8 @@ only in memory, what the Provider streams whether or not anything views it: the
35
35
  `turn` with its parts and its context in use and window, which the message accepted under
36
36
  the turn's id replaces, the open questions, the process state, and the CLI's commands and
37
37
  options, none stored or searchable. `chatDraft.write` and `chatDraft.discard` keep what
38
- the App Creator composes, and `chatDraft.prepend(conversation, draft)` puts a message that
39
- came back ahead of the chat draft as it stands, its text on a line before and its files
40
- first, so what another tab typed meanwhile stays: never write back a draft read before; sending it is a Provider Action that needs the Provider
38
+ the App Creator composes, and `chatDraft.prepend(conversation, draft)` puts a returned
39
+ message ahead of it as it stands. Sending it is a Provider Action that needs the Provider
41
40
  reachable and is never queued. A new conversation's chat draft is keyed `new:<Agent
42
41
  identity>`: no conversation list removes it, a retired Agent's goes, and the first answer
43
42
  to `conversation.create({ agent_id, operation_id })` moves it to the created conversation,
@@ -60,25 +59,29 @@ media type: Save keeps the bytes in its Pending Change, offline too, and accepta
60
59
  the record the Provider's revision. Move or remove one as a Document, a pending one too,
61
60
  its bytes following; once its Pending Change has gone to the Provider, Save refuses that
62
61
  as `unknown-revision` until it is accepted. `binaryFile.read(room, path, revision?)`
63
- answers a pending record's saved bytes, or asks the Provider on every read of an accepted
64
- one or a History revision, a removed file's last included, keeping nothing. Text, a Record
65
- attachment or a conversation message may name a file by its `fileRef`; read it with
66
- `binaryFile.readReference({ fileRef, referrer })`, the `referrer` the Provider gave beside
67
- it, or `{ room, path }` of the document whose text names it. Both answer
68
- `{ kind: 'binary', blob }` or a refusal or failure.
62
+ answers a pending record's saved bytes, or an accepted one's or a History revision's, a
63
+ removed file's last included: the first read asks the Provider and the browser keeps the
64
+ bytes, and every later read of that revision, offline too, answers them from the browser.
65
+ Text, a Record attachment or a conversation message may name a file by its `fileRef`; read
66
+ it with `binaryFile.readReference({ fileRef, referrer })`, the `referrer` the Provider gave
67
+ beside it, or `{ room, path }` of the document whose text names it, kept the same way. Both
68
+ answer `{ kind: 'binary', stream, byteLength, mediaType }`, the bytes a `ReadableStream`
69
+ of parts of at most a mebibyte, or a refusal or failure; read the stream to its end, or
70
+ take it whole with `new Response(stream).blob()` where a screen needs one `Blob`.
69
71
 
70
72
  Rooms, Query, Search, Observe, Types, Room Draft, Save, and Reached never touch the
71
- network; History, the binary file reads and Call go to the Provider through the Adapter.
73
+ network; History, a binary file read the browser does not keep yet and Call go to the
74
+ Provider through the Adapter.
72
75
  Call takes the Action names the Adapter declares, any other answering `undeclared`. A Call
73
76
  result whose effect the Provider places in a Room carries `at`, that Room and Room
74
77
  Version: `reached(room, roomVersion)` answers whether the Room's confirmed state has
75
78
  reached it, refreshing the Room until it has, and `reached(room, roomVersion, path)`
76
79
  whether the held copy of that document was written later. A History revision names its
77
- author, `{ kind: 'user', id }` or `{ kind: 'site', id, name }`; History of a Path no
80
+ author, `{ kind: 'user', id }` or `{ kind: 'site' | 'inbox', id, name }`; History of a Path no
78
81
  document holds answers the removed document's revisions, newest first, with `deleted:
79
82
  true`, which a link to the Path opens. Every member is asynchronous and every result a
80
83
  detached snapshot; nothing returns the authorization, performs a request the App's code
81
- composes, or exposes the browser store.
84
+ composes, or exposes the browser store. A Room `rooms` names `locked` shows only online.
82
85
 
83
86
  Every refusal and failure carries `code` and `retryable`: each Call and History answer
84
87
  other than its result, a refused Save or Room Draft write, a returned Room Draft's reason,
@@ -102,8 +105,8 @@ named; signing out answers `null`, then ends the observation with the authorizat
102
105
  hears it again only when it changes, keeping every unchanged Document the same object, so
103
106
  a component can tell what changed by identity. `{ documents, coverage }` or `{ groups,
104
107
  coverage }` is complete for the Rooms its `coverage` names, and `{ pending }` names each
105
- Room not yet acquired or prepared, `[{ room, awaits }]`: never read it as empty, draw it
106
- as loading and observe the query to hear the complete answer. A query is data:
108
+ Room not yet acquired, prepared or unlocked, `[{ room, awaits }]`: never read it as empty,
109
+ draw it as loading and observe the query to hear the complete answer. A query is data:
107
110
 
108
111
  - **Filter.** `rooms` names Room locators and defaults to every Room. `types` names MD
109
112
  Types, and `any` names untyped Markdown Documents. `pathPrefix` is a directory: `notes`
@@ -120,10 +123,13 @@ as loading and observe the query to hear the complete answer. A query is data:
120
123
  compares in calendar order and never with a date-time. A reference compares by the
121
124
  Room Path it resolves to. Untyped frontmatter, and a value under `oneOf` or a
122
125
  conditional, is plain values. There is no text containment or regular expression.
123
- - **Relations.** `hop: { field, types, where, pathPrefix }` keeps Documents whose
124
- reference at pointer `field`, at any depth, points to a matching Document of the same
125
- Room. `backlinks: { field, types, where, pathPrefix }` keeps Documents that a matching
126
- Document of the same Room references. Each keeps a Document once.
126
+ - **Relations.** Within one Room, `hop: { field, types, where, pathPrefix }` keeps Documents
127
+ whose reference at pointer `field`, at any depth, points to a matching Document, and
128
+ `backlinks` with the same keys those a matching Document references, each once. A body
129
+ link, or a reference declaring `cross_room`, may name another Room's
130
+ `/rooms/<handle>/<path>`: `resolve(room, path, destination)` answers its `document`, the
131
+ `deleted` one's last `revision`, or `unreadable` where the App does not bind it or it is
132
+ locked.
127
133
  - **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
128
134
  `preamble`, `markdown`, `backlinks`, `change` and `fileId`, where `fields` is `'all'`
129
135
  or a list of pointers and `sections` `'all'` or a list of names. Selected pointers
@@ -132,24 +138,26 @@ as loading and observe the query to hear the complete answer. A query is data:
132
138
  return; a Markdown Document also returns its MD Type, and at most its first 1,000
133
139
  backlinks: a query on the referring field reads the rest. A non-Markdown Document
134
140
  returns only Room, Path and a selected `fileId`, and a binary Path entry its
135
- `binaryFile` record too. An unselected part is absent. Select only what a screen shows:
141
+ `binaryFile` record too; a YAML file under `settings/` also returns its text as a
142
+ selected `markdown`, kept out of Search. An unselected part is absent. Select only what a screen shows:
136
143
  a list that selects the Markdown hears every edit of it.
137
144
  - **Change and file ID.** `change` is `{ author, time }` of the Document's head revision
138
- as the Provider last delivered it: `author` is `{ kind: 'user' | 'site', id, name }`, or
145
+ as the Provider last delivered it: `author` is `{ kind: 'user' | 'site' | 'inbox', id, name }`, or
139
146
  `null` for a write the Provider made itself, and `time` its ISO 8601 change time, or the
140
147
  whole change `null` where it delivered no time, as at a Site. `fileId` is the Provider's
141
148
  Stable File ID of the file at the Path, or `null`. An unsent edit keeps both, an unsent
142
149
  move keeps the change and carries the file ID to the new Path, so a file ID that leaves
143
150
  one Path for another is the same file moved, and an unsent creation has neither until it
144
151
  is Accepted. A Room's last change is its Document with the latest `time`.
145
- - **Order and groups.** `orderBy` sorts by `room`, `path`, `type`, `folder` or `{ field }`
146
- with TanStack DB's own options; ties end with Room, then Path. `groupBy` by `room`,
147
- `type`, `folder` or `{ field }` answers `{ groups: [{ key, count }] }`, counted over every
148
- match and ordered by `count` or a key. A sort or group takes only a single-value pointer.
149
- `limit`, at most 1,000 whatever a query names, bounds the Documents or the groups, and a
150
- result it cuts short names `next`: the same query with it as `after` reads the next
151
- window, in the same order, ties included. `total: true` adds `total`, every match's
152
- count. An observed window hears rows entering, leaving or changing, and `next`, `total`.
152
+ - **Order and groups.** `orderBy` sorts by `room`, `path`, `type`, `folder` or `{ field }`: missing
153
+ and null first, last with `nulls: 'last'`, then numbers and booleans, then text by `locale` or
154
+ code point with `stringSort: 'lexical'`, then lists item by item; ties end with Room, then Path.
155
+ `groupBy` by `room`, `type`, `folder` or `{ field }` answers `{ groups: [{ key, count }] }`,
156
+ counted over every match and ordered by `count` or a key. A sort or group takes only a
157
+ single-value pointer. `limit`, at most 1,000 whatever a query names, bounds the Documents or the
158
+ groups, and a result it cuts short names `next`: the same query with it as `after` reads the next
159
+ window, in the same order, ties included. `total: true` adds `total`, every match's count. An
160
+ observed window hears rows entering, leaving or changing, and `next`, `total`.
153
161
  - **Results and errors.** A result carries no Room Version: read freshness from Rooms and
154
162
  Sync Status. `coverage` names each Room read as `{ room, generation, current }`,
155
163
  `current` false while a newer copy of that Room is being fetched, and the queued changes
@@ -159,50 +167,59 @@ as loading and observe the query to hear the complete answer. A query is data:
159
167
  ## Local Search rules
160
168
 
161
169
  `search({ text, documents, collection, conversations, limit, after, total })` answers
162
- once, by words, from local state, with MiniSearch's defaults. There is no observed search.
170
+ once, by words, from the full-text index the browser keeps with its local state, so it
171
+ answers at once after a reload. There is no observed search.
163
172
 
164
- - **Declaration.** Only an App whose release declares Local Search searches, its first
165
- readiness waiting for its index; any other App's `search` answers the never retryable
166
- `undeclared` refusal `search-undeclared`, its `fields` naming `local_search`.
173
+ - **Declaration.** Only an App whose release declares Local Search searches; any other
174
+ App's `search` answers the never retryable `undeclared` refusal `search-undeclared`, its
175
+ `fields` naming `local_search`.
167
176
  - **What is found.** A Document by its field values, its sections' headings and text, its
168
177
  preamble and its Path, and a message by its text, never a frontmatter key, a Room Draft,
169
- a chat draft or a running turn's parts, with no phrases, word forms, typo tolerance or
170
- prefix matching.
178
+ a chat draft or a running turn's parts. Any word found ranks a hit, more found rank it
179
+ higher, and adjacent words higher still; case and the marks of Latin, Greek and
180
+ Cyrillic letters fold, English word forms stem, the last word also matches as the start
181
+ of a word unless the text ends with a space, and Chinese, Japanese, Korean and Thai text
182
+ matches by character pairs. There is no typo tolerance and no operator syntax.
171
183
  - **Narrowing.** `documents` is a Local Query filter, and `collection: true` leaves out
172
184
  what each Room's `typedSelection` roots hold; `conversations` names conversations. All
173
185
  apply before `limit`, which bounds each list, at most 1,000 whatever a search names. A
174
186
  complete answer it cuts short names `next`, which `after` takes for the next window of
175
- both lists. `total: true` adds `total`, each list's count.
187
+ both lists. `total: true` adds `total`, each list's count. A word in very many Documents
188
+ ranks among a bounded set of them, the Documents of a rarer word of the search always
189
+ among them.
176
190
  - **Results.** `{ documents, messages, coverage }`, or the same with `pending` naming each
177
- Room or conversation the search still waits for: show its hits, ask again, and never
178
- read pending as no hits. `coverage` names the Rooms and conversations searched. Each
179
- list is ranked by `score`, comparable only within it; ties come by `room`, then `path`,
180
- or by `conversation`, then `identity`. A Document hit names its `room`, `path` and
181
- `type`, a message hit its `conversation` and `identity`; `matches` maps each matched
182
- word to the parts it matched in: `fields`, `sections`, `preamble`, `path` or `text`. A
183
- hit carries no position: mark the words you show. A bad filter fails as a query does.
191
+ Room the search still waits for: show its hits, ask again, and never read pending as no
192
+ hits. `coverage` names the Rooms and conversations searched. Each list is ranked by
193
+ `score`, comparable only within it; ties come by `room`, then `path`, or by
194
+ `conversation`, then `identity`. A Document hit names its `room`, `path` and `type`, a
195
+ message hit its `conversation` and `identity`; `matches` maps each word of the search
196
+ to the parts it was found in: `fields`, `sections`, `preamble`, `path` or `text`. A hit
197
+ whose words were found carries `snippet: { part, text, at }`: the part's text around
198
+ the first word found, at most 80 characters on either side, and `at` that word's start
199
+ and end in `text`. Mark the words you show. A bad filter fails as a query does.
184
200
 
185
201
  ## Room Draft, Save, and outcome rules
186
202
 
187
203
  The MD Runtime owns one durable Room Draft per Room and Path, shared by every App and tab
188
204
  across reloads; a Room the Provider reports lost takes its Room Drafts and queue with it.
189
- Write one with `roomDraft.write(room, path, revision, parts)`, naming the revision you
190
- read or `null`, and every part it now changes: fields, sections and the preamble, or the
191
- whole Markdown, a creation, a move or a removal. A new part names its base, the value you
192
- showed when it was opened, a field's as `{ value }` or `null` for no such field, and keeps
193
- its first base; a binary Path entry's move or removal takes `null`. A write or discard
194
- from an older revision is refused as `stale` with the current Room Draft.
205
+ Write one with `roomDraft.write(room, path, revision, parts)`, naming the revision you read
206
+ or `null`, and every part it now changes: fields, sections and the preamble, or the whole
207
+ Markdown, a creation, a move, into another Room when it names `room`, or a removal. A new
208
+ part names its base, the value you showed when it was opened, a field's as `{ value }` or
209
+ `null` for no such field, and keeps its first base; a binary Path entry's move or removal
210
+ takes `null`. A write or discard from an older revision is refused as `stale` with the
211
+ current Room Draft.
195
212
 
196
213
  Save takes one Room and the Room Drafts of it to save, each with its revision, validates
197
- locally, and on success appends one Change Batch to that Room's queue and removes those
198
- Room Drafts. Refused as `stale`, `changed-underneath` naming each part whose base no
199
- longer matches the visible state, or a local validation rule, it creates nothing and
200
- leaves every Room Draft. A directory move or removal is that part on each Document and
201
- binary Path entry beneath it, saved together. `saveParts(room, [{ path, parts }])` saves
202
- parts, each Path once and each new part with its base, the same way without any Room
203
- Draft: one held at a saved Path stays as it is, and one held at a Path it moves moves with
204
- it to a destination that holds none. Save a change that is not a Room Draft with it, never
205
- by reading the Room Draft at that Path and writing it back.
214
+ locally, and on success appends one Change Batch to that Room's queue and removes those Room
215
+ Drafts. Refused as `stale`, `changed-underneath` naming each part whose base no longer
216
+ matches the visible state, or a local validation rule, it creates nothing and leaves every
217
+ Room Draft. A directory move or removal is that part on each Document and binary Path entry
218
+ beneath it, saved together; moves into another Room, saved alone, are one Change Batch in
219
+ both Rooms' queues. `saveParts(room, [{ path, parts }])` saves parts, each Path once and
220
+ each new part with its base, the same way but writes no Room Draft: one held at a saved Path
221
+ stays, one at a moved Path moves with it to a destination that holds none. Never save by
222
+ writing back a Room Draft read before.
206
223
 
207
224
  Outcomes follow the Provider's answer. An Accepted Change Batch stays in the queue, drawn
208
225
  over the confirmed layer, until that layer reaches the Room Version it was accepted at.
@@ -212,10 +229,9 @@ Provider's structured refusal code and fields as returned, not known to have app
212
229
  withdrawn locally. The rest of the queue keeps synchronizing, and Sync Status requires
213
230
  attention until each returned Room Draft is saved or discarded. `observe('queue', room)`
214
231
  shows each Pending Change Batch, which keeps no outcome once it leaves. Transport failure,
215
- Provider unavailability and a refusal the Provider marks retryable, until the reset it
216
- names, keep work Pending; the MD Runtime retries the same Change Batch identity and
217
- payload, never infers an outcome from transport uncertainty, and never combines,
218
- reorders, or rebases.
232
+ Provider unavailability and a refusal marked retryable, until the reset it names, keep
233
+ work Pending; the MD Runtime retries the same Change Batch identity and payload, never
234
+ infers an outcome from transport uncertainty, and never combines, reorders, or rebases.
219
235
 
220
236
  On a Site, every Save stays in the visitor's browser: write grants and revisions do not
221
237
  refuse it, and its Pending Change shows in every query and across reloads until the
@@ -270,13 +286,10 @@ peer dependency. `useObserve(client, topic, ...input)` takes the arguments of `o
270
286
  and returns `{ state: 'loading' }` until the topic's first value arrives, then `{ state:
271
287
  'ready', value }`, re-rendering on each change; a `null` client stays loading.
272
288
  `useSave(client)` returns `busy`, the last `outcome` or `failure`, and `save(room,
273
- parts)`, which saves each Path's parts, each new part naming its base, through
274
- `saveParts(room, [{ path, parts }])`: it writes no Room Draft, so one another tab holds
275
- at that Path stays as it is and one at a Path it moves moves with it, a refused Save
276
- changes nothing, and a failure is recorded and rejects. `saveWritten(room, roomDrafts)`
277
- saves Room Drafts the App wrote itself, each named with the revision its last write returned: one another tab wrote since
278
- is refused as `stale`, and nothing is saved. A react-admin or Refine App uses the data
279
- providers of `@agentshouse/mdruntime-families`.
289
+ parts)`, which saves through `saveParts` and rejects with a recorded failure.
290
+ `saveWritten(room, roomDrafts)` saves Room Drafts the App wrote, each named with the
291
+ revision its last write returned: one another tab wrote since is refused as `stale`, and
292
+ nothing is saved. React-admin and Refine Apps use `@agentshouse/mdruntime-families`.
280
293
 
281
294
  ## The Chat
282
295
 
@@ -298,7 +311,9 @@ Mix `ChatMessageList` (`components` takes your `UserMessage` and `AssistantMessa
298
311
  `ChatInput` and `ChatQuestionCard` with your own design inside a `ChatProvider`, or
299
312
  compose assistant-ui's primitives there; `useChat()` gives `send`, the conversations, the
300
313
  Agents, questions to `answer`, `options` to `choose`, `commands`, the queue to `edit` or
301
- `unqueue`, `stop`, `kill` and outcomes; never replace its messages, sending or store. It
314
+ `unqueue`, `stop`, `kill`, `renew`, which starts a new chat with the same Agent in place of
315
+ a conversation whose session could not resume, and outcomes; never replace its messages,
316
+ sending or store. It
302
317
  shows a conversation's latest 50 messages, and assistant-ui's `loadEarlier()` the 50
303
318
  before, which `ChatMessageList` calls as the reader scrolls back. A secret question is
304
319
  never answered here; typed answers live in the Presentation State members named `typed:…`:
package/README.md CHANGED
@@ -12,14 +12,15 @@ npm install @agentshouse/mdruntime
12
12
 
13
13
  ## Entries
14
14
 
15
- | Entry | For |
16
- | ------------------------------- | ----------------------------------------------------------- |
17
- | `@agentshouse/mdruntime/client` | The host's client: `connectMdRuntime(port)` |
18
- | `@agentshouse/mdruntime/host` | The host that serves a Runtime: `serveMdRuntime` |
19
- | `@agentshouse/mdruntime` | Shared types |
20
- | `@agentshouse/mdruntime/memory` | Tests: `createMemoryAdapter`, an in-memory Adapter |
21
- | `@agentshouse/mdruntime/react` | React over the client: `useObserve`, `useSave` |
22
- | `@agentshouse/mdruntime/chat` | The Chat: `Chat`, `mountChat`, its parts and `ChatProvider` |
15
+ | Entry | For |
16
+ | ------------------------------- | ----------------------------------------------------------------------------------- |
17
+ | `@agentshouse/mdruntime/client` | The host's client: `connectMdRuntime(port)` |
18
+ | `@agentshouse/mdruntime/host` | The host that serves a Runtime: `serveMdRuntime` |
19
+ | `@agentshouse/mdruntime` | Shared types |
20
+ | `@agentshouse/mdruntime/memory` | Tests: `createMemoryAdapter`, an in-memory Adapter |
21
+ | `@agentshouse/mdruntime/tables` | The host's database: the Authored store's and opened files' tables, `answerRuntime` |
22
+ | `@agentshouse/mdruntime/react` | React over the client: `useObserve`, `useSave` |
23
+ | `@agentshouse/mdruntime/chat` | The Chat: `Chat`, `mountChat`, its parts and `ChatProvider` |
23
24
 
24
25
  ## Usage
25
26
 
package/dist/adapter.d.ts CHANGED
@@ -10,14 +10,13 @@ export type TypedSelection = {
10
10
  roots: readonly string[];
11
11
  };
12
12
  export type OperationScopes = {
13
- read: readonly string[];
14
- sync: readonly string[];
15
13
  write: readonly string[];
16
14
  delete: readonly string[];
17
15
  };
18
16
  export type ReplicaAdmission = {
19
17
  selection: string;
20
18
  admission: Open<'admitted' | 'unavailable'>;
19
+ offline: Open<'locked' | 'open'>;
21
20
  };
22
21
  export type DiscoveredRoom = {
23
22
  name: string;
@@ -49,8 +48,9 @@ export type ListedConversation = {
49
48
  created: string;
50
49
  finished: string | null;
51
50
  outcome: string | null;
51
+ waiting: boolean;
52
52
  };
53
- export type ConversationAction = 'conversation.create' | 'conversation.send' | 'conversation.answer' | 'conversation.interrupt' | 'conversation.kill' | 'conversation.cancel' | 'conversation.delete' | 'conversation.history';
53
+ export type ConversationAction = 'conversation.create' | 'conversation.send' | 'conversation.attach' | 'conversation.answer' | 'conversation.interrupt' | 'conversation.kill' | 'conversation.cancel' | 'conversation.delete' | 'conversation.history';
54
54
  export type ConversationMessage = {
55
55
  identity: string;
56
56
  turn: string;
@@ -162,6 +162,18 @@ export type ConversationEvent = {
162
162
  kind: 'options';
163
163
  conversation: string;
164
164
  options: readonly SessionOption[];
165
+ } | {
166
+ kind: 'starting';
167
+ conversation: string;
168
+ step: string | null;
169
+ } | {
170
+ kind: 'link';
171
+ conversation: string;
172
+ connected: boolean;
173
+ } | {
174
+ kind: 'deliveries';
175
+ conversation: string;
176
+ unknown: readonly string[];
165
177
  } | {
166
178
  kind: 'accepted-message';
167
179
  conversation: string;
@@ -187,6 +199,7 @@ export type ActionDeclaration = {
187
199
  name: string;
188
200
  inputShape: unknown;
189
201
  resultKind: unknown;
202
+ room?: string;
190
203
  };
191
204
  export type ProviderLimit = {
192
205
  name: string;
@@ -233,7 +246,7 @@ export type ProviderRefusal = {
233
246
  export type ScopedRefusal = ProviderRefusal & {
234
247
  kind: 'scoped-refusal';
235
248
  locator: string;
236
- scope: Open<'content' | 'sync' | 'model' | 'operation' | 'undisclosed'>;
249
+ scope: Open<'content' | 'model' | 'operation' | 'undisclosed'>;
237
250
  };
238
251
  export type AdapterFailure = TransportUncertainty | RoomNotReadable | RevokedAuthorization | ScopedRefusal;
239
252
  export type ContractUnavailable = ProviderRefusal & {
@@ -242,7 +255,7 @@ export type ContractUnavailable = ProviderRefusal & {
242
255
  export type DiscoverResult = Discovery | TransportUncertainty | RevokedAuthorization | ContractUnavailable;
243
256
  export type PageToken = string;
244
257
  export type ChangeAuthor = {
245
- kind: Open<'user' | 'site'>;
258
+ kind: Open<'user' | 'site' | 'inbox'>;
246
259
  id: string;
247
260
  name: string;
248
261
  };
@@ -261,9 +274,16 @@ export type BinaryFile = {
261
274
  mediaType: string;
262
275
  sha256: string;
263
276
  };
277
+ export type HeldFile = {
278
+ readonly path: string;
279
+ readonly revision: string;
280
+ };
264
281
  export type HeldContent = {
265
- documents: Readonly<Record<string, string>>;
266
- revisions: Readonly<Record<string, string>>;
282
+ files(after: string | null, limit: number): Promise<readonly HeldFile[]>;
283
+ contents(paths: readonly string[]): Promise<ReadonlyMap<string, {
284
+ readonly content: string;
285
+ readonly revision: string;
286
+ }>>;
267
287
  };
268
288
  export type BootstrapRequest = {
269
289
  locator: string;
@@ -284,6 +304,7 @@ export type BootstrapPage = {
284
304
  fileIds?: Readonly<Record<string, string>>;
285
305
  changes: Readonly<Record<string, HeadChange>>;
286
306
  binaryFiles: Readonly<Record<string, BinaryFile>>;
307
+ folders?: readonly string[];
287
308
  pageToken?: PageToken;
288
309
  };
289
310
  export type BootstrapResult = BootstrapPage | {
@@ -305,6 +326,8 @@ export type RefreshPage = {
305
326
  changes: Readonly<Record<string, HeadChange>>;
306
327
  binaryFiles: Readonly<Record<string, BinaryFile>>;
307
328
  removals: readonly string[];
329
+ folders?: readonly string[];
330
+ folderRemovals?: readonly string[];
308
331
  pageToken?: PageToken;
309
332
  };
310
333
  export type RefreshResult = {
@@ -315,6 +338,7 @@ export type RefreshResult = {
315
338
  export type MutationRequest = {
316
339
  locator: string;
317
340
  changeBatch: ChangeBatch;
341
+ file(localId: string): Promise<Blob>;
318
342
  upload?: unknown;
319
343
  };
320
344
  export type RetryableRefusal = ProviderRefusal & {
@@ -325,8 +349,7 @@ export type ServiceMode = Open<'open' | 'write-halted'>;
325
349
  export type ServiceModeSignal = {
326
350
  observe(notify: (mode: ServiceMode) => void): () => void;
327
351
  };
328
- export type MutationResult = {
329
- kind: 'accepted';
352
+ export type AcceptedRoom = {
330
353
  roomVersion: string;
331
354
  documents: Readonly<Record<string, string>>;
332
355
  revisions: Readonly<Record<string, string>>;
@@ -334,9 +357,13 @@ export type MutationResult = {
334
357
  changes: Readonly<Record<string, HeadChange>>;
335
358
  removals: readonly string[];
336
359
  binaryFiles?: Readonly<Record<string, BinaryFile>>;
360
+ };
361
+ export type MutationResult = (AcceptedRoom & {
362
+ kind: 'accepted';
337
363
  author?: string;
338
364
  time?: string;
339
- } | (ProviderRefusal & {
365
+ destination?: AcceptedRoom;
366
+ }) | (ProviderRefusal & {
340
367
  kind: 'conflicted';
341
368
  roomVersion?: string;
342
369
  affected: Readonly<Record<string, string>>;
@@ -353,7 +380,7 @@ export type HistoryAuthor = {
353
380
  kind: 'user';
354
381
  id: string;
355
382
  } | {
356
- kind: 'site';
383
+ kind: 'site' | 'inbox';
357
384
  id: string;
358
385
  name: string;
359
386
  };
@@ -392,15 +419,14 @@ export type BinaryRequest = {
392
419
  referrer: unknown;
393
420
  };
394
421
  export type ReferrerScope = {
395
- kind: 'room';
396
422
  locator: string;
397
423
  path?: string;
398
- } | {
399
- kind: 'conversations';
400
424
  };
401
425
  export type BinaryResult = {
402
426
  kind: 'binary';
403
- blob: Blob;
427
+ body: ReadableStream<Uint8Array>;
428
+ mediaType: string;
429
+ sha256?: string;
404
430
  } | (ProviderRefusal & {
405
431
  kind: 'rejected';
406
432
  }) | AdapterFailure;
@@ -429,9 +455,8 @@ export type ActionResult = {
429
455
  export type HeldRoom = {
430
456
  locator: string;
431
457
  roomVersion: string;
432
- documents: Readonly<Record<string, string>>;
433
- revisions: Readonly<Record<string, string>>;
434
458
  };
459
+ export type HeldRevisions = (locator: string, paths: readonly string[]) => Promise<ReadonlyMap<string, string>>;
435
460
  export type RoomStreamEvent = {
436
461
  kind: 'opened';
437
462
  } | {
@@ -466,11 +491,12 @@ export type RoomStream = {
466
491
  hold(rooms: readonly HeldRoom[]): void;
467
492
  reopen(): void;
468
493
  published(locator: string, roomVersion: string): void;
469
- observe(notify: (event: RoomStreamEvent) => void, receipts: StreamReceipts): () => void;
494
+ observe(notify: (event: RoomStreamEvent) => void, receipts: StreamReceipts, revisions: HeldRevisions): () => void;
470
495
  };
471
496
  export type Adapter = {
472
497
  readonly localSaves?: true;
473
498
  readonly exhaustiveDiscovery?: true;
499
+ readonly roomTypes?: string;
474
500
  authorize(): Promise<Authorization>;
475
501
  discover(authorization: Authorization, scope?: DiscoveryScope): Promise<DiscoverResult>;
476
502
  bootstrap(authorization: Authorization, request: BootstrapRequest): Promise<BootstrapResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IAC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AAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACvF,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACpF,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"}
@@ -1,4 +1,7 @@
1
+ import { type VerifiedModel } from '@agentshouse/mdmodel';
1
2
  import { type ModelResult, type ModelState } from './model.js';
3
+ export declare const NO_ROOM_TYPES: VerifiedModel;
4
+ export declare function roomTypesOf(schema: string | undefined): VerifiedModel;
2
5
  export type AttachedModel = {
3
6
  state: ModelState;
4
7
  refused: {
@@ -7,5 +10,5 @@ export type AttachedModel = {
7
10
  location?: string;
8
11
  } | null;
9
12
  };
10
- export declare function attachedModel(answer: ModelResult, previous: ModelState): AttachedModel;
13
+ export declare function attachedModel(answer: ModelResult, previous: ModelState, roomTypes: VerifiedModel): AttachedModel;
11
14
  //# sourceMappingURL=attached-model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attached-model.d.ts","sourceRoot":"","sources":["../src/attached-model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAI1E,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACvE,CAAC;AAEF,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,GAAG,aAAa,CA4CtF"}
1
+ {"version":3,"file":"attached-model.d.ts","sourceRoot":"","sources":["../src/attached-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1F,OAAO,EAAa,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1E,eAAO,MAAM,aAAa,EAAE,aAA2D,CAAC;AAExF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAMrE;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACvE,CAAC;AAEF,wBAAgB,aAAa,CAC3B,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,aAAa,GACvB,aAAa,CA+Cf"}
@@ -1,8 +1,16 @@
1
1
  import { verify } from '@agentshouse/mdmodel';
2
2
  import { MD_MODEL } from './collection.js';
3
3
  import { sameModel } from './model.js';
4
- const EMPTY_SCHEMA = { verdict: 'accept', model: { types: {} } };
5
- export function attachedModel(answer, previous) {
4
+ export const NO_ROOM_TYPES = Object.freeze({ types: Object.freeze({}) });
5
+ export function roomTypesOf(schema) {
6
+ if (schema === undefined)
7
+ return NO_ROOM_TYPES;
8
+ const verified = verify(schema);
9
+ if (verified.verdict === 'refuse')
10
+ throw new Error(`the Adapter's Room types refuse ${verified.rule}`);
11
+ return verified.model;
12
+ }
13
+ export function attachedModel(answer, previous, roomTypes) {
6
14
  if (answer.kind === 'model-unavailable') {
7
15
  return { state: { status: 'unavailable', reason: answer.reason }, refused: null };
8
16
  }
@@ -19,7 +27,9 @@ export function attachedModel(answer, previous) {
19
27
  refused: null,
20
28
  };
21
29
  }
22
- const verified = answer.snapshot.schema === null ? EMPTY_SCHEMA : verify(answer.snapshot.schema);
30
+ const verified = answer.snapshot.schema === null
31
+ ? { verdict: 'accept', model: roomTypes }
32
+ : verify(answer.snapshot.schema, roomTypes);
23
33
  if (verified.verdict === 'refuse') {
24
34
  return {
25
35
  state: {