bunqueue-client 0.1.9 → 0.2.1

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 (582) hide show
  1. package/CHANGELOG.md +165 -0
  2. package/LEGACY.md +460 -0
  3. package/README.md +204 -349
  4. package/dist/ack-batcher.js +7 -67
  5. package/dist/canonical-manifest.json +934 -0
  6. package/dist/chunk-b967v3w3.js +79 -0
  7. package/dist/chunk-fekm0ma6.js +110 -0
  8. package/dist/chunk-jxkszwqp.js +573 -0
  9. package/dist/embedded.js +16510 -0
  10. package/dist/frame.js +14 -57
  11. package/dist/index.d.ts +1 -27
  12. package/dist/index.js +10953 -16
  13. package/dist/legacy.d.ts +1 -0
  14. package/dist/legacy.js +2081 -0
  15. package/dist/{ack-batcher.d.ts → types/sdk/typescript/src/ack-batcher.d.ts} +3 -3
  16. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/aging.d.ts +2 -2
  17. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/batch.d.ts +2 -2
  18. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/bunqueue-api.d.ts +5 -5
  19. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/bunqueue.d.ts +13 -13
  20. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/circuit-breaker.d.ts +2 -2
  21. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/dedup-debounce.d.ts +2 -2
  22. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/dlq-rate-limit.d.ts +2 -2
  23. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/rate-gate.d.ts +1 -1
  24. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/retry.d.ts +1 -1
  25. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/triggers.d.ts +3 -3
  26. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/ttl.d.ts +1 -1
  27. package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/types.d.ts +4 -4
  28. package/dist/types/sdk/typescript/src/canonical-transport/bun-sqlite-types.d.ts +21 -0
  29. package/dist/{connection-pool.d.ts → types/sdk/typescript/src/connection-pool.d.ts} +1 -1
  30. package/dist/{connection-types.d.ts → types/sdk/typescript/src/connection-types.d.ts} +1 -1
  31. package/dist/{connection.d.ts → types/sdk/typescript/src/connection.d.ts} +6 -19
  32. package/dist/{errors.d.ts → types/sdk/typescript/src/errors.d.ts} +3 -0
  33. package/dist/types/sdk/typescript/src/flow-commit.d.ts +5 -0
  34. package/dist/types/sdk/typescript/src/flow-plan-legacy.d.ts +13 -0
  35. package/dist/types/sdk/typescript/src/flow-plan.d.ts +29 -0
  36. package/dist/{flow-types.d.ts → types/sdk/typescript/src/flow-types.d.ts} +7 -4
  37. package/dist/{flow.d.ts → types/sdk/typescript/src/flow.d.ts} +6 -10
  38. package/dist/{frame.d.ts → types/sdk/typescript/src/frame.d.ts} +1 -1
  39. package/dist/types/sdk/typescript/src/index.d.ts +10 -0
  40. package/dist/{job.d.ts → types/sdk/typescript/src/job.d.ts} +4 -3
  41. package/dist/types/sdk/typescript/src/legacy.d.ts +27 -0
  42. package/dist/{observability.d.ts → types/sdk/typescript/src/observability.d.ts} +14 -0
  43. package/dist/{queue-admin.d.ts → types/sdk/typescript/src/queue-admin.d.ts} +3 -4
  44. package/dist/{queue-control.d.ts → types/sdk/typescript/src/queue-control.d.ts} +5 -5
  45. package/dist/{queue-query.d.ts → types/sdk/typescript/src/queue-query.d.ts} +3 -3
  46. package/dist/{queue.d.ts → types/sdk/typescript/src/queue.d.ts} +8 -8
  47. package/dist/{responses.d.ts → types/sdk/typescript/src/responses.d.ts} +2 -2
  48. package/dist/types/sdk/typescript/src/serialization.d.ts +10 -0
  49. package/dist/{socket-factory.d.ts → types/sdk/typescript/src/socket-factory.d.ts} +1 -1
  50. package/dist/types/sdk/typescript/src/terminal-outcome.d.ts +8 -0
  51. package/dist/{types.d.ts → types/sdk/typescript/src/types.d.ts} +5 -2
  52. package/dist/{worker-base.d.ts → types/sdk/typescript/src/worker-base.d.ts} +6 -6
  53. package/dist/types/sdk/typescript/src/worker-slot-signal.d.ts +6 -0
  54. package/dist/{worker-types.d.ts → types/sdk/typescript/src/worker-types.d.ts} +3 -3
  55. package/dist/{worker.d.ts → types/sdk/typescript/src/worker.d.ts} +3 -2
  56. package/dist/types/src/application/background/dlq.d.ts +2 -0
  57. package/dist/types/src/application/background/lifecycle.d.ts +4 -0
  58. package/dist/types/src/application/background/recovery/active.d.ts +5 -0
  59. package/dist/types/src/application/background/recovery/index.d.ts +2 -0
  60. package/dist/types/src/application/background/recovery/pending.d.ts +3 -0
  61. package/dist/types/src/application/background/recovery/restore.d.ts +5 -0
  62. package/dist/types/src/application/background/recovery/shared.d.ts +6 -0
  63. package/dist/types/src/application/background/timeouts.d.ts +25 -0
  64. package/dist/types/src/application/backgroundTasks.d.ts +7 -0
  65. package/dist/types/src/application/cleanupTasks.d.ts +10 -0
  66. package/dist/types/src/application/clientOwnership.d.ts +65 -0
  67. package/dist/types/src/application/clientTracking.d.ts +40 -0
  68. package/dist/types/src/application/completedCleanup.d.ts +34 -0
  69. package/dist/types/src/application/completedRetry.d.ts +21 -0
  70. package/dist/types/src/application/contextFactory.d.ts +49 -0
  71. package/dist/types/src/application/dependencyCompletions.d.ts +63 -0
  72. package/dist/types/src/application/dependencyProcessor.d.ts +15 -0
  73. package/dist/types/src/application/dependencyResultTracker.d.ts +18 -0
  74. package/dist/types/src/application/dlqManager.d.ts +49 -0
  75. package/dist/types/src/application/dlqRetry.d.ts +12 -0
  76. package/dist/types/src/application/emptyQueueCleanup.d.ts +3 -0
  77. package/dist/types/src/application/eventsManager.d.ts +50 -0
  78. package/dist/types/src/application/flowFailureRecovery.d.ts +20 -0
  79. package/dist/types/src/application/flowParentBackpatch.d.ts +27 -0
  80. package/dist/types/src/application/jobLogsManager.d.ts +21 -0
  81. package/dist/types/src/application/latencyTracker.d.ts +39 -0
  82. package/dist/types/src/application/lockManager.d.ts +15 -0
  83. package/dist/types/src/application/lockOperations.d.ts +38 -0
  84. package/dist/types/src/application/metricsExporter.d.ts +27 -0
  85. package/dist/types/src/application/monitoringChecks.d.ts +36 -0
  86. package/dist/types/src/application/operations/ack/batch.d.ts +8 -0
  87. package/dist/types/src/application/operations/ack/completion.d.ts +3 -0
  88. package/dist/types/src/application/operations/ack/failure.d.ts +3 -0
  89. package/dist/types/src/application/operations/ack.d.ts +5 -0
  90. package/dist/types/src/application/operations/ackHelpers.d.ts +36 -0
  91. package/dist/types/src/application/operations/customId.d.ts +51 -0
  92. package/dist/types/src/application/operations/flowPush.d.ts +9 -0
  93. package/dist/types/src/application/operations/flowTopologyValidation.d.ts +3 -0
  94. package/dist/types/src/application/operations/flowValidation.d.ts +3 -0
  95. package/dist/types/src/application/operations/jobClaim.d.ts +17 -0
  96. package/dist/types/src/application/operations/jobManagement.d.ts +45 -0
  97. package/dist/types/src/application/operations/jobMoveOperations.d.ts +9 -0
  98. package/dist/types/src/application/operations/jobPromotion.d.ts +7 -0
  99. package/dist/types/src/application/operations/jobStateTransitions.d.ts +15 -0
  100. package/dist/types/src/application/operations/parentLink.d.ts +36 -0
  101. package/dist/types/src/application/operations/parentLinkInput.d.ts +8 -0
  102. package/dist/types/src/application/operations/pull.d.ts +20 -0
  103. package/dist/types/src/application/operations/pullFinalization.d.ts +6 -0
  104. package/dist/types/src/application/operations/pullStateTransition.d.ts +51 -0
  105. package/dist/types/src/application/operations/push.d.ts +13 -0
  106. package/dist/types/src/application/operations/pushAdmission.d.ts +36 -0
  107. package/dist/types/src/application/operations/pushBatch.d.ts +4 -0
  108. package/dist/types/src/application/operations/pushContext.d.ts +48 -0
  109. package/dist/types/src/application/operations/pushDeduplication.d.ts +42 -0
  110. package/dist/types/src/application/operations/pushInsert.d.ts +39 -0
  111. package/dist/types/src/application/operations/pushLocks.d.ts +15 -0
  112. package/dist/types/src/application/operations/query/collect.d.ts +12 -0
  113. package/dist/types/src/application/operations/query/jobLookup.d.ts +9 -0
  114. package/dist/types/src/application/operations/query/pagination.d.ts +8 -0
  115. package/dist/types/src/application/operations/query/state.d.ts +4 -0
  116. package/dist/types/src/application/operations/queryOperations.d.ts +5 -0
  117. package/dist/types/src/application/operations/queueControl.d.ts +50 -0
  118. package/dist/types/src/application/orphanRecovery.d.ts +25 -0
  119. package/dist/types/src/application/prometheusOperationalMetrics.d.ts +31 -0
  120. package/dist/types/src/application/queue-manager/ack.d.ts +23 -0
  121. package/dist/types/src/application/queue-manager/configuration.d.ts +27 -0
  122. package/dist/types/src/application/queue-manager/context.d.ts +5 -0
  123. package/dist/types/src/application/queue-manager/control.d.ts +20 -0
  124. package/dist/types/src/application/queue-manager/delivery.d.ts +33 -0
  125. package/dist/types/src/application/queue-manager/dependencies.d.ts +8 -0
  126. package/dist/types/src/application/queue-manager/dependency-runtime.d.ts +8 -0
  127. package/dist/types/src/application/queue-manager/flow-failures.d.ts +18 -0
  128. package/dist/types/src/application/queue-manager/flow-options.d.ts +8 -0
  129. package/dist/types/src/application/queue-manager/job-management.d.ts +17 -0
  130. package/dist/types/src/application/queue-manager/lifecycle.d.ts +4 -0
  131. package/dist/types/src/application/queue-manager/limits.d.ts +58 -0
  132. package/dist/types/src/application/queue-manager/locks.d.ts +21 -0
  133. package/dist/types/src/application/queue-manager/observability.d.ts +16 -0
  134. package/dist/types/src/application/queue-manager/queries.d.ts +24 -0
  135. package/dist/types/src/application/queue-manager/repeat.d.ts +4 -0
  136. package/dist/types/src/application/queue-manager/services.d.ts +19 -0
  137. package/dist/types/src/application/queue-manager/state.d.ts +98 -0
  138. package/dist/types/src/application/queue-manager/stats.d.ts +28 -0
  139. package/dist/types/src/application/queueManager.d.ts +5 -0
  140. package/dist/types/src/application/queueStatsAggregator.d.ts +23 -0
  141. package/dist/types/src/application/queueTelemetryJournal.d.ts +24 -0
  142. package/dist/types/src/application/repeatJobs.d.ts +7 -0
  143. package/dist/types/src/application/stallDetection.d.ts +26 -0
  144. package/dist/types/src/application/statsManager.d.ts +59 -0
  145. package/dist/types/src/application/taskErrorTracking.d.ts +22 -0
  146. package/dist/types/src/application/throughputTracker.d.ts +34 -0
  147. package/dist/types/src/application/types/ack.d.ts +136 -0
  148. package/dist/types/src/application/types/background.d.ts +18 -0
  149. package/dist/types/src/application/types/config.d.ts +41 -0
  150. package/dist/types/src/application/types/contextFactory.d.ts +89 -0
  151. package/dist/types/src/application/types/contexts.d.ts +117 -0
  152. package/dist/types/src/application/types/index.d.ts +7 -0
  153. package/dist/types/src/application/types/query.d.ts +23 -0
  154. package/dist/types/src/application/types/queueManager.d.ts +100 -0
  155. package/dist/types/src/application/webhookManager.d.ts +47 -0
  156. package/dist/types/src/application/workerManager.d.ts +61 -0
  157. package/dist/types/src/client/bunqueue/aging.d.ts +16 -0
  158. package/dist/types/src/client/bunqueue/batch.d.ts +16 -0
  159. package/dist/types/src/client/bunqueue/cancellation.d.ts +21 -0
  160. package/dist/types/src/client/bunqueue/circuitBreaker.d.ts +21 -0
  161. package/dist/types/src/client/bunqueue/dedupDebounce.d.ts +12 -0
  162. package/dist/types/src/client/bunqueue/dlqRateLimit.d.ts +26 -0
  163. package/dist/types/src/client/bunqueue/retry.d.ts +8 -0
  164. package/dist/types/src/client/bunqueue/runtime.d.ts +35 -0
  165. package/dist/types/src/client/bunqueue/triggers.d.ts +17 -0
  166. package/dist/types/src/client/bunqueue/ttl.d.ts +17 -0
  167. package/dist/types/src/client/bunqueue/types.d.ts +147 -0
  168. package/dist/types/src/client/bunqueue.d.ts +73 -0
  169. package/dist/types/src/client/dlqConversion.d.ts +5 -0
  170. package/dist/types/src/client/errors.d.ts +24 -0
  171. package/dist/types/src/client/events.d.ts +85 -0
  172. package/dist/types/src/client/flow.d.ts +70 -0
  173. package/dist/types/src/client/flowAtomic.d.ts +9 -0
  174. package/dist/types/src/client/flowJobCoreMethods.d.ts +28 -0
  175. package/dist/types/src/client/flowJobDependencies.d.ts +7 -0
  176. package/dist/types/src/client/flowJobFactory.d.ts +24 -0
  177. package/dist/types/src/client/flowJobMoveMethods.d.ts +16 -0
  178. package/dist/types/src/client/flowJobTypes.d.ts +29 -0
  179. package/dist/types/src/client/flowLegacyPlan.d.ts +16 -0
  180. package/dist/types/src/client/flowOptions.d.ts +10 -0
  181. package/dist/types/src/client/flowPlan.d.ts +16 -0
  182. package/dist/types/src/client/flowPush.d.ts +27 -0
  183. package/dist/types/src/client/flowReader.d.ts +10 -0
  184. package/dist/types/src/client/flowResults.d.ts +11 -0
  185. package/dist/types/src/client/flowTypes.d.ts +77 -0
  186. package/dist/types/src/client/forwarder.d.ts +75 -0
  187. package/dist/types/src/client/groupId.d.ts +1 -0
  188. package/dist/types/src/client/index.d.ts +46 -0
  189. package/dist/types/src/client/jobConversion.d.ts +10 -0
  190. package/dist/types/src/client/jobConversionHelpers.d.ts +28 -0
  191. package/dist/types/src/client/jobConversionTypes.d.ts +88 -0
  192. package/dist/types/src/client/jobDeduplication.d.ts +6 -0
  193. package/dist/types/src/client/jobHelpers.d.ts +31 -0
  194. package/dist/types/src/client/legacyConnectionOptions.d.ts +8 -0
  195. package/dist/types/src/client/manager.d.ts +15 -0
  196. package/dist/types/src/client/pro.d.ts +9 -0
  197. package/dist/types/src/client/queue/addBatcher.d.ts +59 -0
  198. package/dist/types/src/client/queue/bullmqCompat.d.ts +57 -0
  199. package/dist/types/src/client/queue/deduplication.d.ts +14 -0
  200. package/dist/types/src/client/queue/dlq.d.ts +61 -0
  201. package/dist/types/src/client/queue/dlqJobMethods.d.ts +9 -0
  202. package/dist/types/src/client/queue/dlqOps.d.ts +26 -0
  203. package/dist/types/src/client/queue/dlqStats.d.ts +3 -0
  204. package/dist/types/src/client/queue/failWire.d.ts +17 -0
  205. package/dist/types/src/client/queue/helpers.d.ts +19 -0
  206. package/dist/types/src/client/queue/job-proxy/dependencies.d.ts +9 -0
  207. package/dist/types/src/client/queue/job-proxy/reflection.d.ts +2 -0
  208. package/dist/types/src/client/queue/job-proxy/simple.d.ts +3 -0
  209. package/dist/types/src/client/queue/job-proxy/tcp.d.ts +4 -0
  210. package/dist/types/src/client/queue/jobMetadata.d.ts +10 -0
  211. package/dist/types/src/client/queue/jobMove.d.ts +32 -0
  212. package/dist/types/src/client/queue/jobProxy.d.ts +4 -0
  213. package/dist/types/src/client/queue/operations/add/bulk.d.ts +7 -0
  214. package/dist/types/src/client/queue/operations/add/payload.d.ts +25 -0
  215. package/dist/types/src/client/queue/operations/add/single.d.ts +3 -0
  216. package/dist/types/src/client/queue/operations/add.d.ts +2 -0
  217. package/dist/types/src/client/queue/operations/control.d.ts +42 -0
  218. package/dist/types/src/client/queue/operations/counts.d.ts +48 -0
  219. package/dist/types/src/client/queue/operations/groups.d.ts +24 -0
  220. package/dist/types/src/client/queue/operations/management.d.ts +51 -0
  221. package/dist/types/src/client/queue/operations/query.d.ts +50 -0
  222. package/dist/types/src/client/queue/operations/queryStates.d.ts +13 -0
  223. package/dist/types/src/client/queue/operations/queryTcpPages.d.ts +14 -0
  224. package/dist/types/src/client/queue/queue.d.ts +12 -0
  225. package/dist/types/src/client/queue/rateLimit.d.ts +46 -0
  226. package/dist/types/src/client/queue/runtime/compatibility.d.ts +13 -0
  227. package/dist/types/src/client/queue/runtime/configuration.d.ts +46 -0
  228. package/dist/types/src/client/queue/runtime/connection.d.ts +6 -0
  229. package/dist/types/src/client/queue/runtime/control.d.ts +41 -0
  230. package/dist/types/src/client/queue/runtime/queries.d.ts +66 -0
  231. package/dist/types/src/client/queue/runtime/scheduling.d.ts +33 -0
  232. package/dist/types/src/client/queue/runtime/state.d.ts +101 -0
  233. package/dist/types/src/client/queue/scheduler.d.ts +58 -0
  234. package/dist/types/src/client/queue/schedulerPagination.d.ts +7 -0
  235. package/dist/types/src/client/queue/stall.d.ts +20 -0
  236. package/dist/types/src/client/queue/types/add.d.ts +40 -0
  237. package/dist/types/src/client/queue/types/contexts.d.ts +33 -0
  238. package/dist/types/src/client/queue/types/index.d.ts +3 -0
  239. package/dist/types/src/client/queue/types/job.d.ts +50 -0
  240. package/dist/types/src/client/queue/types/runtime.d.ts +35 -0
  241. package/dist/types/src/client/queue/workers.d.ts +36 -0
  242. package/dist/types/src/client/queue-events/tcpSubscription.d.ts +23 -0
  243. package/dist/types/src/client/queue.d.ts +5 -0
  244. package/dist/types/src/client/queueGroup.d.ts +51 -0
  245. package/dist/types/src/client/resolveToken.d.ts +10 -0
  246. package/dist/types/src/client/sandboxed/index.d.ts +7 -0
  247. package/dist/types/src/client/sandboxed/queueOps.d.ts +24 -0
  248. package/dist/types/src/client/sandboxed/runtime/dispatch.d.ts +13 -0
  249. package/dist/types/src/client/sandboxed/runtime/lifecycle.d.ts +20 -0
  250. package/dist/types/src/client/sandboxed/runtime/log.d.ts +1 -0
  251. package/dist/types/src/client/sandboxed/runtime/pool.d.ts +11 -0
  252. package/dist/types/src/client/sandboxed/runtime/recovery.d.ts +11 -0
  253. package/dist/types/src/client/sandboxed/runtime/state.d.ts +39 -0
  254. package/dist/types/src/client/sandboxed/types/index.d.ts +2 -0
  255. package/dist/types/src/client/sandboxed/types/options.d.ts +27 -0
  256. package/dist/types/src/client/sandboxed/types/process.d.ts +39 -0
  257. package/dist/types/src/client/sandboxed/worker.d.ts +4 -0
  258. package/dist/types/src/client/sandboxed/wrapper.d.ts +12 -0
  259. package/dist/types/src/client/sandboxedWorker.d.ts +6 -0
  260. package/dist/types/src/client/tcp/client.d.ts +6 -0
  261. package/dist/types/src/client/tcp/commandQueue.d.ts +23 -0
  262. package/dist/types/src/client/tcp/connection.d.ts +4 -0
  263. package/dist/types/src/client/tcp/errors.d.ts +6 -0
  264. package/dist/types/src/client/tcp/health.d.ts +60 -0
  265. package/dist/types/src/client/tcp/index.d.ts +11 -0
  266. package/dist/types/src/client/tcp/reconnect.d.ts +47 -0
  267. package/dist/types/src/client/tcp/runtime/commands.d.ts +9 -0
  268. package/dist/types/src/client/tcp/runtime/connectivity.d.ts +13 -0
  269. package/dist/types/src/client/tcp/runtime/health.d.ts +14 -0
  270. package/dist/types/src/client/tcp/runtime/lifecycle.d.ts +8 -0
  271. package/dist/types/src/client/tcp/runtime/state.d.ts +50 -0
  272. package/dist/types/src/client/tcp/shared.d.ts +12 -0
  273. package/dist/types/src/client/tcp/transport.d.ts +18 -0
  274. package/dist/types/src/client/tcp/types/command.d.ts +9 -0
  275. package/dist/types/src/client/tcp/types/connection.d.ts +31 -0
  276. package/dist/types/src/client/tcp/types/index.d.ts +5 -0
  277. package/dist/types/src/client/tcp/types/socket.d.ts +8 -0
  278. package/dist/types/src/client/tcp/types/tls.d.ts +4 -0
  279. package/dist/types/src/client/tcp/types.d.ts +2 -0
  280. package/dist/types/src/client/tcpClient.d.ts +6 -0
  281. package/dist/types/src/client/tcpPool.d.ts +69 -0
  282. package/dist/types/src/client/types/connection.d.ts +30 -0
  283. package/dist/types/src/client/types/dlq.d.ts +45 -0
  284. package/dist/types/src/client/types/events.d.ts +54 -0
  285. package/dist/types/src/client/types/flow.d.ts +22 -0
  286. package/dist/types/src/client/types/index.d.ts +10 -0
  287. package/dist/types/src/client/types/job.d.ts +131 -0
  288. package/dist/types/src/client/types/metrics.d.ts +1 -0
  289. package/dist/types/src/client/types/options.d.ts +72 -0
  290. package/dist/types/src/client/types/worker.d.ts +54 -0
  291. package/dist/types/src/client/types.d.ts +2 -0
  292. package/dist/types/src/client/worker/ackBatcher.d.ts +55 -0
  293. package/dist/types/src/client/worker/ackFrontier.d.ts +21 -0
  294. package/dist/types/src/client/worker/ackOutcome.d.ts +8 -0
  295. package/dist/types/src/client/worker/batchExecution.d.ts +14 -0
  296. package/dist/types/src/client/worker/constants.d.ts +7 -0
  297. package/dist/types/src/client/worker/groupConcurrency.d.ts +49 -0
  298. package/dist/types/src/client/worker/handlers/completion.d.ts +29 -0
  299. package/dist/types/src/client/worker/handlers/dependencies.d.ts +11 -0
  300. package/dist/types/src/client/worker/handlers/mutations.d.ts +23 -0
  301. package/dist/types/src/client/worker/handlers/queries.d.ts +15 -0
  302. package/dist/types/src/client/worker/jobParser.d.ts +9 -0
  303. package/dist/types/src/client/worker/processor.d.ts +11 -0
  304. package/dist/types/src/client/worker/processorHandlers.d.ts +4 -0
  305. package/dist/types/src/client/worker/processorOutcome.d.ts +14 -0
  306. package/dist/types/src/client/worker/processorResult.d.ts +2 -0
  307. package/dist/types/src/client/worker/runtime/buffer.d.ts +8 -0
  308. package/dist/types/src/client/worker/runtime/control.d.ts +28 -0
  309. package/dist/types/src/client/worker/runtime/execution.d.ts +16 -0
  310. package/dist/types/src/client/worker/runtime/lifecycle.d.ts +7 -0
  311. package/dist/types/src/client/worker/runtime/manual.d.ts +10 -0
  312. package/dist/types/src/client/worker/runtime/options.d.ts +5 -0
  313. package/dist/types/src/client/worker/runtime/polling.d.ts +14 -0
  314. package/dist/types/src/client/worker/runtime/state.d.ts +121 -0
  315. package/dist/types/src/client/worker/types/index.d.ts +5 -0
  316. package/dist/types/src/client/worker/types/manual.d.ts +7 -0
  317. package/dist/types/src/client/worker/types/options.d.ts +26 -0
  318. package/dist/types/src/client/worker/types/outcome.d.ts +23 -0
  319. package/dist/types/src/client/worker/types/processor.d.ts +25 -0
  320. package/dist/types/src/client/worker/types/transport.d.ts +11 -0
  321. package/dist/types/src/client/worker/worker.d.ts +6 -0
  322. package/dist/types/src/client/worker/workerHeartbeat.d.ts +15 -0
  323. package/dist/types/src/client/worker/workerPull.d.ts +24 -0
  324. package/dist/types/src/client/worker/workerRateLimiter.d.ts +51 -0
  325. package/dist/types/src/client/worker.d.ts +6 -0
  326. package/dist/types/src/client/workflow/admission.d.ts +45 -0
  327. package/dist/types/src/client/workflow/clock.d.ts +60 -0
  328. package/dist/types/src/client/workflow/compensationChild.d.ts +33 -0
  329. package/dist/types/src/client/workflow/compensationClaim.d.ts +11 -0
  330. package/dist/types/src/client/workflow/compensationPass.d.ts +17 -0
  331. package/dist/types/src/client/workflow/compensationSupport.d.ts +24 -0
  332. package/dist/types/src/client/workflow/compensator.d.ts +34 -0
  333. package/dist/types/src/client/workflow/definitionGuard.d.ts +11 -0
  334. package/dist/types/src/client/workflow/emitter.d.ts +17 -0
  335. package/dist/types/src/client/workflow/engine.d.ts +66 -0
  336. package/dist/types/src/client/workflow/eventTypes.d.ts +44 -0
  337. package/dist/types/src/client/workflow/executionFence.d.ts +15 -0
  338. package/dist/types/src/client/workflow/executionTypes.d.ts +133 -0
  339. package/dist/types/src/client/workflow/executor.d.ts +52 -0
  340. package/dist/types/src/client/workflow/executorLifecycle.d.ts +19 -0
  341. package/dist/types/src/client/workflow/executorNodes.d.ts +18 -0
  342. package/dist/types/src/client/workflow/executorQueue.d.ts +9 -0
  343. package/dist/types/src/client/workflow/forEachRunner.d.ts +4 -0
  344. package/dist/types/src/client/workflow/identity.d.ts +48 -0
  345. package/dist/types/src/client/workflow/index.d.ts +23 -0
  346. package/dist/types/src/client/workflow/loops.d.ts +11 -0
  347. package/dist/types/src/client/workflow/mapRunner.d.ts +4 -0
  348. package/dist/types/src/client/workflow/recovery.d.ts +32 -0
  349. package/dist/types/src/client/workflow/rollbackControl.d.ts +37 -0
  350. package/dist/types/src/client/workflow/runner.d.ts +23 -0
  351. package/dist/types/src/client/workflow/runnerTiming.d.ts +14 -0
  352. package/dist/types/src/client/workflow/stepTypes.d.ts +171 -0
  353. package/dist/types/src/client/workflow/store.d.ts +83 -0
  354. package/dist/types/src/client/workflow/storeCodec.d.ts +7 -0
  355. package/dist/types/src/client/workflow/storeExecutionCodec.d.ts +11 -0
  356. package/dist/types/src/client/workflow/storeListing.d.ts +11 -0
  357. package/dist/types/src/client/workflow/storeMaintenance.d.ts +4 -0
  358. package/dist/types/src/client/workflow/storeSignals.d.ts +70 -0
  359. package/dist/types/src/client/workflow/subWorkflowRunner.d.ts +14 -0
  360. package/dist/types/src/client/workflow/types.d.ts +4 -0
  361. package/dist/types/src/client/workflow/unwindPlan.d.ts +87 -0
  362. package/dist/types/src/client/workflow/waitFor.d.ts +56 -0
  363. package/dist/types/src/client/workflow/workflow.d.ts +70 -0
  364. package/dist/types/src/client/workflow/workflowDecisions.d.ts +11 -0
  365. package/dist/types/src/client/workflow/workflowDefinition.d.ts +16 -0
  366. package/dist/types/src/client/workflow/workflowIntrospection.d.ts +5 -0
  367. package/dist/types/src/client/workflow/workflowValidation.d.ts +44 -0
  368. package/dist/types/src/config/index.d.ts +9 -0
  369. package/dist/types/src/config/loader.d.ts +7 -0
  370. package/dist/types/src/config/resolve.d.ts +59 -0
  371. package/dist/types/src/config/types.d.ts +88 -0
  372. package/dist/types/src/domain/job/constants.d.ts +14 -0
  373. package/dist/types/src/domain/job/create.d.ts +9 -0
  374. package/dist/types/src/domain/job/groupFifoOrder.d.ts +9 -0
  375. package/dist/types/src/domain/job/ids.d.ts +7 -0
  376. package/dist/types/src/domain/job/locks.d.ts +16 -0
  377. package/dist/types/src/domain/job/payload.d.ts +18 -0
  378. package/dist/types/src/domain/job/state.d.ts +23 -0
  379. package/dist/types/src/domain/job/terminal.d.ts +3 -0
  380. package/dist/types/src/domain/queue/dependencyTracker.d.ts +78 -0
  381. package/dist/types/src/domain/queue/dlqShard.d.ts +66 -0
  382. package/dist/types/src/domain/queue/groupLimiterManager.d.ts +30 -0
  383. package/dist/types/src/domain/queue/groupScheduler.d.ts +31 -0
  384. package/dist/types/src/domain/queue/groupSchedulerOrder.d.ts +6 -0
  385. package/dist/types/src/domain/queue/limiterManager.d.ts +68 -0
  386. package/dist/types/src/domain/queue/priorityQueue.d.ts +54 -0
  387. package/dist/types/src/domain/queue/priorityQueueOrder.d.ts +3 -0
  388. package/dist/types/src/domain/queue/shard/dependencies.d.ts +11 -0
  389. package/dist/types/src/domain/queue/shard/dlq.d.ts +26 -0
  390. package/dist/types/src/domain/queue/shard/keys.d.ts +19 -0
  391. package/dist/types/src/domain/queue/shard/lifecycle.d.ts +10 -0
  392. package/dist/types/src/domain/queue/shard/limits.d.ts +47 -0
  393. package/dist/types/src/domain/queue/shard/metrics.d.ts +32 -0
  394. package/dist/types/src/domain/queue/shard/state.d.ts +40 -0
  395. package/dist/types/src/domain/queue/shard.d.ts +7 -0
  396. package/dist/types/src/domain/queue/shardCounters.d.ts +35 -0
  397. package/dist/types/src/domain/queue/temporalIndex.d.ts +24 -0
  398. package/dist/types/src/domain/queue/temporalManager.d.ts +72 -0
  399. package/dist/types/src/domain/queue/uniqueKeyManager.d.ts +33 -0
  400. package/dist/types/src/domain/queue/waiterManager.d.ts +18 -0
  401. package/dist/types/src/domain/response/builders.d.ts +15 -0
  402. package/dist/types/src/domain/types/command.d.ts +2 -0
  403. package/dist/types/src/domain/types/commands/base.d.ts +5 -0
  404. package/dist/types/src/domain/types/commands/core.d.ts +107 -0
  405. package/dist/types/src/domain/types/commands/cron.d.ts +36 -0
  406. package/dist/types/src/domain/types/commands/dashboard.d.ts +13 -0
  407. package/dist/types/src/domain/types/commands/dlq.d.ts +44 -0
  408. package/dist/types/src/domain/types/commands/extended.d.ts +63 -0
  409. package/dist/types/src/domain/types/commands/index.d.ts +12 -0
  410. package/dist/types/src/domain/types/commands/limits.d.ts +108 -0
  411. package/dist/types/src/domain/types/commands/management.d.ts +73 -0
  412. package/dist/types/src/domain/types/commands/monitoring.d.ts +49 -0
  413. package/dist/types/src/domain/types/commands/protocol.d.ts +20 -0
  414. package/dist/types/src/domain/types/commands/query.d.ts +46 -0
  415. package/dist/types/src/domain/types/commands/union.d.ts +13 -0
  416. package/dist/types/src/domain/types/commands/workers.d.ts +39 -0
  417. package/dist/types/src/domain/types/cron.d.ts +89 -0
  418. package/dist/types/src/domain/types/deduplication.d.ts +43 -0
  419. package/dist/types/src/domain/types/dlq.d.ts +136 -0
  420. package/dist/types/src/domain/types/flow.d.ts +25 -0
  421. package/dist/types/src/domain/types/group.d.ts +26 -0
  422. package/dist/types/src/domain/types/job.d.ts +8 -0
  423. package/dist/types/src/domain/types/jobs/model.d.ts +150 -0
  424. package/dist/types/src/domain/types/metrics.d.ts +16 -0
  425. package/dist/types/src/domain/types/priorityQueue.d.ts +13 -0
  426. package/dist/types/src/domain/types/protocol.d.ts +5 -0
  427. package/dist/types/src/domain/types/queue.d.ts +110 -0
  428. package/dist/types/src/domain/types/response.d.ts +3 -0
  429. package/dist/types/src/domain/types/responses/model.d.ts +152 -0
  430. package/dist/types/src/domain/types/shard.d.ts +4 -0
  431. package/dist/types/src/domain/types/stall.d.ts +48 -0
  432. package/dist/types/src/domain/types/webhook.d.ts +42 -0
  433. package/dist/types/src/domain/types/worker.d.ts +40 -0
  434. package/dist/types/src/infrastructure/backup/backupTelemetry.d.ts +30 -0
  435. package/dist/types/src/infrastructure/backup/s3BackupConfig.d.ts +80 -0
  436. package/dist/types/src/infrastructure/cloud/types/config.d.ts +18 -0
  437. package/dist/types/src/infrastructure/cloud/types/event.d.ts +14 -0
  438. package/dist/types/src/infrastructure/cloud/types/snapshot.d.ts +52 -0
  439. package/dist/types/src/infrastructure/cloud/types/snapshotCore.d.ts +125 -0
  440. package/dist/types/src/infrastructure/cloud/types/snapshotJobs.d.ts +124 -0
  441. package/dist/types/src/infrastructure/cloud/types/snapshotTelemetry.d.ts +100 -0
  442. package/dist/types/src/infrastructure/cloud/types.d.ts +3 -0
  443. package/dist/types/src/infrastructure/persistence/batchInsert.d.ts +13 -0
  444. package/dist/types/src/infrastructure/persistence/completedJobCountSchema.d.ts +6 -0
  445. package/dist/types/src/infrastructure/persistence/dependencyCompletionSchema.d.ts +6 -0
  446. package/dist/types/src/infrastructure/persistence/dependencyCompletionStore.d.ts +40 -0
  447. package/dist/types/src/infrastructure/persistence/index.d.ts +5 -0
  448. package/dist/types/src/infrastructure/persistence/jobOptionsBlob.d.ts +19 -0
  449. package/dist/types/src/infrastructure/persistence/legacyNameMigration.d.ts +17 -0
  450. package/dist/types/src/infrastructure/persistence/migrationProgressSchema.d.ts +2 -0
  451. package/dist/types/src/infrastructure/persistence/migrations.d.ts +3 -0
  452. package/dist/types/src/infrastructure/persistence/schema.d.ts +8 -0
  453. package/dist/types/src/infrastructure/persistence/sqlite/admission.d.ts +9 -0
  454. package/dist/types/src/infrastructure/persistence/sqlite/completed.d.ts +17 -0
  455. package/dist/types/src/infrastructure/persistence/sqlite/control.d.ts +48 -0
  456. package/dist/types/src/infrastructure/persistence/sqlite/flows.d.ts +26 -0
  457. package/dist/types/src/infrastructure/persistence/sqlite/jobLifecycle.d.ts +17 -0
  458. package/dist/types/src/infrastructure/persistence/sqlite/jobs.d.ts +15 -0
  459. package/dist/types/src/infrastructure/persistence/sqlite/lifecycle.d.ts +6 -0
  460. package/dist/types/src/infrastructure/persistence/sqlite/mutations.d.ts +27 -0
  461. package/dist/types/src/infrastructure/persistence/sqlite/queries.d.ts +23 -0
  462. package/dist/types/src/infrastructure/persistence/sqlite/queueDeletionSql.d.ts +3 -0
  463. package/dist/types/src/infrastructure/persistence/sqlite/records.d.ts +24 -0
  464. package/dist/types/src/infrastructure/persistence/sqlite/state.d.ts +42 -0
  465. package/dist/types/src/infrastructure/persistence/sqlite/telemetry.d.ts +17 -0
  466. package/dist/types/src/infrastructure/persistence/sqlite/telemetryStore.d.ts +30 -0
  467. package/dist/types/src/infrastructure/persistence/sqlite/telemetryWrites.d.ts +47 -0
  468. package/dist/types/src/infrastructure/persistence/sqlite.d.ts +6 -0
  469. package/dist/types/src/infrastructure/persistence/sqliteBatch.d.ts +4 -0
  470. package/dist/types/src/infrastructure/persistence/sqliteMigration.d.ts +5 -0
  471. package/dist/types/src/infrastructure/persistence/sqliteSerializer.d.ts +50 -0
  472. package/dist/types/src/infrastructure/persistence/statements.d.ts +86 -0
  473. package/dist/types/src/infrastructure/persistence/types/admission.d.ts +8 -0
  474. package/dist/types/src/infrastructure/persistence/types/batch.d.ts +12 -0
  475. package/dist/types/src/infrastructure/persistence/types/sqlite.d.ts +27 -0
  476. package/dist/types/src/infrastructure/persistence/writeBuffer.d.ts +48 -0
  477. package/dist/types/src/infrastructure/persistence/writeBufferPending.d.ts +11 -0
  478. package/dist/types/src/infrastructure/scheduler/cron/execution.d.ts +12 -0
  479. package/dist/types/src/infrastructure/scheduler/cron/persisted.d.ts +5 -0
  480. package/dist/types/src/infrastructure/scheduler/cron/runtime.d.ts +31 -0
  481. package/dist/types/src/infrastructure/scheduler/cron/validation.d.ts +3 -0
  482. package/dist/types/src/infrastructure/scheduler/cronParser.d.ts +45 -0
  483. package/dist/types/src/infrastructure/scheduler/cronScheduler.d.ts +5 -0
  484. package/dist/types/src/infrastructure/scheduler/types/cronScheduler.d.ts +16 -0
  485. package/dist/types/src/infrastructure/server/protocol/commands.d.ts +8 -0
  486. package/dist/types/src/infrastructure/server/protocol/frameParser.d.ts +16 -0
  487. package/dist/types/src/infrastructure/server/protocol/lineBuffer.d.ts +6 -0
  488. package/dist/types/src/infrastructure/server/protocol/validation.d.ts +10 -0
  489. package/dist/types/src/infrastructure/server/protocol.d.ts +6 -0
  490. package/dist/types/src/infrastructure/server/socketWriteQueue.d.ts +66 -0
  491. package/dist/types/src/infrastructure/server/types/protocol.d.ts +4 -0
  492. package/dist/types/src/require-bun.d.ts +13 -0
  493. package/dist/types/src/shared/asyncLock.d.ts +13 -0
  494. package/dist/types/src/shared/boundedMap.d.ts +30 -0
  495. package/dist/types/src/shared/boundedSet.d.ts +26 -0
  496. package/dist/types/src/shared/hash.d.ts +30 -0
  497. package/dist/types/src/shared/histogram.d.ts +23 -0
  498. package/dist/types/src/shared/lock.d.ts +13 -0
  499. package/dist/types/src/shared/lockError.d.ts +3 -0
  500. package/dist/types/src/shared/lockTimeout.d.ts +2 -0
  501. package/dist/types/src/shared/logger.d.ts +48 -0
  502. package/dist/types/src/shared/lru.d.ts +9 -0
  503. package/dist/types/src/shared/lruMap.d.ts +42 -0
  504. package/dist/types/src/shared/lruSet.d.ts +36 -0
  505. package/dist/types/src/shared/minHeap.d.ts +43 -0
  506. package/dist/types/src/shared/msgpack.d.ts +3 -0
  507. package/dist/types/src/shared/pausedView.d.ts +19 -0
  508. package/dist/types/src/shared/rwLock.d.ts +22 -0
  509. package/dist/types/src/shared/serialization.d.ts +24 -0
  510. package/dist/types/src/shared/skipList.d.ts +97 -0
  511. package/dist/types/src/shared/skipListNodes.d.ts +6 -0
  512. package/dist/types/src/shared/storageHealth.d.ts +9 -0
  513. package/dist/types/src/shared/ttlMap.d.ts +81 -0
  514. package/dist/types/src/shared/types/lock.d.ts +7 -0
  515. package/dist/types/src/shared/types/skipList.d.ts +4 -0
  516. package/dist/types/src/shared/version.d.ts +4 -0
  517. package/dist/types/src/shared/webhookValidation.d.ts +6 -0
  518. package/package.json +27 -9
  519. package/src/ack-batcher.ts +8 -5
  520. package/src/bunqueue/bunqueue-api.ts +1 -1
  521. package/src/bunqueue/bunqueue.ts +2 -1
  522. package/src/canonical-transport/bun-sqlite-types.ts +22 -0
  523. package/src/canonical-transport/dlq.ts +12 -0
  524. package/src/canonical-transport/embedded.ts +55 -0
  525. package/src/canonical-transport/runtime.ts +49 -0
  526. package/src/canonical-transport/thread-worker.ts +83 -0
  527. package/src/canonical-transport/transport.ts +153 -0
  528. package/src/connection.ts +25 -30
  529. package/src/errors.ts +3 -0
  530. package/src/flow-commit.ts +45 -0
  531. package/src/flow-plan-legacy.ts +117 -0
  532. package/src/flow-plan.ts +209 -0
  533. package/src/flow-types.ts +4 -0
  534. package/src/flow.ts +31 -163
  535. package/src/frame.ts +5 -2
  536. package/src/index.ts +7 -75
  537. package/src/job.ts +43 -9
  538. package/src/legacy.ts +91 -0
  539. package/src/observability.ts +59 -1
  540. package/src/queue-admin.ts +5 -5
  541. package/src/queue-control.ts +8 -6
  542. package/src/queue.ts +10 -6
  543. package/src/serialization.ts +93 -0
  544. package/src/terminal-outcome.ts +58 -0
  545. package/src/types.ts +3 -6
  546. package/src/worker-base.ts +9 -6
  547. package/src/worker-slot-signal.ts +23 -0
  548. package/src/worker.ts +11 -5
  549. package/dist/backpressure.js +0 -39
  550. package/dist/bunqueue/aging.js +0 -53
  551. package/dist/bunqueue/batch.js +0 -60
  552. package/dist/bunqueue/bunqueue-api.js +0 -116
  553. package/dist/bunqueue/bunqueue.js +0 -194
  554. package/dist/bunqueue/cancellation.js +0 -48
  555. package/dist/bunqueue/circuit-breaker.js +0 -69
  556. package/dist/bunqueue/dedup-debounce.js +0 -37
  557. package/dist/bunqueue/dlq-rate-limit.js +0 -65
  558. package/dist/bunqueue/rate-gate.js +0 -61
  559. package/dist/bunqueue/retry.js +0 -56
  560. package/dist/bunqueue/triggers.js +0 -42
  561. package/dist/bunqueue/ttl.js +0 -31
  562. package/dist/bunqueue/types.js +0 -6
  563. package/dist/connection-pool.js +0 -60
  564. package/dist/connection-types.js +0 -2
  565. package/dist/connection.js +0 -281
  566. package/dist/errors.js +0 -25
  567. package/dist/flow-types.js +0 -2
  568. package/dist/flow.js +0 -212
  569. package/dist/job.js +0 -155
  570. package/dist/observability.js +0 -110
  571. package/dist/queue-admin.js +0 -158
  572. package/dist/queue-control.js +0 -107
  573. package/dist/queue-query.js +0 -187
  574. package/dist/queue.js +0 -92
  575. package/dist/responses.js +0 -10
  576. package/dist/socket-factory.js +0 -47
  577. package/dist/types.js +0 -50
  578. package/dist/worker-base.js +0 -159
  579. package/dist/worker-types.js +0 -5
  580. package/dist/worker.js +0 -211
  581. /package/dist/{backpressure.d.ts → types/sdk/typescript/src/backpressure.d.ts} +0 -0
  582. /package/dist/{bunqueue → types/sdk/typescript/src/bunqueue}/cancellation.d.ts +0 -0
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Prepared SQLite statements
3
+ * Pre-compiled SQL for better performance
4
+ */
5
+ import type { Database } from "../../../sdk/typescript/src/canonical-transport/bun-sqlite-types.js";
6
+ /** Statement names */
7
+ export type StatementName = 'insertJob' | 'updateJobState' | 'completeJob' | 'updateJobProgress' | 'deleteJob' | 'deleteJobResult' | 'getJob' | 'insertResult' | 'getResult' | 'insertDlq' | 'loadDlq' | 'deleteDlqEntry' | 'deleteDlqEntryForQueue' | 'clearDlqQueue' | 'deleteDependencyCompletionForAdmission' | 'deleteFlowFailuresForAdmission' | 'pinDependencyCompletionForAdmission' | 'insertCron' | 'updateCron' | 'upsertQueueState' | 'loadQueueState' | 'deleteQueueState';
8
+ /** SQL statements */
9
+ export declare const SQL_STATEMENTS: Record<StatementName, string>;
10
+ /** Prepare all statements */
11
+ export declare function prepareStatements(db: Database): Map<StatementName, ReturnType<Database['prepare']>>;
12
+ /** Database row type for jobs (BLOB fields are Uint8Array from bun:sqlite) */
13
+ export interface DbJob {
14
+ id: string;
15
+ queue: string;
16
+ name: string | null;
17
+ data: Uint8Array;
18
+ priority: number;
19
+ created_at: number;
20
+ run_at: number;
21
+ started_at: number | null;
22
+ completed_at: number | null;
23
+ attempts: number;
24
+ max_attempts: number;
25
+ backoff: number;
26
+ ttl: number | null;
27
+ timeout: number | null;
28
+ unique_key: string | null;
29
+ custom_id: string | null;
30
+ depends_on: Uint8Array | null;
31
+ parent_id: string | null;
32
+ children_ids: Uint8Array | null;
33
+ tags: Uint8Array | null;
34
+ state: string;
35
+ lifo: number;
36
+ group_id: string | null;
37
+ progress: number | null;
38
+ progress_msg: string | null;
39
+ remove_on_complete: number;
40
+ remove_on_fail: number;
41
+ fail_parent_on_failure: number;
42
+ remove_dependency_on_failure: number;
43
+ continue_parent_on_failure: number;
44
+ ignore_dependency_on_failure: number;
45
+ stall_timeout: number | null;
46
+ last_heartbeat: number | null;
47
+ stall_count: number;
48
+ timeline: Uint8Array | null;
49
+ stacktrace: Uint8Array | null;
50
+ dlq_retry_state: Uint8Array | null;
51
+ extended_options: Uint8Array | null;
52
+ }
53
+ /** Database row type for cron jobs */
54
+ export interface DbCron {
55
+ name: string;
56
+ queue: string;
57
+ job_name: string | null;
58
+ data: Uint8Array;
59
+ schedule: string | null;
60
+ repeat_every: number | null;
61
+ priority: number;
62
+ next_run: number;
63
+ executions: number;
64
+ max_limit: number | null;
65
+ timezone: string | null;
66
+ unique_key: string | null;
67
+ dedup: Uint8Array | null;
68
+ skip_missed_on_restart: number;
69
+ skip_if_no_worker: number;
70
+ prevent_overlap: number;
71
+ job_options: Uint8Array | null;
72
+ }
73
+ /** Database row type for queue control-state (#100) */
74
+ export interface DbQueueState {
75
+ name: string;
76
+ paused: number;
77
+ rate_limit: number | null;
78
+ concurrency_limit: number | null;
79
+ rate_limit_duration: number | null;
80
+ rate_limit_expires_at: number | null;
81
+ stall_enabled: number | null;
82
+ stall_interval: number | null;
83
+ max_stalls: number | null;
84
+ stall_grace_period: number | null;
85
+ dlq_config: Uint8Array | null;
86
+ }
@@ -0,0 +1,8 @@
1
+ import type { JobId } from "../../../domain/types/job.js";
2
+ /** Extra persisted state carried by a two-phase job admission. */
3
+ export interface DurableAdmissionMetadata {
4
+ /** Terminal generation replaced by the incoming deterministic job ID. */
5
+ readonly retireGenerationId?: JobId;
6
+ /** Payload-free completion records referenced by the incoming job. */
7
+ readonly completionPins?: readonly JobId[];
8
+ }
@@ -0,0 +1,12 @@
1
+ import type { Job } from "../../../domain/types/job.js";
2
+ export interface BatchInsertResult {
3
+ transient: Job[];
4
+ conflicts: Job[];
5
+ error?: Error;
6
+ }
7
+ export type WriteBufferErrorCallback = (error: Error, jobCount: number, retryInfo?: {
8
+ retryCount: number;
9
+ nextBackoffMs: number;
10
+ maxRetries: number;
11
+ }) => void;
12
+ export type CriticalErrorCallback = (jobs: Job[], lastError: Error, totalAttempts: number) => void;
@@ -0,0 +1,27 @@
1
+ import type { Job, JobId, JobTimelineEntry } from "../../../domain/types/job.js";
2
+ export interface ActiveJobWrite {
3
+ jobId: JobId;
4
+ startedAt: number;
5
+ timeline?: JobTimelineEntry[];
6
+ }
7
+ export interface CompletedJobWrite {
8
+ jobId: JobId;
9
+ completedAt: number;
10
+ timeline?: JobTimelineEntry[];
11
+ }
12
+ export type SqliteCriticalLossCallback = (jobs: Job[], lastError: Error, attempts: number) => void;
13
+ export interface SqliteCriticalLoss {
14
+ jobs: Job[];
15
+ error: string;
16
+ attempts: number;
17
+ at: number;
18
+ }
19
+ export interface SqliteConfig {
20
+ path: string;
21
+ walMode?: boolean;
22
+ synchronous?: 'OFF' | 'NORMAL' | 'FULL';
23
+ cacheSize?: number;
24
+ writeBufferSize?: number;
25
+ writeBufferFlushMs?: number;
26
+ onCriticalLoss?: SqliteCriticalLossCallback;
27
+ }
@@ -0,0 +1,48 @@
1
+ import type { Job, JobId } from "../../domain/types/job.js";
2
+ import type { BatchInsertManager } from "./batchInsert.js";
3
+ import type { CriticalErrorCallback, WriteBufferErrorCallback } from "./types/batch.js";
4
+ import type { PersistedJobState } from "./sqliteSerializer.js";
5
+ export declare class WriteBuffer {
6
+ private activeBuffer;
7
+ private flushBuffer;
8
+ private flushing;
9
+ private stopped;
10
+ private timer;
11
+ private readonly batchManager;
12
+ private readonly bufferSize;
13
+ private readonly onError;
14
+ private readonly onCriticalError?;
15
+ private retryCount;
16
+ private currentBackoffMs;
17
+ private readonly initialBackoffMs;
18
+ private readonly maxBackoffMs;
19
+ private readonly maxRetries;
20
+ private lastError;
21
+ private backoffTimer;
22
+ private autoFlushDeferrals;
23
+ constructor(batchManager: BatchInsertManager, bufferSize: number, flushIntervalMs: number, onError: WriteBufferErrorCallback, onCriticalError?: CriticalErrorCallback);
24
+ add(job: Job): void;
25
+ addBatch(jobs: Job[]): void;
26
+ withDeferredAutoFlush<T>(operation: () => T): T;
27
+ flush(): number;
28
+ flushIfReady(): number;
29
+ private scheduleBackoffRetry;
30
+ get pendingCount(): number;
31
+ removePending(jobId: string): void;
32
+ removePendingForQueue(queue: string): JobId[];
33
+ hasPending(jobId: string): boolean;
34
+ getPendingJob(jobId: JobId): Job | null;
35
+ setPendingState(jobId: JobId, state: PersistedJobState): boolean;
36
+ getPendingJobs(queue?: string): Job[];
37
+ stop(): void;
38
+ stopGracefully(timeoutMs?: number): Promise<number>;
39
+ private clearBackoffRetry;
40
+ private resetRetryState;
41
+ private flushBestEffort;
42
+ private reportLostJobs;
43
+ getRetryState(): {
44
+ retryCount: number;
45
+ currentBackoffMs: number;
46
+ lastError: Error | null;
47
+ };
48
+ }
@@ -0,0 +1,11 @@
1
+ import type { Job, JobId } from "../../domain/types/job.js";
2
+ import { type PersistedJobState } from "./sqliteSerializer.js";
3
+ export type PendingBuffers = readonly [active: Job[], flushing: Job[]];
4
+ export declare function findPendingJob(buffers: PendingBuffers, jobId: JobId): Job | null;
5
+ export declare function setPendingJobState(buffers: PendingBuffers, jobId: JobId, state: PersistedJobState): boolean;
6
+ export declare function listPendingJobs(buffers: PendingBuffers, queue?: string): Job[];
7
+ export declare function removePendingJob(buffers: PendingBuffers, jobId: JobId): [Job[], Job[]];
8
+ export declare function removePendingQueue(buffers: PendingBuffers, queue: string): {
9
+ buffers: [Job[], Job[]];
10
+ removed: JobId[];
11
+ };
@@ -0,0 +1,12 @@
1
+ import { CronRuntime } from "./runtime.js";
2
+ /** Due-job execution and scheduler statistics. */
3
+ export declare class CronExecution extends CronRuntime {
4
+ protected tick(): Promise<void>;
5
+ private getSkipReason;
6
+ private fireCronJob;
7
+ getStats(): {
8
+ total: number;
9
+ pending: number;
10
+ nextRun: number | null;
11
+ };
12
+ }
@@ -0,0 +1,5 @@
1
+ import { type CronJob } from "../../../domain/types/cron.js";
2
+ /** Reject persisted Croner-only syntax before any scheduler state is mutated. */
3
+ export declare function assertPersistedCronSupported(cron: CronJob): void;
4
+ /** Validate a persisted collection atomically before loading any definition. */
5
+ export declare function assertPersistedCronsSupported(crons: readonly CronJob[]): void;
@@ -0,0 +1,31 @@
1
+ import { type CronJob, type CronJobInput } from "../../../domain/types/cron.js";
2
+ import { MinHeap } from "../../../shared/minHeap.js";
3
+ import type { CronHeapEntry, CronRegistryEntry, CronSchedulerConfig, PersistCronCallback, PushJobCallback } from "../types/cronScheduler.js";
4
+ /** Registry, timers, and schedule mutation shared with cron execution. */
5
+ export declare abstract class CronRuntime {
6
+ protected readonly cronJobs: Map<string, CronRegistryEntry>;
7
+ protected readonly cronHeap: MinHeap<CronHeapEntry>;
8
+ protected generation: number;
9
+ protected nextTimer: ReturnType<typeof setTimeout> | null;
10
+ protected safetyInterval: ReturnType<typeof setInterval> | null;
11
+ protected started: boolean;
12
+ protected pushJob: PushJobCallback | null;
13
+ protected persistCron: PersistCronCallback | null;
14
+ protected hasWorkers: ((queue: string) => boolean) | null;
15
+ protected dashboardEmit: ((event: string, data: Record<string, unknown>) => void) | null;
16
+ protected readonly lastFiredAt: Map<string, number>;
17
+ protected abstract tick(): Promise<void>;
18
+ constructor(config?: CronSchedulerConfig);
19
+ setPushCallback(callback: PushJobCallback): void;
20
+ setPersistCallback(callback: PersistCronCallback): void;
21
+ setWorkerCheckCallback(callback: (queue: string) => boolean): void;
22
+ setDashboardEmit(callback: (event: string, data: Record<string, unknown>) => void): void;
23
+ start(): void;
24
+ stop(): void;
25
+ add(input: CronJobInput): CronJob;
26
+ remove(name: string): boolean;
27
+ get(name: string): CronJob | undefined;
28
+ list(): CronJob[];
29
+ load(crons: CronJob[]): void;
30
+ protected scheduleNext(): void;
31
+ }
@@ -0,0 +1,3 @@
1
+ import { type CronJobInput } from "../../../domain/types/cron.js";
2
+ /** Reject invalid timing, calendar syntax, and timezones before state mutation. */
3
+ export declare function assertValidCronInput(input: CronJobInput): void;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Cron Expression Parser
3
+ * Parses 5-6 field cron expressions and calculates next run time with Bun.cron
4
+ */
5
+ /**
6
+ * Validate a cron expression
7
+ * @param expression - Cron expression (5 or 6 fields)
8
+ * @param timezone - Optional IANA timezone (e.g., "Europe/Rome")
9
+ * @returns null if valid, error message if invalid
10
+ */
11
+ export declare function validateCronExpression(expression: string, timezone?: string): string | null;
12
+ /**
13
+ * Calculate next run time from a cron expression
14
+ * @param expression - Cron expression
15
+ * @param fromTime - Start time (default: now)
16
+ * @param timezone - Optional IANA timezone (e.g., "Europe/Rome", "America/New_York")
17
+ * @returns Next run timestamp in milliseconds
18
+ */
19
+ export declare function getNextCronRun(expression: string, fromTime?: number, timezone?: string): number;
20
+ /**
21
+ * Calculate next run time from repeatEvery interval
22
+ * @param intervalMs - Interval in milliseconds
23
+ * @param lastRun - Last run timestamp
24
+ * @returns Next run timestamp
25
+ */
26
+ export declare function getNextIntervalRun(intervalMs: number, lastRun?: number): number;
27
+ /**
28
+ * Check if a cron job is due to run
29
+ * @param nextRun - Scheduled next run time
30
+ * @param now - Current time (default: Date.now())
31
+ * @returns true if job should run
32
+ */
33
+ export declare function isDue(nextRun: number, now?: number): boolean;
34
+ /**
35
+ * Parse common cron shortcuts
36
+ */
37
+ export declare const CRON_SHORTCUTS: Record<string, string>;
38
+ /**
39
+ * Expand cron shortcut to full expression
40
+ */
41
+ export declare function expandCronShortcut(expression: string): string;
42
+ /**
43
+ * Get human-readable description of cron schedule
44
+ */
45
+ export declare function describeCron(expression: string): string;
@@ -0,0 +1,5 @@
1
+ import { CronExecution } from "./cron/execution.js";
2
+ export type { CronSchedulerConfig, PersistCronCallback, PushJobCallback, } from "./types/cronScheduler.js";
3
+ /** Event-driven cron scheduler façade. */
4
+ export declare class CronScheduler extends CronExecution {
5
+ }
@@ -0,0 +1,16 @@
1
+ import type { CronJob } from "../../../domain/types/cron.js";
2
+ import type { JobInput } from "../../../domain/types/job.js";
3
+ export interface CronSchedulerConfig {
4
+ /** @deprecated The scheduler now uses a precise event-driven timer. */
5
+ checkIntervalMs?: number;
6
+ }
7
+ export type PushJobCallback = (queue: string, input: JobInput) => Promise<void>;
8
+ export type PersistCronCallback = (name: string, executions: number, nextRun: number) => void;
9
+ export interface CronHeapEntry {
10
+ cron: CronJob;
11
+ generation: number;
12
+ }
13
+ export interface CronRegistryEntry {
14
+ cron: CronJob;
15
+ generation: number;
16
+ }
@@ -0,0 +1,8 @@
1
+ import type { Command } from "../../../domain/types/command.js";
2
+ import { type Response } from "../../../domain/types/response.js";
3
+ import type { ConnectionState } from "../types/protocol.js";
4
+ export declare function parseCommand(data: string): Command | null;
5
+ export declare function serializeResponse(response: Response): string;
6
+ export declare function parseCommands(data: string): Command[];
7
+ export declare function createConnectionState(clientId: string): ConnectionState;
8
+ export declare function errorResponse(message: string, requestId?: string): string;
@@ -0,0 +1,16 @@
1
+ export declare const MAX_FRAME_SIZE: number;
2
+ export declare class FrameSizeError extends Error {
3
+ readonly requestedSize: number;
4
+ readonly maxSize: number;
5
+ constructor(requestedSize: number, maxSize: number);
6
+ }
7
+ export declare class FrameParser {
8
+ private buffer;
9
+ private readonly maxFrameSize;
10
+ constructor(maxFrameSize?: number);
11
+ addData(data: Uint8Array): Uint8Array[];
12
+ get bufferedBytes(): number;
13
+ get hasPartialFrame(): boolean;
14
+ clear(): void;
15
+ static frame(data: Uint8Array): Uint8Array;
16
+ }
@@ -0,0 +1,6 @@
1
+ export declare class LineBuffer {
2
+ private buffer;
3
+ addData(data: string): string[];
4
+ getRemaining(): string;
5
+ clear(): void;
6
+ }
@@ -0,0 +1,10 @@
1
+ export declare function validateQueueName(name: string): string | null;
2
+ export { validateGroupId } from "../../../domain/types/group.js";
3
+ export declare function validateJobData(data: unknown): string | null;
4
+ export declare function validateNumericField(value: unknown, name: string, options?: {
5
+ min?: number;
6
+ max?: number;
7
+ required?: boolean;
8
+ }): string | null;
9
+ export declare function validateBackoffField(value: unknown): string | null;
10
+ export declare function validateJobOptions(options: Record<string, unknown>): string | null;
@@ -0,0 +1,6 @@
1
+ export { createConnectionState, errorResponse, parseCommand, parseCommands, serializeResponse, } from "./protocol/commands.js";
2
+ export { FrameParser, FrameSizeError, MAX_FRAME_SIZE } from "./protocol/frameParser.js";
3
+ export { LineBuffer } from "./protocol/lineBuffer.js";
4
+ export { validateBackoffField, validateGroupId, validateJobData, validateJobOptions, validateNumericField, validateQueueName, } from "./protocol/validation.js";
5
+ export type { ConnectionState } from "./types/protocol.js";
6
+ export { validateWebhookUrl } from "../../shared/webhookValidation.js";
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Per-socket write queue
3
+ * =================================================================
4
+ * Bun's `socket.write()` may write FEWER bytes than provided when the kernel
5
+ * send buffer is full (backpressure). The unwritten tail is NOT retained by
6
+ * Bun — the caller is responsible for buffering it and resending once the
7
+ * socket fires `drain`. Ignoring the short count silently drops response
8
+ * bytes, corrupting the length-prefixed frame protocol.
9
+ *
10
+ * This helper buffers any unwritten tail per-socket and preserves ordering:
11
+ * while a pending tail exists, all subsequent writes are appended to the queue
12
+ * (never written ahead of older bytes), and the queue is flushed in order from
13
+ * the `drain` handler.
14
+ */
15
+ import type { Socket } from 'bun';
16
+ /** Minimal write surface a socket must expose for the queue. */
17
+ interface WritableSocket {
18
+ write(data: Uint8Array): number;
19
+ }
20
+ /** Per-socket pending write state. Stored on `socket.data`. */
21
+ export declare class SocketWriteQueue {
22
+ /** Buffered chunks waiting to be (re)written, in order. */
23
+ private pending;
24
+ /** Byte offset into pending[0] already written by a short write. */
25
+ private offset;
26
+ /** Total queued bytes (for bounds / observability). */
27
+ private queuedBytes;
28
+ /** Max queued bytes before the queue reports over-budget (0 = unbounded). */
29
+ private readonly maxBytes;
30
+ /**
31
+ * @param maxBytes Soft cap on buffered bytes. When `bytesQueued` exceeds this,
32
+ * `isOverBudget` becomes true and the owner should drop the connection
33
+ * (bounds write-side memory for a client that stopped reading). 0 disables.
34
+ */
35
+ constructor(maxBytes?: number);
36
+ /**
37
+ * True once the buffered byte count exceeds the configured cap. The owner is
38
+ * expected to terminate the connection and `clear()` the queue.
39
+ */
40
+ get isOverBudget(): boolean;
41
+ /**
42
+ * Enqueue `data` for delivery on `socket`, preserving order.
43
+ * Returns false if the socket appears closed (write threw / returned < 0).
44
+ */
45
+ write(socket: WritableSocket, data: Uint8Array): boolean;
46
+ /**
47
+ * Flush as much of the pending queue as the socket accepts.
48
+ * Call from the socket's `drain` handler. Stops at the first short write,
49
+ * leaving the remainder queued for the next drain.
50
+ */
51
+ flush(socket: WritableSocket): boolean;
52
+ /** Number of bytes still buffered awaiting drain. */
53
+ get bytesQueued(): number;
54
+ /** Whether there is unwritten data awaiting drain. */
55
+ get hasPending(): boolean;
56
+ /** Drop all buffered data (e.g. on close). */
57
+ clear(): void;
58
+ }
59
+ /**
60
+ * Convenience: write through a socket whose `data` carries a `writeQueue`.
61
+ * Keeps call sites in tcp.ts terse and consistent.
62
+ */
63
+ export declare function queuedWrite<T extends {
64
+ writeQueue: SocketWriteQueue;
65
+ }>(socket: Socket<T>, data: Uint8Array): void;
66
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface ConnectionState {
2
+ authenticated: boolean;
3
+ clientId: string;
4
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Bun-only runtime guard (defense-in-depth for the bundled path).
3
+ *
4
+ * The `"node"` export condition (-> bun-only.ts) already fails fast for a plain
5
+ * `node` import and for node-target bundlers. This guard covers the remaining
6
+ * case: a browser/neutral-target bundler that inlines the real client, whose
7
+ * output is then run on Node. Without it, the failure surfaces deep inside as a
8
+ * cryptic `Bun is not defined` / `Bun.connect is not a function`.
9
+ *
10
+ * Imported FIRST by the client entrypoints so it evaluates before any module
11
+ * that touches `Bun.*` at top level. No-op under Bun. Keep relative-import-free.
12
+ */
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /** FIFO asynchronous mutex with direct ownership handoff. */
2
+ import type { LockGuard } from "./types/lock.js";
3
+ export declare class AsyncLock {
4
+ private locked;
5
+ private readonly queue;
6
+ acquire(timeoutMs?: number): Promise<LockGuard>;
7
+ isLocked(): boolean;
8
+ /** Queue size includes lazily pruned timed-out entries. */
9
+ getQueueLength(): number;
10
+ private timeout;
11
+ private drain;
12
+ private createGuard;
13
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Bounded Map - fast FIFO eviction without LRU tracking
3
+ */
4
+ import type { MapLike } from "./lruMap.js";
5
+ /**
6
+ * Bounded Map - fast FIFO eviction without LRU tracking
7
+ * Optimized for high-throughput scenarios where recency doesn't matter
8
+ * Uses batch eviction to avoid per-item iterator overhead
9
+ */
10
+ export declare class BoundedMap<K, V> implements MapLike<K, V> {
11
+ private readonly cache;
12
+ private readonly maxSize;
13
+ private readonly onEvict?;
14
+ /** Evict 10% of items at once to amortize iterator cost */
15
+ private readonly evictBatchSize;
16
+ constructor(maxSize: number, onEvict?: (key: K, value: V) => void);
17
+ get(key: K): V | undefined;
18
+ set(key: K, value: V): void;
19
+ /** Evict multiple items at once - more efficient than one at a time */
20
+ private evictBatch;
21
+ has(key: K): boolean;
22
+ delete(key: K): boolean;
23
+ clear(): void;
24
+ get size(): number;
25
+ keys(): IterableIterator<K>;
26
+ values(): IterableIterator<V>;
27
+ entries(): IterableIterator<[K, V]>;
28
+ forEach(callback: (value: V, key: K) => void): void;
29
+ [Symbol.iterator](): IterableIterator<[K, V]>;
30
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Bounded Set - fast FIFO eviction without LRU tracking
3
+ */
4
+ import type { SetLike } from "./lruSet.js";
5
+ /**
6
+ * Bounded Set - fast FIFO eviction without LRU tracking
7
+ * Optimized for high-throughput scenarios where recency doesn't matter
8
+ * Uses batch eviction to avoid per-item iterator overhead
9
+ */
10
+ export declare class BoundedSet<T> implements SetLike<T> {
11
+ private readonly cache;
12
+ private readonly maxSize;
13
+ private readonly onEvict?;
14
+ /** Evict 10% of items at once to amortize iterator cost */
15
+ private readonly evictBatchSize;
16
+ constructor(maxSize: number, onEvict?: (value: T) => void);
17
+ add(value: T): void;
18
+ /** Evict multiple items at once - more efficient than one at a time */
19
+ private evictBatch;
20
+ has(value: T): boolean;
21
+ delete(value: T): boolean;
22
+ clear(): void;
23
+ get size(): number;
24
+ values(): IterableIterator<T>;
25
+ [Symbol.iterator](): IterableIterator<T>;
26
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Fast hash functions
3
+ * FNV-1a implementation for consistent hashing
4
+ */
5
+ /**
6
+ * FNV-1a hash function (32-bit)
7
+ * Fast, good distribution for strings
8
+ */
9
+ export declare function fnv1a(str: string): number;
10
+ /**
11
+ * Shard configuration - auto-detected from hardware
12
+ * Uses power of 2 for fast bitwise mask
13
+ */
14
+ export declare const SHARD_COUNT: number;
15
+ export declare const SHARD_MASK: number;
16
+ export declare function shardIndex(key: string): number;
17
+ /**
18
+ * Calculate processing shard index from job ID (UUIDv7 string)
19
+ */
20
+ export declare function processingShardIndex(jobId: string): number;
21
+ /**
22
+ * Generate a UUID v7 using Bun's native implementation
23
+ * ~10x faster than manual Math.random() based UUID v4
24
+ */
25
+ export declare function uuid(): string;
26
+ /**
27
+ * Constant-time string comparison
28
+ * Prevents timing attacks on token validation
29
+ */
30
+ export declare function constantTimeEqual(a: string, b: string): boolean;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Lightweight Histogram for latency tracking
3
+ * Fixed bucket boundaries, O(1) observation via binary search
4
+ */
5
+ export declare class Histogram {
6
+ private readonly buckets;
7
+ private readonly counts;
8
+ private sum;
9
+ private count;
10
+ constructor(buckets?: number[]);
11
+ /** Record an observation (in milliseconds) */
12
+ observe(value: number): void;
13
+ /** Get sum of all observations */
14
+ getSum(): number;
15
+ /** Get total count of observations */
16
+ getCount(): number;
17
+ /** Calculate a percentile (0-100) */
18
+ percentile(p: number): number;
19
+ /** Generate Prometheus histogram lines, optionally scaling observed values. */
20
+ toPrometheus(name: string, help: string, outputScale?: number): string;
21
+ /** Reset all counters */
22
+ reset(): void;
23
+ }
@@ -0,0 +1,13 @@
1
+ /** Async lock facade and scoped execution helpers. */
2
+ import { AsyncLock } from "./asyncLock.js";
3
+ import { RWLock } from "./rwLock.js";
4
+ export { AsyncLock } from "./asyncLock.js";
5
+ export { LockTimeoutError } from "./lockError.js";
6
+ export { RWLock } from "./rwLock.js";
7
+ export type { LockGuard } from "./types/lock.js";
8
+ /** Execute with an exclusive lock and always release it. */
9
+ export declare function withLock<T>(lock: AsyncLock, fn: () => T | Promise<T>, timeoutMs?: number): Promise<T>;
10
+ /** Execute with a read lock and always release it. */
11
+ export declare function withReadLock<T>(lock: RWLock, fn: () => T | Promise<T>, timeoutMs?: number): Promise<T>;
12
+ /** Execute with a write lock and always release it. */
13
+ export declare function withWriteLock<T>(lock: RWLock, fn: () => T | Promise<T>, timeoutMs?: number): Promise<T>;
@@ -0,0 +1,3 @@
1
+ export declare class LockTimeoutError extends Error {
2
+ constructor(message?: string);
3
+ }
@@ -0,0 +1,2 @@
1
+ /** Default lock acquisition timeout shared by lock implementations. */
2
+ export declare const DEFAULT_LOCK_TIMEOUT_MS: number;