@ferricstore/ferricstore 0.5.2 → 0.11.5

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 (111) hide show
  1. package/README.md +45 -5
  2. package/dist/index.cjs +996 -314
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +90 -26
  5. package/dist/index.d.ts +90 -26
  6. package/dist/index.js +996 -314
  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/ConnectionClosedError.html +1 -1
  12. package/docs/api/classes/FerricStoreClient.html +3 -3
  13. package/docs/api/classes/FerricStoreError.html +1 -1
  14. package/docs/api/classes/FlowAlreadyExistsError.html +1 -1
  15. package/docs/api/classes/FlowBatchError.html +1 -1
  16. package/docs/api/classes/FlowNotFoundError.html +1 -1
  17. package/docs/api/classes/FlowQueryError.html +1 -1
  18. package/docs/api/classes/FlowWrongStateError.html +1 -1
  19. package/docs/api/classes/InvalidCommandError.html +1 -1
  20. package/docs/api/classes/LeaseRenewalError.html +1 -1
  21. package/docs/api/classes/LockHeldError.html +1 -1
  22. package/docs/api/classes/LockNotOwnedError.html +1 -1
  23. package/docs/api/classes/OverloadedError.html +1 -1
  24. package/docs/api/classes/QueueCompletionError.html +1 -1
  25. package/docs/api/classes/RequestTimeoutError.html +1 -1
  26. package/docs/api/classes/RerouteError.html +1 -1
  27. package/docs/api/classes/StaleLeaseError.html +1 -1
  28. package/docs/api/classes/StalePolicyGenerationError.html +1 -1
  29. package/docs/api/hierarchy.html +1 -1
  30. package/docs/api/index.html +35 -5
  31. package/docs/api/interfaces/AdminListOptions.html +2 -2
  32. package/docs/api/interfaces/ApprovalListOptions.html +2 -2
  33. package/docs/api/interfaces/ApprovalRequestOptions.html +2 -2
  34. package/docs/api/interfaces/AttributeQueryOptions.html +2 -2
  35. package/docs/api/interfaces/AutoBatchOptions.html +2 -2
  36. package/docs/api/interfaces/BudgetCommitOptions.html +2 -2
  37. package/docs/api/interfaces/BudgetReserveOptions.html +2 -2
  38. package/docs/api/interfaces/CancelOptions.html +2 -2
  39. package/docs/api/interfaces/CircuitOpenOptions.html +2 -2
  40. package/docs/api/interfaces/ClaimDueOptions.html +3 -3
  41. package/docs/api/interfaces/ClaimHydrationItem.html +2 -2
  42. package/docs/api/interfaces/CompleteJobsAndClaimJobsResult.html +6 -6
  43. package/docs/api/interfaces/CompleteManyOptions.html +2 -2
  44. package/docs/api/interfaces/CompleteOptions.html +2 -2
  45. package/docs/api/interfaces/CompleteOutcome.html +1 -1
  46. package/docs/api/interfaces/CreateManyOptions.html +5 -5
  47. package/docs/api/interfaces/CreateOptions.html +3 -3
  48. package/docs/api/interfaces/EffectCompensateOptions.html +2 -2
  49. package/docs/api/interfaces/EffectConfirmOptions.html +2 -2
  50. package/docs/api/interfaces/EffectFailOptions.html +2 -2
  51. package/docs/api/interfaces/EffectReserveOptions.html +2 -2
  52. package/docs/api/interfaces/EffectStatusOptions.html +2 -2
  53. package/docs/api/interfaces/ExtendLeaseOptions.html +2 -2
  54. package/docs/api/interfaces/FailOptions.html +2 -2
  55. package/docs/api/interfaces/FailOutcome.html +1 -1
  56. package/docs/api/interfaces/FerricStoreClientFromUrlOptions.html +4 -4
  57. package/docs/api/interfaces/FerricStoreClientOptions.html +4 -4
  58. package/docs/api/interfaces/FlowBatchCompletedItem.html +2 -2
  59. package/docs/api/interfaces/FlowPolicyOptions.html +5 -5
  60. package/docs/api/interfaces/FlowQueryCountResult.html +1 -1
  61. package/docs/api/interfaces/FlowQueryIndexBuild.html +1 -1
  62. package/docs/api/interfaces/FlowQueryIndexProgress.html +1 -1
  63. package/docs/api/interfaces/FlowQueryIndexValidation.html +1 -1
  64. package/docs/api/interfaces/FlowQueryRecordsResult.html +1 -1
  65. package/docs/api/interfaces/FlowStatePolicy.html +2 -2
  66. package/docs/api/interfaces/FlowStatsOptions.html +2 -2
  67. package/docs/api/interfaces/GovernanceLedgerOptions.html +2 -2
  68. package/docs/api/interfaces/HistoryOptions.html +2 -2
  69. package/docs/api/interfaces/InvocationCreateOptions.html +2 -2
  70. package/docs/api/interfaces/LeaseMutationOptions.html +2 -2
  71. package/docs/api/interfaces/LimitAmountOptions.html +2 -2
  72. package/docs/api/interfaces/LimitLeaseOptions.html +2 -2
  73. package/docs/api/interfaces/LimitListOptions.html +2 -2
  74. package/docs/api/interfaces/LimitReleaseOptions.html +2 -2
  75. package/docs/api/interfaces/MutateOptions.html +2 -2
  76. package/docs/api/interfaces/NamedValueMutation.html +1 -1
  77. package/docs/api/interfaces/ReadOptions.html +3 -3
  78. package/docs/api/interfaces/ReclaimOptions.html +2 -2
  79. package/docs/api/interfaces/RequestContext.html +2 -2
  80. package/docs/api/interfaces/RequestContextOptions.html +2 -2
  81. package/docs/api/interfaces/RetryOptions.html +2 -2
  82. package/docs/api/interfaces/RetryOutcome.html +1 -1
  83. package/docs/api/interfaces/RunStepsItem.html +2 -2
  84. package/docs/api/interfaces/RunStepsManyOptions.html +2 -2
  85. package/docs/api/interfaces/ScheduleFireDueOptions.html +3 -2
  86. package/docs/api/interfaces/ScheduleFireOptions.html +3 -0
  87. package/docs/api/interfaces/ScheduleListOptions.html +2 -2
  88. package/docs/api/interfaces/ScheduleOptions.html +4 -2
  89. package/docs/api/interfaces/SearchOptions.html +3 -3
  90. package/docs/api/interfaces/StartAndClaimOptions.html +3 -3
  91. package/docs/api/interfaces/StepContinueOptions.html +3 -3
  92. package/docs/api/interfaces/TDigestCreateOptions.html +1 -1
  93. package/docs/api/interfaces/TDigestMergeOptions.html +1 -1
  94. package/docs/api/interfaces/TransitionOptions.html +2 -2
  95. package/docs/api/interfaces/TransitionOutcome.html +1 -1
  96. package/docs/api/modules.html +1 -1
  97. package/docs/api/types/ConnectionRequestDisposition.html +1 -1
  98. package/docs/api/types/FlowStateMode.html +1 -1
  99. package/docs/api/types/FlowStatePolicyLike.html +1 -1
  100. package/docs/api/types/ManagementPairs.html +1 -1
  101. package/docs/api/types/ScheduleCatchupPolicy.html +2 -0
  102. package/docs/api/types/ScheduleFireDueResult.html +3 -0
  103. package/docs/api/types/ScheduleFireResult.html +2 -0
  104. package/docs/api/types/ScheduleKind.html +1 -0
  105. package/docs/api/types/ScheduleOverlapPolicy.html +1 -0
  106. package/docs/api/types/ScheduleRecord.html +12 -0
  107. package/docs/api/types/ScheduleState.html +1 -0
  108. package/docs/api/types/SearchStateMeta.html +1 -1
  109. package/docs/api/variables/FERRICSTORE_MINIMUM_SERVER_VERSION.html +1 -1
  110. package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +1 -1
  111. package/package.json +2 -2
