@moltzap/client 2026.529.0 → 2026.718.0

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 (363) hide show
  1. package/dist/agent-client.d.ts +2 -65
  2. package/dist/agent-client.d.ts.map +1 -1
  3. package/dist/agent-client.js +1 -286
  4. package/dist/agent-client.js.map +1 -1
  5. package/dist/app-client.d.ts +3 -0
  6. package/dist/app-client.d.ts.map +1 -0
  7. package/dist/app-client.js +2 -0
  8. package/dist/app-client.js.map +1 -0
  9. package/dist/auth.d.ts +6 -15
  10. package/dist/auth.d.ts.map +1 -1
  11. package/dist/auth.js +12 -16
  12. package/dist/auth.js.map +1 -1
  13. package/dist/channel-base/format-cross-conv.d.ts +10 -15
  14. package/dist/channel-base/format-cross-conv.d.ts.map +1 -1
  15. package/dist/channel-base/format-cross-conv.js +10 -15
  16. package/dist/channel-base/format-cross-conv.js.map +1 -1
  17. package/dist/channel-base/format-group-block.d.ts +8 -10
  18. package/dist/channel-base/format-group-block.d.ts.map +1 -1
  19. package/dist/channel-base/format-group-block.js +8 -10
  20. package/dist/channel-base/format-group-block.js.map +1 -1
  21. package/dist/channel-base/index.d.ts +3 -62
  22. package/dist/channel-base/index.d.ts.map +1 -1
  23. package/dist/channel-base/index.js +2 -65
  24. package/dist/channel-base/index.js.map +1 -1
  25. package/dist/channel-base/lease-guard.d.ts +0 -2
  26. package/dist/channel-base/lease-guard.d.ts.map +1 -1
  27. package/dist/channel-base/lease-guard.js +0 -2
  28. package/dist/channel-base/lease-guard.js.map +1 -1
  29. package/dist/channel-base/lease-store.d.ts +2 -3
  30. package/dist/channel-base/lease-store.d.ts.map +1 -1
  31. package/dist/channel-base/lease-store.js +2 -3
  32. package/dist/channel-base/lease-store.js.map +1 -1
  33. package/dist/channel-base/lease.d.ts +25 -31
  34. package/dist/channel-base/lease.d.ts.map +1 -1
  35. package/dist/channel-base/lease.js +29 -45
  36. package/dist/channel-base/lease.js.map +1 -1
  37. package/dist/channel-core-enrichment.d.ts +1 -1
  38. package/dist/channel-core-enrichment.d.ts.map +1 -1
  39. package/dist/channel-core-test-support.d.ts +17 -11
  40. package/dist/channel-core-test-support.d.ts.map +1 -1
  41. package/dist/channel-core-test-support.js +5 -6
  42. package/dist/channel-core-test-support.js.map +1 -1
  43. package/dist/channel-core.d.ts +24 -29
  44. package/dist/channel-core.d.ts.map +1 -1
  45. package/dist/channel-core.js +18 -42
  46. package/dist/channel-core.js.map +1 -1
  47. package/dist/cli/commands/agents.d.ts +3 -6
  48. package/dist/cli/commands/agents.d.ts.map +1 -1
  49. package/dist/cli/commands/agents.js +14 -50
  50. package/dist/cli/commands/agents.js.map +1 -1
  51. package/dist/cli/commands/contacts.d.ts +5 -6
  52. package/dist/cli/commands/contacts.d.ts.map +1 -1
  53. package/dist/cli/commands/contacts.js +15 -43
  54. package/dist/cli/commands/contacts.js.map +1 -1
  55. package/dist/cli/commands/conversations.d.ts +8 -18
  56. package/dist/cli/commands/conversations.d.ts.map +1 -1
  57. package/dist/cli/commands/conversations.js +14 -65
  58. package/dist/cli/commands/conversations.js.map +1 -1
  59. package/dist/cli/commands/messages.d.ts +13 -35
  60. package/dist/cli/commands/messages.d.ts.map +1 -1
  61. package/dist/cli/commands/messages.js +21 -46
  62. package/dist/cli/commands/messages.js.map +1 -1
  63. package/dist/cli/commands/register.d.ts +10 -12
  64. package/dist/cli/commands/register.d.ts.map +1 -1
  65. package/dist/cli/commands/register.js +47 -133
  66. package/dist/cli/commands/register.js.map +1 -1
  67. package/dist/cli/commands/send.d.ts +23 -36
  68. package/dist/cli/commands/send.d.ts.map +1 -1
  69. package/dist/cli/commands/send.js +25 -72
  70. package/dist/cli/commands/send.js.map +1 -1
  71. package/dist/cli/commands/start.d.ts +10 -124
  72. package/dist/cli/commands/start.d.ts.map +1 -1
  73. package/dist/cli/commands/start.js +28 -510
  74. package/dist/cli/commands/start.js.map +1 -1
  75. package/dist/cli/commands/status.d.ts +1 -1
  76. package/dist/cli/commands/status.d.ts.map +1 -1
  77. package/dist/cli/commands/status.js +8 -9
  78. package/dist/cli/commands/status.js.map +1 -1
  79. package/dist/cli/commands/test-transport.d.ts +12 -5
  80. package/dist/cli/commands/test-transport.d.ts.map +1 -1
  81. package/dist/cli/commands/test-transport.js +15 -15
  82. package/dist/cli/commands/test-transport.js.map +1 -1
  83. package/dist/cli/index.js +13 -40
  84. package/dist/cli/index.js.map +1 -1
  85. package/dist/cli/output.d.ts +4 -0
  86. package/dist/cli/output.d.ts.map +1 -0
  87. package/dist/cli/output.js +9 -0
  88. package/dist/cli/output.js.map +1 -0
  89. package/dist/cli/socket-client.d.ts +7 -14
  90. package/dist/cli/socket-client.d.ts.map +1 -1
  91. package/dist/cli/socket-client.js +15 -38
  92. package/dist/cli/socket-client.js.map +1 -1
  93. package/dist/cli/transport.d.ts +53 -116
  94. package/dist/cli/transport.d.ts.map +1 -1
  95. package/dist/cli/transport.js +45 -295
  96. package/dist/cli/transport.js.map +1 -1
  97. package/dist/config.d.ts +24 -0
  98. package/dist/config.d.ts.map +1 -0
  99. package/dist/config.js +35 -0
  100. package/dist/config.js.map +1 -0
  101. package/dist/config.test-utils.d.ts +13 -0
  102. package/dist/config.test-utils.d.ts.map +1 -0
  103. package/dist/config.test-utils.js +46 -0
  104. package/dist/config.test-utils.js.map +1 -0
  105. package/dist/index.d.ts +3 -8
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +2 -12
  108. package/dist/index.js.map +1 -1
  109. package/dist/local-daemon-rpc.d.ts +259 -8
  110. package/dist/local-daemon-rpc.d.ts.map +1 -1
  111. package/dist/local-daemon-rpc.js +189 -12
  112. package/dist/local-daemon-rpc.js.map +1 -1
  113. package/dist/{runtime/local-history.d.ts → local-history.d.ts} +16 -21
  114. package/dist/local-history.d.ts.map +1 -0
  115. package/dist/{runtime/local-history.js → local-history.js} +16 -21
  116. package/dist/local-history.js.map +1 -0
  117. package/dist/local-paths.d.ts +0 -2
  118. package/dist/local-paths.d.ts.map +1 -1
  119. package/dist/local-paths.js +0 -4
  120. package/dist/local-paths.js.map +1 -1
  121. package/dist/local-socket-server.d.ts +22 -0
  122. package/dist/local-socket-server.d.ts.map +1 -0
  123. package/dist/{runtime/local-socket-server.js → local-socket-server.js} +4 -9
  124. package/dist/local-socket-server.js.map +1 -0
  125. package/dist/message-rendering.d.ts +3 -0
  126. package/dist/message-rendering.d.ts.map +1 -0
  127. package/dist/message-rendering.js +7 -0
  128. package/dist/message-rendering.js.map +1 -0
  129. package/dist/notification/__tests__/{snapshot-semantics.types-check.d.ts → subscribe-signatures.types-check.d.ts} +1 -1
  130. package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts.map +1 -0
  131. package/dist/notification/__tests__/subscribe-signatures.types-check.js +55 -0
  132. package/dist/notification/__tests__/subscribe-signatures.types-check.js.map +1 -0
  133. package/dist/notification/errors.d.ts +18 -6
  134. package/dist/notification/errors.d.ts.map +1 -1
  135. package/dist/notification/errors.js +13 -15
  136. package/dist/notification/errors.js.map +1 -1
  137. package/dist/notification/index.d.ts +5 -0
  138. package/dist/notification/index.d.ts.map +1 -0
  139. package/dist/notification/index.js +5 -0
  140. package/dist/notification/index.js.map +1 -0
  141. package/dist/notification/stream.d.ts +33 -49
  142. package/dist/notification/stream.d.ts.map +1 -1
  143. package/dist/notification/stream.js +33 -76
  144. package/dist/notification/stream.js.map +1 -1
  145. package/dist/pagination.d.ts +20 -10
  146. package/dist/pagination.d.ts.map +1 -1
  147. package/dist/pagination.js +8 -9
  148. package/dist/pagination.js.map +1 -1
  149. package/dist/profile.d.ts +92 -0
  150. package/dist/profile.d.ts.map +1 -0
  151. package/dist/profile.js +149 -0
  152. package/dist/profile.js.map +1 -0
  153. package/dist/refs.d.ts.map +1 -0
  154. package/dist/refs.js.map +1 -0
  155. package/dist/service-archive-purge.d.ts +2 -1
  156. package/dist/service-archive-purge.d.ts.map +1 -1
  157. package/dist/service-archive-purge.js.map +1 -1
  158. package/dist/{runtime/service-helpers.d.ts → service-helpers.d.ts} +5 -11
  159. package/dist/service-helpers.d.ts.map +1 -0
  160. package/dist/{runtime/service-helpers.js → service-helpers.js} +2 -9
  161. package/dist/service-helpers.js.map +1 -0
  162. package/dist/service-local-daemon.d.ts +22 -0
  163. package/dist/service-local-daemon.d.ts.map +1 -0
  164. package/dist/service-local-daemon.js +185 -0
  165. package/dist/service-local-daemon.js.map +1 -0
  166. package/dist/service.d.ts +65 -57
  167. package/dist/service.d.ts.map +1 -1
  168. package/dist/service.js +205 -156
  169. package/dist/service.js.map +1 -1
  170. package/dist/test-utils/channel-service-fixture.d.ts +3 -2
  171. package/dist/test-utils/channel-service-fixture.d.ts.map +1 -1
  172. package/dist/test-utils/channel-service-fixture.js.map +1 -1
  173. package/dist/test-utils/fake-service.d.ts +26 -18
  174. package/dist/test-utils/fake-service.d.ts.map +1 -1
  175. package/dist/test-utils/fake-service.js +28 -42
  176. package/dist/test-utils/fake-service.js.map +1 -1
  177. package/dist/test-utils/ids.d.ts +3 -1
  178. package/dist/test-utils/ids.d.ts.map +1 -1
  179. package/dist/test-utils/ids.js.map +1 -1
  180. package/dist/test-utils/index.d.ts +9 -2
  181. package/dist/test-utils/index.d.ts.map +1 -1
  182. package/dist/test-utils/index.js +8 -1
  183. package/dist/test-utils/index.js.map +1 -1
  184. package/dist/test-utils/standalone-provisioning.d.ts +17 -0
  185. package/dist/test-utils/standalone-provisioning.d.ts.map +1 -0
  186. package/dist/test-utils/standalone-provisioning.js +14 -0
  187. package/dist/test-utils/standalone-provisioning.js.map +1 -0
  188. package/dist/tsconfig.tsbuildinfo +1 -0
  189. package/package.json +49 -27
  190. package/dist/auth.test.d.ts +0 -2
  191. package/dist/auth.test.d.ts.map +0 -1
  192. package/dist/auth.test.js +0 -121
  193. package/dist/auth.test.js.map +0 -1
  194. package/dist/channel-core-context.test.d.ts +0 -2
  195. package/dist/channel-core-context.test.d.ts.map +0 -1
  196. package/dist/channel-core-context.test.js +0 -342
  197. package/dist/channel-core-context.test.js.map +0 -1
  198. package/dist/channel-core-dispatch.test.d.ts +0 -2
  199. package/dist/channel-core-dispatch.test.d.ts.map +0 -1
  200. package/dist/channel-core-dispatch.test.js +0 -557
  201. package/dist/channel-core-dispatch.test.js.map +0 -1
  202. package/dist/channel-core.test.d.ts +0 -2
  203. package/dist/channel-core.test.d.ts.map +0 -1
  204. package/dist/channel-core.test.js +0 -232
  205. package/dist/channel-core.test.js.map +0 -1
  206. package/dist/cli/__tests__/cli-multi-agent.int.test.d.ts +0 -2
  207. package/dist/cli/__tests__/cli-multi-agent.int.test.d.ts.map +0 -1
  208. package/dist/cli/__tests__/cli-multi-agent.int.test.js +0 -132
  209. package/dist/cli/__tests__/cli-multi-agent.int.test.js.map +0 -1
  210. package/dist/cli/commands/invite.d.ts +0 -7
  211. package/dist/cli/commands/invite.d.ts.map +0 -1
  212. package/dist/cli/commands/invite.js +0 -11
  213. package/dist/cli/commands/invite.js.map +0 -1
  214. package/dist/cli/commands/messages.test.d.ts +0 -2
  215. package/dist/cli/commands/messages.test.d.ts.map +0 -1
  216. package/dist/cli/commands/messages.test.js +0 -99
  217. package/dist/cli/commands/messages.test.js.map +0 -1
  218. package/dist/cli/commands/ping.d.ts +0 -7
  219. package/dist/cli/commands/ping.d.ts.map +0 -1
  220. package/dist/cli/commands/ping.js +0 -37
  221. package/dist/cli/commands/ping.js.map +0 -1
  222. package/dist/cli/commands/register.test.d.ts +0 -2
  223. package/dist/cli/commands/register.test.d.ts.map +0 -1
  224. package/dist/cli/commands/register.test.js +0 -91
  225. package/dist/cli/commands/register.test.js.map +0 -1
  226. package/dist/cli/commands/send.test.d.ts +0 -2
  227. package/dist/cli/commands/send.test.d.ts.map +0 -1
  228. package/dist/cli/commands/send.test.js +0 -59
  229. package/dist/cli/commands/send.test.js.map +0 -1
  230. package/dist/cli/commands/start.test.d.ts +0 -2
  231. package/dist/cli/commands/start.test.d.ts.map +0 -1
  232. package/dist/cli/commands/start.test.js +0 -624
  233. package/dist/cli/commands/start.test.js.map +0 -1
  234. package/dist/cli/commands/whoami.d.ts +0 -8
  235. package/dist/cli/commands/whoami.d.ts.map +0 -1
  236. package/dist/cli/commands/whoami.js +0 -28
  237. package/dist/cli/commands/whoami.js.map +0 -1
  238. package/dist/cli/config.d.ts +0 -66
  239. package/dist/cli/config.d.ts.map +0 -1
  240. package/dist/cli/config.js +0 -148
  241. package/dist/cli/config.js.map +0 -1
  242. package/dist/cli/config.test.d.ts +0 -2
  243. package/dist/cli/config.test.d.ts.map +0 -1
  244. package/dist/cli/config.test.js +0 -89
  245. package/dist/cli/config.test.js.map +0 -1
  246. package/dist/cli/http-client.d.ts +0 -17
  247. package/dist/cli/http-client.d.ts.map +0 -1
  248. package/dist/cli/http-client.js +0 -38
  249. package/dist/cli/http-client.js.map +0 -1
  250. package/dist/cli/profile.d.ts +0 -126
  251. package/dist/cli/profile.d.ts.map +0 -1
  252. package/dist/cli/profile.js +0 -231
  253. package/dist/cli/profile.js.map +0 -1
  254. package/dist/cli/profile.test.d.ts +0 -2
  255. package/dist/cli/profile.test.d.ts.map +0 -1
  256. package/dist/cli/profile.test.js +0 -369
  257. package/dist/cli/profile.test.js.map +0 -1
  258. package/dist/cli/transport.test.d.ts +0 -2
  259. package/dist/cli/transport.test.d.ts.map +0 -1
  260. package/dist/cli/transport.test.js +0 -312
  261. package/dist/cli/transport.test.js.map +0 -1
  262. package/dist/notification/__tests__/filter-equivalence.test.d.ts +0 -2
  263. package/dist/notification/__tests__/filter-equivalence.test.d.ts.map +0 -1
  264. package/dist/notification/__tests__/filter-equivalence.test.js +0 -123
  265. package/dist/notification/__tests__/filter-equivalence.test.js.map +0 -1
  266. package/dist/notification/__tests__/snapshot-semantics.test.d.ts +0 -2
  267. package/dist/notification/__tests__/snapshot-semantics.test.d.ts.map +0 -1
  268. package/dist/notification/__tests__/snapshot-semantics.test.js +0 -261
  269. package/dist/notification/__tests__/snapshot-semantics.test.js.map +0 -1
  270. package/dist/notification/__tests__/snapshot-semantics.types-check.d.ts.map +0 -1
  271. package/dist/notification/__tests__/snapshot-semantics.types-check.js +0 -62
  272. package/dist/notification/__tests__/snapshot-semantics.types-check.js.map +0 -1
  273. package/dist/pagination.test.d.ts +0 -2
  274. package/dist/pagination.test.d.ts.map +0 -1
  275. package/dist/pagination.test.js +0 -72
  276. package/dist/pagination.test.js.map +0 -1
  277. package/dist/runtime/close-info.d.ts +0 -84
  278. package/dist/runtime/close-info.d.ts.map +0 -1
  279. package/dist/runtime/close-info.js +0 -102
  280. package/dist/runtime/close-info.js.map +0 -1
  281. package/dist/runtime/close-info.test.d.ts +0 -2
  282. package/dist/runtime/close-info.test.d.ts.map +0 -1
  283. package/dist/runtime/close-info.test.js +0 -109
  284. package/dist/runtime/close-info.test.js.map +0 -1
  285. package/dist/runtime/errors.d.ts +0 -11
  286. package/dist/runtime/errors.d.ts.map +0 -1
  287. package/dist/runtime/errors.js +0 -41
  288. package/dist/runtime/errors.js.map +0 -1
  289. package/dist/runtime/errors.test.d.ts +0 -2
  290. package/dist/runtime/errors.test.d.ts.map +0 -1
  291. package/dist/runtime/errors.test.js +0 -79
  292. package/dist/runtime/errors.test.js.map +0 -1
  293. package/dist/runtime/frame.d.ts +0 -8
  294. package/dist/runtime/frame.d.ts.map +0 -1
  295. package/dist/runtime/frame.js +0 -12
  296. package/dist/runtime/frame.js.map +0 -1
  297. package/dist/runtime/frame.test.d.ts +0 -2
  298. package/dist/runtime/frame.test.d.ts.map +0 -1
  299. package/dist/runtime/frame.test.js +0 -59
  300. package/dist/runtime/frame.test.js.map +0 -1
  301. package/dist/runtime/index.d.ts +0 -10
  302. package/dist/runtime/index.d.ts.map +0 -1
  303. package/dist/runtime/index.js +0 -9
  304. package/dist/runtime/index.js.map +0 -1
  305. package/dist/runtime/local-history.d.ts.map +0 -1
  306. package/dist/runtime/local-history.js.map +0 -1
  307. package/dist/runtime/local-service-commands.d.ts +0 -26
  308. package/dist/runtime/local-service-commands.d.ts.map +0 -1
  309. package/dist/runtime/local-service-commands.js +0 -29
  310. package/dist/runtime/local-service-commands.js.map +0 -1
  311. package/dist/runtime/local-socket-server.d.ts +0 -20
  312. package/dist/runtime/local-socket-server.d.ts.map +0 -1
  313. package/dist/runtime/local-socket-server.js.map +0 -1
  314. package/dist/runtime/refs.d.ts.map +0 -1
  315. package/dist/runtime/refs.js.map +0 -1
  316. package/dist/runtime/runtime.test.d.ts +0 -2
  317. package/dist/runtime/runtime.test.d.ts.map +0 -1
  318. package/dist/runtime/runtime.test.js +0 -37
  319. package/dist/runtime/runtime.test.js.map +0 -1
  320. package/dist/runtime/service-helpers.d.ts.map +0 -1
  321. package/dist/runtime/service-helpers.js.map +0 -1
  322. package/dist/runtime/service-teardown.d.ts +0 -5
  323. package/dist/runtime/service-teardown.d.ts.map +0 -1
  324. package/dist/runtime/service-teardown.js +0 -36
  325. package/dist/runtime/service-teardown.js.map +0 -1
  326. package/dist/runtime/service-teardown.test.d.ts +0 -2
  327. package/dist/runtime/service-teardown.test.d.ts.map +0 -1
  328. package/dist/runtime/service-teardown.test.js +0 -80
  329. package/dist/runtime/service-teardown.test.js.map +0 -1
  330. package/dist/runtime/subscribers.d.ts +0 -152
  331. package/dist/runtime/subscribers.d.ts.map +0 -1
  332. package/dist/runtime/subscribers.js +0 -222
  333. package/dist/runtime/subscribers.js.map +0 -1
  334. package/dist/service-socket-path.test.d.ts +0 -2
  335. package/dist/service-socket-path.test.d.ts.map +0 -1
  336. package/dist/service-socket-path.test.js +0 -87
  337. package/dist/service-socket-path.test.js.map +0 -1
  338. package/dist/service.test.d.ts +0 -2
  339. package/dist/service.test.d.ts.map +0 -1
  340. package/dist/service.test.js +0 -796
  341. package/dist/service.test.js.map +0 -1
  342. package/dist/test/index.d.ts +0 -47
  343. package/dist/test/index.d.ts.map +0 -1
  344. package/dist/test/index.js +0 -39
  345. package/dist/test/index.js.map +0 -1
  346. package/dist/test-utils/conformance-adapter.d.ts +0 -40
  347. package/dist/test-utils/conformance-adapter.d.ts.map +0 -1
  348. package/dist/test-utils/conformance-adapter.js +0 -250
  349. package/dist/test-utils/conformance-adapter.js.map +0 -1
  350. package/dist/tm-client-test-support.d.ts +0 -184
  351. package/dist/tm-client-test-support.d.ts.map +0 -1
  352. package/dist/tm-client-test-support.js +0 -466
  353. package/dist/tm-client-test-support.js.map +0 -1
  354. package/dist/tm-client.d.ts +0 -269
  355. package/dist/tm-client.d.ts.map +0 -1
  356. package/dist/tm-client.js +0 -518
  357. package/dist/tm-client.js.map +0 -1
  358. package/dist/tm-client.test.d.ts +0 -2
  359. package/dist/tm-client.test.d.ts.map +0 -1
  360. package/dist/tm-client.test.js +0 -490
  361. package/dist/tm-client.test.js.map +0 -1
  362. /package/dist/{runtime/refs.d.ts → refs.d.ts} +0 -0
  363. /package/dist/{runtime/refs.js → refs.js} +0 -0
