@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
package/dist/outcome.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { MEDIA_TYPES } from '@agentshouse/mdmodel';
2
+ import { refusalError } from './failure.js';
1
3
  export const UNREADABLE = {
2
4
  kind: 'unreadable',
3
5
  code: 'room-not-readable',
@@ -19,17 +21,22 @@ export const ABSENT_TARGET = {
19
21
  export function absentBinary(path) {
20
22
  return { kind: 'absent', code: 'binary-file-absent', fields: { path }, retryable: false };
21
23
  }
24
+ export function declaredType(blob) {
25
+ return blob.type === '' ? MEDIA_TYPES.octetStream : blob.type;
26
+ }
27
+ export function blobOf(binary) {
28
+ return new Response(binary.stream, { headers: { 'content-type': binary.mediaType } }).blob();
29
+ }
22
30
  export function binaryAnswer(result) {
23
31
  return result.kind === 'binary' || result.kind === 'rejected' ? result : failure(result);
24
32
  }
25
- const OCTET_STREAM = 'application/octet-stream';
26
33
  export function binaryLinkAnswer(result, held) {
27
34
  if (result.kind === 'link') {
28
35
  return {
29
36
  kind: 'link',
30
37
  url: result.url,
31
38
  name: result.name,
32
- mediaType: result.mediaType ?? held ?? OCTET_STREAM,
39
+ mediaType: result.mediaType ?? held ?? MEDIA_TYPES.octetStream,
33
40
  };
34
41
  }
35
42
  return result.kind === 'rejected' ? result : failure(result);
@@ -37,6 +44,15 @@ export function binaryLinkAnswer(result, held) {
37
44
  export function attachAnswer(result) {
38
45
  if (result.kind === 'attached')
39
46
  return { kind: 'attached', path: result.path };
47
+ if (result.kind === 'linked')
48
+ return UNCERTAIN;
49
+ return result.kind === 'rejected' ? result : failure(result);
50
+ }
51
+ export function linkedAnswer(result) {
52
+ if (result.kind === 'linked')
53
+ return { kind: 'attached', link: result.link };
54
+ if (result.kind === 'attached')
55
+ return UNCERTAIN;
40
56
  return result.kind === 'rejected' ? result : failure(result);
41
57
  }
42
58
  export const ROOM_LOCKED = 'room-locked';
@@ -44,6 +60,9 @@ export function lockedRoom(locator) {
44
60
  return { kind: ROOM_LOCKED, locator, code: ROOM_LOCKED, fields: {}, retryable: true };
45
61
  }
46
62
  export const OFFLINE = { kind: 'offline' };
63
+ export function answeredResult(value) {
64
+ return typeof value === 'object' && value !== null && !('pending' in value);
65
+ }
47
66
  export const UNCERTAIN = {
48
67
  kind: 'transport-uncertainty',
49
68
  code: 'transport-uncertainty',
@@ -79,3 +98,17 @@ export function historyAnswer(result) {
79
98
  ? result
80
99
  : failure(result);
81
100
  }
101
+ export const UNANSWERED = { kind: 'transport-uncertainty' };
102
+ export function handedOutcome(retries, attempt, result) {
103
+ if (attempt !== undefined) {
104
+ const { step, instance } = attempt;
105
+ if (result.kind === 'action')
106
+ retries.succeeded(step, instance);
107
+ else if (result.kind === 'transport-uncertainty')
108
+ retries.uncertain(step, instance, result);
109
+ else if (result.kind === 'rejected' && result.retryable) {
110
+ retries.failed(step, instance, refusalError(result));
111
+ }
112
+ }
113
+ return calledResult(result);
114
+ }
package/dist/overlay.d.ts CHANGED
@@ -1,8 +1,11 @@
1
+ import { type ApplyResult } from '@agentshouse/mdmodel';
1
2
  import type { BinaryFile, HeadChange } from './adapter.js';
2
- import type { ChangeBatch } from './change.js';
3
+ import { type Composition } from './collection.js';
4
+ import { type ChangeBatch } from './change.js';
3
5
  export type Heads = {
4
6
  revisions: Readonly<Record<string, string>>;
5
7
  fileIds: Readonly<Record<string, string>>;
8
+ created: Readonly<Record<string, string>>;
6
9
  changes: Readonly<Record<string, HeadChange>>;
7
10
  };
8
11
  export type HeldBinary = ({
@@ -21,5 +24,7 @@ export type Layer = Heads & {
21
24
  export declare function acceptedBinaries(files: Readonly<Record<string, BinaryFile>>): Generator<readonly [string, HeldBinary]>;
22
25
  export declare function sameBinary(left: HeldBinary | undefined, right: HeldBinary | undefined): boolean;
23
26
  export declare function sameChange(left: HeadChange | undefined, right: HeadChange | undefined): boolean;
24
- export declare function overlaying(base: Layer, queue: readonly ChangeBatch[], unapplied?: () => void): Generator<number, Layer, void>;
27
+ export declare function composed(path: string, fields: Readonly<Record<string, unknown>>, sections: Readonly<Record<string, string>>, composition: Composition): ApplyResult;
28
+ export declare function compose(path: string, fields: Readonly<Record<string, unknown>>, sections: Readonly<Record<string, string>>, composition: Composition): string;
29
+ export declare function overlaying(base: Layer, queue: readonly ChangeBatch[], composition: Composition, unapplied?: () => void): Generator<number, Layer, void>;
25
30
  //# sourceMappingURL=overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../src/overlay.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAU,WAAW,EAAgB,MAAM,aAAa,CAAC;AAIrE,MAAM,MAAM,KAAK,GAAG;IAClB,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,UAAU,GAClB,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;CAAE,GAAG,UAAU,CAAC,GAC7C;IACE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG;IAC1B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5C,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;CAChD,CAAC;AAEF,wBAAiB,gBAA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AM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC1C,WAAW,EAAE,WAAW,GACvB,MAAM,CAIR;AA8ID,wBAAiB,UAAU,CACzB,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,WAAW,EAAE,WAAW,EACxB,SAAS,CAAC,EAAE,MAAM,IAAI,GACrB,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAsChC"}
package/dist/overlay.js CHANGED
@@ -1,4 +1,6 @@
1
- import { apply, frontmatterValue, parse, serialize, } from '@agentshouse/mdmodel';
1
+ import { apply, create, documentValue, parse, serialize, TYPE_FIELD, } from '@agentshouse/mdmodel';
2
+ import { definitionsAt } from './collection.js';
3
+ import { isPart, } from './change.js';
2
4
  import { drafted, entriesIn, settling } from './shared.js';
3
5
  import { ROW_WEIGHT } from './turn.js';
4
6
  export function* acceptedBinaries(files) {
@@ -24,10 +26,6 @@ export function sameChange(left, right) {
24
26
  left.author?.id === right.author?.id &&
25
27
  left.author?.name === right.author?.name);
26
28
  }
27
- const EMPTY_FRONTMATTER = '---\n---\n';
28
- function isPart(change) {
29
- return change.kind === 'field' || change.kind === 'section' || change.kind === 'preamble';
30
- }
31
29
  function at(path, name) {
32
30
  return `${path} ${name}`;
33
31
  }
@@ -53,16 +51,27 @@ function* priorsOf(preconditions) {
53
51
  preamble: (path) => preambles.get(path) ?? '',
54
52
  };
55
53
  }
56
- function compose(fields, sections) {
57
- const body = Object.entries(sections)
58
- .map(([name, value]) => `\n## ${name}\n${value}`)
59
- .join('');
60
- const skeleton = `${EMPTY_FRONTMATTER}${body}`;
61
- const opened = parse(skeleton);
62
- if (!opened.ok)
63
- return skeleton;
64
- const next = apply(opened.document, Object.entries(fields).flatMap(([name, value]) => frontmatterValue(value) ? [{ kind: 'field', name, value, prior: undefined }] : []));
65
- return serialize(next.outcome === 'applied' ? next.document : opened.document);
54
+ export function composed(path, fields, sections, composition) {
55
+ const declared = fields[TYPE_FIELD];
56
+ const type = typeof declared === 'string' && declared !== '' ? declared : undefined;
57
+ const definition = definitionsAt(composition, path)(type);
58
+ return apply(create(type, definition), [
59
+ ...Object.entries(fields).flatMap(([name, value]) => (name !== TYPE_FIELD || type === undefined) && documentValue(value)
60
+ ? [{ kind: 'field', name, value, prior: undefined }]
61
+ : []),
62
+ ...Object.entries(sections).map(([name, value]) => ({
63
+ kind: 'section',
64
+ name,
65
+ value,
66
+ prior: undefined,
67
+ })),
68
+ ], definition);
69
+ }
70
+ export function compose(path, fields, sections, composition) {
71
+ const next = composed(path, fields, sections, composition);
72
+ if (next.outcome !== 'applied')
73
+ throw new Error(`the creation of ${path} writes no document`);
74
+ return serialize(next.document);
66
75
  }
67
76
  function edited(change, priors) {
68
77
  if (change.kind === 'field')
@@ -81,17 +90,19 @@ function edited(change, priors) {
81
90
  prior: priors.section(change.path, change.name),
82
91
  };
83
92
  }
84
- function edit(staged, changes, priors) {
93
+ function edit(staged, changes, priors, composition) {
85
94
  const path = changes[0].path;
86
95
  delete staged.revisions[path];
87
96
  const text = staged.documents[path];
88
97
  if (text === undefined)
89
98
  return changes.length;
90
- const parsed = parse(text, path);
99
+ const definitions = definitionsAt(composition, path);
100
+ const parsed = parse(text, path, definitions);
91
101
  if (!parsed.ok)
92
102
  return changes.length;
103
+ const definition = definitions(parsed.document.type);
93
104
  const wanted = changes.map((change) => edited(change, priors));
94
- const first = apply(parsed.document, wanted);
105
+ const first = apply(parsed.document, wanted, definition);
95
106
  if (first.outcome === 'refuse')
96
107
  return changes.length;
97
108
  if (first.outcome === 'applied') {
@@ -100,7 +111,7 @@ function edit(staged, changes, priors) {
100
111
  }
101
112
  const stale = new Set(first.stale);
102
113
  const kept = wanted.filter((_, at) => !stale.has(at));
103
- const rest = apply(parsed.document, kept);
114
+ const rest = apply(parsed.document, kept, definition);
104
115
  if (rest.outcome !== 'applied')
105
116
  return changes.length;
106
117
  staged.documents[path] = serialize(rest.document);
@@ -125,16 +136,21 @@ function relocate(staged, from, to) {
125
136
  function moveHead(heads, from, to) {
126
137
  const revision = heads.revisions[from];
127
138
  const fileId = heads.fileIds[from];
139
+ const created = heads.created[from];
128
140
  const change = heads.changes[from];
129
141
  delete heads.revisions[from];
130
142
  delete heads.fileIds[from];
143
+ delete heads.created[from];
131
144
  delete heads.changes[from];
132
145
  delete heads.fileIds[to];
146
+ delete heads.created[to];
133
147
  delete heads.changes[to];
134
148
  if (revision !== undefined)
135
149
  heads.revisions[to] = revision;
136
150
  if (fileId !== undefined)
137
151
  heads.fileIds[to] = fileId;
152
+ if (created !== undefined)
153
+ heads.created[to] = created;
138
154
  if (change !== undefined)
139
155
  heads.changes[to] = change;
140
156
  }
@@ -142,14 +158,18 @@ function erase(staged, path) {
142
158
  delete staged.documents[path];
143
159
  delete staged.revisions[path];
144
160
  delete staged.fileIds[path];
161
+ delete staged.created[path];
145
162
  delete staged.changes[path];
146
163
  delete staged.binaries[path];
147
164
  }
148
- function stage(staged, change) {
165
+ function stage(staged, change, composition) {
149
166
  if (change.kind === 'create') {
150
167
  staged.documents[change.path] =
151
- 'content' in change ? change.content : compose(change.fields, change.sections);
168
+ 'content' in change
169
+ ? change.content
170
+ : compose(change.path, change.fields, change.sections, composition);
152
171
  delete staged.fileIds[change.path];
172
+ delete staged.created[change.path];
153
173
  delete staged.changes[change.path];
154
174
  return true;
155
175
  }
@@ -194,15 +214,18 @@ function arrive(heads, change) {
194
214
  heads.revisions[change.path] = change.revision;
195
215
  if (change.fileId !== undefined)
196
216
  heads.fileIds[change.path] = change.fileId;
217
+ if (change.created !== undefined)
218
+ heads.created[change.path] = change.created;
197
219
  if (change.change !== undefined)
198
220
  heads.changes[change.path] = change.change;
199
221
  }
200
- export function* overlaying(base, queue, unapplied) {
222
+ export function* overlaying(base, queue, composition, unapplied) {
201
223
  const staged = {
202
224
  documents: drafted(base.documents),
203
225
  binaries: drafted(base.binaries),
204
226
  revisions: drafted(base.revisions),
205
227
  fileIds: drafted(base.fileIds),
228
+ created: drafted(base.created),
206
229
  changes: drafted(base.changes),
207
230
  };
208
231
  for (const batch of queue) {
@@ -210,7 +233,7 @@ export function* overlaying(base, queue, unapplied) {
210
233
  for (let index = 0; index < batch.changes.length; index += 1) {
211
234
  const change = batch.changes[index];
212
235
  if (!isPart(change)) {
213
- if (!stage(staged, change))
236
+ if (!stage(staged, change, composition))
214
237
  unapplied?.();
215
238
  yield ROW_WEIGHT;
216
239
  continue;
@@ -224,7 +247,7 @@ export function* overlaying(base, queue, unapplied) {
224
247
  index += 1;
225
248
  }
226
249
  const text = staged.documents[change.path] ?? '';
227
- for (let left = edit(staged, run, priors); left > 0; left -= 1)
250
+ for (let left = edit(staged, run, priors, composition); left > 0; left -= 1)
228
251
  unapplied?.();
229
252
  yield ROW_WEIGHT + text.length;
230
253
  }
@@ -234,6 +257,7 @@ export function* overlaying(base, queue, unapplied) {
234
257
  binaries: yield* settling(staged.binaries),
235
258
  revisions: yield* settling(staged.revisions),
236
259
  fileIds: yield* settling(staged.fileIds),
260
+ created: yield* settling(staged.created),
237
261
  changes: yield* settling(staged.changes),
238
262
  };
239
263
  }
@@ -0,0 +1,8 @@
1
+ export declare const PAGE_METADATA_WORDS: {
2
+ readonly heading: 'Page metadata';
3
+ readonly app: 'App';
4
+ readonly address: 'Address';
5
+ readonly queries: 'Local Queries';
6
+ };
7
+ export declare function pageMetadataBlock(app: string, address: string, queries: readonly unknown[]): string;
8
+ //# sourceMappingURL=page-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-metadata.d.ts","sourceRoot":"","sources":["../src/page-metadata.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;aAC9B,OAAO,EAAE,eAAe;aACxB,GAAG,EAAE,KAAK;aACV,OAAO,EAAE,SAAS;aAClB,OAAO,EAAE,eAAe;CAChB,CAAC;AAIX,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,OAAO,EAAE,GAC1B,MAAM,CAUR"}
@@ -0,0 +1,19 @@
1
+ import { queryKey } from '@agentshouse/mdmodel';
2
+ export const PAGE_METADATA_WORDS = {
3
+ heading: 'Page metadata',
4
+ app: 'App',
5
+ address: 'Address',
6
+ queries: 'Local Queries',
7
+ };
8
+ const PAGE_METADATA_QUERIES = 10;
9
+ export function pageMetadataBlock(app, address, queries) {
10
+ const held = [...new Set(queries.map(queryKey))];
11
+ return [
12
+ PAGE_METADATA_WORDS.heading,
13
+ `${PAGE_METADATA_WORDS.app}: ${app}`,
14
+ `${PAGE_METADATA_WORDS.address}: ${address}`,
15
+ ...(held.length === 0 || held.length > PAGE_METADATA_QUERIES
16
+ ? []
17
+ : [`${PAGE_METADATA_WORDS.queries}:`, ...held]),
18
+ ].join('\n');
19
+ }
@@ -0,0 +1,6 @@
1
+ import { type Part } from '@agentshouse/session-content';
2
+ export declare const WORKING = "Working";
3
+ export declare function linesWords(added: number, removed: number): string;
4
+ export declare function turnLine(parts: readonly Part[], lead: string | null): string | null;
5
+ export declare function runningLine(parts: readonly Part[]): string | null;
6
+ //# sourceMappingURL=parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../src/parts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGrE,eAAO,MAAM,OAAO,YAAY,CAAC;AAOjC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAMD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAenF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,MAAM,GAAG,IAAI,CAIjE"}
package/dist/parts.js ADDED
@@ -0,0 +1,36 @@
1
+ import { turnCounts } from '@agentshouse/session-content';
2
+ import { excerpt } from './read.js';
3
+ export const WORKING = 'Working';
4
+ function said(count, one, many) {
5
+ if (count === 0)
6
+ return null;
7
+ return count === 1 ? one : many(count);
8
+ }
9
+ export function linesWords(added, removed) {
10
+ return `+${added} −${removed}`;
11
+ }
12
+ function capitalized(words) {
13
+ return words.charAt(0).toUpperCase() + words.slice(1);
14
+ }
15
+ export function turnLine(parts, lead) {
16
+ const counts = turnCounts(parts);
17
+ const kinds = [
18
+ said(counts.commands, 'ran 1 command', (count) => `ran ${count} commands`),
19
+ said(counts.edited, 'edited 1 file', (count) => `edited ${count} files`),
20
+ said(counts.other, 'made 1 other call', (count) => `made ${count} other calls`),
21
+ ].filter((one) => one !== null);
22
+ if (kinds.length === 0)
23
+ return null;
24
+ const changed = counts.added === 0 && counts.removed === 0 ? null : linesWords(counts.added, counts.removed);
25
+ const failed = counts.failed === 0 ? null : `${counts.failed} failed`;
26
+ const words = kinds.join(' · ');
27
+ return [lead === null ? capitalized(words) : `${lead} · ${words}`, changed, failed]
28
+ .filter((one) => one !== null)
29
+ .join(' · ');
30
+ }
31
+ export function runningLine(parts) {
32
+ const note = [...parts].reverse().find((part) => part.type === 'text' && part.text.trim() !== '');
33
+ if (note?.type === 'text')
34
+ return excerpt(note.text);
35
+ return turnLine(parts, null);
36
+ }
package/dist/paths.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export declare function normalize(path: string): string | null;
2
2
  export declare function beneath(prefix: string, path: string): boolean;
3
3
  export declare function covered(prefixes: readonly string[], path: string): boolean;
4
+ export declare function authoredAt(patterns: readonly string[], path: string): boolean;
4
5
  export declare function ancestors(path: string): readonly string[];
5
6
  //# sourceMappingURL=paths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYrD;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED,wBAAgB,OAAO,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAK1E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAGzD"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYrD;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED,wBAAgB,OAAO,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAK1E;AAwBD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAGzD"}
package/dist/paths.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { isDocumentPath } from '@agentshouse/mdmodel';
1
2
  export function normalize(path) {
2
3
  const parts = [];
3
4
  for (const part of path.split('/')) {
@@ -22,6 +23,27 @@ export function covered(prefixes, path) {
22
23
  return normalized !== null && (normalized === '' || beneath(normalized, path));
23
24
  });
24
25
  }
26
+ function named(pattern, name) {
27
+ const star = pattern.indexOf('*');
28
+ if (star === -1)
29
+ return pattern === name;
30
+ const before = pattern.slice(0, star);
31
+ const after = pattern.slice(star + 1);
32
+ return (name.length > before.length + after.length && name.startsWith(before) && name.endsWith(after));
33
+ }
34
+ function matched(pattern, path) {
35
+ if (pattern === '/')
36
+ return isDocumentPath(path);
37
+ const wanted = pattern.split('/');
38
+ const names = path.split('/');
39
+ const open = wanted.at(-1) === '**';
40
+ const fixed = open ? wanted.slice(0, -1) : wanted;
41
+ return ((open ? names.length > fixed.length : names.length === fixed.length) &&
42
+ fixed.every((one, at) => named(one, names[at])));
43
+ }
44
+ export function authoredAt(patterns, path) {
45
+ return patterns.some((pattern) => matched(pattern, path));
46
+ }
25
47
  export function ancestors(path) {
26
48
  const parts = path.split('/');
27
49
  return parts.slice(1).map((_, at) => parts.slice(0, at + 1).join('/'));
@@ -0,0 +1,46 @@
1
+ import { type InstallShare } from './install.js';
2
+ import { type ReadinessChange } from './observation.js';
3
+ import { type PortReach } from './reach.js';
4
+ import { type CodeAvailability, type ConnectionAvailability, type FirstTier, type Readiness, type RoomCoverage } from './readiness.js';
5
+ import type { Runtime } from './runtime.js';
6
+ export type ReadinessPort = {
7
+ readonly target: string;
8
+ readonly code: CodeAvailability;
9
+ readonly first: FirstTier | null;
10
+ readonly inboxed: readonly string[] | null;
11
+ };
12
+ export type ReadinessMessage = Readiness | ReadinessChange;
13
+ export type ReadinessWatch = {
14
+ readonly port: ReadinessPort;
15
+ readonly reach: PortReach | null;
16
+ readonly deliver: (readiness: ReadinessMessage) => void;
17
+ };
18
+ type Share = InstallShare & {
19
+ readonly coverage: RoomCoverage;
20
+ };
21
+ type Settled = {
22
+ acquiring: number;
23
+ unsettled: number;
24
+ };
25
+ type Totals = Settled & {
26
+ installing: number;
27
+ downloading: number;
28
+ done: number;
29
+ total: number;
30
+ };
31
+ export type ReadinessShowing = {
32
+ readonly listing: number;
33
+ readonly roomsListed: boolean;
34
+ readonly named: ReadonlySet<string> | null;
35
+ readonly rooms: Map<string, Share>;
36
+ readonly first: Map<string, string>;
37
+ readonly totals: Totals;
38
+ shown: string;
39
+ };
40
+ export declare function prepare(runtime: Runtime, locators?: readonly string[]): void;
41
+ export declare function connectionNow(runtime: Runtime): Promise<ConnectionAvailability>;
42
+ export declare function deliverOwedReadiness(runtime: Runtime, owed: readonly ReadinessWatch[], touched: ReadonlySet<string> | null): Promise<void>;
43
+ export declare function watchReadiness({ store }: Runtime, port: ReadinessPort, reach: PortReach | null, deliver: (readiness: ReadinessMessage) => void): () => void;
44
+ export declare function filled({ store, socket }: Runtime): void;
45
+ export {};
46
+ //# sourceMappingURL=preparation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preparation.d.ts","sourceRoot":"","sources":["../src/preparation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAE/E,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAE3B,KAAK,SAAS,EACd,KAAK,SAAS,EAEd,KAAK,YAAY,EAGlB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAK5C,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,eAAe,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,gBAAgB,KAAK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