effect 4.0.2 → 4.0.4

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 (389) hide show
  1. package/AGENTS.md +24 -0
  2. package/CLAUDE.md +24 -0
  3. package/ai-docs/package.json +2 -2
  4. package/ai-docs/src/52_graphql/10_basics.ts +111 -0
  5. package/ai-docs/src/52_graphql/20_testing.ts +45 -0
  6. package/ai-docs/src/52_graphql/30_batching.ts +116 -0
  7. package/ai-docs/src/52_graphql/40_aliased-batching.ts +122 -0
  8. package/ai-docs/src/52_graphql/50_errors-and-retries.ts +74 -0
  9. package/ai-docs/src/52_graphql/index.md +6 -0
  10. package/dist/Context.d.ts.map +1 -1
  11. package/dist/Context.js +12 -3
  12. package/dist/Context.js.map +1 -1
  13. package/dist/Crypto.d.ts +33 -5
  14. package/dist/Crypto.d.ts.map +1 -1
  15. package/dist/Crypto.js +8 -2
  16. package/dist/Crypto.js.map +1 -1
  17. package/dist/DateTime.d.ts +9 -6
  18. package/dist/DateTime.d.ts.map +1 -1
  19. package/dist/DateTime.js +9 -6
  20. package/dist/DateTime.js.map +1 -1
  21. package/dist/Duration.d.ts +6 -6
  22. package/dist/Duration.d.ts.map +1 -1
  23. package/dist/Duration.js +27 -8
  24. package/dist/Duration.js.map +1 -1
  25. package/dist/FileSystem.d.ts +44 -2
  26. package/dist/FileSystem.d.ts.map +1 -1
  27. package/dist/FileSystem.js.map +1 -1
  28. package/dist/RequestResolver.d.ts.map +1 -1
  29. package/dist/RequestResolver.js +4 -10
  30. package/dist/RequestResolver.js.map +1 -1
  31. package/dist/Scheduler.d.ts +9 -0
  32. package/dist/Scheduler.d.ts.map +1 -1
  33. package/dist/Scheduler.js +9 -0
  34. package/dist/Scheduler.js.map +1 -1
  35. package/dist/Schema.d.ts +481 -1
  36. package/dist/Schema.d.ts.map +1 -1
  37. package/dist/Schema.js +362 -4
  38. package/dist/Schema.js.map +1 -1
  39. package/dist/SchemaGetter.d.ts +4 -0
  40. package/dist/SchemaGetter.d.ts.map +1 -1
  41. package/dist/SchemaGetter.js +52 -33
  42. package/dist/SchemaGetter.js.map +1 -1
  43. package/dist/Sink.d.ts.map +1 -1
  44. package/dist/Sink.js +38 -17
  45. package/dist/Sink.js.map +1 -1
  46. package/dist/Stdio.d.ts +7 -1
  47. package/dist/Stdio.d.ts.map +1 -1
  48. package/dist/Stdio.js +1 -0
  49. package/dist/Stdio.js.map +1 -1
  50. package/dist/Stream.d.ts +22 -11
  51. package/dist/Stream.d.ts.map +1 -1
  52. package/dist/Stream.js +21 -6
  53. package/dist/Stream.js.map +1 -1
  54. package/dist/Utils.js +8 -3
  55. package/dist/Utils.js.map +1 -1
  56. package/dist/ai/AnthropicStructuredOutput.js +0 -2
  57. package/dist/ai/AnthropicStructuredOutput.js.map +1 -1
  58. package/dist/ai/Chat.d.ts +2 -2
  59. package/dist/ai/Chat.d.ts.map +1 -1
  60. package/dist/ai/LanguageModel.d.ts +38 -7
  61. package/dist/ai/LanguageModel.d.ts.map +1 -1
  62. package/dist/ai/LanguageModel.js +25 -7
  63. package/dist/ai/LanguageModel.js.map +1 -1
  64. package/dist/ai/McpServer.d.ts +61 -0
  65. package/dist/ai/McpServer.d.ts.map +1 -1
  66. package/dist/ai/McpServer.js +196 -44
  67. package/dist/ai/McpServer.js.map +1 -1
  68. package/dist/ai/Prompt.d.ts.map +1 -1
  69. package/dist/ai/Prompt.js +28 -5
  70. package/dist/ai/Prompt.js.map +1 -1
  71. package/dist/ai/Response.d.ts +4 -3
  72. package/dist/ai/Response.d.ts.map +1 -1
  73. package/dist/ai/Response.js.map +1 -1
  74. package/dist/ai/internal/mcpProtocol/v2026_07_28.js +5 -0
  75. package/dist/ai/internal/mcpProtocol/v2026_07_28.js.map +1 -1
  76. package/dist/ai/internal/mcpProtocol.js.map +1 -1
  77. package/dist/ai/internal/mcpRuntime.js +1 -0
  78. package/dist/ai/internal/mcpRuntime.js.map +1 -1
  79. package/dist/cli/CliOutput.d.ts +27 -0
  80. package/dist/cli/CliOutput.d.ts.map +1 -1
  81. package/dist/cli/CliOutput.js +33 -10
  82. package/dist/cli/CliOutput.js.map +1 -1
  83. package/dist/cli/Command.d.ts.map +1 -1
  84. package/dist/cli/Command.js +6 -3
  85. package/dist/cli/Command.js.map +1 -1
  86. package/dist/cli/Completions.d.ts +3 -3
  87. package/dist/cli/Completions.d.ts.map +1 -1
  88. package/dist/cli/Completions.js +8 -5
  89. package/dist/cli/Completions.js.map +1 -1
  90. package/dist/cli/GlobalFlag.d.ts +5 -4
  91. package/dist/cli/GlobalFlag.d.ts.map +1 -1
  92. package/dist/cli/GlobalFlag.js +3 -3
  93. package/dist/cli/GlobalFlag.js.map +1 -1
  94. package/dist/cli/Prompt.d.ts +17 -1
  95. package/dist/cli/Prompt.d.ts.map +1 -1
  96. package/dist/cli/Prompt.js +119 -114
  97. package/dist/cli/Prompt.js.map +1 -1
  98. package/dist/cli/internal/ansi.d.ts +0 -1
  99. package/dist/cli/internal/ansi.d.ts.map +1 -1
  100. package/dist/cli/internal/ansi.js +20 -3
  101. package/dist/cli/internal/ansi.js.map +1 -1
  102. package/dist/cli/internal/completions/powershell.d.ts +2 -0
  103. package/dist/cli/internal/completions/powershell.d.ts.map +1 -0
  104. package/dist/cli/internal/completions/powershell.js +273 -0
  105. package/dist/cli/internal/completions/powershell.js.map +1 -0
  106. package/dist/cli/internal/completions/zsh.js +3 -2
  107. package/dist/cli/internal/completions/zsh.js.map +1 -1
  108. package/dist/cli/internal/wizard.d.ts +3 -3
  109. package/dist/cli/internal/wizard.d.ts.map +1 -1
  110. package/dist/cli/internal/wizard.js +21 -18
  111. package/dist/cli/internal/wizard.js.map +1 -1
  112. package/dist/cluster/ClusterSchema.d.ts +28 -0
  113. package/dist/cluster/ClusterSchema.d.ts.map +1 -1
  114. package/dist/cluster/ClusterSchema.js +30 -0
  115. package/dist/cluster/ClusterSchema.js.map +1 -1
  116. package/dist/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
  117. package/dist/cluster/ClusterWorkflowEngine.js +56 -26
  118. package/dist/cluster/ClusterWorkflowEngine.js.map +1 -1
  119. package/dist/cluster/MessageStorage.d.ts +18 -3
  120. package/dist/cluster/MessageStorage.d.ts.map +1 -1
  121. package/dist/cluster/MessageStorage.js +31 -11
  122. package/dist/cluster/MessageStorage.js.map +1 -1
  123. package/dist/cluster/Runners.d.ts.map +1 -1
  124. package/dist/cluster/Runners.js +8 -2
  125. package/dist/cluster/Runners.js.map +1 -1
  126. package/dist/cluster/Sharding.d.ts.map +1 -1
  127. package/dist/cluster/Sharding.js +187 -66
  128. package/dist/cluster/Sharding.js.map +1 -1
  129. package/dist/cluster/SqlMessageStorage.d.ts +59 -19
  130. package/dist/cluster/SqlMessageStorage.d.ts.map +1 -1
  131. package/dist/cluster/SqlMessageStorage.js +84 -55
  132. package/dist/cluster/SqlMessageStorage.js.map +1 -1
  133. package/dist/cluster/SqlRunnerStorage.d.ts +68 -19
  134. package/dist/cluster/SqlRunnerStorage.d.ts.map +1 -1
  135. package/dist/cluster/SqlRunnerStorage.js +191 -113
  136. package/dist/cluster/SqlRunnerStorage.js.map +1 -1
  137. package/dist/cluster/internal/entityManager.js +104 -37
  138. package/dist/cluster/internal/entityManager.js.map +1 -1
  139. package/dist/encoding/Sse.d.ts +6 -0
  140. package/dist/encoding/Sse.d.ts.map +1 -1
  141. package/dist/encoding/Sse.js +62 -70
  142. package/dist/encoding/Sse.js.map +1 -1
  143. package/dist/graphql/GraphQL.d.ts +349 -0
  144. package/dist/graphql/GraphQL.d.ts.map +1 -0
  145. package/dist/graphql/GraphQL.js +207 -0
  146. package/dist/graphql/GraphQL.js.map +1 -0
  147. package/dist/graphql/GraphQLClient.d.ts +562 -0
  148. package/dist/graphql/GraphQLClient.d.ts.map +1 -0
  149. package/dist/graphql/GraphQLClient.js +498 -0
  150. package/dist/graphql/GraphQLClient.js.map +1 -0
  151. package/dist/graphql/GraphQLClientError.d.ts +445 -0
  152. package/dist/graphql/GraphQLClientError.d.ts.map +1 -0
  153. package/dist/graphql/GraphQLClientError.js +479 -0
  154. package/dist/graphql/GraphQLClientError.js.map +1 -0
  155. package/dist/graphql/GraphQLGroup.d.ts +118 -0
  156. package/dist/graphql/GraphQLGroup.d.ts.map +1 -0
  157. package/dist/graphql/GraphQLGroup.js +109 -0
  158. package/dist/graphql/GraphQLGroup.js.map +1 -0
  159. package/dist/graphql/GraphQLMiddleware.d.ts +249 -0
  160. package/dist/graphql/GraphQLMiddleware.d.ts.map +1 -0
  161. package/dist/graphql/GraphQLMiddleware.js +130 -0
  162. package/dist/graphql/GraphQLMiddleware.js.map +1 -0
  163. package/dist/graphql/GraphQLProtocol.d.ts +731 -0
  164. package/dist/graphql/GraphQLProtocol.d.ts.map +1 -0
  165. package/dist/graphql/GraphQLProtocol.js +719 -0
  166. package/dist/graphql/GraphQLProtocol.js.map +1 -0
  167. package/dist/graphql/GraphQLResolver.d.ts +453 -0
  168. package/dist/graphql/GraphQLResolver.d.ts.map +1 -0
  169. package/dist/graphql/GraphQLResolver.js +552 -0
  170. package/dist/graphql/GraphQLResolver.js.map +1 -0
  171. package/dist/graphql/index.d.ts +40 -0
  172. package/dist/graphql/index.d.ts.map +1 -0
  173. package/dist/graphql/index.js +41 -0
  174. package/dist/graphql/index.js.map +1 -0
  175. package/dist/http/FindMyWay/internal/router.js +3 -6
  176. package/dist/http/FindMyWay/internal/router.js.map +1 -1
  177. package/dist/http/HttpClient.d.ts +21 -0
  178. package/dist/http/HttpClient.d.ts.map +1 -1
  179. package/dist/http/HttpClient.js +63 -12
  180. package/dist/http/HttpClient.js.map +1 -1
  181. package/dist/http/HttpEffect.d.ts.map +1 -1
  182. package/dist/http/HttpEffect.js +14 -7
  183. package/dist/http/HttpEffect.js.map +1 -1
  184. package/dist/http/HttpMiddleware.d.ts.map +1 -1
  185. package/dist/http/HttpMiddleware.js +31 -32
  186. package/dist/http/HttpMiddleware.js.map +1 -1
  187. package/dist/http/HttpRouter.d.ts +35 -0
  188. package/dist/http/HttpRouter.d.ts.map +1 -1
  189. package/dist/http/HttpRouter.js +35 -0
  190. package/dist/http/HttpRouter.js.map +1 -1
  191. package/dist/http/HttpServerResponse.d.ts +8 -6
  192. package/dist/http/HttpServerResponse.d.ts.map +1 -1
  193. package/dist/http/HttpServerResponse.js +27 -16
  194. package/dist/http/HttpServerResponse.js.map +1 -1
  195. package/dist/http/HttpTraceContext.d.ts.map +1 -1
  196. package/dist/http/HttpTraceContext.js +4 -2
  197. package/dist/http/HttpTraceContext.js.map +1 -1
  198. package/dist/http/Multipart.d.ts.map +1 -1
  199. package/dist/http/Multipart.js +15 -1
  200. package/dist/http/Multipart.js.map +1 -1
  201. package/dist/http-api/HttpApiScalar.d.ts +5 -0
  202. package/dist/http-api/HttpApiScalar.d.ts.map +1 -1
  203. package/dist/http-api/HttpApiScalar.js.map +1 -1
  204. package/dist/internal/dateTime.js +40 -35
  205. package/dist/internal/dateTime.js.map +1 -1
  206. package/dist/internal/effect.js +19 -9
  207. package/dist/internal/effect.js.map +1 -1
  208. package/dist/internal/graphql.d.ts +2 -0
  209. package/dist/internal/graphql.d.ts.map +1 -0
  210. package/dist/internal/graphql.js +195 -0
  211. package/dist/internal/graphql.js.map +1 -0
  212. package/dist/internal/graphqlHeaders.d.ts +4 -0
  213. package/dist/internal/graphqlHeaders.d.ts.map +1 -0
  214. package/dist/internal/graphqlHeaders.js +11 -0
  215. package/dist/internal/graphqlHeaders.js.map +1 -0
  216. package/dist/internal/request.js +20 -1
  217. package/dist/internal/request.js.map +1 -1
  218. package/dist/internal/schema/toCodeDocument.js +4 -1
  219. package/dist/internal/schema/toCodeDocument.js.map +1 -1
  220. package/dist/internal/schema/toJsonSchemaDocument.js +29 -5
  221. package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -1
  222. package/dist/internal/version.js +1 -1
  223. package/dist/net/AddressResolver.d.ts +145 -0
  224. package/dist/net/AddressResolver.d.ts.map +1 -0
  225. package/dist/net/AddressResolver.js +114 -0
  226. package/dist/net/AddressResolver.js.map +1 -0
  227. package/dist/net/Dns.d.ts +596 -0
  228. package/dist/net/Dns.d.ts.map +1 -0
  229. package/dist/net/Dns.js +549 -0
  230. package/dist/net/Dns.js.map +1 -0
  231. package/dist/net/Host.d.ts +369 -0
  232. package/dist/net/Host.d.ts.map +1 -0
  233. package/dist/net/Host.js +397 -0
  234. package/dist/net/Host.js.map +1 -0
  235. package/dist/net/IpInterface.d.ts +76 -3
  236. package/dist/net/IpInterface.d.ts.map +1 -1
  237. package/dist/net/IpInterface.js +53 -4
  238. package/dist/net/IpInterface.js.map +1 -1
  239. package/dist/net/IpNetwork.d.ts +82 -8
  240. package/dist/net/IpNetwork.d.ts.map +1 -1
  241. package/dist/net/IpNetwork.js +60 -4
  242. package/dist/net/IpNetwork.js.map +1 -1
  243. package/dist/net/NetAddress.d.ts +396 -35
  244. package/dist/net/NetAddress.d.ts.map +1 -1
  245. package/dist/net/NetAddress.js +358 -34
  246. package/dist/net/NetAddress.js.map +1 -1
  247. package/dist/net/index.d.ts +15 -0
  248. package/dist/net/index.d.ts.map +1 -1
  249. package/dist/net/index.js +15 -0
  250. package/dist/net/index.js.map +1 -1
  251. package/dist/observability/OtlpMetrics.d.ts.map +1 -1
  252. package/dist/observability/OtlpMetrics.js +15 -21
  253. package/dist/observability/OtlpMetrics.js.map +1 -1
  254. package/dist/observability/PrometheusMetrics.js +1 -0
  255. package/dist/observability/PrometheusMetrics.js.map +1 -1
  256. package/dist/persistence/PersistedQueue.d.ts +32 -3
  257. package/dist/persistence/PersistedQueue.d.ts.map +1 -1
  258. package/dist/persistence/PersistedQueue.js +75 -16
  259. package/dist/persistence/PersistedQueue.js.map +1 -1
  260. package/dist/rpc/RpcClient.d.ts +22 -6
  261. package/dist/rpc/RpcClient.d.ts.map +1 -1
  262. package/dist/rpc/RpcClient.js +12 -5
  263. package/dist/rpc/RpcClient.js.map +1 -1
  264. package/dist/rpc/RpcServer.d.ts +6 -0
  265. package/dist/rpc/RpcServer.d.ts.map +1 -1
  266. package/dist/rpc/RpcServer.js +78 -29
  267. package/dist/rpc/RpcServer.js.map +1 -1
  268. package/dist/socket/DatagramSocket.d.ts +456 -0
  269. package/dist/socket/DatagramSocket.d.ts.map +1 -0
  270. package/dist/socket/DatagramSocket.js +535 -0
  271. package/dist/socket/DatagramSocket.js.map +1 -0
  272. package/dist/socket/Socket.d.ts +20 -1
  273. package/dist/socket/Socket.d.ts.map +1 -1
  274. package/dist/socket/Socket.js +9 -1
  275. package/dist/socket/Socket.js.map +1 -1
  276. package/dist/socket/index.d.ts +5 -0
  277. package/dist/socket/index.d.ts.map +1 -1
  278. package/dist/socket/index.js +5 -0
  279. package/dist/socket/index.js.map +1 -1
  280. package/dist/sql/Migrator.d.ts.map +1 -1
  281. package/dist/sql/Migrator.js +7 -2
  282. package/dist/sql/Migrator.js.map +1 -1
  283. package/dist/sql/SqlClient.d.ts +7 -1
  284. package/dist/sql/SqlClient.d.ts.map +1 -1
  285. package/dist/sql/SqlClient.js +31 -6
  286. package/dist/sql/SqlClient.js.map +1 -1
  287. package/dist/testing/TestCrypto.d.ts +73 -0
  288. package/dist/testing/TestCrypto.d.ts.map +1 -0
  289. package/dist/testing/TestCrypto.js +87 -0
  290. package/dist/testing/TestCrypto.js.map +1 -0
  291. package/dist/testing/index.d.ts +5 -0
  292. package/dist/testing/index.d.ts.map +1 -1
  293. package/dist/testing/index.js +5 -0
  294. package/dist/testing/index.js.map +1 -1
  295. package/dist/workflow/DurableDeferred.d.ts +54 -0
  296. package/dist/workflow/DurableDeferred.d.ts.map +1 -1
  297. package/dist/workflow/DurableDeferred.js +108 -50
  298. package/dist/workflow/DurableDeferred.js.map +1 -1
  299. package/dist/workflow/WorkflowEngine.d.ts +24 -2
  300. package/dist/workflow/WorkflowEngine.d.ts.map +1 -1
  301. package/dist/workflow/WorkflowEngine.js +13 -3
  302. package/dist/workflow/WorkflowEngine.js.map +1 -1
  303. package/package.json +6 -3
  304. package/src/Context.ts +12 -3
  305. package/src/Crypto.ts +43 -9
  306. package/src/DateTime.ts +9 -6
  307. package/src/Duration.ts +36 -16
  308. package/src/FileSystem.ts +48 -2
  309. package/src/RequestResolver.ts +4 -10
  310. package/src/Scheduler.ts +9 -0
  311. package/src/Schema.ts +677 -5
  312. package/src/SchemaGetter.ts +47 -35
  313. package/src/Sink.ts +45 -18
  314. package/src/Stdio.ts +9 -2
  315. package/src/Stream.ts +44 -15
  316. package/src/Utils.ts +8 -5
  317. package/src/ai/AnthropicStructuredOutput.ts +2 -2
  318. package/src/ai/Chat.ts +2 -2
  319. package/src/ai/LanguageModel.ts +96 -24
  320. package/src/ai/McpServer.ts +288 -94
  321. package/src/ai/Prompt.ts +24 -10
  322. package/src/ai/Response.ts +6 -3
  323. package/src/ai/internal/mcpProtocol/v2026_07_28.ts +5 -0
  324. package/src/ai/internal/mcpProtocol.ts +3 -0
  325. package/src/ai/internal/mcpRuntime.ts +2 -0
  326. package/src/cli/CliOutput.ts +33 -16
  327. package/src/cli/Command.ts +4 -3
  328. package/src/cli/Completions.ts +9 -6
  329. package/src/cli/GlobalFlag.ts +19 -11
  330. package/src/cli/Prompt.ts +159 -149
  331. package/src/cli/internal/ansi.ts +26 -3
  332. package/src/cli/internal/completions/powershell.ts +322 -0
  333. package/src/cli/internal/completions/zsh.ts +4 -2
  334. package/src/cli/internal/wizard.ts +34 -26
  335. package/src/cluster/ClusterSchema.ts +32 -0
  336. package/src/cluster/ClusterWorkflowEngine.ts +64 -36
  337. package/src/cluster/MessageStorage.ts +45 -14
  338. package/src/cluster/Runners.ts +8 -2
  339. package/src/cluster/Sharding.ts +219 -58
  340. package/src/cluster/SqlMessageStorage.ts +118 -84
  341. package/src/cluster/SqlRunnerStorage.ts +224 -128
  342. package/src/cluster/internal/entityManager.ts +151 -55
  343. package/src/encoding/Sse.ts +69 -79
  344. package/src/graphql/GraphQL.ts +494 -0
  345. package/src/graphql/GraphQLClient.ts +912 -0
  346. package/src/graphql/GraphQLClientError.ts +542 -0
  347. package/src/graphql/GraphQLGroup.ts +167 -0
  348. package/src/graphql/GraphQLMiddleware.ts +253 -0
  349. package/src/graphql/GraphQLProtocol.ts +1286 -0
  350. package/src/graphql/GraphQLResolver.ts +1010 -0
  351. package/src/graphql/index.ts +48 -0
  352. package/src/http/FindMyWay/internal/router.ts +4 -7
  353. package/src/http/HttpClient.ts +110 -12
  354. package/src/http/HttpEffect.ts +11 -5
  355. package/src/http/HttpMiddleware.ts +33 -34
  356. package/src/http/HttpRouter.ts +35 -0
  357. package/src/http/HttpServerResponse.ts +28 -16
  358. package/src/http/HttpTraceContext.ts +8 -2
  359. package/src/http/Multipart.ts +17 -1
  360. package/src/http-api/HttpApiScalar.ts +5 -0
  361. package/src/internal/dateTime.ts +13 -10
  362. package/src/internal/effect.ts +22 -15
  363. package/src/internal/graphql.ts +263 -0
  364. package/src/internal/graphqlHeaders.ts +11 -0
  365. package/src/internal/request.ts +31 -3
  366. package/src/internal/schema/toCodeDocument.ts +7 -1
  367. package/src/internal/schema/toJsonSchemaDocument.ts +34 -2
  368. package/src/internal/version.ts +1 -1
  369. package/src/net/AddressResolver.ts +222 -0
  370. package/src/net/Dns.ts +1035 -0
  371. package/src/net/Host.ts +544 -0
  372. package/src/net/IpInterface.ts +117 -7
  373. package/src/net/IpNetwork.ts +116 -17
  374. package/src/net/NetAddress.ts +620 -76
  375. package/src/net/index.ts +18 -0
  376. package/src/observability/OtlpMetrics.ts +12 -23
  377. package/src/observability/PrometheusMetrics.ts +1 -0
  378. package/src/persistence/PersistedQueue.ts +146 -53
  379. package/src/rpc/RpcClient.ts +41 -19
  380. package/src/rpc/RpcServer.ts +115 -40
  381. package/src/socket/DatagramSocket.ts +919 -0
  382. package/src/socket/Socket.ts +28 -2
  383. package/src/socket/index.ts +6 -0
  384. package/src/sql/Migrator.ts +21 -5
  385. package/src/sql/SqlClient.ts +39 -15
  386. package/src/testing/TestCrypto.ts +94 -0
  387. package/src/testing/index.ts +6 -0
  388. package/src/workflow/DurableDeferred.ts +160 -47
  389. package/src/workflow/WorkflowEngine.ts +50 -5
