@ferricstore/ferricstore 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +2 -2
  2. package/dist/index.cjs +1458 -341
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +95 -10
  5. package/dist/index.d.ts +95 -10
  6. package/dist/index.js +1459 -342
  7. package/dist/index.js.map +1 -1
  8. package/docs/api/assets/hierarchy.js +1 -1
  9. package/docs/api/assets/navigation.js +1 -1
  10. package/docs/api/assets/search.js +1 -1
  11. package/docs/api/classes/ConnectionClosedError.html +1 -1
  12. package/docs/api/classes/FerricStoreError.html +1 -1
  13. package/docs/api/classes/FlowAlreadyExistsError.html +1 -1
  14. package/docs/api/classes/FlowNotFoundError.html +1 -1
  15. package/docs/api/classes/FlowWrongStateError.html +1 -1
  16. package/docs/api/classes/InvalidCommandError.html +1 -1
  17. package/docs/api/classes/LeaseRenewalError.html +1 -1
  18. package/docs/api/classes/LockHeldError.html +1 -1
  19. package/docs/api/classes/LockNotOwnedError.html +1 -1
  20. package/docs/api/classes/NativeAdapter.html +1 -1
  21. package/docs/api/classes/OverloadedError.html +1 -1
  22. package/docs/api/classes/QueueCompletionError.html +1 -1
  23. package/docs/api/classes/RequestTimeoutError.html +1 -1
  24. package/docs/api/classes/RerouteError.html +1 -1
  25. package/docs/api/classes/StaleLeaseError.html +1 -1
  26. package/docs/api/classes/StalePolicyGenerationError.html +1 -1
  27. package/docs/api/functions/projectFlowQuery.html +1 -1
  28. package/docs/api/hierarchy.html +1 -1
  29. package/docs/api/index.html +2 -2
  30. package/docs/api/interfaces/CompleteOutcome.html +1 -1
  31. package/docs/api/interfaces/FailOutcome.html +1 -1
  32. package/docs/api/interfaces/FlowEventProjectionField.html +2 -2
  33. package/docs/api/interfaces/FlowExplainCapabilities.html +5 -0
  34. package/docs/api/interfaces/FlowExplainResult.html +8 -2
  35. package/docs/api/interfaces/FlowQueryCountResult.html +1 -1
  36. package/docs/api/interfaces/FlowQueryIndex.html +11 -2
  37. package/docs/api/interfaces/FlowQueryIndexBuild.html +10 -0
  38. package/docs/api/interfaces/FlowQueryIndexCoverage.html +5 -0
  39. package/docs/api/interfaces/FlowQueryIndexField.html +5 -0
  40. package/docs/api/interfaces/FlowQueryIndexFormat.html +2 -2
  41. package/docs/api/interfaces/FlowQueryIndexProgress.html +7 -0
  42. package/docs/api/interfaces/FlowQueryIndexRegistry.html +2 -2
  43. package/docs/api/interfaces/FlowQueryIndexRetirement.html +10 -0
  44. package/docs/api/interfaces/FlowQueryIndexServices.html +6 -0
  45. package/docs/api/interfaces/FlowQueryIndexStatistics.html +11 -0
  46. package/docs/api/interfaces/FlowQueryIndexStatus.html +2 -2
  47. package/docs/api/interfaces/FlowQueryIndexValidation.html +13 -0
  48. package/docs/api/interfaces/FlowQueryQuality.html +2 -2
  49. package/docs/api/interfaces/FlowQueryRecordsResult.html +1 -1
  50. package/docs/api/interfaces/FlowRunProjectionField.html +2 -2
  51. package/docs/api/interfaces/NamedValueMutation.html +1 -1
  52. package/docs/api/interfaces/RetryOutcome.html +1 -1
  53. package/docs/api/interfaces/TDigestCreateOptions.html +1 -1
  54. package/docs/api/interfaces/TDigestMergeOptions.html +1 -1
  55. package/docs/api/interfaces/TransitionOutcome.html +1 -1
  56. package/docs/api/modules.html +1 -1
  57. package/docs/api/types/ConnectionRequestDisposition.html +1 -1
  58. package/docs/api/types/FlowProjectionField.html +1 -1
  59. package/docs/api/types/FlowProjectionShape.html +1 -1
  60. package/docs/api/types/FlowQueryIndexServiceState.html +1 -0
  61. package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +1 -1
  62. package/docs/api/variables/FlowProjection.html +1 -1
  63. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -1122,10 +1122,10 @@ interface FlowQueryPage {
1122
1122
  readonly cursor?: string;
1123
1123
  }
