@ocap/types 1.31.3 → 1.31.5

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.
@@ -61,7 +61,7 @@ export interface ILedgerEntry {
61
61
 
62
62
  /**
63
63
  * Storage row type for ledger entries (used by adapters)
64
- * Uses camelCase to match TypeScript conventions and statedb-dolt patterns
64
+ * Uses camelCase to match TypeScript conventions
65
65
  */
66
66
  export interface ILedgerEntryRow {
67
67
  sequence: number;
@@ -131,7 +131,7 @@ export interface ICheckpoint {
131
131
 
132
132
  /**
133
133
  * Storage row type for checkpoints (used by adapters)
134
- * Uses camelCase to match TypeScript conventions and statedb-dolt patterns
134
+ * Uses camelCase to match TypeScript conventions
135
135
  */
136
136
  export interface ICheckpointRow {
137
137
  height: number;
@@ -280,7 +280,7 @@ export interface IEntryHashPolicy {
280
280
  }
281
281
 
282
282
  /**
283
- * Storage adapter interface - SQLite/Dolt implement this
283
+ * Storage adapter interface - SQLite implements this
284
284
  */
285
285
  export interface ILedgerStorage {
286
286
  /** Entry hash policy used by this storage for append/finalize (optional; absent = v2 everywhere). */
@@ -599,6 +599,22 @@ export interface IWriterLeaseConfig {
599
599
  enabled: boolean;
600
600
  holderId: string;
601
601
  ttlMs?: number;
602
+ /**
603
+ * Automatically acquire the lease in `init()`, renew it periodically in the background,
604
+ * and release it on `close()`. Defaults to `false` so manual takeover tests and callers
605
+ * keep explicit control over `acquireLease` / `renewLease` / `releaseLease`.
606
+ */
607
+ autoAcquire?: boolean;
608
+ /**
609
+ * Optional background renewal interval in ms when `autoAcquire` is `true`
610
+ * (defaults to `Math.max(1000, Math.floor(ttlMs / 3))`).
611
+ */
612
+ renewIntervalMs?: number;
613
+ /**
614
+ * With `autoAcquire`, how long `init()` keeps retrying while another holder still owns the lease
615
+ * (e.g. the previous process during an upgrade). Defaults to 0: reject immediately.
616
+ */
617
+ startupWaitMs?: number;
602
618
  }
603
619
 
604
620
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocap/types",
3
- "version": "1.31.3",
3
+ "version": "1.31.5",
4
4
  "description": "Typescript definitions generated from protobuf",
5
5
  "keywords": [
6
6
  "ocap",