@moltzap/client 2026.1002.0 → 2026.1005.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 (515) hide show
  1. package/NOTICE +1 -6
  2. package/README.md +2 -2
  3. package/bin/moltzapd +2 -2
  4. package/dist/{harness-mcp-contract.d.ts → delivery/history-export.d.ts} +96 -136
  5. package/dist/delivery/history-export.d.ts.map +1 -0
  6. package/dist/{daemon/runtime → delivery}/history-export.js +36 -3
  7. package/dist/delivery/history-export.js.map +1 -0
  8. package/dist/delivery/host-delivery.d.ts +51 -0
  9. package/dist/delivery/host-delivery.d.ts.map +1 -0
  10. package/dist/delivery/host-delivery.js +109 -0
  11. package/dist/delivery/host-delivery.js.map +1 -0
  12. package/dist/delivery/inbox.d.ts +142 -0
  13. package/dist/delivery/inbox.d.ts.map +1 -0
  14. package/dist/delivery/inbox.js +130 -0
  15. package/dist/delivery/inbox.js.map +1 -0
  16. package/dist/delivery/index.d.ts +4 -0
  17. package/dist/delivery/index.d.ts.map +1 -0
  18. package/dist/delivery/index.js +4 -0
  19. package/dist/delivery/index.js.map +1 -0
  20. package/dist/delivery/operations.d.ts +787 -0
  21. package/dist/delivery/operations.d.ts.map +1 -0
  22. package/dist/delivery/operations.js +162 -0
  23. package/dist/delivery/operations.js.map +1 -0
  24. package/dist/delivery/pass.d.ts +91 -0
  25. package/dist/delivery/pass.d.ts.map +1 -0
  26. package/dist/{daemon/runtime/pending-delivery.js → delivery/pass.js} +61 -34
  27. package/dist/delivery/pass.js.map +1 -0
  28. package/dist/delivery/send-invocations.d.ts +106 -0
  29. package/dist/delivery/send-invocations.d.ts.map +1 -0
  30. package/dist/delivery/send-invocations.js +109 -0
  31. package/dist/delivery/send-invocations.js.map +1 -0
  32. package/dist/endpoint/harness-endpoint/capability.d.ts +39 -0
  33. package/dist/endpoint/harness-endpoint/capability.d.ts.map +1 -0
  34. package/dist/endpoint/harness-endpoint/capability.js +9 -0
  35. package/dist/endpoint/harness-endpoint/capability.js.map +1 -0
  36. package/dist/endpoint/harness-endpoint/events.d.ts +12 -0
  37. package/dist/endpoint/harness-endpoint/events.d.ts.map +1 -0
  38. package/dist/endpoint/harness-endpoint/events.js +199 -0
  39. package/dist/endpoint/harness-endpoint/events.js.map +1 -0
  40. package/dist/{client-runtime.d.ts → endpoint/harness-endpoint/index.d.ts} +4 -2
  41. package/dist/endpoint/harness-endpoint/index.d.ts.map +1 -0
  42. package/dist/{client-runtime.js → endpoint/harness-endpoint/index.js} +115 -115
  43. package/dist/endpoint/harness-endpoint/index.js.map +1 -0
  44. package/dist/endpoint/implementation.d.ts +4 -0
  45. package/dist/endpoint/implementation.d.ts.map +1 -0
  46. package/dist/endpoint/implementation.js +5 -0
  47. package/dist/endpoint/implementation.js.map +1 -0
  48. package/dist/endpoint/mcp/auth.d.ts +31 -0
  49. package/dist/endpoint/mcp/auth.d.ts.map +1 -0
  50. package/dist/endpoint/mcp/auth.js +42 -0
  51. package/dist/endpoint/mcp/auth.js.map +1 -0
  52. package/dist/endpoint/mcp/event-schemas.d.ts +151 -0
  53. package/dist/endpoint/mcp/event-schemas.d.ts.map +1 -0
  54. package/dist/endpoint/mcp/event-schemas.js +72 -0
  55. package/dist/endpoint/mcp/event-schemas.js.map +1 -0
  56. package/dist/endpoint/mcp/event-signing.d.ts +62 -0
  57. package/dist/endpoint/mcp/event-signing.d.ts.map +1 -0
  58. package/dist/endpoint/mcp/event-signing.js +185 -0
  59. package/dist/endpoint/mcp/event-signing.js.map +1 -0
  60. package/dist/endpoint/mcp/events.d.ts +45 -0
  61. package/dist/endpoint/mcp/events.d.ts.map +1 -0
  62. package/dist/endpoint/mcp/events.js +308 -0
  63. package/dist/endpoint/mcp/events.js.map +1 -0
  64. package/dist/{harness-mcp-http.d.ts → endpoint/mcp/http.d.ts} +1 -1
  65. package/dist/endpoint/mcp/http.d.ts.map +1 -0
  66. package/dist/{harness-mcp-http.js → endpoint/mcp/http.js} +1 -1
  67. package/dist/endpoint/mcp/http.js.map +1 -0
  68. package/dist/endpoint/mcp/index.d.ts +10 -0
  69. package/dist/endpoint/mcp/index.d.ts.map +1 -0
  70. package/dist/endpoint/mcp/index.js +8 -0
  71. package/dist/endpoint/mcp/index.js.map +1 -0
  72. package/dist/endpoint/mcp/names.d.ts +18 -0
  73. package/dist/endpoint/mcp/names.d.ts.map +1 -0
  74. package/dist/endpoint/mcp/names.js +18 -0
  75. package/dist/endpoint/mcp/names.js.map +1 -0
  76. package/dist/{management-runtime.d.ts → endpoint/mcp/owner-tools.d.ts} +7 -7
  77. package/dist/endpoint/mcp/owner-tools.d.ts.map +1 -0
  78. package/dist/{management-runtime.js → endpoint/mcp/owner-tools.js} +2 -4
  79. package/dist/endpoint/mcp/owner-tools.js.map +1 -0
  80. package/dist/endpoint/mcp/schemas.d.ts +42 -0
  81. package/dist/endpoint/mcp/schemas.d.ts.map +1 -0
  82. package/dist/endpoint/mcp/schemas.js +89 -0
  83. package/dist/endpoint/mcp/schemas.js.map +1 -0
  84. package/dist/{harness-mcp-wire.d.ts → endpoint/mcp/tools.d.ts} +17 -14
  85. package/dist/endpoint/mcp/tools.d.ts.map +1 -0
  86. package/dist/{harness-mcp-wire.js → endpoint/mcp/tools.js} +230 -110
  87. package/dist/endpoint/mcp/tools.js.map +1 -0
  88. package/dist/endpoint/mcp/webhook.d.ts +15 -0
  89. package/dist/endpoint/mcp/webhook.d.ts.map +1 -0
  90. package/dist/endpoint/mcp/webhook.js +359 -0
  91. package/dist/endpoint/mcp/webhook.js.map +1 -0
  92. package/dist/identity/credentials.d.ts +46 -0
  93. package/dist/identity/credentials.d.ts.map +1 -0
  94. package/dist/identity/credentials.js +55 -0
  95. package/dist/identity/credentials.js.map +1 -0
  96. package/dist/identity/index.d.ts +4 -0
  97. package/dist/identity/index.d.ts.map +1 -0
  98. package/dist/identity/index.js +4 -0
  99. package/dist/identity/index.js.map +1 -0
  100. package/dist/index.d.ts +21 -4
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +23 -5
  103. package/dist/index.js.map +1 -1
  104. package/dist/{contract.types-check.d.ts → index.types-check.d.ts} +12 -7
  105. package/dist/index.types-check.d.ts.map +1 -0
  106. package/dist/{contract.types-check.js → index.types-check.js} +6 -5
  107. package/dist/index.types-check.js.map +1 -0
  108. package/dist/{daemon/runtime/activation.d.ts → service/activation/index.d.ts} +11 -13
  109. package/dist/service/activation/index.d.ts.map +1 -0
  110. package/dist/{daemon/runtime/activation.js → service/activation/index.js} +3 -3
  111. package/dist/service/activation/index.js.map +1 -0
  112. package/dist/{daemon/configuration.d.ts → service/bootstrap.d.ts} +9 -17
  113. package/dist/service/bootstrap.d.ts.map +1 -0
  114. package/dist/service/bootstrap.js +6 -0
  115. package/dist/service/bootstrap.js.map +1 -0
  116. package/dist/service/configuration.d.ts +13 -0
  117. package/dist/service/configuration.d.ts.map +1 -0
  118. package/dist/service/configuration.js +75 -0
  119. package/dist/service/configuration.js.map +1 -0
  120. package/dist/{daemon/runtime → service}/controller.d.ts +9 -7
  121. package/dist/service/controller.d.ts.map +1 -0
  122. package/dist/service/controller.js +106 -0
  123. package/dist/service/controller.js.map +1 -0
  124. package/dist/{server.d.ts → service/index.d.ts} +7 -4
  125. package/dist/service/index.d.ts.map +1 -0
  126. package/dist/{server.js → service/index.js} +17 -15
  127. package/dist/service/index.js.map +1 -0
  128. package/dist/{server.types-check.d.ts → service/index.types-check.d.ts} +7 -7
  129. package/dist/service/index.types-check.d.ts.map +1 -0
  130. package/dist/{server.types-check.js → service/index.types-check.js} +1 -1
  131. package/dist/service/index.types-check.js.map +1 -0
  132. package/dist/{daemon/runtime/index.d.ts → service/lifecycle.d.ts} +4 -4
  133. package/dist/service/lifecycle.d.ts.map +1 -0
  134. package/dist/{daemon/runtime/index.js → service/lifecycle.js} +29 -26
  135. package/dist/service/lifecycle.js.map +1 -0
  136. package/dist/{daemon → service}/management.d.ts +3 -3
  137. package/dist/service/management.d.ts.map +1 -0
  138. package/dist/{daemon → service}/management.js +4 -14
  139. package/dist/service/management.js.map +1 -0
  140. package/dist/{daemon/registration.d.ts → service/registration/index.d.ts} +3 -3
  141. package/dist/service/registration/index.d.ts.map +1 -0
  142. package/dist/{daemon/registration.js → service/registration/index.js} +2 -3
  143. package/dist/service/registration/index.js.map +1 -0
  144. package/dist/{daemon/runtime/protocol.d.ts → service/supervision.d.ts} +17 -25
  145. package/dist/service/supervision.d.ts.map +1 -0
  146. package/dist/{daemon/runtime/protocol.js → service/supervision.js} +34 -37
  147. package/dist/service/supervision.js.map +1 -0
  148. package/dist/store/anchors.d.ts.map +1 -0
  149. package/dist/store/anchors.js.map +1 -0
  150. package/dist/store/database/index.d.ts.map +1 -0
  151. package/dist/store/database/index.js.map +1 -0
  152. package/dist/store/database/schema.d.ts.map +1 -0
  153. package/dist/{endpoint/store → store}/database/schema.js +42 -6
  154. package/dist/store/database/schema.js.map +1 -0
  155. package/dist/store/database/values.d.ts.map +1 -0
  156. package/dist/store/database/values.js.map +1 -0
  157. package/dist/store/inbox.d.ts +86 -0
  158. package/dist/store/inbox.d.ts.map +1 -0
  159. package/dist/store/inbox.js +269 -0
  160. package/dist/store/inbox.js.map +1 -0
  161. package/dist/store/index.d.ts +12 -0
  162. package/dist/store/index.d.ts.map +1 -0
  163. package/dist/store/index.js +8 -0
  164. package/dist/store/index.js.map +1 -0
  165. package/dist/{endpoint/store → store/queues}/deliveries.d.ts +9 -1
  166. package/dist/store/queues/deliveries.d.ts.map +1 -0
  167. package/dist/{endpoint/store → store/queues}/deliveries.js +19 -3
  168. package/dist/store/queues/deliveries.js.map +1 -0
  169. package/dist/{endpoint/store → store/queues}/dissemination.d.ts +4 -2
  170. package/dist/store/queues/dissemination.d.ts.map +1 -0
  171. package/dist/{endpoint/store → store/queues}/dissemination.js +5 -4
  172. package/dist/store/queues/dissemination.js.map +1 -0
  173. package/dist/store/queues/index.d.ts +5 -0
  174. package/dist/store/queues/index.d.ts.map +1 -0
  175. package/dist/store/queues/index.js +7 -0
  176. package/dist/store/queues/index.js.map +1 -0
  177. package/dist/{endpoint/store → store/queues}/outbound.d.ts +1 -1
  178. package/dist/store/queues/outbound.d.ts.map +1 -0
  179. package/dist/{endpoint/store → store/queues}/outbound.js +1 -1
  180. package/dist/store/queues/outbound.js.map +1 -0
  181. package/dist/{endpoint/store/management.d.ts → store/reads.d.ts} +1 -1
  182. package/dist/store/reads.d.ts.map +1 -0
  183. package/dist/{endpoint/store/management.js → store/reads.js} +2 -4
  184. package/dist/store/reads.js.map +1 -0
  185. package/dist/store/records.d.ts.map +1 -0
  186. package/dist/{endpoint/store → store}/records.js +1 -2
  187. package/dist/store/records.js.map +1 -0
  188. package/dist/store/rows/index.d.ts.map +1 -0
  189. package/dist/store/rows/index.js.map +1 -0
  190. package/dist/store/runtime-codec.d.ts +17 -0
  191. package/dist/store/runtime-codec.d.ts.map +1 -0
  192. package/dist/store/runtime-codec.js +32 -0
  193. package/dist/store/runtime-codec.js.map +1 -0
  194. package/dist/{endpoint/store/index.d.ts → store/store.d.ts} +2 -2
  195. package/dist/store/store.d.ts.map +1 -0
  196. package/dist/{endpoint/store/index.js → store/store.js} +34 -7
  197. package/dist/store/store.js.map +1 -0
  198. package/dist/{endpoint/store → store}/types.d.ts +41 -0
  199. package/dist/store/types.d.ts.map +1 -0
  200. package/dist/store/types.js.map +1 -0
  201. package/dist/transport/collectives/answer-formats.d.ts +21 -0
  202. package/dist/transport/collectives/answer-formats.d.ts.map +1 -0
  203. package/dist/transport/collectives/answer-formats.js +127 -0
  204. package/dist/transport/collectives/answer-formats.js.map +1 -0
  205. package/dist/transport/collectives/failures.d.ts +34 -0
  206. package/dist/transport/collectives/failures.d.ts.map +1 -0
  207. package/dist/transport/collectives/failures.js +40 -0
  208. package/dist/transport/collectives/failures.js.map +1 -0
  209. package/dist/transport/collectives/forms.d.ts +260 -0
  210. package/dist/transport/collectives/forms.d.ts.map +1 -0
  211. package/dist/transport/collectives/forms.js +214 -0
  212. package/dist/transport/collectives/forms.js.map +1 -0
  213. package/dist/transport/collectives/inbound.d.ts +129 -0
  214. package/dist/transport/collectives/inbound.d.ts.map +1 -0
  215. package/dist/transport/collectives/inbound.js +81 -0
  216. package/dist/transport/collectives/inbound.js.map +1 -0
  217. package/dist/transport/collectives/index.d.ts +10 -0
  218. package/dist/transport/collectives/index.d.ts.map +1 -0
  219. package/dist/transport/collectives/index.js +8 -0
  220. package/dist/transport/collectives/index.js.map +1 -0
  221. package/dist/{message-text.d.ts → transport/collectives/message-text.d.ts} +8 -4
  222. package/dist/transport/collectives/message-text.d.ts.map +1 -0
  223. package/dist/{message-text.js → transport/collectives/message-text.js} +23 -47
  224. package/dist/transport/collectives/message-text.js.map +1 -0
  225. package/dist/{endpoint/collective → transport/collectives}/operation.d.ts +35 -24
  226. package/dist/transport/collectives/operation.d.ts.map +1 -0
  227. package/dist/{endpoint/collective → transport/collectives}/operation.js +70 -105
  228. package/dist/transport/collectives/operation.js.map +1 -0
  229. package/dist/transport/collectives/part/grammar.d.ts +175 -0
  230. package/dist/transport/collectives/part/grammar.d.ts.map +1 -0
  231. package/dist/transport/collectives/part/grammar.js +222 -0
  232. package/dist/transport/collectives/part/grammar.js.map +1 -0
  233. package/dist/{endpoint/collective/wire.d.ts → transport/collectives/part/index.d.ts} +38 -51
  234. package/dist/transport/collectives/part/index.d.ts.map +1 -0
  235. package/dist/{endpoint/collective/wire.js → transport/collectives/part/index.js} +20 -122
  236. package/dist/transport/collectives/part/index.js.map +1 -0
  237. package/dist/{endpoint/collective → transport/collectives}/received-request.d.ts +2 -1
  238. package/dist/transport/collectives/received-request.d.ts.map +1 -0
  239. package/dist/transport/collectives/received-request.js.map +1 -0
  240. package/dist/transport/collectives/render.d.ts +40 -0
  241. package/dist/transport/collectives/render.d.ts.map +1 -0
  242. package/dist/transport/collectives/render.js +74 -0
  243. package/dist/transport/collectives/render.js.map +1 -0
  244. package/dist/{endpoint/collective → transport/collectives}/request-sends.d.ts +3 -2
  245. package/dist/transport/collectives/request-sends.d.ts.map +1 -0
  246. package/dist/transport/collectives/request-sends.js.map +1 -0
  247. package/dist/{endpoint/collective → transport/collectives}/shared-answers.d.ts +4 -3
  248. package/dist/transport/collectives/shared-answers.d.ts.map +1 -0
  249. package/dist/transport/collectives/shared-answers.js.map +1 -0
  250. package/dist/transport/collectives/validation.d.ts +31 -0
  251. package/dist/transport/collectives/validation.d.ts.map +1 -0
  252. package/dist/transport/collectives/validation.js +239 -0
  253. package/dist/transport/collectives/validation.js.map +1 -0
  254. package/dist/{endpoint/addressing/index.d.ts → transport/messaging/address.d.ts} +7 -4
  255. package/dist/transport/messaging/address.d.ts.map +1 -0
  256. package/dist/{endpoint/addressing/index.js → transport/messaging/address.js} +30 -26
  257. package/dist/transport/messaging/address.js.map +1 -0
  258. package/dist/{endpoint/protocol/index.d.ts → transport/messaging/certification.d.ts} +4 -4
  259. package/dist/transport/messaging/certification.d.ts.map +1 -0
  260. package/dist/{endpoint/protocol/index.js → transport/messaging/certification.js} +15 -10
  261. package/dist/transport/messaging/certification.js.map +1 -0
  262. package/dist/{endpoint/engine-dissemination.d.ts → transport/messaging/dissemination.d.ts} +3 -3
  263. package/dist/transport/messaging/dissemination.d.ts.map +1 -0
  264. package/dist/{endpoint/engine-dissemination.js → transport/messaging/dissemination.js} +7 -6
  265. package/dist/transport/messaging/dissemination.js.map +1 -0
  266. package/dist/transport/messaging/errors.d.ts +50 -0
  267. package/dist/transport/messaging/errors.d.ts.map +1 -0
  268. package/dist/transport/messaging/errors.js +64 -0
  269. package/dist/transport/messaging/errors.js.map +1 -0
  270. package/dist/{endpoint/protocol → transport/messaging}/evidence.d.ts +3 -3
  271. package/dist/transport/messaging/evidence.d.ts.map +1 -0
  272. package/dist/{endpoint/protocol → transport/messaging}/evidence.js +1 -1
  273. package/dist/transport/messaging/evidence.js.map +1 -0
  274. package/dist/{endpoint/engine.d.ts → transport/messaging/index.d.ts} +4 -4
  275. package/dist/transport/messaging/index.d.ts.map +1 -0
  276. package/dist/{endpoint/engine.js → transport/messaging/index.js} +25 -9
  277. package/dist/transport/messaging/index.js.map +1 -0
  278. package/dist/transport/messaging/message.d.ts +112 -0
  279. package/dist/transport/messaging/message.d.ts.map +1 -0
  280. package/dist/transport/messaging/message.js +38 -0
  281. package/dist/transport/messaging/message.js.map +1 -0
  282. package/dist/{endpoint/recovery → transport/messaging}/reanchor/empty.d.ts +5 -5
  283. package/dist/transport/messaging/reanchor/empty.d.ts.map +1 -0
  284. package/dist/{endpoint/recovery → transport/messaging}/reanchor/empty.js +3 -3
  285. package/dist/transport/messaging/reanchor/empty.js.map +1 -0
  286. package/dist/{endpoint/recovery → transport/messaging}/reanchor/index.d.ts +3 -3
  287. package/dist/transport/messaging/reanchor/index.d.ts.map +1 -0
  288. package/dist/{endpoint/recovery → transport/messaging}/reanchor/index.js +27 -12
  289. package/dist/transport/messaging/reanchor/index.js.map +1 -0
  290. package/dist/{endpoint/engine-durability.d.ts → transport/messaging/records/index.d.ts} +9 -6
  291. package/dist/transport/messaging/records/index.d.ts.map +1 -0
  292. package/dist/{endpoint/engine-durability.js → transport/messaging/records/index.js} +9 -15
  293. package/dist/transport/messaging/records/index.js.map +1 -0
  294. package/dist/{endpoint → transport/messaging}/recovery/barrier.d.ts +1 -1
  295. package/dist/transport/messaging/recovery/barrier.d.ts.map +1 -0
  296. package/dist/transport/messaging/recovery/barrier.js.map +1 -0
  297. package/dist/{endpoint/recovery/store-evidence.d.ts → transport/messaging/recovery/evidence.d.ts} +5 -5
  298. package/dist/transport/messaging/recovery/evidence.d.ts.map +1 -0
  299. package/dist/{endpoint/recovery/store-evidence.js → transport/messaging/recovery/evidence.js} +3 -3
  300. package/dist/transport/messaging/recovery/evidence.js.map +1 -0
  301. package/dist/{endpoint → transport/messaging}/recovery/index.d.ts +4 -4
  302. package/dist/transport/messaging/recovery/index.d.ts.map +1 -0
  303. package/dist/{endpoint → transport/messaging}/recovery/index.js +41 -32
  304. package/dist/transport/messaging/recovery/index.js.map +1 -0
  305. package/dist/{endpoint/recovery/store.d.ts → transport/messaging/recovery/persistence.d.ts} +5 -5
  306. package/dist/transport/messaging/recovery/persistence.d.ts.map +1 -0
  307. package/dist/{endpoint/recovery/store.js → transport/messaging/recovery/persistence.js} +4 -4
  308. package/dist/transport/messaging/recovery/persistence.js.map +1 -0
  309. package/dist/{endpoint/recovery/state.d.ts → transport/messaging/recovery-session/index.d.ts} +6 -6
  310. package/dist/transport/messaging/recovery-session/index.d.ts.map +1 -0
  311. package/dist/{endpoint/recovery/state.js → transport/messaging/recovery-session/index.js} +3 -3
  312. package/dist/transport/messaging/recovery-session/index.js.map +1 -0
  313. package/dist/{endpoint/engine-types.d.ts → transport/messaging/runtime/index.d.ts} +22 -5
  314. package/dist/transport/messaging/runtime/index.d.ts.map +1 -0
  315. package/dist/{endpoint/engine-types.js → transport/messaging/runtime/index.js} +1 -1
  316. package/dist/transport/messaging/runtime/index.js.map +1 -0
  317. package/dist/{endpoint/engine-send.d.ts → transport/messaging/send.d.ts} +5 -4
  318. package/dist/transport/messaging/send.d.ts.map +1 -0
  319. package/dist/{endpoint/engine-send.js → transport/messaging/send.js} +4 -4
  320. package/dist/transport/messaging/send.js.map +1 -0
  321. package/dist/transport/router/index.d.ts.map +1 -0
  322. package/dist/{endpoint/router-worker → transport/router}/index.js +1 -1
  323. package/dist/transport/router/index.js.map +1 -0
  324. package/dist/transport/router/outage.d.ts.map +1 -0
  325. package/dist/transport/router/outage.js.map +1 -0
  326. package/dist/{endpoint/router-worker → transport/router}/types.d.ts +3 -4
  327. package/dist/transport/router/types.d.ts.map +1 -0
  328. package/dist/transport/router/types.js.map +1 -0
  329. package/dist/{endpoint/representation-canonical.d.ts → transport/wire/encoding/canonical.d.ts} +1 -2
  330. package/dist/transport/wire/encoding/canonical.d.ts.map +1 -0
  331. package/dist/{endpoint/representation-canonical.js → transport/wire/encoding/canonical.js} +2 -2
  332. package/dist/transport/wire/encoding/canonical.js.map +1 -0
  333. package/dist/{endpoint/representation-codec.d.ts → transport/wire/encoding/codec.d.ts} +5 -9
  334. package/dist/transport/wire/encoding/codec.d.ts.map +1 -0
  335. package/dist/{endpoint/representation-codec.js → transport/wire/encoding/codec.js} +7 -27
  336. package/dist/transport/wire/encoding/codec.js.map +1 -0
  337. package/dist/transport/wire/encoding/index.d.ts +4 -0
  338. package/dist/transport/wire/encoding/index.d.ts.map +1 -0
  339. package/dist/transport/wire/encoding/index.js +6 -0
  340. package/dist/transport/wire/encoding/index.js.map +1 -0
  341. package/dist/transport/wire/index.d.ts +6 -0
  342. package/dist/transport/wire/index.d.ts.map +1 -0
  343. package/dist/transport/wire/index.js +9 -0
  344. package/dist/transport/wire/index.js.map +1 -0
  345. package/dist/{endpoint/representation-schemas.d.ts → transport/wire/schemas.d.ts} +76 -98
  346. package/dist/transport/wire/schemas.d.ts.map +1 -0
  347. package/dist/{endpoint/representation-schemas.js → transport/wire/schemas.js} +7 -19
  348. package/dist/transport/wire/schemas.js.map +1 -0
  349. package/dist/transport/wire/values.d.ts +114 -0
  350. package/dist/transport/wire/values.d.ts.map +1 -0
  351. package/dist/transport/wire/values.js +192 -0
  352. package/dist/transport/wire/values.js.map +1 -0
  353. package/dist/{endpoint/representation-verification.d.ts → transport/wire/verification.d.ts} +3 -4
  354. package/dist/transport/wire/verification.d.ts.map +1 -0
  355. package/dist/{endpoint/representation-verification.js → transport/wire/verification.js} +4 -4
  356. package/dist/transport/wire/verification.js.map +1 -0
  357. package/package.json +6 -6
  358. package/dist/client-runtime.d.ts.map +0 -1
  359. package/dist/client-runtime.js.map +0 -1
  360. package/dist/contract.d.ts +0 -721
  361. package/dist/contract.d.ts.map +0 -1
  362. package/dist/contract.js +0 -441
  363. package/dist/contract.js.map +0 -1
  364. package/dist/contract.types-check.d.ts.map +0 -1
  365. package/dist/contract.types-check.js.map +0 -1
  366. package/dist/daemon/configuration.d.ts.map +0 -1
  367. package/dist/daemon/configuration.js +0 -75
  368. package/dist/daemon/configuration.js.map +0 -1
  369. package/dist/daemon/management.d.ts.map +0 -1
  370. package/dist/daemon/management.js.map +0 -1
  371. package/dist/daemon/registration.d.ts.map +0 -1
  372. package/dist/daemon/registration.js.map +0 -1
  373. package/dist/daemon/runtime/activation.d.ts.map +0 -1
  374. package/dist/daemon/runtime/activation.js.map +0 -1
  375. package/dist/daemon/runtime/controller.d.ts.map +0 -1
  376. package/dist/daemon/runtime/controller.js +0 -138
  377. package/dist/daemon/runtime/controller.js.map +0 -1
  378. package/dist/daemon/runtime/history-export.d.ts +0 -33
  379. package/dist/daemon/runtime/history-export.d.ts.map +0 -1
  380. package/dist/daemon/runtime/history-export.js.map +0 -1
  381. package/dist/daemon/runtime/index.d.ts.map +0 -1
  382. package/dist/daemon/runtime/index.js.map +0 -1
  383. package/dist/daemon/runtime/pending-delivery.d.ts +0 -49
  384. package/dist/daemon/runtime/pending-delivery.d.ts.map +0 -1
  385. package/dist/daemon/runtime/pending-delivery.js.map +0 -1
  386. package/dist/daemon/runtime/protocol.d.ts.map +0 -1
  387. package/dist/daemon/runtime/protocol.js.map +0 -1
  388. package/dist/endpoint/addressing/index.d.ts.map +0 -1
  389. package/dist/endpoint/addressing/index.js.map +0 -1
  390. package/dist/endpoint/collective/operation.d.ts.map +0 -1
  391. package/dist/endpoint/collective/operation.js.map +0 -1
  392. package/dist/endpoint/collective/received-request.d.ts.map +0 -1
  393. package/dist/endpoint/collective/received-request.js.map +0 -1
  394. package/dist/endpoint/collective/request-sends.d.ts.map +0 -1
  395. package/dist/endpoint/collective/request-sends.js.map +0 -1
  396. package/dist/endpoint/collective/shared-answers.d.ts.map +0 -1
  397. package/dist/endpoint/collective/shared-answers.js.map +0 -1
  398. package/dist/endpoint/collective/validation.d.ts +0 -49
  399. package/dist/endpoint/collective/validation.d.ts.map +0 -1
  400. package/dist/endpoint/collective/validation.js +0 -97
  401. package/dist/endpoint/collective/validation.js.map +0 -1
  402. package/dist/endpoint/collective/wire.d.ts.map +0 -1
  403. package/dist/endpoint/collective/wire.js.map +0 -1
  404. package/dist/endpoint/engine-dissemination.d.ts.map +0 -1
  405. package/dist/endpoint/engine-dissemination.js.map +0 -1
  406. package/dist/endpoint/engine-durability.d.ts.map +0 -1
  407. package/dist/endpoint/engine-durability.js.map +0 -1
  408. package/dist/endpoint/engine-send.d.ts.map +0 -1
  409. package/dist/endpoint/engine-send.js.map +0 -1
  410. package/dist/endpoint/engine-types.d.ts.map +0 -1
  411. package/dist/endpoint/engine-types.js.map +0 -1
  412. package/dist/endpoint/engine.d.ts.map +0 -1
  413. package/dist/endpoint/engine.js.map +0 -1
  414. package/dist/endpoint/protocol/evidence.d.ts.map +0 -1
  415. package/dist/endpoint/protocol/evidence.js.map +0 -1
  416. package/dist/endpoint/protocol/index.d.ts.map +0 -1
  417. package/dist/endpoint/protocol/index.js.map +0 -1
  418. package/dist/endpoint/recovery/barrier.d.ts.map +0 -1
  419. package/dist/endpoint/recovery/barrier.js.map +0 -1
  420. package/dist/endpoint/recovery/index.d.ts.map +0 -1
  421. package/dist/endpoint/recovery/index.js.map +0 -1
  422. package/dist/endpoint/recovery/reanchor/empty.d.ts.map +0 -1
  423. package/dist/endpoint/recovery/reanchor/empty.js.map +0 -1
  424. package/dist/endpoint/recovery/reanchor/index.d.ts.map +0 -1
  425. package/dist/endpoint/recovery/reanchor/index.js.map +0 -1
  426. package/dist/endpoint/recovery/state.d.ts.map +0 -1
  427. package/dist/endpoint/recovery/state.js.map +0 -1
  428. package/dist/endpoint/recovery/store-evidence.d.ts.map +0 -1
  429. package/dist/endpoint/recovery/store-evidence.js.map +0 -1
  430. package/dist/endpoint/recovery/store.d.ts.map +0 -1
  431. package/dist/endpoint/recovery/store.js.map +0 -1
  432. package/dist/endpoint/representation-canonical.d.ts.map +0 -1
  433. package/dist/endpoint/representation-canonical.js.map +0 -1
  434. package/dist/endpoint/representation-codec.d.ts.map +0 -1
  435. package/dist/endpoint/representation-codec.js.map +0 -1
  436. package/dist/endpoint/representation-schemas.d.ts.map +0 -1
  437. package/dist/endpoint/representation-schemas.js.map +0 -1
  438. package/dist/endpoint/representation-verification.d.ts.map +0 -1
  439. package/dist/endpoint/representation-verification.js.map +0 -1
  440. package/dist/endpoint/representation.d.ts +0 -6
  441. package/dist/endpoint/representation.d.ts.map +0 -1
  442. package/dist/endpoint/representation.js +0 -8
  443. package/dist/endpoint/representation.js.map +0 -1
  444. package/dist/endpoint/router-worker/index.d.ts.map +0 -1
  445. package/dist/endpoint/router-worker/index.js.map +0 -1
  446. package/dist/endpoint/router-worker/outage.d.ts.map +0 -1
  447. package/dist/endpoint/router-worker/outage.js.map +0 -1
  448. package/dist/endpoint/router-worker/types.d.ts.map +0 -1
  449. package/dist/endpoint/router-worker/types.js.map +0 -1
  450. package/dist/endpoint/store/anchors.d.ts.map +0 -1
  451. package/dist/endpoint/store/anchors.js.map +0 -1
  452. package/dist/endpoint/store/database/index.d.ts.map +0 -1
  453. package/dist/endpoint/store/database/index.js.map +0 -1
  454. package/dist/endpoint/store/database/schema.d.ts.map +0 -1
  455. package/dist/endpoint/store/database/schema.js.map +0 -1
  456. package/dist/endpoint/store/database/values.d.ts.map +0 -1
  457. package/dist/endpoint/store/database/values.js.map +0 -1
  458. package/dist/endpoint/store/deliveries.d.ts.map +0 -1
  459. package/dist/endpoint/store/deliveries.js.map +0 -1
  460. package/dist/endpoint/store/dissemination.d.ts.map +0 -1
  461. package/dist/endpoint/store/dissemination.js.map +0 -1
  462. package/dist/endpoint/store/index.d.ts.map +0 -1
  463. package/dist/endpoint/store/index.js.map +0 -1
  464. package/dist/endpoint/store/management.d.ts.map +0 -1
  465. package/dist/endpoint/store/management.js.map +0 -1
  466. package/dist/endpoint/store/outbound.d.ts.map +0 -1
  467. package/dist/endpoint/store/outbound.js.map +0 -1
  468. package/dist/endpoint/store/records.d.ts.map +0 -1
  469. package/dist/endpoint/store/records.js.map +0 -1
  470. package/dist/endpoint/store/rows/index.d.ts.map +0 -1
  471. package/dist/endpoint/store/rows/index.js.map +0 -1
  472. package/dist/endpoint/store/types.d.ts.map +0 -1
  473. package/dist/endpoint/store/types.js.map +0 -1
  474. package/dist/endpoint/store.d.ts +0 -10
  475. package/dist/endpoint/store.d.ts.map +0 -1
  476. package/dist/endpoint/store.js +0 -6
  477. package/dist/endpoint/store.js.map +0 -1
  478. package/dist/harness-mcp-contract.d.ts.map +0 -1
  479. package/dist/harness-mcp-contract.js +0 -113
  480. package/dist/harness-mcp-contract.js.map +0 -1
  481. package/dist/harness-mcp-http.d.ts.map +0 -1
  482. package/dist/harness-mcp-http.js.map +0 -1
  483. package/dist/harness-mcp-subscription.d.ts +0 -30
  484. package/dist/harness-mcp-subscription.d.ts.map +0 -1
  485. package/dist/harness-mcp-subscription.js +0 -361
  486. package/dist/harness-mcp-subscription.js.map +0 -1
  487. package/dist/harness-mcp-wire.d.ts.map +0 -1
  488. package/dist/harness-mcp-wire.js.map +0 -1
  489. package/dist/management-runtime.d.ts.map +0 -1
  490. package/dist/management-runtime.js.map +0 -1
  491. package/dist/message-text.d.ts.map +0 -1
  492. package/dist/message-text.js.map +0 -1
  493. package/dist/server.d.ts.map +0 -1
  494. package/dist/server.js.map +0 -1
  495. package/dist/server.types-check.d.ts.map +0 -1
  496. package/dist/server.types-check.js.map +0 -1
  497. /package/dist/{endpoint/store → store}/anchors.d.ts +0 -0
  498. /package/dist/{endpoint/store → store}/anchors.js +0 -0
  499. /package/dist/{endpoint/store → store}/database/index.d.ts +0 -0
  500. /package/dist/{endpoint/store → store}/database/index.js +0 -0
  501. /package/dist/{endpoint/store → store}/database/schema.d.ts +0 -0
  502. /package/dist/{endpoint/store → store}/database/values.d.ts +0 -0
  503. /package/dist/{endpoint/store → store}/database/values.js +0 -0
  504. /package/dist/{endpoint/store → store}/records.d.ts +0 -0
  505. /package/dist/{endpoint/store → store}/rows/index.d.ts +0 -0
  506. /package/dist/{endpoint/store → store}/rows/index.js +0 -0
  507. /package/dist/{endpoint/store → store}/types.js +0 -0
  508. /package/dist/{endpoint/collective → transport/collectives}/received-request.js +0 -0
  509. /package/dist/{endpoint/collective → transport/collectives}/request-sends.js +0 -0
  510. /package/dist/{endpoint/collective → transport/collectives}/shared-answers.js +0 -0
  511. /package/dist/{endpoint → transport/messaging}/recovery/barrier.js +0 -0
  512. /package/dist/{endpoint/router-worker → transport/router}/index.d.ts +0 -0
  513. /package/dist/{endpoint/router-worker → transport/router}/outage.d.ts +0 -0
  514. /package/dist/{endpoint/router-worker → transport/router}/outage.js +0 -0
  515. /package/dist/{endpoint/router-worker → transport/router}/types.js +0 -0
