@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 +1 @@
1
- {"version":3,"file":"format-cross-conv.js","sourceRoot":"","sources":["../../src/channel-base/format-cross-conv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEL,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAWvB,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AAChE,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAS7B,SAAS,gBAAgB,CACvB,OAAyB,EACzB,IAAqC;IAErC,OAAO;QACL,YAAY,EAAE,OAAO,CAAC,gBAAgB,IAAI,YAAY,OAAO,CAAC,UAAU,EAAE;QAC1E,MAAM,EAAE,OAAO,CAAC,QAAQ,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU;QACzE,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CACvB,QAAqC,EACrC,IAAqC;IAErC,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAg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5
- * `packages/nanoclaw-channel/src/channels/moltzap.ts → formatGroupBlock`. Also
6
- * extracts the shared type-narrowing predicate (`getGroupFields`) consumed by
7
- * openclaw (deriving `groupSubject` / `groupMembers` for the OpenClaw context)
8
- * and nanoclaw (gating the inline group-block render).
4
+ * `formatGroupBlock` renders the group block for nanoclaw. The shared
5
+ * type-narrowing predicate `getGroupFields` is consumed by openclaw
6
+ * (deriving `groupSubject` / `groupMembers` for the OpenClaw context) and
7
+ * nanoclaw (gating the group-block render).
9
8
  */
10
9
  import type { EnrichedConversationMeta } from "../channel-core.js";
11
10
  import type { CrossConvMarkup } from "./format-cross-conv.js";
@@ -25,13 +24,12 @@ export declare function getGroupFields(meta: EnrichedConversationMeta | undefine
25
24
  * Returns the formatted group block.
26
25
  *
27
26
  * Markup variants:
28
- * - `"xml-system-reminder"`: byte-identical to the pre-refactor nanoclaw
29
- * output (a `<system-reminder>` block with group name + participants).
27
+ * - `"xml-system-reminder"`: a `<system-reminder>` block with group
28
+ * name + participants (nanoclaw output).
30
29
  * - `"json-header"`: empty string. Openclaw does not render a group block;
31
30
  * it consumes `getGroupFields` directly to derive its OpenClaw-side
32
- * `groupSubject` / `groupMembers` fields. The empty-string return locks
33
- * the "openclaw renders no group block" behavior as an explicit,
34
- * fixtured output (see arch sub-issue #605 §3.5).
31
+ * `groupSubject` / `groupMembers` fields. The empty-string return makes
32
+ * "openclaw renders no group block" an explicit, fixtured output.
35
33
  *
36
34
  * Or pass a custom `formatter` callback.
37
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"format-group-block.d.ts","sourceRoot":"","sources":["../../src/channel-base/format-group-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,S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11 +1,10 @@
1
1
  /**
2
2
  * Channel-base group-block helpers.
3
3
  *
4
- * Replaces nanoclaw's inline `formatGroupBlock` at
5
- * `packages/nanoclaw-channel/src/channels/moltzap.ts → formatGroupBlock`. Also
6
- * extracts the shared type-narrowing predicate (`getGroupFields`) consumed by
7
- * openclaw (deriving `groupSubject` / `groupMembers` for the OpenClaw context)
8
- * and nanoclaw (gating the inline group-block render).
4
+ * `formatGroupBlock` renders the group block for nanoclaw. The shared
5
+ * type-narrowing predicate `getGroupFields` is consumed by openclaw
6
+ * (deriving `groupSubject` / `groupMembers` for the OpenClaw context) and
7
+ * nanoclaw (gating the group-block render).
9
8
  */
10
9
  import { sanitizeForSystemReminder } from "../service.js";
11
10
  const UNNAMED_GROUP_FALLBACK = "(unnamed)";
@@ -36,13 +35,12 @@ function formatXmlSystemReminder(fields) {
36
35
  * Returns the formatted group block.
37
36
  *
38
37
  * Markup variants:
39
- * - `"xml-system-reminder"`: byte-identical to the pre-refactor nanoclaw
40
- * output (a `<system-reminder>` block with group name + participants).
38
+ * - `"xml-system-reminder"`: a `<system-reminder>` block with group
39
+ * name + participants (nanoclaw output).
41
40
  * - `"json-header"`: empty string. Openclaw does not render a group block;
42
41
  * it consumes `getGroupFields` directly to derive its OpenClaw-side
43
- * `groupSubject` / `groupMembers` fields. The empty-string return locks
44
- * the "openclaw renders no group block" behavior as an explicit,
45
- * fixtured output (see arch sub-issue #605 §3.5).
42
+ * `groupSubject` / `groupMembers` fields. The empty-string return makes
43
+ * "openclaw renders no group block" an explicit, fixtured output.
46
44
  *
47
45
  * Or pass a custom `formatter` callback.
48
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"format-group-block.js","sourceRoot":"","sources":["../../src/channel-base/format-group-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAW1D,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAC3C,MAAM,wBAAwB,GAAG,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wB,GAAG,eAAe,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,IAA0C;IAE1C,IAAI,IAAI,EAAE,IAAI,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;AAC9D,CAAC;AAED,SAAS,uBAAuB,CAAC,MAAmB;IAClD,MAAM,QAAQ,GAAG,yBAAyB,CACxC,MAAM,CAAC,IAAI,IAAI,sBAAsB,CACtC,CAAC;IACF,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAC5E,OAAO;QACL,mBAAmB;QACnB,+BAA+B;QAC/B,eAAe,QAAQ,EAAE;QACzB,iBAAiB,MAAM,CAAC,YAAY,CAAC,MAAM,MAAM,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,wBAAwB,EAAE;QAC1G,oBAAoB;KACrB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAmB,EACnB,IAE0C;IAE1C,IAAI,WAAW,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACvD,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,qBAAqB;YACxB,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;QACzC,KAAK,aAAa;YAChB,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,68 +1,9 @@
1
- /**
2
- * @file `@moltzap/client/channel-base` — shared scaffolding for channel
3
- * adapters (`@moltzap/openclaw-channel`, `@moltzap/claude-code-channel`,
4
- * `@moltzap/nanoclaw-channel`).
5
- *
6
- * The subpath canonicalizes three things across the three channels:
7
- * (1) the `LeaseAlreadyConsumed` tagged error and its projection
8
- * helpers, (2) the lease-lifecycle primitives (`LeaseStore` /
9
- * `LeaseGuard`), and (3) the markup-parameterized cross-conv and
10
- * group-block formatters. Direct `@moltzap/client` consumers
11
- * (`server-core`, `runtimes`, `test-utils`) see no API surface
12
- * change — the subpath is opt-in.
13
- *
14
- * Surfacing path differs per host contract:
15
- *
16
- * - **claude-code** — raises via `server.ts → toolErrorResult`.
17
- * - **openclaw** — invokes the optional `onLeaseConsumed` side-channel callback (deliver's wire return type is `PromiseLike<boolean>` and cannot carry an Effect error).
18
- * - **nanoclaw** — raises the typed error on the Effect channel.
19
- *
20
- * Common lease-projection path:
21
- *
22
- * ```mermaid
23
- * sequenceDiagram
24
- * participant Host
25
- * participant Channel
26
- * participant Core as MoltZapChannelCore
27
- * participant Server.
28
- *
29
- * Host->>Channel: reply / sendMessage
30
- * Channel->>Core: sendReply(conv, text, {dispatchLeaseId})
31
- * Core->>Server: messages/send
32
- * Server-->>Core: ForbiddenError data.reason LeaseInvalid
33
- * Note over Channel,Core: catchLeaseInvalid reads Clock.currentTimeMillis<br>then projectLeaseInvalid stamps LeaseAlreadyConsumed
34
- * Core-->>Channel: Effect.fail(LeaseAlreadyConsumed)
35
- * alt claude-code
36
- * Channel->>Host: toolErrorResult
37
- * else openclaw
38
- * Channel->>Host: onLeaseConsumed callback, deliver returns false
39
- * else nanoclaw
40
- * Channel->>Host: Effect raises LeaseAlreadyConsumed
41
- * end
42
- * ```
43
- *
44
- * The `_tag === "LeaseAlreadyConsumed"` forward-compat arm of
45
- * `projectLeaseInvalid` covers a future server that emits the
46
- * canonical tag in `data` directly; no channel-side change required.
47
- *
48
- * Primitives live one-per-file:
49
- *
50
- * - `lease.ts` — `LeaseAlreadyConsumed`, `projectLeaseInvalid`, `catchLeaseInvalid` (Effect-pipe wrapper at every `core.sendReply(...)` boundary).
51
- * - `lease-store.ts` — `LeaseStore&lt;HostKey, T>`: per-key tracker with `remember` / `peek` / `consume` / `clear`. Nanoclaw stores `(jid, dispatchLeaseId)` and `peek`s deliberately on retries so the server returns CONSUMED rather than accepting a duplicate send.
52
- * - `lease-guard.ts` — `LeaseGuard`: single-shot dup-reply detector scoped to one inbound message. `consume()` returns `true` exactly once.
53
- * - `format-cross-conv.ts` — markup-parameterized formatter (`json-header` for openclaw, `xml-system-reminder` for nanoclaw). Owns empty-check and own-agent disambiguation; markup ownership lives in the variant table.
54
- * - `format-group-block.ts` — `formatGroupBlock` + `getGroupFields` predicate. Openclaw consumes the narrowed fields directly; nanoclaw renders via the `xml-system-reminder` variant.
55
- *
56
- * No high-level `createChannelBase(opts)` helper: channels diverge
57
- * on surfacing and markup. A facade would either hard-code one
58
- * surfacing path or accept callbacks for each, ending up a thin
59
- * wrapper over the primitives below.
60
- */
1
+ /** @file Shared channel-adapter primitives for `@moltzap/client/channel-base`. */
61
2
  export { LeaseAlreadyConsumed, projectLeaseInvalid, catchLeaseInvalid, type LeaseInvalidProjectionError, } from "./lease.js";
62
3
  export { LeaseStore } from "./lease-store.js";
63
4
  export { LeaseGuard } from "./lease-guard.js";
64
5
  export { formatCrossConv, type CrossConvFormatter, type CrossConvMarkup, } from "./format-cross-conv.js";
65
6
  export { formatGroupBlock, getGroupFields, type GroupFields, type GroupFormatter, } from "./format-group-block.js";
66
- export { sanitizeForSystemReminder, type CrossConvMessage, } from "../service.js";
67
- export { type EnrichedConversationMeta } from "../channel-core.js";
7
+ export { MoltZapChannelCore, type ChannelCoreOptions, type ChannelService, type ContextBlocks, type DispatchAdmissionDecision, type DispatchAdmissionRequest, type DispatchReleaseFrame, type EnrichedConversationMeta, type EnrichedInboundMessage, type EnrichedSender, type InboundHandler, type PendingDispatchMessage, } from "../channel-core.js";
8
+ export { sanitizeForSystemReminder, type CrossConversationEntry, type CrossConvMessage, } from "../service.js";
68
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/channel-base/index.ts"],"names":[],"mappings":"AAEA;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K,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC"}
@@ -1,72 +1,9 @@
1
- /* eslint-disable jsdoc/text-escaping -- mermaid sequenceDiagram blocks need literal `<br>` (HTML5) for renderer compatibility; the escape would render as literal text. */
2
- /**
3
- * @file `@moltzap/client/channel-base` — shared scaffolding for channel
4
- * adapters (`@moltzap/openclaw-channel`, `@moltzap/claude-code-channel`,
5
- * `@moltzap/nanoclaw-channel`).
6
- *
7
- * The subpath canonicalizes three things across the three channels:
8
- * (1) the `LeaseAlreadyConsumed` tagged error and its projection
9
- * helpers, (2) the lease-lifecycle primitives (`LeaseStore` /
10
- * `LeaseGuard`), and (3) the markup-parameterized cross-conv and
11
- * group-block formatters. Direct `@moltzap/client` consumers
12
- * (`server-core`, `runtimes`, `test-utils`) see no API surface
13
- * change — the subpath is opt-in.
14
- *
15
- * Surfacing path differs per host contract:
16
- *
17
- * - **claude-code** — raises via `server.ts → toolErrorResult`.
18
- * - **openclaw** — invokes the optional `onLeaseConsumed` side-channel callback (deliver's wire return type is `PromiseLike&lt;boolean>` and cannot carry an Effect error).
19
- * - **nanoclaw** — raises the typed error on the Effect channel.
20
- *
21
- * Common lease-projection path:
22
- *
23
- * ```mermaid
24
- * sequenceDiagram
25
- * participant Host
26
- * participant Channel
27
- * participant Core as MoltZapChannelCore
28
- * participant Server.
29
- *
30
- * Host->>Channel: reply / sendMessage
31
- * Channel->>Core: sendReply(conv, text, {dispatchLeaseId})
32
- * Core->>Server: messages/send
33
- * Server-->>Core: ForbiddenError data.reason LeaseInvalid
34
- * Note over Channel,Core: catchLeaseInvalid reads Clock.currentTimeMillis<br>then projectLeaseInvalid stamps LeaseAlreadyConsumed
35
- * Core-->>Channel: Effect.fail(LeaseAlreadyConsumed)
36
- * alt claude-code
37
- * Channel->>Host: toolErrorResult
38
- * else openclaw
39
- * Channel->>Host: onLeaseConsumed callback, deliver returns false
40
- * else nanoclaw
41
- * Channel->>Host: Effect raises LeaseAlreadyConsumed
42
- * end
43
- * ```
44
- *
45
- * The `_tag === "LeaseAlreadyConsumed"` forward-compat arm of
46
- * `projectLeaseInvalid` covers a future server that emits the
47
- * canonical tag in `data` directly; no channel-side change required.
48
- *
49
- * Primitives live one-per-file:
50
- *
51
- * - `lease.ts` — `LeaseAlreadyConsumed`, `projectLeaseInvalid`, `catchLeaseInvalid` (Effect-pipe wrapper at every `core.sendReply(...)` boundary).
52
- * - `lease-store.ts` — `LeaseStore&lt;HostKey, T>`: per-key tracker with `remember` / `peek` / `consume` / `clear`. Nanoclaw stores `(jid, dispatchLeaseId)` and `peek`s deliberately on retries so the server returns CONSUMED rather than accepting a duplicate send.
53
- * - `lease-guard.ts` — `LeaseGuard`: single-shot dup-reply detector scoped to one inbound message. `consume()` returns `true` exactly once.
54
- * - `format-cross-conv.ts` — markup-parameterized formatter (`json-header` for openclaw, `xml-system-reminder` for nanoclaw). Owns empty-check and own-agent disambiguation; markup ownership lives in the variant table.
55
- * - `format-group-block.ts` — `formatGroupBlock` + `getGroupFields` predicate. Openclaw consumes the narrowed fields directly; nanoclaw renders via the `xml-system-reminder` variant.
56
- *
57
- * No high-level `createChannelBase(opts)` helper: channels diverge
58
- * on surfacing and markup. A facade would either hard-code one
59
- * surfacing path or accept callbacks for each, ending up a thin
60
- * wrapper over the primitives below.
61
- */
1
+ /** @file Shared channel-adapter primitives for `@moltzap/client/channel-base`. */
62
2
  export { LeaseAlreadyConsumed, projectLeaseInvalid, catchLeaseInvalid, } from "./lease.js";
63
3
  export { LeaseStore } from "./lease-store.js";
64
4
  export { LeaseGuard } from "./lease-guard.js";
65
5
  export { formatCrossConv, } from "./format-cross-conv.js";
66
6
  export { formatGroupBlock, getGroupFields, } from "./format-group-block.js";
67
- // Re-exports for ergonomics on the subpath (these are part of the public
68
- // `@moltzap/client` barrel already; channel-base callers shouldn't need to
69
- // import from two paths to use the formatters).
7
+ export { MoltZapChannelCore, } from "../channel-core.js";
70
8
  export { sanitizeForSystemReminder, } from "../service.js";
71
- export {} from "../channel-core.js";
72
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/channel-base/index.ts"],"names":[],"mappings":"AAAA,2KAA2K;AAE3K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GAElB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EACL,eAAe,GAGhB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,gBAAgB,EAChB,cAAc,GAGf,MAAM,yBAAyB,CAAC;AAEjC,yEAAyE;AACzE,2EAA2E;AAC3E,gDAAgD;AAChD,OAAO,EACL,yBAAyB,GAE1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAiC,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/channel-base/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAElF,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GAElB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EACL,eAAe,GAGhB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,gBAAgB,EAChB,cAAc,GAGf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,kBAAkB,GAYnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,yBAAyB,GAG1B,MAAM,eAAe,CAAC"}
@@ -2,8 +2,6 @@
2
2
  * Channel-base `LeaseGuard` — per-dispatch single-shot client-side dup-reply
3
3
  * detection.
4
4
  *
5
- * Replaces openclaw's `consumedLeaseAt: number | null` closure in
6
- * `packages/openclaw-channel/src/openclaw-entry.ts → createLeaseConsumingDeliver`.
7
5
  * One `LeaseGuard` instance per inbound message (created inside the deliver
8
6
  * wrapper); `consume()` returns true exactly once, false on every subsequent
9
7
  * call.
@@ -1 +1 @@
1
- {"version":3,"file":"lease-guard.d.ts","sourceRoot":"","sources":["../../src/channel-base/lease-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAS,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,qBAAa,UAAU;;IAGrB;;;;OAIG;IACH,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC;IAS/C;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAInE;CACF"}
1
+ {"version":3,"file":"lease-guard.d.ts","sourceRoot":"","sources":["../../src/channel-base/lease-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAS,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,qBAAa,UAAU;;IAGrB;;;;OAIG;IACH,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC;IAS/C;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAInE;CACF"}
@@ -2,8 +2,6 @@
2
2
  * Channel-base `LeaseGuard` — per-dispatch single-shot client-side dup-reply
3
3
  * detection.
4
4
  *
5
- * Replaces openclaw's `consumedLeaseAt: number | null` closure in
6
- * `packages/openclaw-channel/src/openclaw-entry.ts → createLeaseConsumingDeliver`.
7
5
  * One `LeaseGuard` instance per inbound message (created inside the deliver
8
6
  * wrapper); `consume()` returns true exactly once, false on every subsequent
9
7
  * call.
@@ -1 +1 @@
1
- {"version":3,"file":"lease-guard.js","sourceRoot":"","sources":["../../src/channel-base/lease-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,OAAO,UAAU;IACrB,WAAW,GAAkB,IAAI,CAAC;IAElC;;;;OAIG;IACH,OAAO;QACL,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;YAC/B,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI;gBAAE,OAAO,KAAK,CAAC;YAC5C,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC;YAC1C,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,IAAI,UAAU;QACZ,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CACtB,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAC1E,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"lease-guard.js","sourceRoot":"","sources":["../../src/channel-base/lease-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,OAAO,UAAU;IACrB,WAAW,GAAkB,IAAI,CAAC;IAElC;;;;OAIG;IACH,OAAO;QACL,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;YAC/B,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI;gBAAE,OAAO,KAAK,CAAC;YAC5C,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC;YAC1C,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,IAAI,UAAU;QACZ,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CACtB,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAC1E,CAAC;IACJ,CAAC;CACF"}
@@ -3,8 +3,7 @@
3
3
  *
4
4
  * Nanoclaw uses a string-keyed, string-valued store (keyed by JID, payload
5
5
  * is the dispatchLeaseId string). The deliberate "keep stale entry to trigger
6
- * server CONSUMED rejection on retry" semantic is preserved via `peek`
7
- * (read-only) — see arch sub-issue #605 §3.3 and §6.3.
6
+ * server CONSUMED rejection on retry" semantic uses `peek` (read-only).
8
7
  *
9
8
  * The class wraps a private `Map`; Effect wrappers are for caller-side
10
9
  * composition. Single-threaded by construction — one instance lives per
@@ -13,7 +12,7 @@
13
12
  import { Effect, Option } from "effect";
14
13
  export declare class LeaseStore<HostKey, T> {
15
14
  #private;
16
- /** Overwrite-on-newer-inbound. Last-write-wins per spec table. */
15
+ /** Overwrite-on-newer-inbound. Last-write-wins. */
17
16
  remember(key: HostKey, payload: T): Effect.Effect<void, never, never>;
18
17
  /**
19
18
  * Read-only lookup. Does NOT delete. Nanoclaw uses this for the
@@ -1 +1 @@
1
- {"version":3,"file":"lease-store.d.ts","sourceRoot":"","sources":["../../src/channel-base/lease-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC,qBAAa,UAAU,CAAC,OAAO,EAAE,CAAC;;IAGhC,kEAAkE;IAClE,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC;IAMrE;;;OAGG;IACH,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC;IAOjE,2DAA2D;IAC3D,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC;IASpE,yDAAyD;IACzD,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC;IAUvD,mBAAmB;IACnB,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAE9C;CACF"}
1
+ {"version":3,"file":"lease-store.d.ts","sourceRoot":"","sources":["../../src/channel-base/lease-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC,qBAAa,UAAU,CAAC,OAAO,EAAE,CAAC;;IAGhC,mDAAmD;IACnD,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC;IAMrE;;;OAGG;IACH,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC;IAOjE,2DAA2D;IAC3D,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC;IASpE,yDAAyD;IACzD,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC;IAUvD,mBAAmB;IACnB,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAE9C;CACF"}
@@ -3,8 +3,7 @@
3
3
  *
4
4
  * Nanoclaw uses a string-keyed, string-valued store (keyed by JID, payload
5
5
  * is the dispatchLeaseId string). The deliberate "keep stale entry to trigger
6
- * server CONSUMED rejection on retry" semantic is preserved via `peek`
7
- * (read-only) — see arch sub-issue #605 §3.3 and §6.3.
6
+ * server CONSUMED rejection on retry" semantic uses `peek` (read-only).
8
7
  *
9
8
  * The class wraps a private `Map`; Effect wrappers are for caller-side
10
9
  * composition. Single-threaded by construction — one instance lives per
@@ -13,7 +12,7 @@
13
12
  import { Effect, Option } from "effect";
14
13
  export class LeaseStore {
15
14
  #entries = new Map();
16
- /** Overwrite-on-newer-inbound. Last-write-wins per spec table. */
15
+ /** Overwrite-on-newer-inbound. Last-write-wins. */
17
16
  remember(key, payload) {
18
17
  return Effect.sync(() => {
19
18
  this.#entries.set(key, payload);
@@ -1 +1 @@
1
- {"version":3,"file":"lease-store.js","sourceRoot":"","sources":["../../src/channel-base/lease-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAA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,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;YACjD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1B,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,yDAAyD;IACzD,KAAK,CAAC,GAAa;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;YACtB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;gBACtB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB;IACnB,IAAI,IAAI;QACN,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -1,63 +1,57 @@
1
1
  /**
2
2
  * Channel-base lease primitives.
3
3
  *
4
- * Public surface for spec C (#597):
4
+ * Public surface:
5
5
  * - `LeaseAlreadyConsumed`: canonical tagged error class. One definition site
6
6
  * across all three channels (claude-code, openclaw, nanoclaw).
7
- * - `projectLeaseInvalid`: predicate that narrows a `RpcServerError` to
7
+ * - `projectLeaseInvalid`: predicate that narrows a `ForbiddenError` to
8
8
  * `LeaseAlreadyConsumed` when the server's wire-error payload matches the
9
- * single-use-lease shape.
10
- * - `catchLeaseInvalid`: Effect-pipe convenience that runs the projection
11
- * inside `Effect.catchTag("RpcServerError", ...)` with
12
- * `Clock.currentTimeMillis` threaded into the projector as `consumedAt`.
9
+ * single-use-lease shape (`data.reason === "LeaseInvalid"`).
10
+ * - `catchLeaseInvalid`: Effect-pipe convenience that runs the projection over
11
+ * a `ForbiddenError` with `Clock.currentTimeMillis` threaded into the
12
+ * projector as `consumedAt`.
13
13
  */
14
14
  import { Effect } from "effect";
15
- import { RpcServerError } from "@moltzap/protocol";
15
+ import { ForbiddenError } from "@moltzap/protocol/rpc";
16
16
  declare const LeaseAlreadyConsumed_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 & {
17
17
  readonly _tag: "LeaseAlreadyConsumed";
18
18
  } & Readonly<A>;
19
19
  /**
20
- * The dispatch lease was already consumed (server returned the typed
21
- * single-use-lease failure on a second `messages/send` for the same lease).
20
+ * The dispatch lease is already consumed (the server mapped a second
21
+ * `agent/message/send` on the same lease to `ForbiddenError(data.reason:
22
+ * "LeaseInvalid")`).
22
23
  *
23
24
  * Construction is **only** via `projectLeaseInvalid` (or `catchLeaseInvalid`).
24
- * The original `RpcServerError` is preserved on `cause` so hosts can inspect
25
- * the wire payload without re-fetching.
26
- *
27
- * See arch sub-issue #605 §3.1 for the shape rationale (cause field is the
28
- * verbatim wire error; consumedAt is `Clock.currentTimeMillis` at projection
29
- * time; message is derived from cause.message).
25
+ * `cause` is the verbatim wire error so hosts can inspect the payload without
26
+ * re-fetching; `consumedAt` is `Clock.currentTimeMillis` at projection time;
27
+ * `message` is derived from `cause.message`.
30
28
  */
31
29
  export declare class LeaseAlreadyConsumed extends LeaseAlreadyConsumed_base<{
32
30
  readonly leaseId: string;
33
31
  readonly consumedAt: number;
34
- readonly cause: RpcServerError;
32
+ readonly cause: ForbiddenError;
35
33
  readonly message: string;
36
34
  }> {
37
35
  }
38
36
  /**
39
37
  * Named alias for the error channel produced by `catchLeaseInvalid` over an
40
38
  * effect with residual error `E`. Equivalent to
41
- * `LeaseAlreadyConsumed | RpcServerError | E`, but referencable from external
42
- * consumers (per arch sub-issue #605 §5.1 named-error-union commitment).
39
+ * `LeaseAlreadyConsumed | ForbiddenError | E`, named so consumers can
40
+ * reference the union directly.
43
41
  */
44
- export type LeaseInvalidProjectionError<E> = LeaseAlreadyConsumed | RpcServerError | E;
42
+ export type LeaseInvalidProjectionError<E> = LeaseAlreadyConsumed | ForbiddenError | E;
45
43
  /**
46
- * Project an `RpcServerError` to `LeaseAlreadyConsumed` if it matches the
44
+ * Project an `ForbiddenError` to `LeaseAlreadyConsumed` if it matches the
47
45
  * lease-invalid wire shape; otherwise return the original error unchanged.
48
46
  *
49
- * Predicate (architect-corrected per arch sub-issue #605 §3.2):
50
- * `err.data.reason === "LeaseInvalid"` OR
51
- * `err.data._tag === "LeaseAlreadyConsumed"` (forward-compat for a future
52
- * server that emits the canonical tag in data).
47
+ * Predicate: `err.data.reason === "LeaseInvalid"`.
53
48
  *
54
49
  * The wire code (-32001 / generic Forbidden) is intentionally NOT part of
55
50
  * the predicate because the code is too generic to discriminate on alone.
56
51
  *
57
52
  * `ctx.leaseId` (optional) is the lease the caller just sent. Caller-supplied
58
53
  * because the server's `ForbiddenError.data` shape does NOT carry leaseId.
59
- * Falls back to `"(unknown)"` when omitted (matches the pre-refactor
60
- * claude-code behavior).
54
+ * Falls back to `"(unknown)"` when omitted.
61
55
  *
62
56
  * `ctx.consumedAt` (required) is the epoch ms to stamp on the resulting
63
57
  * `LeaseAlreadyConsumed.consumedAt`. Required because `LeaseAlreadyConsumed`
@@ -65,18 +59,18 @@ export type LeaseInvalidProjectionError<E> = LeaseAlreadyConsumed | RpcServerErr
65
59
  * either pass `Date.now()` directly or use `catchLeaseInvalid` which reads
66
60
  * `Clock.currentTimeMillis` inside the Effect.
67
61
  */
68
- export declare function projectLeaseInvalid(err: RpcServerError, ctx: {
62
+ export declare function projectLeaseInvalid(err: ForbiddenError, ctx: {
69
63
  readonly leaseId?: string;
70
64
  readonly consumedAt: number;
71
- }): LeaseAlreadyConsumed | RpcServerError;
65
+ }): LeaseAlreadyConsumed | ForbiddenError;
72
66
  /**
73
- * Effect-pipe convenience: catches `RpcServerError` and runs
67
+ * Effect-pipe convenience: catches `ForbiddenError` and runs
74
68
  * `projectLeaseInvalid` on each instance. Reads `Clock.currentTimeMillis`
75
69
  * inside the catch and passes the result to `projectLeaseInvalid` as
76
70
  * `consumedAt`. Matching errors are surfaced as the typed
77
71
  * `LeaseAlreadyConsumed` on the failure channel; non-matching errors are
78
72
  * re-raised unchanged so downstream `mapError`s see the original
79
- * `RpcServerError`.
73
+ * `ForbiddenError`.
80
74
  *
81
75
  * Use at every channel's outbound `core.sendReply(...)` boundary:
82
76
  *
@@ -89,6 +83,6 @@ export declare function projectLeaseInvalid(err: RpcServerError, ctx: {
89
83
  */
90
84
  export declare function catchLeaseInvalid<A, E2, R>(ctx?: {
91
85
  readonly leaseId?: string;
92
- }): (eff: Effect.Effect<A, RpcServerError | E2, R>) => Effect.Effect<A, LeaseInvalidProjectionError<E2>, R>;
86
+ }): (eff: Effect.Effect<A, ForbiddenError | E2, R>) => Effect.Effect<A, LeaseInvalidProjectionError<E2>, R>;
93
87
  export {};
94
88
  //# sourceMappingURL=lease.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lease.d.ts","sourceRoot":"","sources":["../../src/channel-base/lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAe,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;;;;AAEnD;;;;;;;;;;;GAWG;AACH,qBAAa,oBAAqB,SAAQ,0BAExC;IACA,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;CAAG;AAEL;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,CAAC,CAAC,IACrC,oBAAoB,GACpB,cAAc,GACd,CAAC,CAAC;AAcN;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CACjC,GA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AC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC9D,oBAAoB,GAAG,cAAc,CAQvC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,CACF,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,GAAG,EAAE,EAAE,CAAC,CAAC,KAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,2BAA2B,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAmBxD"}
@@ -1,29 +1,27 @@
1
1
  /**
2
2
  * Channel-base lease primitives.
3
3
  *
4
- * Public surface for spec C (#597):
4
+ * Public surface:
5
5
  * - `LeaseAlreadyConsumed`: canonical tagged error class. One definition site
6
6
  * across all three channels (claude-code, openclaw, nanoclaw).
7
- * - `projectLeaseInvalid`: predicate that narrows a `RpcServerError` to
7
+ * - `projectLeaseInvalid`: predicate that narrows a `ForbiddenError` to
8
8
  * `LeaseAlreadyConsumed` when the server's wire-error payload matches the
9
- * single-use-lease shape.
10
- * - `catchLeaseInvalid`: Effect-pipe convenience that runs the projection
11
- * inside `Effect.catchTag("RpcServerError", ...)` with
12
- * `Clock.currentTimeMillis` threaded into the projector as `consumedAt`.
9
+ * single-use-lease shape (`data.reason === "LeaseInvalid"`).
10
+ * - `catchLeaseInvalid`: Effect-pipe convenience that runs the projection over
11
+ * a `ForbiddenError` with `Clock.currentTimeMillis` threaded into the
12
+ * projector as `consumedAt`.
13
13
  */
14
14
  import { Clock, Data, Effect } from "effect";
15
- import { RpcServerError } from "@moltzap/protocol";
15
+ import { ForbiddenError } from "@moltzap/protocol/rpc";
16
16
  /**
17
- * The dispatch lease was already consumed (server returned the typed
18
- * single-use-lease failure on a second `messages/send` for the same lease).
17
+ * The dispatch lease is already consumed (the server mapped a second
18
+ * `agent/message/send` on the same lease to `ForbiddenError(data.reason:
19
+ * "LeaseInvalid")`).
19
20
  *
20
21
  * Construction is **only** via `projectLeaseInvalid` (or `catchLeaseInvalid`).
21
- * The original `RpcServerError` is preserved on `cause` so hosts can inspect
22
- * the wire payload without re-fetching.
23
- *
24
- * See arch sub-issue #605 §3.1 for the shape rationale (cause field is the
25
- * verbatim wire error; consumedAt is `Clock.currentTimeMillis` at projection
26
- * time; message is derived from cause.message).
22
+ * `cause` is the verbatim wire error so hosts can inspect the payload without
23
+ * re-fetching; `consumedAt` is `Clock.currentTimeMillis` at projection time;
24
+ * `message` is derived from `cause.message`.
27
25
  */
28
26
  export class LeaseAlreadyConsumed extends Data.TaggedError("LeaseAlreadyConsumed") {
29
27
  }
@@ -32,28 +30,20 @@ function isLeaseInvalidData(data) {
32
30
  if (typeof data !== "object" || data === null)
33
31
  return false;
34
32
  const reason = data.reason;
35
- const tag = data._tag;
36
- // Today's wire shape: `ForbiddenError.data.reason === "LeaseInvalid"`
37
- // (arch sub-issue #605 §3.2). The `_tag` arm is forward-compat for a
38
- // future server that emits the canonical tag in `data` directly.
39
- return reason === "LeaseInvalid" || tag === "LeaseAlreadyConsumed";
33
+ return reason === "LeaseInvalid";
40
34
  }
41
35
  /**
42
- * Project an `RpcServerError` to `LeaseAlreadyConsumed` if it matches the
36
+ * Project an `ForbiddenError` to `LeaseAlreadyConsumed` if it matches the
43
37
  * lease-invalid wire shape; otherwise return the original error unchanged.
44
38
  *
45
- * Predicate (architect-corrected per arch sub-issue #605 §3.2):
46
- * `err.data.reason === "LeaseInvalid"` OR
47
- * `err.data._tag === "LeaseAlreadyConsumed"` (forward-compat for a future
48
- * server that emits the canonical tag in data).
39
+ * Predicate: `err.data.reason === "LeaseInvalid"`.
49
40
  *
50
41
  * The wire code (-32001 / generic Forbidden) is intentionally NOT part of
51
42
  * the predicate because the code is too generic to discriminate on alone.
52
43
  *
53
44
  * `ctx.leaseId` (optional) is the lease the caller just sent. Caller-supplied
54
45
  * because the server's `ForbiddenError.data` shape does NOT carry leaseId.
55
- * Falls back to `"(unknown)"` when omitted (matches the pre-refactor
56
- * claude-code behavior).
46
+ * Falls back to `"(unknown)"` when omitted.
57
47
  *
58
48
  * `ctx.consumedAt` (required) is the epoch ms to stamp on the resulting
59
49
  * `LeaseAlreadyConsumed.consumedAt`. Required because `LeaseAlreadyConsumed`
@@ -72,13 +62,13 @@ export function projectLeaseInvalid(err, ctx) {
72
62
  });
73
63
  }
74
64
  /**
75
- * Effect-pipe convenience: catches `RpcServerError` and runs
65
+ * Effect-pipe convenience: catches `ForbiddenError` and runs
76
66
  * `projectLeaseInvalid` on each instance. Reads `Clock.currentTimeMillis`
77
67
  * inside the catch and passes the result to `projectLeaseInvalid` as
78
68
  * `consumedAt`. Matching errors are surfaced as the typed
79
69
  * `LeaseAlreadyConsumed` on the failure channel; non-matching errors are
80
70
  * re-raised unchanged so downstream `mapError`s see the original
81
- * `RpcServerError`.
71
+ * `ForbiddenError`.
82
72
  *
83
73
  * Use at every channel's outbound `core.sendReply(...)` boundary:
84
74
  *
@@ -90,21 +80,15 @@ export function projectLeaseInvalid(err, ctx) {
90
80
  * ```
91
81
  */
92
82
  export function catchLeaseInvalid(ctx) {
93
- // `Effect.catchAll` over the union (rather than `catchTag("RpcServerError",
94
- // ...)`) keeps the typechecker happy when `E2` is unconstrained — without
95
- // narrowing on the runtime instance, TS conservatively infers that `E2`
96
- // could itself carry `_tag: "RpcServerError"`. The `instanceof` branch
97
- // partitions cleanly.
98
- return (eff) => Effect.catchAll(eff, (err) => {
99
- if (err instanceof RpcServerError) {
100
- return Effect.flatMap(Clock.currentTimeMillis, (consumedAt) => Effect.fail(projectLeaseInvalid(err, {
101
- ...(ctx?.leaseId !== undefined ? { leaseId: ctx.leaseId } : {}),
102
- consumedAt,
103
- })));
104
- }
105
- // Non-RpcServerError residual (E2). Re-raise unchanged so downstream
106
- // `mapError`s see it without coupling to channel-base.
107
- return Effect.fail(err);
108
- });
83
+ // `Effect.catchIf` with an `instanceof` refinement handles only the
84
+ // `ForbiddenError` arm; the `E2` residual flows through untouched as
85
+ // `Exclude<ForbiddenError | E2, ForbiddenError>`, so there is no cast on the
86
+ // residual error channel. `catchTag("ForbiddenError", ...)` cannot be used:
87
+ // when `E2` is unconstrained, TS conservatively assumes it could carry
88
+ // `_tag: "ForbiddenError"`, which would widen the matched arm.
89
+ return Effect.catchIf((err) => err instanceof ForbiddenError, (err) => Effect.flatMap(Clock.currentTimeMillis, (consumedAt) => Effect.fail(projectLeaseInvalid(err, {
90
+ ...(ctx?.leaseId !== undefined ? { leaseId: ctx.leaseId } : {}),
91
+ consumedAt,
92
+ }))));
109
93
  }
110
94
  //# sourceMappingURL=lease.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lease.js","sourceRoot":"","sources":["../../src/channel-base/lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,oBAAqB,SAAQ,IAAI,CAAC,WAAW,CACxD,sBAAsB,CAMtB;CAAG;AAaL,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC,SAAS,kBAAkB,CAAC,IAAa;IACvC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC5D,MAAM,MAAM,GAAI,IAAsC,CAAC,MAAM,CAAC;IAC9D,MAAM,GAAG,GAAI,IAAoC,CAAC,IAAI,CAAC;IACvD,sEAAsE;IACtE,qEAAqE;IACrE,iEAAiE;IACjE,OAAO,MAAM,KAAK,cAAc,IAAI,GAAG,KAAK,sBAAsB,CAAC;AACrE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAA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AAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,UAAU;KACX,CAAC,CACH,CACF,CACJ,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Effect } from "effect";
2
- import type { Message } from "@moltzap/protocol";
2
+ import type { Message } from "@moltzap/protocol/message";
3
3
  import type { TaskId } from "@moltzap/protocol/task";
4
4
  import type { ChannelService, EnrichedInboundMessage } from "./channel-core.js";
5
5
  export declare function enrichChannelMessage(service: ChannelService, taskId: TaskId, messageOrMessages: Message | ReadonlyArray<Message>): Effect.Effect<{