@ferricstore/ferricstore 0.5.2 → 0.11.4
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 +44 -5
- package/dist/index.cjs +825 -298
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +90 -26
- package/dist/index.d.ts +90 -26
- package/dist/index.js +825 -298
- package/dist/index.js.map +1 -1
- package/docs/api/assets/hierarchy.js +1 -1
- package/docs/api/assets/navigation.js +1 -1
- package/docs/api/assets/search.js +1 -1
- package/docs/api/classes/ConnectionClosedError.html +1 -1
- package/docs/api/classes/FerricStoreClient.html +3 -3
- package/docs/api/classes/FerricStoreError.html +1 -1
- package/docs/api/classes/FlowAlreadyExistsError.html +1 -1
- package/docs/api/classes/FlowBatchError.html +1 -1
- package/docs/api/classes/FlowNotFoundError.html +1 -1
- package/docs/api/classes/FlowQueryError.html +1 -1
- package/docs/api/classes/FlowWrongStateError.html +1 -1
- package/docs/api/classes/InvalidCommandError.html +1 -1
- package/docs/api/classes/LeaseRenewalError.html +1 -1
- package/docs/api/classes/LockHeldError.html +1 -1
- package/docs/api/classes/LockNotOwnedError.html +1 -1
- package/docs/api/classes/OverloadedError.html +1 -1
- package/docs/api/classes/QueueCompletionError.html +1 -1
- package/docs/api/classes/RequestTimeoutError.html +1 -1
- package/docs/api/classes/RerouteError.html +1 -1
- package/docs/api/classes/StaleLeaseError.html +1 -1
- package/docs/api/classes/StalePolicyGenerationError.html +1 -1
- package/docs/api/hierarchy.html +1 -1
- package/docs/api/index.html +34 -5
- package/docs/api/interfaces/AdminListOptions.html +2 -2
- package/docs/api/interfaces/ApprovalListOptions.html +2 -2
- package/docs/api/interfaces/ApprovalRequestOptions.html +2 -2
- package/docs/api/interfaces/AttributeQueryOptions.html +2 -2
- package/docs/api/interfaces/AutoBatchOptions.html +2 -2
- package/docs/api/interfaces/BudgetCommitOptions.html +2 -2
- package/docs/api/interfaces/BudgetReserveOptions.html +2 -2
- package/docs/api/interfaces/CancelOptions.html +2 -2
- package/docs/api/interfaces/CircuitOpenOptions.html +2 -2
- package/docs/api/interfaces/ClaimDueOptions.html +3 -3
- package/docs/api/interfaces/ClaimHydrationItem.html +2 -2
- package/docs/api/interfaces/CompleteJobsAndClaimJobsResult.html +6 -6
- package/docs/api/interfaces/CompleteManyOptions.html +2 -2
- package/docs/api/interfaces/CompleteOptions.html +2 -2
- package/docs/api/interfaces/CompleteOutcome.html +1 -1
- package/docs/api/interfaces/CreateManyOptions.html +5 -5
- package/docs/api/interfaces/CreateOptions.html +3 -3
- package/docs/api/interfaces/EffectCompensateOptions.html +2 -2
- package/docs/api/interfaces/EffectConfirmOptions.html +2 -2
- package/docs/api/interfaces/EffectFailOptions.html +2 -2
- package/docs/api/interfaces/EffectReserveOptions.html +2 -2
- package/docs/api/interfaces/EffectStatusOptions.html +2 -2
- package/docs/api/interfaces/ExtendLeaseOptions.html +2 -2
- package/docs/api/interfaces/FailOptions.html +2 -2
- package/docs/api/interfaces/FailOutcome.html +1 -1
- package/docs/api/interfaces/FerricStoreClientFromUrlOptions.html +4 -4
- package/docs/api/interfaces/FerricStoreClientOptions.html +4 -4
- package/docs/api/interfaces/FlowBatchCompletedItem.html +2 -2
- package/docs/api/interfaces/FlowPolicyOptions.html +5 -5
- package/docs/api/interfaces/FlowQueryCountResult.html +1 -1
- package/docs/api/interfaces/FlowQueryIndexBuild.html +1 -1
- package/docs/api/interfaces/FlowQueryIndexProgress.html +1 -1
- package/docs/api/interfaces/FlowQueryIndexValidation.html +1 -1
- package/docs/api/interfaces/FlowQueryRecordsResult.html +1 -1
- package/docs/api/interfaces/FlowStatePolicy.html +2 -2
- package/docs/api/interfaces/FlowStatsOptions.html +2 -2
- package/docs/api/interfaces/GovernanceLedgerOptions.html +2 -2
- package/docs/api/interfaces/HistoryOptions.html +2 -2
- package/docs/api/interfaces/InvocationCreateOptions.html +2 -2
- package/docs/api/interfaces/LeaseMutationOptions.html +2 -2
- package/docs/api/interfaces/LimitAmountOptions.html +2 -2
- package/docs/api/interfaces/LimitLeaseOptions.html +2 -2
- package/docs/api/interfaces/LimitListOptions.html +2 -2
- package/docs/api/interfaces/LimitReleaseOptions.html +2 -2
- package/docs/api/interfaces/MutateOptions.html +2 -2
- package/docs/api/interfaces/NamedValueMutation.html +1 -1
- package/docs/api/interfaces/ReadOptions.html +3 -3
- package/docs/api/interfaces/ReclaimOptions.html +2 -2
- package/docs/api/interfaces/RequestContext.html +2 -2
- package/docs/api/interfaces/RequestContextOptions.html +2 -2
- package/docs/api/interfaces/RetryOptions.html +2 -2
- package/docs/api/interfaces/RetryOutcome.html +1 -1
- package/docs/api/interfaces/RunStepsItem.html +2 -2
- package/docs/api/interfaces/RunStepsManyOptions.html +2 -2
- package/docs/api/interfaces/ScheduleFireDueOptions.html +3 -2
- package/docs/api/interfaces/ScheduleFireOptions.html +3 -0
- package/docs/api/interfaces/ScheduleListOptions.html +2 -2
- package/docs/api/interfaces/ScheduleOptions.html +4 -2
- package/docs/api/interfaces/SearchOptions.html +3 -3
- package/docs/api/interfaces/StartAndClaimOptions.html +3 -3
- package/docs/api/interfaces/StepContinueOptions.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 +2 -2
- package/docs/api/interfaces/TransitionOutcome.html +1 -1
- package/docs/api/modules.html +1 -1
- package/docs/api/types/ConnectionRequestDisposition.html +1 -1
- package/docs/api/types/FlowStateMode.html +1 -1
- package/docs/api/types/FlowStatePolicyLike.html +1 -1
- package/docs/api/types/ManagementPairs.html +1 -1
- package/docs/api/types/ScheduleCatchupPolicy.html +2 -0
- package/docs/api/types/ScheduleFireDueResult.html +3 -0
- package/docs/api/types/ScheduleFireResult.html +2 -0
- package/docs/api/types/ScheduleKind.html +1 -0
- package/docs/api/types/ScheduleOverlapPolicy.html +1 -0
- package/docs/api/types/ScheduleRecord.html +12 -0
- package/docs/api/types/ScheduleState.html +1 -0
- package/docs/api/types/SearchStateMeta.html +1 -1
- package/docs/api/variables/FERRICSTORE_MINIMUM_SERVER_VERSION.html +1 -1
- package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,10 +18,10 @@ 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
|
-
SDK `0.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
TypeScript SDK `0.11.4` requires FerricStore server `0.11.4` or newer because
|
|
22
|
+
schedule responses now use the complete recurrence contract. The native wire
|
|
23
|
+
protocol remains v1 (`FSNP` framing and existing opcode numbers are unchanged).
|
|
24
|
+
Capabilities and response-size limits are negotiated
|
|
25
25
|
per connection from the HELLO-shaped startup response rather than inferred from
|
|
26
26
|
a server version table.
|
|
27
27
|
|
|
@@ -43,7 +43,7 @@ const { FerricStoreClient, JsonCodec } = require("@ferricstore/ferricstore");
|
|
|
43
43
|
docker run -p 6388:6388 \
|
|
44
44
|
-e FERRICSTORE_PROTECTED_MODE=false \
|
|
45
45
|
-v ferricstore_data:/data \
|
|
46
|
-
ghcr.io/ferricstore/ferricstore:0.11.
|
|
46
|
+
ghcr.io/ferricstore/ferricstore:0.11.4
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
## Query durable runs
|
|
@@ -428,6 +428,45 @@ await flow.scheduleCreate("orders-every-five-minutes", {
|
|
|
428
428
|
});
|
|
429
429
|
```
|
|
430
430
|
|
|
431
|
+
Overdue interval schedules use bounded `fire_once` catch-up. Recovery creates
|
|
432
|
+
one target, coalesces additional elapsed periods in constant time, and sets the
|
|
433
|
+
next run one full interval after recovery:
|
|
434
|
+
|
|
435
|
+
```ts
|
|
436
|
+
const schedule = await flow.scheduleCreate("billing-sweep", {
|
|
437
|
+
catchupPolicy: "fire_once",
|
|
438
|
+
everyMs: 60_000,
|
|
439
|
+
kind: "interval",
|
|
440
|
+
overlapPolicy: "queue_after_previous",
|
|
441
|
+
target: { id_prefix: "billing-sweep", type: "billing" }
|
|
442
|
+
});
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
`ScheduleRecord` exposes the complete recurrence configuration through
|
|
446
|
+
`created_at_ms`, `every_ms`, `cron`, `timezone`, `overlap_policy`, and
|
|
447
|
+
`overlap_retry_ms`, in addition to `catchup_policy`, `coalesced_count`,
|
|
448
|
+
`last_coalesced_count`, `last_catchup_at_ms`, and `last_planning_error`, using
|
|
449
|
+
the server's canonical field names. Non-applicable recurrence fields are
|
|
450
|
+
`null`, not omitted. `scheduleFireDue()` returns
|
|
451
|
+
`ScheduleFireDueResult`, including the
|
|
452
|
+
batch `coalesced` total. Its `errors` entries correspond to claimed schedules;
|
|
453
|
+
`claim_error` separately reports a failure to request a later wave after
|
|
454
|
+
completed outcomes were preserved. Catch-up handles scheduler delay; overlap
|
|
455
|
+
policy separately handles a previous target that is still active. `fire_once` is the
|
|
456
|
+
default and only catch-up policy for intervals; other schedule kinds reject it.
|
|
457
|
+
The built-in server scheduler normally owns due execution. Call
|
|
458
|
+
`scheduleFireDue()` only for tests, administration, or a deployment that
|
|
459
|
+
deliberately disables the built-in runner and supplies a custom one.
|
|
460
|
+
|
|
461
|
+
Recurring targets reject a fixed `id`. Set `id_prefix` to choose their
|
|
462
|
+
generated prefix, or omit it to use the schedule ID. `ScheduleState` includes
|
|
463
|
+
the transient `"running"` state used while the server holds a due-execution
|
|
464
|
+
lease. Bounded catch-up is interval-only; overdue cron schedules advance one
|
|
465
|
+
matching occurrence per successful automatic fire.
|
|
466
|
+
When planning fails, `state` is `"failed"`, `end_reason` is
|
|
467
|
+
`"planning_failed"`, and `last_planning_error` contains the actionable error.
|
|
468
|
+
`scheduleDelete()` resolves to `undefined` only after an `OK` server reply.
|
|
469
|
+
|
|
431
470
|
FIFO Flow state policy is opt-in per state:
|
|
432
471
|
|
|
433
472
|
```ts
|