@@ -1,19 +1,22 @@
1
- import { Data, Effect, HashMap, Option, ParseResult, Schema } from "effect";
2
- import { renderPart } from "./service-helpers.js";
1
+ import { AgentId } from "@moltzap/protocol/identity";
2
+ import { ConversationId, MessageId } from "@moltzap/protocol/conversation";
3
+ import { TaskId } from "@moltzap/protocol/task";
4
+ import { HashMap, Option, Schema } from "effect";
5
+ import { renderPart } from "./message-rendering.js";
3
6
  const DEFAULT_HISTORY_LIMIT = 10;
4
7
  const MAX_HISTORY_LIMIT = 100;
5
8
  const HistoryLimit = Schema.Number.pipe(Schema.int(), Schema.between(1, MAX_HISTORY_LIMIT));
6
9
  const HistoryRequestSchema = Schema.Struct({
7
- taskId: Schema.String.pipe(Schema.minLength(1)),
8
- conversationId: Schema.String.pipe(Schema.minLength(1)),
10
+ taskId: TaskId,
11
+ conversationId: ConversationId,
9
12
  limit: Schema.optionalWith(HistoryLimit, {
10
13
  default: () => DEFAULT_HISTORY_LIMIT,
11
14
  }),
12
15
  sessionKey: Schema.optional(Schema.String),
13
16
  });
