@ferricstore/ferricstore 0.11.6 → 0.11.9

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 (261) hide show
  1. package/README.md +37 -3
  2. package/dist/index.cjs +672 -152
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +40 -2
  5. package/dist/index.d.ts +40 -2
  6. package/dist/index.js +662 -145
  7. package/dist/index.js.map +1 -1
  8. package/docs/api/assets/hierarchy.js +1 -1
  9. package/docs/api/assets/highlight.css +1 -1
  10. package/docs/api/assets/main.js +1 -1
  11. package/docs/api/assets/navigation.js +1 -1
  12. package/docs/api/assets/search.js +1 -1
  13. package/docs/api/assets/style.css +18 -3
  14. package/docs/api/classes/BitmapStore.html +192 -3
  15. package/docs/api/classes/BloomFilterStore.html +197 -3
  16. package/docs/api/classes/ClaimHydrationError.html +202 -7
  17. package/docs/api/classes/ConnectionClosedError.html +193 -8
  18. package/docs/api/classes/CountMinSketchStore.html +171 -3
  19. package/docs/api/classes/CuckooFilterStore.html +196 -3
  20. package/docs/api/classes/FerricStoreClient.html +2888 -7
  21. package/docs/api/classes/FerricStoreError.html +197 -7
  22. package/docs/api/classes/FlowAlreadyExistsError.html +185 -7
  23. package/docs/api/classes/FlowBatchError.html +204 -8
  24. package/docs/api/classes/FlowNotFoundError.html +185 -7
  25. package/docs/api/classes/FlowQueryError.html +204 -7
  26. package/docs/api/classes/FlowWrongStateError.html +185 -7
  27. package/docs/api/classes/GeoStore.html +188 -3
  28. package/docs/api/classes/HTTPAdapter.html +144 -0
  29. package/docs/api/classes/HTTPTransportError.html +222 -0
  30. package/docs/api/classes/HashStore.html +493 -3
  31. package/docs/api/classes/HyperLogLogStore.html +148 -3
  32. package/docs/api/classes/InvalidCommandError.html +185 -7
  33. package/docs/api/classes/JsonCodec.html +104 -3
  34. package/docs/api/classes/KeyValueStore.html +794 -3
  35. package/docs/api/classes/LeaseRenewalError.html +157 -8
  36. package/docs/api/classes/ListStore.html +451 -3
  37. package/docs/api/classes/LockHeldError.html +185 -7
  38. package/docs/api/classes/LockNotOwnedError.html +185 -7
  39. package/docs/api/classes/NativeAdapter.html +135 -3
  40. package/docs/api/classes/OverloadedError.html +190 -7
  41. package/docs/api/classes/Queue.html +141 -4
  42. package/docs/api/classes/QueueClient.html +97 -4
  43. package/docs/api/classes/QueueCompletionError.html +163 -8
  44. package/docs/api/classes/QueueWorker.html +153 -4
  45. package/docs/api/classes/RawCodec.html +96 -3
  46. package/docs/api/classes/ReconnectingExecutor.html +180 -5
  47. package/docs/api/classes/RequestTimeoutError.html +199 -8
  48. package/docs/api/classes/RerouteError.html +188 -8
  49. package/docs/api/classes/RoutingTopology.html +125 -3
  50. package/docs/api/classes/SetStore.html +363 -3
  51. package/docs/api/classes/SortedSetStore.html +369 -3
  52. package/docs/api/classes/StaleLeaseError.html +185 -7
  53. package/docs/api/classes/StalePolicyGenerationError.html +188 -8
  54. package/docs/api/classes/StreamStore.html +259 -3
  55. package/docs/api/classes/TDigestStore.html +348 -3
  56. package/docs/api/classes/TopKStore.html +229 -3
  57. package/docs/api/classes/TopologyNativeAdapterPool.html +180 -5
  58. package/docs/api/classes/Workflow.html +266 -4
  59. package/docs/api/classes/WorkflowClient.html +97 -4
  60. package/docs/api/classes/WorkflowContext.html +293 -5
  61. package/docs/api/classes/WorkflowFlowCommands.html +251 -3
  62. package/docs/api/classes/WorkflowWorker.html +108 -4
  63. package/docs/api/functions/classifyServerError.html +44 -1
  64. package/docs/api/functions/complete.html +41 -1
  65. package/docs/api/functions/fail.html +41 -1
  66. package/docs/api/functions/httpCommandDisposition.html +41 -0
  67. package/docs/api/functions/isOutcome.html +41 -1
  68. package/docs/api/functions/isReconnectableClosedConnectionError.html +41 -1
  69. package/docs/api/functions/mapException.html +41 -1
  70. package/docs/api/functions/projectFlowQuery.html +43 -1
  71. package/docs/api/functions/retry.html +41 -1
  72. package/docs/api/functions/transition.html +42 -1
  73. package/docs/api/hierarchy.html +112 -1
  74. package/docs/api/index.html +72 -5
  75. package/docs/api/interfaces/AdminListOptions.html +70 -2
  76. package/docs/api/interfaces/ApprovalListOptions.html +74 -2
  77. package/docs/api/interfaces/ApprovalRequestOptions.html +99 -2
  78. package/docs/api/interfaces/AttributeQueryOptions.html +69 -2
  79. package/docs/api/interfaces/AutoBatchOptions.html +72 -3
  80. package/docs/api/interfaces/BackpressurePolicy.html +69 -2
  81. package/docs/api/interfaces/BudgetCommitOptions.html +59 -2
  82. package/docs/api/interfaces/BudgetReserveOptions.html +69 -2
  83. package/docs/api/interfaces/CancelOptions.html +135 -2
  84. package/docs/api/interfaces/ChildSpec.html +79 -2
  85. package/docs/api/interfaces/CircuitOpenOptions.html +64 -2
  86. package/docs/api/interfaces/ClaimDueOptions.html +146 -3
  87. package/docs/api/interfaces/ClaimHydrationItem.html +59 -2
  88. package/docs/api/interfaces/ClaimedItem.html +100 -3
  89. package/docs/api/interfaces/Codec.html +84 -2
  90. package/docs/api/interfaces/CommandExecutor.html +145 -4
  91. package/docs/api/interfaces/CompleteJobsAndClaimJobsResult.html +84 -7
  92. package/docs/api/interfaces/CompleteManyOptions.html +114 -2
  93. package/docs/api/interfaces/CompleteOptions.html +143 -2
  94. package/docs/api/interfaces/CompleteOutcome.html +117 -2
  95. package/docs/api/interfaces/CountMinMergeOptions.html +54 -2
  96. package/docs/api/interfaces/CreateItem.html +84 -2
  97. package/docs/api/interfaces/CreateManyOptions.html +173 -6
  98. package/docs/api/interfaces/CreateOptions.html +143 -4
  99. package/docs/api/interfaces/EffectCompensateOptions.html +89 -2
  100. package/docs/api/interfaces/EffectConfirmOptions.html +89 -2
  101. package/docs/api/interfaces/EffectFailOptions.html +94 -2
  102. package/docs/api/interfaces/EffectReserveOptions.html +84 -2
  103. package/docs/api/interfaces/EffectStatusOptions.html +77 -2
  104. package/docs/api/interfaces/ExecutePipelineOptions.html +68 -4
  105. package/docs/api/interfaces/ExtendLeaseOptions.html +79 -2
  106. package/docs/api/interfaces/FailOptions.html +143 -2
  107. package/docs/api/interfaces/FailOutcome.html +117 -2
  108. package/docs/api/interfaces/FencedItem.html +69 -2
  109. package/docs/api/interfaces/FerricStoreClientFromUrlOptions.html +105 -4
  110. package/docs/api/interfaces/FerricStoreClientOptions.html +84 -4
  111. package/docs/api/interfaces/FetchOrComputeComputeResult.html +83 -4
  112. package/docs/api/interfaces/FetchOrComputeHitResult.html +78 -2
  113. package/docs/api/interfaces/FlowBatchCompletedItem.html +59 -2
  114. package/docs/api/interfaces/FlowEventProjectionField.html +64 -2
  115. package/docs/api/interfaces/FlowExplainCapabilities.html +69 -2
  116. package/docs/api/interfaces/FlowExplainResult.html +124 -2
  117. package/docs/api/interfaces/FlowMaxActiveFailure.html +59 -2
  118. package/docs/api/interfaces/FlowPolicyBackoffSnapshot.html +69 -2
  119. package/docs/api/interfaces/FlowPolicyOptions.html +107 -6
  120. package/docs/api/interfaces/FlowPolicyRetentionSnapshot.html +59 -2
  121. package/docs/api/interfaces/FlowPolicyRetrySnapshot.html +64 -2
  122. package/docs/api/interfaces/FlowPolicySnapshot.html +121 -5
  123. package/docs/api/interfaces/FlowPolicyStateSnapshot.html +74 -2
  124. package/docs/api/interfaces/FlowQueryCountResult.html +89 -2
  125. package/docs/api/interfaces/FlowQueryErrorPosition.html +64 -2
  126. package/docs/api/interfaces/FlowQueryIndex.html +134 -2
  127. package/docs/api/interfaces/FlowQueryIndexBuild.html +106 -2
  128. package/docs/api/interfaces/FlowQueryIndexCoverage.html +69 -2
  129. package/docs/api/interfaces/FlowQueryIndexField.html +69 -2
  130. package/docs/api/interfaces/FlowQueryIndexFormat.html +79 -2
  131. package/docs/api/interfaces/FlowQueryIndexProgress.html +86 -2
  132. package/docs/api/interfaces/FlowQueryIndexRegistry.html +59 -2
  133. package/docs/api/interfaces/FlowQueryIndexRetirement.html +94 -2
  134. package/docs/api/interfaces/FlowQueryIndexServices.html +74 -2
  135. package/docs/api/interfaces/FlowQueryIndexStatistics.html +99 -2
  136. package/docs/api/interfaces/FlowQueryIndexStatus.html +84 -2
  137. package/docs/api/interfaces/FlowQueryIndexValidation.html +121 -2
  138. package/docs/api/interfaces/FlowQueryPage.html +59 -2
  139. package/docs/api/interfaces/FlowQueryQuality.html +69 -2
  140. package/docs/api/interfaces/FlowQueryRecordsResult.html +94 -2
  141. package/docs/api/interfaces/FlowQueryUsage.html +104 -2
  142. package/docs/api/interfaces/FlowRecord.html +173 -2
  143. package/docs/api/interfaces/FlowRunProjectionField.html +64 -2
  144. package/docs/api/interfaces/FlowStatePolicy.html +59 -2
  145. package/docs/api/interfaces/FlowStatsOptions.html +74 -2
  146. package/docs/api/interfaces/GeoMember.html +64 -2
  147. package/docs/api/interfaces/GovernanceLedgerOptions.html +74 -2
  148. package/docs/api/interfaces/HTTPAdapterOptions.html +120 -0
  149. package/docs/api/interfaces/HistoryOptions.html +124 -2
  150. package/docs/api/interfaces/InvocationCreateOptions.html +71 -2
  151. package/docs/api/interfaces/KeyInfo.html +79 -2
  152. package/docs/api/interfaces/LeaseMutationOptions.html +136 -2
  153. package/docs/api/interfaces/LimitAmountOptions.html +64 -2
  154. package/docs/api/interfaces/LimitLeaseOptions.html +74 -2
  155. package/docs/api/interfaces/LimitListOptions.html +78 -2
  156. package/docs/api/interfaces/LimitReleaseOptions.html +64 -2
  157. package/docs/api/interfaces/MutateOptions.html +110 -2
  158. package/docs/api/interfaces/NamedValueMutation.html +93 -2
  159. package/docs/api/interfaces/NativeAdapterOptions.html +175 -12
  160. package/docs/api/interfaces/NativeClientOptions.html +249 -16
  161. package/docs/api/interfaces/NativeProtocolEvent.html +69 -2
  162. package/docs/api/interfaces/ProtocolCommand.html +69 -2
  163. package/docs/api/interfaces/QueueOptions.html +64 -2
  164. package/docs/api/interfaces/QueueWorkerResult.html +69 -2
  165. package/docs/api/interfaces/RangeLimit.html +59 -2
  166. package/docs/api/interfaces/RateLimitResult.html +74 -2
  167. package/docs/api/interfaces/ReadOptions.html +107 -3
  168. package/docs/api/interfaces/ReclaimOptions.html +140 -3
  169. package/docs/api/interfaces/ReconnectOptions.html +75 -5
  170. package/docs/api/interfaces/RequestContext.html +64 -2
  171. package/docs/api/interfaces/RequestContextOptions.html +60 -2
  172. package/docs/api/interfaces/RetryOptions.html +143 -2
  173. package/docs/api/interfaces/RetryOutcome.html +117 -2
  174. package/docs/api/interfaces/RetryPolicy.html +79 -2
  175. package/docs/api/interfaces/RoutingEndpoint.html +69 -2
  176. package/docs/api/interfaces/RoutingRoute.html +79 -2
  177. package/docs/api/interfaces/RunStepsItem.html +59 -2
  178. package/docs/api/interfaces/RunStepsManyOptions.html +99 -2
  179. package/docs/api/interfaces/ScanOptions.html +66 -3
  180. package/docs/api/interfaces/ScheduleFireDueOptions.html +74 -2
  181. package/docs/api/interfaces/ScheduleFireOptions.html +59 -2
  182. package/docs/api/interfaces/ScheduleListOptions.html +89 -2
  183. package/docs/api/interfaces/ScheduleOptions.html +131 -3
  184. package/docs/api/interfaces/SearchOptions.html +122 -3
  185. package/docs/api/interfaces/StartAndClaimOptions.html +136 -3
  186. package/docs/api/interfaces/StateOptions.html +94 -2
  187. package/docs/api/interfaces/StateRegistration.html +104 -2
  188. package/docs/api/interfaces/StepContinueOptions.html +159 -3
  189. package/docs/api/interfaces/StoreCommandClient.html +89 -3
  190. package/docs/api/interfaces/TDigestCreateOptions.html +60 -2
  191. package/docs/api/interfaces/TDigestMergeOptions.html +66 -2
  192. package/docs/api/interfaces/TopologyNativeAdapterOptions.html +228 -15
  193. package/docs/api/interfaces/TransitionOptions.html +153 -2
  194. package/docs/api/interfaces/TransitionOutcome.html +122 -2
  195. package/docs/api/interfaces/ValueConfig.html +59 -2
  196. package/docs/api/interfaces/WorkerConfig.html +230 -15
  197. package/docs/api/interfaces/WorkflowOptions.html +69 -2
  198. package/docs/api/interfaces/WorkflowWorkerResult.html +69 -2
  199. package/docs/api/interfaces/XReadStream.html +59 -2
  200. package/docs/api/interfaces/ZAddMember.html +59 -2
  201. package/docs/api/modules.html +51 -1
  202. package/docs/api/types/BackoffKind.html +32 -1
  203. package/docs/api/types/CollectionScanOptions.html +34 -2
  204. package/docs/api/types/Command.html +32 -1
  205. package/docs/api/types/CommandArgument.html +32 -1
  206. package/docs/api/types/ConnectionRequestDisposition.html +36 -2
  207. package/docs/api/types/EndpointPolicy.html +34 -2
  208. package/docs/api/types/ExceptionPolicy.html +32 -1
  209. package/docs/api/types/ExpiryCondition.html +32 -1
  210. package/docs/api/types/FencingToken.html +34 -2
  211. package/docs/api/types/FetchOrComputeFencedResult.html +32 -1
  212. package/docs/api/types/FetchOrComputeResult.html +36 -1
  213. package/docs/api/types/FlowAdminRecord.html +32 -1
  214. package/docs/api/types/FlowPolicyBackoffKind.html +32 -1
  215. package/docs/api/types/FlowProjectionField.html +32 -1
  216. package/docs/api/types/FlowProjectionShape.html +32 -1
  217. package/docs/api/types/FlowQueryIndexServiceState.html +32 -1
  218. package/docs/api/types/FlowQueryInteger.html +32 -1
  219. package/docs/api/types/FlowQueryParameter.html +32 -1
  220. package/docs/api/types/FlowQueryParameters.html +32 -1
  221. package/docs/api/types/FlowQueryRecord.html +32 -1
  222. package/docs/api/types/FlowQueryResult.html +32 -1
  223. package/docs/api/types/FlowStateMode.html +32 -1
  224. package/docs/api/types/FlowStatePolicyLike.html +32 -1
  225. package/docs/api/types/GeoAddOptions.html +34 -2
  226. package/docs/api/types/GetExOptions.html +34 -2
  227. package/docs/api/types/HTTPCommandDisposition.html +32 -0
  228. package/docs/api/types/HashScanResult.html +38 -2
  229. package/docs/api/types/IntegerReply.html +34 -2
  230. package/docs/api/types/ManagementPairs.html +32 -1
  231. package/docs/api/types/MaxActiveMs.html +32 -1
  232. package/docs/api/types/Outcome.html +32 -1
  233. package/docs/api/types/QueueBatchHandler.html +44 -1
  234. package/docs/api/types/QueueHandler.html +44 -1
  235. package/docs/api/types/QueueJob.html +32 -1
  236. package/docs/api/types/RequestDisposition.html +32 -1
  237. package/docs/api/types/ScheduleCatchupPolicy.html +34 -2
  238. package/docs/api/types/ScheduleFireDueResult.html +55 -3
  239. package/docs/api/types/ScheduleFireResult.html +34 -2
  240. package/docs/api/types/ScheduleKind.html +32 -1
  241. package/docs/api/types/ScheduleOverlapPolicy.html +32 -1
  242. package/docs/api/types/ScheduleRecord.html +95 -12
  243. package/docs/api/types/ScheduleState.html +32 -1
  244. package/docs/api/types/SearchStateMeta.html +32 -1
  245. package/docs/api/types/SetOptions.html +34 -2
  246. package/docs/api/types/SetScanResult.html +38 -2
  247. package/docs/api/types/SortedSetScanResult.html +38 -2
  248. package/docs/api/types/StateMeta.html +32 -1
  249. package/docs/api/types/StateMetaValue.html +32 -1
  250. package/docs/api/types/TopKReserveOptions.html +32 -1
  251. package/docs/api/types/WorkerProfile.html +32 -1
  252. package/docs/api/types/WorkerRefillStrategy.html +32 -1
  253. package/docs/api/types/WorkflowHandler.html +44 -1
  254. package/docs/api/types/ZAddOptions.html +34 -2
  255. package/docs/api/variables/COMMAND_OPCODES.html +297 -1
  256. package/docs/api/variables/FERRICSTORE_MINIMUM_SERVER_VERSION.html +34 -2
  257. package/docs/api/variables/FERRICSTORE_NATIVE_PROTOCOL_VERSION.html +34 -2
  258. package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +34 -2
  259. package/docs/api/variables/FlowProjection.html +32 -1
  260. package/docs/api/variables/MAX_FLOW_POLICY_GENERATION.html +32 -1
  261. package/package.json +8 -8
