@ferricstore/ferricstore 0.13.0 → 0.13.2

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 (74) hide show
  1. package/README.md +53 -1
  2. package/dist/index.cjs +230 -82
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +30 -6
  5. package/dist/index.d.ts +30 -6
  6. package/dist/index.js +229 -82
  7. package/dist/index.js.map +1 -1
  8. package/dist/langgraph.cjs.map +1 -1
  9. package/dist/langgraph.js.map +1 -1
  10. package/dist/openai-agents.cjs.map +1 -1
  11. package/dist/openai-agents.js.map +1 -1
  12. package/docs/api/assets/hierarchy.js +1 -1
  13. package/docs/api/assets/highlight.css +9 -2
  14. package/docs/api/assets/navigation.js +1 -1
  15. package/docs/api/assets/search.js +1 -1
  16. package/docs/api/classes/ConnectionClosedError.html +4 -4
  17. package/docs/api/classes/FerricStoreClient.html +13 -13
  18. package/docs/api/classes/FerricStoreError.html +1 -0
  19. package/docs/api/classes/FlowAlreadyExistsError.html +3 -3
  20. package/docs/api/classes/FlowNotFoundError.html +3 -3
  21. package/docs/api/classes/FlowWrongStateError.html +3 -3
  22. package/docs/api/classes/HTTPTransportError.html +13 -7
  23. package/docs/api/classes/InvalidCommandError.html +3 -3
  24. package/docs/api/classes/LeaseRenewalError.html +1 -1
  25. package/docs/api/classes/LockHeldError.html +3 -3
  26. package/docs/api/classes/LockNotOwnedError.html +3 -3
  27. package/docs/api/classes/NativeAdapter.html +3 -3
  28. package/docs/api/classes/OverloadedError.html +5 -5
  29. package/docs/api/classes/QueueCompletionError.html +1 -1
  30. package/docs/api/classes/RequestNotSentError.html +225 -0
  31. package/docs/api/classes/RequestTimeoutError.html +6 -6
  32. package/docs/api/classes/RerouteError.html +3 -3
  33. package/docs/api/classes/StaleLeaseError.html +3 -3
  34. package/docs/api/classes/StalePolicyGenerationError.html +3 -3
  35. package/docs/api/classes/WorkflowContext.html +7 -9
  36. package/docs/api/functions/classifyServerError.html +1 -1
  37. package/docs/api/functions/mapException.html +1 -1
  38. package/docs/api/hierarchy.html +21 -20
  39. package/docs/api/index.html +38 -2
  40. package/docs/api/interfaces/AdvanceOptions.html +9 -5
  41. package/docs/api/interfaces/AlreadyAppliedOutcome.html +1 -1
  42. package/docs/api/interfaces/AppliedStepOutcome.html +1 -1
  43. package/docs/api/interfaces/CancelOptions.html +12 -8
  44. package/docs/api/interfaces/CompleteOptions.html +12 -8
  45. package/docs/api/interfaces/CompleteOutcome.html +1 -1
  46. package/docs/api/interfaces/ExtendLeaseOptions.html +10 -8
  47. package/docs/api/interfaces/FailOptions.html +12 -8
  48. package/docs/api/interfaces/FailOutcome.html +1 -1
  49. package/docs/api/interfaces/HistoryOptions.html +16 -16
  50. package/docs/api/interfaces/LeaseMutationOptions.html +10 -6
  51. package/docs/api/interfaces/MutateOptions.html +7 -3
  52. package/docs/api/interfaces/NamedValueMutation.html +1 -1
  53. package/docs/api/interfaces/ReadOptions.html +11 -11
  54. package/docs/api/interfaces/RetryOptions.html +12 -8
  55. package/docs/api/interfaces/RetryOutcome.html +1 -1
  56. package/docs/api/interfaces/RunStepsItem.html +3 -3
  57. package/docs/api/interfaces/RunStepsManyOptions.html +11 -11
  58. package/docs/api/interfaces/SearchOptions.html +12 -12
  59. package/docs/api/interfaces/StepContinueOptions.html +15 -11
  60. package/docs/api/interfaces/StepOptions.html +15 -8
  61. package/docs/api/interfaces/StepResult.html +3 -3
  62. package/docs/api/interfaces/TDigestCreateOptions.html +1 -1
  63. package/docs/api/interfaces/TDigestMergeOptions.html +1 -1
  64. package/docs/api/interfaces/TransitionOptions.html +14 -10
  65. package/docs/api/interfaces/TransitionOutcome.html +1 -1
  66. package/docs/api/media/design.md +22 -1
  67. package/docs/api/modules.html +2 -2
  68. package/docs/api/types/ConnectionRequestDisposition.html +1 -1
  69. package/docs/api/types/ManagementPairs.html +1 -1
  70. package/docs/api/types/RequestDisposition.html +1 -1
  71. package/docs/api/types/SearchStateMeta.html +1 -1
  72. package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +1 -1
  73. package/docs/design.md +22 -1
  74. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  <h4 class="tsd-anchor-link" id="deprecated">Deprecated<a href="#deprecated" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Use RequestDisposition; retained for source compatibility.</p>
