@agentshouse/mdruntime 0.1.0-c806ecaf4afed → 0.1.0-c809974611fbc

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 (287) hide show
  1. package/README.md +21 -19
  2. package/dist/acceptance.d.ts.map +1 -1
  3. package/dist/acceptance.js +45 -25
  4. package/dist/act-lanes.d.ts +11 -14
  5. package/dist/act-lanes.d.ts.map +1 -1
  6. package/dist/act-lanes.js +53 -5
  7. package/dist/actions.d.ts +8 -2
  8. package/dist/actions.d.ts.map +1 -1
  9. package/dist/actions.js +161 -71
  10. package/dist/adapter.d.ts +165 -29
  11. package/dist/adapter.d.ts.map +1 -1
  12. package/dist/attached-model.d.ts +0 -1
  13. package/dist/attached-model.d.ts.map +1 -1
  14. package/dist/attached-model.js +2 -7
  15. package/dist/{binary.d.ts → attachment.d.ts} +8 -4
  16. package/dist/attachment.d.ts.map +1 -0
  17. package/dist/attachment.js +15 -0
  18. package/dist/authored.d.ts +88 -0
  19. package/dist/authored.d.ts.map +1 -0
  20. package/dist/authored.js +347 -0
  21. package/dist/chain.d.ts +1 -1
  22. package/dist/chain.d.ts.map +1 -1
  23. package/dist/chain.js +5 -2
  24. package/dist/change.d.ts +6 -2
  25. package/dist/change.d.ts.map +1 -1
  26. package/dist/change.js +3 -0
  27. package/dist/chat-types.d.ts +0 -2
  28. package/dist/chat-types.d.ts.map +1 -1
  29. package/dist/chat-types.js +2 -4
  30. package/dist/client.d.ts +27 -15
  31. package/dist/client.d.ts.map +1 -1
  32. package/dist/client.js +29 -57
  33. package/dist/collection.d.ts +6 -1
  34. package/dist/collection.d.ts.map +1 -1
  35. package/dist/collection.js +23 -9
  36. package/dist/column.d.ts +5 -0
  37. package/dist/column.d.ts.map +1 -0
  38. package/dist/column.js +9 -0
  39. package/dist/compile.d.ts +4 -1
  40. package/dist/compile.d.ts.map +1 -1
  41. package/dist/compile.js +88 -44
  42. package/dist/connection.d.ts +1 -1
  43. package/dist/connection.d.ts.map +1 -1
  44. package/dist/connection.js +23 -16
  45. package/dist/context.d.ts.map +1 -1
  46. package/dist/context.js +1 -1
  47. package/dist/conversation-live.d.ts +23 -10
  48. package/dist/conversation-live.d.ts.map +1 -1
  49. package/dist/conversation-live.js +18 -8
  50. package/dist/conversation-row.d.ts +8 -1
  51. package/dist/conversation-row.d.ts.map +1 -1
  52. package/dist/conversation-row.js +20 -7
  53. package/dist/conversation.d.ts +31 -12
  54. package/dist/conversation.d.ts.map +1 -1
  55. package/dist/conversation.js +264 -190
  56. package/dist/declaration.js +3 -3
  57. package/dist/discovery.d.ts +3 -1
  58. package/dist/discovery.d.ts.map +1 -1
  59. package/dist/discovery.js +36 -9
  60. package/dist/download.d.ts +6 -0
  61. package/dist/download.d.ts.map +1 -0
  62. package/dist/download.js +42 -0
  63. package/dist/durability.d.ts +5 -0
  64. package/dist/durability.d.ts.map +1 -1
  65. package/dist/durability.js +7 -0
  66. package/dist/entry.d.ts +25 -1
  67. package/dist/entry.d.ts.map +1 -1
  68. package/dist/entry.js +111 -34
  69. package/dist/expectation.d.ts +25 -14
  70. package/dist/expectation.d.ts.map +1 -1
  71. package/dist/expectation.js +51 -20
  72. package/dist/failure.d.ts +2 -0
  73. package/dist/failure.d.ts.map +1 -1
  74. package/dist/failure.js +6 -1
  75. package/dist/figures.d.ts +1 -1
  76. package/dist/figures.d.ts.map +1 -1
  77. package/dist/figures.js +6 -4
  78. package/dist/file.d.ts +1 -1
  79. package/dist/file.d.ts.map +1 -1
  80. package/dist/file.js +3 -2
  81. package/dist/host.d.ts +7 -2
  82. package/dist/host.d.ts.map +1 -1
  83. package/dist/host.js +78 -32
  84. package/dist/house-query.d.ts +24 -0
  85. package/dist/house-query.d.ts.map +1 -0
  86. package/dist/house-query.js +102 -0
  87. package/dist/identity.d.ts +1 -1
  88. package/dist/identity.d.ts.map +1 -1
  89. package/dist/identity.js +1 -1
  90. package/dist/index.d.ts +24 -13
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +15 -7
  93. package/dist/install.d.ts +10 -4
  94. package/dist/install.d.ts.map +1 -1
  95. package/dist/install.js +45 -46
  96. package/dist/lifecycle.d.ts +1 -1
  97. package/dist/lifecycle.d.ts.map +1 -1
  98. package/dist/lifecycle.js +52 -32
  99. package/dist/listing.d.ts +24 -12
  100. package/dist/listing.d.ts.map +1 -1
  101. package/dist/listing.js +50 -21
  102. package/dist/live.d.ts +19 -3
  103. package/dist/live.d.ts.map +1 -1
  104. package/dist/live.js +94 -36
  105. package/dist/loaded.d.ts +7 -0
  106. package/dist/loaded.d.ts.map +1 -0
  107. package/dist/loaded.js +46 -0
  108. package/dist/locks.d.ts.map +1 -1
  109. package/dist/locks.js +4 -3
  110. package/dist/lost.d.ts.map +1 -1
  111. package/dist/lost.js +2 -3
  112. package/dist/media.d.ts +19 -3
  113. package/dist/media.d.ts.map +1 -1
  114. package/dist/media.js +181 -34
  115. package/dist/memory.d.ts +7 -3
  116. package/dist/memory.d.ts.map +1 -1
  117. package/dist/memory.js +66 -22
  118. package/dist/messages.d.ts +17 -3
  119. package/dist/messages.d.ts.map +1 -1
  120. package/dist/messages.js +29 -10
  121. package/dist/modal.d.ts +2 -0
  122. package/dist/modal.d.ts.map +1 -0
  123. package/dist/modal.js +11 -0
  124. package/dist/model.d.ts +10 -7
  125. package/dist/model.d.ts.map +1 -1
  126. package/dist/model.js +7 -1
  127. package/dist/models.d.ts.map +1 -1
  128. package/dist/models.js +5 -8
  129. package/dist/name.d.ts +0 -1
  130. package/dist/name.d.ts.map +1 -1
  131. package/dist/name.js +3 -7
  132. package/dist/observation.d.ts +29 -12
  133. package/dist/observation.d.ts.map +1 -1
  134. package/dist/observation.js +206 -69
  135. package/dist/online.d.ts +7 -0
  136. package/dist/online.d.ts.map +1 -0
  137. package/dist/online.js +29 -0
  138. package/dist/opened.d.ts +5 -5
  139. package/dist/opened.d.ts.map +1 -1
  140. package/dist/opened.js +2 -2
  141. package/dist/opening.d.ts.map +1 -1
  142. package/dist/opening.js +22 -10
  143. package/dist/outcome.d.ts +33 -13
  144. package/dist/outcome.d.ts.map +1 -1
  145. package/dist/outcome.js +36 -6
  146. package/dist/overlay.d.ts +21 -7
  147. package/dist/overlay.d.ts.map +1 -1
  148. package/dist/overlay.js +112 -39
  149. package/dist/parts.d.ts +4 -9
  150. package/dist/parts.d.ts.map +1 -1
  151. package/dist/parts.js +30 -15
  152. package/dist/paths.d.ts +1 -1
  153. package/dist/paths.js +1 -1
  154. package/dist/preparation.d.ts +33 -7
  155. package/dist/preparation.d.ts.map +1 -1
  156. package/dist/preparation.js +198 -87
  157. package/dist/presence.d.ts +8 -2
  158. package/dist/presence.d.ts.map +1 -1
  159. package/dist/presence.js +24 -13
  160. package/dist/queries.d.ts +2 -2
  161. package/dist/queries.d.ts.map +1 -1
  162. package/dist/queries.js +133 -73
  163. package/dist/query.d.ts +2 -2
  164. package/dist/query.d.ts.map +1 -1
  165. package/dist/questions.d.ts +1 -5
  166. package/dist/questions.d.ts.map +1 -1
  167. package/dist/questions.js +3 -8
  168. package/dist/queue.d.ts +2 -2
  169. package/dist/queue.d.ts.map +1 -1
  170. package/dist/queue.js +73 -48
  171. package/dist/reach.d.ts +15 -6
  172. package/dist/reach.d.ts.map +1 -1
  173. package/dist/reach.js +180 -39
  174. package/dist/react.d.ts +16 -11
  175. package/dist/react.d.ts.map +1 -1
  176. package/dist/react.js +22 -4
  177. package/dist/readiness.d.ts +23 -4
  178. package/dist/readiness.d.ts.map +1 -1
  179. package/dist/readiness.js +18 -10
  180. package/dist/reads.d.ts +4 -2
  181. package/dist/reads.d.ts.map +1 -1
  182. package/dist/reads.js +22 -7
  183. package/dist/recovery.d.ts +4 -1
  184. package/dist/recovery.d.ts.map +1 -1
  185. package/dist/recovery.js +31 -8
  186. package/dist/reference-forms.d.ts +4 -0
  187. package/dist/reference-forms.d.ts.map +1 -0
  188. package/dist/reference-forms.js +74 -0
  189. package/dist/refresh.d.ts +1 -1
  190. package/dist/refresh.js +4 -4
  191. package/dist/refusal.d.ts.map +1 -1
  192. package/dist/refusal.js +1 -3
  193. package/dist/replica.d.ts +3 -8
  194. package/dist/replica.d.ts.map +1 -1
  195. package/dist/replica.js +5 -5
  196. package/dist/retried.d.ts +30 -0
  197. package/dist/retried.d.ts.map +1 -0
  198. package/dist/retried.js +72 -0
  199. package/dist/room-draft.d.ts +31 -6
  200. package/dist/room-draft.d.ts.map +1 -1
  201. package/dist/room-draft.js +262 -36
  202. package/dist/room-drafts.d.ts.map +1 -1
  203. package/dist/room-drafts.js +12 -7
  204. package/dist/room-list.d.ts +10 -0
  205. package/dist/room-list.d.ts.map +1 -0
  206. package/dist/room-list.js +47 -0
  207. package/dist/rows.d.ts +11 -2
  208. package/dist/rows.d.ts.map +1 -1
  209. package/dist/rows.js +24 -10
  210. package/dist/run-tables.d.ts +25 -0
  211. package/dist/run-tables.d.ts.map +1 -0
  212. package/dist/run-tables.js +94 -0
  213. package/dist/running.d.ts +5 -0
  214. package/dist/running.d.ts.map +1 -0
  215. package/dist/running.js +10 -0
  216. package/dist/runs.d.ts +27 -0
  217. package/dist/runs.d.ts.map +1 -0
  218. package/dist/runs.js +90 -0
  219. package/dist/runtime.d.ts +7 -4
  220. package/dist/runtime.d.ts.map +1 -1
  221. package/dist/save.d.ts +2 -0
  222. package/dist/save.d.ts.map +1 -1
  223. package/dist/save.js +105 -124
  224. package/dist/saves.d.ts +7 -5
  225. package/dist/saves.d.ts.map +1 -1
  226. package/dist/saves.js +107 -57
  227. package/dist/seed.d.ts.map +1 -1
  228. package/dist/seed.js +2 -2
  229. package/dist/selector.d.ts +3 -0
  230. package/dist/selector.d.ts.map +1 -0
  231. package/dist/selector.js +22 -0
  232. package/dist/shown.d.ts +5 -2
  233. package/dist/shown.d.ts.map +1 -1
  234. package/dist/shown.js +79 -43
  235. package/dist/socket/lanes.d.ts +12 -4
  236. package/dist/socket/lanes.d.ts.map +1 -1
  237. package/dist/socket/lanes.js +34 -8
  238. package/dist/socket/session.d.ts +4 -1
  239. package/dist/socket/session.d.ts.map +1 -1
  240. package/dist/socket/session.js +3 -0
  241. package/dist/socket.d.ts +7 -4
  242. package/dist/socket.d.ts.map +1 -1
  243. package/dist/socket.js +11 -9
  244. package/dist/source.d.ts +7 -7
  245. package/dist/source.d.ts.map +1 -1
  246. package/dist/source.js +15 -2
  247. package/dist/store/installs.d.ts +2 -2
  248. package/dist/store/installs.d.ts.map +1 -1
  249. package/dist/store/installs.js +10 -4
  250. package/dist/store/readiness.d.ts +5 -4
  251. package/dist/store/readiness.d.ts.map +1 -1
  252. package/dist/store/readiness.js +28 -12
  253. package/dist/store/records.d.ts +30 -8
  254. package/dist/store/records.d.ts.map +1 -1
  255. package/dist/store/records.js +70 -26
  256. package/dist/store/rooms-shown.d.ts +8 -0
  257. package/dist/store/rooms-shown.d.ts.map +1 -0
  258. package/dist/store/rooms-shown.js +13 -0
  259. package/dist/store.d.ts +17 -10
  260. package/dist/store.d.ts.map +1 -1
  261. package/dist/store.js +18 -6
  262. package/dist/stored.d.ts +41 -16
  263. package/dist/stored.d.ts.map +1 -1
  264. package/dist/stored.js +215 -57
  265. package/dist/surface.d.ts +20 -8
  266. package/dist/surface.d.ts.map +1 -1
  267. package/dist/surface.js +62 -27
  268. package/dist/sync.d.ts +4 -2
  269. package/dist/sync.d.ts.map +1 -1
  270. package/dist/sync.js +76 -40
  271. package/dist/tables.d.ts +41 -52
  272. package/dist/tables.d.ts.map +1 -1
  273. package/dist/tables.js +110 -326
  274. package/dist/tallies.d.ts.map +1 -1
  275. package/dist/tallies.js +3 -4
  276. package/dist/validation.d.ts +2 -0
  277. package/dist/validation.d.ts.map +1 -1
  278. package/dist/validation.js +50 -10
  279. package/dist/wire.d.ts +40 -16
  280. package/dist/wire.d.ts.map +1 -1
  281. package/dist/wire.js +22 -14
  282. package/package.json +4 -4
  283. package/dist/binary.d.ts.map +0 -1
  284. package/dist/binary.js +0 -8
  285. package/dist/log.d.ts +0 -6
  286. package/dist/log.d.ts.map +0 -1
  287. package/dist/log.js +0 -14