1124
1124
  interface FlowQueryQuality {
1125
- readonly exactness: string;
1126
- readonly freshness: string;
1127
- readonly coverage: string;
1128
- readonly pagination: string;
1125
+ readonly exactness: "authoritative" | "projected_exact" | "exact" | "not_applicable";
1126
+ readonly freshness: "current" | "projection_watermark" | "not_applicable";
1127
+ readonly coverage: "complete" | "unavailable";
1128
+ readonly pagination: "none" | "complete" | "authenticated_seek" | "live_seek";
1129
1129
  }
1130
1130
  interface FlowQueryUsage {
1131
1131
  readonly rangeSeeks: number;
@@ -1181,13 +1181,25 @@ declare class FlowQueryError extends FerricStoreError {
1181
1181
  readonly cause?: unknown;
1182
1182
  });
1183
1183
  }
1184
+ interface FlowExplainCapabilities {
1185
+ readonly requested: readonly string[];
1186
+ readonly available: readonly string[];
1187
+ readonly missing: readonly string[];
1188
+ readonly raw: Readonly<Record<string, unknown>>;
1189
+ }
1184
1190
  interface FlowExplainResult {
1185
1191
  readonly version: "ferric.flow.explain/v1";
1186
1192
  readonly queryFingerprint: string;
1187
1193
  readonly status: "planned" | "rejected" | "executed";
1188
1194
  readonly plan: Readonly<Record<string, unknown>>;
1189
1195
  readonly estimate: Readonly<Record<string, unknown>>;
1196
+ readonly stats?: Readonly<Record<string, unknown>>;
1197
+ readonly quality?: FlowQueryQuality;
1190
1198
  readonly bounds: Readonly<Record<string, unknown>>;
1199
+ readonly pressure?: Readonly<Record<string, unknown>>;
1200
+ readonly decision?: Readonly<Record<string, unknown>>;
1201
+ readonly alternatives: readonly Readonly<Record<string, unknown>>[];
1202
+ readonly capabilities?: FlowExplainCapabilities;
1191
1203
  readonly actual?: FlowQueryUsage;
1192
1204
  readonly diagnostic?: FlowQueryError;
1193
1205
  readonly raw: Readonly<Record<string, unknown>>;
@@ -1196,6 +1208,20 @@ interface FlowQueryIndexRegistry {
1196
1208
  readonly epoch: FlowQueryInteger;
1197
1209
  readonly catalogVersion: FlowQueryInteger;
1198
1210
  }
1211
+ type FlowQueryIndexServiceState = "ready" | "unavailable";
1212
+ interface FlowQueryIndexServices {
1213
+ readonly registry: FlowQueryIndexServiceState;
1214
+ readonly lifecycleWorker: FlowQueryIndexServiceState;
1215
+ readonly statisticsStore: FlowQueryIndexServiceState;
1216
+ readonly statisticsWorker: FlowQueryIndexServiceState;
1217
+ readonly raw: Readonly<Record<string, unknown>>;
1218
+ }
1219
+ interface FlowQueryIndexField {
1220
+ readonly name: string;
1221
+ readonly direction: "asc" | "desc";
1222
+ readonly encoding: "hashed" | "ordered";
1223
+ readonly raw: Readonly<Record<string, unknown>>;
1224
+ }
1199
1225
  interface FlowQueryIndexFormat {
1200
1226
  readonly queryRow: string;
1201
1227
  readonly key: string;
@@ -1204,22 +1230,81 @@ interface FlowQueryIndexFormat {
1204
1230
  readonly counter?: string;
1205
1231
  readonly raw: Readonly<Record<string, unknown>>;
1206
1232
  }
1233
+ interface FlowQueryIndexCoverage {
1234
+ readonly completeShards: FlowQueryInteger;
1235
+ readonly totalShards: FlowQueryInteger;
1236
+ readonly validation: "pending" | "passed" | "failed";
1237
+ readonly raw: Readonly<Record<string, unknown>>;
1238
+ }
1239
+ interface FlowQueryIndexProgress {
1240
+ readonly scope: "catalog_build";
1241
+ readonly phaseCounts: Readonly<Record<string, FlowQueryInteger>>;
1242
+ readonly currentPhases: readonly string[];
1243
+ readonly completedShards: FlowQueryInteger;
1244
+ readonly totalShards: FlowQueryInteger;
1245
+ readonly raw: Readonly<Record<string, unknown>>;
1246
+ }
1247
+ interface FlowQueryIndexBuild extends FlowQueryIndexProgress {
1248
+ readonly scannedRecords: FlowQueryInteger;
1249
+ readonly writtenEntries: FlowQueryInteger;
1250
+ readonly writtenBytes: FlowQueryInteger;
1251
+ }
1252
+ interface FlowQueryIndexValidation extends FlowQueryIndexProgress {
1253
+ readonly status: "pending" | "passed" | "failed";
1254
+ readonly checkedRecords: FlowQueryInteger;
1255
+ readonly checkedEntries: FlowQueryInteger;
1256
+ readonly mismatches: FlowQueryInteger;
1257
+ readonly failureReason?: string;
1258
+ readonly validatedAtMs?: FlowQueryInteger;
1259
+ }
1260
+ interface FlowQueryIndexRetirement {
1261
+ readonly status: "not_applicable" | "pending" | "complete";
1262
+ readonly phaseCounts?: Readonly<Record<string, FlowQueryInteger>>;
1263
+ readonly currentPhases?: readonly string[];
1264
+ readonly completedShards?: FlowQueryInteger;
1265
+ readonly totalShards?: FlowQueryInteger;
1266
+ readonly deletedEntries?: FlowQueryInteger;
1267
+ readonly deletedBytes?: FlowQueryInteger;
1268
+ readonly rewrittenReverseRows?: FlowQueryInteger;
1269
+ readonly raw: Readonly<Record<string, unknown>>;
1270
+ }
1271
+ interface FlowQueryIndexStatistics {
1272
+ readonly status: "fresh" | "stale" | "future" | "mixed" | "missing" | "unavailable";
1273
+ readonly samples: FlowQueryInteger;
1274
+ readonly freshSamples: FlowQueryInteger;
1275
+ readonly staleSamples: FlowQueryInteger;
1276
+ readonly futureSamples: FlowQueryInteger;
1277
+ readonly oldestCollectedAtMs?: FlowQueryInteger;
1278
+ readonly newestCollectedAtMs?: FlowQueryInteger;
1279
+ readonly oldestAgeMs?: FlowQueryInteger;
1280
+ readonly newestAgeMs?: FlowQueryInteger;
1281
+ readonly raw: Readonly<Record<string, unknown>>;
1282
+ }
1207
1283
  interface FlowQueryIndex {
1208
1284
  readonly id: string;
1209
1285
  readonly version: FlowQueryInteger;
1210
1286
  readonly buildId: string;
1211
- readonly state: string;
1287
+ readonly source: "runs";
1288
+ readonly state: "building" | "validating" | "active" | "retiring" | "failed";
1212
1289
  readonly queryable: boolean;
1290
+ readonly fields: readonly FlowQueryIndexField[];
1291
+ readonly workloads: readonly string[];
1292
+ readonly countPrefixes: readonly number[];
1213
1293
  readonly coveringFields: readonly string[];
1214
1294
  readonly format: FlowQueryIndexFormat;
1295
+ readonly coverage: FlowQueryIndexCoverage;
1296
+ readonly build: FlowQueryIndexBuild;
1297
+ readonly validation: FlowQueryIndexValidation;
1298
+ readonly retirement: FlowQueryIndexRetirement;
1299
+ readonly statistics: FlowQueryIndexStatistics;
1215
1300
  readonly raw: Readonly<Record<string, unknown>>;
1216
1301
  }
1217
1302
  interface FlowQueryIndexStatus {
1218
1303
  readonly contractVersion: "ferric.flow.query.indexes/v1";
1219
- readonly observedAtMs: number;
1220
- readonly statisticsMaxAgeMs: number;
1304
+ readonly observedAtMs: FlowQueryInteger;
1305
+ readonly statisticsMaxAgeMs: FlowQueryInteger;
1221
1306
  readonly registry: FlowQueryIndexRegistry;
1222
- readonly services: Readonly<Record<string, unknown>>;
1307
+ readonly services: FlowQueryIndexServices;
1223
1308
  readonly indexes: readonly FlowQueryIndex[];
1224
1309
  readonly raw: Readonly<Record<string, unknown>>;
1225
1310
  }
@@ -2567,7 +2652,7 @@ declare class WorkflowWorker {
2567
2652
  }
2568
2653
 
2569
2654
  /** TypeScript SDK package version. */
2570
- declare const FERRICSTORE_SDK_VERSION = "0.5.1";
2655
+ declare const FERRICSTORE_SDK_VERSION = "0.5.2";
2571
2656
  /** Oldest FerricStore server supported by this breaking beta contract. */
2572
2657
  declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.11.0";
2573
2658
  /** Native framing and opcode ABI version; unchanged by FerricStore 0.11. */
@@ -2576,4 +2661,4 @@ declare const FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
2576
2661
  /** @deprecated Use RequestDisposition; retained for source compatibility. */
2577
2662
  type ConnectionRequestDisposition = RequestDisposition;
2578
2663
 
2579
- export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowEventProjectionField, type FlowExplainResult, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, FlowProjection, type FlowProjectionField, type FlowProjectionShape, type FlowQueryCountResult, FlowQueryError, type FlowQueryErrorPosition, type FlowQueryIndex, type FlowQueryIndexFormat, type FlowQueryIndexRegistry, type FlowQueryIndexStatus, type FlowQueryInteger, type FlowQueryPage, type FlowQueryParameter, type FlowQueryParameters, type FlowQueryQuality, type FlowQueryRecord, type FlowQueryRecordsResult, type FlowQueryResult, type FlowQueryUsage, type FlowRecord, type FlowRunProjectionField, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, projectFlowQuery, retry, transition };
2664
+ export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowEventProjectionField, type FlowExplainCapabilities, type FlowExplainResult, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, FlowProjection, type FlowProjectionField, type FlowProjectionShape, type FlowQueryCountResult, FlowQueryError, type FlowQueryErrorPosition, type FlowQueryIndex, type FlowQueryIndexBuild, type FlowQueryIndexCoverage, type FlowQueryIndexField, type FlowQueryIndexFormat, type FlowQueryIndexProgress, type FlowQueryIndexRegistry, type FlowQueryIndexRetirement, type FlowQueryIndexServiceState, type FlowQueryIndexServices, type FlowQueryIndexStatistics, type FlowQueryIndexStatus, type FlowQueryIndexValidation, type FlowQueryInteger, type FlowQueryPage, type FlowQueryParameter, type FlowQueryParameters, type FlowQueryQuality, type FlowQueryRecord, type FlowQueryRecordsResult, type FlowQueryResult, type FlowQueryUsage, type FlowRecord, type FlowRunProjectionField, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, projectFlowQuery, retry, transition };
package/dist/index.d.ts CHANGED
@@ -1122,10 +1122,10 @@ interface FlowQueryPage {
1122
1122
  readonly cursor?: string;
1123
1123
  }