package/README.md CHANGED
@@ -18,10 +18,11 @@ 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.5.x` requires FerricStore server `0.11.0` or newer and is tested against
22
- FerricStore `0.11.3`. FerricStore 0.11 is a breaking beta API contract update,
23
- while the native wire protocol remains v1 (`FSNP` framing and existing opcode
24
- numbers are unchanged). Capabilities and response-size limits are negotiated
21
+ TypeScript SDK `0.11.5` requires FerricStore server `0.11.4` or newer. With
22
+ FerricStore 0.11.5 it negotiates compact Stream mode 34 for homogeneous auto-ID
23
+ `XADD` pipelines and compact Pub/Sub mode 35 for homogeneous `PUBLISH`
24
+ pipelines. Native wire protocol v1 and the generic fallback are unchanged.
25
+ Capabilities and response-size limits are negotiated
25
26
  per connection from the HELLO-shaped startup response rather than inferred from
26
27
  a server version table.
27
28
 
@@ -43,7 +44,7 @@ const { FerricStoreClient, JsonCodec } = require("@ferricstore/ferricstore");
43
44
  docker run -p 6388:6388 \
44
45
  -e FERRICSTORE_PROTECTED_MODE=false \
45
46
  -v ferricstore_data:/data \
46
- ghcr.io/ferricstore/ferricstore:0.11.3
47
+ ghcr.io/ferricstore/ferricstore:0.11.5
47
48
  ```
