@ferricstore/ferricstore 0.13.0 → 0.13.1
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.
- package/README.md +43 -1
- package/dist/index.cjs +230 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -6
- package/dist/index.d.ts +30 -6
- package/dist/index.js +229 -82
- package/dist/index.js.map +1 -1
- package/dist/langgraph.cjs.map +1 -1
- package/dist/langgraph.js.map +1 -1
- package/dist/openai-agents.cjs.map +1 -1
- package/dist/openai-agents.js.map +1 -1
- package/docs/api/assets/hierarchy.js +1 -1
- package/docs/api/assets/highlight.css +9 -2
- package/docs/api/assets/navigation.js +1 -1
- package/docs/api/assets/search.js +1 -1
- package/docs/api/classes/ConnectionClosedError.html +4 -4
- package/docs/api/classes/FerricStoreClient.html +13 -13
- package/docs/api/classes/FerricStoreError.html +1 -0
- package/docs/api/classes/FlowAlreadyExistsError.html +3 -3
- package/docs/api/classes/FlowNotFoundError.html +3 -3
- package/docs/api/classes/FlowWrongStateError.html +3 -3
- package/docs/api/classes/HTTPTransportError.html +13 -7
- package/docs/api/classes/InvalidCommandError.html +3 -3
- package/docs/api/classes/LeaseRenewalError.html +1 -1
- package/docs/api/classes/LockHeldError.html +3 -3
- package/docs/api/classes/LockNotOwnedError.html +3 -3
- package/docs/api/classes/NativeAdapter.html +3 -3
- package/docs/api/classes/OverloadedError.html +5 -5
- package/docs/api/classes/QueueCompletionError.html +1 -1
- package/docs/api/classes/RequestNotSentError.html +225 -0
- package/docs/api/classes/RequestTimeoutError.html +6 -6
- package/docs/api/classes/RerouteError.html +3 -3
- package/docs/api/classes/StaleLeaseError.html +3 -3
- package/docs/api/classes/StalePolicyGenerationError.html +3 -3
- package/docs/api/classes/WorkflowContext.html +7 -9
- package/docs/api/functions/classifyServerError.html +1 -1
- package/docs/api/functions/mapException.html +1 -1
- package/docs/api/hierarchy.html +21 -20
- package/docs/api/index.html +30 -2
- package/docs/api/interfaces/AdvanceOptions.html +9 -5
- package/docs/api/interfaces/AlreadyAppliedOutcome.html +1 -1
- package/docs/api/interfaces/AppliedStepOutcome.html +1 -1
- package/docs/api/interfaces/CancelOptions.html +12 -8
- package/docs/api/interfaces/CompleteOptions.html +12 -8
- package/docs/api/interfaces/CompleteOutcome.html +1 -1
- package/docs/api/interfaces/ExtendLeaseOptions.html +10 -8
- package/docs/api/interfaces/FailOptions.html +12 -8
- package/docs/api/interfaces/FailOutcome.html +1 -1
- package/docs/api/interfaces/HistoryOptions.html +16 -16
- package/docs/api/interfaces/LeaseMutationOptions.html +10 -6
- package/docs/api/interfaces/MutateOptions.html +7 -3
- package/docs/api/interfaces/NamedValueMutation.html +1 -1
- package/docs/api/interfaces/ReadOptions.html +11 -11
- package/docs/api/interfaces/RetryOptions.html +12 -8
- package/docs/api/interfaces/RetryOutcome.html +1 -1
- package/docs/api/interfaces/RunStepsItem.html +3 -3
- package/docs/api/interfaces/RunStepsManyOptions.html +11 -11
- package/docs/api/interfaces/SearchOptions.html +12 -12
- package/docs/api/interfaces/StepContinueOptions.html +15 -11
- package/docs/api/interfaces/StepOptions.html +15 -8
- package/docs/api/interfaces/StepResult.html +3 -3
- package/docs/api/interfaces/TDigestCreateOptions.html +1 -1
- package/docs/api/interfaces/TDigestMergeOptions.html +1 -1
- package/docs/api/interfaces/TransitionOptions.html +14 -10
- package/docs/api/interfaces/TransitionOutcome.html +1 -1
- package/docs/api/media/design.md +12 -1
- package/docs/api/modules.html +2 -2
- package/docs/api/types/ConnectionRequestDisposition.html +1 -1
- package/docs/api/types/ManagementPairs.html +1 -1
- package/docs/api/types/RequestDisposition.html +1 -1
- package/docs/api/types/SearchStateMeta.html +1 -1
- package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +1 -1
- package/docs/design.md +12 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -18,14 +18,16 @@ declare class FerricStoreError extends Error {
|
|
|
18
18
|
retryAfterMs?: number;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
type RequestDisposition = "unsent" | "possibly_sent";
|
|
21
22
|
declare class HTTPTransportError extends FerricStoreError {
|
|
22
23
|
readonly code = "http_transport";
|
|
24
|
+
readonly requestDisposition: RequestDisposition | undefined;
|
|
23
25
|
readonly statusCode: number | undefined;
|
|
24
26
|
constructor(message: string, options?: ConstructorParameters<typeof FerricStoreError>[1] & {
|
|
27
|
+
requestDisposition?: RequestDisposition;
|
|
25
28
|
statusCode?: number;
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
|
-
type RequestDisposition = "unsent" | "possibly_sent";
|
|
29
31
|
/** Connection closure annotated with whether the current request may have reached the server. */
|
|
30
32
|
declare class ConnectionClosedError extends FerricStoreError {
|
|
31
33
|
readonly code = "connection_closed";
|
|
@@ -46,6 +48,15 @@ declare class RequestTimeoutError extends FerricStoreError {
|
|
|
46
48
|
cause?: unknown;
|
|
47
49
|
});
|
|
48
50
|
}
|
|
51
|
+
/** A local validation, encoding, sizing, or lifecycle failure before submission. */
|
|
52
|
+
declare class RequestNotSentError extends FerricStoreError {
|
|
53
|
+
readonly code = "request_not_sent";
|
|
54
|
+
readonly requestDisposition: "unsent";
|
|
55
|
+
constructor(message: string, options?: {
|
|
56
|
+
raw?: unknown;
|
|
57
|
+
cause?: unknown;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
49
60
|
declare class FlowNotFoundError extends FerricStoreError {
|
|
50
61
|
readonly code = "flow_not_found";
|
|
51
62
|
}
|
|
@@ -984,6 +995,11 @@ interface MutateOptions {
|
|
|
984
995
|
attributesMerge?: Record<string, CommandArgument>;
|
|
985
996
|
attributesDelete?: string[];
|
|
986
997
|
stateMeta?: StateMeta;
|
|
998
|
+
/**
|
|
999
|
+
* Explicit client-supplied command timestamp. Omit in production so each
|
|
1000
|
+
* request samples the current client wall clock; primarily useful for tests.
|
|
1001
|
+
* This is not the server response time or the client transport deadline.
|
|
1002
|
+
*/
|
|
987
1003
|
nowMs?: number;
|
|
988
1004
|
returnRecord?: boolean;
|
|
989
1005
|
}
|
|
@@ -996,6 +1012,7 @@ interface ExtendLeaseOptions {
|
|
|
996
1012
|
fencingToken: FencingToken;
|
|
997
1013
|
leaseMs: number;
|
|
998
1014
|
partitionKey?: string;
|
|
1015
|
+
/** See {@link MutateOptions.nowMs}; this is a client timestamp override. */
|
|
999
1016
|
nowMs?: number;
|
|
1000
1017
|
returnOkOnSuccess?: boolean;
|
|
1001
1018
|
}
|
|
@@ -1023,6 +1040,10 @@ interface AdvanceOptions extends Omit<MutateOptions, "returnRecord"> {
|
|
|
1023
1040
|
interface StepOptions<TResult> extends AdvanceOptions {
|
|
1024
1041
|
/** Stable operation identity. Keep this unchanged across retries. */
|
|
1025
1042
|
name: string;
|
|
1043
|
+
/**
|
|
1044
|
+
* Runs directly in the caller or worker's JavaScript execution context. The
|
|
1045
|
+
* SDK awaits its result and does not submit it to a global thread pool.
|
|
1046
|
+
*/
|
|
1026
1047
|
run: () => TResult | PromiseLike<TResult>;
|
|
1027
1048
|
}
|
|
1028
1049
|
/** The renewed claim and durable result returned by a durable `step()` call. */
|
|
@@ -2435,12 +2456,12 @@ declare class Queue {
|
|
|
2435
2456
|
}
|
|
2436
2457
|
|
|
2437
2458
|
/** @internal Coordinates lease renewal around an atomic lease-rotating write. */
|
|
2438
|
-
interface
|
|
2459
|
+
interface MutationCoordinator {
|
|
2439
2460
|
pause(): Promise<void>;
|
|
2440
2461
|
resume(job: ClaimedItem): void;
|
|
2441
2462
|
}
|
|
2463
|
+
|
|
2442
2464
|
declare class WorkflowContext {
|
|
2443
|
-
private readonly mutationCoordinator?;
|
|
2444
2465
|
readonly workflow: Workflow;
|
|
2445
2466
|
readonly job: FlowRecord | ClaimedItem;
|
|
2446
2467
|
readonly flow: WorkflowFlowCommands;
|
|
@@ -2449,8 +2470,11 @@ declare class WorkflowContext {
|
|
|
2449
2470
|
private leaseJob;
|
|
2450
2471
|
private mutationFailure?;
|
|
2451
2472
|
private mutationPhase;
|
|
2473
|
+
private mutationCoordinator?;
|
|
2452
2474
|
private readonly valueCache;
|
|
2453
|
-
constructor(workflow: Workflow, job: FlowRecord | ClaimedItem, stateName: string
|
|
2475
|
+
constructor(workflow: Workflow, job: FlowRecord | ClaimedItem, stateName: string);
|
|
2476
|
+
/** @internal */
|
|
2477
|
+
protected configureWorkerMutation(leaseJob: ClaimedItem, coordinator: MutationCoordinator): void;
|
|
2454
2478
|
get client(): FerricStoreClient;
|
|
2455
2479
|
get stateName(): string;
|
|
2456
2480
|
get id(): string;
|
|
@@ -2653,7 +2677,7 @@ declare class WorkflowWorker {
|
|
|
2653
2677
|
}
|
|
2654
2678
|
|
|
2655
2679
|
/** TypeScript SDK package version. */
|
|
2656
|
-
declare const FERRICSTORE_SDK_VERSION = "0.
|
|
2680
|
+
declare const FERRICSTORE_SDK_VERSION = "0.13.1";
|
|
2657
2681
|
/** Oldest FerricStore server supported by this breaking beta contract. */
|
|
2658
2682
|
declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.11.4";
|
|
2659
2683
|
/** Native framing and opcode ABI version; unchanged by FerricStore 0.11. */
|
|
@@ -2662,4 +2686,4 @@ declare const FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
|
|
|
2662
2686
|
/** @deprecated Use RequestDisposition; retained for source compatibility. */
|
|
2663
2687
|
type ConnectionRequestDisposition = RequestDisposition;
|
|
2664
2688
|
|
|
2665
|
-
export { type AdminListOptions, type AdvanceOptions, AlreadyAppliedOutcome, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, ClaimedItem, type Codec, type CollectionScanOptions, Command, CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, 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, FencedItem, FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowEventProjectionField, type FlowExplainCapabilities, type FlowExplainResult, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, FlowProjection, type FlowProjectionField, type FlowProjectionShape, type FlowQueryCountResult, FlowQueryError, type FlowQueryErrorPosition, type FlowQueryIndex, type FlowQueryIndexBuild, type FlowQueryIndexCoverage, type FlowQueryIndexField, type FlowQueryIndexFormat, type FlowQueryIndexProgress, type FlowQueryIndexRegistry, type FlowQueryIndexRetirement, type FlowQueryIndexServiceState, type FlowQueryIndexServices, type FlowQueryIndexStatistics, type FlowQueryIndexStatus, type FlowQueryIndexValidation, type FlowQueryInteger, type FlowQueryPage, type FlowQueryParameter, type FlowQueryParameters, type FlowQueryQuality, type FlowQueryRecord, type FlowQueryRecordsResult, type FlowQueryResult, type FlowQueryUsage, FlowRecord, type FlowRunProjectionField, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, HTTPAdapter, type HTTPAdapterOptions, type HTTPCommandDisposition, HTTPTransportError, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, MaxActiveMs, type MutateOptions, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleCatchupPolicy, type ScheduleFireDueOptions, type ScheduleFireDueResult, type ScheduleFireOptions, type ScheduleFireResult, type ScheduleKind, type ScheduleListOptions, type ScheduleOptions, type ScheduleOverlapPolicy, type ScheduleRecord, type ScheduleState, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, StateMeta, type StateOptions, type StateRegistration, type StepContinueOptions, type StepOptions, type StepResult, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowStepResult, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, httpCommandDisposition, isReconnectableClosedConnectionError, mapException, projectFlowQuery };
|
|
2689
|
+
export { type AdminListOptions, type AdvanceOptions, AlreadyAppliedOutcome, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, ClaimedItem, type Codec, type CollectionScanOptions, Command, CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, 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, FencedItem, FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowEventProjectionField, type FlowExplainCapabilities, type FlowExplainResult, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, FlowProjection, type FlowProjectionField, type FlowProjectionShape, type FlowQueryCountResult, FlowQueryError, type FlowQueryErrorPosition, type FlowQueryIndex, type FlowQueryIndexBuild, type FlowQueryIndexCoverage, type FlowQueryIndexField, type FlowQueryIndexFormat, type FlowQueryIndexProgress, type FlowQueryIndexRegistry, type FlowQueryIndexRetirement, type FlowQueryIndexServiceState, type FlowQueryIndexServices, type FlowQueryIndexStatistics, type FlowQueryIndexStatus, type FlowQueryIndexValidation, type FlowQueryInteger, type FlowQueryPage, type FlowQueryParameter, type FlowQueryParameters, type FlowQueryQuality, type FlowQueryRecord, type FlowQueryRecordsResult, type FlowQueryResult, type FlowQueryUsage, FlowRecord, type FlowRunProjectionField, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, HTTPAdapter, type HTTPAdapterOptions, type HTTPCommandDisposition, HTTPTransportError, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, MaxActiveMs, type MutateOptions, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestNotSentError, RequestTimeoutError, RerouteError, type RetryOptions, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleCatchupPolicy, type ScheduleFireDueOptions, type ScheduleFireDueResult, type ScheduleFireOptions, type ScheduleFireResult, type ScheduleKind, type ScheduleListOptions, type ScheduleOptions, type ScheduleOverlapPolicy, type ScheduleRecord, type ScheduleState, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, StateMeta, type StateOptions, type StateRegistration, type StepContinueOptions, type StepOptions, type StepResult, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowStepResult, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, httpCommandDisposition, isReconnectableClosedConnectionError, mapException, projectFlowQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,14 +18,16 @@ declare class FerricStoreError extends Error {
|
|
|
18
18
|
retryAfterMs?: number;
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
type RequestDisposition = "unsent" | "possibly_sent";
|
|
21
22
|
declare class HTTPTransportError extends FerricStoreError {
|
|
22
23
|
readonly code = "http_transport";
|
|
24
|
+
readonly requestDisposition: RequestDisposition | undefined;
|
|
23
25
|
readonly statusCode: number | undefined;
|
|
24
26
|
constructor(message: string, options?: ConstructorParameters<typeof FerricStoreError>[1] & {
|
|
27
|
+
requestDisposition?: RequestDisposition;
|
|
25
28
|
statusCode?: number;
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
|
-
type RequestDisposition = "unsent" | "possibly_sent";
|
|
29
31
|
/** Connection closure annotated with whether the current request may have reached the server. */
|
|
30
32
|
declare class ConnectionClosedError extends FerricStoreError {
|
|
31
33
|
readonly code = "connection_closed";
|
|
@@ -46,6 +48,15 @@ declare class RequestTimeoutError extends FerricStoreError {
|
|
|
46
48
|
cause?: unknown;
|
|
47
49
|
});
|
|
48
50
|
}
|
|
51
|
+
/** A local validation, encoding, sizing, or lifecycle failure before submission. */
|
|
52
|
+
declare class RequestNotSentError extends FerricStoreError {
|
|
53
|
+
readonly code = "request_not_sent";
|
|
54
|
+
readonly requestDisposition: "unsent";
|
|
55
|
+
constructor(message: string, options?: {
|
|
56
|
+
raw?: unknown;
|
|
57
|
+
cause?: unknown;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
49
60
|
declare class FlowNotFoundError extends FerricStoreError {
|
|
50
61
|
readonly code = "flow_not_found";
|
|
51
62
|
}
|
|
@@ -984,6 +995,11 @@ interface MutateOptions {
|
|
|
984
995
|
attributesMerge?: Record<string, CommandArgument>;
|
|
985
996
|
attributesDelete?: string[];
|
|
986
997
|
stateMeta?: StateMeta;
|
|
998
|
+
/**
|
|
999
|
+
* Explicit client-supplied command timestamp. Omit in production so each
|
|
1000
|
+
* request samples the current client wall clock; primarily useful for tests.
|
|
1001
|
+
* This is not the server response time or the client transport deadline.
|
|
1002
|
+
*/
|
|
987
1003
|
nowMs?: number;
|
|
988
1004
|
returnRecord?: boolean;
|
|
989
1005
|
}
|
|
@@ -996,6 +1012,7 @@ interface ExtendLeaseOptions {
|
|
|
996
1012
|
fencingToken: FencingToken;
|
|
997
1013
|
leaseMs: number;
|
|
998
1014
|
partitionKey?: string;
|
|
1015
|
+
/** See {@link MutateOptions.nowMs}; this is a client timestamp override. */
|
|
999
1016
|
nowMs?: number;
|
|
1000
1017
|
returnOkOnSuccess?: boolean;
|
|
1001
1018
|
}
|
|
@@ -1023,6 +1040,10 @@ interface AdvanceOptions extends Omit<MutateOptions, "returnRecord"> {
|
|
|
1023
1040
|
interface StepOptions<TResult> extends AdvanceOptions {
|
|
1024
1041
|
/** Stable operation identity. Keep this unchanged across retries. */
|
|
1025
1042
|
name: string;
|
|
1043
|
+
/**
|
|
1044
|
+
* Runs directly in the caller or worker's JavaScript execution context. The
|
|
1045
|
+
* SDK awaits its result and does not submit it to a global thread pool.
|
|
1046
|
+
*/
|
|
1026
1047
|
run: () => TResult | PromiseLike<TResult>;
|
|
1027
1048
|
}
|
|
1028
1049
|
/** The renewed claim and durable result returned by a durable `step()` call. */
|
|
@@ -2435,12 +2456,12 @@ declare class Queue {
|
|
|
2435
2456
|
}
|
|
2436
2457
|
|
|
2437
2458
|
/** @internal Coordinates lease renewal around an atomic lease-rotating write. */
|
|
2438
|
-
interface
|
|
2459
|
+
interface MutationCoordinator {
|
|
2439
2460
|
pause(): Promise<void>;
|
|
2440
2461
|
resume(job: ClaimedItem): void;
|
|
2441
2462
|
}
|
|
2463
|
+
|
|
2442
2464
|
declare class WorkflowContext {
|
|
2443
|
-
private readonly mutationCoordinator?;
|
|
2444
2465
|
readonly workflow: Workflow;
|
|
2445
2466
|
readonly job: FlowRecord | ClaimedItem;
|
|
2446
2467
|
readonly flow: WorkflowFlowCommands;
|
|
@@ -2449,8 +2470,11 @@ declare class WorkflowContext {
|
|
|
2449
2470
|
private leaseJob;
|
|
2450
2471
|
private mutationFailure?;
|
|
2451
2472
|
private mutationPhase;
|
|
2473
|
+
private mutationCoordinator?;
|
|
2452
2474
|
private readonly valueCache;
|
|
2453
|
-
constructor(workflow: Workflow, job: FlowRecord | ClaimedItem, stateName: string
|
|
2475
|
+
constructor(workflow: Workflow, job: FlowRecord | ClaimedItem, stateName: string);
|
|
2476
|
+
/** @internal */
|
|
2477
|
+
protected configureWorkerMutation(leaseJob: ClaimedItem, coordinator: MutationCoordinator): void;
|
|
2454
2478
|
get client(): FerricStoreClient;
|
|
2455
2479
|
get stateName(): string;
|
|
2456
2480
|
get id(): string;
|
|
@@ -2653,7 +2677,7 @@ declare class WorkflowWorker {
|
|
|
2653
2677
|
}
|
|
2654
2678
|
|
|
2655
2679
|
/** TypeScript SDK package version. */
|
|
2656
|
-
declare const FERRICSTORE_SDK_VERSION = "0.
|
|
2680
|
+
declare const FERRICSTORE_SDK_VERSION = "0.13.1";
|
|
2657
2681
|
/** Oldest FerricStore server supported by this breaking beta contract. */
|
|
2658
2682
|
declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.11.4";
|
|
2659
2683
|
/** Native framing and opcode ABI version; unchanged by FerricStore 0.11. */
|
|
@@ -2662,4 +2686,4 @@ declare const FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
|
|
|
2662
2686
|
/** @deprecated Use RequestDisposition; retained for source compatibility. */
|
|
2663
2687
|
type ConnectionRequestDisposition = RequestDisposition;
|
|
2664
2688
|
|
|
2665
|
-
export { type AdminListOptions, type AdvanceOptions, AlreadyAppliedOutcome, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, ClaimedItem, type Codec, type CollectionScanOptions, Command, CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, 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, FencedItem, FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowEventProjectionField, type FlowExplainCapabilities, type FlowExplainResult, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, FlowProjection, type FlowProjectionField, type FlowProjectionShape, type FlowQueryCountResult, FlowQueryError, type FlowQueryErrorPosition, type FlowQueryIndex, type FlowQueryIndexBuild, type FlowQueryIndexCoverage, type FlowQueryIndexField, type FlowQueryIndexFormat, type FlowQueryIndexProgress, type FlowQueryIndexRegistry, type FlowQueryIndexRetirement, type FlowQueryIndexServiceState, type FlowQueryIndexServices, type FlowQueryIndexStatistics, type FlowQueryIndexStatus, type FlowQueryIndexValidation, type FlowQueryInteger, type FlowQueryPage, type FlowQueryParameter, type FlowQueryParameters, type FlowQueryQuality, type FlowQueryRecord, type FlowQueryRecordsResult, type FlowQueryResult, type FlowQueryUsage, FlowRecord, type FlowRunProjectionField, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, HTTPAdapter, type HTTPAdapterOptions, type HTTPCommandDisposition, HTTPTransportError, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, MaxActiveMs, type MutateOptions, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleCatchupPolicy, type ScheduleFireDueOptions, type ScheduleFireDueResult, type ScheduleFireOptions, type ScheduleFireResult, type ScheduleKind, type ScheduleListOptions, type ScheduleOptions, type ScheduleOverlapPolicy, type ScheduleRecord, type ScheduleState, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, StateMeta, type StateOptions, type StateRegistration, type StepContinueOptions, type StepOptions, type StepResult, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowStepResult, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, httpCommandDisposition, isReconnectableClosedConnectionError, mapException, projectFlowQuery };
|
|
2689
|
+
export { type AdminListOptions, type AdvanceOptions, AlreadyAppliedOutcome, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, ClaimedItem, type Codec, type CollectionScanOptions, Command, CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, 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, FencedItem, FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowEventProjectionField, type FlowExplainCapabilities, type FlowExplainResult, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, FlowProjection, type FlowProjectionField, type FlowProjectionShape, type FlowQueryCountResult, FlowQueryError, type FlowQueryErrorPosition, type FlowQueryIndex, type FlowQueryIndexBuild, type FlowQueryIndexCoverage, type FlowQueryIndexField, type FlowQueryIndexFormat, type FlowQueryIndexProgress, type FlowQueryIndexRegistry, type FlowQueryIndexRetirement, type FlowQueryIndexServiceState, type FlowQueryIndexServices, type FlowQueryIndexStatistics, type FlowQueryIndexStatus, type FlowQueryIndexValidation, type FlowQueryInteger, type FlowQueryPage, type FlowQueryParameter, type FlowQueryParameters, type FlowQueryQuality, type FlowQueryRecord, type FlowQueryRecordsResult, type FlowQueryResult, type FlowQueryUsage, FlowRecord, type FlowRunProjectionField, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, HTTPAdapter, type HTTPAdapterOptions, type HTTPCommandDisposition, HTTPTransportError, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, MaxActiveMs, type MutateOptions, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestNotSentError, RequestTimeoutError, RerouteError, type RetryOptions, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleCatchupPolicy, type ScheduleFireDueOptions, type ScheduleFireDueResult, type ScheduleFireOptions, type ScheduleFireResult, type ScheduleKind, type ScheduleListOptions, type ScheduleOptions, type ScheduleOverlapPolicy, type ScheduleRecord, type ScheduleState, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, StateMeta, type StateOptions, type StateRegistration, type StepContinueOptions, type StepOptions, type StepResult, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowStepResult, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, httpCommandDisposition, isReconnectableClosedConnectionError, mapException, projectFlowQuery };
|