@ferricstore/ferricstore 0.12.2 → 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.
Files changed (110) hide show
  1. package/README.md +45 -3
  2. package/dist/index.cjs +804 -198
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +87 -9
  5. package/dist/index.d.ts +87 -9
  6. package/dist/index.js +798 -194
  7. package/dist/index.js.map +1 -1
  8. package/dist/langgraph.cjs.map +1 -1
  9. package/dist/langgraph.d.cts +1 -1
  10. package/dist/langgraph.d.ts +1 -1
  11. package/dist/langgraph.js.map +1 -1
  12. package/dist/openai-agents.cjs.map +1 -1
  13. package/dist/openai-agents.js.map +1 -1
  14. package/dist/{outcomes-DmBwnq0Y.d.cts → outcomes-CcX956h4.d.cts} +20 -1
  15. package/dist/{outcomes-BbFDp3AH.d.ts → outcomes-DLJYTrX8.d.ts} +20 -1
  16. package/docs/api/assets/hierarchy.js +1 -1
  17. package/docs/api/assets/highlight.css +9 -2
  18. package/docs/api/assets/navigation.js +1 -1
  19. package/docs/api/assets/search.js +1 -1
  20. package/docs/api/classes/ConnectionClosedError.html +5 -5
  21. package/docs/api/classes/FerricStoreClient.html +68 -23
  22. package/docs/api/classes/FerricStoreError.html +2 -1
  23. package/docs/api/classes/FlowAlreadyExistsError.html +3 -3
  24. package/docs/api/classes/FlowBatchError.html +1 -1
  25. package/docs/api/classes/FlowNotFoundError.html +3 -3
  26. package/docs/api/classes/FlowQueryError.html +1 -1
  27. package/docs/api/classes/FlowWrongStateError.html +3 -3
  28. package/docs/api/classes/HTTPTransportError.html +14 -8
  29. package/docs/api/classes/InvalidCommandError.html +3 -3
  30. package/docs/api/classes/LeaseRenewalError.html +3 -3
  31. package/docs/api/classes/LockHeldError.html +3 -3
  32. package/docs/api/classes/LockNotOwnedError.html +3 -3
  33. package/docs/api/classes/NativeAdapter.html +3 -3
  34. package/docs/api/classes/OverloadedError.html +5 -5
  35. package/docs/api/classes/QueueCompletionError.html +1 -1
  36. package/docs/api/classes/RequestNotSentError.html +225 -0
  37. package/docs/api/classes/RequestTimeoutError.html +6 -6
  38. package/docs/api/classes/RerouteError.html +3 -3
  39. package/docs/api/classes/StaleLeaseError.html +3 -3
  40. package/docs/api/classes/StalePolicyGenerationError.html +3 -3
  41. package/docs/api/classes/Workflow.html +19 -19
  42. package/docs/api/classes/WorkflowClient.html +4 -4
  43. package/docs/api/classes/WorkflowContext.html +73 -37
  44. package/docs/api/classes/WorkflowFlowCommands.html +26 -22
  45. package/docs/api/classes/WorkflowWorker.html +6 -6
  46. package/docs/api/functions/classifyServerError.html +1 -1
  47. package/docs/api/functions/complete.html +1 -1
  48. package/docs/api/functions/fail.html +1 -1
  49. package/docs/api/functions/isAlreadyAppliedOutcome.html +41 -0
  50. package/docs/api/functions/isOutcome.html +1 -1
  51. package/docs/api/functions/mapException.html +1 -1
  52. package/docs/api/functions/retry.html +1 -1
  53. package/docs/api/functions/transition.html +1 -1
  54. package/docs/api/hierarchy.html +56 -47
  55. package/docs/api/index.html +32 -4
  56. package/docs/api/interfaces/AdminListOptions.html +1 -1
  57. package/docs/api/interfaces/AdvanceOptions.html +145 -0
  58. package/docs/api/interfaces/AlreadyAppliedOutcome.html +69 -0
  59. package/docs/api/interfaces/AppliedStepOutcome.html +87 -0
  60. package/docs/api/interfaces/CancelOptions.html +13 -9
  61. package/docs/api/interfaces/CompleteOptions.html +13 -9
  62. package/docs/api/interfaces/CompleteOutcome.html +13 -13
  63. package/docs/api/interfaces/CreateManyOptions.html +1 -1
  64. package/docs/api/interfaces/EffectCompensateOptions.html +1 -1
  65. package/docs/api/interfaces/EffectConfirmOptions.html +1 -1
  66. package/docs/api/interfaces/EffectFailOptions.html +1 -1
  67. package/docs/api/interfaces/EffectStatusOptions.html +1 -1
  68. package/docs/api/interfaces/ExtendLeaseOptions.html +10 -8
  69. package/docs/api/interfaces/FailOptions.html +13 -9
  70. package/docs/api/interfaces/FailOutcome.html +13 -13
  71. package/docs/api/interfaces/FerricStoreClientFromUrlOptions.html +1 -1
  72. package/docs/api/interfaces/FerricStoreClientOptions.html +1 -1
  73. package/docs/api/interfaces/FlowQueryCountResult.html +1 -1
  74. package/docs/api/interfaces/FlowQueryIndexBuild.html +1 -1
  75. package/docs/api/interfaces/FlowQueryIndexProgress.html +1 -1
  76. package/docs/api/interfaces/FlowQueryIndexValidation.html +1 -1
  77. package/docs/api/interfaces/FlowQueryRecordsResult.html +1 -1
  78. package/docs/api/interfaces/HistoryOptions.html +16 -16
  79. package/docs/api/interfaces/InvocationCreateOptions.html +1 -1
  80. package/docs/api/interfaces/LeaseMutationOptions.html +11 -7
  81. package/docs/api/interfaces/LimitListOptions.html +1 -1
  82. package/docs/api/interfaces/MutateOptions.html +8 -4
  83. package/docs/api/interfaces/NamedValueMutation.html +9 -9
  84. package/docs/api/interfaces/ReadOptions.html +12 -12
  85. package/docs/api/interfaces/ReclaimOptions.html +1 -1
  86. package/docs/api/interfaces/ReplayedStepResult.html +73 -0
  87. package/docs/api/interfaces/RequestContextOptions.html +1 -1
  88. package/docs/api/interfaces/RetryOptions.html +13 -9
  89. package/docs/api/interfaces/RetryOutcome.html +13 -13
  90. package/docs/api/interfaces/RunStepsItem.html +3 -3
  91. package/docs/api/interfaces/RunStepsManyOptions.html +11 -11
  92. package/docs/api/interfaces/SearchOptions.html +13 -13
  93. package/docs/api/interfaces/StepContinueOptions.html +16 -12
  94. package/docs/api/interfaces/StepOptions.html +166 -0
  95. package/docs/api/interfaces/StepResult.html +67 -0
  96. package/docs/api/interfaces/TDigestCreateOptions.html +1 -1
  97. package/docs/api/interfaces/TDigestMergeOptions.html +1 -1
  98. package/docs/api/interfaces/TransitionOptions.html +15 -11
  99. package/docs/api/interfaces/TransitionOutcome.html +14 -14
  100. package/docs/api/media/design.md +12 -1
  101. package/docs/api/modules.html +8 -8
  102. package/docs/api/types/ConnectionRequestDisposition.html +1 -1
  103. package/docs/api/types/ManagementPairs.html +1 -1
  104. package/docs/api/types/Outcome.html +1 -1
  105. package/docs/api/types/RequestDisposition.html +1 -1
  106. package/docs/api/types/SearchStateMeta.html +1 -1
  107. package/docs/api/types/WorkflowStepResult.html +38 -0
  108. package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +1 -1
  109. package/docs/design.md +12 -1
  110. 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#L162">src/index.ts:162</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#L356">src/client-options.ts:356</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 Outcome</h1></div>