48
49
 
49
50
  ## Query durable runs
@@ -428,6 +429,45 @@ await flow.scheduleCreate("orders-every-five-minutes", {
428
429
  });
429
430
  ```
430
431
 
432
+ Overdue interval schedules use bounded `fire_once` catch-up. Recovery creates
433
+ one target, coalesces additional elapsed periods in constant time, and sets the
434
+ next run one full interval after recovery:
435
+
436
+ ```ts
437
+ const schedule = await flow.scheduleCreate("billing-sweep", {
438
+ catchupPolicy: "fire_once",
439
+ everyMs: 60_000,
440
+ kind: "interval",
441
+ overlapPolicy: "queue_after_previous",
442
+ target: { id_prefix: "billing-sweep", type: "billing" }
443
+ });
444
+ ```
445
+
446
+ `ScheduleRecord` exposes the complete recurrence configuration through
447
+ `created_at_ms`, `every_ms`, `cron`, `timezone`, `overlap_policy`, and
448
+ `overlap_retry_ms`, in addition to `catchup_policy`, `coalesced_count`,
449
+ `last_coalesced_count`, `last_catchup_at_ms`, and `last_planning_error`, using
450
+ the server's canonical field names. Non-applicable recurrence fields are
451
+ `null`, not omitted. `scheduleFireDue()` returns
452
+ `ScheduleFireDueResult`, including the
453
+ batch `coalesced` total. Its `errors` entries correspond to claimed schedules;
454
+ `claim_error` separately reports a failure to request a later wave after
455
+ completed outcomes were preserved. Catch-up handles scheduler delay; overlap
456
+ policy separately handles a previous target that is still active. `fire_once` is the
457
+ default and only catch-up policy for intervals; other schedule kinds reject it.
458
+ The built-in server scheduler normally owns due execution. Call
459
+ `scheduleFireDue()` only for tests, administration, or a deployment that
460
+ deliberately disables the built-in runner and supplies a custom one.
461
+
462
+ Recurring targets reject a fixed `id`. Set `id_prefix` to choose their
463
+ generated prefix, or omit it to use the schedule ID. `ScheduleState` includes
464
+ the transient `"running"` state used while the server holds a due-execution
465
+ lease. Bounded catch-up is interval-only; overdue cron schedules advance one
466
+ matching occurrence per successful automatic fire.
467
+ When planning fails, `state` is `"failed"`, `end_reason` is
468
+ `"planning_failed"`, and `last_planning_error` contains the actionable error.
469
+ `scheduleDelete()` resolves to `undefined` only after an `OK` server reply.
470
+
431
471
  FIFO Flow state policy is opt-in per state:
432
472
 
433
473
  ```ts