@@ -0,0 +1,787 @@
1
+ /** @file The values harness operations take, return and persist: sends, inbox pages, events and acknowledgments. */
2
+ import { Effect, type ParseResult, Schema, type SchemaAST } from "effect";
3
+ import type { SendError } from "../transport/messaging/errors.js";
4
+ import { DeliveryToken, type EndpointStore, type InboxSummary } from "../store/types.js";
5
+ import { type CollectiveError, CollectiveId, decodeCollectiveFailure } from "../transport/collectives/forms.js";
6
+ /** Canonical event identities reuse the immutable inbox binding's random bytes. */
7
+ export declare const eventIdSchema: Schema.filter<typeof Schema.String>;
8
+ /** Read-only content lookup never acknowledges or retries delivery. */
9
+ export declare const readEventRequestSchema: Schema.Struct<{
10
+ eventId: Schema.filter<typeof Schema.String>;
11
+ }>;
12
+ /** The original classified payload, including after its handoff. */
13
+ export declare const readEventResultSchema: Schema.Struct<{
14
+ item: Schema.Union<[Schema.Struct<{
15
+ kind: Schema.Literal<["multicast"]>;
16
+ message: Schema.Union<[Schema.filter<Schema.Struct<{
17
+ kind: Schema.Literal<["direct"]>;
18
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
19
+ address: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
20
+ sender: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
21
+ content: Schema.refine<readonly [{
22
+ readonly type: "text";
23
+ readonly text: string;
24
+ } | {
25
+ readonly type: "data";
26
+ readonly value: import("../index.js").JsonValue;
27
+ }, ...({
28
+ readonly type: "text";
29
+ readonly text: string;
30
+ } | {
31
+ readonly type: "data";
32
+ readonly value: import("../index.js").JsonValue;
33
+ })[]], Schema.NonEmptyArray<Schema.Union<[Schema.Struct<{
34
+ type: Schema.Literal<["text"]>;
35
+ text: Schema.filter<typeof Schema.String>;
36
+ }>, Schema.Struct<{
37
+ type: Schema.Literal<["data"]>;
38
+ value: Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>;
39
+ }>]>>>;
40
+ }>>, Schema.filter<Schema.Struct<{
41
+ kind: Schema.Literal<["group"]>;
42
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
43
+ address: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "GroupAddress">;
44
+ sender: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
45
+ members: Schema.filter<Schema.TupleType<readonly [Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">, Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">, Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">], [Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">]>>;
46
+ content: Schema.refine<readonly [{
47
+ readonly type: "text";
48
+ readonly text: string;
49
+ } | {
50
+ readonly type: "data";
51
+ readonly value: import("../index.js").JsonValue;
52
+ }, ...({
53
+ readonly type: "text";
54
+ readonly text: string;
55
+ } | {
56
+ readonly type: "data";
57
+ readonly value: import("../index.js").JsonValue;
58
+ })[]], Schema.NonEmptyArray<Schema.Union<[Schema.Struct<{
59
+ type: Schema.Literal<["text"]>;
60
+ text: Schema.filter<typeof Schema.String>;
61
+ }>, Schema.Struct<{
62
+ type: Schema.Literal<["data"]>;
63
+ value: Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>;
64
+ }>]>>>;
65
+ }>>]>;
66
+ }>, Schema.Struct<{
67
+ kind: Schema.Literal<["collectiveRequest"]>;
68
+ op: Schema.Literal<["gather", "all_gather"]>;
69
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
70
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
71
+ from: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
72
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
73
+ question: Schema.filter<typeof Schema.String>;
74
+ requestedSchema: Schema.Struct<{
75
+ $schema: Schema.optionalWith<typeof Schema.String, {
76
+ exact: true;
77
+ }>;
78
+ type: Schema.Literal<["object"]>;
79
+ properties: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>>>;
80
+ required: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
81
+ exact: true;
82
+ }>;
83
+ }>;
84
+ deadlineAt: Schema.filter<Schema.filter<typeof Schema.Number>>;
85
+ }>, Schema.Struct<{
86
+ kind: Schema.Literal<["collectiveResult"]>;
87
+ op: Schema.Literal<["gather", "all_gather"]>;
88
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
89
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
90
+ question: Schema.filter<typeof Schema.String>;
91
+ outcomes: Schema.NonEmptyArray<Schema.Struct<{
92
+ member: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
93
+ outcome: Schema.Union<[Schema.Struct<{
94
+ kind: Schema.Literal<["answered"]>;
95
+ content: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.filter<typeof Schema.Number>, typeof Schema.Boolean, Schema.Array$<typeof Schema.String>]>>;
96
+ }>, Schema.Struct<{
97
+ kind: Schema.Literal<["declined"]>;
98
+ }>, Schema.Struct<{
99
+ kind: Schema.Literal<["invalid"]>;
100
+ reason: typeof Schema.String;
101
+ }>, Schema.Struct<{
102
+ kind: Schema.Literal<["no-answer"]>;
103
+ }>]>;
104
+ }>>;
105
+ }>, Schema.Struct<{
106
+ kind: Schema.Literal<["operationFailed"]>;
107
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
108
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
109
+ error: typeof Schema.String;
110
+ }>]>;
111
+ }>;
112
+ /** A delivery acknowledgment names the delivery it retires. */
113
+ export declare const harnessAcknowledgeDeliveryRequestSchema: Schema.Struct<{
114
+ deliveryToken: Schema.brand<Schema.filter<typeof Schema.String>, "DeliveryToken">;
115
+ }>;
116
+ /**
117
+ * Runtime identity and routing of a refused gather or response.
118
+ * `inbound` is for a host whose tool returns before the
119
+ * send: the call completes and the error arrives as an `operationFailed`
120
+ * item. The default returns it as the tool error.
121
+ */
122
+ export declare const harnessSendOptionsSchema: Schema.Struct<{
123
+ idempotencyKey: Schema.optionalWith<Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>, {
124
+ exact: true;
125
+ }>;
126
+ failureDelivery: Schema.optionalWith<Schema.Literal<["result", "inbound"]>, {
127
+ exact: true;
128
+ }>;
129
+ }>;
130
+ /** The model-visible arguments of one send. */
131
+ export declare const harnessSendArgumentsSchema: Schema.Struct<{
132
+ input: Schema.Union<[Schema.Struct<{
133
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
134
+ text: Schema.filter<typeof Schema.String>;
135
+ collective: Schema.optionalWith<Schema.Union<[Schema.Struct<{
136
+ op: Schema.optionalWith<Schema.Literal<["multicast"]>, {
137
+ exact: true;
138
+ }>;
139
+ }>, Schema.Struct<{
140
+ op: Schema.Literal<["gather", "all_gather"]>;
141
+ deadline: Schema.filter<Schema.filter<typeof Schema.Number>>;
142
+ requestedSchema: Schema.Struct<{
143
+ $schema: Schema.optionalWith<typeof Schema.String, {
144
+ exact: true;
145
+ }>;
146
+ type: Schema.Literal<["object"]>;
147
+ properties: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>>>;
148
+ required: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
149
+ exact: true;
150
+ }>;
151
+ }>;
152
+ }>]>, {
153
+ exact: true;
154
+ }>;
155
+ }>, Schema.Struct<{
156
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
157
+ collectiveResponse: Schema.Union<[Schema.Struct<{
158
+ action: Schema.Literal<["accept"]>;
159
+ content: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.filter<typeof Schema.Number>, typeof Schema.Boolean, Schema.Array$<typeof Schema.String>]>>;
160
+ }>, Schema.Struct<{
161
+ action: Schema.Literal<["decline"]>;
162
+ }>]>;
163
+ }>]>;
164
+ }>;
165
+ declare const harnessSendRequestSchema: Schema.Struct<{
166
+ idempotencyKey: Schema.optionalWith<Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>, {
167
+ exact: true;
168
+ }>;
169
+ failureDelivery: Schema.optionalWith<Schema.Literal<["result", "inbound"]>, {
170
+ exact: true;
171
+ }>;
172
+ input: Schema.Union<[Schema.Struct<{
173
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
174
+ text: Schema.filter<typeof Schema.String>;
175
+ collective: Schema.optionalWith<Schema.Union<[Schema.Struct<{
176
+ op: Schema.optionalWith<Schema.Literal<["multicast"]>, {
177
+ exact: true;
178
+ }>;
179
+ }>, Schema.Struct<{
180
+ op: Schema.Literal<["gather", "all_gather"]>;
181
+ deadline: Schema.filter<Schema.filter<typeof Schema.Number>>;
182
+ requestedSchema: Schema.Struct<{
183
+ $schema: Schema.optionalWith<typeof Schema.String, {
184
+ exact: true;
185
+ }>;
186
+ type: Schema.Literal<["object"]>;
187
+ properties: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>>>;
188
+ required: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
189
+ exact: true;
190
+ }>;
191
+ }>;
192
+ }>]>, {
193
+ exact: true;
194
+ }>;
195
+ }>, Schema.Struct<{
196
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
197
+ collectiveResponse: Schema.Union<[Schema.Struct<{
198
+ action: Schema.Literal<["accept"]>;
199
+ content: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.filter<typeof Schema.Number>, typeof Schema.Boolean, Schema.Array$<typeof Schema.String>]>>;
200
+ }>, Schema.Struct<{
201
+ action: Schema.Literal<["decline"]>;
202
+ }>]>;
203
+ }>]>;
204
+ }>;
205
+ /**
206
+ * A completed operation. A collecting operation names the id its answers and
207
+ * result carry; a multicast has none, so its result is empty.
208
+ */
209
+ export declare const harnessSendResultSchema: Schema.Struct<{
210
+ operationId: Schema.optionalWith<Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">, {
211
+ exact: true;
212
+ }>;
213
+ }>;
214
+ declare const harnessMessageReadyEventSchema: Schema.Struct<{
215
+ deliveryToken: Schema.brand<Schema.filter<typeof Schema.String>, "DeliveryToken">;
216
+ item: Schema.Union<[Schema.Struct<{
217
+ kind: Schema.Literal<["multicast"]>;
218
+ message: Schema.Union<[Schema.filter<Schema.Struct<{
219
+ kind: Schema.Literal<["direct"]>;
220
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
221
+ address: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
222
+ sender: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
223
+ content: Schema.refine<readonly [{
224
+ readonly type: "text";
225
+ readonly text: string;
226
+ } | {
227
+ readonly type: "data";
228
+ readonly value: import("../index.js").JsonValue;
229
+ }, ...({
230
+ readonly type: "text";
231
+ readonly text: string;
232
+ } | {
233
+ readonly type: "data";
234
+ readonly value: import("../index.js").JsonValue;
235
+ })[]], Schema.NonEmptyArray<Schema.Union<[Schema.Struct<{
236
+ type: Schema.Literal<["text"]>;
237
+ text: Schema.filter<typeof Schema.String>;
238
+ }>, Schema.Struct<{
239
+ type: Schema.Literal<["data"]>;
240
+ value: Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>;
241
+ }>]>>>;
242
+ }>>, Schema.filter<Schema.Struct<{
243
+ kind: Schema.Literal<["group"]>;
244
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
245
+ address: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "GroupAddress">;
246
+ sender: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
247
+ members: Schema.filter<Schema.TupleType<readonly [Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">, Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">, Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">], [Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">]>>;
248
+ content: Schema.refine<readonly [{
249
+ readonly type: "text";
250
+ readonly text: string;
251
+ } | {
252
+ readonly type: "data";
253
+ readonly value: import("../index.js").JsonValue;
254
+ }, ...({
255
+ readonly type: "text";
256
+ readonly text: string;
257
+ } | {
258
+ readonly type: "data";
259
+ readonly value: import("../index.js").JsonValue;
260
+ })[]], Schema.NonEmptyArray<Schema.Union<[Schema.Struct<{
261
+ type: Schema.Literal<["text"]>;
262
+ text: Schema.filter<typeof Schema.String>;
263
+ }>, Schema.Struct<{
264
+ type: Schema.Literal<["data"]>;
265
+ value: Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>;
266
+ }>]>>>;
267
+ }>>]>;
268
+ }>, Schema.Struct<{
269
+ kind: Schema.Literal<["collectiveRequest"]>;
270
+ op: Schema.Literal<["gather", "all_gather"]>;
271
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
272
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
273
+ from: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
274
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
275
+ question: Schema.filter<typeof Schema.String>;
276
+ requestedSchema: Schema.Struct<{
277
+ $schema: Schema.optionalWith<typeof Schema.String, {
278
+ exact: true;
279
+ }>;
280
+ type: Schema.Literal<["object"]>;
281
+ properties: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>>>;
282
+ required: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
283
+ exact: true;
284
+ }>;
285
+ }>;
286
+ deadlineAt: Schema.filter<Schema.filter<typeof Schema.Number>>;
287
+ }>, Schema.Struct<{
288
+ kind: Schema.Literal<["collectiveResult"]>;
289
+ op: Schema.Literal<["gather", "all_gather"]>;
290
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
291
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
292
+ question: Schema.filter<typeof Schema.String>;
293
+ outcomes: Schema.NonEmptyArray<Schema.Struct<{
294
+ member: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
295
+ outcome: Schema.Union<[Schema.Struct<{
296
+ kind: Schema.Literal<["answered"]>;
297
+ content: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.filter<typeof Schema.Number>, typeof Schema.Boolean, Schema.Array$<typeof Schema.String>]>>;
298
+ }>, Schema.Struct<{
299
+ kind: Schema.Literal<["declined"]>;
300
+ }>, Schema.Struct<{
301
+ kind: Schema.Literal<["invalid"]>;
302
+ reason: typeof Schema.String;
303
+ }>, Schema.Struct<{
304
+ kind: Schema.Literal<["no-answer"]>;
305
+ }>]>;
306
+ }>>;
307
+ }>, Schema.Struct<{
308
+ kind: Schema.Literal<["operationFailed"]>;
309
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
310
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
311
+ error: typeof Schema.String;
312
+ }>]>;
313
+ }>;
314
+ /** One page request over the classified inbox. */
315
+ export declare const inboxRequestSchema: Schema.Struct<{
316
+ cursor: Schema.optionalWith<typeof Schema.String, {
317
+ exact: true;
318
+ }>;
319
+ }>;
320
+ /** One page of classified deliveries and the cursor after it. */
321
+ export declare const inboxResultSchema: Schema.Struct<{
322
+ items: Schema.Array$<Schema.Struct<{
323
+ deliveryToken: Schema.brand<Schema.filter<typeof Schema.String>, "DeliveryToken">;
324
+ item: Schema.Union<[Schema.Struct<{
325
+ kind: Schema.Literal<["multicast"]>;
326
+ message: Schema.Union<[Schema.filter<Schema.Struct<{
327
+ kind: Schema.Literal<["direct"]>;
328
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
329
+ address: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
330
+ sender: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
331
+ content: Schema.refine<readonly [{
332
+ readonly type: "text";
333
+ readonly text: string;
334
+ } | {
335
+ readonly type: "data";
336
+ readonly value: import("../index.js").JsonValue;
337
+ }, ...({
338
+ readonly type: "text";
339
+ readonly text: string;
340
+ } | {
341
+ readonly type: "data";
342
+ readonly value: import("../index.js").JsonValue;
343
+ })[]], Schema.NonEmptyArray<Schema.Union<[Schema.Struct<{
344
+ type: Schema.Literal<["text"]>;
345
+ text: Schema.filter<typeof Schema.String>;
346
+ }>, Schema.Struct<{
347
+ type: Schema.Literal<["data"]>;
348
+ value: Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>;
349
+ }>]>>>;
350
+ }>>, Schema.filter<Schema.Struct<{
351
+ kind: Schema.Literal<["group"]>;
352
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
353
+ address: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "GroupAddress">;
354
+ sender: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
355
+ members: Schema.filter<Schema.TupleType<readonly [Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">, Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">, Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">], [Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">]>>;
356
+ content: Schema.refine<readonly [{
357
+ readonly type: "text";
358
+ readonly text: string;
359
+ } | {
360
+ readonly type: "data";
361
+ readonly value: import("../index.js").JsonValue;
362
+ }, ...({
363
+ readonly type: "text";
364
+ readonly text: string;
365
+ } | {
366
+ readonly type: "data";
367
+ readonly value: import("../index.js").JsonValue;
368
+ })[]], Schema.NonEmptyArray<Schema.Union<[Schema.Struct<{
369
+ type: Schema.Literal<["text"]>;
370
+ text: Schema.filter<typeof Schema.String>;
371
+ }>, Schema.Struct<{
372
+ type: Schema.Literal<["data"]>;
373
+ value: Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>;
374
+ }>]>>>;
375
+ }>>]>;
376
+ }>, Schema.Struct<{
377
+ kind: Schema.Literal<["collectiveRequest"]>;
378
+ op: Schema.Literal<["gather", "all_gather"]>;
379
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
380
+ postId: Schema.brand<Schema.filter<typeof Schema.String>, "PostId">;
381
+ from: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
382
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
383
+ question: Schema.filter<typeof Schema.String>;
384
+ requestedSchema: Schema.Struct<{
385
+ $schema: Schema.optionalWith<typeof Schema.String, {
386
+ exact: true;
387
+ }>;
388
+ type: Schema.Literal<["object"]>;
389
+ properties: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>>>;
390
+ required: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
391
+ exact: true;
392
+ }>;
393
+ }>;
394
+ deadlineAt: Schema.filter<Schema.filter<typeof Schema.Number>>;
395
+ }>, Schema.Struct<{
396
+ kind: Schema.Literal<["collectiveResult"]>;
397
+ op: Schema.Literal<["gather", "all_gather"]>;
398
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
399
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
400
+ question: Schema.filter<typeof Schema.String>;
401
+ outcomes: Schema.NonEmptyArray<Schema.Struct<{
402
+ member: Schema.brand<Schema.filter<Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">>, "AgentAddress">;
403
+ outcome: Schema.Union<[Schema.Struct<{
404
+ kind: Schema.Literal<["answered"]>;
405
+ content: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.filter<typeof Schema.Number>, typeof Schema.Boolean, Schema.Array$<typeof Schema.String>]>>;
406
+ }>, Schema.Struct<{
407
+ kind: Schema.Literal<["declined"]>;
408
+ }>, Schema.Struct<{
409
+ kind: Schema.Literal<["invalid"]>;
410
+ reason: typeof Schema.String;
411
+ }>, Schema.Struct<{
412
+ kind: Schema.Literal<["no-answer"]>;
413
+ }>]>;
414
+ }>>;
415
+ }>, Schema.Struct<{
416
+ kind: Schema.Literal<["operationFailed"]>;
417
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
418
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
419
+ error: typeof Schema.String;
420
+ }>]>;
421
+ }>>;
422
+ nextCursor: Schema.optionalWith<typeof Schema.String, {
423
+ exact: true;
424
+ }>;
425
+ }>;
426
+ /** Caller-selected identity of one previously attempted send. */
427
+ export declare const readSendRequestSchema: Schema.Struct<{
428
+ idempotencyKey: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
429
+ }>;
430
+ /** Exact retained result of one invocation; failure is not proof of no post. */
431
+ declare const harnessSendOutcomeSchema: Schema.Union<[Schema.Struct<{
432
+ kind: Schema.Literal<["success"]>;
433
+ result: Schema.Struct<{
434
+ operationId: Schema.optionalWith<Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">, {
435
+ exact: true;
436
+ }>;
437
+ }>;
438
+ }>, Schema.Struct<{
439
+ kind: Schema.Literal<["failure"]>;
440
+ error: Schema.Union<[Schema.Struct<{
441
+ reason: Schema.Literal<["collective-failed"]>;
442
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
443
+ failure: typeof Schema.Unknown;
444
+ }>, Schema.Struct<{
445
+ reason: typeof Schema.String;
446
+ detail: Schema.optionalWith<typeof Schema.String, {
447
+ exact: true;
448
+ }>;
449
+ }>]>;
450
+ }>]>;
451
+ /** Observed invocation evidence without a collective completion claim. */
452
+ export declare const readSendResultSchema: Schema.Union<[Schema.Struct<{
453
+ state: Schema.Literal<["absent"]>;
454
+ }>, Schema.Struct<{
455
+ state: Schema.Literal<["pending", "indeterminate"]>;
456
+ input: Schema.Union<[Schema.Struct<{
457
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
458
+ text: Schema.filter<typeof Schema.String>;
459
+ collective: Schema.optionalWith<Schema.Union<[Schema.Struct<{
460
+ op: Schema.optionalWith<Schema.Literal<["multicast"]>, {
461
+ exact: true;
462
+ }>;
463
+ }>, Schema.Struct<{
464
+ op: Schema.Literal<["gather", "all_gather"]>;
465
+ deadline: Schema.filter<Schema.filter<typeof Schema.Number>>;
466
+ requestedSchema: Schema.Struct<{
467
+ $schema: Schema.optionalWith<typeof Schema.String, {
468
+ exact: true;
469
+ }>;
470
+ type: Schema.Literal<["object"]>;
471
+ properties: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>>>;
472
+ required: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
473
+ exact: true;
474
+ }>;
475
+ }>;
476
+ }>]>, {
477
+ exact: true;
478
+ }>;
479
+ }>, Schema.Struct<{
480
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
481
+ collectiveResponse: Schema.Union<[Schema.Struct<{
482
+ action: Schema.Literal<["accept"]>;
483
+ content: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.filter<typeof Schema.Number>, typeof Schema.Boolean, Schema.Array$<typeof Schema.String>]>>;
484
+ }>, Schema.Struct<{
485
+ action: Schema.Literal<["decline"]>;
486
+ }>]>;
487
+ }>]>;
488
+ }>, Schema.Struct<{
489
+ state: Schema.Literal<["returned"]>;
490
+ input: Schema.Union<[Schema.Struct<{
491
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
492
+ text: Schema.filter<typeof Schema.String>;
493
+ collective: Schema.optionalWith<Schema.Union<[Schema.Struct<{
494
+ op: Schema.optionalWith<Schema.Literal<["multicast"]>, {
495
+ exact: true;
496
+ }>;
497
+ }>, Schema.Struct<{
498
+ op: Schema.Literal<["gather", "all_gather"]>;
499
+ deadline: Schema.filter<Schema.filter<typeof Schema.Number>>;
500
+ requestedSchema: Schema.Struct<{
501
+ $schema: Schema.optionalWith<typeof Schema.String, {
502
+ exact: true;
503
+ }>;
504
+ type: Schema.Literal<["object"]>;
505
+ properties: Schema.Record$<typeof Schema.String, Schema.Record$<typeof Schema.String, Schema.Schema<import("../index.js").JsonValue, import("../index.js").JsonValue, never>>>;
506
+ required: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
507
+ exact: true;
508
+ }>;
509
+ }>;
510
+ }>]>, {
511
+ exact: true;
512
+ }>;
513
+ }>, Schema.Struct<{
514
+ to: Schema.brand<Schema.filter<typeof Schema.String>, "MessageAddressInput">;
515
+ collectiveResponse: Schema.Union<[Schema.Struct<{
516
+ action: Schema.Literal<["accept"]>;
517
+ content: Schema.Record$<typeof Schema.String, Schema.Union<[typeof Schema.String, Schema.filter<typeof Schema.Number>, typeof Schema.Boolean, Schema.Array$<typeof Schema.String>]>>;
518
+ }>, Schema.Struct<{
519
+ action: Schema.Literal<["decline"]>;
520
+ }>]>;
521
+ }>]>;
522
+ outcome: Schema.Union<[Schema.Struct<{
523
+ kind: Schema.Literal<["success"]>;
524
+ result: Schema.Struct<{
525
+ operationId: Schema.optionalWith<Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">, {
526
+ exact: true;
527
+ }>;
528
+ }>;
529
+ }>, Schema.Struct<{
530
+ kind: Schema.Literal<["failure"]>;
531
+ error: Schema.Union<[Schema.Struct<{
532
+ reason: Schema.Literal<["collective-failed"]>;
533
+ id: Schema.brand<Schema.filter<typeof Schema.String>, "CollectiveId">;
534
+ failure: typeof Schema.Unknown;
535
+ }>, Schema.Struct<{
536
+ reason: typeof Schema.String;
537
+ detail: Schema.optionalWith<typeof Schema.String, {
538
+ exact: true;
539
+ }>;
540
+ }>]>;
541
+ }>]>;
542
+ }>]>;
543
+ /** Validate the persisted wire outcome before reconstructing a typed send result. */
544
+ export declare const decodeHarnessSendOutcome: (u: unknown, overrideOptions?: SchemaAST.ParseOptions) => Effect.Effect<{
545
+ readonly kind: "success";
546
+ readonly result: {
547
+ readonly operationId?: (string & import("effect/Brand").Brand<"CollectiveId">) | undefined;
548
+ };
549
+ } | {
550
+ readonly kind: "failure";
551
+ readonly error: {
552
+ readonly reason: "collective-failed";
553
+ readonly id: string & import("effect/Brand").Brand<"CollectiveId">;
554
+ readonly failure: unknown;
555
+ } | {
556
+ readonly reason: string;
557
+ readonly detail?: string | undefined;
558
+ };
559
+ }, ParseResult.ParseError, never>;
560
+ /** Decoded pagination request for the current classified inbox. */
561
+ export type HarnessReadInboxRequest = typeof inboxRequestSchema.Type;
562
+ /** Classified deliveries, bounded by the daemon's snapshot pagination. */
563
+ export type HarnessReadInboxResult = typeof inboxResultSchema.Type;
564
+ /** Caller-selected identity of one previously attempted send. */
565
+ export type HarnessReadSendRequest = typeof readSendRequestSchema.Type;
566
+ /** Observed invocation evidence without a collective completion claim. */
567
+ export type HarnessReadSendResult = typeof readSendResultSchema.Type;
568
+ /** Retained tool outcome for a keyed invocation. */
569
+ export type HarnessSendOutcome = typeof harnessSendOutcomeSchema.Type;
570
+ /** Decode a bounded inbox page received through the MCP transport. */
571
+ export declare const decodeHarnessReadInboxResult: (u: unknown, overrideOptions?: SchemaAST.ParseOptions) => Effect.Effect<{
572
+ readonly items: readonly {
573
+ readonly deliveryToken: string & import("effect/Brand").Brand<"DeliveryToken">;
574
+ readonly item: {
575
+ readonly kind: "multicast";
576
+ readonly message: {
577
+ readonly kind: "direct";
578
+ readonly postId: string & import("effect/Brand").Brand<"PostId">;
579
+ readonly address: string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">;
580
+ readonly sender: string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">;
581
+ readonly content: readonly [{
582
+ readonly type: "text";
583
+ readonly text: string;
584
+ } | {
585
+ readonly type: "data";
586
+ readonly value: import("../index.js").JsonValue;
587
+ }, ...({
588
+ readonly type: "text";
589
+ readonly text: string;
590
+ } | {
591
+ readonly type: "data";
592
+ readonly value: import("../index.js").JsonValue;
593
+ })[]];
594
+ } | {
595
+ readonly kind: "group";
596
+ readonly postId: string & import("effect/Brand").Brand<"PostId">;
597
+ readonly address: string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"GroupAddress">;
598
+ readonly sender: string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">;
599
+ readonly members: readonly [string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">, string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">, string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">, ...(string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">)[]];
600
+ readonly content: readonly [{
601
+ readonly type: "text";
602
+ readonly text: string;
603
+ } | {
604
+ readonly type: "data";
605
+ readonly value: import("../index.js").JsonValue;
606
+ }, ...({
607
+ readonly type: "text";
608
+ readonly text: string;
609
+ } | {
610
+ readonly type: "data";
611
+ readonly value: import("../index.js").JsonValue;
612
+ })[]];
613
+ };
614
+ } | {
615
+ readonly kind: "collectiveRequest";
616
+ readonly op: "all_gather" | "gather";
617
+ readonly id: string & import("effect/Brand").Brand<"CollectiveId">;
618
+ readonly postId: string & import("effect/Brand").Brand<"PostId">;
619
+ readonly from: string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">;
620
+ readonly to: string & import("effect/Brand").Brand<"MessageAddressInput">;
621
+ readonly question: string;
622
+ readonly requestedSchema: {
623
+ readonly $schema?: string | undefined;
624
+ readonly type: "object";
625
+ readonly properties: {
626
+ readonly [x: string]: {
627
+ readonly [x: string]: import("../index.js").JsonValue;
628
+ };
629
+ };
630
+ readonly required?: readonly string[] | undefined;
631
+ };
632
+ readonly deadlineAt: number;
633
+ } | {
634
+ readonly kind: "collectiveResult";
635
+ readonly op: "all_gather" | "gather";
636
+ readonly id: string & import("effect/Brand").Brand<"CollectiveId">;
637
+ readonly to: string & import("effect/Brand").Brand<"MessageAddressInput">;
638
+ readonly question: string;
639
+ readonly outcomes: readonly [{
640
+ readonly member: string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">;
641
+ readonly outcome: {
642
+ readonly kind: "answered";
643
+ readonly content: {
644
+ readonly [x: string]: string | number | boolean | readonly string[];
645
+ };
646
+ } | {
647
+ readonly kind: "declined";
648
+ } | {
649
+ readonly kind: "invalid";
650
+ readonly reason: string;
651
+ } | {
652
+ readonly kind: "no-answer";
653
+ };
654
+ }, ...{
655
+ readonly member: string & import("effect/Brand").Brand<"MessageAddressInput"> & import("effect/Brand").Brand<"AgentAddress">;
656
+ readonly outcome: {
657
+ readonly kind: "answered";
658
+ readonly content: {
659
+ readonly [x: string]: string | number | boolean | readonly string[];
660
+ };
661
+ } | {
662
+ readonly kind: "declined";
663
+ } | {
664
+ readonly kind: "invalid";
665
+ readonly reason: string;
666
+ } | {
667
+ readonly kind: "no-answer";
668
+ };
669
+ }[]];
670
+ } | {
671
+ readonly kind: "operationFailed";
672
+ readonly id: string & import("effect/Brand").Brand<"CollectiveId">;
673
+ readonly to: string & import("effect/Brand").Brand<"MessageAddressInput">;
674
+ readonly error: string;
675
+ };
676
+ }[];
677
+ readonly nextCursor?: string | undefined;
678
+ }, ParseResult.ParseError, never>;
679
+ /** Validate the keyed lookup at the tool boundary, including its UTF-8 bound. */
680
+ export declare const decodeHarnessReadSendRequest: (u: unknown, overrideOptions?: SchemaAST.ParseOptions) => Effect.Effect<{
681
+ readonly idempotencyKey: string;
682
+ }, ParseResult.ParseError, never>;
683
+ /** Validate a daemon invocation before binding its input in the durable store. */
684
+ export declare const decodeHarnessSendRequest: (u: unknown, overrideOptions?: SchemaAST.ParseOptions) => Effect.Effect<{
685
+ readonly idempotencyKey?: string | undefined;
686
+ readonly failureDelivery?: "inbound" | "result" | undefined;
687
+ readonly input: {
688
+ readonly to: string & import("effect/Brand").Brand<"MessageAddressInput">;
689
+ readonly text: string;
690
+ readonly collective?: {
691
+ readonly op?: "multicast" | undefined;
692
+ } | {
693
+ readonly op: "all_gather" | "gather";
694
+ readonly deadline: number;
695
+ readonly requestedSchema: {
696
+ readonly $schema?: string | undefined;
697
+ readonly type: "object";
698
+ readonly properties: {
699
+ readonly [x: string]: {
700
+ readonly [x: string]: import("../index.js").JsonValue;
701
+ };
702
+ };
703
+ readonly required?: readonly string[] | undefined;
704
+ };
705
+ } | undefined;
706
+ } | {
707
+ readonly to: string & import("effect/Brand").Brand<"MessageAddressInput">;
708
+ readonly collectiveResponse: {
709
+ readonly action: "accept";
710
+ readonly content: {
711
+ readonly [x: string]: string | number | boolean | readonly string[];
712
+ };
713
+ } | {
714
+ readonly action: "decline";
715
+ };
716
+ };
717
+ }, ParseResult.ParseError, never>;
718
+ /** Decoded delivery acknowledgment arguments owned by the daemon. */
719
+ export type HarnessAcknowledgeDeliveryRequest = typeof harnessAcknowledgeDeliveryRequestSchema.Type;
720
+ /** Semantic arguments advertised to the host's model tool projection. */
721
+ export type HarnessSendArguments = typeof harnessSendArgumentsSchema.Type;
722
+ /** Validated semantic input and runtime options of one daemon invocation. */
723
+ export type HarnessSendRequest = typeof harnessSendRequestSchema.Type;
724
+ /** Decoded error data of one refused `send_message` call. */
725
+ export type HarnessSendErrorData = Readonly<{
726
+ reason: string;
727
+ detail?: string;
728
+ }> | Readonly<{
729
+ reason: "collective-failed";
730
+ id: CollectiveId;
731
+ failure: Effect.Effect.Success<ReturnType<typeof decodeCollectiveFailure>>;
732
+ }>;
733
+ /**
734
+ * The error data a refused send carries across the daemon boundary and into
735
+ * its durable invocation record: a collective failure keeps its id and the
736
+ * members or fields it names, and a send failure keeps the detail naming its
737
+ * cause, so the receiving side rebuilds the same typed error and message.
738
+ * @param error The refused send's typed error.
739
+ * @returns The JSON error data.
740
+ */
741
+ export declare function sendErrorData(error: SendError | CollectiveError): HarnessSendErrorData;
742
+ /** Decoded result of one `send_message` operation. */
743
+ export type HarnessSendResult = typeof harnessSendResultSchema.Type;
744
+ /** One stable pending inbound item emitted by the daemon. */
745
+ export type HarnessMessageReadyEvent = typeof harnessMessageReadyEventSchema.Type;
746
+ /**
747
+ * Decode one exact delivery acknowledgment request.
748
+ * @param value Untrusted tool arguments.
749
+ * @returns The validated request.
750
+ */
751
+ export declare function decodeHarnessAcknowledgeDeliveryRequest(value: unknown): Effect.Effect<HarnessAcknowledgeDeliveryRequest, ParseResult.ParseError>;
752
+ /**
753
+ * Decode one exact pending-delivery notification payload.
754
+ * @param value Untrusted notification parameters.
755
+ * @returns The validated pending delivery.
756
+ */
757
+ export declare function decodeHarnessMessageReadyEvent(value: unknown): Effect.Effect<HarnessMessageReadyEvent, ParseResult.ParseError>;
758
+ /**
759
+ * Decode the error data of one refused `send_message` call.
760
+ * @param value Untrusted JSON-RPC error data.
761
+ * @returns The collective failure or send reason it carries.
762
+ */
763
+ export declare function decodeHarnessSendErrorData(value: unknown): Effect.Effect<HarnessSendErrorData, ParseResult.ParseError>;
764
+ /**
765
+ * Decode one `send_message` result.
766
+ * @param value Untrusted structured tool content.
767
+ * @returns The operation id a gather names, if any.
768
+ */
769
+ export declare function decodeHarnessSendResult(value: unknown): Effect.Effect<HarnessSendResult, ParseResult.ParseError>;
770
+ /** The existing endpoint store owns both callback progress and immutable inbox items. */
771
+ export type EventStore = Pick<EndpointStore, "readEventState" | "writeEventState" | "readInbox" | "readInboxItem" | "readInboxSummary" | "completeWebhookDelivery">;
772
+ /** Reversible naming keeps lookup independent of subscription and retry state. */
773
+ export declare const eventIdOf: (token: DeliveryToken) => string;
774
+ type ClosedOperationError = Readonly<{
775
+ readonly reason: string;
776
+ }>;
777
+ /** The delivery operations a host calls: inbox and event reads, sends, and acknowledgments. */
778
+ export interface DeliveryOperations {
779
+ readonly readEvent: (input: typeof readEventRequestSchema.Type) => Effect.Effect<typeof readEventResultSchema.Type, ClosedOperationError>;
780
+ readonly readInboxSummary: () => Effect.Effect<InboxSummary, ClosedOperationError>;
781
+ readonly readInbox: (input: HarnessReadInboxRequest) => Effect.Effect<HarnessReadInboxResult, ClosedOperationError>;
782
+ readonly readSend: (input: HarnessReadSendRequest) => Effect.Effect<HarnessReadSendResult, ClosedOperationError>;
783
+ readonly send: (request: HarnessSendRequest) => Effect.Effect<HarnessSendResult, SendError | CollectiveError>;
784
+ readonly acknowledgeDelivery: (deliveryToken: DeliveryToken) => Effect.Effect<void, ClosedOperationError>;
785
+ }
786
+ export {};
787
+ //# sourceMappingURL=operations.d.ts.map