@agentshouse/mdruntime 0.1.0-cef5833f6c689 → 0.1.0-cefb421089d74

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 (331) hide show
  1. package/README.md +21 -19
  2. package/dist/acceptance.d.ts +3 -0
  3. package/dist/acceptance.d.ts.map +1 -0
  4. package/dist/acceptance.js +299 -0
  5. package/dist/act-lanes.d.ts +30 -0
  6. package/dist/act-lanes.d.ts.map +1 -0
  7. package/dist/act-lanes.js +225 -0
  8. package/dist/actions.d.ts +26 -0
  9. package/dist/actions.d.ts.map +1 -0
  10. package/dist/actions.js +321 -0
  11. package/dist/adapter.d.ts +150 -81
  12. package/dist/adapter.d.ts.map +1 -1
  13. package/dist/attached-model.d.ts +3 -11
  14. package/dist/attached-model.d.ts.map +1 -1
  15. package/dist/attached-model.js +20 -60
  16. package/dist/authored.d.ts +88 -0
  17. package/dist/authored.d.ts.map +1 -0
  18. package/dist/authored.js +345 -0
  19. package/dist/binary.d.ts +4 -0
  20. package/dist/binary.d.ts.map +1 -1
  21. package/dist/binary.js +9 -2
  22. package/dist/bootstrap.d.ts +9 -5
  23. package/dist/bootstrap.d.ts.map +1 -1
  24. package/dist/bootstrap.js +204 -86
  25. package/dist/cell.d.ts +6 -0
  26. package/dist/cell.d.ts.map +1 -0
  27. package/dist/cell.js +9 -0
  28. package/dist/change-set.d.ts +4 -0
  29. package/dist/change-set.d.ts.map +1 -1
  30. package/dist/change-set.js +6 -0
  31. package/dist/change.d.ts +5 -0
  32. package/dist/change.d.ts.map +1 -1
  33. package/dist/change.js +7 -2
  34. package/dist/chat-types.d.ts +3 -0
  35. package/dist/chat-types.d.ts.map +1 -0
  36. package/dist/chat-types.js +11 -0
  37. package/dist/client.d.ts +35 -22
  38. package/dist/client.d.ts.map +1 -1
  39. package/dist/client.js +51 -62
  40. package/dist/collection.d.ts +26 -4
  41. package/dist/collection.d.ts.map +1 -1
  42. package/dist/collection.js +28 -10
  43. package/dist/column.d.ts +5 -0
  44. package/dist/column.d.ts.map +1 -0
  45. package/dist/column.js +9 -0
  46. package/dist/compile.d.ts +7 -0
  47. package/dist/compile.d.ts.map +1 -1
  48. package/dist/compile.js +217 -83
  49. package/dist/connection.d.ts +6 -142
  50. package/dist/connection.d.ts.map +1 -1
  51. package/dist/connection.js +113 -5178
  52. package/dist/context.d.ts.map +1 -1
  53. package/dist/context.js +1 -1
  54. package/dist/conversation-live.d.ts +149 -0
  55. package/dist/conversation-live.d.ts.map +1 -0
  56. package/dist/conversation-live.js +259 -0
  57. package/dist/conversation-row.d.ts +40 -0
  58. package/dist/conversation-row.d.ts.map +1 -0
  59. package/dist/conversation-row.js +66 -0
  60. package/dist/conversation.d.ts +64 -45
  61. package/dist/conversation.d.ts.map +1 -1
  62. package/dist/conversation.js +998 -883
  63. package/dist/declaration.d.ts +10 -0
  64. package/dist/declaration.d.ts.map +1 -0
  65. package/dist/declaration.js +24 -0
  66. package/dist/discovery.d.ts +12 -0
  67. package/dist/discovery.d.ts.map +1 -0
  68. package/dist/discovery.js +175 -0
  69. package/dist/download.d.ts +6 -0
  70. package/dist/download.d.ts.map +1 -0
  71. package/dist/download.js +42 -0
  72. package/dist/durability.d.ts +20 -0
  73. package/dist/durability.d.ts.map +1 -1
  74. package/dist/durability.js +7 -0
  75. package/dist/entry.d.ts +14 -0
  76. package/dist/entry.d.ts.map +1 -1
  77. package/dist/entry.js +47 -17
  78. package/dist/expectation.d.ts +26 -13
  79. package/dist/expectation.d.ts.map +1 -1
  80. package/dist/expectation.js +72 -19
  81. package/dist/failure.d.ts +3 -0
  82. package/dist/failure.d.ts.map +1 -1
  83. package/dist/failure.js +8 -0
  84. package/dist/figures.d.ts +49 -0
  85. package/dist/figures.d.ts.map +1 -0
  86. package/dist/figures.js +199 -0
  87. package/dist/file.d.ts +1 -1
  88. package/dist/file.d.ts.map +1 -1
  89. package/dist/file.js +3 -2
  90. package/dist/holdings.d.ts +29 -0
  91. package/dist/holdings.d.ts.map +1 -0
  92. package/dist/holdings.js +95 -0
  93. package/dist/host.d.ts +24 -4
  94. package/dist/host.d.ts.map +1 -1
  95. package/dist/host.js +95 -23
  96. package/dist/house-query.d.ts +15 -0
  97. package/dist/house-query.d.ts.map +1 -0
  98. package/dist/house-query.js +43 -0
  99. package/dist/index.d.ts +36 -13
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +17 -5
  102. package/dist/install.d.ts +60 -0
  103. package/dist/install.d.ts.map +1 -0
  104. package/dist/install.js +537 -0
  105. package/dist/lifecycle.d.ts +7 -0
  106. package/dist/lifecycle.d.ts.map +1 -0
  107. package/dist/lifecycle.js +290 -0
  108. package/dist/listing.d.ts +60 -0
  109. package/dist/listing.d.ts.map +1 -0
  110. package/dist/listing.js +168 -0
  111. package/dist/live.d.ts +8 -6
  112. package/dist/live.d.ts.map +1 -1
  113. package/dist/live.js +110 -31
  114. package/dist/loaded.d.ts +5 -0
  115. package/dist/loaded.d.ts.map +1 -0
  116. package/dist/loaded.js +40 -0
  117. package/dist/locks.d.ts +7 -0
  118. package/dist/locks.d.ts.map +1 -0
  119. package/dist/locks.js +34 -0
  120. package/dist/lost.d.ts +5 -0
  121. package/dist/lost.d.ts.map +1 -0
  122. package/dist/lost.js +49 -0
  123. package/dist/media.d.ts +20 -4
  124. package/dist/media.d.ts.map +1 -1
  125. package/dist/media.js +170 -36
  126. package/dist/memory.d.ts +11 -3
  127. package/dist/memory.d.ts.map +1 -1
  128. package/dist/memory.js +133 -32
  129. package/dist/messages.d.ts +38 -3
  130. package/dist/messages.d.ts.map +1 -1
  131. package/dist/messages.js +105 -25
  132. package/dist/modal.d.ts +2 -0
  133. package/dist/modal.d.ts.map +1 -0
  134. package/dist/modal.js +11 -0
  135. package/dist/model.d.ts +5 -10
  136. package/dist/model.d.ts.map +1 -1
  137. package/dist/model.js +6 -11
  138. package/dist/models.d.ts +10 -0
  139. package/dist/models.d.ts.map +1 -0
  140. package/dist/models.js +153 -0
  141. package/dist/observation.d.ts +29 -12
  142. package/dist/observation.d.ts.map +1 -1
  143. package/dist/observation.js +217 -85
  144. package/dist/online.d.ts +7 -0
  145. package/dist/online.d.ts.map +1 -0
  146. package/dist/online.js +29 -0
  147. package/dist/opened.d.ts +1 -1
  148. package/dist/opened.d.ts.map +1 -1
  149. package/dist/opened.js +5 -5
  150. package/dist/opening.d.ts +4 -0
  151. package/dist/opening.d.ts.map +1 -0
  152. package/dist/opening.js +69 -0
  153. package/dist/outcome.d.ts +28 -5
  154. package/dist/outcome.d.ts.map +1 -1
  155. package/dist/outcome.js +35 -2
  156. package/dist/overlay.d.ts +7 -2
  157. package/dist/overlay.d.ts.map +1 -1
  158. package/dist/overlay.js +48 -24
  159. package/dist/page-metadata.d.ts +8 -0
  160. package/dist/page-metadata.d.ts.map +1 -0
  161. package/dist/page-metadata.js +19 -0
  162. package/dist/parts.d.ts +6 -0
  163. package/dist/parts.d.ts.map +1 -0
  164. package/dist/parts.js +36 -0
  165. package/dist/paths.d.ts +1 -0
  166. package/dist/paths.d.ts.map +1 -1
  167. package/dist/paths.js +22 -0
  168. package/dist/preparation.d.ts +46 -0
  169. package/dist/preparation.d.ts.map +1 -0
  170. package/dist/preparation.js +344 -0
  171. package/dist/presence.d.ts +58 -0
  172. package/dist/presence.d.ts.map +1 -0
  173. package/dist/presence.js +231 -0
  174. package/dist/queries.d.ts +16 -0
  175. package/dist/queries.d.ts.map +1 -0
  176. package/dist/queries.js +287 -0
  177. package/dist/query.d.ts +10 -2
  178. package/dist/query.d.ts.map +1 -1
  179. package/dist/questions.d.ts +30 -0
  180. package/dist/questions.d.ts.map +1 -0
  181. package/dist/questions.js +117 -0
  182. package/dist/queue.d.ts +40 -0
  183. package/dist/queue.d.ts.map +1 -0
  184. package/dist/queue.js +480 -0
  185. package/dist/reach.d.ts +20 -9
  186. package/dist/reach.d.ts.map +1 -1
  187. package/dist/reach.js +323 -120
  188. package/dist/react.d.ts +18 -2
  189. package/dist/react.d.ts.map +1 -1
  190. package/dist/react.js +33 -1
  191. package/dist/read.d.ts +7 -0
  192. package/dist/read.d.ts.map +1 -0
  193. package/dist/read.js +17 -0
  194. package/dist/readiness.d.ts +20 -5
  195. package/dist/readiness.d.ts.map +1 -1
  196. package/dist/readiness.js +17 -10
  197. package/dist/reads.d.ts +39 -0
  198. package/dist/reads.d.ts.map +1 -0
  199. package/dist/reads.js +178 -0
  200. package/dist/recovery.d.ts +4 -1
  201. package/dist/recovery.d.ts.map +1 -1
  202. package/dist/recovery.js +40 -9
  203. package/dist/refresh.d.ts +1 -1
  204. package/dist/refresh.d.ts.map +1 -1
  205. package/dist/refresh.js +10 -22
  206. package/dist/refusal.d.ts +5 -0
  207. package/dist/refusal.d.ts.map +1 -0
  208. package/dist/refusal.js +55 -0
  209. package/dist/replica.d.ts +10 -16
  210. package/dist/replica.d.ts.map +1 -1
  211. package/dist/replica.js +65 -35
  212. package/dist/retried.d.ts +30 -0
  213. package/dist/retried.d.ts.map +1 -0
  214. package/dist/retried.js +72 -0
  215. package/dist/room-draft.d.ts +31 -8
  216. package/dist/room-draft.d.ts.map +1 -1
  217. package/dist/room-draft.js +273 -66
  218. package/dist/room-drafts.d.ts +24 -0
  219. package/dist/room-drafts.d.ts.map +1 -0
  220. package/dist/room-drafts.js +220 -0
  221. package/dist/room-list.d.ts +10 -0
  222. package/dist/room-list.d.ts.map +1 -0
  223. package/dist/room-list.js +45 -0
  224. package/dist/rows.d.ts +16 -6
  225. package/dist/rows.d.ts.map +1 -1
  226. package/dist/rows.js +51 -60
  227. package/dist/running.d.ts +5 -0
  228. package/dist/running.d.ts.map +1 -0
  229. package/dist/running.js +10 -0
  230. package/dist/runtime.d.ts +35 -0
  231. package/dist/runtime.d.ts.map +1 -0
  232. package/dist/runtime.js +1 -0
  233. package/dist/save.d.ts +42 -86
  234. package/dist/save.d.ts.map +1 -1
  235. package/dist/save.js +332 -228
  236. package/dist/saves.d.ts +34 -0
  237. package/dist/saves.d.ts.map +1 -0
  238. package/dist/saves.js +457 -0
  239. package/dist/seed.d.ts +11 -2
  240. package/dist/seed.d.ts.map +1 -1
  241. package/dist/seed.js +71 -1
  242. package/dist/shared.d.ts +1 -6
  243. package/dist/shared.d.ts.map +1 -1
  244. package/dist/shared.js +13 -95
  245. package/dist/shown.d.ts +35 -0
  246. package/dist/shown.d.ts.map +1 -0
  247. package/dist/shown.js +326 -0
  248. package/dist/socket/admission.d.ts +7 -0
  249. package/dist/socket/admission.d.ts.map +1 -0
  250. package/dist/socket/admission.js +39 -0
  251. package/dist/socket/answers.d.ts +6 -0
  252. package/dist/socket/answers.d.ts.map +1 -0
  253. package/dist/socket/answers.js +20 -0
  254. package/dist/socket/lanes.d.ts +28 -0
  255. package/dist/socket/lanes.d.ts.map +1 -0
  256. package/dist/socket/lanes.js +103 -0
  257. package/dist/socket/reads.d.ts +10 -0
  258. package/dist/socket/reads.d.ts.map +1 -0
  259. package/dist/socket/reads.js +31 -0
  260. package/dist/socket/session.d.ts +41 -0
  261. package/dist/socket/session.d.ts.map +1 -0
  262. package/dist/socket/session.js +26 -0
  263. package/dist/socket.d.ts +68 -0
  264. package/dist/socket.d.ts.map +1 -0
  265. package/dist/socket.js +165 -0
  266. package/dist/source.d.ts +59 -0
  267. package/dist/source.d.ts.map +1 -0
  268. package/dist/source.js +93 -0
  269. package/dist/status.d.ts +0 -2
  270. package/dist/status.d.ts.map +1 -1
  271. package/dist/status.js +0 -6
  272. package/dist/store/installs.d.ts +30 -0
  273. package/dist/store/installs.d.ts.map +1 -0
  274. package/dist/store/installs.js +40 -0
  275. package/dist/store/readiness.d.ts +11 -0
  276. package/dist/store/readiness.d.ts.map +1 -0
  277. package/dist/store/readiness.js +68 -0
  278. package/dist/store/records.d.ts +227 -0
  279. package/dist/store/records.d.ts.map +1 -0
  280. package/dist/store/records.js +468 -0
  281. package/dist/store/room-held.d.ts +8 -0
  282. package/dist/store/room-held.d.ts.map +1 -0
  283. package/dist/store/room-held.js +17 -0
  284. package/dist/store/rooms-shown.d.ts +8 -0
  285. package/dist/store/rooms-shown.d.ts.map +1 -0
  286. package/dist/store/rooms-shown.js +13 -0
  287. package/dist/store/space.d.ts +11 -0
  288. package/dist/store/space.d.ts.map +1 -0
  289. package/dist/store/space.js +41 -0
  290. package/dist/store/watchers.d.ts +17 -0
  291. package/dist/store/watchers.d.ts.map +1 -0
  292. package/dist/store/watchers.js +56 -0
  293. package/dist/store/writes.d.ts +24 -0
  294. package/dist/store/writes.d.ts.map +1 -0
  295. package/dist/store/writes.js +125 -0
  296. package/dist/store.d.ts +116 -151
  297. package/dist/store.d.ts.map +1 -1
  298. package/dist/store.js +174 -393
  299. package/dist/stored.d.ts +80 -68
  300. package/dist/stored.d.ts.map +1 -1
  301. package/dist/stored.js +410 -168
  302. package/dist/surface.d.ts +94 -0
  303. package/dist/surface.d.ts.map +1 -0
  304. package/dist/surface.js +255 -0
  305. package/dist/sync.d.ts +21 -0
  306. package/dist/sync.d.ts.map +1 -0
  307. package/dist/sync.js +557 -0
  308. package/dist/tables.d.ts +112 -88
  309. package/dist/tables.d.ts.map +1 -1
  310. package/dist/tables.js +192 -279
  311. package/dist/tallies.d.ts +18 -0
  312. package/dist/tallies.d.ts.map +1 -0
  313. package/dist/tallies.js +128 -0
  314. package/dist/validation.d.ts.map +1 -1
  315. package/dist/validation.js +6 -12
  316. package/dist/wire.d.ts +81 -7
  317. package/dist/wire.d.ts.map +1 -1
  318. package/dist/wire.js +31 -9
  319. package/package.json +3 -2
  320. package/dist/attempt.d.ts +0 -16
  321. package/dist/attempt.d.ts.map +0 -1
  322. package/dist/attempt.js +0 -70
  323. package/dist/fence.d.ts +0 -6
  324. package/dist/fence.d.ts.map +0 -1
  325. package/dist/fence.js +0 -10
  326. package/dist/job.d.ts +0 -14
  327. package/dist/job.d.ts.map +0 -1
  328. package/dist/job.js +0 -28
  329. package/dist/log.d.ts +0 -5
  330. package/dist/log.d.ts.map +0 -1
  331. package/dist/log.js +0 -14