@@ -0,0 +1,445 @@
1
+ /**
2
+ * Serializable GraphQL client errors with an operation name and a
3
+ * `Schema.TaggedError` reason.
4
+ *
5
+ * @stability experimental
6
+ * @since 4.0.0
7
+ */
8
+ import * as Duration from "../Duration.ts";
9
+ import type * as Headers from "../http/Headers.ts";
10
+ import type * as HttpClientError from "../http/HttpClientError.ts";
11
+ import * as Schema from "../Schema.ts";
12
+ declare const TypeId = "~effect/graphql/GraphQLClientError";
13
+ /**
14
+ * One entry of a GraphQL response's `errors` array, as described by the
15
+ * GraphQL specification.
16
+ *
17
+ * **Details**
18
+ *
19
+ * `path[0]` is the response key the error belongs to, which is the alias when
20
+ * the document used one, so callers can match an error to the field it hit.
21
+ * Unknown top-level fields are preserved as JSON values, including GitHub's
22
+ * `type` field.
23
+ *
24
+ * **Example** (Finding which alias an error belongs to)
25
+ *
26
+ * ```ts import.meta.vitest
27
+ * import { Schema } from "effect"
28
+ * import { GraphQLClientError } from "effect/graphql"
29
+ *
30
+ * const error = Schema.decodeUnknownSync(GraphQLClientError.GraphQLError)({
31
+ * message: "Could not resolve to a Repository",
32
+ * path: ["missing", "issues"],
33
+ * type: "NOT_FOUND"
34
+ * })
35
+ *
36
+ * error.path?.[0] // => "missing"
37
+ * ```
38
+ *
39
+ * @stability experimental
40
+ * @category schemas
41
+ * @since 4.0.0
42
+ */
43
+ export declare const GraphQLError: Schema.StructWithRest<Schema.Struct<{
44
+ readonly message: Schema.String;
45
+ readonly locations: Schema.optional<Schema.$Array<Schema.Struct<{
46
+ readonly line: Schema.Number;
47
+ readonly column: Schema.Number;
48
+ }>>>;
49
+ readonly path: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>;
50
+ readonly extensions: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
51
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
52
+ /**
53
+ * The decoded type of {@link GraphQLError}.
54
+ *
55
+ * @stability experimental
56
+ * @category models
57
+ * @since 4.0.0
58
+ */
59
+ export type GraphQLError = typeof GraphQLError.Type;
60
+ declare const ResponseError_base: Schema.Class<ResponseError, Schema.TaggedStruct<"ResponseError", {
61
+ readonly errors: Schema.NonEmptyArray<Schema.StructWithRest<Schema.Struct<{
62
+ readonly message: Schema.String;
63
+ readonly locations: Schema.optional<Schema.$Array<Schema.Struct<{
64
+ readonly line: Schema.Number;
65
+ readonly column: Schema.Number;
66
+ }>>>;
67
+ readonly path: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>;
68
+ readonly extensions: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
69
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
70
+ readonly data: Schema.optional<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
71
+ readonly extensions: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
72
+ readonly status: Schema.optional<Schema.Int>;
73
+ readonly headers: Schema.optional<Schema.decodeTo<Schema.declare<Headers.Headers, Headers.Headers>, Schema.$Record<Schema.String, Schema.String>, never, never>>;
74
+ }>, import("../Cause.ts").YieldableError>;
75
+ /**
76
+ * The server answered with a non-empty `errors` array.
77
+ *
78
+ * **Details**
79
+ *
80
+ * Queries and mutations fail even when partial `data` is present, since a
81
+ * field error's `null` cannot be distinguished from a genuine `null`. Use
82
+ * `{ partial: true }` to receive decoded `{ data, errors }` instead.
83
+ *
84
+ * On this error, `data` is raw. `GraphQLError.path[0]` identifies the response
85
+ * key (or alias). Non-2xx HTTP responses with a GraphQL body also use this
86
+ * reason rather than `TransportError`.
87
+ *
88
+ * `status` and `headers` are the HTTP status and response headers, as the
89
+ * transport reported them and middleware left them. Headers use
90
+ * `Headers.Headers` at runtime and encode as a plain string record.
91
+ * Decoding restores the normalized header collection. Both are unset over
92
+ * graphql-ws, and `status` is unset for graphql-sse events. `retryAfter`
93
+ * parses the `Retry-After` response header as whole seconds or an HTTP date,
94
+ * measured from `Date.now()` when the error is constructed. `isRetryable` is
95
+ * true for HTTP status `429` or `500`–`599`, and for any response with a
96
+ * valid `Retry-After`, whatever its status. It is false otherwise, including
97
+ * when there is no status.
98
+ *
99
+ * For queries and mutations, callers opt into retries with `Effect.retry`,
100
+ * and should wait for `retryAfter` when it is set. With
101
+ * `GraphQLClient.pages`, retry each page's call, not the stream:
102
+ * `Stream.retry` starts again from the first page. Subscriptions retry a
103
+ * retryable `ResponseError` on their own, by resubscribing. graphql-sse events
104
+ * carry the stream response's headers, so an event with `errors` is retried
105
+ * when that response had a valid `Retry-After`, and ends the stream
106
+ * otherwise.
107
+ *
108
+ * **Example** (Inspecting the errors of a failed call)
109
+ *
110
+ * ```ts import.meta.vitest
111
+ * import { GraphQLClientError } from "effect/graphql"
112
+ *
113
+ * const reason = new GraphQLClientError.ResponseError({
114
+ * errors: [{ message: "Not found", path: ["repository"] }],
115
+ * data: { repository: null },
116
+ * status: 200
117
+ * })
118
+ *
119
+ * reason.isRetryable // => false
120
+ * reason.status // => 200
121
+ * reason.errors.map((error) => error.path?.[0]) // => ["repository"]
122
+ * ```
123
+ *
124
+ * **Example** (Retrying a call on retryable errors)
125
+ *
126
+ * ```ts import.meta.vitest
127
+ * import { Effect } from "effect"
128
+ * import { GraphQLClientError } from "effect/graphql"
129
+ *
130
+ * const call = Effect.fail(new GraphQLClientError.GraphQLClientError({
131
+ * operation: "Viewer",
132
+ * reason: new GraphQLClientError.ResponseError({
133
+ * errors: [{ message: "Query timed out" }],
134
+ * status: 502
135
+ * })
136
+ * }))
137
+ *
138
+ * const retried = Effect.retry(call, {
139
+ * while: (error) => error.reason.isRetryable,
140
+ * times: 3
141
+ * })
142
+ * ```
143
+ *
144
+ * @stability experimental
145
+ * @category errors
146
+ * @since 4.0.0
147
+ */
148
+ export declare class ResponseError extends ResponseError_base {
149
+ #private;
150
+ /**
151
+ * `true` for HTTP status `429` or `500`–`599`, or when the response has a
152
+ * `Retry-After` header that parses, at any status, including a graphql-sse
153
+ * event whose stream response had one; `false` otherwise, including when
154
+ * there is no status and no `Retry-After`. Use this as the `while` predicate
155
+ * of `Effect.retry` on the call, and {@link retryAfter} as the delay when it
156
+ * is set. Subscriptions resubscribe on it.
157
+ *
158
+ * @since 4.0.0
159
+ */
160
+ get isRetryable(): boolean;
161
+ /**
162
+ * The `Retry-After` response header parsed as whole seconds or an HTTP
163
+ * date. An HTTP date is measured from `Date.now()` when the error is
164
+ * constructed, so every read returns the same delay. Missing or invalid
165
+ * values yield `undefined`. `Effect.retry` does not apply this delay
166
+ * automatically.
167
+ *
168
+ * @since 4.0.0
169
+ */
170
+ get retryAfter(): Duration.Duration | undefined;
171
+ get message(): string;
172
+ }
173
+ /**
174
+ * Tests whether a WebSocket close code is fatal, meaning a `TransportError`
175
+ * carrying it is not retryable.
176
+ *
177
+ * **Details**
178
+ *
179
+ * Fatal codes are every standard `1xxx` code except `1000`, `1001`, `1005`,
180
+ * `1006`, `1012`, `1013` and `1014`, plus the graphql-ws codes `4400` (bad
181
+ * request), `4401` (unauthorized), `4403` (forbidden), `4406` (subprotocol
182
+ * not acceptable), `4409` (subscriber already exists), `4429` (too many
183
+ * initialisation requests) and `4500` (internal server error). Any other code
184
+ * is retryable.
185
+ *
186
+ * `4403` is fatal because reconnecting with the same credentials is refused
187
+ * again.
188
+ *
189
+ * **Example** (Checking close codes)
190
+ *
191
+ * ```ts import.meta.vitest
192
+ * import { GraphQLClientError } from "effect/graphql"
193
+ *
194
+ * GraphQLClientError.isFatalCloseCode(1006) // => false
195
+ * GraphQLClientError.isFatalCloseCode(1011) // => true
196
+ * GraphQLClientError.isFatalCloseCode(4401) // => true
197
+ * ```
198
+ *
199
+ * @stability experimental
200
+ * @category predicates
201
+ * @since 4.0.0
202
+ */
203
+ export declare const isFatalCloseCode: (code: number) => boolean;
204
+ declare const TransportError_base: Schema.Class<TransportError, Schema.TaggedStruct<"TransportError", {
205
+ readonly description: Schema.String;
206
+ readonly status: Schema.optional<Schema.Int>;
207
+ readonly headers: Schema.optional<Schema.decodeTo<Schema.declare<Headers.Headers, Headers.Headers>, Schema.$Record<Schema.String, Schema.String>, never, never>>;
208
+ readonly retryAfter: Schema.optional<Schema.DurationFromMillis>;
209
+ readonly closeCode: Schema.optional<Schema.Int>;
210
+ readonly fatal: Schema.optional<Schema.Boolean>;
211
+ readonly cause: Schema.optional<Schema.Defect>;
212
+ }>, import("../Cause.ts").YieldableError>;
213
+ /**
214
+ * The client could not get a GraphQL response from the server: a network
215
+ * failure, an HTTP response that is not a GraphQL response, or a closed
216
+ * WebSocket connection.
217
+ *
218
+ * **Details**
219
+ *
220
+ * - `status` and `headers` are only set for an HTTP response that is not a
221
+ * GraphQL response. Headers use `Headers.Headers` at runtime and encode
222
+ * as a plain string record; decoding restores the header collection.
223
+ * - `retryAfter` comes from the `Retry-After` header (whole seconds or an
224
+ * HTTP date) and is encoded as milliseconds. When it is set, the error is
225
+ * retryable at any status, unless the close code is fatal.
226
+ * - `closeCode` is set when a WebSocket connection closed. See
227
+ * {@link isFatalCloseCode} for the codes that are not retryable.
228
+ * - `fatal: true` marks a failure that retrying cannot fix, such as an
229
+ * operation on a graphql-ws transport whose scope has closed.
230
+ * - `cause` holds the original error, such as the `HttpClientError`. Once
231
+ * encoded it shrinks to `{ name, message }`, the standard `Schema.Defect`
232
+ * behaviour.
233
+ *
234
+ * **Example** (Retryability of transport failures)
235
+ *
236
+ * ```ts import.meta.vitest
237
+ * import { GraphQLClientError } from "effect/graphql"
238
+ *
239
+ * new GraphQLClientError.TransportError({ description: "ECONNREFUSED" }).isRetryable // => true
240
+ * new GraphQLClientError.TransportError({ description: "503", status: 503 }).isRetryable // => true
241
+ * new GraphQLClientError.TransportError({ description: "404", status: 404 }).isRetryable // => false
242
+ * new GraphQLClientError.TransportError({ description: "closed", closeCode: 4401 }).isRetryable // => false
243
+ * new GraphQLClientError.TransportError({ description: "shut down", fatal: true }).isRetryable // => false
244
+ * ```
245
+ *
246
+ * @stability experimental
247
+ * @category errors
248
+ * @since 4.0.0
249
+ */
250
+ export declare class TransportError extends TransportError_base {
251
+ /**
252
+ * `true` for a network failure (no `status`), a `429` or `500`–`599`
253
+ * status, a `retryAfter` at any status, and any close code that is not
254
+ * fatal (see {@link isFatalCloseCode}). An error marked `fatal` or with a
255
+ * fatal close code is never retryable. When retrying, wait for
256
+ * `retryAfter` when it is set.
257
+ *
258
+ * @since 4.0.0
259
+ */
260
+ get isRetryable(): boolean;
261
+ get message(): string;
262
+ /**
263
+ * Converts an `HttpClientError` into a `TransportError`, reading `status`,
264
+ * `headers` (as `Headers.Headers`) and `Retry-After` from the response
265
+ * when there is one.
266
+ *
267
+ * **Details**
268
+ *
269
+ * `Retry-After` is read as whole seconds or an HTTP date; any other value
270
+ * is ignored. An HTTP date is measured from `options.now` (epoch
271
+ * milliseconds), which defaults to `Date.now()`. Transports pass the Effect
272
+ * clock's time when the response arrives.
273
+ *
274
+ * @since 4.0.0
275
+ */
276
+ static fromHttpClientError(error: HttpClientError.HttpClientError, options?: {
277
+ readonly now?: number | undefined;
278
+ }): TransportError;
279
+ }
280
+ declare const EncodeError_base: Schema.Class<EncodeError, Schema.TaggedStruct<"EncodeError", {
281
+ readonly description: Schema.String;
282
+ }>, import("../Cause.ts").YieldableError>;
283
+ /**
284
+ * The variables Schema rejected the input, so nothing was sent.
285
+ *
286
+ * @stability experimental
287
+ * @category errors
288
+ * @since 4.0.0
289
+ */
290
+ export declare class EncodeError extends EncodeError_base {
291
+ /**
292
+ * An `EncodeError` is never retryable.
293
+ *
294
+ * @since 4.0.0
295
+ */
296
+ get isRetryable(): boolean;
297
+ get message(): string;
298
+ }
299
+ declare const DecodeError_base: Schema.Class<DecodeError, Schema.TaggedStruct<"DecodeError", {
300
+ readonly description: Schema.String;
301
+ }>, import("../Cause.ts").YieldableError>;
302
+ /**
303
+ * The response was not a GraphQL response, or `data` did not match the result
304
+ * Schema.
305
+ *
306
+ * **Details**
307
+ *
308
+ * `data: null` without `errors` also produces a `DecodeError`, since
309
+ * `ResponseError` requires a non-empty errors array.
310
+ *
311
+ * @stability experimental
312
+ * @category errors
313
+ * @since 4.0.0
314
+ */
315
+ export declare class DecodeError extends DecodeError_base {
316
+ /**
317
+ * A `DecodeError` is never retryable.
318
+ *
319
+ * @since 4.0.0
320
+ */
321
+ get isRetryable(): boolean;
322
+ get message(): string;
323
+ }
324
+ declare const PaginationError_base: Schema.Class<PaginationError, Schema.TaggedStruct<"PaginationError", {
325
+ readonly description: Schema.String;
326
+ readonly cursor: Schema.NullOr<Schema.String>;
327
+ }>, import("../Cause.ts").YieldableError>;
328
+ /**
329
+ * Cursor paging could not continue. Only `GraphQLClient.pages` and
330
+ * `GraphQLClient.items` raise it, when a connection becomes `null` on a page
331
+ * after the first, or when `hasNextPage` is `true` but `endCursor` is `null`
332
+ * or did not advance.
333
+ *
334
+ * **Details**
335
+ *
336
+ * `cursor` is the last cursor that was sent, `null` on the first page.
337
+ *
338
+ * @stability experimental
339
+ * @category errors
340
+ * @since 4.0.0
341
+ */
342
+ export declare class PaginationError extends PaginationError_base {
343
+ /**
344
+ * A `PaginationError` is never retryable.
345
+ *
346
+ * @since 4.0.0
347
+ */
348
+ get isRetryable(): boolean;
349
+ get message(): string;
350
+ }
351
+ /**
352
+ * The union of every reason a {@link GraphQLClientError} can carry.
353
+ *
354
+ * @stability experimental
355
+ * @category models
356
+ * @since 4.0.0
357
+ */
358
+ export type Reason = ResponseError | TransportError | EncodeError | DecodeError | PaginationError;
359
+ declare const GraphQLClientError_base: Schema.Class<GraphQLClientError, Schema.TaggedStruct<"GraphQLClientError", {
360
+ readonly operation: Schema.String;
361
+ readonly reason: Schema.Union<readonly [typeof ResponseError, typeof TransportError, typeof EncodeError, typeof DecodeError, typeof PaginationError]>;
362
+ }>, import("../Cause.ts").YieldableError>;
363
+ /**
364
+ * The error every `GraphQLClient` method fails with. It names the operation
365
+ * and carries one of the five reasons; `cause` is the reason itself.
366
+ *
367
+ * **Example** (Retrying only what is retryable)
368
+ *
369
+ * ```ts import.meta.vitest
370
+ * import { Duration, Schema } from "effect"
371
+ * import { GraphQLClientError } from "effect/graphql"
372
+ *
373
+ * const error = new GraphQLClientError.GraphQLClientError({
374
+ * operation: "Viewer",
375
+ * reason: new GraphQLClientError.TransportError({
376
+ * description: "503 Service Unavailable",
377
+ * status: 503,
378
+ * retryAfter: Duration.seconds(30)
379
+ * })
380
+ * })
381
+ *
382
+ * error.isRetryable // => true
383
+ * error.retryAfter // => Duration.seconds(30)
384
+ *
385
+ * // Errors round-trip through their Schema
386
+ * const encoded = Schema.encodeSync(GraphQLClientError.GraphQLClientError)(error)
387
+ * Schema.decodeUnknownSync(GraphQLClientError.GraphQLClientError)(encoded).reason._tag // => "TransportError"
388
+ * ```
389
+ *
390
+ * @stability experimental
391
+ * @category errors
392
+ * @since 4.0.0
393
+ */
394
+ export declare class GraphQLClientError extends GraphQLClientError_base {
395
+ /**
396
+ * Marks this value as a GraphQL client error for runtime guards.
397
+ *
398
+ * @stability experimental
399
+ * @since 4.0.0
400
+ */
401
+ readonly [TypeId] = "~effect/graphql/GraphQLClientError";
402
+ /**
403
+ * The reason, exposed as the error's cause.
404
+ *
405
+ * @since 4.0.0
406
+ */
407
+ readonly cause: DecodeError | EncodeError | PaginationError | ResponseError | TransportError;
408
+ /**
409
+ * Delegates to the reason's `isRetryable`.
410
+ *
411
+ * @since 4.0.0
412
+ */
413
+ get isRetryable(): boolean;
414
+ /**
415
+ * The `Retry-After` hint of a `ResponseError` or `TransportError` reason,
416
+ * if any. Use it as the delay when retrying on {@link isRetryable}.
417
+ *
418
+ * @since 4.0.0
419
+ */
420
+ get retryAfter(): Duration.Duration | undefined;
421
+ /**
422
+ * The HTTP status of a `ResponseError` or `TransportError` reason, if any.
423
+ *
424
+ * @since 4.0.0
425
+ */
426
+ get status(): number | undefined;
427
+ /**
428
+ * The response headers of a `ResponseError` or `TransportError` reason, if
429
+ * any.
430
+ *
431
+ * @since 4.0.0
432
+ */
433
+ get headers(): Headers.Headers | undefined;
434
+ get message(): string;
435
+ }
436
+ /**
437
+ * Tests whether a value is a {@link GraphQLClientError}.
438
+ *
439
+ * @stability experimental
440
+ * @category guards
441
+ * @since 4.0.0
442
+ */
443
+ export declare const isGraphQLClientError: (u: unknown) => u is GraphQLClientError;
444
+ export {};
445
+ //# sourceMappingURL=GraphQLClientError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQLClientError.d.ts","sourceRoot":"","sources":["../../src/graphql/GraphQLClientError.ts"],"names":[],"mappings":"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"}