package/README.md CHANGED
@@ -12,14 +12,14 @@ 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/tables` | The host's database: the Authored store's and opened files' tables, `answerRuntime` |
22
- | `@agentshouse/mdruntime/react` | React over the client: `useObserve`, `useSave`; `useReading`, a reader of an expectation store; `useLane`, a reader of an act lane |
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: `formatted` lays it out for a device format, keeping the Authored store's tables and creating any it lacks, and `answerRuntime` answers it |
22
+ | `@agentshouse/mdruntime/react` | React over the client: `useObserve`, `useSave`; `useExpected`, a reader of an expectation store; `useLane`, a reader of an act lane |
23
23
 
24
24
  ## Usage
25
25
 
@@ -33,24 +33,26 @@ const rooms = await runtime.rooms();
33
33
  const notes = await runtime.query({ types: ['note'], select: 'all', limit: 20 });
34
34
  ```
35
35
 
36
- `observe('storage-loss')` reports `null` or the stable code
37
- `storage-loss` when unsynchronized Room Drafts and Pending Changes were lost.
38
- The host supplies the user-facing wording.
36
+ `observe('storage-loss')` reports `null`, the stable code `storage-loss` when
37
+ unsynchronized Room Drafts and Pending Changes were lost, or `visit` while the host holds
38
+ the database in memory, which ends with the visit; the readiness `persistence` answer is then
39
+ `memory`. The host supplies the user-facing wording.
39
40
 
