@effect-agent/storage-cloudflare 0.1.0-beta.35 → 0.1.0-beta.37

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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AbortCommand, AbortIntent, AdmissionConflict, AdmissionRequest, AdmissionResult, AppendConflict, AppendResult, CanonicalRecordEnvelope, ChildSettledNotification, ConversationExport, ConversationExportRequest, ConversationMaterialization, ConversationNotMaterialized, ConversationRead, ConversationStore, ConversationStoreError, ConversationTail, ConversationTailRequest, FenceRejected, FencedAppendRequest, JoinedToHost, LedgerError, MarkReadyRequest, SettlementConflict, SubmissionLedger, SubmissionLookupByKey, SubmissionSnapshot } from "@effect-agent/session";
1
+ import { AbortCommand, AbortIntent, AdmissionConflict, AdmissionRequest, AdmissionResult, AppendConflict, AppendResult, CanonicalRecordEnvelope, ChildSettledNotification, ConversationExport, ConversationExportRequest, ConversationMaterialization, ConversationNotMaterialized, ConversationRead, ConversationStore, ConversationStoreError, ConversationTail, ConversationTailRequest, FenceRejected, FencedAppendRequest, JoinedToHost, LedgerError, MarkReadyRequest, ScheduleFailpointError, ScheduleStorageError, ScheduleStore, SettlementConflict, SubmissionLedger, SubmissionLookupByKey, SubmissionSnapshot } from "@effect-agent/session";
2
2
  import { Context, Crypto, Effect, Layer, Schema } from "effect";
3
3
  import { SqliteMigrator } from "@effect/sql-sqlite-do";
4
4
  import * as SqlClientService from "effect/unstable/sql/SqlClient";
@@ -260,6 +260,35 @@ declare const submissionLedgerLayer: Layer.Layer<SubmissionLedger, DoStorageInit
260
260
  */
261
261
  declare const ledgerLayer: (options: DoStorageOptions) => Layer.Layer<SubmissionLedger, DoStorageInitializationError>;
262
262
  //#endregion
263
+ //#region src/do-schedule-store.d.ts
264
+ interface DoScheduleAlarmReplacement {
265
+ readonly deadlineAtMillis: number | null;
266
+ /** Included in every logical alarm payload so equal-time replacement stays distinguishable. */
267
+ readonly generation: number;
268
+ }
269
+ type DoScheduleReplaceAlarm = (replacement: DoScheduleAlarmReplacement) => Effect.Effect<void, ScheduleStorageError>;
270
+ declare const DoScheduleTransaction_base: Context.ServiceClass<DoScheduleTransaction, "@effect-agent/storage-cloudflare/DoScheduleTransaction", {
271
+ readonly run: <A, E, R>(body: (replaceAlarm: DoScheduleReplaceAlarm) => Effect.Effect<A, E, R>) => Effect.Effect<A, E | ScheduleStorageError, R>;
272
+ }>;
273
+ /**
274
+ * Platform-owned transaction boundary for schedule SQL and logical alarm mutation. The callback
275
+ * and its `replaceAlarm` capability belong to one fiber and must not escape or fork.
276
+ */
277
+ declare class DoScheduleTransaction extends DoScheduleTransaction_base {}
278
+ declare const DoScheduleAlarmControl_base: Context.ServiceClass<DoScheduleAlarmControl, "@effect-agent/storage-cloudflare/DoScheduleAlarmControl", {
279
+ /** Establish a future recovery wake before cross-Object admission starts. */
280
+ readonly prearm: (deadlineAtMillis: number) => Effect.Effect<void, ScheduleStorageError | ScheduleFailpointError>;
281
+ /** Replace or cancel the wake from the object's authoritative indexed deadline. */
282
+ readonly reconcile: Effect.Effect<void, ScheduleStorageError | ScheduleFailpointError>;
283
+ }>;
284
+ /** Platform driver operations that use the same schedule-state and alarm transaction. */
285
+ declare class DoScheduleAlarmControl extends DoScheduleAlarmControl_base {}
286
+ /**
287
+ * Durable Object SQLite ScheduleStore. Platform code supplies the one transaction owner that
288
+ * combines these SQL mutations with its logical and native alarm lifecycle.
289
+ */
290
+ declare const scheduleStoreLayer: Layer.Layer<ScheduleStore | DoScheduleAlarmControl, ScheduleStorageError, SqlClientService.SqlClient | DoScheduleTransaction>;
291
+ //#endregion
263
292
  //#region src/port-protocol.d.ts
