@voltro/workflow 0.82.0 → 0.83.0
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/CHANGELOG.md +286 -0
- package/dist/{cluster-MboOAwcv.js → cluster-NnChVZoK.js} +9 -9
- package/dist/cluster.d.ts +7 -4
- package/dist/cluster.js +1 -1
- package/dist/{clusterDiagnostics-Dc7yBP3b.js → clusterDiagnostics-CGUtnJkX.js} +145 -130
- package/dist/clusterTestSuite.d.ts +1 -1
- package/dist/clusterTestSuite.js +2 -2
- package/dist/index.d.ts +17 -0
- package/dist/index.js +3 -3
- package/dist/{src-BAN5Xovf.js → src--sCbH8Fs.js} +656 -655
- package/package.json +4 -4
|
@@ -130,7 +130,7 @@ declare interface WorkflowEngineLayerOptions {
|
|
|
130
130
|
* the cluster's accounting clean.
|
|
131
131
|
*/
|
|
132
132
|
readonly sqlClientLayer: Layer.Layer<SqlClient.SqlClient, ConfigError.ConfigError | SqlError.SqlError, never>;
|
|
133
|
-
/**
|
|
133
|
+
/** SQL ownership for shared primaries; memory for local/embedded stores. */
|
|
134
134
|
readonly runnerStorage: RunnerStorage;
|
|
135
135
|
/**
|
|
136
136
|
* The resolved dialect id (`postgres` / `mysql` / `mariadb` / `mssql` /
|
package/dist/clusterTestSuite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { F as e, R as t, S as n, g as r, v as i } from "./primitives-Btjhjm8P.js";
|
|
2
2
|
import { E as a, a as o } from "./journalEncryption--n5VDdYO.js";
|
|
3
|
-
import { C as s, r as c, w as l } from "./src
|
|
4
|
-
import { t as u, u as d } from "./cluster-
|
|
3
|
+
import { C as s, r as c, w as l } from "./src--sCbH8Fs.js";
|
|
4
|
+
import { t as u, u as d } from "./cluster-NnChVZoK.js";
|
|
5
5
|
import { Cause as f, Cron as p, Deferred as m, Effect as h, Fiber as g, Layer as _, Schema as v } from "effect";
|
|
6
6
|
import { SqlClient as y } from "@effect/sql";
|
|
7
7
|
import { afterEach as b, beforeAll as x, describe as S, expect as C, test as w } from "vitest";
|
package/dist/index.d.ts
CHANGED
|
@@ -2421,6 +2421,16 @@ export declare const readWorkflowRestartObservationInTransaction: (tx: Admission
|
|
|
2421
2421
|
/** Strict lookup shared by receipt owners; a malformed receipt is not absent. */
|
|
2422
2422
|
export declare const readWorkflowStartReceipt: (store: Pick<DataStore, "query">, id: string) => Promise<WorkflowStartReceipt | undefined>;
|
|
2423
2423
|
|
|
2424
|
+
/** Observe an immutable operator request before allocating another pending intent.
|
|
2425
|
+
* Call inside the resident admission transaction. Old unbound receipts cannot
|
|
2426
|
+
* be adopted by a new request, even when their workflow and tenant match. */
|
|
2427
|
+
export declare const readWorkflowStartRequest: (store: Pick<DataStore, "query">, input: {
|
|
2428
|
+
readonly id: string;
|
|
2429
|
+
readonly workflowName: string;
|
|
2430
|
+
readonly tenantId: string | null;
|
|
2431
|
+
readonly requestFingerprint: string;
|
|
2432
|
+
}) => Promise<WorkflowStartReceipt | undefined>;
|
|
2433
|
+
|
|
2424
2434
|
declare const ReceiptSchema: Schema.filter<Schema.Struct<{
|
|
2425
2435
|
id: typeof Schema.String;
|
|
2426
2436
|
workflowName: typeof Schema.String;
|
|
@@ -2447,6 +2457,7 @@ declare const ReceiptSchema: Schema.filter<Schema.Struct<{
|
|
|
2447
2457
|
at: typeof Schema.Number;
|
|
2448
2458
|
failureId: typeof Schema.NonEmptyString;
|
|
2449
2459
|
}>]>>;
|
|
2460
|
+
requestFingerprint: Schema.optional<Schema.NullOr<Schema.filter<typeof Schema.String>>>;
|
|
2450
2461
|
}>>;
|
|
2451
2462
|
|
|
2452
2463
|
/** Reconcile under the resident admission lock. Only a terminal pre-admission
|
|
@@ -4404,6 +4415,12 @@ export declare interface WorkflowSingleton<Payload> {
|
|
|
4404
4415
|
|
|
4405
4416
|
export declare type WorkflowStartReceipt = typeof ReceiptSchema.Type;
|
|
4406
4417
|
|
|
4418
|
+
/** Reusing a start identity must never overwrite or admit a different request. */
|
|
4419
|
+
export declare class WorkflowStartRequestConflictError extends Error {
|
|
4420
|
+
readonly _tag = "WorkflowStartRequestConflictError";
|
|
4421
|
+
constructor();
|
|
4422
|
+
}
|
|
4423
|
+
|
|
4407
4424
|
export declare type WorkflowStartResolution = {
|
|
4408
4425
|
readonly kind: 'pending';
|
|
4409
4426
|
} | {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, M as d, O as f, P as p, R as m, S as h, T as g, U as _, V as v, W as y, X as b, Y as x, Z as S, _ as C, a as w, b as T, c as E, d as D, f as O, g as k, h as A, i as j, j as M, k as N, l as P, m as F, n as I, o as L, p as R, q as z, r as B, s as V, t as H, u as U, v as W, w as G, x as K, y as q, z as J } from "./primitives-Btjhjm8P.js";
|
|
2
2
|
import { D as Y, E as X, S as Z, _ as Q, c as $, g as ee, h as te, l as ne, m as re, n as ie, o as ae, r as oe, v as se } from "./journalEncryption--n5VDdYO.js";
|
|
3
|
-
import { $ as ce, A as le, B as ue, C as de, Ct as fe, D as pe, E as me, Et as he, F as ge, G as _e, H as ve, I as ye, J as be, K as xe, L as Se, M as Ce, N as we, O as Te, P as Ee, Q as De, R as Oe, S as ke, St as Ae, T as je, Tt as Me, U as Ne, V as Pe, W as Fe, X as Ie, Y as Le, Z as Re, _ as ze, _t as Be, a as Ve, at as He, b as Ue, bt as We, c as Ge, ct as Ke, d as qe, dt as Je, et as Ye, f as Xe, ft as Ze, g as Qe, gt as $e, h as et, ht as tt, i as nt, it as rt, j as it, k as at, l as ot, lt as st, m as ct, mt as lt, n as ut, nt as dt, o as ft, ot as pt, p as mt, pt as ht, q as gt, r as _t, rt as vt, s as yt, st as bt, t as xt, tt as St, u as Ct, ut as wt, v as Tt, vt as Et, w as Dt, wt as Ot, x as kt, xt as At, y as jt, yt as Mt, z as Nt } from "./src
|
|
4
|
-
import { $ as Pt, A as Ft,
|
|
5
|
-
export { Ft as ADMISSIONS_TABLE,
|
|
3
|
+
import { $ as ce, A as le, B as ue, C as de, Ct as fe, D as pe, E as me, Et as he, F as ge, G as _e, H as ve, I as ye, J as be, K as xe, L as Se, M as Ce, N as we, O as Te, P as Ee, Q as De, R as Oe, S as ke, St as Ae, T as je, Tt as Me, U as Ne, V as Pe, W as Fe, X as Ie, Y as Le, Z as Re, _ as ze, _t as Be, a as Ve, at as He, b as Ue, bt as We, c as Ge, ct as Ke, d as qe, dt as Je, et as Ye, f as Xe, ft as Ze, g as Qe, gt as $e, h as et, ht as tt, i as nt, it as rt, j as it, k as at, l as ot, lt as st, m as ct, mt as lt, n as ut, nt as dt, o as ft, ot as pt, p as mt, pt as ht, q as gt, r as _t, rt as vt, s as yt, st as bt, t as xt, tt as St, u as Ct, ut as wt, v as Tt, vt as Et, w as Dt, wt as Ot, x as kt, xt as At, y as jt, yt as Mt, z as Nt } from "./src--sCbH8Fs.js";
|
|
4
|
+
import { $ as Pt, A as Ft, B as It, Bt as Lt, D as Rt, Dt as zt, F as Bt, Ft as Vt, G as Ht, Gt as Ut, H as Wt, Ht as Gt, J as Kt, K as qt, Kt as Jt, L as Yt, Lt as Xt, M as Zt, Mt as Qt, N as $t, Ot as en, P as tn, Q as nn, R as rn, Rt as an, St as on, Tt as sn, U as cn, Ut as ln, Vt as un, W as dn, Wt as fn, X as pn, Y as mn, Z as hn, _t as gn, at as _n, b as vn, bt as yn, ct as bn, d as xn, dt as Sn, et as Cn, f as wn, ht as Tn, j as En, kt as Dn, lt as On, mt as kn, n as An, nt as jn, o as Mn, ot as Nn, q as Pn, qt as Fn, r as In, t as Ln, u as Rn, ut as zn, wt as Bn, x as Vn, xt as Hn, y as Un, z as Wn, zt as Gn } from "./clusterDiagnostics-CGUtnJkX.js";
|
|
5
|
+
export { Ft as ADMISSIONS_TABLE, kn as ADMISSION_SUBMISSION_ID_PREFIX, Xe as BUDGET_HOLDS_TABLE, mt as BudgetHoldExpired, _e as CANCEL_ON_WATERMARK, Ln as CLUSTER_REREAD_WINDOW_MS, An as ClusterDiagnostics, d as CurrentWorkflowExecutionId, p as CurrentWorkflowPatches, G as CurrentWorkflowReplayShape, a as CurrentWorkflowRunId, c as CurrentWorkflowStep, ct as DEFAULT_BUDGET_HOLD_TIMEOUT_MS, xe as DEFAULT_COLD_LOOKBACK_MS, Se as DEFAULT_DRAIN_BATCH, gt as DEFAULT_EVENT_BATCH, En as DEFAULT_LEASE_MS, xt as DEFAULT_MAX_RUN_RECLAIMS, ut as DEFAULT_REPLAY_SHAPE_LIMIT, Pe as DEFAULT_STALL_AFTER_MS, ve as DEFAULT_STALL_EVENT_LOOKBACK, Ne as DEFAULT_STALL_RUN_PAGE, Ce as DEFAULT_SUSPEND_HINT_MS, f as DEFAULT_WORKFLOW_SCHEDULE_MAX_RUNTIME_MS, _ as DEFERRING_CONTROLS, be as EVENTS_TABLE, Gn as FlowControlKeyError, Zt as PAUSES_TABLE, $t as PENDING_TABLE, ie as STEP_JOURNAL_BINDING, Le as WATERMARKS_TABLE, oe as WORKFLOW_JOURNAL_BINDING, H as WorkflowFlowControlProperty, I as WorkflowMessagesProperty, m as WorkflowRunRecorder, N as WorkflowScheduleProperty, _n as WorkflowStartRequestConflictError, J as WorkflowStepInterceptorTag, B as WorkflowVersionTypeId, j as WorkflowWorkerLayerTypeId, et as _voltroBudgetHoldsTable, ht as _voltroWorkflowAdmissionLocksTable, lt as _voltroWorkflowAdmissionsTable, tt as _voltroWorkflowControlRequestsTable, $e as _voltroWorkflowFailureReportsTable, Be as _voltroWorkflowParentClosuresTable, Et as _voltroWorkflowPausesTable, Mt as _voltroWorkflowPendingTable, fe as _voltroWorkflowRunEventsTable, Ot as _voltroWorkflowRunStepsTable, Me as _voltroWorkflowRunsTable, Ae as _voltroWorkflowStartContextsTable, We as _voltroWorkflowStartReceiptsTable, At as _voltroWorkflowSubmissionsTable, St as _voltroWorkflowWatermarksTable, Oe as acceptAdmissionSubmission, Un as acceptWorkflowControlInTransaction, Tn as acknowledgeAdmissionSubmission, dt as admitStart, tn as allIntents, y as assertConsistentPools, x as attachPreparedWorkflowExecution, le as awaitEvent, it as awaitSignal, de as awaitSignalSuspending, qe as awaitUpdate, gn as beginAdmissionSubmissionDispatchInTransaction, vn as beginWorkflowControlDispatchInTransaction, Vn as bindWorkflowResumeJournalInTransaction, Nn as bindWorkflowStartReceipts, Qe as budgetHoldGeneration, ze as budgetHoldKey, Tt as budgetHoldSignalName, pt as cancelQueuedWorkflowStartInTransaction, st as cancelSuspendedWorkflowRunInTransaction, Lt as comparePendingOrder, Dt as completeSuspendingSignal, wt as completeWorkflowRunGenerationInTransaction, t as currentWorkflowStep, Bt as deadLetterIntent, un as decideAdmission, o as deferringControlsOf, Yt as deleteIntent, In as describeStalledRun, rn as discardIntent, Wn as discardIntentInTransaction, Nt as drainTick, It as dueIntents, w as durableClock, L as durableQueue, V as durableQueueModule, E as durableRateLimiterModule, Je as enterWorkflowRunGenerationInTransaction, Wt as evaluateAdmission, b as executePreparedWorkflow, v as getCurrentWorkflowExecutionId, s as getCurrentWorkflowRunId, P as getWorkflowFlowControl, ae as getWorkflowJournalCipher, e as getWorkflowSchedule, U as getWorkflowVersionMetadata, Qt as handoffWorkflowFailureInTransaction, u as hasCancelOn, z as hasFlowControl, S as hasPreparedWorkflowExecution, jt as heldBudgets, he as inMemoryWorkflowEngineLayer, Ct as inspectWorkflow, Gt as isFinishExpired, $ as isSealedJournalValue, ln as isStartExpired, ue as isUnacknowledgedSubmission, ne as isWorkflowEncrypted, D as isWorkflowWorkerLayer, vt as linkExecution, ot as makeInMemoryRecorder, g as makeReplayShapeTracker, _t as makeWorkflowRunRecorder, me as makeWorkflowUpdateId, we as maybeHintSuspendingSignal, yn as newAdmissionSubmissionId, ce as newestEventAt, fn as nextSlotAt, i as nondeterminismEventPayload, nt as normaliseWorkflowPatches, Hn as noteAdmissionSubmissionFailure, cn as noteIntentAttempt, re as openErrorText, te as openEventPayload, ee as openJournalValue, Q as openPayloadFields, se as openWorkflowRow, dn as parkDelayedStart, O as patch, Ht as pauseWorkflow, on as pendingAdmissionSubmissions, Ue as pendingBudgetHolds, qt as pendingSlotId, Pn as pendingWindow, Kt as persistDefer, Ye as planCancellations, Ut as pooledConcurrencyKey, Bn as prepareAdmissionSubmissionExecutionInTransaction, R as processQueue, mn as pruneAdmissions, F as queueWorker, Ke as queuedCancellationRequestsTable, A as rateLimit, pn as readAdmissionState, sn as readAdmissionSubmission, hn as readPausedWorkflows, bt as readQueuedWorkflowCancellationInTransaction, Ie as readWatermark, Rt as readWorkflowControlInTransaction, Xt as readWorkflowFailureRecord, Mn as readWorkflowRestartObservationInTransaction, bn as readWorkflowStartReceipt, On as readWorkflowStartRequest, Vt as reconcileWorkflowFailureInTransaction, nn as recordAdmission, an as recordWorkflowFailureInTransaction, zn as recordWorkflowStartReceipt, zt as rejectAdmissionSubmissionInTransaction, kt as releaseBudgetHolds, Pt as releaseLease, r as reportNondeterminism, en as reserveAdmissionSubmission, Dn as reserveAdmissionSubmissionInTransaction, Ee as resetSuspendHintsForTest, Jt as resolveAdmissionKeys, Ve as resolveRunGuardTuning, ge as resolveSuspendHintMs, pe as resolveWorkflowMessageRun, Sn as resolveWorkflowStartReceipt, Cn as resumeWorkflow, jn as retryDeadLetterIntent, Z as sealJournalValue, Te as sendWorkflowSignal, at as sendWorkflowUpdate, ft as serialiseWorkflowRowForWire, ye as setSuspendSignalHintMs, X as setWorkflowJournalCipher, k as sleep, C as sleepUntil, Ze as stageWorkflowParentClosureInTransaction, W as step, q as stepIdempotencyKey, T as stepModule, ke as suspendForBudget, je as suspendingSignalDeferredName, Re as sweepCancelOn, Fe as sweepStalledRuns, rt as takeAdmittedSubmissionInTransaction, He as takePendingAdmissionSubmission, yt as truncateWorkflowValue, Y as tryOpenJournalValue, l as validateFlowControl, M as validateWorkflowSchedule, Fn as withAdmissionTransaction, K as withCompensation, Rn as withdrawWorkflowRestartInTransaction, h as workflow, n as workflowModule, xn as workflowRestartRequestsTable, wn as workflowRestartWithdrawalsTable, Ge as wrapWorkflowExecuteWithRunRecording, De as writeWatermark };
|