@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,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -47,7 +47,7 @@ type exchange struct {
47
47
  }
48
48
 
49
49
  // ErrResponseTooLarge is a *DecodeError's cause when a 2xx body exceeds Config.MaxResponseBytes.
50
- var ErrResponseTooLarge = errors.New("honey: response body exceeds MaxResponseBytes")
50
+ var ErrResponseTooLarge = errors.New("httpsdk: response body exceeds MaxResponseBytes")
51
51
 
52
52
  // doRequest sends c and buffers its answer (run), honoring the call's timeout and the stale
53
53
  // tracker. A ctx already done sends nothing: OnLog sees only its error. A 2xx past the cap is a
@@ -113,7 +113,7 @@ func (x *exchange) sendWithAuth(ctx context.Context) (*requestResult, error) {
113
113
  }
114
114
  fresh, err := x.cfg.auth.refresh(ctx, x.cfg, token)
115
115
  if err != nil {
116
- return nil, fmt.Errorf("honey: OnAuthExpired failed: %w", err)
116
+ return nil, fmt.Errorf("httpsdk: OnAuthExpired failed: %w", err)
117
117
  }
118
118
  if fresh == "" {
119
119
  return result, nil
@@ -165,7 +165,7 @@ func (x *exchange) newRequest(ctx context.Context, token string, retry bool) (*h
165
165
  c := x.c
166
166
  fullURL, err := buildURL(x.rc.baseURL, c.path, c.query)
167
167
  if err != nil {
168
- return nil, fmt.Errorf("honey: build URL: %w", err)
168
+ return nil, fmt.Errorf("httpsdk: build URL: %w", err)
169
169
  }
170
170
  /* a Reader body streams as is; RequestContext.Body stays nil so no hook reads a one-shot reader */
171
171
  payload, err := c.body.bytes()
@@ -186,7 +186,7 @@ func (x *exchange) newRequest(ctx context.Context, token string, retry bool) (*h
186
186
  }
187
187
  req, err := http.NewRequestWithContext(ctx, rc.Method, rc.URL, reader)
188
188
  if err != nil {
189
- return nil, fmt.Errorf("honey: build request: %w", err)
189
+ return nil, fmt.Errorf("httpsdk: build request: %w", err)
190
190
  }
191
191
  req.Header = rc.Headers
192
192
  return req, nil
@@ -197,13 +197,13 @@ func (x *exchange) newRequest(ctx context.Context, token string, retry bool) (*h
197
197
  func wrapTransportError(ctx context.Context, err error) error {
198
198
  switch ctxErr := context.Cause(ctx); {
199
199
  case errors.Is(ctxErr, context.DeadlineExceeded):
200
- return fmt.Errorf("honey: request timed out: %w", ctxErr)
200
+ return fmt.Errorf("httpsdk: request timed out: %w", ctxErr)
201
201
  case errors.Is(ctxErr, context.Canceled):
202
- return fmt.Errorf("honey: request canceled: %w", ctxErr)
202
+ return fmt.Errorf("httpsdk: request canceled: %w", ctxErr)
203
203
  case ctxErr != nil:
204
- return fmt.Errorf("honey: context error: %w", ctxErr)
204
+ return fmt.Errorf("httpsdk: context error: %w", ctxErr)
205
205
  }
206
- return fmt.Errorf("honey: http do: %w", redactURL(err))
206
+ return fmt.Errorf("httpsdk: http do: %w", redactURL(err))
207
207
  }
208
208
 
209
209
  // readBody reads r up to limit bytes; a negative limit reads all.
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -29,7 +29,7 @@ type DecodeError struct {
29
29
  Err error
30
30
  }
31
31
 
32
- func (e *DecodeError) Error() string { return "honey: decode response: " + e.Err.Error() }
32
+ func (e *DecodeError) Error() string { return "httpsdk: decode response: " + e.Err.Error() }
33
33
 
34
34
  // Unwrap returns the parse error, or ErrResponseTooLarge.
35
35
  func (e *DecodeError) Unwrap() error { return e.Err }
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -31,10 +31,10 @@ const (
31
31
  )
32
32
 
33
33
  // ErrSSELineTooLong is returned when a single SSE line exceeds 1 MiB.
34
- var ErrSSELineTooLong = errors.New("honey: sse line exceeds 1 MiB")
34
+ var ErrSSELineTooLong = errors.New("httpsdk: sse line exceeds 1 MiB")
35
35
 
36
36
  // ErrSSEEventTooLarge is returned when one event's data exceeds 8 MiB.
37
- var ErrSSEEventTooLarge = errors.New("honey: sse event exceeds 8 MiB")
37
+ var ErrSSEEventTooLarge = errors.New("httpsdk: sse event exceeds 8 MiB")
38
38
 
39
39
  // parseSSEStream yields the events of resp and closes its body when done. A non-2xx response
40
40
  // yields its typed error and ends; a canceled ctx ends the stream quietly.
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -87,7 +87,7 @@ func streamJSON[T any](ctx context.Context, cfg Config, c *call, opts []RequestO
87
87
  }
88
88
  ev := SSEEvent[T]{Event: raw.Event, ID: raw.ID, Retry: raw.Retry}
89
89
  if err := json.Unmarshal([]byte(raw.Data), &ev.Data); err != nil {
90
- yield(SSEEvent[T]{}, fmt.Errorf("honey: decode sse event: %w", err))
90
+ yield(SSEEvent[T]{}, fmt.Errorf("httpsdk: decode sse event: %w", err))
91
91
  return
92
92
  }
93
93
  if !yield(ev, nil) {
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -236,7 +236,7 @@ func (c *wsConn) Close() error {
236
236
  // posted is an SSE or long-poll send: a realtime method's POST, else receive-only.
237
237
  func posted(ctx context.Context, send func(context.Context, any) error, name string, data any) error {
238
238
  if send == nil {
239
- return fmt.Errorf("honey: %s transport is receive-only", name)
239
+ return fmt.Errorf("httpsdk: %s transport is receive-only", name)
240
240
  }
241
241
  return send(ctx, data)
242
242
  }
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -89,7 +89,7 @@ func checkEventStream(resp *http.Response) error {
89
89
  }
90
90
  if ct := resp.Header.Get("Content-Type"); !strings.HasPrefix(strings.ToLower(ct), "text/event-stream") {
91
91
  resp.Body.Close()
92
- return fmt.Errorf("honey: sse transport: unexpected content type %q", ct)
92
+ return fmt.Errorf("httpsdk: sse transport: unexpected content type %q", ct)
93
93
  }
94
94
  return nil
95
95
  }
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -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.Locale;
5
5
  import java.util.Map;
@@ -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.Map;
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.io.InputStream;
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.io.ByteArrayOutputStream;
5
5
  import java.io.InputStream;
@@ -47,12 +47,12 @@ record Body(byte[] bytes, InputStream stream, String mediaType) {
47
47
  return new Body(bytes, null, "application/x-www-form-urlencoded");
48
48
  }
49
49
 
50
- /** The multipart body of {@code parts} under a fresh {@code honey-<uuid>} boundary. */
50
+ /** The multipart body of {@code parts} under a fresh {@code clients-<uuid>} boundary. */
51
51
  static Body multipart(List<Part> parts) {
52
52
  if (parts == null) {
53
53
  return null;
54
54
  }
55
- String mark = "honey-" + UUID.randomUUID();
55
+ String mark = "clients-" + UUID.randomUUID();
56
56
  ByteArrayOutputStream out = new ByteArrayOutputStream();
57
57
  for (Part part : parts) {
58
58
  for (Object item : part.items()) {
@@ -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
  import tools.jackson.databind.JsonNode;
@@ -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.function.Consumer;
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.net.URI;
5
5
  import java.time.Duration;
@@ -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
  /** Where a realtime connection stands. */
5
5
  public enum ConnectionState {
@@ -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.Objects;
5
5
  import java.util.function.Supplier;
@@ -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.time.Instant;
@@ -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.io.ByteArrayInputStream;
5
5
  import java.io.FilterInputStream;
@@ -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.LinkedHashMap;
@@ -1,12 +1,12 @@
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
  import java.util.Map;
6
6
  import tools.jackson.databind.JsonNode;
7
7
 
8
8
  /**
9
- * honey's error envelope, read from an error body's JSON object (empty for any other body): each
9
+ * backend's error envelope, read from an error body's JSON object (empty for any other body): each
10
10
  * member it names when the server sent it with its type, and every other member, a mistyped one
11
11
  * included, in {@code extra}.
12
12
  */
@@ -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.io.IOException;
5
5
  import java.io.InputStream;
@@ -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.http.HttpClient;
5
5
  import java.util.Map;
@@ -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 file of a multipart body: its name, its bytes and its media type. */
5
5
  public record FilePart(String fileName, byte[] data, String contentType) {}
@@ -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.io.IOException;
5
5
  import java.io.InputStream;
@@ -114,7 +114,7 @@ final class Flight {
114
114
  } catch (CancellationException e) {
115
115
  log.canceled();
116
116
  throw e;
117
- } catch (HoneyException e) {
117
+ } catch (HttpException e) {
118
118
  log.failed(e, null);
119
119
  throw e;
120
120
  }
@@ -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
  import java.util.concurrent.CancellationException;
@@ -24,7 +24,7 @@ final class Hooks {
24
24
  * failure wrapped as the call's {@link HookException}.
25
25
  */
26
26
  static RuntimeException failure(String label, java.lang.Exception e) {
27
- if (e instanceof HoneyException || e instanceof CancellationException) {
27
+ if (e instanceof HttpException || e instanceof CancellationException) {
28
28
  return (RuntimeException) e;
29
29
  }
30
30
  return new HookException(label + ": " + e.getMessage(), e);
@@ -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.io.InputStream;
5
5
  import java.net.http.HttpClient;
@@ -1,14 +1,14 @@
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
  * Every error the SDK throws; the caller's own cancellation is a {@link
6
6
  * java.util.concurrent.CancellationException}.
7
7
  */
8
- public abstract class HoneyException extends RuntimeException {
8
+ public abstract class HttpException extends RuntimeException {
9
9
  private static final long serialVersionUID = 1L;
10
10
 
11
- HoneyException(String message, Throwable cause) {
11
+ HttpException(String message, Throwable cause) {
12
12
  super(message, cause);
13
13
  }
14
14
  }
@@ -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.Objects;
@@ -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 tools.jackson.databind.DeserializationFeature;
5
5
  import tools.jackson.databind.json.JsonMapper;
@@ -13,7 +13,7 @@ final class Json {
13
13
  static final JsonMapper MAPPER =
14
14
  JsonMapper.builder()
15
15
  .addModule(
16
- new SimpleModule("honey-opt")
16
+ new SimpleModule("clients-opt")
17
17
  .addDeserializer(Opt.class, new Opt.Reader(null))
18
18
  .addSerializer(new Opt.Writer()))
19
19
  .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
@@ -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.concurrent.CompletableFuture;
@@ -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
  * One log line of a call. Its error is {@code <SimpleName>: <message>} or {@code the call was
@@ -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
 
@@ -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 operation's fixed description: its path params by spec name in path order. */
5
5
  record Operation(
@@ -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 tools.jackson.core.JsonGenerator;
5
5
  import tools.jackson.core.JsonParser;
@@ -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.io.IOException;
5
5
  import java.io.InputStream;
@@ -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.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.time.Duration;
@@ -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.io.UncheckedIOException;
5
5
  import java.time.Duration;
@@ -291,7 +291,7 @@ final class RealtimeLoop {
291
291
  try {
292
292
  open();
293
293
  return;
294
- } catch (HoneyException e) {
294
+ } catch (HttpException e) {
295
295
  failure = e;
296
296
  if (refused) {
297
297
  break;
@@ -366,6 +366,6 @@ final class RealtimeLoop {
366
366
  * caller's.
367
367
  */
368
368
  private static boolean fails(RuntimeException e) {
369
- return e instanceof HoneyException || e instanceof UncheckedIOException;
369
+ return e instanceof HttpException || e instanceof UncheckedIOException;
370
370
  }
371
371
  }
@@ -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
  * Which redirects a call follows. {@link #SAME_ORIGIN} (the default) follows a hop to the origin
@@ -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.io.InputStream;
5
5
  import java.net.URI;
@@ -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.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
  /** Runs before each attempt is sent; a throw ends the call as a {@link HookException}. */
5
5
  @FunctionalInterface
@@ -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.Map;
@@ -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
  import java.util.Map;
@@ -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
  * Runs on each attempt's answer before it is read; a throw ends the call as a {@link
@@ -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.function.Function;
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.Iterator;
@@ -1,8 +1,8 @@
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
  /** An answer: an error status or a 2xx that does not decode; a {@link Result.Err} holds it. */
5
- public abstract class SdkException extends HoneyException {
5
+ public abstract class SdkException extends HttpException {
6
6
  private static final long serialVersionUID = 1L;
7
7
 
8
8
  SdkException(String message, Throwable cause) {
@@ -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.io.ByteArrayOutputStream;
5
5
  import java.net.http.WebSocket;
@@ -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.io.ByteArrayOutputStream;
5
5
  import java.io.IOException;