@ferricstore/ferricstore 0.1.7 → 0.3.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 (110) hide show
  1. package/README.md +35 -6
  2. package/dist/index.cjs +1379 -667
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +83 -33
  5. package/dist/index.d.ts +83 -33
  6. package/dist/index.js +1384 -676
  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 +6 -3
  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/ReconnectingExecutor.html +4 -4
  28. package/docs/api/classes/RequestTimeoutError.html +6 -3
  29. package/docs/api/classes/RerouteError.html +6 -3
  30. package/docs/api/classes/StaleLeaseError.html +6 -3
  31. package/docs/api/classes/StalePolicyGenerationError.html +39 -0
  32. package/docs/api/classes/TDigestStore.html +2 -2
  33. package/docs/api/classes/TopKStore.html +1 -1
  34. package/docs/api/classes/TopologyNativeAdapterPool.html +3 -3
  35. package/docs/api/classes/Workflow.html +1 -1
  36. package/docs/api/classes/WorkflowWorker.html +2 -2
  37. package/docs/api/functions/classifyServerError.html +1 -1
  38. package/docs/api/functions/isReconnectableClosedConnectionError.html +1 -1
  39. package/docs/api/functions/mapException.html +1 -1
  40. package/docs/api/hierarchy.html +1 -1
  41. package/docs/api/index.html +22 -8
  42. package/docs/api/interfaces/AdminListOptions.html +1 -1
  43. package/docs/api/interfaces/CancelOptions.html +2 -2
  44. package/docs/api/interfaces/ClaimDueOptions.html +3 -3
  45. package/docs/api/interfaces/CompleteJobsAndClaimJobsResult.html +6 -6
  46. package/docs/api/interfaces/CompleteManyOptions.html +2 -2
  47. package/docs/api/interfaces/CompleteOptions.html +2 -2
  48. package/docs/api/interfaces/CompleteOutcome.html +1 -1
  49. package/docs/api/interfaces/CreateManyOptions.html +1 -1
  50. package/docs/api/interfaces/EffectCompensateOptions.html +1 -1
  51. package/docs/api/interfaces/EffectConfirmOptions.html +1 -1
  52. package/docs/api/interfaces/EffectFailOptions.html +1 -1
  53. package/docs/api/interfaces/EffectStatusOptions.html +1 -1
  54. package/docs/api/interfaces/ExtendLeaseOptions.html +2 -2
  55. package/docs/api/interfaces/FailOptions.html +2 -2
  56. package/docs/api/interfaces/FailOutcome.html +1 -1
  57. package/docs/api/interfaces/FerricStoreClientFromUrlOptions.html +1 -1
  58. package/docs/api/interfaces/FerricStoreClientOptions.html +1 -1
  59. package/docs/api/interfaces/{FetchOrComputeLegacyResult.html → FetchOrComputeComputeResult.html} +2 -2
  60. package/docs/api/interfaces/FlowMaxActiveFailure.html +3 -0
  61. package/docs/api/interfaces/FlowPolicyBackoffSnapshot.html +5 -0
  62. package/docs/api/interfaces/FlowPolicyOptions.html +8 -4
  63. package/docs/api/interfaces/FlowPolicyRetentionSnapshot.html +3 -0
  64. package/docs/api/interfaces/FlowPolicyRetrySnapshot.html +4 -0
  65. package/docs/api/interfaces/FlowPolicySnapshot.html +17 -0
  66. package/docs/api/interfaces/FlowPolicyStateSnapshot.html +6 -0
  67. package/docs/api/interfaces/FlowRecord.html +4 -2
  68. package/docs/api/interfaces/FlowStatePolicy.html +2 -2
  69. package/docs/api/interfaces/HistoryOptions.html +2 -2
  70. package/docs/api/interfaces/InvocationCreateOptions.html +2 -2
  71. package/docs/api/interfaces/LeaseMutationOptions.html +2 -2
  72. package/docs/api/interfaces/LimitListOptions.html +1 -1
  73. package/docs/api/interfaces/MutateOptions.html +2 -2
  74. package/docs/api/interfaces/NamedValueMutation.html +1 -1
  75. package/docs/api/interfaces/ProtocolCommand.html +2 -2
  76. package/docs/api/interfaces/ReadOptions.html +2 -2
  77. package/docs/api/interfaces/ReclaimOptions.html +2 -2
  78. package/docs/api/interfaces/RequestContext.html +2 -2
  79. package/docs/api/interfaces/RequestContextOptions.html +2 -2
  80. package/docs/api/interfaces/RetryOptions.html +2 -2
  81. package/docs/api/interfaces/RetryOutcome.html +1 -1
  82. package/docs/api/interfaces/RunStepsItem.html +2 -2
  83. package/docs/api/interfaces/RunStepsManyOptions.html +2 -2
  84. package/docs/api/interfaces/SearchOptions.html +2 -2
  85. package/docs/api/interfaces/StartAndClaimOptions.html +4 -2
  86. package/docs/api/interfaces/StepContinueOptions.html +3 -3
  87. package/docs/api/interfaces/TDigestCreateOptions.html +1 -1
  88. package/docs/api/interfaces/TDigestMergeOptions.html +1 -1
  89. package/docs/api/interfaces/TransitionOptions.html +2 -2
  90. package/docs/api/interfaces/TransitionOutcome.html +1 -1
  91. package/docs/api/modules.html +1 -1
  92. package/docs/api/types/ConnectionRequestDisposition.html +1 -1
  93. package/docs/api/types/FetchOrComputeFencedResult.html +1 -0
  94. package/docs/api/types/FetchOrComputeResult.html +1 -1
  95. package/docs/api/types/FlowPolicyBackoffKind.html +1 -0
  96. package/docs/api/types/FlowStateMode.html +1 -1
  97. package/docs/api/types/FlowStatePolicyLike.html +1 -1
  98. package/docs/api/types/ManagementPairs.html +1 -1
  99. package/docs/api/types/RequestDisposition.html +1 -1
  100. package/docs/api/types/SearchStateMeta.html +1 -1
  101. package/docs/api/types/TopKReserveOptions.html +1 -1
  102. package/docs/api/variables/COMMAND_OPCODES.html +1 -1
  103. package/docs/api/variables/FERRICSTORE_MINIMUM_SERVER_VERSION.html +2 -0
  104. package/docs/api/variables/FERRICSTORE_NATIVE_PROTOCOL_VERSION.html +2 -0
  105. package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +2 -0
  106. package/docs/api/variables/MAX_FLOW_POLICY_GENERATION.html +1 -0
  107. package/package.json +6 -1
  108. package/docs/api/interfaces/FetchOrComputeFencedResult.html +0 -9
  109. package/docs/api/types/FetchOrComputeComputeResult.html +0 -1
  110. package/docs/api/variables/COMPACT_RESPONSE_OPCODES.html +0 -2