1124
1124
  interface FlowQueryQuality {
1125
- readonly exactness: string;
1126
- readonly freshness: string;
1127
- readonly coverage: string;
1128
- readonly pagination: string;
1125
+ readonly exactness: "authoritative" | "projected_exact" | "exact" | "not_applicable";
1126
+ readonly freshness: "current" | "projection_watermark" | "not_applicable";
1127
+ readonly coverage: "complete" | "unavailable";
1128
+ readonly pagination: "none" | "complete" | "authenticated_seek" | "live_seek";
1129
1129
  }
1130
1130
  interface FlowQueryUsage {
1131
1131
  readonly rangeSeeks: number;
@@ -1181,13 +1181,25 @@ declare class FlowQueryError extends FerricStoreError {
1181
1181
  readonly cause?: unknown;
1182
1182
  });
1183
1183
  }
1184
+ interface FlowExplainCapabilities {
1185
+ readonly requested: readonly string[];
1186
+ readonly available: readonly string[];
1187
+ readonly missing: readonly string[];
1188
+ readonly raw: Readonly<Record<string, unknown>>;
1189
+ }
1184
1190
  interface FlowExplainResult {
1185
1191
  readonly version: "ferric.flow.explain/v1";
1186
1192
  readonly queryFingerprint: string;
1187
1193
  readonly status: "planned" | "rejected" | "executed";
1188
1194
  readonly plan: Readonly<Record<string, unknown>>;
1189
1195
  readonly estimate: Readonly<Record<string, unknown>>;
1196
+ readonly stats?: Readonly<Record<string, unknown>>;
1197
+ readonly quality?: FlowQueryQuality;
1190
1198
  readonly bounds: Readonly<Record<string, unknown>>;
1199
+ readonly pressure?: Readonly<Record<string, unknown>>;
1200
+ readonly decision?: Readonly<Record<string, unknown>>;
1201
+ readonly alternatives: readonly Readonly<Record<string, unknown>>[];
1202
+ readonly capabilities?: FlowExplainCapabilities;
1191
1203
  readonly actual?: FlowQueryUsage;
1192
1204
  readonly diagnostic?: FlowQueryError;
1193
1205
  readonly raw: Readonly<Record<string, unknown>>;
@@ -1196,6 +1208,20 @@ interface FlowQueryIndexRegistry {
1196
1208
  readonly epoch: FlowQueryInteger;
1197
1209
  readonly catalogVersion: FlowQueryInteger;
1198
1210
  }
1211
+ type FlowQueryIndexServiceState = "ready" | "unavailable";
1212
+ interface FlowQueryIndexServices {
1213
+ readonly registry: FlowQueryIndexServiceState;
1214
+ readonly lifecycleWorker: FlowQueryIndexServiceState;
1215
+ readonly statisticsStore: FlowQueryIndexServiceState;
1216
+ readonly statisticsWorker: FlowQueryIndexServiceState;
1217
+ readonly raw: Readonly<Record<string, unknown>>;
1218
+ }
1219
+ interface FlowQueryIndexField {
1220
+ readonly name: string;
1221
+ readonly direction: "asc" | "desc";
1222
+ readonly encoding: "hashed" | "ordered";
1223
+ readonly raw: Readonly<Record<string, unknown>>;
1224
+ }
1199
1225
  interface FlowQueryIndexFormat {
1200
1226
  readonly queryRow: string;
1201
1227
  readonly key: string;
@@ -1204,22 +1230,81 @@ interface FlowQueryIndexFormat {
1204
1230
  readonly counter?: string;
1205
1231
  readonly raw: Readonly<Record<string, unknown>>;
1206
1232
  }
1233
+ interface FlowQueryIndexCoverage {
1234
+ readonly completeShards: FlowQueryInteger;
1235
+ readonly totalShards: FlowQueryInteger;
1236
+ readonly validation: "pending" | "passed" | "failed";
1237
+ readonly raw: Readonly<Record<string, unknown>>;
1238
+ }
1239
+ interface FlowQueryIndexProgress {
1240
+ readonly scope: "catalog_build";
1241
+ readonly phaseCounts: Readonly<Record<string, FlowQueryInteger>>;
1242
+ readonly currentPhases: readonly string[];
1243
+ readonly completedShards: FlowQueryInteger;
1244
+ readonly totalShards: FlowQueryInteger;
1245
+ readonly raw: Readonly<Record<string, unknown>>;
1246
+ }
1247
+ interface FlowQueryIndexBuild extends FlowQueryIndexProgress {
1248
+ readonly scannedRecords: FlowQueryInteger;
1249
+ readonly writtenEntries: FlowQueryInteger;
1250
+ readonly writtenBytes: FlowQueryInteger;
1251
+ }
1252
+ interface FlowQueryIndexValidation extends FlowQueryIndexProgress {
1253
+ readonly status: "pending" | "passed" | "failed";
1254
+ readonly checkedRecords: FlowQueryInteger;
1255
+ readonly checkedEntries: FlowQueryInteger;
1256
+ readonly mismatches: FlowQueryInteger;
1257
+ readonly failureReason?: string;
1258
+ readonly validatedAtMs?: FlowQueryInteger;
1259
+ }
1260
+ interface FlowQueryIndexRetirement {
1261
+ readonly status: "not_applicable" | "pending" | "complete";
1262
+ readonly phaseCounts?: Readonly<Record<string, FlowQueryInteger>>;
1263
+ readonly currentPhases?: readonly string[];
1264
+ readonly completedShards?: FlowQueryInteger;
1265
+ readonly totalShards?: FlowQueryInteger;
1266
+ readonly deletedEntries?: FlowQueryInteger;
1267
+ readonly deletedBytes?: FlowQueryInteger;
1268
+ readonly rewrittenReverseRows?: FlowQueryInteger;
1269
+ readonly raw: Readonly<Record<string, unknown>>;
1270
+ }
1271
+ interface FlowQueryIndexStatistics {
1272
+ readonly status: "fresh" | "stale" | "future" | "mixed" | "missing" | "unavailable";
1273
+ readonly samples: FlowQueryInteger;
1274
+ readonly freshSamples: FlowQueryInteger;
1275
+ readonly staleSamples: FlowQueryInteger;
1276
+ readonly futureSamples: FlowQueryInteger;
1277
+ readonly oldestCollectedAtMs?: FlowQueryInteger;
1278
+ readonly newestCollectedAtMs?: FlowQueryInteger;
1279
+ readonly oldestAgeMs?: FlowQueryInteger;
1280
+ readonly newestAgeMs?: FlowQueryInteger;
1281
+ readonly raw: Readonly<Record<string, unknown>>;
1282
+ }
1207
1283
  interface FlowQueryIndex {
1208
1284
  readonly id: string;
1209
1285
  readonly version: FlowQueryInteger;
1210
1286
  readonly buildId: string;
1211
- readonly state: string;
1287
+ readonly source: "runs";
1288
+ readonly state: "building" | "validating" | "active" | "retiring" | "failed";
1212
1289
  readonly queryable: boolean;
1290
+ readonly fields: readonly FlowQueryIndexField[];
1291
+ readonly workloads: readonly string[];
1292
+ readonly countPrefixes: readonly number[];
1213
1293
  readonly coveringFields: readonly string[];
1214
1294
  readonly format: FlowQueryIndexFormat;
1295
+ readonly coverage: FlowQueryIndexCoverage;
1296
+ readonly build: FlowQueryIndexBuild;
1297
+ readonly validation: FlowQueryIndexValidation;
1298
+ readonly retirement: FlowQueryIndexRetirement;
1299
+ readonly statistics: FlowQueryIndexStatistics;
1215
1300
  readonly raw: Readonly<Record<string, unknown>>;
1216
1301
  }
1217
1302
  interface FlowQueryIndexStatus {
1218
1303
  readonly contractVersion: "ferric.flow.query.indexes/v1";
1219
- readonly observedAtMs: number;
1220
- readonly statisticsMaxAgeMs: number;
1304
+ readonly observedAtMs: FlowQueryInteger;
1305
+ readonly statisticsMaxAgeMs: FlowQueryInteger;
1221
1306
  readonly registry: FlowQueryIndexRegistry;
1222
- readonly services: Readonly<Record<string, unknown>>;
1307
+ readonly services: FlowQueryIndexServices;
1223
1308
  readonly indexes: readonly FlowQueryIndex[];
1224
1309
  readonly raw: Readonly<Record<string, unknown>>;
1225
1310
  }
@@ -2567,7 +2652,7 @@ declare class WorkflowWorker {
2567
2652
  }
2568
2653
 
2569
2654
  /** TypeScript SDK package version. */
2570
- declare const FERRICSTORE_SDK_VERSION = "0.5.1";
2655
+ declare const FERRICSTORE_SDK_VERSION = "0.5.2";
2571
2656
  /** Oldest FerricStore server supported by this breaking beta contract. */
2572
2657
  declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.11.0";
2573
2658
  /** Native framing and opcode ABI version; unchanged by FerricStore 0.11. */
@@ -2576,4 +2661,4 @@ declare const FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
2576
2661
  /** @deprecated Use RequestDisposition; retained for source compatibility. */
2577
2662
  type ConnectionRequestDisposition = RequestDisposition;
2578
2663
 
2579
- export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowEventProjectionField, type FlowExplainResult, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, FlowProjection, type FlowProjectionField, type FlowProjectionShape, type FlowQueryCountResult, FlowQueryError, type FlowQueryErrorPosition, type FlowQueryIndex, type FlowQueryIndexFormat, type FlowQueryIndexRegistry, type FlowQueryIndexStatus, type FlowQueryInteger, type FlowQueryPage, type FlowQueryParameter, type FlowQueryParameters, type FlowQueryQuality, type FlowQueryRecord, type FlowQueryRecordsResult, type FlowQueryResult, type FlowQueryUsage, type FlowRecord, type FlowRunProjectionField, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, projectFlowQuery, retry, transition };
2664
+ export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowEventProjectionField, type FlowExplainCapabilities, type FlowExplainResult, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, FlowProjection, type FlowProjectionField, type FlowProjectionShape, type FlowQueryCountResult, FlowQueryError, type FlowQueryErrorPosition, type FlowQueryIndex, type FlowQueryIndexBuild, type FlowQueryIndexCoverage, type FlowQueryIndexField, type FlowQueryIndexFormat, type FlowQueryIndexProgress, type FlowQueryIndexRegistry, type FlowQueryIndexRetirement, type FlowQueryIndexServiceState, type FlowQueryIndexServices, type FlowQueryIndexStatistics, type FlowQueryIndexStatus, type FlowQueryIndexValidation, type FlowQueryInteger, type FlowQueryPage, type FlowQueryParameter, type FlowQueryParameters, type FlowQueryQuality, type FlowQueryRecord, type FlowQueryRecordsResult, type FlowQueryResult, type FlowQueryUsage, type FlowRecord, type FlowRunProjectionField, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, projectFlowQuery, retry, transition };