40
41
  In House the bridge object the page holds as `window.houseBridge` places the Chat, which
41
- House serves with the page: install and bundle nothing for it. Mount it in an element,
42
- themed by CSS custom properties on that element, docked at a third of the window:
42
+ House serves with the page: install and bundle nothing for it. Mount it in an element it
43
+ fills, where it lays out the User's chats by the element's width, themed by CSS custom
44
+ properties on that element, or as the Chat button, House's dot that opens it in a sheet:
43
45
 
44
46
  ```ts
45
- const chat = await window.houseBridge.chat.mount(element, { width: '1/3', showChats: true });
47
+ const chat = await window.houseBridge.chat.mount(element, { conversation });
46
48
  element.style.setProperty('--chat-accent', '#2a6cf0');
47
- chat.update({ width: 'full', showChats: true });
48
- chat.unmount();
49
+ chat.update({ conversation: null, agent });
50
+ const button = await window.houseBridge.chat.mountButton({});
51
+ button.open({ agent });
49
52
  ```
50
53
 
51
- The rules an App's agent follows, including Local Query, search, Room
52
- Draft, Save and the Chat, are the `apps/` pages of House's Guide, which House's
53
- `guide/open` opens.
54
+ The rules an App's agent follows, including Local Query, search, Room Draft, Save and the
55
+ Chat, are the `apps/` pages of House's Guide, which House's `guide` tool opens.
54
56
 