264
293
  /**
265
294
  * The cross-Durable-Object port protocol (plan §1.3, D-P6-3): Schema request/response/error
@@ -1773,5 +1802,5 @@ declare const executePortRequest: (request: LedgerAdmitCall | LedgerLookupCall |
1773
1802
  */
1774
1803
  declare const handleEncodedPortRequest: (encoded: unknown) => Effect.Effect<unknown, never, ConversationStore | SubmissionLedger>;
1775
1804
  //#endregion
1776
- export { ConversationPortTransport, CurrentDoStorageVersion, DEFAULT_MAX_STORED_VALUE_BYTES, DoAppendConflict, DoCheckpointConflict, DoFenceRejected, DoLedgerError, DoStorageCompatibilityError, DoStorageConfig, DoStorageConfigValue, DoStorageCorruptionError, DoStorageError, DoStorageFailpoint, DoStorageFailpointError, DoStorageFailpointHandler, DoStorageFailpointLocation, DoStorageFailpointTestControl, DoStorageInitializationError, DoStorageOptions, DoValueBoundExceeded, LedgerAdmitCall, LedgerAdmitResult, LedgerLookupCall, LedgerLookupResult, LedgerMarkReadyCall, LedgerMarkReadyResult, LedgerRecordChildSettledCall, LedgerRecordChildSettledResult, LedgerRequestAbortCall, LedgerRequestAbortResult, LedgerResolveAdmissionCall, LedgerResolveAdmissionResult, MAX_PORT_DIAGNOSTIC_LENGTH, PortFailed, PortFailure, PortProtocolError, PortRequest, PortRequestEnvelope, PortResponse, PortResponseEnvelope, PortResult, PortSucceeded, PortTransportError, RoutedPortOptions, StoreAppendCall, StoreAppendResult, StoreExportCall, StoreExportResult, StoreInspectTailCall, StoreInspectTailResult, StoreMaterializeCall, StoreMaterializeResult, StoreReadPageCall, StoreReadPageResult, boundPortDiagnostic, conversationStoreLayer, decodePortRequest, decodePortResponse, doMigrations, encodePortRequest, encodePortResponse, evictionFailpointHandler, executePortRequest, handleEncodedPortRequest, layer, ledgerLayer, observationOffsetAt, portTransportFailure, routedConversationStoreLayer, routedSubmissionLedgerLayer, storageConfigLayer, storageFailpointLayer, submissionLedgerLayer };
1805
+ export { ConversationPortTransport, CurrentDoStorageVersion, DEFAULT_MAX_STORED_VALUE_BYTES, DoAppendConflict, DoCheckpointConflict, DoFenceRejected, DoLedgerError, DoScheduleAlarmControl, DoScheduleAlarmReplacement, DoScheduleReplaceAlarm, DoScheduleTransaction, DoStorageCompatibilityError, DoStorageConfig, DoStorageConfigValue, DoStorageCorruptionError, DoStorageError, DoStorageFailpoint, DoStorageFailpointError, DoStorageFailpointHandler, DoStorageFailpointLocation, DoStorageFailpointTestControl, DoStorageInitializationError, DoStorageOptions, DoValueBoundExceeded, LedgerAdmitCall, LedgerAdmitResult, LedgerLookupCall, LedgerLookupResult, LedgerMarkReadyCall, LedgerMarkReadyResult, LedgerRecordChildSettledCall, LedgerRecordChildSettledResult, LedgerRequestAbortCall, LedgerRequestAbortResult, LedgerResolveAdmissionCall, LedgerResolveAdmissionResult, MAX_PORT_DIAGNOSTIC_LENGTH, PortFailed, PortFailure, PortProtocolError, PortRequest, PortRequestEnvelope, PortResponse, PortResponseEnvelope, PortResult, PortSucceeded, PortTransportError, RoutedPortOptions, StoreAppendCall, StoreAppendResult, StoreExportCall, StoreExportResult, StoreInspectTailCall, StoreInspectTailResult, StoreMaterializeCall, StoreMaterializeResult, StoreReadPageCall, StoreReadPageResult, boundPortDiagnostic, conversationStoreLayer, decodePortRequest, decodePortResponse, doMigrations, encodePortRequest, encodePortResponse, evictionFailpointHandler, executePortRequest, handleEncodedPortRequest, layer, ledgerLayer, observationOffsetAt, portTransportFailure, routedConversationStoreLayer, routedSubmissionLedgerLayer, scheduleStoreLayer, storageConfigLayer, storageFailpointLayer, submissionLedgerLayer };
1777
1806
  //# sourceMappingURL=index.d.mts.map