17
17
  </div></div><aside class="tsd-sources">
18
18
  <ul>
19
- <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/index.ts#L165">src/index.ts:165</a></li></ul></aside></div>
19
+ <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/index.ts#L166">src/index.ts:166</a></li></ul></aside></div>
20
20
  <div class="col-sidebar">
21
21
  <div class="page-menu">
22
22
  <div class="tsd-navigation settings">
@@ -12,7 +12,7 @@
12
12
  <h1>Type Alias ManagementPairs</h1></div>
13
13
  <div class="tsd-signature"><span class="tsd-kind-type-alias">ManagementPairs</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <a href="CommandArgument.html" class="tsd-signature-type tsd-kind-type-alias">CommandArgument</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources">
14
14
  <ul>
15
- <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L375">src/client-options.ts:375</a></li></ul></aside></div>
15
+ <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L385">src/client-options.ts:385</a></li></ul></aside></div>
16
16
  <div class="col-sidebar">
17
17
  <div class="page-menu">
18
18
  <div class="tsd-navigation settings">
@@ -12,7 +12,7 @@
12
12
  <h1>Type Alias RequestDisposition</h1></div>
13
13
  <div class="tsd-signature"><span class="tsd-kind-type-alias">RequestDisposition</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;unsent&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;possibly_sent&quot;</span></div><aside class="tsd-sources">
14
14
  <ul>
15
- <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/errors.ts#L36">src/errors.ts:36</a></li></ul></aside></div>
15
+ <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/errors.ts#L24">src/errors.ts:24</a></li></ul></aside></div>
16
16
  <div class="col-sidebar">
17
17
  <div class="page-menu">
18
18
  <div class="tsd-navigation settings">
@@ -12,7 +12,7 @@
12
12
  <h1>Type Alias SearchStateMeta</h1></div>
13
13
  <div class="tsd-signature"><span class="tsd-kind-type-alias">SearchStateMeta</span><span class="tsd-signature-symbol">:</span> <a href="StateMeta.html" class="tsd-signature-type tsd-kind-type-alias">StateMeta</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <a href="StateMeta.html" class="tsd-signature-type tsd-kind-type-alias">StateMeta</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources">
14
14
  <ul>
15
- <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L368">src/client-options.ts:368</a></li></ul></aside></div>
15
+ <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L378">src/client-options.ts:378</a></li></ul></aside></div>
16
16
  <div class="col-sidebar">
17
17
  <div class="page-menu">
18
18
  <div class="tsd-navigation settings">
@@ -10,7 +10,7 @@
10
10
  <ul class="tsd-breadcrumb" aria-label="Breadcrumb">
11
11
  <li><a href="" aria-current="page">FERRICSTORE_SDK_VERSION</a></li></ul>
12
12
  <h1>Variable FERRICSTORE_SDK_VERSION<code class="tsd-tag">Const</code></h1></div>
13
- <div class="tsd-signature"><span class="tsd-kind-variable">FERRICSTORE_SDK_VERSION</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;0.12.0&quot;</span></div>
13
+ <div class="tsd-signature"><span class="tsd-kind-variable">FERRICSTORE_SDK_VERSION</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;0.13.2&quot;</span></div>
14
14
  <div class="tsd-comment tsd-typography"><p>TypeScript SDK package version.</p>
15
15
  </div><aside class="tsd-sources">
16
16
  <ul>
package/docs/design.md CHANGED
@@ -44,7 +44,28 @@ order.state("created", async (ctx) => {
44
44
  });
45
45
  ```
46
46
 
47
- The handler is just code. The durable result is the `FLOW.TRANSITION` command.
47
+ The handler is just code. Ordinary outcomes become explicit Flow mutations.
48
+ For an operation that needs replayable output, `step()` validates the current
49
+ lease, runs the closure in the caller's JavaScript execution context, and
50
+ atomically stores its result with `FLOW.STEP_CONTINUE`. Recovery reads a
51
+ committed result without rerunning the closure; a closure whose result was not
52
+ committed may run again, so external providers still require stable
53
+ idempotency keys.
54
+
55
+ A timer, signal, approval, or scheduled state is persisted before the current
56
+ claim is released. Waiting therefore does not consume worker concurrency. Once
57
+ the condition becomes runnable, any available worker can claim a fresh lease
58
+ and continue from the durable state; completed durable steps replay their
59
+ stored results instead of running again.
60
+
61
+ `stepContinue()` is retained only as a deprecated low-level migration API.
62
+ Applications should use chainable `advance()` for state-only transitions and
63
+ `step()` for a journaled closure plus transition.
64
+
65
+ The SDK does not use a global executor or thread pool for step closures. It
66
+ awaits the value returned by the caller or worker-owned callback. CPU-bound
67
+ closures therefore need the application's normal Node.js worker-thread or
68
+ service isolation strategy.
48
69
 
49
70
  ## Throughput-Oriented Choices
50
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferricstore/ferricstore",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
4
4
  "description": "TypeScript SDK for FerricStore and FerricFlow",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",