55
57
  ## License
56
58
 
@@ -1 +1 @@
1
- {"version":3,"file":"acceptance.d.ts","sourceRoot":"","sources":["../src/acceptance.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAiX5C,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAK5D"}
1
+ {"version":3,"file":"acceptance.d.ts","sourceRoot":"","sources":["../src/acceptance.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA0Y5C,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAK5D"}
@@ -1,3 +1,4 @@
1
+ import { refusalError } from './failure.js';
1
2
  import { changeSet } from './change-set.js';
2
3
  import { declared } from './declaration.js';
3
4
  import { leaving as leavingIn, partnerOf } from './change.js';
@@ -5,7 +6,8 @@ import { olderThan, showing } from './install.js';
5
6
  import { scoped } from './models.js';
6
7
  import { answered, settle } from './queue.js';
7
8
  import { refuse } from './refusal.js';
8
- import { returnedPaths, returning, slicing } from './replica.js';
9
+ import { writtenDocuments } from './overlay.js';
10
+ import { returnedPaths, returning, slicing, touchedBy, } from './replica.js';
9
11
  import { batchFile } from './saves.js';
10
12
  import { rest, roomUnreadable, statusShown } from './shown.js';
11
13
  import { advanced, withhold } from './sync.js';
@@ -38,11 +40,6 @@ async function keepUpload({ socket, presence }, local, locator, identifier, uplo
38
40
  if (!socket.continuing())
39
41
  throw new Error();
40
42
  }
41
- function logAccepted({ journal }, locator, submitted, accepted) {
42
- journal.record(`outcome ${locator} ${submitted.id} accepted ${accepted.roomVersion}` +
43
- (accepted.author === undefined ? '' : ` author ${accepted.author}`) +
44
- (accepted.time === undefined ? '' : ` time ${accepted.time}`));
45
- }
46
43
  function restands(adoptions) {
47
44
  return adoptions.flatMap((one) => (one === null || !('record' in one) ? [] : [one]));
48
45
  }
@@ -54,7 +51,6 @@ async function adoption(runtime, room, current, local, submitted, accepted) {
54
51
  return null;
55
52
  }
56
53
  const held = current.record.roomVersion;
57
- logAccepted(runtime, room.locator, submitted, accepted);
58
54
  let record = current.record;
59
55
  let adopted;
60
56
  if (!socket.reads.reached(room.locator, held, accepted.roomVersion) &&
@@ -109,6 +105,25 @@ async function adoptedMove(runtime, room, partner, local, submitted, accepted) {
109
105
  submitLater(runtime, partner);
110
106
  return kept;
111
107
  }
108
+ async function writtenOf({ store }, local, locator, batch) {
109
+ const record = (await store.record(locator));
110
+ const paths = [...touchedBy([batch])];
111
+ const confirmed = await stepped(slicing(await local.entries(record.key, 'confirmed', paths), paths));
112
+ return stepped(writtenDocuments(confirmed, batch, store.composed(record)));
113
+ }
114
+ const STALE_BASES = new Set(['base_revision_stale', 'merge_conflict']);
115
+ function staleOnly(fields) {
116
+ const { conflicts } = fields;
117
+ return (Array.isArray(conflicts) &&
118
+ conflicts.length > 0 &&
119
+ conflicts.every((conflict) => typeof conflict === 'object' &&
120
+ conflict !== null &&
121
+ STALE_BASES.has(conflict.code)));
122
+ }
123
+ function rebuilt(sent, again) {
124
+ return (again.every((document) => document === null || !document.stale) &&
125
+ JSON.stringify(again) !== JSON.stringify(sent));
126
+ }
112
127
  async function behindIn({ store }, locator, batch) {
113
128
  const local = await store.open();
114
129
  const [order, { room }] = await Promise.all([
@@ -118,11 +133,11 @@ async function behindIn({ store }, locator, batch) {
118
133
  return room ? order.indexOf(batch.id) > 0 : order.length > 0;
119
134
  }
120
135
  async function submitRoom(runtime, room, local, authorized, progress, signal) {
121
- const { store, socket, presence, journal } = runtime;
136
+ const { store, socket, presence } = runtime;
122
137
  while (socket.continuing() &&
123
138
  socket.session.now().authorization !== undefined &&
124
139
  !signal.aborted) {
125
- const headId = (await local.order(room.locator)).find((id) => store.landed.of(room.locator, id) === undefined);
140
+ const headId = (await local.order(room.locator)).find((id) => store.conflicted.of(room.locator, id) === undefined);
126
141
  if (headId === undefined)
127
142
  return 'done';
128
143
  const [head, pending] = await Promise.all([
@@ -151,12 +166,11 @@ async function submitRoom(runtime, room, local, authorized, progress, signal) {
151
166
  }
152
167
  if (socket.writesHeld()) {
153
168
  progress.complete = false;
154
- journal.record(`submission ${room.locator} ${head.id} held`);
155
169
  return 'done';
156
170
  }
157
171
  const lost = earlier || submission.state === 'submitted';
158
172
  let result;
159
- journal.record(`submission ${room.locator} ${head.id}`);
173
+ const written = await writtenOf(runtime, local, room.locator, head);
160
174
  await store.exclusive(() => mark(runtime, local, room.locator, head, { state: 'submitted' }, lost));
161
175
  if (socket.session.now().paused || presence.lost(room.locator))
162
176
  return 'done';
@@ -165,7 +179,6 @@ async function submitRoom(runtime, room, local, authorized, progress, signal) {
165
179
  if (signal.aborted)
166
180
  return 'done';
167
181
  progress.complete = false;
168
- journal.record(`submission ${room.locator} ${head.id} held`);
169
182
  return 'done';
170
183
  }
171
184
  const opensBefore = socket.session.now().openSignals;
@@ -179,11 +192,13 @@ async function submitRoom(runtime, room, local, authorized, progress, signal) {
179
192
  result = await socket.mutate(authorized, {
180
193
  locator: room.locator,
181
194
  changeBatch: head,
195
+ written,
182
196
  file: batchFile(store, head),
183
197
  ...(state?.upload === undefined ? {} : { upload: state.upload }),
184
198
  }, (upload) => store.exclusive(() => keepUpload(runtime, local, room.locator, head.id, upload)));
185
199
  }
186
- catch {
200
+ catch (error) {
201
+ runtime.retries.failed('sending', submitting(room.locator), error);
187
202
  heard();
188
203
  progress.complete = false;
189
204
  if (socket.continuing())
@@ -198,7 +213,10 @@ async function submitRoom(runtime, room, local, authorized, progress, signal) {
198
213
  heard();
199
214
  if (!socket.continuing())
200
215
  return 'done';
216
+ if (result.kind === 'accepted')
217
+ runtime.retries.succeeded('sending', submitting(room.locator));
201
218
  if (result.kind === 'transport-uncertainty') {
219
+ runtime.retries.uncertain('sending', submitting(room.locator), result);
202
220
  progress.complete = false;
203
221
  progress.reachable = false;
204
222
  return 'again';
@@ -218,7 +236,6 @@ async function submitRoom(runtime, room, local, authorized, progress, signal) {
218
236
  return 'done';
219
237
  }
220
238
  if (result.kind === 'write-halted') {
221
- journal.record(`outcome ${room.locator} ${head.id} write-halted`);
222
239
  await store.exclusive(() => mark(runtime, local, room.locator, head, { state: 'waiting' }, lost));
223
240
  if (!socket.haltedSince(opensBefore))
224
241
  continue;
@@ -226,21 +243,20 @@ async function submitRoom(runtime, room, local, authorized, progress, signal) {
226
243
  return 'done';
227
244
  }
228
245
  const other = partner === null ? undefined : presence.room(partner);
229
- if (result.kind === 'conflicted' ||
230
- result.kind === 'rejected' ||
231
- result.kind === 'retryable-refusal') {
232
- journal.record(`outcome ${room.locator} ${head.id} ${result.kind}` +
233
- (result.kind === 'conflicted' && result.roomVersion !== undefined
234
- ? ` ${result.roomVersion}`
235
- : ''));
236
- journal.record(`refusal ${result.kind} ${result.code}`);
237
- }
238
246
  if (result.kind === 'retryable-refusal') {
247
+ runtime.retries.failed('sending', submitting(room.locator), refusalError(result));
239
248
  const reset = result.reset;
240
249
  progress.complete = false;
241
250
  await store.exclusive(() => mark(runtime, local, room.locator, head, reset === undefined ? { state: 'waiting' } : { state: 'reset', reset }, lost));
242
251
  return reset === undefined ? 'again' : { at: Date.parse(reset) };
243
252
  }
253
+ if (result.kind === 'conflicted' && partner === null && staleOnly(result.fields)) {
254
+ const here = await advanced(runtime, room, local, authorized);
255
+ if (here === null && rebuilt(written, await writtenOf(runtime, local, room.locator, head))) {
256
+ await store.exclusive(() => mark(runtime, local, room.locator, head, { state: 'waiting' }, lost));
257
+ continue;
258
+ }
259
+ }
244
260
  if (result.kind === 'conflicted' || result.kind === 'rejected') {
245
261
  const refreshed = async () => ({
246
262
  there: other === undefined ? null : await advanced(runtime, other, local, authorized),
@@ -277,10 +293,13 @@ async function submitRoom(runtime, room, local, authorized, progress, signal) {
277
293
  }
278
294
  return 'done';
279
295
  }
296
+ function submitting(locator) {
297
+ return `submit ${locator}`;
298
+ }
280
299
  export function submitLater(runtime, locator) {
281
300
  if (runtime.localSaves)
282
301
  return;
283
- void runtime.recovery.attempt(`submit ${locator}`, (signal) => submitPass(runtime, locator, signal));
302
+ void runtime.recovery.attempt(submitting(locator), (signal) => submitPass(runtime, locator, signal));
284
303
  }
285
304
  async function submitPass(runtime, locator, signal) {
286
305
  const { store, socket, presence } = runtime;
@@ -297,7 +316,8 @@ async function submitPass(runtime, locator, signal) {
297
316
  return 'done';
298
317
  next = await submitRoom(runtime, room, await store.open(), authorization, progress, signal);
299
318
  }
300
- catch {
319
+ catch (error) {
320
+ runtime.retries.failed('sending', submitting(locator), error);
301
321
  progress.reachable = false;
302
322
  next = 'again';
303
323
  }
@@ -1,33 +1,30 @@
1
- import { type ExpectedOf, type Expecting } from './expectation.js';
1
+ import { type Expected, type Expecting } from './expectation.js';
2
2
  export type Ended = 'accepted' | 'refused' | 'unanswered' | 'unsent';
3
- type Keyed = {
4
- readonly key: string;
5
- };
6
- export type Send<O, E extends Keyed> = {
3
+ export type Send<O> = {
7
4
  (name: string, input: unknown, sending: (operation: string) => Promise<O>): Promise<O>;
8
- expect(expected: ExpectedOf<E>): void;
5
+ expect(expected: Expected): void;
9
6
  };
10
7
  export type LaneShown<O> = {
11
8
  readonly busy: boolean;
12
9
  readonly drawn: boolean;
13
10
  readonly ended: O | null;
14
11
  };
15
- export type Lane<O, E extends Keyed> = {
16
- run(steps: (send: Send<O, E>) => Promise<O>, expected?: ExpectedOf<E>): Promise<O>;
12
+ export type Lane<O> = {
13
+ run(steps: (send: Send<O>) => Promise<O>, expected?: Expected): Promise<O>;
17
14
  shown(): LaneShown<O>;
18
15
  subscribe(listener: () => void): () => void;
19
16
  forget(): void;
20
17
  };
21
- export type Acting<O, E extends Keyed> = {
22
- open(): Lane<O, E>;
18
+ export type Acting<O> = {
19
+ open(): Lane<O>;
23
20
  };
24
- export type ActingRules<O, E extends Keyed> = {
25
- readonly store: Pick<Expecting<E>, 'begin' | 'expect' | 'drop'>;
21
+ export type ActingRules<O> = {
22
+ readonly store: Pick<Expecting, 'begin' | 'expect' | 'drop'>;
26
23
  readonly uncertain: O;
27
24
  ending(outcome: O): Ended;
28
25
  acted?(): void;
29
26
  mint?(): string;
27
+ settles?(operation: string): Promise<boolean>;
30
28
  };
31
- export declare function acting<O, E extends Keyed>(rules: ActingRules<O, E>): Acting<O, E>;
32
- export {};
29
+ export declare function acting<O>(rules: ActingRules<O>): Acting<O>;
33
30
  //# sourceMappingURL=act-lanes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"act-lanes.d.ts","sourceRoot":"","sources":["../src/act-lanes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGjF,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG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AI;IACpB,GAAG,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3E,KAAK,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC;IACtB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAC5C,MAAM,IAAI,IAAI,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;IACtB,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC;IAC7D,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;IACtB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;IAC1B,KAAK,CAAC,IAAI,IAAI,CAAC;IACf,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,OAAO,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/C,CAAC;AAUF,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CA6N1D"}
package/dist/act-lanes.js CHANGED
@@ -2,10 +2,11 @@ import { expectedList } from './expectation.js';
2
2
  import { changeBatchIdentity } from './identity.js';
3
3
  const IDLE = { busy: false, drawn: false, ended: null };
4
4
  export function acting(rules) {
5
- const { store, uncertain, ending } = rules;
5
+ const { store, uncertain, ending, settles } = rules;
6
6
  const mint = rules.mint ?? (() => changeBatchIdentity());
7
7
  const identities = new Map();
8
8
  const waiting = new Map();
9
+ const settling = new Map();
9
10
  const blobs = new WeakMap();
10
11
  let counted = 0;
11
12
  let touches = 0;
@@ -78,6 +79,8 @@ export function acting(rules) {
78
79
  let pressed = 0;
79
80
  let drawing = 0;
80
81
  let ended = null;
82
+ let held = null;
83
+ let presses = 0;
81
84
  let shown = IDLE;
82
85
  const show = () => {
83
86
  const busy = pressed > 0;
@@ -88,7 +91,38 @@ export function acting(rules) {
88
91
  for (const listener of listeners)
89
92
  listener();
90
93
  };
91
- const run = (steps, expected = null) => {
94
+ const awaiting = (outcome, operations, heard, again) => new Promise((resolve) => {
95
+ const forgotten = () => {
96
+ for (const operation of operations)
97
+ if (settling.get(operation) === record)
98
+ settling.delete(operation);
99
+ };
100
+ const record = {
101
+ supersede() {
102
+ if (held !== record)
103
+ return;
104
+ held = null;
105
+ forgotten();
106
+ resolve(outcome);
107
+ },
108
+ };
109
+ held = record;
110
+ for (const operation of operations)
111
+ settling.set(operation, record);
112
+ const answers = operations.map((operation) => heard(operation).then((answered) => {
113
+ if (!answered)
114
+ record.supersede();
115
+ return answered;
116
+ }));
117
+ void Promise.all(answers).then(() => {
118
+ if (held !== record)
119
+ return;
120
+ held = null;
121
+ forgotten();
122
+ resolve(again());
123
+ }, () => record.supersede());
124
+ });
125
+ const attempt = (steps, expected, press) => {
92
126
  const act = store.begin();
93
127
  let drew = false;
94
128
  const expect = (more) => {
@@ -108,6 +142,7 @@ export function acting(rules) {
108
142
  const send = Object.assign(async (name, input, sending) => {
109
143
  const request = requestOf(name, input);
110
144
  const identity = identityOf(request);
145
+ settling.get(identity.operation)?.supersede();
111
146
  const called = { request, identity, ended: null };
112
147
  calls.push(called);
113
148
  touches += 1;
@@ -150,11 +185,24 @@ export function acting(rules) {
150
185
  end(uncertain, 'unanswered');
151
186
  throw error;
152
187
  }
153
- end(outcome, ending(outcome));
154
- return outcome;
188
+ const how = ending(outcome);
189
+ end(outcome, how);
190
+ return { outcome, how };
155
191
  });
156
192
  tail = turn.catch(() => undefined);
157
- return turn;
193
+ return turn.then(({ outcome, how }) => {
194
+ const lost = calls.flatMap(({ identity, ended: answered }) => answered === 'unanswered' ? [identity.operation] : []);
195
+ if (how !== 'unanswered' || lost.length === 0 || settles === undefined)
196
+ return outcome;
197
+ if (press !== presses)
198
+ return outcome;
199
+ return awaiting(outcome, lost, settles, () => attempt(steps, expected, press));
200
+ });
201
+ };
202
+ const run = (steps, expected = null) => {
203
+ held?.supersede();
204
+ presses += 1;
205
+ return attempt(steps, expected, presses);
158
206
  };
159
207
  return {
160
208
  run,
package/dist/actions.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { ConversationHistoryRequest } from './adapter.js';
2
2
  import { type CallResult, type HistoryAnswer, type Resolution } from './outcome.js';
3
3
  import type { Attempted } from './recovery.js';
4
+ import type { Attempt } from './retried.js';
4
5
  import type { Runtime } from './runtime.js';
5
6
  export type HistoryQuery = {
6
7
  revision?: string;
@@ -12,9 +13,14 @@ export declare function located(runtime: Runtime, room: string, path: string, de
12
13
  path: string;
13
14
  } | null>;
14
15
  export declare function resolveReference(runtime: Runtime, room: string, path: string, destination: string): Promise<Resolution>;
15
- export declare function invokeAction(runtime: Runtime, name: string, input: unknown, dispatching?: () => Promise<void>): Promise<CallResult>;
16
+ export type Invoked = {
17
+ readonly dispatching?: () => Promise<void>;
18
+ readonly attempt?: Attempt;
19
+ };
20
+ export declare function invokeAction(runtime: Runtime, name: string, input: unknown, { dispatching, attempt }?: Invoked): Promise<CallResult>;
16
21
  export declare function readConversationHistory(runtime: Runtime, request: ConversationHistoryRequest): Promise<CallResult>;
17
- export declare function called(runtime: Runtime, name: string, input: unknown): Promise<CallResult>;
22
+ export declare function called(runtime: Runtime, name: string, input: unknown, attempt?: Attempt): Promise<CallResult>;
23
+ export declare function answeredCall(runtime: Runtime, operation: string): Promise<boolean>;
18
24
  export declare function resendCalls(runtime: Runtime, signal: AbortSignal): Promise<Attempted>;
19
25
  export declare function resendLater(runtime: Runtime): void;
20
26
  //# sourceMappingURL=actions.d.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