@@ -1 +1 @@
1
- {"version":3,"file":"client.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,CAAC;AACpD,YAAY,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC"}
package/dist/client.js CHANGED
@@ -1,29 +1,16 @@
1
- import { shownBy } from './media.js';
2
- import { observed } from './observation.js';
1
+ import { handedCopy, handedLink } from './download.js';
2
+ import { pageMetadataBlock } from './page-metadata.js';
3
+ import { appRooms, observed } from './observation.js';
3
4
  import { runtimeError } from './failure.js';
4
- import { answer, AUTHORIZATION_ENDED, PORT_CLOSED, } from './wire.js';
5
+ import { blobOf, } from './outcome.js';
6
+ import { AUTHORIZATION_ENDED, PORT_CLOSED, wireAnswer, } from './wire.js';
5
7
  // React renders an arrived value in a later task and opens what that render observes as it commits, so this many frames opening nothing mean the page drew what it observes.
6
8
  const SETTLED_FRAMES = 2;
7
- // A browser reads a download's address only after the click that hands it returns, so a copy's address is released a minute later.
8
- const HANDED_COPY_MS = 60_000;
9
- const PAGE = /\.html?$/iu;
10
- const STARTED = { kind: 'started' };
11
- const BLOCKED = {
12
- kind: 'blocked',
13
- code: 'popup-blocked',
14
- fields: {},
15
- retryable: true,
16
- };
17
- function handed(url, name) {
18
- const anchor = document.createElement('a');
19
- anchor.href = url;
20
- anchor.download = name;
21
- anchor.click();
22
- }
23
9
  function refused(refusal) {
24
- return runtimeError(refusal.code, refusal.code, refusal.retryable);
10
+ return runtimeError(refusal.code);
25
11
  }