14
17
  const HistoryMessageSummarySchema = Schema.Struct({
15
- id: Schema.String,
16
- senderId: Schema.String,
18
+ id: MessageId,
19
+ senderId: AgentId,
17
20
  senderName: Schema.String,
18
21
  isOwn: Schema.Boolean,
19
22
  text: Schema.String,
@@ -27,13 +30,14 @@ const ConversationMetadataSchema = Schema.Struct({
27
30
  }))),
28
31
  });
29
32
  const HistoryConversationMetaSchema = Schema.Struct({
30
- id: Schema.String,
33
+ id: ConversationId,
31
34
  name: Schema.optional(Schema.String),
32
- createdBy: Schema.String,
35
+ createdBy: AgentId,
33
36
  metadata: Schema.optional(ConversationMetadataSchema),
34
37
  lastMessageTimestamp: Schema.optional(Schema.String),
35
38
  createdAt: Schema.String,
36
39
  updatedAt: Schema.String,
40
+ archivedAt: Schema.optional(Schema.String),
37
41
  });
38
42
  const HistoryResponseSchema = Schema.Struct({
39
43
  messages: Schema.Array(HistoryMessageSummarySchema),
@@ -41,20 +45,11 @@ const HistoryResponseSchema = Schema.Struct({
41
45
  conversationMeta: Schema.optional(HistoryConversationMetaSchema),
42
46
  newCount: Schema.Number.pipe(Schema.int(), Schema.nonNegative()),
43
47
  });
44
- export class HistoryRequestInputError extends Data.TaggedError("HistoryRequestInputError") {
48
+ export function historyRequestSchema() {
49
+ return HistoryRequestSchema;
45
50
  }
46
- const formatParseError = (error) => ParseResult.TreeFormatter.formatErrorSync(error);
47
- const formatParseCause = (cause) => ParseResult.isParseError(cause) ? formatParseError(cause) : String(cause);
48
- const decodeHistoryRequestSync = Schema.decodeUnknownSync(HistoryRequestSchema);
49
- export const decodeHistoryResponse = (value) => Schema.decodeUnknown(HistoryResponseSchema)(value);
50
- export function decodeHistoryRequest(params) {
51
- return Effect.try({
52
- try: () => decodeHistoryRequestSync(params),
53
- catch: (cause) => new HistoryRequestInputError({
54
- message: `invalid history request: ${formatParseCause(cause)}`,
55
- cause,
56
- }),
57
- }).pipe(Effect.withSpan("decodeHistoryRequest"));
51
+ export function historyResponseSchema() {
52
+ return HistoryResponseSchema;
58
53
  }
59
54
  export function formatHistoryMessage(message, options) {
60
55
  const senderName = Option.getOrElse(HashMap.get(options.agentNames, message.senderId), () => message.senderId);
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AAS,CACjC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,EACjD,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CACvB,CAAC;IACF,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,UAAU,CAAC;IACtD,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU;QACtC,KAAK;QACL,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC7C,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK;KAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,WAGC,EACD,OAAuB;IAEvB,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS;QAAE,OAAO,IAAI,GAAG,EAAU,CAAC;IAC/D,OAAO,MAAM,CAAC,SAAS,CACrB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CACvE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,CAC7C,EACD,GAAG,EAAE,CAAC,IAAI,GAAG,EAAiC,CAC/C,CAAC;AACJ,CAAC"}
@@ -2,6 +2,4 @@ export declare const getMoltZapConfigDir: () => string;
2
2
  export declare const getMoltZapConfigPath: () => string;
3
3
  export declare const getMoltZapServiceSocketPath: () => string;
4
4
  export declare const getMoltZapAgentServiceSocketPath: (agentId: string) => string;
5
- export declare const getOpenClawConfigDir: () => string;
6
- export declare const getOpenClawConfigPath: () => string;
7
5
  //# sourceMappingURL=local-paths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-paths.d.ts","sourceRoot":"","sources":["../src/local-paths.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,mBAAmB,QAAO,MACK,CAAC;AAE7C,eAAO,MAAM,oBAAoB,QAAO,MACgC,CAAC;AAEzE,eAAO,MAAM,2BAA2B,QAAO,MAC+B,CAAC;AAE/E,eAAO,MAAM,gCAAgC,GAAI,SAAS,MAAM,KAAG,MACY,CAAC;AAEhF,eAAO,MAAM,oBAAoB,QAAO,MAC4B,CAAC;AAErE,eAAO,MAAM,qBAAqB,QAAO,MAGtC,CAAC"}
1
+ {"version":3,"file":"local-paths.d.ts","sourceRoot":"","sources":["../src/local-paths.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,mBAAmB,QAAO,MACK,CAAC;AAE7C,eAAO,MAAM,oBAAoB,QAAO,MACgC,CAAC;AAEzE,eAAO,MAAM,2BAA2B,QAAO,MAC+B,CAAC;AAE/E,eAAO,MAAM,gCAAgC,GAAI,SAAS,MAAM,KAAG,MACY,CAAC"}
@@ -1,9 +1,7 @@
1
1
  import { Path } from "@effect/platform";
2
2
  import { Config, ConfigProvider, Effect, Option } from "effect";
3
3
  const MOLTZAP_DIR_NAME = ".moltzap";
4
- const OPENCLAW_DIR_NAME = ".openclaw";
5
4
  const CONFIG_FILE_NAME = "config.json";
6
- const OPENCLAW_CONFIG_FILE_NAME = "openclaw.json";
7
5
  const SERVICE_SOCKET_FILE_NAME = "service.sock";
8
6
  const ConfigHome = Config.option(Config.string("MOLTZAP_CONFIG_HOME"));
9
7
  const HomeDir = Config.string("HOME").pipe(Config.orElse(() => Config.string("USERPROFILE")));
@@ -15,6 +13,4 @@ export const getMoltZapConfigDir = () => getConfigHomeSync() ?? getMoltZapHomeDi
15
13
  export const getMoltZapConfigPath = () => pathSync((path) => path.join(getMoltZapConfigDir(), CONFIG_FILE_NAME));
16
14
  export const getMoltZapServiceSocketPath = () => pathSync((path) => path.join(getMoltZapHomeDir(), SERVICE_SOCKET_FILE_NAME));
17
15
  export const getMoltZapAgentServiceSocketPath = (agentId) => pathSync((path) => path.join(getMoltZapHomeDir(), `service-${agentId}.sock`));
18
- export const getOpenClawConfigDir = () => pathSync((path) => path.join(getHomeDirSync(), OPENCLAW_DIR_NAME));
19
- export const getOpenClawConfigPath = () => pathSync((path) => path.join(getOpenClawConfigDir(), OPENCLAW_CONFIG_FILE_NAME));
20
16
  //# sourceMappingURL=local-paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-paths.js","sourceRoot":"","sources":["../src/local-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhE,MAAM,gBAAgB,GAAG,UAAU,CAAC;AACpC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AACtC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AACvC,MAAM,yBAAyB,GAAG,eAAe,CAAC;AAClD,MAAM,wBAAwB,GAAG,cAAc,CAAC;AAEhD,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC;AACvE,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CACxC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAClD,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAuB,EAAE,CACjD,MAAM,CAAC,cAAc,CACnB,MAAM,CAAC,OAAO,CACZ,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,kBAA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
4
+ type LocalDaemonHandlers = RpcGroup.HandlersFrom<RpcGroup.Rpcs<typeof LocalDaemonRpcs>>;
5
+ interface LocalSocketServerOptions<Handlers extends LocalDaemonHandlers = LocalDaemonHandlers> {
6
+ readonly socketPath: string;
7
+ readonly defaultSocketPath: string;
8
+ readonly handlers: Handlers;
9
+ }
10
+ export interface RunningLocalSocketServer {
11
+ readonly socketScope: Scope.CloseableScope;
12
+ readonly socketPath: string;
13
+ }
14
+ interface StopLocalSocketServerOptions {
15
+ readonly socketScope: Scope.CloseableScope | null;
16
+ readonly socketPath: string;
17
+ readonly defaultSocketPath: string;
18
+ }
19
+ export declare function startLocalSocketServer<Handlers extends LocalDaemonHandlers>(options: LocalSocketServerOptions<Handlers>): Effect.Effect<RunningLocalSocketServer, unknown, never>;
20
+ export declare function stopLocalSocketServer(options: StopLocalSocketServerOptions): Effect.Effect<void, never>;
21
+ export {};
22
+ //# sourceMappingURL=local-socket-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-socket-server.d.ts","sourceRoot":"","sources":["../src/local-socket-server.ts"],"names":[],"mappings":"AAIA,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,MAAM,EAAuB,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAsB,MAAM,uBAAuB,CAAC;AAK5E,KAAK,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAC9C,QAAQ,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CACtC,CAAC;AAEF,UAAU,wBAAwB,CAChC,QAAQ,SAAS,mBAAmB,GAAG,mBAAmB;IAE1D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,UAAU,4BAA4B;IACpC,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAgGD,wBAAgB,sBAAsB,CAAC,QAAQ,SAAS,mBAAmB,EACzE,OAAO,EAAE,wBAAwB,CAAC,QAAQ,CAAC,GAC1C,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE,OAAO,EAAE,KAAK,CAAC,CAczD;AAqCD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAc5B"}
@@ -4,12 +4,11 @@ import { NodeContext } from "@effect/platform-node";
4
4
  import * as NodeSocketServer from "@effect/platform-node/NodeSocketServer";
5
5
  import { RpcSerialization, RpcServer } from "@effect/rpc";
6
6
  import { Effect, Either, Exit, Layer, Scope } from "effect";
7
- import { LocalDaemonRpcs, } from "../local-daemon-rpc.js";
7
+ import { LocalDaemonRpcs, toLocalDaemonError } from "./local-daemon-rpc.js";
8
8
  const SOCKET_FILE_MODE = 0o600;
9
9
  function logFileSystemIssue(level, message, error) {
10
10
  return (level === "warn" ? Effect.logWarning : Effect.logInfo)(message, error);
11
11
  }
12
- const errorMessage = (error) => error instanceof Error ? error.message : String(error);
13
12
  function closeScope(scope) {
14
13
  return Scope.close(scope, Exit.succeed(undefined));
15
14
  }
@@ -28,13 +27,8 @@ function prepareSocketPath(socketPath) {
28
27
  function makeSocketServer(socketPath, socketScope) {
29
28
  return NodeSocketServer.make({ path: socketPath }).pipe(Scope.extend(socketScope), Effect.tapError(() => closeScope(socketScope)));
30
29
  }
31
- function buildHandlerLayer(options) {
32
- return LocalDaemonRpcs.toLayer({
33
- LocalDaemonCall: ({ method, params }) => options.handleRequest(method, params).pipe(Effect.mapError(errorMessage)),
34
- });
35
- }
36
30
  function buildSocketRpcLayer(server, socketScope, options) {
37
- const rpcLayer = RpcServer.layer(LocalDaemonRpcs).pipe(Layer.provide(buildHandlerLayer(options)), Layer.provide(RpcServer.layerProtocolSocketServer), Layer.provide(RpcSerialization.layerNdjson), Layer.provide(Layer.succeed(SocketServer.SocketServer, server)));
31
+ const rpcLayer = RpcServer.layer(LocalDaemonRpcs).pipe(Layer.provide(LocalDaemonRpcs.toLayer(LocalDaemonRpcs.of(options.handlers)).pipe(Layer.mapError(toLocalDaemonError))), Layer.provide(RpcServer.layerProtocolSocketServer), Layer.provide(RpcSerialization.layerNdjson), Layer.provide(Layer.succeed(SocketServer.SocketServer, server)));
38
32
  return Layer.build(rpcLayer).pipe(Scope.extend(socketScope), Effect.tapError(() => closeScope(socketScope)));
39
33
  }
40
34
  function chmodSocketPath(socketPath) {
@@ -52,7 +46,7 @@ function installDefaultSocketSymlink(options) {
52
46
  });
53
47
  }
54
48
  export function startLocalSocketServer(options) {
55
- return Effect.gen(function* () {
49
+ const effect = Effect.gen(function* () {
56
50
  yield* prepareSocketPath(options.socketPath);
57
51
  const socketScope = yield* Scope.make();
58
52
  const server = yield* makeSocketServer(options.socketPath, socketScope);
@@ -61,6 +55,7 @@ export function startLocalSocketServer(options) {
61
55
  yield* installDefaultSocketSymlink(options);
62
56
  return { socketScope, socketPath: options.socketPath };
63
57
  }).pipe(Effect.withSpan("startLocalSocketServer"), Effect.provide(NodeContext.layer));
58
+ return effect;
64
59
  }
65
60
  function removeSocketPath(socketPath) {
66
61
  return FileSystem.FileSystem.pipe(Effect.flatMap((fileSystem) => fileSystem.remove(socketPath, { force: true })), Effect.catchAll((error) => logFileSystemIssue("info", "unlink socket path", error)));
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-socket-server.js","sourceRoot":"","sources":["../src/local-socket-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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yB,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;YACrD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK;YACnB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,CAAC,UAAU;SACjD,CAAC,CAAC;QACH,IAAI,CAAC,yBAAyB;YAAE,OAAO;QACvC,KAAK,CAAC,CAAC,UAAU;aACd,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;aAClD,IAAI,CACH,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CACxB,kBAAkB,CAAC,MAAM,EAAE,yBAAyB,EAAE,KAAK,CAAC,CAC7D,CACF,CAAC;IACN,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,OAAqC;IAErC,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QACzB,IAAI,OAAO,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;YACjC,KAAK,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACzC,CAAC;QACD,KAAK,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC5C,KAAK,CAAC,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EACxC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,EACjC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CACxB,kBAAkB,CAAC,MAAM,EAAE,yBAAyB,EAAE,KAAK,CAAC,CAC7D,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Part } from "@moltzap/protocol/message";
2
+ export declare const renderPart: (part: Part) => string;
3
+ //# sourceMappingURL=message-rendering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-rendering.d.ts","sourceRoot":"","sources":["../src/message-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGtD,eAAO,MAAM,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAMxC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Match } from "effect";
2
+ export const renderPart = Match.type().pipe(Match.discriminatorsExhaustive("type")({
3
+ text: (text) => text.text,
4
+ image: () => "[image]",
5
+ file: (file) => `[file: ${file.name}]`,
6
+ }));
7
+ //# sourceMappingURL=message-rendering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-rendering.js","sourceRoot":"","sources":["../src/message-rendering.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,MAAM,CAAC,MAAM,UAAU,GAA2B,KAAK,CAAC,IAAI,EAAQ,CAAC,IAAI,CACvE,KAAK,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI;IACzB,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS;IACtB,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,IAAI,CAAC,IAAI,GAAG;CACvC,CAAC,CACH,CAAC"}
@@ -1,3 +1,3 @@
1
1
  declare const _adhoc_phantom_canary_ref: unknown;
2
2
  export { _adhoc_phantom_canary_ref };
3
- //# sourceMappingURL=snapshot-semantics.types-check.d.ts.map
3
+ //# sourceMappingURL=subscribe-signatures.types-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscribe-signatures.types-check.d.ts","sourceRoot":"","sources":["../../../src/notification/__tests__/subscribe-signatures.types-check.ts"],"names":[],"mappings":"AAsJA,QAAA,MAAM,yBAAyB,EAAE,OAAsB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Type-canary for the `subscribe` / `subscribeAll` public signatures.
3
+ *
4
+ * Compile-time assertions only — `tsc --build` picks this file up via the
5
+ * package's vitest config glob, but it has no runtime test bodies. Any
6
+ * drift in the `subscribe` / `subscribeAll` signatures, or in the Stream
7
+ * lifecycle contract they expose, surfaces as a TypeScript error here.
8
+ *
9
+ * The runtime companions live in `filter-equivalence.test.ts` (the
10
+ * type-guard overload's payload narrowing) and `snapshot-semantics.test.ts`
11
+ * (Stream-cancellation snapshot semantics).
12
+ */
13
+ import { Stream } from "effect";
14
+ import { subscribe, subscribeAll } from "../stream.js";
15
+ // Phantom value-level pin: passing a Canary alias forces tsc to resolve
16
+ // the alias; a `false` resolution fires TS2344 because `false` is not
17
+ // assignable to the `true` constraint.
18
+ function assertCanary() {
19
+ // intentionally empty: type-level pin
20
+ }
21
+ // Canary #1b — the user-defined-type-guard overload exists and resolves at
22
+ // call sites. Validated by compilation of a concrete `subscribe(def,
23
+ // type-guard)` call: the third-argument `params is R` shape must match the
24
+ // overload in `stream.ts`.
25
+ import { TaskFailedNotificationDefinition } from "@moltzap/protocol/task";
26
+ const _canary1bStream = subscribe(_canary1bRegistry, TaskFailedNotificationDefinition, _canary1bIsRetryable);
27
+ const _ad1Canary3Helper = () => Stream.runForEach(_subStreamForCanary, _handlerForCanary);
28
+ // Phantom value-level call sites: pin each Canary alias as used and let
29
+ // knip/oxlint see the file as fully reachable. tsc never invokes
30
+ // `_ad1Canaries`; the canary alias resolutions happen at type-check time
31
+ // inside the function body.
32
+ function _ad1Canaries() {
33
+ assertCanary();
34
+ assertCanary();
35
+ assertCanary();
36
+ assertCanary();
37
+ assertCanary();
38
+ assertCanary();
39
+ // Force the runtime-shape value declarations to be used (otherwise tsc
40
+ // warns even on `declare const`). Also exercises a real call into
41
+ // `Stream.runForEach` to keep Canary #3's premise grounded.
42
+ Stream.runForEach(_subStreamForCanary, _handlerForCanary);
43
+ _ad1Canary3Helper();
44
+ // Touch `_canary1bStream` so tsc keeps the canary-call expression alive
45
+ // (the `Equal<>` assertion + the assignment below force the overload to
46
+ // resolve at compile time).
47
+ const _touch1b = _canary1bStream;
48
+ if (false)
49
+ _touch1b;
50
+ }
51
+ // Discard return so module-level `_ad1Canaries` is read; an assignment to
52
+ // `_` satisfies the linter without invoking the function.
53
+ const _adhoc_phantom_canary_ref = _ad1Canaries;
54
+ export { _adhoc_phantom_canary_ref };
55
+ //# sourceMappingURL=subscribe-signatures.types-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscribe-signatures.types-check.js","sourceRoot":"","sources":["../../../src/notification/__tests__/subscribe-signatures.types-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAShC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQvD,wEAAwE;AACxE,sEAAsE;AACtE,uCAAuC;AACvC,SAAS,YAAY;IACnB,sCAAsC;AACxC,CAAC;AAQD,2EAA2E;AAC3E,qEAAqE;AACrE,2EAA2E;AAC3E,2BAA2B;AAC3B,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAc1E,MAAM,eAAe,GAAG,SAAS,CAC/B,iBAAiB,EACjB,gCAAgC,EAChC,oBAAoB,CACrB,CAAC;AA8CF,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAC7B,MAAM,CAAC,UAAU,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AAe5D,wEAAwE;AACxE,iEAAiE;AACjE,yEAAyE;AACzE,4BAA4B;AAC5B,SAAS,YAAY;IACnB,YAAY,EAAmC,CAAC;IAChD,YAAY,EAAsC,CAAC;IACnD,YAAY,EAAiC,CAAC;IAC9C,YAAY,EAAmC,CAAC;IAChD,YAAY,EAA6C,CAAC;IAC1D,YAAY,EAA6B,CAAC;IAC1C,uEAAuE;IACvE,kEAAkE;IAClE,4DAA4D;IAC5D,MAAM,CAAC,UAAU,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;IAC1D,iBAAiB,EAAE,CAAC;IACpB,wEAAwE;IACxE,wEAAwE;IACxE,4BAA4B;IAC5B,MAAM,QAAQ,GAA2B,eAAe,CAAC;IACzD,IAAI,KAAgB;QAAE,QAAQ,CAAC;AACjC,CAAC;AACD,0EAA0E;AAC1E,0DAA0D;AAC1D,MAAM,yBAAyB,GAAY,YAAY,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -1,27 +1,39 @@
1
- declare const TimeoutError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2
- readonly _tag: "TimeoutError";
1
+ declare const NotificationTimeoutError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
2
+ readonly _tag: "NotificationTimeoutError";
3
3
  } & Readonly<A>;
4
- export declare class TimeoutError extends TimeoutError_base<{
4
+ export declare class NotificationTimeoutError extends NotificationTimeoutError_base<{
5
5
  readonly definition: string;
6
6
  readonly durationMs: number;
7
7
  }> {
8
8
  }
9
+ /**
10
+ * Why a notification Stream terminated without a `NotificationTimeoutError`:
11
+ *
12
+ * - `"client-closed"` — `MoltZapWsClient.close()` tore the transport down
13
+ * (the registry's `closeAll` fired each subscription's `onClose`).
14
+ * - `"stream-completed"` — the Stream source completed normally with no
15
+ * further frames pending (graceful end-of-stream, not an error condition).
16
+ * - `"transport-disconnected"` — the transport dropped and is NOT going to
17
+ * reconnect (terminal disconnect), so no further frames can arrive.
18
+ */
19
+ export type StreamCloseReason = "client-closed" | "stream-completed" | "transport-disconnected";
9
20
  declare const StreamClosedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
10
21
  readonly _tag: "StreamClosedError";
11
22
  } & Readonly<A>;
12
23
  export declare class StreamClosedError extends StreamClosedError_base<{
13
24
  readonly definition: string;
25
+ readonly reason: StreamCloseReason;
14
26
  }> {
15
27
  }
16
28
  /**
17
29
  * Union of all notification consumer error tags. Catch sites use
18
- * `Effect.catchTags({ TimeoutError: ..., StreamClosedError: ... })` for
19
- * exhaustive handling, or accept this union in their typed error channel.
30
+ * `Effect.catchTags({ NotificationTimeoutError: ..., StreamClosedError: ... })`
31
+ * for exhaustive handling, or accept this union in their typed error channel.
20
32
  *
21
33
  * NOT a class — Effect's `Data.TaggedError` classes do not inherit from
22
34
  * a shared `Data.TaggedError` base in a way that preserves `_tag`
23
35
  * discrimination. The union is the canonical shape.
24
36
  */
25
- export type NotificationConsumerError = TimeoutError | StreamClosedError;
37
+ export type NotificationConsumerError = NotificationTimeoutError | StreamClosedError;
26
38
  export {};
27
39
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/notification/errors.ts"],"names":[],"mappings":";;;AAoBA,qBAAa,YAAa,SAAQ,kBAAiC;IACjE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;CAAG;;;;AAEL,qBAAa,iBAAkB,SAAQ,uBAAsC;IAC3E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;CAAG;AAEL;;;;;;;;GAQG;AACH,MAAM,MAAM,yBAAyB,GAAG,YAAY,GAAG,iBAAiB,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/notification/errors.ts"],"names":[],"mappings":";;;AAkBA,qBAAa,wBAAyB,SAAQ,8BAE5C;IACA,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;CAAG;AAEL;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GACzB,eAAe,GACf,kBAAkB,GAClB,wBAAwB,CAAC;;;;AAE7B,qBAAa,iBAAkB,SAAQ,uBAAsC;IAC3E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;CACpC,CAAC;CAAG;AAEL;;;;;;;;GAQG;AACH,MAAM,MAAM,yBAAyB,GACjC,wBAAwB,GACxB,iBAAiB,CAAC"}
@@ -1,23 +1,21 @@
1
1
  /**
2
- * Tagged errors for the notification consumption surface (Spec B, #596).
2
+ * Tagged errors for the notification consumption surface.
3
3
  *
4
- * Per architect-revision r1 (codex review finding #8): `Data.TaggedError`
5
- * classes do NOT compose via class inheritance — extending one tagged
6
- * class from another produces broken `_tag` discrimination at runtime.
7
- * The shared abstraction is therefore a TYPE UNION (`NotificationConsumerError`)
8
- * not a base class. Catch sites that want to handle "any notification
9
- * consumer error" pattern-match on the union.
4
+ * `Data.TaggedError` classes do NOT compose via class inheritance —
5
+ * extending one tagged class from another produces broken `_tag`
6
+ * discrimination at runtime. The shared abstraction is therefore a TYPE
7
+ * UNION (`NotificationConsumerError`) not a base class. Catch sites that
8
+ * want to handle "any notification consumer error" pattern-match on the
9
+ * union.
10
10
  *
11
- * `TimeoutError` carries the timeout duration so callers can log + retry
12
- * with sane backoff. `StreamClosedError` fires when the consumer's Stream
13
- * completes empty (e.g. the client transitioned to terminal closed state
14
- * before a notification arrived).
15
- *
16
- * **Architect stub** (Spec B). Impl-staff fills any helper combinators
17
- * (`isTimeoutError`, mapping helpers) per downstream consumer needs.
11
+ * `NotificationTimeoutError` carries the timeout duration so callers can
12
+ * log + retry with sane backoff. `StreamClosedError` fires when the
13
+ * consumer's Stream completes empty (e.g. the client transitioned to
14
+ * terminal closed state before a notification arrived); its `reason`
15
+ * discriminant names WHICH close-state ended the Stream.
18
16
  */
19
17
  import { Data } from "effect";
20
- export class TimeoutError extends Data.TaggedError("TimeoutError") {
18
+ export class NotificationTimeoutError extends Data.TaggedError("NotificationTimeoutError") {
21
19
  }
22
20
  export class StreamClosedError extends Data.TaggedError("StreamClosedError") {
23
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/notification/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,OAAO,YAAa,SAAQ,IAAI,CAAC,WAAW,CAAC,cAAc,CAG/D;CAAG;AAEL,MAAM,OAAO,iBAAkB,SAAQ,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAEzE;CAAG"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/notification/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,OAAO,wBAAyB,SAAQ,IAAI,CAAC,WAAW,CAC5D,0BAA0B,CAI1B;CAAG;AAiBL,MAAM,OAAO,iBAAkB,SAAQ,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAGzE;CAAG"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @file Notification consumer helpers for `@moltzap/client/notification`.
3
+ */
4
+ export { NotificationTimeoutError, StreamClosedError as NotificationStreamClosedError, type StreamCloseReason, type NotificationConsumerError, } from "./errors.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notification/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,wBAAwB,EACxB,iBAAiB,IAAI,6BAA6B,EAClD,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,MAAM,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @file Notification consumer helpers for `@moltzap/client/notification`.
3
+ */
4
+ export { NotificationTimeoutError, StreamClosedError as NotificationStreamClosedError, } from "./errors.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/notification/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,wBAAwB,EACxB,iBAAiB,IAAI,6BAA6B,GAGnD,MAAM,aAAa,CAAC"}
@@ -1,21 +1,19 @@
1
1
  /**
2
2
  * Stream-returning constructors for `MoltZapAgentClient.subscribe` and
3
- * `MoltZapAgentClient.subscribeAll` (Spec B, #596).
3
+ * `MoltZapAgentClient.subscribeAll`.
4
4
  *
5
- * Architect decision **AD1 — path (a)**: trust `Stream.async` cancellation
6
- * to drive registry-stored `unregister` finalizer. The registry's
7
- * `dispatch` snapshots `subsRef` at iteration start, so the spec #222
8
- * §5.3 OQ-3 snapshot semantic is preserved by Ref atomicity without an
9
- * additional per-sub cancelled-flag check (architect plan §3).
5
+ * `Stream.async` cancellation drives the registry-stored `unregister`
6
+ * finalizer. The registry's `dispatch` snapshots `subsRef` at iteration
7
+ * start, so the snapshot semantic holds by Ref atomicity without a
8
+ * per-sub cancelled-flag check.
10
9
  *
11
- * Stream construction uses `Stream.async<DecodedNotification<D>, NotConnectedError>`
12
- * with the registry storing typed callback references — NOT `Queue` of
13
- * `Take` items combined with `Stream.fromQueue`/`Stream.flattenTake`,
14
- * which codex empirically verified is racy under
15
- * `Queue.offer(Take.fail); Queue.shutdown` and does not reliably propagate
16
- * the typed failure to the consumer (architect plan §3.2, codex r4).
10
+ * Stream construction uses `Stream.async&lt;NotificationParamsOf&lt;D>,
11
+ * NotConnectedError>` with the registry storing typed callback references — NOT
12
+ * `Queue` of `Take` items combined with `Stream.fromQueue`/`Stream.flattenTake`,
13
+ * which is racy under `Queue.offer(Take.fail); Queue.shutdown` and does not
14
+ * reliably propagate the typed failure to the consumer.
17
15
  *
18
- * Stream lifecycle (architect-mandated, spec §"Stream lifecycle contract"):
16
+ * Stream lifecycle:
19
17
  * 1. `subscribe(def)` returns a Stream value. Pure; no I/O, no scope.
20
18
  * 2. Materialization opens the `Stream.async` source: `registry.register`
21
19
  * runs synchronously, callbacks are installed; consumer pulls suspend
@@ -23,29 +21,35 @@
23
21
  * 3. Pre-`connect()` consumer pulls suspend inside `Stream.async`'s
24
22
  * internal queue. No `NotConnectedError` until terminal close.
25
23
  * 4. Reconnect leaves registry callbacks intact; `subsRef` survives
26
- * transient disconnects (preserved invariant).
24
+ * transient disconnects. **Reconnect-window
25
+ * frame loss:** any server-originated notification frame that the
26
+ * transport drops while disconnected (between the socket dying and
27
+ * the reconnect `hello` completing) is NOT replayed — the Stream API
28
+ * has no buffering or gap-fill across the reconnect window, so such
29
+ * frames are silently lost to the consumer. Subscriptions resume
30
+ * receiving frames that arrive AFTER reconnect; there is no error or
31
+ * sentinel marking the gap.
27
32
  * 5. `MoltZapAgentClient.close` invokes `SubscriberRegistry.closeAll`, which
28
33
  * calls each live `sub.onClose(new NotConnectedError(...))`. Each
29
34
  * `Stream.async`-backed consumer fails with `NotConnectedError`
30
35
  * via `emit.fail` deterministically (no Queue/shutdown race).
31
36
  */
32
37
  import { Stream } from "effect";
33
- import { type AnyNotificationDefinition, type DecodedNotification, type NotConnectedError, type NotificationParamsOf } from "@moltzap/protocol";
34
- import type { SubscriberRegistry } from "../runtime/subscribers.js";
38
+ import { type NotConnectedError, type NotificationDelivery, type NotificationSubscriberRegistry, type NotificationParamsOf } from "@moltzap/protocol/rpc";
39
+ import type { AnyNotificationDefinition } from "@moltzap/protocol/socket/catalog";
40
+ type ClientNotificationDelivery = NotificationDelivery<AnyNotificationDefinition>;
35
41
  /**
36
- * Typed-payload subscribe. Returns a Stream of `DecodedNotification<D>`
42
+ * Typed-payload subscribe. Returns a Stream of `NotificationParamsOf&lt;D>`
37
43
  * whose error channel is `NotConnectedError` and whose requirement set is
38
44
  * `never` (the registry handle is bound at materialization time inside
39
45
  * `Stream.async`'s register callback, so neither Scope nor any other
40
46
  * requirement leaks to the consumer).
41
47
  *
42
48
  * `refinement` is a typed predicate over the definition's params. When the
43
- * type-guard overload form is used, the Stream's payload narrows to
44
- * `DecodedNotification<D, R>` via the optional `R` parameter on
45
- * `DecodedNotification<D>`.
49
+ * type-guard overload form is used, the Stream's payload narrows to `R`.
46
50
  */
47
- export declare function subscribe<D extends AnyNotificationDefinition>(registry: SubscriberRegistry, definition: D, refinement?: (params: NotificationParamsOf<D>) => boolean): Stream.Stream<DecodedNotification<D>, NotConnectedError, never>;
48
- export declare function subscribe<D extends AnyNotificationDefinition, R extends NotificationParamsOf<D>>(registry: SubscriberRegistry, definition: D, refinement: (params: NotificationParamsOf<D>) => params is R): Stream.Stream<DecodedNotification<D, R>, NotConnectedError, never>;
51
+ export declare function subscribe<D extends AnyNotificationDefinition, R extends NotificationParamsOf<D>>(registry: NotificationSubscriberRegistry<NotConnectedError, AnyNotificationDefinition>, definition: D, refinement: (params: NotificationParamsOf<D>) => params is R): Stream.Stream<R, NotConnectedError, never>;
52
+ export declare function subscribe<D extends AnyNotificationDefinition>(registry: NotificationSubscriberRegistry<NotConnectedError, AnyNotificationDefinition>, definition: D, refinement?: (params: NotificationParamsOf<D>) => boolean): Stream.Stream<NotificationParamsOf<D>, NotConnectedError, never>;
49
53
  /**
50
54
  * Broad-union escape hatch. The only intended in-tree consumer is
51
55
  * `MoltZapService.connect`, which uses this to fan every inbound
@@ -53,32 +57,12 @@ export declare function subscribe<D extends AnyNotificationDefinition, R extends
53
57
  * narrowing is intentionally lost; callers wanting typed payloads use
54
58
  * `subscribe(def, refinement?)`.
55
59
  *
56
- * The `subscribeAll` Stream uses a synthetic "match every definition"
57
- * filter — implemented by the registry treating a `null` definition
58
- * pointer as "match all", but for the Stream API we instead register
59
- * one subscription per inbound frame's definition. Simpler: model
60
- * "match all" by passing an in-band sentinel.
61
- *
62
- * Implementation: the registry has no native "match all" subscription
63
- * shape (intentional — `subscribe<D>` is per-definition). To preserve
64
- * the registry's typed dispatch surface, `subscribeAll` constructs a
65
- * Stream that taps the registry via a per-arrival path: registering
66
- * once with a sentinel definition would require a registry-level "match
67
- * any" capability we deliberately avoid (would complicate the typed
68
- * dispatch in subscribers.ts). Instead, the dispatcher feeds every
69
- * frame to `subscribeAll`'s emit via a dedicated `subscribeAllRef`
70
- * callback list maintained alongside `subsRef`.
71
- *
72
- * Architect-mandated code shape: per spec Goal #2 / plan §5.3, the
73
- * surface returns a Stream value. Implementation passes the literal
74
- * `AnyNotificationDefinition` sentinel via the registry's broad-union
75
- * channel — see `notification/stream.ts → subscribeAllStream` below
76
- * which registers via a new `SubscriberRegistry.registerAll` helper.
77
- *
78
- * To keep the registry minimal we route `subscribeAll` through a thin
79
- * wrapper that the registry exposes as `registerAll(callbacks)` —
80
- * identical lifecycle to `register(def, …)` but with no definition
81
- * match (the dispatcher hits these callbacks for every inbound frame).
60
+ * The registry has no "match all" subscription shape (`subscribe&lt;D>` is
61
+ * per-definition). `subscribeAll` instead registers via
62
+ * `SubscriberRegistry.registerAll`, whose callbacks the dispatcher hits
63
+ * for every inbound frame regardless of definition. Same lifecycle as
64
+ * `register(def, …)`, no definition match.
82
65
  */
83
- export declare function subscribeAll(registry: SubscriberRegistry, refinement?: (notification: DecodedNotification<AnyNotificationDefinition>) => boolean): Stream.Stream<DecodedNotification<AnyNotificationDefinition>, NotConnectedError, never>;
66
+ export declare function subscribeAll(registry: NotificationSubscriberRegistry<NotConnectedError, AnyNotificationDefinition>, refinement?: (definition: AnyNotificationDefinition, params: NotificationParamsOf<AnyNotificationDefinition>) => boolean): Stream.Stream<ClientNotificationDelivery, NotConnectedError, never>;
67
+ export {};
84
68
  //# sourceMappingURL=stream.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../src/notification/stream.ts"],"names":[],"mappings":"AAEA;;;;;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