@workerstack/clients 1.0.0-rc.26 → 1.0.0-rc.28

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 (277) hide show
  1. package/README.md +43 -43
  2. package/bin/{honey-clients.js → clients.js} +12 -12
  3. package/dist/cli.d.ts +3 -3
  4. package/dist/cli.js +14 -14
  5. package/dist/emit/cli/discovery.js +1 -1
  6. package/dist/emit/cli/install.js +2 -2
  7. package/dist/emit/cli/layout.js +1 -1
  8. package/dist/emit/cli/module.js +1 -1
  9. package/dist/emit/cli/release.js +1 -1
  10. package/dist/emit/csharp/errors.js +1 -1
  11. package/dist/emit/csharp/sdk-client.js +1 -1
  12. package/dist/emit/csharp/sdk-csproj.d.ts +1 -1
  13. package/dist/emit/csharp/sdk-csproj.js +2 -2
  14. package/dist/emit/csharp/sdk.d.ts +1 -1
  15. package/dist/emit/csharp/sdk.js +2 -2
  16. package/dist/emit/csharp/transport.js +2 -2
  17. package/dist/emit/csharp/types-record.d.ts +1 -1
  18. package/dist/emit/go/sdk-client.js +1 -1
  19. package/dist/emit/go/sdk.js +1 -1
  20. package/dist/emit/java/sdk-errors.js +5 -5
  21. package/dist/emit/java/sdk-op.d.ts +1 -1
  22. package/dist/emit/java/sdk.js +3 -3
  23. package/dist/emit/mcp/files.d.ts +1 -1
  24. package/dist/emit/mcp/mounted.js +2 -2
  25. package/dist/emit/mcp/runtime.js +1 -1
  26. package/dist/emit/mcp/server.js +1 -1
  27. package/dist/emit/python/errors.js +1 -1
  28. package/dist/emit/python/sdk-client.js +2 -2
  29. package/dist/emit/python/sdk-pyproject.js +4 -4
  30. package/dist/emit/python/sdk.d.ts +1 -1
  31. package/dist/emit/python/sdk.js +11 -11
  32. package/dist/emit/python/transport.js +1 -1
  33. package/dist/emit/rust/errors.js +2 -2
  34. package/dist/emit/rust/sdk-cargo.js +3 -3
  35. package/dist/emit/rust/sdk.d.ts +1 -1
  36. package/dist/emit/rust/sdk.js +2 -2
  37. package/dist/emit/shared/format.d.ts +1 -1
  38. package/dist/emit/shared/metadata.d.ts +1 -1
  39. package/dist/emit/shared/status-keys.d.ts +1 -1
  40. package/dist/emit/shared/status-keys.js +1 -1
  41. package/dist/emit/ts/app-client.js +2 -2
  42. package/dist/emit/ts/route-tree.d.ts +1 -1
  43. package/dist/emit/ts/route-tree.js +1 -12
  44. package/dist/emit/ts/sdk-types-preamble.js +16 -16
  45. package/dist/emit/ts/sdk-types.js +6 -6
  46. package/dist/emit/ts/tanstack-query.js +5 -5
  47. package/dist/emit/ts/type-gen.d.ts +4 -3
  48. package/dist/emit/ts/type-gen.js +86 -45
  49. package/dist/extract/chain.d.ts +10 -6
  50. package/dist/extract/chain.js +5 -19
  51. package/dist/extract/extract.d.ts +2 -2
  52. package/dist/extract/extract.js +40 -26
  53. package/dist/extract/serialize.js +1 -1
  54. package/dist/extract/walk.d.ts +15 -4
  55. package/dist/extract/walk.js +159 -15
  56. package/dist/gen/args.js +3 -3
  57. package/dist/gen/formatters.d.ts +6 -6
  58. package/dist/gen/formatters.js +7 -7
  59. package/dist/gen/process.d.ts +3 -3
  60. package/dist/gen/process.js +7 -7
  61. package/dist/gen/targets.d.ts +3 -3
  62. package/dist/gen/targets.js +3 -3
  63. package/dist/gen/write.d.ts +1 -1
  64. package/dist/gen/write.js +1 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.js +1 -1
  67. package/dist/ir/load.js +10 -10
  68. package/dist/ir/model.d.ts +6 -4
  69. package/dist/ir/sdk-model.d.ts +1 -1
  70. package/dist/ir/sdk-model.js +1 -1
  71. package/dist/ir/slots.d.ts +3 -3
  72. package/dist/ir/slots.js +12 -10
  73. package/dist/release/bootstrap.js +1 -1
  74. package/dist/release/bump-command.js +1 -1
  75. package/dist/release/cli.d.ts +4 -4
  76. package/dist/release/cli.js +6 -6
  77. package/dist/release/context.d.ts +1 -1
  78. package/dist/release/context.js +1 -1
  79. package/dist/release/digest.d.ts +1 -1
  80. package/dist/release/digest.js +2 -2
  81. package/dist/release/index.d.ts +1 -1
  82. package/dist/release/load.js +1 -1
  83. package/dist/release/manifest.js +1 -1
  84. package/dist/release/registries.js +3 -3
  85. package/dist/release/release-workflow.js +1 -1
  86. package/dist/release/spec-gate.d.ts +2 -2
  87. package/dist/release/spec-gate.js +2 -2
  88. package/dist/release/sync-command.d.ts +1 -1
  89. package/dist/release/sync-command.js +1 -1
  90. package/dist/release/sync-tree.js +1 -1
  91. package/dist/release/types.d.ts +6 -6
  92. package/dist/runtime/cli/body.go +1 -1
  93. package/dist/runtime/cli/config.go +3 -3
  94. package/dist/runtime/cli/discovery.go +1 -1
  95. package/dist/runtime/cli/format.go +1 -1
  96. package/dist/runtime/cli/log.go +1 -1
  97. package/dist/runtime/cli/output.go +1 -1
  98. package/dist/runtime/cli/params.go +1 -1
  99. package/dist/runtime/cli/run.go +1 -1
  100. package/dist/runtime/cli/socket.go +1 -1
  101. package/dist/runtime/cli/stream.go +1 -1
  102. package/dist/runtime/cli/target.go +1 -1
  103. package/dist/runtime/csharp/Adapters.cs +2 -2
  104. package/dist/runtime/csharp/Auth.cs +2 -2
  105. package/dist/runtime/csharp/Body.cs +3 -3
  106. package/dist/runtime/csharp/Config.cs +2 -2
  107. package/dist/runtime/csharp/Envelope.cs +3 -3
  108. package/dist/runtime/csharp/Errors.cs +10 -10
  109. package/dist/runtime/csharp/Events.cs +2 -2
  110. package/dist/runtime/csharp/Exchange.cs +4 -4
  111. package/dist/runtime/csharp/Handler.cs +3 -3
  112. package/dist/runtime/csharp/Hooks.cs +3 -3
  113. package/dist/runtime/csharp/Invalidation.cs +2 -2
  114. package/dist/runtime/csharp/Json.cs +2 -2
  115. package/dist/runtime/csharp/Log.cs +2 -2
  116. package/dist/runtime/csharp/Operation.cs +2 -2
  117. package/dist/runtime/csharp/Path.cs +2 -2
  118. package/dist/runtime/csharp/Query.cs +2 -2
  119. package/dist/runtime/csharp/Realtime.cs +2 -2
  120. package/dist/runtime/csharp/RealtimeLoop.cs +3 -3
  121. package/dist/runtime/csharp/Redirect.cs +2 -2
  122. package/dist/runtime/csharp/Result.cs +2 -2
  123. package/dist/runtime/csharp/Sse.cs +2 -2
  124. package/dist/runtime/csharp/Stale.cs +2 -2
  125. package/dist/runtime/csharp/Transport.cs +2 -2
  126. package/dist/runtime/csharp/TransportLongPoll.cs +2 -2
  127. package/dist/runtime/csharp/TransportSse.cs +2 -2
  128. package/dist/runtime/csharp/TransportWs.cs +2 -2
  129. package/dist/runtime/csharp/Wire.cs +2 -2
  130. package/dist/runtime/csharp/Ws.cs +2 -2
  131. package/dist/runtime/csharp/WsDial.cs +2 -2
  132. package/dist/runtime/go/auth.go +1 -1
  133. package/dist/runtime/go/body.go +2 -2
  134. package/dist/runtime/go/config.go +1 -1
  135. package/dist/runtime/go/errors.go +5 -5
  136. package/dist/runtime/go/export.go +10 -10
  137. package/dist/runtime/go/hooks.go +2 -2
  138. package/dist/runtime/go/invalidation.go +2 -2
  139. package/dist/runtime/go/log.go +1 -1
  140. package/dist/runtime/go/nullable.go +1 -1
  141. package/dist/runtime/go/options.go +1 -1
  142. package/dist/runtime/go/path.go +1 -1
  143. package/dist/runtime/go/query.go +2 -2
  144. package/dist/runtime/go/realtime.go +4 -4
  145. package/dist/runtime/go/realtime_loop.go +1 -1
  146. package/dist/runtime/go/redirect.go +2 -2
  147. package/dist/runtime/go/request.go +9 -9
  148. package/dist/runtime/go/result.go +2 -2
  149. package/dist/runtime/go/sse.go +3 -3
  150. package/dist/runtime/go/stale.go +1 -1
  151. package/dist/runtime/go/stream.go +2 -2
  152. package/dist/runtime/go/transport.go +2 -2
  153. package/dist/runtime/go/transport_longpoll.go +1 -1
  154. package/dist/runtime/go/transport_sse.go +2 -2
  155. package/dist/runtime/go/ws.go +1 -1
  156. package/dist/runtime/java/Answer.java +2 -2
  157. package/dist/runtime/java/ApiException.java +2 -2
  158. package/dist/runtime/java/BinaryBody.java +2 -2
  159. package/dist/runtime/java/Body.java +4 -4
  160. package/dist/runtime/java/Call.java +2 -2
  161. package/dist/runtime/java/CallLog.java +2 -2
  162. package/dist/runtime/java/ClientConfig.java +2 -2
  163. package/dist/runtime/java/ConnectionState.java +2 -2
  164. package/dist/runtime/java/Credential.java +2 -2
  165. package/dist/runtime/java/Deadline.java +2 -2
  166. package/dist/runtime/java/Decode.java +2 -2
  167. package/dist/runtime/java/Envelope.java +2 -2
  168. package/dist/runtime/java/ErrorEnvelope.java +3 -3
  169. package/dist/runtime/java/EventStream.java +2 -2
  170. package/dist/runtime/java/Exchange.java +2 -2
  171. package/dist/runtime/java/FilePart.java +2 -2
  172. package/dist/runtime/java/Flight.java +3 -3
  173. package/dist/runtime/java/Hooks.java +3 -3
  174. package/dist/runtime/java/Hops.java +2 -2
  175. package/dist/runtime/java/{HoneyException.java → HttpException.java} +4 -4
  176. package/dist/runtime/java/InvalidationConfig.java +2 -2
  177. package/dist/runtime/java/Json.java +3 -3
  178. package/dist/runtime/java/Keepalive.java +2 -2
  179. package/dist/runtime/java/LogEntry.java +2 -2
  180. package/dist/runtime/java/LongPollAdapter.java +2 -2
  181. package/dist/runtime/java/Operation.java +2 -2
  182. package/dist/runtime/java/Opt.java +2 -2
  183. package/dist/runtime/java/Pump.java +2 -2
  184. package/dist/runtime/java/RawResponse.java +2 -2
  185. package/dist/runtime/java/Realtime.java +2 -2
  186. package/dist/runtime/java/RealtimeLoop.java +4 -4
  187. package/dist/runtime/java/RedirectPolicy.java +2 -2
  188. package/dist/runtime/java/Redirects.java +2 -2
  189. package/dist/runtime/java/RequestContext.java +2 -2
  190. package/dist/runtime/java/RequestHook.java +2 -2
  191. package/dist/runtime/java/RequestOptions.java +2 -2
  192. package/dist/runtime/java/ResponseContext.java +2 -2
  193. package/dist/runtime/java/ResponseHook.java +2 -2
  194. package/dist/runtime/java/Result.java +2 -2
  195. package/dist/runtime/java/ResumableConnection.java +2 -2
  196. package/dist/runtime/java/SdkException.java +3 -3
  197. package/dist/runtime/java/Socket.java +2 -2
  198. package/dist/runtime/java/Sse.java +2 -2
  199. package/dist/runtime/java/SseAdapter.java +2 -2
  200. package/dist/runtime/java/SseEvent.java +2 -2
  201. package/dist/runtime/java/StaleMeta.java +2 -2
  202. package/dist/runtime/java/StaleTracker.java +2 -2
  203. package/dist/runtime/java/Transport.java +2 -2
  204. package/dist/runtime/java/TransportAdapter.java +2 -2
  205. package/dist/runtime/java/TransportConnection.java +2 -2
  206. package/dist/runtime/java/TransportKind.java +2 -2
  207. package/dist/runtime/java/TransportMessage.java +2 -2
  208. package/dist/runtime/java/TransportOptions.java +2 -2
  209. package/dist/runtime/java/TypedWebSocket.java +2 -2
  210. package/dist/runtime/java/UrlPath.java +2 -2
  211. package/dist/runtime/java/UrlQuery.java +2 -2
  212. package/dist/runtime/java/WsAdapter.java +2 -2
  213. package/dist/runtime/java/WsClose.java +2 -2
  214. package/dist/runtime/java/WsDial.java +2 -2
  215. package/dist/runtime/java/WsMessage.java +2 -2
  216. package/dist/runtime/mcp/call.ts +3 -3
  217. package/dist/runtime/mcp/result.ts +2 -2
  218. package/dist/runtime/python/__init__.py +1 -1
  219. package/dist/runtime/python/auth.py +1 -1
  220. package/dist/runtime/python/body.py +1 -1
  221. package/dist/runtime/python/config.py +1 -1
  222. package/dist/runtime/python/errors.py +11 -11
  223. package/dist/runtime/python/events.py +4 -4
  224. package/dist/runtime/python/exchange.py +1 -1
  225. package/dist/runtime/python/hooks.py +4 -4
  226. package/dist/runtime/python/invalidation.py +1 -1
  227. package/dist/runtime/python/log.py +1 -1
  228. package/dist/runtime/python/operation.py +1 -1
  229. package/dist/runtime/python/path.py +1 -1
  230. package/dist/runtime/python/query.py +1 -1
  231. package/dist/runtime/python/realtime.py +5 -5
  232. package/dist/runtime/python/redirect.py +1 -1
  233. package/dist/runtime/python/result.py +1 -1
  234. package/dist/runtime/python/send_async.py +4 -4
  235. package/dist/runtime/python/send_sync.py +3 -3
  236. package/dist/runtime/python/sse.py +1 -1
  237. package/dist/runtime/python/stale.py +1 -1
  238. package/dist/runtime/python/transport.py +1 -1
  239. package/dist/runtime/python/transport_longpoll.py +1 -1
  240. package/dist/runtime/python/transport_sse.py +1 -1
  241. package/dist/runtime/python/transport_ws.py +1 -1
  242. package/dist/runtime/python/ws.py +3 -3
  243. package/dist/runtime/rust/Cargo.lock +1 -1
  244. package/dist/runtime/rust/answer.rs +1 -1
  245. package/dist/runtime/rust/auth.rs +1 -1
  246. package/dist/runtime/rust/body.rs +2 -2
  247. package/dist/runtime/rust/call.rs +1 -1
  248. package/dist/runtime/rust/config.rs +1 -1
  249. package/dist/runtime/rust/envelope.rs +3 -3
  250. package/dist/runtime/rust/errors.rs +3 -3
  251. package/dist/runtime/rust/events.rs +1 -1
  252. package/dist/runtime/rust/exchange.rs +1 -1
  253. package/dist/runtime/rust/hooks.rs +1 -1
  254. package/dist/runtime/rust/invalidation.rs +1 -1
  255. package/dist/runtime/rust/log.rs +1 -1
  256. package/dist/runtime/rust/nullable.rs +1 -1
  257. package/dist/runtime/rust/path.rs +1 -1
  258. package/dist/runtime/rust/query.rs +1 -1
  259. package/dist/runtime/rust/realtime.rs +1 -1
  260. package/dist/runtime/rust/realtime_loop.rs +1 -1
  261. package/dist/runtime/rust/redirect.rs +1 -1
  262. package/dist/runtime/rust/request.rs +1 -1
  263. package/dist/runtime/rust/result.rs +1 -1
  264. package/dist/runtime/rust/sse.rs +1 -1
  265. package/dist/runtime/rust/stale.rs +1 -1
  266. package/dist/runtime/rust/transport.rs +1 -1
  267. package/dist/runtime/rust/transport_longpoll.rs +1 -1
  268. package/dist/runtime/rust/transport_sse.rs +1 -1
  269. package/dist/runtime/rust/transport_ws.rs +1 -1
  270. package/dist/runtime/rust/ws.rs +1 -1
  271. package/dist/runtime/ts/app-types.ts +5 -5
  272. package/dist/runtime/ts/app.ts +5 -5
  273. package/dist/runtime/ts/http.ts +3 -3
  274. package/dist/runtime/ts/path.ts +1 -1
  275. package/dist/runtime/ts/request.ts +1 -1
  276. package/dist/runtime/ts/sdk.ts +1 -1
  277. package/package.json +2 -29
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.util.Iterator;
5
5
 
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.time.Duration;
5
5
 
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.util.List;
5
5
 
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.util.ArrayList;
5
5
  import java.util.Collections;
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.net.URI;
5
5
  import java.net.http.HttpClient;
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  /** A transport a realtime connection opens over: one of a call's defaults, or a caller's own. */
5
5
  public interface TransportAdapter {
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  /** One open transport; a receive answering null means it ended. */
5
5
  public interface TransportConnection extends AutoCloseable {
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  /** What a realtime connection opens over. */
5
5
  public enum TransportKind {
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.time.Duration;
5
5
 
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.time.Duration;
5
5
  import java.util.List;
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.nio.ByteBuffer;
5
5
  import java.util.function.Consumer;
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  /**
5
5
  * Expands a path template: each param one percent-encoded segment, refused when no segment can hold
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.nio.charset.StandardCharsets;
5
5
  import java.util.ArrayList;
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  /**
5
5
  * A realtime call's WebSocket: its own upgrade with the cursor as query params, no hook and no log
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  /** A WebSocket close: its status code and its reason. */
5
5
  public record WsClose(int status, String reason) {
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.net.URI;
5
5
  import java.net.http.HttpResponse;
@@ -1,5 +1,5 @@
1
- // @generated by honey. DO NOT EDIT.
2
- package honey.runtime;
1
+ // @generated by clients. DO NOT EDIT.
2
+ package http.runtime;
3
3
 
4
4
  import java.nio.charset.StandardCharsets;
5
5
 
@@ -146,15 +146,15 @@ export function bindTools(specs: readonly ToolSpec[], client: SdkClient, binding
146
146
  })
147
147
  const answer = (await send({ signal })) as Answer
148
148
  const { status } = answer.response
149
- if (answer.ok) return { ...successOf(spec, answer, scrub), _meta: { "honey/status": status } }
149
+ if (answer.ok) return { ...successOf(spec, answer, scrub), _meta: { "backend/status": status } }
150
150
  /* an error status's JSON object body speaks for it, any other answer its error */
151
151
  const { body } = answer.error as { body?: unknown }
152
152
  const error = body && typeof body === "object" && !Array.isArray(body) ? body : answer.error
153
- return { ...failureOf({ error, status }, scrub), _meta: { "honey/status": status } }
153
+ return { ...failureOf({ error, status }, scrub), _meta: { "backend/status": status } }
154
154
  } catch (error) {
155
155
  const status = (error as { status?: unknown } | null)?.status
156
156
  return typeof status === "number"
157
- ? { ...failureOf({ error, status }, scrub), _meta: { "honey/status": status } }
157
+ ? { ...failureOf({ error, status }, scrub), _meta: { "backend/status": status } }
158
158
  : unanswered(error, scrub)
159
159
  }
160
160
  },
@@ -42,7 +42,7 @@ function bytesResult(bytes: Uint8Array, type: string, tool: string): ToolResult
42
42
  content: [
43
43
  kind === "image" || kind === "audio"
44
44
  ? { data, mimeType, type: kind }
45
- : { resource: { blob: data, mimeType, uri: `honey://${tool}/result` }, type: "resource" },
45
+ : { resource: { blob: data, mimeType, uri: `mcp://${tool}/result` }, type: "resource" },
46
46
  ],
47
47
  }