package/README.md CHANGED
@@ -18,8 +18,8 @@ Requires Node.js 22.22 or newer. The SDK ships ESM and CommonJS builds and is te
18
18
 
19
19
  ## Compatibility
20
20
 
21
- TypeScript SDK `0.11.6` requires FerricStore server `0.11.4` or newer. With
22
- FerricStore 0.11.6 it negotiates compact Stream mode 34 for homogeneous auto-ID
21
+ TypeScript SDK `0.11.9` requires FerricStore server `0.11.4` or newer. With
22
+ FerricStore 0.11.8 it negotiates compact Stream mode 34 for homogeneous auto-ID
23
23
  `XADD` pipelines and compact Pub/Sub mode 35 for homogeneous `PUBLISH`
24
24
  pipelines. Native wire protocol v1 and the generic fallback are unchanged.
25
25
  Capabilities and response-size limits are negotiated
@@ -44,7 +44,7 @@ const { FerricStoreClient, JsonCodec } = require("@ferricstore/ferricstore");
44
44
  docker run -p 6388:6388 \
45
45
  -e FERRICSTORE_PROTECTED_MODE=false \
46
46
  -v ferricstore_data:/data \
47
- quay.io/ferricstore/ferricstore:0.11.6
47
+ quay.io/ferricstore/ferricstore:0.11.8
48
48
  ```
49
49
 
50
50
  ## Query durable runs
@@ -90,6 +90,40 @@ const projected = projectFlowQuery(
90
90
  const result = await client.query(projected, { partition: "partition-a", run: "run-1" });
91
91
  ```
