@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.
- package/README.md +53 -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 +38 -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 +22 -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 +22 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<ul class="tsd-hierarchy">
|
|
19
19
|
<li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">TransitionOptions</span></li></ul></li></ul></section><aside class="tsd-sources">
|
|
20
20
|
<ul>
|
|
21
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
21
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L266">src/client-options.ts:266</a></li></ul></aside>
|
|
22
22
|
<section class="tsd-panel-group tsd-index-group">
|
|
23
23
|
<section class="tsd-panel tsd-index-panel">
|
|
24
24
|
<details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-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>
|
|
@@ -70,24 +70,28 @@
|
|
|
70
70
|
<div class="tsd-signature"><span class="tsd-kind-property">fencingToken</span><span class="tsd-signature-symbol">:</span> <a href="../types/FencingToken.html" class="tsd-signature-type tsd-kind-type-alias">FencingToken</a></div><aside class="tsd-sources">
|
|
71
71
|
<p>Inherited from <a href="LeaseMutationOptions.html">LeaseMutationOptions</a>.<a href="LeaseMutationOptions.html#fencingtoken">fencingToken</a></p>
|
|
72
72
|
<ul>
|
|
73
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
73
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L253">src/client-options.ts:253</a></li></ul></aside></section>
|
|
74
74
|
<section class="tsd-panel tsd-member">
|
|
75
75
|
<h3 class="tsd-anchor-link" id="fromstate"><span>from<wbr/>State</span><a href="#fromstate" 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></h3>
|
|
76
76
|
<div class="tsd-signature"><span class="tsd-kind-property">fromState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
|
77
77
|
<ul>
|
|
78
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
78
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L267">src/client-options.ts:267</a></li></ul></aside></section>
|
|
79
79
|
<section class="tsd-panel tsd-member tsd-is-inherited">
|
|
80
80
|
<h3 class="tsd-anchor-link" id="leasetoken"><span>lease<wbr/>Token</span><a href="#leasetoken" 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></h3>
|
|
81
81
|
<div class="tsd-signature"><span class="tsd-kind-property">leaseToken</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span></div><aside class="tsd-sources">
|
|
82
82
|
<p>Inherited from <a href="LeaseMutationOptions.html">LeaseMutationOptions</a>.<a href="LeaseMutationOptions.html#leasetoken">leaseToken</a></p>
|
|
83
83
|
<ul>
|
|
84
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
84
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L252">src/client-options.ts:252</a></li></ul></aside></section>
|
|
85
85
|
<section class="tsd-panel tsd-member tsd-is-inherited">
|
|
86
86
|
<h3 class="tsd-anchor-link" id="nowms"><code class="tsd-tag">Optional</code><span>now<wbr/>Ms</span><a href="#nowms" 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></h3>
|
|
87
|
-
<div class="tsd-signature"><span class="tsd-kind-property">nowMs</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div
|
|
87
|
+
<div class="tsd-signature"><span class="tsd-kind-property">nowMs</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div>
|
|
88
|
+
<div class="tsd-comment tsd-typography"><p>Explicit client-supplied command timestamp. Omit in production so each
|
|
89
|
+
request samples the current client wall clock; primarily useful for tests.
|
|
90
|
+
This is not the server response time or the client transport deadline.</p>
|
|
91
|
+
</div><aside class="tsd-sources">
|
|
88
92
|
<p>Inherited from <a href="LeaseMutationOptions.html">LeaseMutationOptions</a>.<a href="LeaseMutationOptions.html#nowms">nowMs</a></p>
|
|
89
93
|
<ul>
|
|
90
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
94
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L247">src/client-options.ts:247</a></li></ul></aside></section>
|
|
91
95
|
<section class="tsd-panel tsd-member tsd-is-inherited">
|
|
92
96
|
<h3 class="tsd-anchor-link" id="overridevalues"><code class="tsd-tag">Optional</code><span>override<wbr/>Values</span><a href="#overridevalues" 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></h3>
|
|
93
97
|
<div class="tsd-signature"><span class="tsd-kind-property">overrideValues</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources">
|
|
@@ -110,18 +114,18 @@
|
|
|
110
114
|
<h3 class="tsd-anchor-link" id="priority"><code class="tsd-tag">Optional</code><span>priority</span><a href="#priority" 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></h3>
|
|
111
115
|
<div class="tsd-signature"><span class="tsd-kind-property">priority</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
112
116
|
<ul>
|
|
113
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
117
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L270">src/client-options.ts:270</a></li></ul></aside></section>
|
|
114
118
|
<section class="tsd-panel tsd-member tsd-is-inherited">
|
|
115
119
|
<h3 class="tsd-anchor-link" id="returnrecord"><code class="tsd-tag">Optional</code><span>return<wbr/>Record</span><a href="#returnrecord" 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></h3>
|
|
116
120
|
<div class="tsd-signature"><span class="tsd-kind-property">returnRecord</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources">
|
|
117
121
|
<p>Inherited from <a href="LeaseMutationOptions.html">LeaseMutationOptions</a>.<a href="LeaseMutationOptions.html#returnrecord">returnRecord</a></p>
|
|
118
122
|
<ul>
|
|
119
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
123
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L248">src/client-options.ts:248</a></li></ul></aside></section>
|
|
120
124
|
<section class="tsd-panel tsd-member">
|
|
121
125
|
<h3 class="tsd-anchor-link" id="runatms"><code class="tsd-tag">Optional</code><span>run<wbr/>At<wbr/>Ms</span><a href="#runatms" 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></h3>
|
|
122
126
|
<div class="tsd-signature"><span class="tsd-kind-property">runAtMs</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
123
127
|
<ul>
|
|
124
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
128
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L269">src/client-options.ts:269</a></li></ul></aside></section>
|
|
125
129
|
<section class="tsd-panel tsd-member tsd-is-inherited">
|
|
126
130
|
<h3 class="tsd-anchor-link" id="statemeta"><code class="tsd-tag">Optional</code><span>state<wbr/>Meta</span><a href="#statemeta" 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></h3>
|
|
127
131
|
<div class="tsd-signature"><span class="tsd-kind-property">stateMeta</span><span class="tsd-signature-symbol">?:</span> <a href="../types/StateMeta.html" class="tsd-signature-type tsd-kind-type-alias">StateMeta</a></div><aside class="tsd-sources">
|
|
@@ -132,7 +136,7 @@
|
|
|
132
136
|
<h3 class="tsd-anchor-link" id="tostate"><span>to<wbr/>State</span><a href="#tostate" 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></h3>
|
|
133
137
|
<div class="tsd-signature"><span class="tsd-kind-property">toState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
|
|
134
138
|
<ul>
|
|
135
|
-
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#
|
|
139
|
+
<li>Defined in <a href="https://github.com/ferricstore/ferricstore-typescript/blob/main/client-options.ts#L268">src/client-options.ts:268</a></li></ul></aside></section>
|
|
136
140
|
<section class="tsd-panel tsd-member tsd-is-inherited">
|
|
137
141
|
<h3 class="tsd-anchor-link" id="valuerefs"><code class="tsd-tag">Optional</code><span>value<wbr/>Refs</span><a href="#valuerefs" 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></h3>
|
|
138
142
|
<div class="tsd-signature"><span class="tsd-kind-property">valueRefs</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources">
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<li><a href="" aria-current="page">TransitionOutcome</a></li></ul>
|
|
12
12
|
<h1>Interface TransitionOutcome</h1></div>
|
|
13
13
|
<div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">TransitionOutcome</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#attributesdelete">attributesDelete</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#attributesmerge">attributesMerge</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <a href="../types/CommandArgument.html" class="tsd-signature-type tsd-kind-type-alias">CommandArgument</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#dropvalues">dropValues</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#kind">kind</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"transition"</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#overridevalues">overrideValues</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#payload">payload</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#priority">priority</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#runatms">runAtMs</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#statemeta">stateMeta</a><span class="tsd-signature-symbol">?:</span> <a href="../types/StateMeta.html" class="tsd-signature-type tsd-kind-type-alias">StateMeta</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#tostate">toState</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#valuerefs">valueRefs</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#values">values</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div>
|
|
14
|
-
<section class="tsd-panel tsd-hierarchy" data-refl="
|
|
14
|
+
<section class="tsd-panel tsd-hierarchy" data-refl="2872">
|
|
15
15
|
<h4>Hierarchy (<a href="../hierarchy.html#TransitionOutcome">View Summary</a>)</h4>
|
|
16
16
|
<ul class="tsd-hierarchy">
|
|
17
17
|
<li class="tsd-hierarchy-item"><a href="NamedValueMutation.html" class="tsd-signature-type tsd-kind-interface">NamedValueMutation</a>
|
package/docs/api/media/design.md
CHANGED
|
@@ -44,7 +44,28 @@ order.state("created", async (ctx) => {
|
|
|
44
44
|
});
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
The handler is just code.
|
|
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
|
|