@ferricstore/ferricstore 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +17 -5
  2. package/dist/index.cjs +869 -548
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +29 -30
  5. package/dist/index.d.ts +29 -30
  6. package/dist/index.js +856 -537
  7. package/dist/index.js.map +1 -1
  8. package/docs/api/assets/hierarchy.js +1 -1
  9. package/docs/api/assets/navigation.js +1 -1
  10. package/docs/api/assets/search.js +1 -1
  11. package/docs/api/classes/ClaimHydrationError.html +5 -2
  12. package/docs/api/classes/ConnectionClosedError.html +6 -3
  13. package/docs/api/classes/FerricStoreClient.html +4 -4
  14. package/docs/api/classes/FerricStoreError.html +6 -3
  15. package/docs/api/classes/FlowAlreadyExistsError.html +6 -3
  16. package/docs/api/classes/FlowBatchError.html +6 -3
  17. package/docs/api/classes/FlowNotFoundError.html +6 -3
  18. package/docs/api/classes/FlowWrongStateError.html +6 -3
  19. package/docs/api/classes/InvalidCommandError.html +6 -3
  20. package/docs/api/classes/KeyValueStore.html +2 -2
  21. package/docs/api/classes/LeaseRenewalError.html +1 -1
  22. package/docs/api/classes/LockHeldError.html +6 -3
  23. package/docs/api/classes/LockNotOwnedError.html +6 -3
  24. package/docs/api/classes/NativeAdapter.html +2 -2
  25. package/docs/api/classes/OverloadedError.html +6 -4
  26. package/docs/api/classes/QueueCompletionError.html +1 -1
  27. package/docs/api/classes/RequestTimeoutError.html +6 -3
  28. package/docs/api/classes/RerouteError.html +6 -3
  29. package/docs/api/classes/StaleLeaseError.html +6 -3
  30. package/docs/api/classes/TDigestStore.html +2 -2
  31. package/docs/api/classes/TopKStore.html +1 -1
  32. package/docs/api/classes/TopologyNativeAdapterPool.html +1 -1
  33. package/docs/api/classes/Workflow.html +1 -1
  34. package/docs/api/functions/classifyServerError.html +1 -1
  35. package/docs/api/functions/mapException.html +1 -1
  36. package/docs/api/hierarchy.html +1 -1
  37. package/docs/api/index.html +16 -6
  38. package/docs/api/interfaces/AdminListOptions.html +1 -1
  39. package/docs/api/interfaces/CancelOptions.html +2 -2
  40. package/docs/api/interfaces/ClaimDueOptions.html +3 -3
  41. package/docs/api/interfaces/CompleteJobsAndClaimJobsResult.html +6 -6
  42. package/docs/api/interfaces/CompleteManyOptions.html +2 -2
  43. package/docs/api/interfaces/CompleteOptions.html +2 -2
  44. package/docs/api/interfaces/CompleteOutcome.html +1 -1
  45. package/docs/api/interfaces/CreateManyOptions.html +1 -1
  46. package/docs/api/interfaces/EffectCompensateOptions.html +1 -1
  47. package/docs/api/interfaces/EffectConfirmOptions.html +1 -1
  48. package/docs/api/interfaces/EffectFailOptions.html +1 -1
  49. package/docs/api/interfaces/EffectStatusOptions.html +1 -1
  50. package/docs/api/interfaces/ExtendLeaseOptions.html +2 -2
  51. package/docs/api/interfaces/FailOptions.html +2 -2
  52. package/docs/api/interfaces/FailOutcome.html +1 -1
  53. package/docs/api/interfaces/FerricStoreClientFromUrlOptions.html +1 -1
  54. package/docs/api/interfaces/FerricStoreClientOptions.html +1 -1
  55. package/docs/api/interfaces/{FetchOrComputeLegacyResult.html → FetchOrComputeComputeResult.html} +2 -2
  56. package/docs/api/interfaces/FlowMaxActiveFailure.html +3 -0
  57. package/docs/api/interfaces/FlowPolicyOptions.html +3 -3
  58. package/docs/api/interfaces/FlowRecord.html +4 -2
  59. package/docs/api/interfaces/FlowStatePolicy.html +2 -2
  60. package/docs/api/interfaces/HistoryOptions.html +2 -2
  61. package/docs/api/interfaces/InvocationCreateOptions.html +2 -2
  62. package/docs/api/interfaces/LeaseMutationOptions.html +2 -2
  63. package/docs/api/interfaces/LimitListOptions.html +1 -1
  64. package/docs/api/interfaces/MutateOptions.html +2 -2
  65. package/docs/api/interfaces/NamedValueMutation.html +1 -1
  66. package/docs/api/interfaces/ProtocolCommand.html +2 -2
  67. package/docs/api/interfaces/ReadOptions.html +2 -2
  68. package/docs/api/interfaces/ReclaimOptions.html +2 -2
  69. package/docs/api/interfaces/RequestContext.html +2 -2
  70. package/docs/api/interfaces/RequestContextOptions.html +2 -2
  71. package/docs/api/interfaces/RetryOptions.html +2 -2
  72. package/docs/api/interfaces/RetryOutcome.html +1 -1
  73. package/docs/api/interfaces/RunStepsItem.html +2 -2
  74. package/docs/api/interfaces/RunStepsManyOptions.html +2 -2
  75. package/docs/api/interfaces/SearchOptions.html +2 -2
  76. package/docs/api/interfaces/StartAndClaimOptions.html +4 -2
  77. package/docs/api/interfaces/StepContinueOptions.html +3 -3
  78. package/docs/api/interfaces/TDigestCreateOptions.html +1 -1
  79. package/docs/api/interfaces/TDigestMergeOptions.html +1 -1
  80. package/docs/api/interfaces/TransitionOptions.html +2 -2
  81. package/docs/api/interfaces/TransitionOutcome.html +1 -1
  82. package/docs/api/modules.html +1 -1
  83. package/docs/api/types/FetchOrComputeFencedResult.html +1 -0
  84. package/docs/api/types/FetchOrComputeResult.html +1 -1
  85. package/docs/api/types/FlowStateMode.html +1 -1
  86. package/docs/api/types/FlowStatePolicyLike.html +1 -1
  87. package/docs/api/types/ManagementPairs.html +1 -1
  88. package/docs/api/types/RequestDisposition.html +1 -1
  89. package/docs/api/types/SearchStateMeta.html +1 -1
  90. package/docs/api/types/TopKReserveOptions.html +1 -1
  91. package/docs/api/variables/COMMAND_OPCODES.html +1 -1
  92. package/docs/api/variables/FERRICSTORE_MINIMUM_SERVER_VERSION.html +2 -0
  93. package/docs/api/variables/FERRICSTORE_NATIVE_PROTOCOL_VERSION.html +2 -0
  94. package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +2 -0
  95. package/package.json +6 -1
  96. package/docs/api/interfaces/FetchOrComputeFencedResult.html +0 -9
  97. package/docs/api/types/FetchOrComputeComputeResult.html +0 -1
  98. package/docs/api/variables/COMPACT_RESPONSE_OPCODES.html +0 -2