13
13
  <div class="tsd-signature"><span class="tsd-kind-type-alias">Outcome</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/TransitionOutcome.html" class="tsd-signature-type tsd-kind-interface">TransitionOutcome</a> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/CompleteOutcome.html" class="tsd-signature-type tsd-kind-interface">CompleteOutcome</a> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/RetryOutcome.html" class="tsd-signature-type tsd-kind-interface">RetryOutcome</a> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/FailOutcome.html" class="tsd-signature-type tsd-kind-interface">FailOutcome</a></div><aside class="tsd-sources">
14
14
  <ul>
15
- <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/outcomes.ts#L6">src/outcomes.ts:6</a></li></ul></aside></div>
15
+ <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/outcomes.ts#L8">src/outcomes.ts:8</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#L349">src/client-options.ts:349</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">
@@ -0,0 +1,38 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WorkflowStepResult | @ferricstore/ferricstore</title><meta name="description" content="Documentation for @ferricstore/ferricstore"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@ferricstore/ferricstore</a>
3
+ <div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/>
4
+ <ul role="listbox" id="tsd-search-results"></ul>
5
+ <div id="tsd-search-status" aria-live="polite" aria-atomic="true">
6
+ <div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header>
7
+ <div class="container container-main">
8
+ <div class="col-content">
9
+ <div class="tsd-page-title">
10
+ <ul class="tsd-breadcrumb" aria-label="Breadcrumb">
11
+ <li><a href="" aria-current="page">WorkflowStepResult</a></li></ul>
12
+ <h1>Type Alias WorkflowStepResult&lt;TResult&gt;</h1></div>
13
+ <div class="tsd-signature"><span class="tsd-kind-type-alias">WorkflowStepResult</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/AppliedStepOutcome.html" class="tsd-signature-type tsd-kind-interface">AppliedStepOutcome</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#tresult">TResult</a><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/ReplayedStepResult.html" class="tsd-signature-type tsd-kind-interface">ReplayedStepResult</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#tresult">TResult</a><span class="tsd-signature-symbol">&gt;</span></div>
14
+ <div class="tsd-comment tsd-typography"><p>Result of a context durable step, distinguishing a new commit from replay.</p>
15
+ </div>
16
+ <section class="tsd-panel">
17
+ <h4>Type Parameters</h4>
18
+ <ul class="tsd-type-parameter-list">
19
+ <li><span id="tresult"><span class="tsd-kind-type-parameter">TResult</span></span></li></ul></section><aside class="tsd-sources">
20
+ <ul>
21
+ <li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/outcomes.ts#L30">src/outcomes.ts:30</a></li></ul></aside></div>
22
+ <div class="col-sidebar">
23
+ <div class="page-menu">
24
+ <div class="tsd-navigation settings">
25
+ <details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
26
+ <h3>Settings</h3></summary>
27
+ <div class="tsd-accordion-details">
28
+ <div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
29
+ <ul id="tsd-filter-options">
30
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
31
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
32
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div>
33
+ <div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
34
+ <div class="site-menu">
35
+ <nav class="tsd-navigation"><a href="../modules.html">@ferricstore/ferricstore</a>
36
+ <ul class="tsd-small-nested-navigation" id="tsd-nav-container">
37
+ <li>Loading...</li></ul></nav></div></div></div><footer></footer>
38
+ <div class="overlay"></div></body></html>
@@ -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.1&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,18 @@ 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
+ The SDK does not use a global executor or thread pool for step closures. It
56
+ awaits the value returned by the caller or worker-owned callback. CPU-bound
57
+ closures therefore need the application's normal Node.js worker-thread or
58
+ service isolation strategy.
48
59
 
49
60
  ## Throughput-Oriented Choices
50
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferricstore/ferricstore",
3
- "version": "0.12.2",
3
+ "version": "0.13.1",
4
4
  "description": "TypeScript SDK for FerricStore and FerricFlow",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",