48
48
  }
@@ -65,7 +65,7 @@ export function successOf(
65
65
  return { ...json(value), structuredContent: value as Record<string, unknown> }
66
66
  }
67
67
 
68
- /** The result of an `answer` outside 2xx: its status, with honey's error envelope its key and message, else its body. */
68
+ /** The result of an `answer` outside 2xx: its status, with backend's error envelope its key and message, else its body. */
69
69
  export function failureOf({ error, status }: { error: unknown; status: number }, scrub: Scrub): ToolResult {
70
70
  if (error instanceof Error)
71
71
  return json(scrub({ status, message: error.message, body: (error as { body?: unknown }).body }), true)
@@ -1,2 +1,2 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The vendored runtime, one module per concern."""
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The credential: the header that carries it, and the token, refreshed once for concurrent 401s.
3
3
  ``SDK`` takes a plain ``on_auth_expired`` (never a coroutine run on a thread of its own)."""
4
4
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """A request body by its declared kind. Only bytes are sent twice: an iterable body is never retried."""
3
3
 
4
4
  import json
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """A client's settings, and one call's overrides."""
3
3
 
4
4
  from __future__ import annotations
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """Every error the SDK raises."""
3
3
 
4
4
  from __future__ import annotations
@@ -23,8 +23,8 @@ __all__ = [
23
23
  "FieldError",
24
24
  "ForbiddenError",
25
25
  "GatewayTimeoutError",
26
- "HoneyError",
27
26
  "HookError",
27
+ "HttpError",
28
28
  "InternalServerError",
29
29
  "NotFoundError",
30
30
  "PathParamError",
@@ -35,19 +35,19 @@ __all__ = [
35
35
  ]
36
36
 
37
37
 
38
- class HoneyError(Exception):
38
+ class HttpError(Exception):
39
39
  """The base of every error the SDK raises."""
40
40
 
41
41
 
42
- class ConfigError(HoneyError):
42
+ class ConfigError(HttpError):
43
43
  """A client or call that cannot be built: no usable base URL, or a header value no request carries."""
44
44
 
45
45
 
46
- class PathParamError(HoneyError):
46
+ class PathParamError(HttpError):
47
47
  """A path parameter that is missing, or empty, ``.`` or ``..``: nothing is sent."""
48
48
 
49
49
 
50
- class APIConnectionError(HoneyError):
50
+ class APIConnectionError(HttpError):
51
51
  """No answer: the connection failed, or the answer was cut off or too large."""
52
52
 
53
53
 
@@ -55,15 +55,15 @@ class APITimeoutError(APIConnectionError):
55
55
  """The call ran past its timeout."""
56
56
 
57
57
 
58
- class CanceledError(HoneyError):
58
+ class CanceledError(HttpError):
59
59
  """The call's ``cancel`` event fired."""
60
60
 
61
61
 
62
- class DecodeError(HoneyError):
62
+ class DecodeError(HttpError):
63
63
  """A success answer whose body is not what the operation declares."""
64
64
 
65
65
 
66
- class HookError(HoneyError):
66
+ class HookError(HttpError):
67
67
  """A hook raised; its error is the cause."""
68
68
 
69
69
 
@@ -79,7 +79,7 @@ class FieldError(TypedDict, total=False):
79
79
 
80
80
 
81
81
  class ErrorEnvelope(TypedDict, total=False):
82
- """honey's error envelope: a view of the body's JSON object (empty for any other body), each member
82
+ """backend's error envelope: a view of the body's JSON object (empty for any other body), each member
83
83
  as the server sent it; ``json.loads(e.body)`` holds the members it does not name."""
84
84
 
85
85
  status: int
@@ -103,7 +103,7 @@ def sanitized(text: str) -> str:
103
103
  return kept if len(kept) <= 512 else kept[:512] + "\u2026"
104
104
 
105
105
 
106
- class APIStatusError(HoneyError):
106
+ class APIStatusError(HttpError):
107
107
  """An error status: its status, headers, body, envelope and message, and the error key the body
108
108
  names (an ``ErrorKey`` member when the API declares it). ``str()`` is ``HTTP <status>: <message>``."""
109
109
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """An SSE operation's answer: the open stream's events, each one's data decoded. No timeout bounds it.
3
3
  An event that does not decode, a cap or a failed read is raised once and ends it; the call's ``cancel``,
4
4
  ``aclose`` and a cancelled read end it, the cancelled read raising ``CancelledError``. Open it with
@@ -15,7 +15,7 @@ from typing import Generic, Self, TypeVar, cast
15
15
 
16
16
  import httpx2
17
17
 
18
- from .errors import APIConnectionError, CanceledError, DecodeError, HoneyError, loads
18
+ from .errors import APIConnectionError, CanceledError, DecodeError, HttpError, loads
19
19
  from .exchange import shaped
20
20
  from .sse import RawEvent, SseParser
21
21
 
@@ -82,7 +82,7 @@ class EventStream(Generic[T]):
82
82
  weakref.finalize(self, dropped, self.chunks, response)
83
83
  self.parser = SseParser()
84
84
  self.pending: deque[RawEvent] = deque()
85
- self.failure: HoneyError | None = None
85
+ self.failure: HttpError | None = None
86
86
  self.ended = False
87
87
  self.delivered = ""
88
88
 
@@ -133,7 +133,7 @@ class EventStream(Generic[T]):
133
133
  raise
134
134
 
135
135
  async def end(
136
- self, failure: HoneyError | None, cause: Exception | None = None
136
+ self, failure: HttpError | None, cause: Exception | None = None
137
137
  ) -> None:
138
138
  if not self.ended:
139
139
  if failure is not None:
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The sans-IO core every call shares, whichever client sends it: the URL, the header layers (the
3
3
  credential last), the idempotency key and request id, each redirect, the retry after a 401, and the
4
4
  answer's error class and decoding. The shells only move bytes."""
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The caller's hooks, TypeScript parity: ``on_request`` before each send, ``on_response`` on each
3
3
  answer, in order, sharing one ``state``; a hook that raises ends the call."""
4
4
 
@@ -9,7 +9,7 @@ from collections.abc import Awaitable, Callable, Mapping, Sequence
9
9
  from dataclasses import dataclass, field
10
10
  from typing import TYPE_CHECKING, Any, TypeVar
11
11
 
12
- from .errors import ConfigError, HoneyError, HookError
12
+ from .errors import ConfigError, HookError, HttpError
13
13
 
14
14
  if TYPE_CHECKING:
15
15
  from .config import ClientConfig
@@ -49,8 +49,8 @@ class ResponseContext:
49
49
  state: dict[str, Any] = field(default_factory=dict, repr=False)
50
50
 
51
51
 
52
- def wrapped(error: Exception, what: str = "hook") -> HoneyError:
53
- return error if isinstance(error, HoneyError) else HookError(f"{what}: {error}")
52
+ def wrapped(error: Exception, what: str = "hook") -> HttpError:
53
+ return error if isinstance(error, HttpError) else HookError(f"{what}: {error}")
54
54
 
55
55
 
56
56
  def refuse_hooks(config: ClientConfig, sync: bool) -> None:
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """Invalidation targets (``METHOD /path``): filled from a call's path params, and matched against a
3
3
  concrete path segment by segment, with no regular expression."""
4
4
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """Lifecycle log entries for ``on_log``. No entry carries a path value, a header value or a query:
3
3
  ``operation`` is ``METHOD /template``. A logger that raises is ignored."""
4
4
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """One operation, as its methods call it."""
3
3
 
4
4
  from dataclasses import dataclass
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """Path templates: ``{name}`` in a segment and whole ``:name`` segments, each value encoded like
3
3
  ``encodeURIComponent``, so every SDK language sends the same bytes."""
4
4
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """Query and form values as URLSearchParams writes them: ``+`` for a space, a list repeating its key,
3
3
  a number as JavaScript prints it."""
4
4
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """A realtime operation's answer: a connection over a chain of transports (WebSocket, then SSE, then
3
3
  long-poll) that reconnects after a drop and resumes past the last message it delivered."""
4
4
 
@@ -16,7 +16,7 @@ from .errors import (
16
16
  APITimeoutError,
17
17
  CanceledError,
18
18
  DecodeError,
19
- HoneyError,
19
+ HttpError,
20
20
  loads,
21
21
  )
22
22
  from .events import Cancel, raced
@@ -98,7 +98,7 @@ class ResumableConnection(Generic[T]):
98
98
  for adapter in self.adapters:
99
99
  try:
100
100
  self.conn = await adapter.connect(self.url, self.opts)
101
- except (HoneyError, OSError) as error:
101
+ except (HttpError, OSError) as error:
102
102
  if weight(error) == 6 and not refreshed:
103
103
  refreshed = True
104
104
  refresh = getattr(adapter, "refresh", None)
@@ -122,7 +122,7 @@ class ResumableConnection(Generic[T]):
122
122
  full = min(base / 1000 * 2**self.attempts, 30.0)
123
123
  await asyncio.sleep(full / 2 + JITTER.uniform(0, full / 2))
124
124
  self.attempts += 1
125
- with contextlib.suppress(HoneyError, OSError):
125
+ with contextlib.suppress(HttpError, OSError):
126
126
  return await asyncio.wait_for(self.connect(), 30)
127
127
  self.state = ConnectionState.DISCONNECTED
128
128
  raise self.failure
@@ -148,7 +148,7 @@ class ResumableConnection(Generic[T]):
148
148
  try:
149
149
  message = await conn.recv()
150
150
  failure: Exception = APIConnectionError("the connection ended")
151
- except (HoneyError, OSError) as error:
151
+ except (HttpError, OSError) as error:
152
152
  message, failure = None, error
153
153
  if message is not None:
154
154
  return self.deliver(message)
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """Which redirects a call follows (R2): the HTTP client never follows one itself. A hop to another
3
3
  origin is followed only under ``"follow"``, stripped to the safe headers, and never carries a body."""
4
4
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """What ``client.safe`` answers: ``Ok``, or ``Err`` with the error the call raises for an answer."""
3
3
 
4
4
  from collections.abc import Callable, Coroutine
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The async shell: the core's hops sent with ``httpx2.AsyncClient``. An ``asyncio.Event`` ``cancel`` is
3
3
  raced against each send; a ``threading.Event`` is checked between steps."""
4
4
 
@@ -9,7 +9,7 @@ import httpx2
9
9
 
10
10
  from .auth import refresh_async
11
11
  from .config import ClientConfig, Defaults
12
- from .errors import APIConnectionError, APITimeoutError, HoneyError
12
+ from .errors import APIConnectionError, APITimeoutError, HttpError
13
13
  from .events import EventStream, raced
14
14
  from .exchange import CallArgs, ClientCore, Exchange, HttpAnswer, failure
15
15
  from .hooks import RequestContext, refuse_hooks, run_async
@@ -86,7 +86,7 @@ class AsyncTransport(ClientCore):
86
86
  raise x.failure or failure(answer, self)
87
87
  try:
88
88
  x.fill(answer)
89
- except HoneyError:
89
+ except HttpError:
90
90
  await live.aclose()
91
91
  raise
92
92
  return live
@@ -101,7 +101,7 @@ class AsyncTransport(ClientCore):
101
101
  fresh = await refresh_async(self.auth, hook, token)
102
102
  if fresh is not None:
103
103
  answer, live = await self.attempt(x, fresh, True)
104
- except HoneyError as error:
104
+ except HttpError as error:
105
105
  x.log.failed(error)
106
106
  raise
107
107
  except asyncio.CancelledError:
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The blocking shell: the core's hops sent with ``httpx2.Client``; ``cancel`` is checked between steps."""
3
3
 
4
4
  from typing import TypeVar, Unpack, cast
@@ -7,7 +7,7 @@ import httpx2
7
7
 
8
8
  from .auth import refresh_sync
9
9
  from .config import ClientConfig, Defaults
10
- from .errors import APIConnectionError, APITimeoutError, HoneyError
10
+ from .errors import APIConnectionError, APITimeoutError, HttpError
11
11
  from .exchange import CallArgs, ClientCore, Exchange, HttpAnswer
12
12
  from .hooks import refuse_hooks, run_sync
13
13
  from .operation import Operation
@@ -44,7 +44,7 @@ class SyncTransport(ClientCore):
44
44
  if hook is not None and x.retries(answer):
45
45
  fresh = refresh_sync(self.auth, hook, token)
46
46
  answer = answer if fresh is None else self.attempt(x, fresh, True)
47
- except HoneyError as error:
47
+ except HttpError as error:
48
48
  x.log.failed(error)
49
49
  raise
50
50
  return x.done(answer)
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The WHATWG event-stream parser, over bytes: CRLF, LF or CR line ends; a blank line dispatches; a final
3
3
  event without one is dropped; a sticky id (one holding NUL ignored); a digits-only ``retry``. A line is
4
4
  capped at 1 MiB and an event's data at 8 MiB, in bytes, whatever the encoding."""
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """Staleness per ``METHOD /path`` selector, TypeScript parity: exact and pattern keys, a stale window,
3
3
  eviction of the least recently staled at the cap, and a sequence so a read clears only what was staled
4
4
  before it began. One tracker serves both clients; its lock is never held across an ``await``."""
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The realtime transports: what an adapter implements (a caller's own included), the resume cursor each
3
3
  dial sends, and the dial the default adapters share: every one through the client's exchange (its hooks,
4
4
  log, 401 refresh and current token) with the call's path, query and headers, but a WebSocket's, which runs
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The long-poll adapter: one GET per message with the cursor, held up to 60 s whatever the timeout (a 204
3
3
  polls again); a send is a POST."""
4
4
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The SSE adapter: the cursor's id as Last-Event-ID and its token on the query, each event's data a
3
3
  message; a send is a POST."""
4
4
 
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """The WebSocket adapter: the cursor as query params, messages both ways, no hook on the dial."""
3
3
 
4
4
  from .transport import (
@@ -1,4 +1,4 @@
1
- # @generated by honey. DO NOT EDIT.
1
+ # @generated by clients. DO NOT EDIT.
2
2
  """A WebSocket operation's answer: the open socket, messages both ways, JSON on top. The socket lives in
3
3
  a task of its own, so any task may use or close it; the call's ``cancel``, ``close`` and a cancelled read
4
4
  end it. Open it with ``async with`` or call ``close()`` to free its connection; a dropped socket frees it
@@ -29,7 +29,7 @@ from .errors import (
29
29
  APIConnectionError,
30
30
  APITimeoutError,
31
31
  CanceledError,
32
- HoneyError,
32
+ HttpError,
33
33
  status_error,
34
34
  )
35
35
  from .events import Cancel, raced
@@ -248,7 +248,7 @@ async def open_socket(
248
248
  task.cancel()
249
249
  if isinstance(error, httpx2.TimeoutException):
250
250
  raise APITimeoutError("the call ran past its timeout") from error
251
- if isinstance(error, HoneyError) or not isinstance(error, Exception):
251
+ if isinstance(error, HttpError) or not isinstance(error, Exception):
252
252
  raise
253
253
  raise APIConnectionError("the WebSocket handshake failed") from error
254
254
  return TypedWebSocket(opened.result(), done, task, x.options.get("cancel"))
@@ -356,7 +356,7 @@ dependencies = [
356
356
  ]
357
357
 
358
358
  [[package]]
359
- name = "honey-sdk"
359
+ name = "http-sdk"
360
360
  version = "0.1.0"
361
361
  dependencies = [
362
362
  "bytes",
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  //! How a method reads its answer (G16): JSON into its type, none as `()`, text as a `String`,
3
3
  //! binary as bytes. An error status, and a 2xx that does not read (its body past the cap
4
4
  //! included), fail with the answer; the call's style settles them (result.rs).
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  //! The credential: the token a call sends, refreshed once for concurrent 401s; and the v4 ids an
3
3
  //! `X-Request-Id` and an `Idempotency-Key` take (G9: no uuid crate).
4
4
 
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  //! A request body a method takes as bytes (G4): bytes in memory, or a stream sent as it is read.
3
3
 
4
4
  use bytes::Bytes;
@@ -88,7 +88,7 @@ pub(crate) struct Multipart {
88
88
  impl Multipart {
89
89
  pub(crate) fn new() -> Self {
90
90
  Multipart {
91
- boundary: format!("honey-{}", crate::auth::new_v4()),
91
+ boundary: format!("clients-{}", crate::auth::new_v4()),
92
92
  out: Vec::new(),
93
93
  failed: None,
94
94
  }
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  //! A method's call (Fb1): `.await` sends it (`IntoFuture`). The method copies its arguments into
3
3
  //! the request up front and holds the client's `Arc`, so a `Call` borrows nothing: it can be stored,
4
4
  //! moved or spawned. The overrides apply to this call alone. `S` is the client's style: `Throw`
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  //! The client and its configuration: `Client::new` (emitted per API) builds one from a
3
3
  //! `ClientConfig`, defaulting `base_url` to the API's first server.
4
4