package/README.md CHANGED
@@ -16,6 +16,14 @@ npm install @ferricstore/ferricstore
16
16
 
17
17
  Requires Node.js 22.22 or newer. The SDK ships ESM and CommonJS builds and is tested with Node 22, 24, and 26.
18
18
 
19
+ ## Compatibility
20
+
21
+ SDK `0.2.x` requires FerricStore server `0.8.0` or newer. FerricStore 0.8 is a
22
+ breaking beta API contract update, while the native wire protocol remains v1
23
+ (`FSNP` framing and existing opcode numbers are unchanged). Capabilities and
24
+ response-size limits are negotiated per connection from the HELLO-shaped
25
+ startup response rather than inferred from a server version table.
26
+
19
27
  ESM:
20
28
 
21
29
  ```ts
@@ -34,7 +42,7 @@ const { FerricStoreClient, JsonCodec } = require("@ferricstore/ferricstore");
34
42
  docker run -p 6388:6388 \
35
43
  -e FERRICSTORE_PROTECTED_MODE=false \
36
44
  -v ferricstore_data:/data \
37
- ghcr.io/ferricstore/ferricstore:0.7.5
45
+ ghcr.io/ferricstore/ferricstore:0.8.0
38
46
  ```
39
47
 
40
48
  ## Cluster-aware client
@@ -114,8 +122,10 @@ timeouts while waiting for a local flow-control or write-queue slot are
114
122
 
115
123
  Topology-aware clients retry one routed command or one physical fused pipeline
116
124
  after a successful topology refresh only when the server's typed reroute error
117
- explicitly reports `safe_to_retry: true`. Split or scattered pipelines and
118
- uncertain connection failures are never replayed.
125
+ explicitly reports both `retryable: true` and `safe_to_retry: true`. Producer
126
+ backpressure follows the same flags and honors `retry_after_ms` within the
127
+ configured delay cap. Split or scattered pipelines and uncertain connection
128
+ failures are never replayed.
119
129
 
120
130
  Connection-local state mutations (`AUTH`, `CLIENT SETNAME`, `QUIT`, `RESET`,
121
131
  and related native controls) are rejected on reconnecting and topology clients
@@ -161,12 +171,14 @@ const flow = await FerricStoreClient.fromUrl("ferric://fs0.example.com:6388", {
161
171
  });
162
172
  ```
163
173
 
164
- Native connections honor the flow-control windows advertised by `STARTUP` and
174
+ Native connections honor the flow-control windows advertised by the
175
+ HELLO-shaped `STARTUP` response and
165
176
  `WINDOW_UPDATE`. Available data-request slots are refilled immediately as
166
177
  responses finish; waiting requests are scheduled fairly across protocol lanes.
167
178
  The adapter also caps automatic lanes and same-lane work to the advertised lane
168
179
  queue, and caps ordered pipeline chunks and outbound frame bodies to the limits
169
- negotiated during `STARTUP`.
180
+ negotiated during startup. Compact response codecs and aggregate response sizes
181
+ are enabled only when advertised for that connection.
170
182
  Set `nativeOptions.maxQueuedRequests` to bound the local waiter queue (default
171
183
  `65_536`, or `0` to reject immediately when all advertised slots are occupied).
172
184
  Queue waiting counts toward `nativeOptions.timeoutMs`.