92
92
 
93
+ ## HTTP transport
94
+
95
+ `fromUrl` accepts `http://` and `https://` without changing the command API.
96
+ HTTP/1.1 uses a persistent keep-alive pool. Set `http2: true` to use one
97
+ multiplexed HTTP/2 session per origin:
98
+
99
+ ```ts
100
+ const client = await FerricStoreClient.fromUrl(
101
+ "https://ferricstore-http.example.com",
102
+ {
103
+ httpOptions: {
104
+ username: "default",
105
+ password,
106
+ http2: true
107
+ }
108
+ }
109
+ );
110
+
111
+ await client.ping();
112
+ ```
113
+
114
+ Use `bearerToken` for Bearer authentication. Basic username/password
115
+ authentication requires HTTPS; omitting the username uses `default`. One SDK
116
+ pipeline becomes one ordered HTTP request. `httpOptions` also bounds request
117
+ and response bytes, batch items, HTTP/1.1 connections, redirects, and the whole
118
+ request deadline.
119
+
120
+ The HTTP endpoint is stateless. `AUTH`, `CLIENT`, transactions, Pub/Sub
121
+ subscriptions, blocking list/stream reads, and `WATCH` require native TCP and
122
+ fail before network I/O. Redirects intentionally retain authentication and
123
+ custom headers across origins, so configure only endpoints and redirect targets
124
+ you trust. Use `ferric://` or `ferrics://` whenever connection-local behavior is
125
+ required.
126
+
93
127
  ## Cluster-aware client
94
128
 
95
129
  For a single node, use `fromUrl`. For a FerricStore cluster, pass multiple seed URLs. The SDK fetches the server `SHARDS` topology, routes keyed commands to the current shard leader, and refuses learned hosts outside the seed-host trust set by default. The creation promise resolves only after startup and authentication succeed; cluster creation also waits for the initial topology, so connection failures reject the corresponding `await` directly.