@voltro/runtime 0.84.0 → 0.85.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 +549 -0
- package/THIRD-PARTY-NOTICES.md +71 -525
- package/dist/index.d.ts +164 -164
- package/dist/index.js +4748 -3861
- package/package.json +10 -13
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { AnyGuardSpec } from '@voltro/protocol';
|
|
|
4
4
|
import { AuthMiddleware } from '@voltro/protocol';
|
|
5
5
|
import { AuthStrategy } from '@voltro/protocol';
|
|
6
6
|
import { CaughtUpVerdict } from '@voltro/database';
|
|
7
|
+
import { Cause } from 'effect';
|
|
7
8
|
import { ChangeEvent } from '@voltro/database';
|
|
8
9
|
import { classifyConstraintViolation } from '@voltro/database';
|
|
9
10
|
import { clearRetentions } from '@voltro/database';
|
|
@@ -42,7 +43,7 @@ import { FieldBinding } from '@voltro/database';
|
|
|
42
43
|
import { FieldCipher } from '@voltro/database';
|
|
43
44
|
import { FieldDefinitions } from '@voltro/database';
|
|
44
45
|
import * as http from 'node:http';
|
|
45
|
-
import { HttpClient } from '
|
|
46
|
+
import { HttpClient } from 'effect/http';
|
|
46
47
|
import { HttpRequestInterceptor } from '@voltro/protocol';
|
|
47
48
|
import { HttpRouteObserver } from '@voltro/protocol';
|
|
48
49
|
import { IdempotencyStore } from '@voltro/protocol';
|
|
@@ -66,7 +67,6 @@ import { listRetentionConflicts } from '@voltro/database';
|
|
|
66
67
|
import { listRetentions } from '@voltro/database';
|
|
67
68
|
import { Membership } from '@voltro/protocol';
|
|
68
69
|
import { Metric } from 'effect';
|
|
69
|
-
import { MetricBoundaries } from 'effect';
|
|
70
70
|
import { MetricReader } from '@opentelemetry/sdk-metrics';
|
|
71
71
|
import { MutationIdempotencyScope } from '@voltro/protocol';
|
|
72
72
|
import { NoRowFound } from '@voltro/protocol';
|
|
@@ -91,8 +91,8 @@ import { retentionTtlMsFromEnv } from '@voltro/database';
|
|
|
91
91
|
import { Row } from '@voltro/database';
|
|
92
92
|
import { RowKey } from '@voltro/database';
|
|
93
93
|
import { RowPatch } from '@voltro/protocol';
|
|
94
|
-
import { Rpc } from '
|
|
95
|
-
import { RpcGroup } from '
|
|
94
|
+
import { Rpc } from 'effect/rpc';
|
|
95
|
+
import { RpcGroup } from 'effect/rpc';
|
|
96
96
|
import { RpcInterceptor } from '@voltro/protocol';
|
|
97
97
|
import { RuleReadStore } from '@voltro/database';
|
|
98
98
|
import { Sampler } from '@opentelemetry/sdk-trace-base';
|
|
@@ -104,7 +104,7 @@ import { ServerOnlyColumnWrite } from '@voltro/protocol';
|
|
|
104
104
|
import { ServerResponse } from 'node:http';
|
|
105
105
|
import { SpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
106
106
|
import { spawn } from 'node:child_process';
|
|
107
|
-
import { SqlClient } from '
|
|
107
|
+
import { SqlClient } from 'effect/sql';
|
|
108
108
|
import { StoredTableShape } from '@voltro/database';
|
|
109
109
|
import { StoreError } from '@voltro/protocol';
|
|
110
110
|
import { StoreOperationFailed } from '@voltro/protocol';
|
|
@@ -145,19 +145,18 @@ import { WorkflowRunHandle } from '@voltro/protocol';
|
|
|
145
145
|
import { WorkflowRunSnapshot as WorkflowRunSnapshot_2 } from '@voltro/protocol';
|
|
146
146
|
import { WorkflowStartResolution } from '@voltro/workflow';
|
|
147
147
|
import { WorkflowUpdateResult } from '@voltro/protocol';
|
|
148
|
+
import { YieldableError } from 'effect/Cause';
|
|
148
149
|
|
|
149
150
|
/** Typed denial — declare on an rpc `error:` union so a refusal surfaces to the
|
|
150
151
|
* client typed + pattern-matchable (never a bare 500). */
|
|
151
152
|
export declare class AccessDenied extends AccessDenied_base {
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
declare const AccessDenied_base: Schema.
|
|
155
|
-
readonly
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
resourceId: typeof Schema.String;
|
|
160
|
-
}>;
|
|
155
|
+
declare const AccessDenied_base: Schema.Class<AccessDenied, Schema.TaggedStruct<"AccessDenied", {
|
|
156
|
+
readonly action: Schema.String;
|
|
157
|
+
readonly resourceType: Schema.String;
|
|
158
|
+
readonly resourceId: Schema.String;
|
|
159
|
+
}>, YieldableError>;
|
|
161
160
|
|
|
162
161
|
/**
|
|
163
162
|
* Exported so the rpc boundary can stamp `ChangeEvent.subjectId` with the SAME
|
|
@@ -374,13 +373,11 @@ declare class AggregateError_2 extends AggregateError_base {
|
|
|
374
373
|
}
|
|
375
374
|
export { AggregateError_2 as AggregateError }
|
|
376
375
|
|
|
377
|
-
declare const AggregateError_base: Schema.
|
|
378
|
-
readonly
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
cause: typeof Schema.String;
|
|
383
|
-
}>;
|
|
376
|
+
declare const AggregateError_base: Schema.Class<AggregateError_2, Schema.TaggedStruct<"AggregateError", {
|
|
377
|
+
readonly name: Schema.String;
|
|
378
|
+
readonly operation: Schema.String;
|
|
379
|
+
readonly cause: Schema.String;
|
|
380
|
+
}>, YieldableError>;
|
|
384
381
|
|
|
385
382
|
export declare type AggregateFailure = AggregateStale | AggregateNotFound | AggregateError_2;
|
|
386
383
|
|
|
@@ -403,7 +400,10 @@ export declare interface AggregateHandle<Row> {
|
|
|
403
400
|
export declare class AggregateMaintainer {
|
|
404
401
|
private readonly shape;
|
|
405
402
|
private state;
|
|
403
|
+
private extrema;
|
|
406
404
|
private readonly groups;
|
|
405
|
+
private readonly positions;
|
|
406
|
+
private nextPosition;
|
|
407
407
|
constructor(shape: AggregateShape);
|
|
408
408
|
/** Seed from the full base row-set (boot / after a rescan-from-scratch). */
|
|
409
409
|
seed(baseRows: ReadonlyArray<Row_4>): void;
|
|
@@ -414,6 +414,11 @@ export declare class AggregateMaintainer {
|
|
|
414
414
|
applyChange(delta: CdcDelta): ReadonlyArray<string>;
|
|
415
415
|
/** Rebuild the flagged groups from the current base rows (min/max recovery). */
|
|
416
416
|
resolveRescan(rescanGroups: ReadonlyArray<string>, baseRows: ReadonlyArray<Row_4>): void;
|
|
417
|
+
/** Read only the requested live groups, with insertion-order identities.
|
|
418
|
+
* A group deleted and reinserted receives a new position, matching materialize. */
|
|
419
|
+
materializeGroups(keys: ReadonlyArray<string>): ReadonlyArray<MaintainedGroup & {
|
|
420
|
+
readonly rowIndex: number;
|
|
421
|
+
}>;
|
|
417
422
|
/** The current materialized result — one entry per non-empty group. */
|
|
418
423
|
materialize(): ReadonlyArray<MaintainedGroup>;
|
|
419
424
|
private groupValues;
|
|
@@ -440,11 +445,9 @@ export declare interface AggregateMeta {
|
|
|
440
445
|
export declare class AggregateNotFound extends AggregateNotFound_base {
|
|
441
446
|
}
|
|
442
447
|
|
|
443
|
-
declare const AggregateNotFound_base: Schema.
|
|
444
|
-
readonly
|
|
445
|
-
}
|
|
446
|
-
name: typeof Schema.String;
|
|
447
|
-
}>;
|
|
448
|
+
declare const AggregateNotFound_base: Schema.Class<AggregateNotFound, Schema.TaggedStruct<"AggregateNotFound", {
|
|
449
|
+
readonly name: Schema.String;
|
|
450
|
+
}>, YieldableError>;
|
|
448
451
|
|
|
449
452
|
export declare interface AggregateQuery {
|
|
450
453
|
readonly event: string;
|
|
@@ -522,7 +525,7 @@ export declare type AggregateRefreshPolicy = string | {
|
|
|
522
525
|
export declare class AggregateRegistry extends AggregateRegistry_base {
|
|
523
526
|
}
|
|
524
527
|
|
|
525
|
-
declare const AggregateRegistry_base: Context.
|
|
528
|
+
declare const AggregateRegistry_base: Context.ServiceClass<AggregateRegistry, "@voltro/AggregateRegistry", {
|
|
526
529
|
/** Resolve a typed handle from the definition. The cli registers
|
|
527
530
|
* every discovered aggregate at boot; calling this with an unknown
|
|
528
531
|
* def returns a handle whose methods all fail with
|
|
@@ -548,13 +551,11 @@ export declare interface AggregateShape {
|
|
|
548
551
|
export declare class AggregateStale extends AggregateStale_base {
|
|
549
552
|
}
|
|
550
553
|
|
|
551
|
-
declare const AggregateStale_base: Schema.
|
|
552
|
-
readonly
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
maxAgeMs: typeof Schema.Number;
|
|
557
|
-
}>;
|
|
554
|
+
declare const AggregateStale_base: Schema.Class<AggregateStale, Schema.TaggedStruct<"AggregateStale", {
|
|
555
|
+
readonly name: Schema.String;
|
|
556
|
+
readonly ageMs: Schema.Number;
|
|
557
|
+
readonly maxAgeMs: Schema.Number;
|
|
558
|
+
}>, YieldableError>;
|
|
558
559
|
|
|
559
560
|
export declare interface AnalyticsBucket {
|
|
560
561
|
readonly bucketStart: Date;
|
|
@@ -570,12 +571,10 @@ export declare interface AnalyticsBucket {
|
|
|
570
571
|
export declare class AnalyticsCapabilityNotSupported extends AnalyticsCapabilityNotSupported_base {
|
|
571
572
|
}
|
|
572
573
|
|
|
573
|
-
declare const AnalyticsCapabilityNotSupported_base: Schema.
|
|
574
|
-
readonly
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
capability: typeof Schema.String;
|
|
578
|
-
}>;
|
|
574
|
+
declare const AnalyticsCapabilityNotSupported_base: Schema.Class<AnalyticsCapabilityNotSupported, Schema.TaggedStruct<"AnalyticsCapabilityNotSupported", {
|
|
575
|
+
readonly provider: Schema.String;
|
|
576
|
+
readonly capability: Schema.String;
|
|
577
|
+
}>, YieldableError>;
|
|
579
578
|
|
|
580
579
|
/**
|
|
581
580
|
* The underlying sink raised an error. `cause` is stringified for
|
|
@@ -584,13 +583,11 @@ declare const AnalyticsCapabilityNotSupported_base: Schema.TaggedErrorClass<Anal
|
|
|
584
583
|
export declare class AnalyticsError extends AnalyticsError_base {
|
|
585
584
|
}
|
|
586
585
|
|
|
587
|
-
declare const AnalyticsError_base: Schema.
|
|
588
|
-
readonly
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
cause: typeof Schema.String;
|
|
593
|
-
}>;
|
|
586
|
+
declare const AnalyticsError_base: Schema.Class<AnalyticsError, Schema.TaggedStruct<"AnalyticsError", {
|
|
587
|
+
readonly provider: Schema.String;
|
|
588
|
+
readonly operation: Schema.String;
|
|
589
|
+
readonly cause: Schema.String;
|
|
590
|
+
}>, YieldableError>;
|
|
594
591
|
|
|
595
592
|
/**
|
|
596
593
|
* One analytics event. `properties` must be JSON-serialisable —
|
|
@@ -788,7 +785,7 @@ export declare interface AnalyticsMirrorUpsert {
|
|
|
788
785
|
export declare class AnalyticsSink extends AnalyticsSink_base {
|
|
789
786
|
}
|
|
790
787
|
|
|
791
|
-
declare const AnalyticsSink_base: Context.
|
|
788
|
+
declare const AnalyticsSink_base: Context.ServiceClass<AnalyticsSink, "@voltro/AnalyticsSink", AnalyticsSinkImpl>;
|
|
792
789
|
|
|
793
790
|
/**
|
|
794
791
|
* The runtime contract every analytics provider implements. Plugins
|
|
@@ -1676,7 +1673,7 @@ export declare interface AttachFinopsOptions {
|
|
|
1676
1673
|
/** The descriptor shape the audit needs — a `defineQuery` result carries it. */
|
|
1677
1674
|
export declare interface AuditableQuery {
|
|
1678
1675
|
readonly name: string;
|
|
1679
|
-
readonly output: Schema.
|
|
1676
|
+
readonly output: Schema.Top;
|
|
1680
1677
|
/** Declared source table(s) — the tables whose serverOnly columns must not leak. */
|
|
1681
1678
|
readonly source?: string | ReadonlyArray<string> | undefined;
|
|
1682
1679
|
}
|
|
@@ -1846,7 +1843,7 @@ export declare const bindMutation: <Input, Output, E = never>(execute: (input: I
|
|
|
1846
1843
|
* schema keeps exactly the old behaviour rather than collapsing errors it
|
|
1847
1844
|
* cannot classify.
|
|
1848
1845
|
*/
|
|
1849
|
-
declaredError?: Schema.
|
|
1846
|
+
declaredError?: Schema.Top, idempotencyScope?: MutationIdempotencyScope) => Effect.Effect<Output, E, SubjectService | ConnectionInfo>;
|
|
1850
1847
|
|
|
1851
1848
|
/**
|
|
1852
1849
|
* Bind a non-reactive server→client stream (A3). The executor builds a
|
|
@@ -1878,7 +1875,7 @@ guards?: ReadonlyArray<unknown> | undefined,
|
|
|
1878
1875
|
guardInput?: unknown) => Stream.Stream<Element, Err, SubjectService | ConnectionInfo>;
|
|
1879
1876
|
|
|
1880
1877
|
/**
|
|
1881
|
-
* Build a `Stream<SubscriptionEvent<T>>` that an
|
|
1878
|
+
* Build a `Stream<SubscriptionEvent<T>>` that an effect/rpc streaming
|
|
1882
1879
|
* handler can return directly. The descriptor is built by the route's
|
|
1883
1880
|
* executor from the input + the per-call `RuntimeContext` (subject +
|
|
1884
1881
|
* traceId) we derive from the auth-middleware's resolved subject.
|
|
@@ -2187,7 +2184,7 @@ export declare interface CircuitBreakerOptions {
|
|
|
2187
2184
|
/** Consecutive failures before the breaker opens. */
|
|
2188
2185
|
readonly failureThreshold: number;
|
|
2189
2186
|
/** Wait before transitioning open → half-open (Duration or string). */
|
|
2190
|
-
readonly resetTimeout: Duration.
|
|
2187
|
+
readonly resetTimeout: Duration.Input;
|
|
2191
2188
|
/** Successes required in half-open before closing again. Default 1. */
|
|
2192
2189
|
readonly halfOpenSuccessThreshold?: number;
|
|
2193
2190
|
/** Predicate: does this error count toward the threshold? Default: all
|
|
@@ -2205,14 +2202,12 @@ export declare interface CircuitBreakerOptions {
|
|
|
2205
2202
|
export declare class CircuitOpen extends CircuitOpen_base {
|
|
2206
2203
|
}
|
|
2207
2204
|
|
|
2208
|
-
declare const CircuitOpen_base: Schema.
|
|
2209
|
-
readonly _tag: Schema.tag<"CircuitOpen">;
|
|
2210
|
-
} & {
|
|
2205
|
+
declare const CircuitOpen_base: Schema.Class<CircuitOpen, Schema.TaggedStruct<"CircuitOpen", {
|
|
2211
2206
|
/** Breaker name (the `name` option, or `'circuit'` when unnamed). */
|
|
2212
|
-
name:
|
|
2207
|
+
readonly name: Schema.String;
|
|
2213
2208
|
/** Best-effort ms until the breaker next admits a probe call. */
|
|
2214
|
-
retryAfterMs:
|
|
2215
|
-
}>;
|
|
2209
|
+
readonly retryAfterMs: Schema.Number;
|
|
2210
|
+
}>, Cause.YieldableError>;
|
|
2216
2211
|
|
|
2217
2212
|
export declare type CircuitState = 'closed' | 'open' | 'half-open';
|
|
2218
2213
|
|
|
@@ -2746,7 +2741,7 @@ export declare type CoordinationOutcome = 'single' | 'wonLock' | 'lostLock' | 'e
|
|
|
2746
2741
|
* instance should run the firing. Implementations:
|
|
2747
2742
|
* - SingleCoordinator → always true (one process)
|
|
2748
2743
|
* - AdvisoryLockCoordinator → postgres advisory lock (wired in CLI)
|
|
2749
|
-
* - ClusterCoordinator →
|
|
2744
|
+
* - ClusterCoordinator → effect/cluster shard (future)
|
|
2750
2745
|
*/
|
|
2751
2746
|
export declare interface Coordinator {
|
|
2752
2747
|
readonly kind: 'single' | 'advisoryLock' | 'cluster';
|
|
@@ -2985,7 +2980,7 @@ export declare interface CostEvent {
|
|
|
2985
2980
|
export declare class CostRegistry extends CostRegistry_base {
|
|
2986
2981
|
}
|
|
2987
2982
|
|
|
2988
|
-
declare const CostRegistry_base: Context.
|
|
2983
|
+
declare const CostRegistry_base: Context.ServiceClass<CostRegistry, "@voltro/CostRegistry", CostRegistryApi>;
|
|
2989
2984
|
|
|
2990
2985
|
export declare interface CostRegistryApi {
|
|
2991
2986
|
/** Per-tenant compute-cost attribution — the chargeback feed. */
|
|
@@ -3002,8 +2997,8 @@ export declare interface CostRegistryApi {
|
|
|
3002
2997
|
readonly subscribe: (listener: (s: CostBudgetSignal) => void) => () => void;
|
|
3003
2998
|
}
|
|
3004
2999
|
|
|
3005
|
-
/** Define a cumulative counter. Increment with `incrementMetric` / `Metric.
|
|
3006
|
-
export declare const counter: (name: string, description?: string) => Metric.
|
|
3000
|
+
/** Define a cumulative counter. Increment with `incrementMetric` / `Metric.update(metric, 1)`. */
|
|
3001
|
+
export declare const counter: (name: string, description?: string) => Metric.Counter<number>;
|
|
3007
3002
|
|
|
3008
3003
|
/**
|
|
3009
3004
|
* Count workflows actively EXECUTING (`_voltro_workflow_runs.status =
|
|
@@ -3985,6 +3980,8 @@ export declare class Dispatcher {
|
|
|
3985
3980
|
/** Query labels already warned about for an undeclared raw read, so a hot
|
|
3986
3981
|
* subscription logs once rather than once per subscriber. */
|
|
3987
3982
|
private readonly rawReadWarned;
|
|
3983
|
+
private changeEpoch;
|
|
3984
|
+
private readonly committedReads;
|
|
3988
3985
|
/** The CRDT-managed columns of `table` (empty when it has none) — what a
|
|
3989
3986
|
* subscription's backpressure outbox folds incrementally. */
|
|
3990
3987
|
crdtColumnsFor(table: string): ReadonlySet<string>;
|
|
@@ -4215,7 +4212,7 @@ export declare interface DrainDeps<R = never> {
|
|
|
4215
4212
|
* inject `exit` and drive a finalizer that genuinely never finishes.
|
|
4216
4213
|
*/
|
|
4217
4214
|
export declare const drainForShutdown: (options: {
|
|
4218
|
-
readonly fibers: ReadonlyArray<Fiber.
|
|
4215
|
+
readonly fibers: ReadonlyArray<Fiber.Fiber<void, unknown>>;
|
|
4219
4216
|
readonly hooks: ReadonlyArray<() => void | Promise<void>>;
|
|
4220
4217
|
readonly deadlineMs: number;
|
|
4221
4218
|
readonly exit: () => void;
|
|
@@ -4305,7 +4302,7 @@ export declare const effectiveRelations: (subject: RebacSubject, resource: Rebac
|
|
|
4305
4302
|
export declare class EffectStore extends EffectStore_base {
|
|
4306
4303
|
}
|
|
4307
4304
|
|
|
4308
|
-
declare const EffectStore_base: Context.
|
|
4305
|
+
declare const EffectStore_base: Context.ServiceClass<EffectStore, "@voltro/EffectStore", EffectStoreOps>;
|
|
4309
4306
|
|
|
4310
4307
|
export declare interface EffectStoreOps {
|
|
4311
4308
|
/** Typed the same way `FluentStore.query` is — the row type rides in on the
|
|
@@ -4559,6 +4556,8 @@ export declare class EventBus {
|
|
|
4559
4556
|
* sacrificed under pressure, never delivery.
|
|
4560
4557
|
*/
|
|
4561
4558
|
private evictIfOverCapacity;
|
|
4559
|
+
/** Select a bounded batch, preserving insertion order for equal timestamps. */
|
|
4560
|
+
private coldestIdleRoutes;
|
|
4562
4561
|
/**
|
|
4563
4562
|
* Drop what the ring may no longer replay.
|
|
4564
4563
|
*
|
|
@@ -4764,7 +4763,7 @@ export declare interface EventPublishContext {
|
|
|
4764
4763
|
}
|
|
4765
4764
|
|
|
4766
4765
|
export declare interface EventPublisher {
|
|
4767
|
-
publish<Name extends string, Key extends Schema.
|
|
4766
|
+
publish<Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, payload: Schema.Schema.Type<Payload>): AwaitableEffect<EventPublishResult, EventPublishError>;
|
|
4768
4767
|
}
|
|
4769
4768
|
|
|
4770
4769
|
export declare type EventPublishError = EventPayloadInvalid | EventKeyInvalid | EventPayloadTooLarge;
|
|
@@ -4849,9 +4848,9 @@ export declare const exchangeAuthorizationCode: (definition: OAuth2ConnectionDef
|
|
|
4849
4848
|
* `defineMutation` / `defineAction` result carries all of it. */
|
|
4850
4849
|
export declare interface ExecutorDescriptor {
|
|
4851
4850
|
readonly kind: 'query' | 'mutation' | 'action';
|
|
4852
|
-
readonly input: Schema.
|
|
4853
|
-
readonly output: Schema.
|
|
4854
|
-
readonly error: Schema.
|
|
4851
|
+
readonly input: Schema.Top;
|
|
4852
|
+
readonly output: Schema.Top;
|
|
4853
|
+
readonly error: Schema.Top;
|
|
4855
4854
|
}
|
|
4856
4855
|
|
|
4857
4856
|
/** The failure type of an executor's return, when it returns an Effect. A
|
|
@@ -5019,7 +5018,7 @@ export declare type ExpectationInvariant = {
|
|
|
5019
5018
|
export declare class ExpectationRegistry extends ExpectationRegistry_base {
|
|
5020
5019
|
}
|
|
5021
5020
|
|
|
5022
|
-
declare const ExpectationRegistry_base: Context.
|
|
5021
|
+
declare const ExpectationRegistry_base: Context.ServiceClass<ExpectationRegistry, "@voltro/ExpectationRegistry", ExpectationRegistryApi>;
|
|
5023
5022
|
|
|
5024
5023
|
export declare interface ExpectationRegistryApi {
|
|
5025
5024
|
/** Snapshot every registered expectation's current state — the inspect feed. */
|
|
@@ -5283,7 +5282,7 @@ export declare type ExperimentMetricKind = ExperimentMetric['kind'];
|
|
|
5283
5282
|
export declare class ExperimentRegistry extends ExperimentRegistry_base {
|
|
5284
5283
|
}
|
|
5285
5284
|
|
|
5286
|
-
declare const ExperimentRegistry_base: Context.
|
|
5285
|
+
declare const ExperimentRegistry_base: Context.ServiceClass<ExperimentRegistry, "@voltro/ExperimentRegistry", ExperimentRegistryApi>;
|
|
5287
5286
|
|
|
5288
5287
|
export declare interface ExperimentRegistryApi {
|
|
5289
5288
|
/** Snapshot every registered experiment's current result — the inspect feed. */
|
|
@@ -5373,6 +5372,12 @@ export declare interface ExperimentVariantSpec {
|
|
|
5373
5372
|
readonly weight?: number;
|
|
5374
5373
|
}
|
|
5375
5374
|
|
|
5375
|
+
export declare const exponentialBoundaries: (options: {
|
|
5376
|
+
readonly start: number;
|
|
5377
|
+
readonly factor: number;
|
|
5378
|
+
readonly count: number;
|
|
5379
|
+
}) => ReadonlyArray<number>;
|
|
5380
|
+
|
|
5376
5381
|
/**
|
|
5377
5382
|
* How far AHEAD of now an external trigger's stated instant may be.
|
|
5378
5383
|
*
|
|
@@ -5461,12 +5466,12 @@ export declare type ExternalTriggerOutcome =
|
|
|
5461
5466
|
export { extractDbCause }
|
|
5462
5467
|
|
|
5463
5468
|
/** The literal `_tag`s of a failure type. `any` contributes none (nothing can
|
|
5464
|
-
* be proven about it); `
|
|
5469
|
+
* be proven about it); `UnknownError` — Effect's wrapper for a failure it
|
|
5465
5470
|
* could not type, e.g. `Effect.tryPromise` without `catch` — counts as
|
|
5466
5471
|
* untagged, which is what it means. */
|
|
5467
5472
|
declare type FailureTag<E> = 0 extends (1 & E) ? never : E extends {
|
|
5468
5473
|
readonly _tag: infer T;
|
|
5469
|
-
} ? T extends '
|
|
5474
|
+
} ? T extends 'UnknownError' ? never : T extends string ? T : never : never;
|
|
5470
5475
|
|
|
5471
5476
|
export declare interface FieldChange {
|
|
5472
5477
|
readonly from: unknown;
|
|
@@ -5667,14 +5672,9 @@ export declare interface FluentStoreBackend {
|
|
|
5667
5672
|
* rbac role-derived scopes) via `hasEffectiveScope` — so `admin:full` sees every
|
|
5668
5673
|
* such column, exactly as it satisfies every guard.
|
|
5669
5674
|
*
|
|
5670
|
-
*
|
|
5671
|
-
*
|
|
5672
|
-
*
|
|
5673
|
-
* collapses to Part A's behaviour and its read/diff memo still shares one array
|
|
5674
|
-
* across all subscribers of a change. Only a table that actually carries a
|
|
5675
|
-
* `.readableBy(...)` column pays the per-subject cost (different subjects get
|
|
5676
|
-
* different stripped arrays, the same accepted cost `.serverOnly()` already has
|
|
5677
|
-
* whenever it strips anything).
|
|
5675
|
+
* With no `.readableBy(...)` metadata every subject resolves the same column
|
|
5676
|
+
* list. The dispatch-local strip memo can then share ordinary stripped rows;
|
|
5677
|
+
* this helper itself neither clones rows nor caches mutable metadata or scopes.
|
|
5678
5678
|
*
|
|
5679
5679
|
* An unknown / unregistered table forbids nothing (returns `[]`) rather than
|
|
5680
5680
|
* throwing — same posture as `serverOnlyColumnNames`.
|
|
@@ -5744,7 +5744,7 @@ export declare const frameworkDeviceStrategy: (service: DeviceServiceShape, opts
|
|
|
5744
5744
|
}) => AuthStrategy;
|
|
5745
5745
|
|
|
5746
5746
|
/** Define a gauge (set with `setMetric`). */
|
|
5747
|
-
export declare const gauge: (name: string, description?: string) => Metric.
|
|
5747
|
+
export declare const gauge: (name: string, description?: string) => Metric.Gauge<number>;
|
|
5748
5748
|
|
|
5749
5749
|
/** Generate a fresh token `<prefix><40-char-base64url>`. */
|
|
5750
5750
|
export declare const generateApiKeyToken: (prefix?: string) => string;
|
|
@@ -5855,7 +5855,7 @@ export declare interface HealthConfigInput {
|
|
|
5855
5855
|
}
|
|
5856
5856
|
|
|
5857
5857
|
/** Define a histogram. `boundaries` default to the framework duration buckets. */
|
|
5858
|
-
export declare const histogramMetric: (name: string, boundaries?:
|
|
5858
|
+
export declare const histogramMetric: (name: string, boundaries?: ReadonlyArray<number>, description?: string) => Metric.Histogram<number>;
|
|
5859
5859
|
|
|
5860
5860
|
/**
|
|
5861
5861
|
* Full-lineage provenance from versioning history rows (oldest-first input).
|
|
@@ -5892,7 +5892,7 @@ export declare interface HttpSecretsOptions {
|
|
|
5892
5892
|
|
|
5893
5893
|
/**
|
|
5894
5894
|
* WS-rpc idempotency store + TTL, passed to `bindMutation` as a closure param by
|
|
5895
|
-
* the boot path (`serveApi`/`dev`) — NOT a service.
|
|
5895
|
+
* the boot path (`serveApi`/`dev`) — NOT a service. effect/rpc runs a handler in
|
|
5896
5896
|
* a NARROWED context (only the middleware `provides` + declared deps), so a plain
|
|
5897
5897
|
* merged service is invisible to `Effect.serviceOption` inside the handler; the
|
|
5898
5898
|
* store+ttl are boot-time constants the bind site already holds, so a closure is
|
|
@@ -5952,6 +5952,7 @@ export declare class IndexedMatcher implements Matcher {
|
|
|
5952
5952
|
private readonly columnByTable;
|
|
5953
5953
|
private readonly rangeByTable;
|
|
5954
5954
|
private readonly tupleByTable;
|
|
5955
|
+
private readonly compositeByTable;
|
|
5955
5956
|
private readonly unindexedByTable;
|
|
5956
5957
|
private readonly subscriptions;
|
|
5957
5958
|
register(sub: SubscriptionRecord): void;
|
|
@@ -6460,7 +6461,7 @@ export declare interface KvFacade {
|
|
|
6460
6461
|
* the backend `KvStore` (R = never), so both boot paths hand it to handlers
|
|
6461
6462
|
* as `Layer.succeed(Kv, service)` — enabling `yield* Kv` in Effect handlers
|
|
6462
6463
|
* exactly like `Layer.succeed(Cache, cacheService)` does for the cache. */
|
|
6463
|
-
readonly service: Kv
|
|
6464
|
+
readonly service: Effect.Success<typeof Kv>;
|
|
6464
6465
|
/** The resolved backend kind — for boot logging. */
|
|
6465
6466
|
readonly backend: 'database' | 'redis' | 'memory';
|
|
6466
6467
|
/** Tear down the managed runtime (closes a pooled redis connection). */
|
|
@@ -6514,6 +6515,12 @@ export declare interface LevelReactionDefinition extends ReactionBase {
|
|
|
6514
6515
|
readonly guards?: Omit<ReactionGuards, 'dedupeKey'>;
|
|
6515
6516
|
}
|
|
6516
6517
|
|
|
6518
|
+
export declare const linearBoundaries: (options: {
|
|
6519
|
+
readonly start: number;
|
|
6520
|
+
readonly width: number;
|
|
6521
|
+
readonly count: number;
|
|
6522
|
+
}) => ReadonlyArray<number>;
|
|
6523
|
+
|
|
6517
6524
|
export declare class LinearScanMatcher implements Matcher {
|
|
6518
6525
|
private readonly byTable;
|
|
6519
6526
|
register(sub: SubscriptionRecord): void;
|
|
@@ -6868,7 +6875,7 @@ export declare const makeListConnectionsExecutor: (deps: ConnectionBuiltinDeps)
|
|
|
6868
6875
|
* round-trip it — a guard for exotic schemas; for a value the handler actually
|
|
6869
6876
|
* produced, `encodeUnknownSync` never throws. `undefined` schema → no codec.
|
|
6870
6877
|
*/
|
|
6871
|
-
export declare const makeMutationOutputCodec: (outputSchema: Schema.
|
|
6878
|
+
export declare const makeMutationOutputCodec: (outputSchema: Schema.Top | undefined) => MutationOutputCodec<unknown> | undefined;
|
|
6872
6879
|
|
|
6873
6880
|
/**
|
|
6874
6881
|
* Build the shared mutation runner. Used by BOTH the rpc WS handler and
|
|
@@ -7321,10 +7328,9 @@ export declare const mergeCookieHeader: (existing: string | undefined, patch: Re
|
|
|
7321
7328
|
*/
|
|
7322
7329
|
export declare const mergeFleetObservations: <T>(rows: ReadonlyArray<ReplicaObservationRow>, members: ReadonlyArray<FleetMember>, staleAfterMs?: number) => FleetMergeResult<T>;
|
|
7323
7330
|
|
|
7324
|
-
export { MetricBoundaries }
|
|
7325
|
-
|
|
7326
7331
|
export declare interface MetricBucketPoint {
|
|
7327
|
-
/** Upper bound (Prometheus `le`)
|
|
7332
|
+
/** Upper bound (Prometheus `le`). Effect 4 reports the declared boundaries only;
|
|
7333
|
+
* the catch-all is the sample's `count` (the Prometheus exporter writes `+Inf` from it). */
|
|
7328
7334
|
readonly le: number;
|
|
7329
7335
|
/** Cumulative count ≤ le. */
|
|
7330
7336
|
readonly count: number;
|
|
@@ -7818,12 +7824,10 @@ export declare class OptimisticLockError extends OptimisticLockError_base {
|
|
|
7818
7824
|
get message(): string;
|
|
7819
7825
|
}
|
|
7820
7826
|
|
|
7821
|
-
declare const OptimisticLockError_base: Schema.
|
|
7822
|
-
readonly
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
expected: typeof Schema.Number;
|
|
7826
|
-
}>;
|
|
7827
|
+
declare const OptimisticLockError_base: Schema.Class<OptimisticLockError, Schema.TaggedStruct<"OptimisticLockError", {
|
|
7828
|
+
readonly table: Schema.String;
|
|
7829
|
+
readonly expected: Schema.Number;
|
|
7830
|
+
}>, YieldableError>;
|
|
7827
7831
|
|
|
7828
7832
|
export declare interface OrchestratorTickDeps {
|
|
7829
7833
|
readonly store: DataStore;
|
|
@@ -7893,7 +7897,7 @@ export declare interface OriginGuardConfig {
|
|
|
7893
7897
|
export declare type OriginGuardMode = 'off' | 'same-origin';
|
|
7894
7898
|
|
|
7895
7899
|
/**
|
|
7896
|
-
* Map an `import('@effect/opentelemetry')` rejection to what the reader needs.
|
|
7900
|
+
* Map an `import('@effect/opentelemetry/NodeSdk')` rejection to what the reader needs.
|
|
7897
7901
|
*
|
|
7898
7902
|
* Exported so the branch is testable without uninstalling the package. Only a
|
|
7899
7903
|
* module-NOT-FOUND becomes the install instruction: anything else is a real
|
|
@@ -8155,7 +8159,7 @@ export declare interface PatConnectionDefinition extends ConnectionDefinitionCom
|
|
|
8155
8159
|
* validity — but `voltro doctor`'s static `workflows.start` audit calls the same
|
|
8156
8160
|
* function, so the two cannot disagree about what a payload requires.
|
|
8157
8161
|
*/
|
|
8158
|
-
export declare const payloadPropertyNames: (schema: Schema.
|
|
8162
|
+
export declare const payloadPropertyNames: (schema: Schema.Top) => {
|
|
8159
8163
|
readonly required: ReadonlyArray<string>;
|
|
8160
8164
|
readonly optional: ReadonlyArray<string>;
|
|
8161
8165
|
};
|
|
@@ -8249,11 +8253,7 @@ export declare interface PluginRefRule {
|
|
|
8249
8253
|
}
|
|
8250
8254
|
|
|
8251
8255
|
/** The store surface the enforcement needs. */
|
|
8252
|
-
export declare
|
|
8253
|
-
query: (descriptor: unknown) => Promise<ReadonlyArray<Record<string, unknown>>>;
|
|
8254
|
-
update: (table: string, id: string, patch: Record<string, unknown>) => Promise<unknown>;
|
|
8255
|
-
delete: (table: string, id: string) => Promise<unknown>;
|
|
8256
|
-
}
|
|
8256
|
+
export declare type PluginRefStore = Pick<DataStore, 'updateMany' | 'deleteMany'>;
|
|
8257
8257
|
|
|
8258
8258
|
/** The signature a plugin sees on its bind-ctx. */
|
|
8259
8259
|
export declare type PluginScheduleCoordinated = (name: string, intervalMs: number, effect: CoordinatedEffect, options?: CoordinatedTaskOptions) => CoordinatedScheduleHandle;
|
|
@@ -8443,7 +8443,7 @@ export declare interface PublicDevice {
|
|
|
8443
8443
|
* Returns the assigned serial so a caller (and the tests) can observe ordering
|
|
8444
8444
|
* without reaching into the bus.
|
|
8445
8445
|
*/
|
|
8446
|
-
export declare const publishEvent: <Name extends string, Key extends Schema.
|
|
8446
|
+
export declare const publishEvent: <Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(ctx: EventPublishContext, descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, payload: Schema.Schema.Type<Payload>) => Effect.Effect<{
|
|
8447
8447
|
readonly n: number;
|
|
8448
8448
|
readonly deferred: boolean;
|
|
8449
8449
|
}, EventPublishError>;
|
|
@@ -8474,7 +8474,7 @@ export declare interface PumpOptions {
|
|
|
8474
8474
|
* computed). The three used to carry the same loop inline; a diagnostic added
|
|
8475
8475
|
* to one of them would have been absent from the other two.
|
|
8476
8476
|
*
|
|
8477
|
-
* **The stall diagnostic.**
|
|
8477
|
+
* **The stall diagnostic.** `effect/rpc` delivers a stream as `Chunk`
|
|
8478
8478
|
* messages and waits for the client's `Ack` of each before writing the next.
|
|
8479
8479
|
* The typed client acknowledges by itself; a hand-rolled socket client that
|
|
8480
8480
|
* only listens receives exactly one Chunk per subscription — the snapshot — and
|
|
@@ -8703,6 +8703,17 @@ export declare type ReactionOp = 'insert' | 'update' | 'delete';
|
|
|
8703
8703
|
|
|
8704
8704
|
export declare type ReactionOutcome = 'acted' | 'skipped-op' | 'skipped-when' | 'skipped-dedupe' | 'skipped-ratelimit' | 'skipped-budget';
|
|
8705
8705
|
|
|
8706
|
+
/**
|
|
8707
|
+
* The DURABLE rate key for one firing: reaction, partition, and time bucket.
|
|
8708
|
+
*
|
|
8709
|
+
* A fixed window keeps one durable bucket cursor and unique slot claims,
|
|
8710
|
+
* rather than retaining every event timestamp. The transaction-owned cursor
|
|
8711
|
+
* avoids probing every previously occupied slot; the UNIQUE remains the final
|
|
8712
|
+
* arbiter. JSON encoding preserves arbitrary names/partitions without NUL in
|
|
8713
|
+
* SQL text. Up to 2× the limit may fire across a bucket boundary.
|
|
8714
|
+
*/
|
|
8715
|
+
export declare const reactionRateBucketKey: (reactionName: string, partition: string, windowMs: number, now: number) => string;
|
|
8716
|
+
|
|
8706
8717
|
/**
|
|
8707
8718
|
* A per-key sliding-window rate limiter — IN-MEMORY, PER PROCESS.
|
|
8708
8719
|
*
|
|
@@ -8712,10 +8723,11 @@ export declare type ReactionOutcome = 'acted' | 'skipped-op' | 'skipped-when' |
|
|
|
8712
8723
|
* the runner logs once when it falls back, because "my limit is 3× what I
|
|
8713
8724
|
* declared" is not something anyone discovers by reading config.
|
|
8714
8725
|
*
|
|
8715
|
-
* Prefer {@link ReactionRunDeps.
|
|
8726
|
+
* Prefer {@link ReactionRunDeps.claimRate}.
|
|
8716
8727
|
*/
|
|
8717
8728
|
export declare class ReactionRateLimiter {
|
|
8718
8729
|
private readonly hits;
|
|
8730
|
+
private sweep;
|
|
8719
8731
|
allow(key: string, limit: number, windowMs: number, now: number): boolean;
|
|
8720
8732
|
}
|
|
8721
8733
|
|
|
@@ -8746,13 +8758,13 @@ export declare interface ReactionRunDeps {
|
|
|
8746
8758
|
* requireAiBudget). Only consulted when `guards.costBudgetUsd` is set. */
|
|
8747
8759
|
readonly checkBudget?: (tenantId: string | null, budgetUsd: number) => boolean | Promise<boolean>;
|
|
8748
8760
|
/**
|
|
8749
|
-
* Atomically
|
|
8761
|
+
* Atomically reserve ONE slot in a rate bucket. `true` = we may fire.
|
|
8750
8762
|
*
|
|
8751
8763
|
* Injected by the serve layer over the shared store, so the cap holds across
|
|
8752
8764
|
* replicas. Absent → the runner falls back to {@link ReactionRateLimiter},
|
|
8753
8765
|
* which is per-process and therefore N× on N replicas.
|
|
8754
8766
|
*/
|
|
8755
|
-
readonly
|
|
8767
|
+
readonly claimRate?: (key: string, limit: number, expiresAt: Date) => Promise<boolean>;
|
|
8756
8768
|
readonly rateLimiter?: ReactionRateLimiter;
|
|
8757
8769
|
readonly now?: () => number;
|
|
8758
8770
|
}
|
|
@@ -8799,7 +8811,7 @@ export declare interface ReactiveConfigInput {
|
|
|
8799
8811
|
readonly oversizedEventBytes?: number;
|
|
8800
8812
|
/** How long a delivery may sit unaccepted by the transport before the
|
|
8801
8813
|
* server says so — a WARN naming the subscription and the missing
|
|
8802
|
-
*
|
|
8814
|
+
* `effect/rpc` `Ack`, plus `voltro_subscription_stalled_total`.
|
|
8803
8815
|
* Default 5_000 ms. */
|
|
8804
8816
|
readonly stallWarnAfterMs?: number;
|
|
8805
8817
|
};
|
|
@@ -9314,13 +9326,13 @@ export declare interface RegistryTableLike {
|
|
|
9314
9326
|
* registry indexes this so the MutationStore can look it up in
|
|
9315
9327
|
* O(1) per write without touching the original Table object.
|
|
9316
9328
|
*/
|
|
9317
|
-
readonly insertSchema?: Schema.
|
|
9329
|
+
readonly insertSchema?: Schema.Top;
|
|
9318
9330
|
/**
|
|
9319
9331
|
* Optional `effect/Schema` the framework decodes a patch against
|
|
9320
9332
|
* BEFORE every UPDATE. Set via `table().validatePatch(schema)`
|
|
9321
9333
|
* (already `Schema.partial`-wrapped by the table builder).
|
|
9322
9334
|
*/
|
|
9323
|
-
readonly validatePatchSchema?: Schema.
|
|
9335
|
+
readonly validatePatchSchema?: Schema.Top;
|
|
9324
9336
|
}
|
|
9325
9337
|
|
|
9326
9338
|
/** Rebuild checkable guards from the row. The stored resource id becomes a
|
|
@@ -9537,22 +9549,22 @@ export declare interface ReplicatedDataStoreOptions {
|
|
|
9537
9549
|
}
|
|
9538
9550
|
|
|
9539
9551
|
declare const Request_2: Schema.Struct<{
|
|
9540
|
-
id: Schema.
|
|
9541
|
-
name: Schema.
|
|
9542
|
-
from:
|
|
9543
|
-
to:
|
|
9544
|
-
occurrences: Schema
|
|
9545
|
-
status: Schema.
|
|
9546
|
-
owner: Schema.NullOr<Schema.
|
|
9547
|
-
createdAt:
|
|
9548
|
-
updatedAt:
|
|
9549
|
-
cursor: Schema.
|
|
9550
|
-
activeIndex: Schema.NullOr<Schema.
|
|
9551
|
-
results: Schema
|
|
9552
|
-
runId: Schema.
|
|
9553
|
-
status: Schema.
|
|
9552
|
+
readonly id: Schema.String;
|
|
9553
|
+
readonly name: Schema.String;
|
|
9554
|
+
readonly from: Schema.Date;
|
|
9555
|
+
readonly to: Schema.Date;
|
|
9556
|
+
readonly occurrences: Schema.$Array<Schema.Number>;
|
|
9557
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "interrupted"]>;
|
|
9558
|
+
readonly owner: Schema.NullOr<Schema.String>;
|
|
9559
|
+
readonly createdAt: Schema.Date;
|
|
9560
|
+
readonly updatedAt: Schema.Date;
|
|
9561
|
+
readonly cursor: Schema.Number;
|
|
9562
|
+
readonly activeIndex: Schema.NullOr<Schema.Number>;
|
|
9563
|
+
readonly results: Schema.$Array<Schema.Struct<{
|
|
9564
|
+
readonly runId: Schema.String;
|
|
9565
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed", "skipped", "missed"]>;
|
|
9554
9566
|
}>>;
|
|
9555
|
-
error: Schema.NullOr<
|
|
9567
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
9556
9568
|
}>;
|
|
9557
9569
|
|
|
9558
9570
|
export declare interface ResendOptions {
|
|
@@ -10094,13 +10106,6 @@ export declare interface RevalidationMessage {
|
|
|
10094
10106
|
|
|
10095
10107
|
export declare type RevalidationPublisher = (message: RevalidationMessage) => Promise<void>;
|
|
10096
10108
|
|
|
10097
|
-
/**
|
|
10098
|
-
* Reverse ONE recorded event over an in-memory row-set (to step BACK across it):
|
|
10099
|
-
* - insert → the row was added, so remove it (by new.id).
|
|
10100
|
-
* - update → restore the row to its `old` image (by id).
|
|
10101
|
-
* - delete → the row was removed, so add `old` back.
|
|
10102
|
-
* Pure. Applied newest-first to walk from "now" to a past point.
|
|
10103
|
-
*/
|
|
10104
10109
|
export declare const reverseEventOverRows: (rows: ReadonlyArray<Row_2>, e: TimelineEvent) => ReadonlyArray<Row_2>;
|
|
10105
10110
|
|
|
10106
10111
|
/** The ids that were visible before but are not now — what a live-revocation
|
|
@@ -10268,16 +10273,15 @@ export declare interface RowFilter<Ctx = unknown> {
|
|
|
10268
10273
|
* the fix, rather than degrading to an unfiltered or empty answer.
|
|
10269
10274
|
*/
|
|
10270
10275
|
export declare class RowFilterDeclarationViolated extends RowFilterDeclarationViolated_base {
|
|
10276
|
+
get message(): string;
|
|
10271
10277
|
}
|
|
10272
10278
|
|
|
10273
|
-
declare const RowFilterDeclarationViolated_base: Schema.
|
|
10274
|
-
readonly _tag: Schema.tag<"RowFilterDeclarationViolated">;
|
|
10275
|
-
} & {
|
|
10279
|
+
declare const RowFilterDeclarationViolated_base: Schema.Class<RowFilterDeclarationViolated, Schema.TaggedStruct<"RowFilterDeclarationViolated", {
|
|
10276
10280
|
/** The table the predicate narrowed. */
|
|
10277
|
-
table:
|
|
10281
|
+
readonly table: Schema.String;
|
|
10278
10282
|
/** The declared set, for the message. */
|
|
10279
|
-
declared: Schema
|
|
10280
|
-
}>;
|
|
10283
|
+
readonly declared: Schema.$Array<Schema.String>;
|
|
10284
|
+
}>, YieldableError>;
|
|
10281
10285
|
|
|
10282
10286
|
/**
|
|
10283
10287
|
* Could the registered filter narrow ANY of `tables`?
|
|
@@ -10325,12 +10329,10 @@ export declare type RowFilterScope = (table: string) => Predicate | undefined;
|
|
|
10325
10329
|
export declare class RowFilterUnavailable extends RowFilterUnavailable_base {
|
|
10326
10330
|
}
|
|
10327
10331
|
|
|
10328
|
-
declare const RowFilterUnavailable_base: Schema.
|
|
10329
|
-
readonly _tag: Schema.tag<"RowFilterUnavailable">;
|
|
10330
|
-
} & {
|
|
10332
|
+
declare const RowFilterUnavailable_base: Schema.Class<RowFilterUnavailable, Schema.TaggedStruct<"RowFilterUnavailable", {
|
|
10331
10333
|
/** `String(originalError)` — the last failure after retries were exhausted. */
|
|
10332
|
-
cause:
|
|
10333
|
-
}>;
|
|
10334
|
+
readonly cause: Schema.String;
|
|
10335
|
+
}>, YieldableError>;
|
|
10334
10336
|
|
|
10335
10337
|
/** One `_voltro_row_history` row, structurally (from @voltro/plugin-row-history). */
|
|
10336
10338
|
export declare interface RowHistoryEntry {
|
|
@@ -10365,7 +10367,7 @@ export declare interface RpcServerOptions<Rpcs extends Rpc.Any> {
|
|
|
10365
10367
|
readonly handlersLayer: Layer.Layer<Rpc.ToHandler<Rpcs>>;
|
|
10366
10368
|
/** Optional handlers layer dedicated to the one-shot HTTP rpc surface
|
|
10367
10369
|
* (`POST /rpc`, used by SSR web-router loaders). The HTTP JSON protocol
|
|
10368
|
-
* BUFFERS the whole response (the
|
|
10370
|
+
* BUFFERS the whole response (the effect/rpc client `await`s `r.json()`),
|
|
10369
10371
|
* so a reactive query's never-ending stream would hang the request. The
|
|
10370
10372
|
* caller supplies a variant here whose query handlers complete after the
|
|
10371
10373
|
* FIRST snapshot (`Stream.take(1)`); the WS `handlersLayer` keeps the live
|
|
@@ -10608,11 +10610,11 @@ export declare const runOrchestratorTick: (deps: OrchestratorTickDeps) => Promis
|
|
|
10608
10610
|
|
|
10609
10611
|
/**
|
|
10610
10612
|
* Run a fully-provided handler Effect to a Promise, REJECTING WITH THE RAW
|
|
10611
|
-
* typed failure value —
|
|
10613
|
+
* typed failure value — the value itself, never a runtime envelope.
|
|
10612
10614
|
*
|
|
10613
10615
|
* Why this exists: the rpc encoder matches a rejected handler's thrown value
|
|
10614
|
-
* against the descriptor's `error:` schema.
|
|
10615
|
-
*
|
|
10616
|
+
* against the descriptor's `error:` schema. a runtime that rejected with
|
|
10617
|
+
* an envelope around the cause made a typed `Effect.fail(MyTaggedError)`
|
|
10616
10618
|
* from an Effect-form mutation/action NEVER matches the schema and dumps on the
|
|
10617
10619
|
* wire as a `Die`/`ExitEncoded` defect instead of the declared tagged error
|
|
10618
10620
|
* (the async-handler path already throws the raw value, so it worked there —
|
|
@@ -10645,7 +10647,7 @@ export declare interface RuntimeContext {
|
|
|
10645
10647
|
readonly subject: Subject;
|
|
10646
10648
|
/** Trace identifier — the active span's W3C trace id (32 hex) when
|
|
10647
10649
|
* tracing is active; a per-call uuid otherwise. Shared across the
|
|
10648
|
-
* whole frontend→api→api chain via
|
|
10650
|
+
* whole frontend→api→api chain via `effect/rpc` + `traceparent`. */
|
|
10649
10651
|
readonly traceId: string;
|
|
10650
10652
|
/** The active span's id (16 hex), when tracing is active. Used to
|
|
10651
10653
|
* build the outbound `traceparent` header for cross-api hops. */
|
|
@@ -11011,7 +11013,7 @@ export declare interface SchedulerDeps {
|
|
|
11011
11013
|
readonly onRunEvent?: (op: 'insert' | 'update', row: Record<string, unknown>) => void;
|
|
11012
11014
|
/** When `false`, the engine registers schedules (so `fireNow` +
|
|
11013
11015
|
* `fireFromCluster` work) but does NOT arm in-app timers. Used by
|
|
11014
|
-
* `cluster` coordination, where
|
|
11016
|
+
* `cluster` coordination, where `effect/cluster`'s `ClusterCron`
|
|
11015
11017
|
* drives the clock + guarantees once-only — the in-app timer would
|
|
11016
11018
|
* double-fire. Default `true`. */
|
|
11017
11019
|
readonly armSelf?: boolean;
|
|
@@ -11087,7 +11089,7 @@ export declare interface SchedulerHandle {
|
|
|
11087
11089
|
/** One run's terminal-or-not state, for a caller polling an accepted trigger
|
|
11088
11090
|
* to completion. `undefined` when no such run exists. */
|
|
11089
11091
|
runStatus(runId: string): Promise<ScheduleRunStatus | undefined>;
|
|
11090
|
-
/** Fire from a cluster-cron tick.
|
|
11092
|
+
/** Fire from a cluster-cron tick. `effect/cluster` has already
|
|
11091
11093
|
* guaranteed exactly-once across the fleet (this runner owns the
|
|
11092
11094
|
* shard), so we bypass the in-app coordinator + record the run
|
|
11093
11095
|
* with `coordinationOutcome: 'cluster'`. Overlap policy still
|
|
@@ -11232,9 +11234,9 @@ export declare interface SchemaInfo {
|
|
|
11232
11234
|
readonly fields: ReadonlyArray<string>;
|
|
11233
11235
|
}>;
|
|
11234
11236
|
/** Optional pre-INSERT row decoder (from `table().validate(...)`). */
|
|
11235
|
-
readonly insertSchema?: Schema.
|
|
11237
|
+
readonly insertSchema?: Schema.Top;
|
|
11236
11238
|
/** Optional pre-UPDATE partial-patch decoder (from `table().validatePatch(...)`). */
|
|
11237
|
-
readonly validatePatchSchema?: Schema.
|
|
11239
|
+
readonly validatePatchSchema?: Schema.Top;
|
|
11238
11240
|
/**
|
|
11239
11241
|
* Resolved id-scheme for the table's primary-key column. `undefined`
|
|
11240
11242
|
* for tables that have no `id`-typed column — a natural or composite
|
|
@@ -11262,7 +11264,7 @@ export declare interface SchemaInfo {
|
|
|
11262
11264
|
* the common composition nodes so a column nested under `{ refs: [{ … }] }` or
|
|
11263
11265
|
* behind a `NullOr` is still seen. Cycle-guarded via a seen-set on Suspend.
|
|
11264
11266
|
*/
|
|
11265
|
-
export declare const schemaPropertyNames: (schema: Schema.
|
|
11267
|
+
export declare const schemaPropertyNames: (schema: Schema.Top) => ReadonlySet<string>;
|
|
11266
11268
|
|
|
11267
11269
|
export declare interface SchemaRegistry {
|
|
11268
11270
|
readonly tables: ReadonlyMap<string, SchemaInfo>;
|
|
@@ -11341,7 +11343,7 @@ export declare interface SchemaRegistry {
|
|
|
11341
11343
|
* INSERT — a decode failure becomes a `TableValidationFailed`
|
|
11342
11344
|
* typed error on the mutation's error channel.
|
|
11343
11345
|
*/
|
|
11344
|
-
insertSchema(table: string): Schema.
|
|
11346
|
+
insertSchema(table: string): Schema.Top | undefined;
|
|
11345
11347
|
/**
|
|
11346
11348
|
* Optional pre-UPDATE partial-patch decoder for a table. `undefined`
|
|
11347
11349
|
* when the table didn't ship `.validatePatch(schema)`. The
|
|
@@ -11349,7 +11351,7 @@ export declare interface SchemaRegistry {
|
|
|
11349
11351
|
* the underlying UPDATE — a decode failure becomes a
|
|
11350
11352
|
* `TableValidationFailed` typed error on the mutation's error channel.
|
|
11351
11353
|
*/
|
|
11352
|
-
validatePatchSchema(table: string): Schema.
|
|
11354
|
+
validatePatchSchema(table: string): Schema.Top | undefined;
|
|
11353
11355
|
}
|
|
11354
11356
|
|
|
11355
11357
|
declare interface ScopeCtx {
|
|
@@ -13441,9 +13443,9 @@ export declare interface WorkflowControlTarget extends WorkflowControlOptions {
|
|
|
13441
13443
|
|
|
13442
13444
|
export declare interface WorkflowDefinitionLike {
|
|
13443
13445
|
readonly name: string;
|
|
13444
|
-
readonly payloadSchema: Schema.
|
|
13445
|
-
readonly successSchema: Schema.
|
|
13446
|
-
readonly errorSchema: Schema.
|
|
13446
|
+
readonly payloadSchema: Schema.Top;
|
|
13447
|
+
readonly successSchema: Schema.Top;
|
|
13448
|
+
readonly errorSchema: Schema.Top;
|
|
13447
13449
|
execute(payload: never, options?: {
|
|
13448
13450
|
readonly discard?: boolean;
|
|
13449
13451
|
}): Effect.Effect<unknown, unknown, unknown>;
|
|
@@ -13968,15 +13970,13 @@ export declare interface WorkflowStartLike {
|
|
|
13968
13970
|
export declare class WorkflowStartNotExecuted extends WorkflowStartNotExecuted_base {
|
|
13969
13971
|
}
|
|
13970
13972
|
|
|
13971
|
-
declare const WorkflowStartNotExecuted_base: Schema.
|
|
13972
|
-
readonly
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
|
|
13978
|
-
incumbentExecutionId: Schema.NullOr<typeof Schema.String>;
|
|
13979
|
-
}>;
|
|
13973
|
+
declare const WorkflowStartNotExecuted_base: Schema.Class<WorkflowStartNotExecuted, Schema.TaggedStruct<"WorkflowStartNotExecuted", {
|
|
13974
|
+
readonly workflowName: Schema.String;
|
|
13975
|
+
readonly handleId: Schema.String;
|
|
13976
|
+
readonly reason: Schema.Literals<readonly ["dropped", "skipped", "superseded", "cancelled", "abandoned", "rejected"]>;
|
|
13977
|
+
readonly failureId: Schema.NullOr<Schema.String>;
|
|
13978
|
+
readonly incumbentExecutionId: Schema.NullOr<Schema.String>;
|
|
13979
|
+
}>, Cause.YieldableError>;
|
|
13980
13980
|
|
|
13981
13981
|
/**
|
|
13982
13982
|
* What a start handle has become, read once and without waiting.
|