26
- export function connectMdRuntime(port) {
12
+ const UNBUILT = () => Promise.resolve(null);
13
+ export function connectMdRuntime(port, buildFile = UNBUILT) {
27
14
  let sequence = 0;
28
15
  let refusal = null;
29
16
  let ended = null;
@@ -35,13 +22,13 @@ export function connectMdRuntime(port) {
35
22
  const send = (message) => {
36
23
  port.postMessage(message);
37
24
  };
38
- function begin(id, topic, first) {
25
+ function begin(id, topic, input, first) {
39
26
  const handle = observed(first, () => {
40
27
  observations.delete(id);
41
28
  if (refusal === null)
42
29
  send({ kind: 'stop', id });
43
- }, topic === 'query');
44
- observations.set(id, { topic, handle });
30
+ }, topic);
31
+ observations.set(id, { topic, input, handle });
45
32
  return handle.observation;
46
33
  }
47
34
  function refuse(reported) {
@@ -53,7 +40,7 @@ export function connectMdRuntime(port) {
53
40
  const failure = refused(reported);
54
41
  for (const [id, waiting] of opening) {
55
42
  if (waiting.topic === 'connection-refusal')
56
- waiting.settle(begin(id, waiting.topic, reported));
43
+ waiting.settle(begin(id, waiting.topic, waiting.input, reported));
57
44
  else
58
45
  waiting.fail(failure);
59
46
  }
@@ -79,7 +66,7 @@ export function connectMdRuntime(port) {
79
66
  drawing?.();
80
67
  }
81
68
  port.addEventListener('message', (event) => {
82
- const message = answer(event.data);
69
+ const message = wireAnswer(event.data);
83
70
  if (message === null)
84
71
  return;
85
72
  if (message.kind === 'refusal') {
@@ -88,7 +75,7 @@ export function connectMdRuntime(port) {
88
75
  }
89
76
  if (message.kind === 'ended') {
90
77
  for (const { topic, handle } of observations.values()) {
91
- if (topic === 'member')
78
+ if (topic === 'member' || topic === 'time-zone')
92
79
  handle.receive(null);
93
80
  }
94
81
  end(runtimeError('authorization-ended', AUTHORIZATION_ENDED));
@@ -105,7 +92,7 @@ export function connectMdRuntime(port) {
105
92
  waiting.fail(runtimeError(message.code, message.message, message.retryable));
106
93
  }
107
94
  else
108
- waiting.settle(begin(message.id, waiting.topic, message.value));
95
+ waiting.settle(begin(message.id, waiting.topic, waiting.input, message.value));
109
96
  drawing?.();
110
97
  return;
111
98
  }
@@ -141,11 +128,11 @@ export function connectMdRuntime(port) {
141
128
  const id = (sequence += 1);
142
129
  if (refusal !== null) {
143
130
  return topic === 'connection-refusal'
144
- ? Promise.resolve(begin(id, topic, refusal))
131
+ ? Promise.resolve(begin(id, topic, input, refusal))
145
132
  : Promise.reject(refused(refusal));
146
133
  }
147
134
  return new Promise((settle, fail) => {
148
- opening.set(id, { topic, settle, fail });
135
+ opening.set(id, { topic, input, settle, fail });
149
136
  send({ kind: 'observe', id, topic, input });
150
137
  drawing?.();
151
138
  });
@@ -174,32 +161,13 @@ export function connectMdRuntime(port) {
174
161
  return { kind: 'binary', stream, byteLength, mediaType };
175
162
  }
176
163
  async function download(room, path, revision) {
177
- const tab = PAGE.test(path) ? globalThis.open('', '_blank') : null;
178
- const linked = await ask('binaryFile.link', [room, path, revision]);
179
- if (linked.kind === 'link' && PAGE.test(linked.name)) {
180
- const away = tab ?? globalThis.open('', '_blank');
181
- if (away === null)
182
- return BLOCKED;
183
- away.location.replace(linked.url);
184
- return STARTED;
185
- }
186
- tab?.close();
187
- if (linked.kind === 'link') {
188
- handed(linked.url, linked.name);
189
- return STARTED;
190
- }
164
+ const linked = await handedLink(path, () => ask('binaryFile.link', [room, path, revision]));
191
165
  if (linked.kind !== 'absent')
192
166
  return linked;
193
167
  const read = streamed(await ask('binaryFile.read', [room, path, revision]));
194
168
  if (read.kind !== 'binary')
195
169
  return read;
196
- const copy = await new Response(read.stream, {
197
- headers: { 'content-type': read.mediaType },
198
- }).blob();
199
- const url = URL.createObjectURL(copy);
200
- handed(url, path.slice(path.lastIndexOf('/') + 1));
201
- setTimeout(() => URL.revokeObjectURL(url), HANDED_COPY_MS);
202
- return STARTED;
170
+ return handedCopy(await blobOf(read), path.slice(path.lastIndexOf('/') + 1));
203
171
  }
204
172
  function settled() {
205
173
  if (settling !== null)
@@ -230,11 +198,12 @@ export function connectMdRuntime(port) {
230
198
  });
231
199
  return settling;
232
200
  }
233
- const show = (room, path, revision) => ask('binaryFile.show', [room, path, revision]).then((shown) => streamed(shown));
234
- return shownBy(show, {
235
- rooms: () => ask('rooms', []),
201
+ return {
202
+ buildFile,
203
+ rooms: () => ask('rooms', []).then(appRooms),
236
204
  query: ((query) => ask('query', [query])),
237
205
  search: (request) => ask('search', [request]),
206
+ queryHouse: (query) => ask('queryHouse', [query]),
238
207
  types: (locator) => ask('types', [locator]),
239
208
  roomDraft: {
240
209
  list: () => ask('roomDraft.list', []),
@@ -254,33 +223,52 @@ export function connectMdRuntime(port) {
254
223
  read: (conversation, options) => ask('conversation.read', [conversation, options]),
255
224
  create: (input) => ask('conversation.create', [input]),
256
225
  send: (conversation, operation, draft) => ask('conversation.send', [conversation, operation, draft]),
257
- answer: (conversation, answer) => ask('conversation.answer', [conversation, answer]),
258
- interrupt: (conversation) => ask('conversation.interrupt', [conversation]),
259
- kill: (conversation) => ask('conversation.kill', [conversation]),
260
- delete: (conversation) => ask('conversation.delete', [conversation]),
226
+ answer: (conversation, answer, operation) => ask('conversation.answer', [conversation, answer, operation]),
227
+ interrupt: (conversation, operation) => ask('conversation.interrupt', [conversation, operation]),
228
+ kill: (conversation, operation) => ask('conversation.kill', [conversation, operation]),
229
+ delete: (conversation, operation) => ask('conversation.delete', [conversation, operation]),
230
+ takeOut: (conversation, message, operation) => ask('conversation.takeOut', [conversation, message, operation]),
231
+ decide: (request, decision, operation) => ask('conversation.decide', [request, decision, operation]),
232
+ rename: (conversation, name, operation) => ask('conversation.rename', [conversation, name, operation]),
233
+ option: (conversation, option, value, operation) => ask('conversation.option', [conversation, option, value, operation]),
234
+ retry: (conversation, message, operation) => ask('conversation.retry', [conversation, message, operation]),
235
+ pin: (figures) => ask('conversation.pin', [figures]),
236
+ openTurn: (conversation, turn) => ask('conversation.openTurn', [conversation, turn]),
237
+ dismissSuggestion: (conversation, suggestion) => ask('conversation.dismissSuggestion', [conversation, suggestion]),
238
+ attach: (file) => ask('conversation.attach', [file]),
239
+ attachment: (link) => ask('conversation.attachment', [link]),
240
+ pageMetadata: async (app, address) => pageMetadataBlock(app, address, [...observations]
241
+ .sort(([left], [right]) => left - right)
242
+ .flatMap(([, { topic, input }]) => (topic === 'query' ? [input[0]] : []))),
261
243
  },
262
244
  chatDraft: {
263
245
  write: (conversation, draft, revision) => ask('chatDraft.write', [conversation, draft, revision]),
264
246
  prepend: (conversation, draft) => ask('chatDraft.prepend', [conversation, draft]),
247
+ append: (conversation, draft) => ask('chatDraft.append', [conversation, draft]),
265
248
  discard: (conversation) => ask('chatDraft.discard', [conversation]),
266
249
  },
267
250
  history: (locator, path, query) => ask('history', [locator, path, query]),
268
251
  resolve: (room, path, destination) => ask('resolve', [room, path, destination]),
269
252
  binaryFile: {
270
253
  read: (room, path, revision) => ask('binaryFile.read', [room, path, revision]).then((read) => streamed(read)),
254
+ show: (room, path, revision) => ask('binaryFile.show', [room, path, revision]).then((shown) => streamed(shown)),
271
255
  attach: (room, file) => ask('binaryFile.attach', [room, file]),
272
256
  download,
273
257
  },
274
258
  call: (name, input) => ask('call', [name, input]),
259
+ answered: (operation) => ask('answered', [operation]),
275
260
  reached: (locator, roomVersion, path) => ask('reached', [locator, roomVersion, path]),
276
- log: () => ask('log', []),
277
261
  persistence: () => ask('persistence', []),
278
262
  retry: () => ask('retry', []),
279
263
  cleanUp: () => ask('cleanUp', []),
264
+ unsent: () => ask('unsent', []),
265
+ sent: () => ask('sent', []),
266
+ reset: () => ask('reset', []),
267
+ readAgain: () => ask('readAgain', []),
280
268
  observe: ((topic, ...input) => watch(topic, input)),
281
269
  reauthorize: () => ask('reauthorize', []),
282
270
  settled,
283
- });
271
+ };
284
272
  }
285
273
  const turns = new WeakMap();
286
274
  export function inTurn(client, work) {
@@ -290,5 +278,6 @@ export function inTurn(client, work) {
290
278
  }
291
279
  export { chainedWindows } from './chain.js';
292
280
  export { roomDraftRevision } from './identity.js';
293
- export { defineRoomMedia, ROOM_MEDIA } from './media.js';
294
- export { unanswered } from './wire.js';
281
+ export { defineRoomMedia, ROOM_MEDIA, viewFile } from './media.js';
282
+ export { shownModal } from './modal.js';
283
+ export { unanswered, undelivered } from './wire.js';
@@ -1,5 +1,6 @@
1
- import { type Document, type TypedPath } from '@agentshouse/mdmodel';
2
- import type { ModelState } from './model.js';
1
+ import { type DefinitionOf, type Document, type ParseResult, type TypedPath, type VerifiedModel } from '@agentshouse/mdmodel';
2
+ import type { ModelState, TypesResult } from './model.js';
3
+ import type { AppTypedSelection } from './listing.js';
3
4
  import type { MdModelIdentity } from './adapter.js';
4
5
  export declare const MD_MODEL: MdModelIdentity;
5
6
  export type Collection = {
@@ -19,11 +20,32 @@ export type Composed = {
19
20
  readonly composition: Composition;
20
21
  readonly fingerprint: string;
21
22
  };
23
+ export declare function typesPrint(types: VerifiedModel['types']): string;
22
24
  export declare function composedOf(composition: Composition): Composed;
23
- export declare function selected(composition: Composition, path: string): boolean;
24
- export declare function governing(composition: Composition, path: string): ModelState;
25
+ type Selecting<M> = {
26
+ readonly model: M;
27
+ readonly selection: {
28
+ readonly roots: readonly string[];
29
+ readonly model: M;
30
+ } | null;
31
+ };
32
+ export declare function selected(composition: {
33
+ readonly selection: {
34
+ readonly roots: readonly string[];
35
+ } | null;
36
+ }, path: string): boolean;
37
+ export declare function governing<M>(composition: Selecting<M>, path: string): M;
38
+ export declare function definitionsAt(composition: Composition, path: string): DefinitionOf;
39
+ export declare function definitionsIn(room: {
40
+ readonly model: TypesResult;
41
+ readonly typedSelection: AppTypedSelection | null;
42
+ }, path: string, typedPaths: readonly TypedPath[]): DefinitionOf;
25
43
  export declare function collectionOf(text: Readonly<Record<string, string>>, composition: Composition): Collection;
26
44
  export declare function documentsOf(collection: Collection): Generator<number, Iterable<readonly [string, Document]>, void>;
27
45
  export declare function validRoot(root: unknown): root is string;
46
+ export declare const UNTYPED = "any";
47
+ export declare function textType(read: ParseResult): string | undefined;
48
+ export declare function typedText(read: ParseResult): boolean;
28
49
  export declare function available(composition: Composition): boolean;
50
+ export {};
29
51
  //# sourceMappingURL=collection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAIpD,e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,OAAO,QAAQ,CAAC;AAE7B,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAE9D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAEpD;AAED,wBAAgB,SAAS,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAE3D"}
@@ -1,26 +1,27 @@
1
- import { parse, VERSION } from '@agentshouse/mdmodel';
1
+ import { definitionAt, parse, VERSION, } from '@agentshouse/mdmodel';
2
2
  import { beneath, normalize } from './paths.js';
3
3
  import { hashed } from './observation.js';
4
4
  import { sortedKeys } from './shared.js';
5
5
  export const MD_MODEL = { identity: '@agentshouse/mdmodel', version: VERSION };
6
6
  const typesPrinted = new WeakMap();
7
- function typesPrint(model) {
8
- if (model.status === 'unavailable')
9
- return '';
10
- let print = typesPrinted.get(model.types);
7
+ export function typesPrint(types) {
8
+ let print = typesPrinted.get(types);
11
9
  if (print === undefined) {
12
- print = hashed(JSON.stringify(model.types)).toString(36);
13
- typesPrinted.set(model.types, print);
10
+ print = hashed(JSON.stringify(types)).toString(36);
11
+ typesPrinted.set(types, print);
14
12
  }
15
13
  return print;
16
14
  }
15
+ function modelPrint(model) {
16
+ return model.status === 'unavailable' ? '' : typesPrint(model.types);
17
+ }
17
18
  export function composedOf(composition) {
18
19
  const { model, selection } = composition;
19
20
  return {
20
21
  composition,
21
22
  fingerprint: JSON.stringify([
22
- typesPrint(model),
23
- selection === null ? null : [selection.roots, typesPrint(selection.model)],
23
+ modelPrint(model),
24
+ selection === null ? null : [selection.roots, modelPrint(selection.model)],
24
25
  ]),
25
26
  };
26
27
  }
@@ -33,6 +34,16 @@ export function governing(composition, path) {
33
34
  ? composition.selection.model
34
35
  : composition.model;
35
36
  }
37
+ function definitionsUnder(composition, path, typedPaths, typesOf) {
38
+ const types = typesOf(governing(composition, path));
39
+ return types === null ? () => undefined : definitionAt({ types }, path, typedPaths);
40
+ }
41
+ export function definitionsAt(composition, path) {
42
+ return definitionsUnder(composition, path, composition.typedPaths, (model) => model.status === 'unavailable' ? null : model.types);
43
+ }
44
+ export function definitionsIn(room, path, typedPaths) {
45
+ return definitionsUnder({ model: room.model, selection: room.typedSelection }, path, typedPaths, ({ types }) => types === null ? null : Object.fromEntries(types.map((type) => [type.name, type])));
46
+ }
36
47
  export function collectionOf(text, composition) {
37
48
  const parsed = new Map();
38
49
  return {
@@ -44,7 +55,7 @@ export function collectionOf(text, composition) {
44
55
  const content = text[path];
45
56
  if (content === undefined)
46
57
  return undefined;
47
- const read = parse(content, path);
58
+ const read = parse(content, path, definitionsAt(composition, path));
48
59
  parsed.set(path, read.ok ? read.document : null);
49
60
  return read.ok ? read.document : undefined;
50
61
  },
@@ -63,6 +74,13 @@ export function* documentsOf(collection) {
63
74
  export function validRoot(root) {
64
75
  return typeof root === 'string' && normalize(root) === root;
65
76
  }
77
+ export const UNTYPED = 'any';
78
+ export function textType(read) {
79
+ return read.ok ? (read.document.type ?? UNTYPED) : undefined;
80
+ }
81
+ export function typedText(read) {
82
+ return (textType(read) ?? UNTYPED) !== UNTYPED;
83
+ }
66
84
  export function available(composition) {
67
85
  return composition.model.status !== 'unavailable';
68
86
  }
@@ -0,0 +1,5 @@
1
+ import type { Row, Value } from './tables.js';
2
+ export declare function text(value: Value | undefined): string;
3
+ export declare function texts(rows: readonly Row[], column: string): string[];
4
+ export declare function count(value: Value | undefined): number;
5
+ //# sourceMappingURL=column.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../src/column.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAErD;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpE;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAEtD"}
package/dist/column.js ADDED
@@ -0,0 +1,9 @@
1
+ export function text(value) {
2
+ return typeof value === 'string' ? value : String(value);
3
+ }
4
+ export function texts(rows, column) {
5
+ return rows.map((row) => text(row[column]));
6
+ }
7
+ export function count(value) {
8
+ return typeof value === 'bigint' ? Number(value) : typeof value === 'number' ? value : 0;
9
+ }
package/dist/compile.d.ts CHANGED
@@ -1,11 +1,18 @@
1
+ import { sql } from '@agentshouse/mdmodel';
2
+ import { type Composition } from './collection.js';
1
3
  import type { Plan, QueryRows } from './query.js';
2
4
  import type { Connection } from './tables.js';
3
5
  export type QueryRoom = {
4
6
  readonly locator: string;
5
7
  readonly key: number;
8
+ readonly composition?: Composition;
6
9
  };
10
+ type Fragment = sql.Fragment;
11
+ export declare const VISIBLE: (alias: string) => string;
12
+ export declare function within(alias: string, path: string): Fragment;
7
13
  export type QueryAnswer = QueryRows & {
8
14
  readonly more?: string;
9
15
  };
10
16
  export declare function answerQuery(connection: Connection, plan: Plan, rooms: readonly QueryRoom[], budget?: number | null): QueryAnswer;
17
+ export {};
11
18
  //# sourceMappingURL=compile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../src/compile.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,IAAI,EAAuC,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvF,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAG1D,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAkb3E,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAkUjE,wBAAgB,WAAW,C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