package/dist/index.d.cts CHANGED
@@ -4,9 +4,15 @@ import { Buffer as Buffer$1 } from 'node:buffer';
4
4
  declare class FerricStoreError extends Error {
5
5
  readonly code: string;
6
6
  readonly raw: unknown;
7
+ readonly retryable: boolean | undefined;
8
+ readonly safeToRetry: boolean | undefined;
9
+ readonly retryAfterMs: number | undefined;
7
10
  constructor(message: string, options?: {
8
11
  raw?: unknown;
9
12
  cause?: unknown;
13
+ retryable?: boolean;
14
+ safeToRetry?: boolean;
15
+ retryAfterMs?: number;
10
16
  });
11
17
  }
12
18
  type RequestDisposition = "unsent" | "possibly_sent";
@@ -39,6 +45,10 @@ declare class FlowWrongStateError extends FerricStoreError {
39
45
  declare class StaleLeaseError extends FerricStoreError {
40
46
  readonly code = "stale_lease";
41
47
  }
48
+ /** FLOW.POLICY.SET expected_generation did not match the stored generation. */
49
+ declare class StalePolicyGenerationError extends FerricStoreError {
50
+ readonly code = "stale_policy_generation";
51
+ }
42
52
  declare class FlowAlreadyExistsError extends FerricStoreError {
43
53
  readonly code = "flow_already_exists";
44
54
  }
@@ -53,13 +63,14 @@ declare class InvalidCommandError extends FerricStoreError {
53
63
  }
54
64
  declare class OverloadedError extends FerricStoreError {
55
65
  readonly code = "overloaded";
56
- readonly retryAfterMs: number | undefined;
57
66
  readonly reason: string | undefined;
58
67
  constructor(message: string, options?: {
59
68
  raw?: unknown;
60
69
  cause?: unknown;
61
70
  retryAfterMs?: number;
62
71
  reason?: string;
72
+ retryable?: boolean;
73
+ safeToRetry?: boolean;
63
74
  });
64
75
  }
65
76
  /** The contacted endpoint cannot serve this route and topology should be refreshed. */
@@ -391,16 +402,6 @@ declare const COMMAND_OPCODES: {
391
402
  readonly "FERRICSTORE.METRICS": 783;
392
403
  readonly "FERRICSTORE.BLOBGC": 784;
393
404
  };
394
- /** Direct compact response kinds advertised by the FerricStore native protocol. */
395
- declare const COMPACT_RESPONSE_OPCODES: {
396
- readonly flow_claim_jobs_v1: readonly [515];
397
- readonly flow_record_list_v1: readonly [526, 535, 536, 537, 538, 539, 541];
398
- readonly flow_record_v1: readonly [514];
399
- readonly kv_get_v1: readonly [257];
400
- readonly kv_mget_v1: readonly [260, 524];
401
- readonly ok_list_v1: readonly [258, 261, 527, 528, 530, 531, 532];
402
- readonly pipeline_v1: readonly [14];
403
- };
404
405
  interface ProtocolCommand {
405
406
  readonly opcode: number;
406
407
  readonly payload: unknown;
@@ -428,9 +429,9 @@ declare class NativeAdapter implements CommandExecutor {
428
429
  private readonly closedWaiters;
429
430
  private readonly chunkAssembler;
430
431
  private closed;
432
+ private readonly capabilities;
431
433
  private protocolLanes;
432
434
  private maxPipelineCommands;
433
- private maxRequestFrameBytes;
434
435
  private pendingControlRequests;
435
436
  private readonly maxPendingControlRequests;
436
437
  private readonly heartbeat;
@@ -641,17 +642,7 @@ interface FetchOrComputeHitResult<T = unknown> {
641
642
  readonly status: "hit";
642
643
  readonly value: T | null;
643
644
  }
644
- interface FetchOrComputeLegacyResult {
645
- /** Opaque application hint echoed for the process elected to compute. */
646
- readonly computeHint: Buffer;
647
- readonly computeMode: "legacy";
648
- /** Explicit null distinguishes a legacy tokenless lease from an omitted token. */
649
- readonly computeToken: null;
650
- readonly hit: false;
651
- readonly shouldCompute: true;
652
- readonly status: "compute";
653
- }
654
- interface FetchOrComputeFencedResult {
645
+ interface FetchOrComputeComputeResult {
655
646
  /** Opaque application hint echoed for the process elected to compute. */
656
647
  readonly computeHint: Buffer;
657
648
  readonly computeMode: "fenced";
@@ -661,8 +652,12 @@ interface FetchOrComputeFencedResult {
661
652
  readonly shouldCompute: true;
662
653
  readonly status: "compute";
663
654
  }
664
- type FetchOrComputeComputeResult = FetchOrComputeLegacyResult | FetchOrComputeFencedResult;
655
+ type FetchOrComputeFencedResult = FetchOrComputeComputeResult;
665
656
  type FetchOrComputeResult<T = unknown> = FetchOrComputeHitResult<T> | FetchOrComputeComputeResult;
657
+ interface FlowMaxActiveFailure {
658
+ readonly maxActiveMs: number;
659
+ readonly reason: "max_active_ms";
660
+ }
666
661
  interface FlowRecord<TPayload = unknown> {
667
662
  id: string;
668
663
  type: string;
@@ -677,6 +672,8 @@ interface FlowRecord<TPayload = unknown> {
677
672
  rootFlowId?: string;
678
673
  correlationId?: string;
679
674
  maxActiveMs?: number;
675
+ error?: unknown;
676
+ failureReason?: string;
680
677
  valueRefs?: Record<string, unknown>;
681
678
  values?: Record<string, unknown>;
682
679
  valueSizes?: Record<string, unknown>;
@@ -901,6 +898,8 @@ interface StartAndClaimOptions {
901
898
  nowMs?: number;
902
899
  priority?: number;
903
900
  retentionTtlMs?: number;
901
+ /** Maximum active lifetime from creation, or "infinity" to disable a type policy timeout. */
902
+ maxActiveMs?: MaxActiveMs;
904
903
  attributes?: Record<string, CommandArgument>;
905
904
  stateMeta?: StateMeta;
906
905
  values?: Record<string, unknown>;
@@ -965,6 +964,10 @@ interface FlowStatePolicy {
965
964
  }
966
965
  type FlowStatePolicyLike = FlowStatePolicy | RetryPolicy;
967
966
  interface FlowPolicyOptions {
967
+ /** Replace the complete stored policy instead of applying the default deep patch. */
968
+ replace?: boolean;
969
+ /** Compare-and-swap generation. Must be a nonnegative JavaScript safe integer. */
970
+ expectedGeneration?: number;
968
971
  state?: string;
969
972
  mode?: FlowStateMode;
970
973
  retry?: RetryPolicy;
@@ -1569,11 +1572,9 @@ declare class HashStore {
1569
1572
  type TopKReserveOptions = {
1570
1573
  width?: never;
1571
1574
  depth?: never;
1572
- decay?: never;
1573
1575
  } | {
1574
1576
  width: number;
1575
1577
  depth: number;
1576
- decay: number;
1577
1578
  };
1578
1579
  interface CountMinMergeOptions {
1579
1580
  weights?: readonly (number | bigint)[];
@@ -1753,10 +1754,10 @@ declare class FerricStoreClientCore extends FerricStoreAdministrationClient {
1753
1754
  }): Promise<FetchOrComputeResult<T>>;
1754
1755
  fetchOrComputeResult(key: string, value: unknown, options: {
1755
1756
  ttlMs: number;
1756
- computeToken: Buffer$1 | null;
1757
+ computeToken: Buffer$1;
1757
1758
  }): Promise<boolean>;
1758
1759
  fetchOrComputeError(key: string, message: string, options: {
1759
- computeToken: Buffer$1 | null;
1760
+ computeToken: Buffer$1;
1760
1761
  }): Promise<boolean>;
1761
1762
  }
1762
1763
 
@@ -1830,6 +1831,49 @@ declare class FerricStoreManagementClient extends FerricStoreClientCore {
1830
1831
  governanceLedger(id: string, options?: GovernanceLedgerOptions): Promise<FlowAdminRecord[]>;
1831
1832
  }
1832
1833
 
1834
+ declare const MAX_FLOW_POLICY_GENERATION: number;
1835
+ type FlowPolicyBackoffKind = "none" | "fixed" | "linear" | "exponential";
1836
+ interface FlowPolicyBackoffSnapshot {
1837
+ readonly kind: FlowPolicyBackoffKind;
1838
+ readonly baseMs: number;
1839
+ readonly maxMs: number;
1840
+ readonly jitterPct: number;
1841
+ }
1842
+ interface FlowPolicyRetrySnapshot {
1843
+ readonly maxRetries: number;
1844
+ readonly backoff: FlowPolicyBackoffSnapshot;
1845
+ readonly exhaustedTo: string;
1846
+ }
1847
+ interface FlowPolicyRetentionSnapshot {
1848
+ readonly ttlMs: number;
1849
+ readonly historyMaxEvents: number;
1850
+ }
1851
+ interface FlowPolicyStateSnapshot {
1852
+ readonly mode: FlowStateMode;
1853
+ readonly maxActiveMs?: number;
1854
+ readonly retry: FlowPolicyRetrySnapshot;
1855
+ readonly retention: FlowPolicyRetentionSnapshot;
1856
+ readonly governance?: Readonly<Record<string, unknown>>;
1857
+ }
1858
+ /** Resolved policy state returned by FLOW.POLICY.SET and FLOW.POLICY.GET. */
1859
+ interface FlowPolicySnapshot {
1860
+ readonly type: string;
1861
+ /** Server-allocated monotonic generation in the JavaScript safe-integer range. */
1862
+ readonly generation: number;
1863
+ readonly state?: string;
1864
+ readonly version?: string | number;
1865
+ readonly mode?: FlowStateMode;
1866
+ readonly maxActiveMs?: number;
1867
+ readonly retry: FlowPolicyRetrySnapshot;
1868
+ readonly retention: FlowPolicyRetentionSnapshot;
1869
+ readonly indexedAttributes: readonly string[];
1870
+ readonly indexedStateMeta?: string;
1871
+ readonly governance?: Readonly<Record<string, unknown>>;
1872
+ readonly states?: Readonly<Record<string, FlowPolicyStateSnapshot>>;
1873
+ /** Original protocol value for forward-compatible fields not yet modeled by the SDK. */
1874
+ readonly raw: unknown;
1875
+ }
1876
+
1833
1877
  /** @internal Read, policy, and shared Flow helpers kept off the primary implementation module. */
1834
1878
  declare class FerricStoreFlowSupportClient extends FerricStoreManagementClient {
1835
1879
  rewind(id: string, options?: {
@@ -1879,10 +1923,10 @@ declare class FerricStoreFlowSupportClient extends FerricStoreManagementClient {
1879
1923
  values?: Record<string, unknown>;
1880
1924
  valueRefs?: Record<string, string>;
1881
1925
  }): Promise<unknown>;
1882
- installPolicy(type: string, options?: FlowPolicyOptions): Promise<unknown>;
1926
+ installPolicy(type: string, options?: FlowPolicyOptions): Promise<FlowPolicySnapshot>;
1883
1927
  policyGet(type: string, options?: {
1884
1928
  state?: string;
1885
- }): Promise<Record<string, unknown>>;
1929
+ }): Promise<FlowPolicySnapshot>;
1886
1930
  retentionCleanup(): Promise<Record<string, unknown>>;
1887
1931
  protected executeProducerWrite(args: CommandArgument[]): Promise<unknown>;
1888
1932
  protected recordOrGet(response: unknown, id: string, partitionKey: string | undefined): Promise<FlowRecord>;
@@ -2006,7 +2050,6 @@ declare class FerricStoreClient extends FerricStoreProducerClient {
2006
2050
  transitionTo?: string;
2007
2051
  runAtMs?: number;
2008
2052
  nowMs?: number;
2009
- priority?: number;
2010
2053
  values?: Record<string, unknown>;
2011
2054
  valueRefs?: Record<string, string>;
2012
2055
  dropValues?: string[];
@@ -2338,7 +2381,7 @@ declare class Workflow {
2338
2381
  worker(options?: WorkerConfig & {
2339
2382
  states?: string[];
2340
2383
  }): WorkflowWorker;
2341
- installPolicy(options?: Omit<FlowPolicyOptions, "mode" | "state" | "states">): Promise<unknown>;
2384
+ installPolicy(options?: Omit<FlowPolicyOptions, "mode" | "state" | "states">): Promise<FlowPolicySnapshot>;
2342
2385
  stateNames(): string[];
2343
2386
  stateRegistration(name: string): StateRegistration | undefined;
2344
2387
  }
@@ -2360,7 +2403,14 @@ declare class WorkflowWorker {
2360
2403
  private applyHandlerError;
2361
2404
  }
2362
2405
 
2406
+ /** TypeScript SDK package version. */
2407
+ declare const FERRICSTORE_SDK_VERSION = "0.3.0";
2408
+ /** Oldest FerricStore server supported by this breaking beta contract. */
2409
+ declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.9.1";
2410
+ /** Native framing and opcode ABI version; unchanged by FerricStore 0.9.1. */
2411
+ declare const FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
2412
+
2363
2413
  /** @deprecated Use RequestDisposition; retained for source compatibility. */
2364
2414
  type ConnectionRequestDisposition = RequestDisposition;
2365
2415
 
2366
- export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, COMPACT_RESPONSE_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeLegacyResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, FlowNotFoundError, type FlowPolicyOptions, type FlowRecord, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, retry, transition };
2416
+ export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, type FlowRecord, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, retry, transition };
package/dist/index.d.ts CHANGED
@@ -4,9 +4,15 @@ import { Buffer as Buffer$1 } from 'node:buffer';
4
4
  declare class FerricStoreError extends Error {
5
5
  readonly code: string;
6
6
  readonly raw: unknown;
7
+ readonly retryable: boolean | undefined;
8
+ readonly safeToRetry: boolean | undefined;
9
+ readonly retryAfterMs: number | undefined;
7
10
  constructor(message: string, options?: {
8
11
  raw?: unknown;
9
12
  cause?: unknown;
13
+ retryable?: boolean;
14
+ safeToRetry?: boolean;
15
+ retryAfterMs?: number;
10
16
  });
11
17
  }
12
18
  type RequestDisposition = "unsent" | "possibly_sent";
@@ -39,6 +45,10 @@ declare class FlowWrongStateError extends FerricStoreError {
39
45
  declare class StaleLeaseError extends FerricStoreError {
40
46
  readonly code = "stale_lease";
41
47
  }
48
+ /** FLOW.POLICY.SET expected_generation did not match the stored generation. */
49
+ declare class StalePolicyGenerationError extends FerricStoreError {
50
+ readonly code = "stale_policy_generation";
51
+ }
42
52
  declare class FlowAlreadyExistsError extends FerricStoreError {
43
53
  readonly code = "flow_already_exists";
44
54
  }
@@ -53,13 +63,14 @@ declare class InvalidCommandError extends FerricStoreError {
53
63
  }
54
64
  declare class OverloadedError extends FerricStoreError {
55
65
  readonly code = "overloaded";
56
- readonly retryAfterMs: number | undefined;
57
66
  readonly reason: string | undefined;
58
67
  constructor(message: string, options?: {
59
68
  raw?: unknown;
60
69
  cause?: unknown;
61
70
  retryAfterMs?: number;
62
71
  reason?: string;
72
+ retryable?: boolean;
73
+ safeToRetry?: boolean;
63
74
  });
64
75
  }
65
76
  /** The contacted endpoint cannot serve this route and topology should be refreshed. */
@@ -391,16 +402,6 @@ declare const COMMAND_OPCODES: {
391
402
  readonly "FERRICSTORE.METRICS": 783;
392
403
  readonly "FERRICSTORE.BLOBGC": 784;
393
404
  };
394
- /** Direct compact response kinds advertised by the FerricStore native protocol. */
395
- declare const COMPACT_RESPONSE_OPCODES: {
396
- readonly flow_claim_jobs_v1: readonly [515];
397
- readonly flow_record_list_v1: readonly [526, 535, 536, 537, 538, 539, 541];
398
- readonly flow_record_v1: readonly [514];
399
- readonly kv_get_v1: readonly [257];
400
- readonly kv_mget_v1: readonly [260, 524];
401
- readonly ok_list_v1: readonly [258, 261, 527, 528, 530, 531, 532];
402
- readonly pipeline_v1: readonly [14];
403
- };
404
405
  interface ProtocolCommand {
405
406
  readonly opcode: number;
406
407
  readonly payload: unknown;
@@ -428,9 +429,9 @@ declare class NativeAdapter implements CommandExecutor {
428
429
  private readonly closedWaiters;
429
430
  private readonly chunkAssembler;
430
431
  private closed;
432
+ private readonly capabilities;
431
433
  private protocolLanes;
432
434
  private maxPipelineCommands;
433
- private maxRequestFrameBytes;
434
435
  private pendingControlRequests;
435
436
  private readonly maxPendingControlRequests;
436
437
  private readonly heartbeat;
@@ -641,17 +642,7 @@ interface FetchOrComputeHitResult<T = unknown> {
641
642
  readonly status: "hit";
642
643
  readonly value: T | null;
643
644
  }
644
- interface FetchOrComputeLegacyResult {
645
- /** Opaque application hint echoed for the process elected to compute. */
646
- readonly computeHint: Buffer;
647
- readonly computeMode: "legacy";
648
- /** Explicit null distinguishes a legacy tokenless lease from an omitted token. */
649
- readonly computeToken: null;
650
- readonly hit: false;
651
- readonly shouldCompute: true;
652
- readonly status: "compute";
653
- }
654
- interface FetchOrComputeFencedResult {
645
+ interface FetchOrComputeComputeResult {
655
646
  /** Opaque application hint echoed for the process elected to compute. */
656
647
  readonly computeHint: Buffer;
657
648
  readonly computeMode: "fenced";
@@ -661,8 +652,12 @@ interface FetchOrComputeFencedResult {
661
652
  readonly shouldCompute: true;
662
653
  readonly status: "compute";
663
654
  }
664
- type FetchOrComputeComputeResult = FetchOrComputeLegacyResult | FetchOrComputeFencedResult;
655
+ type FetchOrComputeFencedResult = FetchOrComputeComputeResult;
665
656
  type FetchOrComputeResult<T = unknown> = FetchOrComputeHitResult<T> | FetchOrComputeComputeResult;
657
+ interface FlowMaxActiveFailure {
658
+ readonly maxActiveMs: number;
659
+ readonly reason: "max_active_ms";
660
+ }
666
661
  interface FlowRecord<TPayload = unknown> {
667
662
  id: string;
668
663
  type: string;
@@ -677,6 +672,8 @@ interface FlowRecord<TPayload = unknown> {
677
672
  rootFlowId?: string;
678
673
  correlationId?: string;
679
674
  maxActiveMs?: number;
675
+ error?: unknown;
676
+ failureReason?: string;
680
677
  valueRefs?: Record<string, unknown>;
681
678
  values?: Record<string, unknown>;
682
679
  valueSizes?: Record<string, unknown>;
@@ -901,6 +898,8 @@ interface StartAndClaimOptions {
901
898
  nowMs?: number;
902
899
  priority?: number;
903
900
  retentionTtlMs?: number;
901
+ /** Maximum active lifetime from creation, or "infinity" to disable a type policy timeout. */
902
+ maxActiveMs?: MaxActiveMs;
904
903
  attributes?: Record<string, CommandArgument>;
905
904
  stateMeta?: StateMeta;
906
905
  values?: Record<string, unknown>;
@@ -965,6 +964,10 @@ interface FlowStatePolicy {
965
964
  }
966
965
  type FlowStatePolicyLike = FlowStatePolicy | RetryPolicy;
967
966
  interface FlowPolicyOptions {
967
+ /** Replace the complete stored policy instead of applying the default deep patch. */
968
+ replace?: boolean;
969
+ /** Compare-and-swap generation. Must be a nonnegative JavaScript safe integer. */
970
+ expectedGeneration?: number;
968
971
  state?: string;
969
972
  mode?: FlowStateMode;
970
973
  retry?: RetryPolicy;
@@ -1569,11 +1572,9 @@ declare class HashStore {
1569
1572
  type TopKReserveOptions = {
1570
1573
  width?: never;
1571
1574
  depth?: never;
1572
- decay?: never;
1573
1575
  } | {
1574
1576
  width: number;
1575
1577
  depth: number;
1576
- decay: number;
1577
1578
  };
1578
1579
  interface CountMinMergeOptions {
1579
1580
  weights?: readonly (number | bigint)[];
@@ -1753,10 +1754,10 @@ declare class FerricStoreClientCore extends FerricStoreAdministrationClient {
1753
1754
  }): Promise<FetchOrComputeResult<T>>;
1754
1755
  fetchOrComputeResult(key: string, value: unknown, options: {
1755
1756
  ttlMs: number;
1756
- computeToken: Buffer$1 | null;
1757
+ computeToken: Buffer$1;
1757
1758
  }): Promise<boolean>;
1758
1759
  fetchOrComputeError(key: string, message: string, options: {
1759
- computeToken: Buffer$1 | null;
1760
+ computeToken: Buffer$1;
1760
1761
  }): Promise<boolean>;
1761
1762
  }
1762
1763
 
@@ -1830,6 +1831,49 @@ declare class FerricStoreManagementClient extends FerricStoreClientCore {
1830
1831
  governanceLedger(id: string, options?: GovernanceLedgerOptions): Promise<FlowAdminRecord[]>;
1831
1832
  }
1832
1833
 
1834
+ declare const MAX_FLOW_POLICY_GENERATION: number;
1835
+ type FlowPolicyBackoffKind = "none" | "fixed" | "linear" | "exponential";
1836
+ interface FlowPolicyBackoffSnapshot {
1837
+ readonly kind: FlowPolicyBackoffKind;
1838
+ readonly baseMs: number;
1839
+ readonly maxMs: number;
1840
+ readonly jitterPct: number;
1841
+ }
1842
+ interface FlowPolicyRetrySnapshot {
1843
+ readonly maxRetries: number;
1844
+ readonly backoff: FlowPolicyBackoffSnapshot;
1845
+ readonly exhaustedTo: string;
1846
+ }
1847
+ interface FlowPolicyRetentionSnapshot {
1848
+ readonly ttlMs: number;
1849
+ readonly historyMaxEvents: number;
1850
+ }
1851
+ interface FlowPolicyStateSnapshot {
1852
+ readonly mode: FlowStateMode;
1853
+ readonly maxActiveMs?: number;
1854
+ readonly retry: FlowPolicyRetrySnapshot;
1855
+ readonly retention: FlowPolicyRetentionSnapshot;
1856
+ readonly governance?: Readonly<Record<string, unknown>>;
1857
+ }
1858
+ /** Resolved policy state returned by FLOW.POLICY.SET and FLOW.POLICY.GET. */
1859
+ interface FlowPolicySnapshot {
1860
+ readonly type: string;
1861
+ /** Server-allocated monotonic generation in the JavaScript safe-integer range. */
1862
+ readonly generation: number;
1863
+ readonly state?: string;
1864
+ readonly version?: string | number;
1865
+ readonly mode?: FlowStateMode;
1866
+ readonly maxActiveMs?: number;
1867
+ readonly retry: FlowPolicyRetrySnapshot;
1868
+ readonly retention: FlowPolicyRetentionSnapshot;
1869
+ readonly indexedAttributes: readonly string[];
1870
+ readonly indexedStateMeta?: string;
1871
+ readonly governance?: Readonly<Record<string, unknown>>;
1872
+ readonly states?: Readonly<Record<string, FlowPolicyStateSnapshot>>;
1873
+ /** Original protocol value for forward-compatible fields not yet modeled by the SDK. */
1874
+ readonly raw: unknown;
1875
+ }
1876
+
1833
1877
  /** @internal Read, policy, and shared Flow helpers kept off the primary implementation module. */
1834
1878
  declare class FerricStoreFlowSupportClient extends FerricStoreManagementClient {
1835
1879
  rewind(id: string, options?: {
@@ -1879,10 +1923,10 @@ declare class FerricStoreFlowSupportClient extends FerricStoreManagementClient {
1879
1923
  values?: Record<string, unknown>;
1880
1924
  valueRefs?: Record<string, string>;
1881
1925
  }): Promise<unknown>;
1882
- installPolicy(type: string, options?: FlowPolicyOptions): Promise<unknown>;
1926
+ installPolicy(type: string, options?: FlowPolicyOptions): Promise<FlowPolicySnapshot>;
1883
1927
  policyGet(type: string, options?: {
1884
1928
  state?: string;
1885
- }): Promise<Record<string, unknown>>;
1929
+ }): Promise<FlowPolicySnapshot>;
1886
1930
  retentionCleanup(): Promise<Record<string, unknown>>;
1887
1931
  protected executeProducerWrite(args: CommandArgument[]): Promise<unknown>;
1888
1932
  protected recordOrGet(response: unknown, id: string, partitionKey: string | undefined): Promise<FlowRecord>;
@@ -2006,7 +2050,6 @@ declare class FerricStoreClient extends FerricStoreProducerClient {
2006
2050
  transitionTo?: string;
2007
2051
  runAtMs?: number;
2008
2052
  nowMs?: number;
2009
- priority?: number;
2010
2053
  values?: Record<string, unknown>;
2011
2054
  valueRefs?: Record<string, string>;
2012
2055
  dropValues?: string[];
@@ -2338,7 +2381,7 @@ declare class Workflow {
2338
2381
  worker(options?: WorkerConfig & {
2339
2382
  states?: string[];
2340
2383
  }): WorkflowWorker;
2341
- installPolicy(options?: Omit<FlowPolicyOptions, "mode" | "state" | "states">): Promise<unknown>;
2384
+ installPolicy(options?: Omit<FlowPolicyOptions, "mode" | "state" | "states">): Promise<FlowPolicySnapshot>;
2342
2385
  stateNames(): string[];
2343
2386
  stateRegistration(name: string): StateRegistration | undefined;
2344
2387
  }
@@ -2360,7 +2403,14 @@ declare class WorkflowWorker {
2360
2403
  private applyHandlerError;
2361
2404
  }
2362
2405
 
2406
+ /** TypeScript SDK package version. */
2407
+ declare const FERRICSTORE_SDK_VERSION = "0.3.0";
2408
+ /** Oldest FerricStore server supported by this breaking beta contract. */
2409
+ declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.9.1";
2410
+ /** Native framing and opcode ABI version; unchanged by FerricStore 0.9.1. */
2411
+ declare const FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
2412
+
2363
2413
  /** @deprecated Use RequestDisposition; retained for source compatibility. */
2364
2414
  type ConnectionRequestDisposition = RequestDisposition;
2365
2415
 
2366
- export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, COMPACT_RESPONSE_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeLegacyResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, FlowNotFoundError, type FlowPolicyOptions, type FlowRecord, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, retry, transition };
2416
+ export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, type FlowRecord, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, retry, transition };