hikoutei 0.3.4 → 0.3.6

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 (355) hide show
  1. package/README.ja.md +44 -21
  2. package/README.ko.md +43 -23
  3. package/README.md +49 -33
  4. package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.d.ts +3 -3
  5. package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.d.ts.map +1 -1
  6. package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.js +1 -1
  7. package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarEntityRuntime.d.ts +1 -1
  8. package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarEntityRuntime.js +1 -1
  9. package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarRuntime.js +3 -3
  10. package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmScalarRuntime.js.map +1 -1
  11. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.d.ts +3 -3
  12. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.d.ts.map +1 -1
  13. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.js +15 -15
  14. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.js.map +1 -1
  15. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingFastPath.d.ts +1 -1
  16. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingFastPath.d.ts.map +1 -1
  17. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingFastPath.js +3 -3
  18. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingFastPath.js.map +1 -1
  19. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingInspection.d.ts +5 -5
  20. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingInspection.d.ts.map +1 -1
  21. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingInspection.js +5 -5
  22. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingInspection.js.map +1 -1
  23. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingPersistence.d.ts +1 -1
  24. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingPersistence.js +5 -5
  25. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingPersistence.js.map +1 -1
  26. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingSql.js +3 -3
  27. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPollingSql.js.map +1 -1
  28. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts +156 -0
  29. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts.map +1 -0
  30. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.js +1112 -0
  31. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.js.map +1 -0
  32. package/dist/adapter/sheets/providers/google-sheets-api/constants.d.ts +87 -0
  33. package/dist/adapter/sheets/providers/google-sheets-api/constants.d.ts.map +1 -0
  34. package/dist/adapter/sheets/providers/google-sheets-api/constants.js +97 -0
  35. package/dist/adapter/sheets/providers/google-sheets-api/constants.js.map +1 -0
  36. package/dist/adapter/sheets/providers/google-sheets-api/errors.d.ts +53 -0
  37. package/dist/adapter/sheets/providers/google-sheets-api/errors.d.ts.map +1 -0
  38. package/dist/adapter/sheets/providers/google-sheets-api/errors.js +61 -0
  39. package/dist/adapter/sheets/providers/google-sheets-api/errors.js.map +1 -0
  40. package/dist/adapter/sheets/providers/google-sheets-api/index.d.ts +16 -0
  41. package/dist/adapter/sheets/providers/google-sheets-api/index.d.ts.map +1 -0
  42. package/dist/adapter/sheets/providers/google-sheets-api/index.js +13 -0
  43. package/dist/adapter/sheets/providers/google-sheets-api/index.js.map +1 -0
  44. package/dist/adapter/sheets/providers/google-sheets-api/model/batchBuilder.d.ts +83 -0
  45. package/dist/adapter/sheets/providers/google-sheets-api/model/batchBuilder.d.ts.map +1 -0
  46. package/dist/adapter/sheets/providers/google-sheets-api/model/batchBuilder.js +413 -0
  47. package/dist/adapter/sheets/providers/google-sheets-api/model/batchBuilder.js.map +1 -0
  48. package/dist/adapter/sheets/providers/google-sheets-api/model/observation.d.ts +86 -0
  49. package/dist/adapter/sheets/providers/google-sheets-api/model/observation.d.ts.map +1 -0
  50. package/dist/adapter/sheets/providers/google-sheets-api/model/observation.js +439 -0
  51. package/dist/adapter/sheets/providers/google-sheets-api/model/observation.js.map +1 -0
  52. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.d.ts +115 -0
  53. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.d.ts.map +1 -0
  54. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.js +522 -0
  55. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.js.map +1 -0
  56. package/dist/adapter/sheets/providers/google-sheets-api/model/postcondition.d.ts +17 -0
  57. package/dist/adapter/sheets/providers/google-sheets-api/model/postcondition.d.ts.map +1 -0
  58. package/dist/adapter/sheets/providers/google-sheets-api/model/postcondition.js +99 -0
  59. package/dist/adapter/sheets/providers/google-sheets-api/model/postcondition.js.map +1 -0
  60. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.d.ts +242 -0
  61. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.d.ts.map +1 -0
  62. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.js +707 -0
  63. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.js.map +1 -0
  64. package/dist/adapter/sheets/providers/google-sheets-api/model/sheetIdAllocator.d.ts +16 -0
  65. package/dist/adapter/sheets/providers/google-sheets-api/model/sheetIdAllocator.d.ts.map +1 -0
  66. package/dist/adapter/sheets/providers/google-sheets-api/model/sheetIdAllocator.js +29 -0
  67. package/dist/adapter/sheets/providers/google-sheets-api/model/sheetIdAllocator.js.map +1 -0
  68. package/dist/adapter/sheets/providers/google-sheets-api/model/tableRead.d.ts +26 -0
  69. package/dist/adapter/sheets/providers/google-sheets-api/model/tableRead.d.ts.map +1 -0
  70. package/dist/adapter/sheets/providers/google-sheets-api/model/tableRead.js +57 -0
  71. package/dist/adapter/sheets/providers/google-sheets-api/model/tableRead.js.map +1 -0
  72. package/dist/adapter/sheets/providers/google-sheets-api/model/valueNormalization.d.ts +102 -0
  73. package/dist/adapter/sheets/providers/google-sheets-api/model/valueNormalization.d.ts.map +1 -0
  74. package/dist/adapter/sheets/providers/google-sheets-api/model/valueNormalization.js +375 -0
  75. package/dist/adapter/sheets/providers/google-sheets-api/model/valueNormalization.js.map +1 -0
  76. package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.d.ts +168 -0
  77. package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.d.ts.map +1 -0
  78. package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.js +247 -0
  79. package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.js.map +1 -0
  80. package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.d.ts +47 -0
  81. package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.d.ts.map +1 -0
  82. package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.js +60 -0
  83. package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.js.map +1 -0
  84. package/dist/api/Hikoutei.d.ts +1 -1
  85. package/dist/api/Hikoutei.js +1 -1
  86. package/dist/api/index.d.ts +2 -2
  87. package/dist/api/index.js +2 -2
  88. package/dist/application/orm/mapping/contracts.d.ts +2 -2
  89. package/dist/application/orm/mapping/contracts.d.ts.map +1 -1
  90. package/dist/application/orm/mapping/definition.js +5 -5
  91. package/dist/application/orm/mapping/definition.js.map +1 -1
  92. package/dist/application/orm/mapping/projection.js +7 -7
  93. package/dist/application/orm/mapping/projection.js.map +1 -1
  94. package/dist/application/orm/persistence/flush/flushCoordinator.d.ts +3 -3
  95. package/dist/application/orm/persistence/flush/flushCoordinator.d.ts.map +1 -1
  96. package/dist/application/orm/persistence/flush/flushCoordinator.js +2 -2
  97. package/dist/application/orm/persistence/flush/flushCoordinator.js.map +1 -1
  98. package/dist/application/orm/persistence/projection/projectionEffects.d.ts +1 -1
  99. package/dist/application/orm/persistence/projection/projectionEffects.js +6 -6
  100. package/dist/application/orm/persistence/projection/projectionEffects.js.map +1 -1
  101. package/dist/application/orm/persistence/support/contracts.d.ts +2 -2
  102. package/dist/application/orm/persistence/support/contracts.d.ts.map +1 -1
  103. package/dist/application/sync/inbound/autoSystemConflictResolution.js +7 -7
  104. package/dist/application/sync/inbound/autoSystemConflictResolution.js.map +1 -1
  105. package/dist/application/sync/inbound/polling/SimpleSheetPolling.d.ts +3 -3
  106. package/dist/application/sync/inbound/polling/SimpleSheetPolling.d.ts.map +1 -1
  107. package/dist/application/sync/inbound/polling/SimpleSheetPolling.js +1 -1
  108. package/dist/application/sync/inbound/polling/SimpleSheetPolling.js.map +1 -1
  109. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.d.ts +17 -1
  110. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.d.ts.map +1 -1
  111. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.js +27 -1
  112. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.js.map +1 -1
  113. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts +2 -2
  114. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts.map +1 -1
  115. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js +26 -6
  116. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js.map +1 -1
  117. package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts +24 -9
  118. package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts.map +1 -1
  119. package/dist/application/sync/outbound/effects/SyncEffectWorker.js +128 -81
  120. package/dist/application/sync/outbound/effects/SyncEffectWorker.js.map +1 -1
  121. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts +31 -14
  122. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts.map +1 -1
  123. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js +32 -15
  124. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js.map +1 -1
  125. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts +13 -9
  126. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts.map +1 -1
  127. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js +53 -37
  128. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js.map +1 -1
  129. package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.js +1 -1
  130. package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.js.map +1 -1
  131. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts +29 -19
  132. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts.map +1 -1
  133. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js +59 -41
  134. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js.map +1 -1
  135. package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.d.ts +4 -4
  136. package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.d.ts.map +1 -1
  137. package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.js +3 -3
  138. package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.js.map +1 -1
  139. package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.d.ts +3 -3
  140. package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.d.ts.map +1 -1
  141. package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.js +42 -46
  142. package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.js.map +1 -1
  143. package/dist/application/sync/outbound/projection/ProjectionEffectFactory.d.ts +8 -8
  144. package/dist/application/sync/outbound/projection/ProjectionEffectFactory.d.ts.map +1 -1
  145. package/dist/application/sync/outbound/projection/ProjectionEffectFactory.js +15 -15
  146. package/dist/application/sync/outbound/projection/ProjectionEffectFactory.js.map +1 -1
  147. package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.d.ts +3 -3
  148. package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.d.ts.map +1 -1
  149. package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.js +10 -10
  150. package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.js.map +1 -1
  151. package/dist/application/sync/service/SyncPollingSupervisor.d.ts +1 -1
  152. package/dist/application/sync/service/SyncPollingSupervisor.js +1 -1
  153. package/dist/application/sync/service/SyncServiceBootstrap.d.ts +29 -19
  154. package/dist/application/sync/service/SyncServiceBootstrap.d.ts.map +1 -1
  155. package/dist/application/sync/service/SyncServiceBootstrap.js +103 -78
  156. package/dist/application/sync/service/SyncServiceBootstrap.js.map +1 -1
  157. package/dist/application/sync/service/errors.d.ts +1 -1
  158. package/dist/application/sync/service/errors.js +1 -1
  159. package/dist/application/sync/service/errors.js.map +1 -1
  160. package/dist/application/sync/sheets/conflictProjection.d.ts.map +1 -0
  161. package/dist/application/sync/sheets/conflictProjection.js.map +1 -0
  162. package/dist/application/sync/{gateway → sheets}/conflictProjectionRegistration.d.ts +1 -1
  163. package/dist/application/sync/sheets/conflictProjectionRegistration.d.ts.map +1 -0
  164. package/dist/application/sync/{gateway → sheets}/conflictProjectionRegistration.js +3 -3
  165. package/dist/application/sync/sheets/conflictProjectionRegistration.js.map +1 -0
  166. package/dist/application/sync/sheets/constants.d.ts +66 -0
  167. package/dist/application/sync/sheets/constants.d.ts.map +1 -0
  168. package/dist/application/sync/{gateway → sheets}/constants.js +15 -15
  169. package/dist/application/sync/sheets/constants.js.map +1 -0
  170. package/dist/application/sync/sheets/errors.d.ts +15 -0
  171. package/dist/application/sync/sheets/errors.d.ts.map +1 -0
  172. package/dist/application/sync/sheets/errors.js +16 -0
  173. package/dist/application/sync/sheets/errors.js.map +1 -0
  174. package/dist/application/sync/{gateway/coordinator/CoordinatedSyncGateway.d.ts → sheets/mutationCoordinator/CoordinatedSheetsProvider.d.ts} +29 -28
  175. package/dist/application/sync/sheets/mutationCoordinator/CoordinatedSheetsProvider.d.ts.map +1 -0
  176. package/dist/application/sync/{gateway/coordinator/CoordinatedSyncGateway.js → sheets/mutationCoordinator/CoordinatedSheetsProvider.js} +27 -26
  177. package/dist/application/sync/sheets/mutationCoordinator/CoordinatedSheetsProvider.js.map +1 -0
  178. package/dist/application/sync/{gateway/coordinator → sheets/mutationCoordinator}/asyncMutex.d.ts +2 -3
  179. package/dist/application/sync/sheets/mutationCoordinator/asyncMutex.d.ts.map +1 -0
  180. package/dist/application/sync/sheets/mutationCoordinator/asyncMutex.js.map +1 -0
  181. package/dist/application/sync/{gateway/coordinator/coordinatorTelemetry.d.ts → sheets/mutationCoordinator/laneTelemetry.d.ts} +4 -4
  182. package/dist/application/sync/sheets/mutationCoordinator/laneTelemetry.d.ts.map +1 -0
  183. package/dist/application/sync/{gateway/coordinator/coordinatorTelemetry.js → sheets/mutationCoordinator/laneTelemetry.js} +5 -5
  184. package/dist/application/sync/sheets/mutationCoordinator/laneTelemetry.js.map +1 -0
  185. package/dist/application/sync/{gateway/SyncGatewayBootstrap.d.ts → sheets/sheetsProvisioning.d.ts} +14 -14
  186. package/dist/application/sync/sheets/sheetsProvisioning.d.ts.map +1 -0
  187. package/dist/application/sync/sheets/sheetsProvisioning.js +95 -0
  188. package/dist/application/sync/sheets/sheetsProvisioning.js.map +1 -0
  189. package/dist/application/sync/{gateway/syncGateway.d.ts → sheets/syncSheets.d.ts} +61 -117
  190. package/dist/application/sync/sheets/syncSheets.d.ts.map +1 -0
  191. package/dist/application/sync/sheets/syncSheets.js +144 -0
  192. package/dist/application/sync/sheets/syncSheets.js.map +1 -0
  193. package/dist/application/sync/{gateway/transportClassification.d.ts → sheets/transportOutcome.d.ts} +23 -22
  194. package/dist/application/sync/sheets/transportOutcome.d.ts.map +1 -0
  195. package/dist/application/sync/sheets/transportOutcome.js +97 -0
  196. package/dist/application/sync/sheets/transportOutcome.js.map +1 -0
  197. package/dist/application/sync/sheets/validation.d.ts +22 -0
  198. package/dist/application/sync/sheets/validation.d.ts.map +1 -0
  199. package/dist/application/sync/sheets/validation.js +79 -0
  200. package/dist/application/sync/sheets/validation.js.map +1 -0
  201. package/dist/application/sync/telemetry/syncTiming.d.ts +7 -7
  202. package/dist/application/sync/telemetry/syncTiming.d.ts.map +1 -1
  203. package/dist/application/sync/telemetry/syncTiming.js +2 -2
  204. package/dist/application/sync/telemetry/syncTiming.js.map +1 -1
  205. package/dist/domain/evaluate/contracts.d.ts +1 -1
  206. package/dist/domain/evaluate/contracts.js +1 -1
  207. package/dist/domain/model/constants.d.ts +1 -1
  208. package/dist/domain/model/constants.d.ts.map +1 -1
  209. package/dist/domain/model/types.d.ts +1 -1
  210. package/dist/domain/model/types.d.ts.map +1 -1
  211. package/dist/index.d.ts +3 -2
  212. package/dist/index.d.ts.map +1 -1
  213. package/dist/index.js +3 -2
  214. package/dist/index.js.map +1 -1
  215. package/dist/infrastructure/storage/index.d.ts +1 -1
  216. package/dist/infrastructure/storage/index.d.ts.map +1 -1
  217. package/dist/infrastructure/storage/index.js +1 -1
  218. package/dist/infrastructure/storage/index.js.map +1 -1
  219. package/dist/infrastructure/storage/state/observation/observationAudit.d.ts +1 -1
  220. package/dist/infrastructure/storage/state/observation/observationAudit.js +1 -1
  221. package/dist/infrastructure/storage/state/observation/observationTypes.d.ts +3 -3
  222. package/dist/infrastructure/storage/state/observation/observationTypes.d.ts.map +1 -1
  223. package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts +13 -1
  224. package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts.map +1 -1
  225. package/dist/infrastructure/storage/sync/outbound/effectOutbox.js +23 -2
  226. package/dist/infrastructure/storage/sync/outbound/effectOutbox.js.map +1 -1
  227. package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.d.ts +9 -3
  228. package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.d.ts.map +1 -1
  229. package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.js +7 -1
  230. package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.js.map +1 -1
  231. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts +11 -1
  232. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts.map +1 -1
  233. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js +44 -3
  234. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js.map +1 -1
  235. package/dist/infrastructure/storage/sync/shared/syncRegistry.d.ts +4 -4
  236. package/dist/infrastructure/storage/sync/shared/syncRegistry.d.ts.map +1 -1
  237. package/dist/infrastructure/storage/sync/shared/syncRegistry.js +4 -4
  238. package/dist/infrastructure/storage/sync/shared/syncRegistry.js.map +1 -1
  239. package/dist/shared/encoding/types.d.ts +1 -1
  240. package/docs/architecture.md +52 -23
  241. package/docs/ci.md +31 -23
  242. package/docs/code-guidelines.md +10 -18
  243. package/docs/development.md +37 -11
  244. package/docs/gateway-removal-inventory.md +147 -0
  245. package/docs/quick-start.md +36 -26
  246. package/docs/sync-bulk-write-benchmark.md +561 -0
  247. package/docs/sync-observability.md +38 -45
  248. package/docs/write-and-synchronization-flow.md +56 -39
  249. package/package.json +5 -4
  250. package/apps-script/gateway/Code.gs +0 -447
  251. package/dist/adapter/sheets/providers/apps-script-gateway/errors.d.ts +0 -43
  252. package/dist/adapter/sheets/providers/apps-script-gateway/errors.d.ts.map +0 -1
  253. package/dist/adapter/sheets/providers/apps-script-gateway/errors.js +0 -52
  254. package/dist/adapter/sheets/providers/apps-script-gateway/errors.js.map +0 -1
  255. package/dist/adapter/sheets/providers/apps-script-gateway/index.d.ts +0 -24
  256. package/dist/adapter/sheets/providers/apps-script-gateway/index.d.ts.map +0 -1
  257. package/dist/adapter/sheets/providers/apps-script-gateway/index.js +0 -13
  258. package/dist/adapter/sheets/providers/apps-script-gateway/index.js.map +0 -1
  259. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.d.ts +0 -44
  260. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.d.ts.map +0 -1
  261. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.js +0 -181
  262. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.js.map +0 -1
  263. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.d.ts +0 -3
  264. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.d.ts.map +0 -1
  265. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.js +0 -810
  266. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.js.map +0 -1
  267. package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.d.ts +0 -31
  268. package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.d.ts.map +0 -1
  269. package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.js +0 -560
  270. package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.js.map +0 -1
  271. package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.d.ts +0 -12
  272. package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.d.ts.map +0 -1
  273. package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.js +0 -166
  274. package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.js.map +0 -1
  275. package/dist/adapter/sheets/providers/apps-script-gateway/operations/shared/appsScriptStableCodecSource.d.ts +0 -8
  276. package/dist/adapter/sheets/providers/apps-script-gateway/operations/shared/appsScriptStableCodecSource.d.ts.map +0 -1
  277. package/dist/adapter/sheets/providers/apps-script-gateway/operations/shared/appsScriptStableCodecSource.js +0 -122
  278. package/dist/adapter/sheets/providers/apps-script-gateway/operations/shared/appsScriptStableCodecSource.js.map +0 -1
  279. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/batchAppendOperation.d.ts +0 -31
  280. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/batchAppendOperation.d.ts.map +0 -1
  281. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/batchAppendOperation.js +0 -567
  282. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/batchAppendOperation.js.map +0 -1
  283. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.d.ts +0 -19
  284. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.d.ts.map +0 -1
  285. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.js +0 -37
  286. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.js.map +0 -1
  287. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.d.ts +0 -51
  288. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.d.ts.map +0 -1
  289. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.js +0 -60
  290. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.js.map +0 -1
  291. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/constants.d.ts +0 -44
  292. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/constants.d.ts.map +0 -1
  293. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/constants.js +0 -40
  294. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/constants.js.map +0 -1
  295. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.d.ts +0 -12
  296. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.d.ts.map +0 -1
  297. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.js +0 -41
  298. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.js.map +0 -1
  299. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.d.ts +0 -5
  300. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.d.ts.map +0 -1
  301. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.js +0 -53
  302. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.js.map +0 -1
  303. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/types.d.ts +0 -4
  304. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/types.d.ts.map +0 -1
  305. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/types.js +0 -2
  306. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/types.js.map +0 -1
  307. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.d.ts +0 -11
  308. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.d.ts.map +0 -1
  309. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.js +0 -36
  310. package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.js.map +0 -1
  311. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.d.ts +0 -68
  312. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.d.ts.map +0 -1
  313. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.js +0 -273
  314. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.js.map +0 -1
  315. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.d.ts +0 -73
  316. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.d.ts.map +0 -1
  317. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.js +0 -363
  318. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.js.map +0 -1
  319. package/dist/adapter/sheets/providers/apps-script-gateway/validation.d.ts +0 -3
  320. package/dist/adapter/sheets/providers/apps-script-gateway/validation.d.ts.map +0 -1
  321. package/dist/adapter/sheets/providers/apps-script-gateway/validation.js +0 -10
  322. package/dist/adapter/sheets/providers/apps-script-gateway/validation.js.map +0 -1
  323. package/dist/application/sync/gateway/SyncGatewayBootstrap.d.ts.map +0 -1
  324. package/dist/application/sync/gateway/SyncGatewayBootstrap.js +0 -95
  325. package/dist/application/sync/gateway/SyncGatewayBootstrap.js.map +0 -1
  326. package/dist/application/sync/gateway/conflictProjection.d.ts.map +0 -1
  327. package/dist/application/sync/gateway/conflictProjection.js.map +0 -1
  328. package/dist/application/sync/gateway/conflictProjectionRegistration.d.ts.map +0 -1
  329. package/dist/application/sync/gateway/conflictProjectionRegistration.js.map +0 -1
  330. package/dist/application/sync/gateway/constants.d.ts +0 -66
  331. package/dist/application/sync/gateway/constants.d.ts.map +0 -1
  332. package/dist/application/sync/gateway/constants.js.map +0 -1
  333. package/dist/application/sync/gateway/coordinator/CoordinatedSyncGateway.d.ts.map +0 -1
  334. package/dist/application/sync/gateway/coordinator/CoordinatedSyncGateway.js.map +0 -1
  335. package/dist/application/sync/gateway/coordinator/asyncMutex.d.ts.map +0 -1
  336. package/dist/application/sync/gateway/coordinator/asyncMutex.js.map +0 -1
  337. package/dist/application/sync/gateway/coordinator/coordinatorTelemetry.d.ts.map +0 -1
  338. package/dist/application/sync/gateway/coordinator/coordinatorTelemetry.js.map +0 -1
  339. package/dist/application/sync/gateway/errors.d.ts +0 -15
  340. package/dist/application/sync/gateway/errors.d.ts.map +0 -1
  341. package/dist/application/sync/gateway/errors.js +0 -16
  342. package/dist/application/sync/gateway/errors.js.map +0 -1
  343. package/dist/application/sync/gateway/syncGateway.d.ts.map +0 -1
  344. package/dist/application/sync/gateway/syncGateway.js +0 -191
  345. package/dist/application/sync/gateway/syncGateway.js.map +0 -1
  346. package/dist/application/sync/gateway/transportClassification.d.ts.map +0 -1
  347. package/dist/application/sync/gateway/transportClassification.js +0 -133
  348. package/dist/application/sync/gateway/transportClassification.js.map +0 -1
  349. package/dist/application/sync/gateway/validation.d.ts +0 -22
  350. package/dist/application/sync/gateway/validation.d.ts.map +0 -1
  351. package/dist/application/sync/gateway/validation.js +0 -79
  352. package/dist/application/sync/gateway/validation.js.map +0 -1
  353. /package/dist/application/sync/{gateway → sheets}/conflictProjection.d.ts +0 -0
  354. /package/dist/application/sync/{gateway → sheets}/conflictProjection.js +0 -0
  355. /package/dist/application/sync/{gateway/coordinator → sheets/mutationCoordinator}/asyncMutex.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conflictProjection.js","sourceRoot":"","sources":["../../../../src/application/sync/sheets/conflictProjection.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAGrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,aAAa;IACb,mBAAmB;IACnB,UAAU;IACV,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,oBAAoB;IACpB,8BAA8B;IAC9B,iCAAiC;IACjC,yBAAyB;IACzB,4BAA4B;IAC5B,iBAAiB;IACjB,QAAQ;IACR,YAAY;IACZ,uBAAuB;CACf,CAAC;AAEX,uEAAuE;AACvE,MAAM,CAAC,MAAM,yCAAyC,GAAG,KAAK,CAAC;AAE/D,mFAAmF;AACnF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,WAAW,EAAE,aAAa;CAClB,CAAC;AAEX,iFAAiF;AACjF,MAAM,UAAU,4BAA4B,CAC1C,QAAsB,EACtB,UAAkD;IAElD,OAAO;QACL,WAAW,EAAE,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC5C,iBAAiB,E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 -3,7 +3,7 @@ import { type RegisteredSyncSheet } from "../../../infrastructure/storage/index.
3
3
  import type { SqlStorageAdapter } from "../../../adapter/persistence/contracts/sql.js";
4
4
  import type { RegisteredTypedSheetsMappedProjection, TypedSheetsEntityWriterOptions } from "../../orm/persistence/support/contracts.js";
5
5
  import type { InternalSyncProjectionConfig } from "../service/contracts.js";
6
- import type { RegisteredSyncProjectionDefinition } from "./SyncGatewayBootstrap.js";
6
+ import type { RegisteredSyncProjectionDefinition } from "./sheetsProvisioning.js";
7
7
  /** Registers all conflict routes under one writer fence for a mapped runtime. */
8
8
  export declare function registerSyncConflictProjectionRoutes(storage: SqlStorageAdapter, registrations: readonly RegisteredTypedSheetsMappedProjection[], projections: InternalSyncProjectionConfig, writerInput: TypedSheetsEntityWriterOptions): Promise<readonly RegisteredSyncProjectionDefinition[]>;
9
9
  /** Returns the registered conflict route for one logical entity sheet. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conflictProjectionRegistration.d.ts","sourceRoot":"","sources":["../../../../src/application/sync/sheets/conflictProjectionRegistration.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAEpF,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAQvF,OAAO,KAAK,EACV,qCAAqC,EACrC,8BAA8B,EAC/B,MAAM,4CAA4C,CAAC;AAIpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAO5E,OAAO,KAAK,EACV,kCAAkC,EACnC,MAAM,yBAAyB,CAAC;AAEjC,iFAAiF;AACjF,wBAAsB,oCAAoC,CACxD,OAAO,EAAE,iBAAiB,EAC1B,aAAa,EAAE,SAAS,qCAAqC,EAAE,EAC/D,WAAW,EAAE,4BAA4B,EACzC,WAAW,EAAE,8BAA8B,GAC1C,OAAO,CAAC,SAAS,kCAAkC,EAAE,CAAC,CA6DxD;AAED,0EAA0E;AAC1E,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,SAAS,kCAAkC,EAAE,EAC1D,cAAc,EAAE,MAAM,GACrB,mBAAmB,CAYrB"}
@@ -3,7 +3,7 @@ import { claimWriterLeaseWithSql, registerSyncSheetWithSql, WRITER_LEASE_CLAIM_R
3
3
  import { TYPED_SHEETS_ORM_ERROR_CODES, TypedSheetsOrmError, } from "../../orm/errors.js";
4
4
  import { serializeTypedSheetsEntityOwnershipManifest, } from "../../orm/mapping/projection.js";
5
5
  import { resolveTypedSheetsEntityWriterOptions, } from "../../orm/persistence/flush/flushCoordinator.js";
6
- import { SYNC_GATEWAY_PROJECTIONS, } from "./constants.js";
6
+ import { SYNC_PROJECTIONS, } from "./constants.js";
7
7
  import { SYNC_CONFLICT_PROJECTION_HEADERS, } from "./conflictProjection.js";
8
8
  /** Registers all conflict routes under one writer fence for a mapped runtime. */
9
9
  export async function registerSyncConflictProjectionRoutes(storage, registrations, projections, writerInput) {
@@ -40,7 +40,7 @@ export async function registerSyncConflictProjectionRoutes(storage, registration
40
40
  spreadsheetId: projections.spreadsheetId,
41
41
  tabName: config.syncConflicts.tabName,
42
42
  registeredRange: config.syncConflicts.registeredRange,
43
- projection: SYNC_GATEWAY_PROJECTIONS.SYNC_CONFLICTS,
43
+ projection: SYNC_PROJECTIONS.SYNC_CONFLICTS,
44
44
  schemaVersion: registration.mapping.schemaVersion,
45
45
  ownershipManifestJson: serializeTypedSheetsEntityOwnershipManifest(registration.mapping),
46
46
  businessKeyField: registration.mapping.businessKey.fieldName,
@@ -61,7 +61,7 @@ export async function registerSyncConflictProjectionRoutes(storage, registration
61
61
  /** Returns the registered conflict route for one logical entity sheet. */
62
62
  export function conflictProjectionSheet(definitions, logicalSheetId) {
63
63
  const definition = definitions.find((candidate) => candidate.sheet.logicalSheetId === logicalSheetId &&
64
- candidate.sheet.projection === SYNC_GATEWAY_PROJECTIONS.SYNC_CONFLICTS);
64
+ candidate.sheet.projection === SYNC_PROJECTIONS.SYNC_CONFLICTS);
65
65
  if (definition === undefined) {
66
66
  throw new TypedSheetsOrmError(TYPED_SHEETS_ORM_ERROR_CODES.INVALID_ENTITY_MAPPING, `no Sync_Conflicts projection is registered for ${logicalSheetId}.`);
67
67
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conflictProjectionRegistration.js","sourceRoot":"","sources":["../../../../src/application/sync/sheets/conflictProjectionRegistration.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAEpF,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EAExB,+BAA+B,GAEhC,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,2CAA2C,GAC5C,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EACL,qCAAqC,GACtC,MAAM,iDAAiD,CAAC;AAEzD,OAAO,EACL,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AAKjC,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,oCAAoC,CACxD,OAA0B,EAC1B,aAA+D,EAC/D,WAAyC,EACzC,WAA2C;IAE3C,MAAM,MAAM,GAAG,qCAAqC,CAAC,WAAW,CAAC,CAAC;IAClE,MAAM,cAAc,GAAG,IAAI,GAAG,EAAiD,CAAC;IAChF,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;QAC3C,MAAM,KAAK,GAAG,MAAM,uBAAuB,CAAC,GAAG,EAAE;YAC/C,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,eAAe,E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jD,qBAAqB,EAAE,2CAA2C,CAAC,YAAY,CAAC,OAAO,CAAC;gBACxF,gBAAgB,EAAE,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS;aACpD,CAAC;YACX,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;YACjE,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBACjC,MAAM,IAAI,mBAAmB,CAC3B,4BAA4B,CAAC,wBAAwB,EACrD,2CAA2C,KAAK,CAAC,eAAe,GAAG,CACpE,CAAC;YACJ,CAAC;YACD,WAAW,CAAC,IAAI,CAAC;gBACf,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,OAAO,EAAE,gCAAgC;gBACzC,aAAa,EAAE,aAAa;aAC7B,CAAC,CAAC;QACL,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,uBAAuB,CACrC,WAA0D,EAC1D,cAAsB;IAEtB,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CACjC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,KAAK,cAAc;QAC9D,SAAS,CAAC,KAAK,CAAC,UAAU,KAAK,gBAAgB,CAAC,cAAc,CACjE,CAAC;IACF,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,IAAI,mBAAmB,CAC3B,4BAA4B,CAAC,sBAAsB,EACnD,kDAAkD,cAAc,GAAG,CACpE,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC,KAAK,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,66 @@
1
+ import type { RegisteredProjectionKind } from "../../../domain/model/constants.js";
2
+ /** Protocol versions understood by the sync provider contract. */
3
+ export declare const SYNC_PROTOCOL_VERSIONS: {
4
+ readonly V1: "typed-sheets-sync-v1";
5
+ };
6
+ export type SyncProtocolVersion = (typeof SYNC_PROTOCOL_VERSIONS)[keyof typeof SYNC_PROTOCOL_VERSIONS];
7
+ /** Projection labels accepted by the runtime provider contract. */
8
+ export declare const SYNC_PROJECTIONS: {
9
+ readonly USER_INPUT: "user_input";
10
+ readonly SYSTEM_STATE: "system_state";
11
+ readonly SYNC_CONFLICTS: "sync_conflicts";
12
+ };
13
+ export type SyncProjectionKind = RegisteredProjectionKind;
14
+ /** Detail level used by normalized Sheet observation reads. */
15
+ export declare const SYNC_SNAPSHOT_READ_MODES: {
16
+ /** Reads formula, merge, error, and stable-cell metadata for reconciliation. */
17
+ readonly FULL: "full";
18
+ /** Reads only user-editable literal values and row identity for polling. */
19
+ readonly USER_INPUT: "user_input";
20
+ };
21
+ export type SyncSnapshotReadMode = (typeof SYNC_SNAPSHOT_READ_MODES)[keyof typeof SYNC_SNAPSHOT_READ_MODES];
22
+ /** Effect kinds that require special handling at the provider boundary. */
23
+ export declare const SYNC_DELETE_EFFECT_KINDS: {
24
+ readonly RESOLUTION_DELETE: "resolution_delete";
25
+ readonly USER_INPUT_DELETE: "user_input_delete";
26
+ };
27
+ /** Terminal and retryable statuses returned for one provider effect. */
28
+ export declare const SYNC_EFFECT_RESULT_STATUSES: {
29
+ readonly APPLIED: "applied";
30
+ readonly ALREADY_APPLIED: "already_applied";
31
+ readonly SUPERSEDED: "superseded";
32
+ readonly GUARD_MISMATCH: "guard_mismatch";
33
+ readonly REPAIR_REOBSERVE: "repair_reobserve";
34
+ readonly SCHEMA_ERROR: "schema_error";
35
+ readonly RETRYABLE_ERROR: "retryable_error";
36
+ };
37
+ export type SyncEffectResultStatus = (typeof SYNC_EFFECT_RESULT_STATUSES)[keyof typeof SYNC_EFFECT_RESULT_STATUSES];
38
+ /** Result label returned when a fast-append row was accepted for writing. */
39
+ export declare const SYNC_FAST_APPEND_STATUSES: {
40
+ readonly APPLIED: "applied";
41
+ };
42
+ export type SyncFastAppendStatus = (typeof SYNC_FAST_APPEND_STATUSES)[keyof typeof SYNC_FAST_APPEND_STATUSES];
43
+ /** How much remote read-back the provider performs before returning a write result. */
44
+ export declare const SYNC_POSTCONDITION_MODES: {
45
+ /** Read changed rows after the write and verify their target hashes inline. */
46
+ readonly INLINE: "inline";
47
+ /** Return after the batched write is flushed; recovery reads verify later. */
48
+ readonly DEFERRED: "deferred";
49
+ };
50
+ export type SyncPostconditionMode = (typeof SYNC_POSTCONDITION_MODES)[keyof typeof SYNC_POSTCONDITION_MODES];
51
+ /** Evidence level attached to a successful provider write result. */
52
+ export declare const SYNC_POSTCONDITION_STATUSES: {
53
+ readonly VERIFIED: "verified";
54
+ readonly ACKNOWLEDGED: "acknowledged";
55
+ readonly UNAVAILABLE: "unavailable";
56
+ };
57
+ export type SyncPostconditionStatus = (typeof SYNC_POSTCONDITION_STATUSES)[keyof typeof SYNC_POSTCONDITION_STATUSES];
58
+ /** Read-back classification after a lost response or expired lease. */
59
+ export declare const SYNC_POSTCONDITION_DISPOSITIONS: {
60
+ readonly APPLIED: "applied";
61
+ readonly UNAPPLIED: "unapplied";
62
+ readonly CHANGED: "changed";
63
+ readonly UNAVAILABLE: "unavailable";
64
+ };
65
+ export type SyncPostconditionDisposition = (typeof SYNC_POSTCONDITION_DISPOSITIONS)[keyof typeof SYNC_POSTCONDITION_DISPOSITIONS];
66
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/application/sync/sheets/constants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,kEAAkE;AAClE,eAAO,MAAM,sBAAsB;;CAEzB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEvE,mEAAmE;AACnE,eAAO,MAAM,gBAAgB;;;;CAIgC,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAE1D,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB;IACnC,gFAAgF;;IAEhF,4EAA4E;;CAEpE,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,wEAAwE;AACxE,eAAO,MAAM,2BAA2B;;;;;;;;CAQ9B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAEjF,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB;;CAE5B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE7E,uFAAuF;AACvF,eAAO,MAAM,wBAAwB;IACnC,+EAA+E;;IAE/E,8EAA8E;;CAEtE,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,qEAAqE;AACrE,eAAO,MAAM,2BAA2B;;;;CAI9B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAC;AAEjF,uEAAuE;AACvE,eAAO,MAAM,+BAA+B;;;;;CAKlC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,OAAO,+BAA+B,CAAC,CAAC"}
@@ -1,28 +1,28 @@
1
1
  import { REGISTERED_PROJECTION_KINDS } from "../../../domain/model/constants.js";
2
- /** Protocol versions understood by the sync gateway contract. */
3
- export const SYNC_GATEWAY_PROTOCOL_VERSIONS = {
2
+ /** Protocol versions understood by the sync provider contract. */
3
+ export const SYNC_PROTOCOL_VERSIONS = {
4
4
  V1: "typed-sheets-sync-v1",
5
5
  };
6
- /** Projection labels accepted by the runtime gateway contract. */
7
- export const SYNC_GATEWAY_PROJECTIONS = {
6
+ /** Projection labels accepted by the runtime provider contract. */
7
+ export const SYNC_PROJECTIONS = {
8
8
  USER_INPUT: REGISTERED_PROJECTION_KINDS.USER_INPUT,
9
9
  SYSTEM_STATE: REGISTERED_PROJECTION_KINDS.SYSTEM_STATE,
10
10
  SYNC_CONFLICTS: REGISTERED_PROJECTION_KINDS.SYNC_CONFLICTS,
11
11
  };
12
12
  /** Detail level used by normalized Sheet observation reads. */
13
- export const SYNC_GATEWAY_SNAPSHOT_READ_MODES = {
13
+ export const SYNC_SNAPSHOT_READ_MODES = {
14
14
  /** Reads formula, merge, error, and stable-cell metadata for reconciliation. */
15
15
  FULL: "full",
16
16
  /** Reads only user-editable literal values and row identity for polling. */
17
17
  USER_INPUT: "user_input",
18
18
  };
19
- /** Effect kinds that require special handling at the Apps Script boundary. */
20
- export const SYNC_GATEWAY_EFFECT_KINDS = {
19
+ /** Effect kinds that require special handling at the provider boundary. */
20
+ export const SYNC_DELETE_EFFECT_KINDS = {
21
21
  RESOLUTION_DELETE: "resolution_delete",
22
22
  USER_INPUT_DELETE: "user_input_delete",
23
23
  };
24
- /** Terminal and retryable statuses returned for one gateway effect. */
25
- export const SYNC_GATEWAY_EFFECT_RESULT_STATUSES = {
24
+ /** Terminal and retryable statuses returned for one provider effect. */
25
+ export const SYNC_EFFECT_RESULT_STATUSES = {
26
26
  APPLIED: "applied",
27
27
  ALREADY_APPLIED: "already_applied",
28
28
  SUPERSEDED: "superseded",
@@ -32,24 +32,24 @@ export const SYNC_GATEWAY_EFFECT_RESULT_STATUSES = {
32
32
  RETRYABLE_ERROR: "retryable_error",
33
33
  };
34
34
  /** Result label returned when a fast-append row was accepted for writing. */
35
- export const SYNC_GATEWAY_FAST_APPEND_STATUSES = {
35
+ export const SYNC_FAST_APPEND_STATUSES = {
36
36
  APPLIED: "applied",
37
37
  };
38
- /** How much remote read-back the gateway performs before returning a write result. */
39
- export const SYNC_GATEWAY_POSTCONDITION_MODES = {
38
+ /** How much remote read-back the provider performs before returning a write result. */
39
+ export const SYNC_POSTCONDITION_MODES = {
40
40
  /** Read changed rows after the write and verify their target hashes inline. */
41
41
  INLINE: "inline",
42
42
  /** Return after the batched write is flushed; recovery reads verify later. */
43
43
  DEFERRED: "deferred",
44
44
  };
45
- /** Evidence level attached to a successful gateway write result. */
46
- export const SYNC_GATEWAY_POSTCONDITION_STATUSES = {
45
+ /** Evidence level attached to a successful provider write result. */
46
+ export const SYNC_POSTCONDITION_STATUSES = {
47
47
  VERIFIED: "verified",
48
48
  ACKNOWLEDGED: "acknowledged",
49
49
  UNAVAILABLE: "unavailable",
50
50
  };
51
51
  /** Read-back classification after a lost response or expired lease. */
52
- export const SYNC_GATEWAY_POSTCONDITION_DISPOSITIONS = {
52
+ export const SYNC_POSTCONDITION_DISPOSITIONS = {
53
53
  APPLIED: "applied",
54
54
  UNAPPLIED: "unapplied",
55
55
  CHANGED: "changed",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/application/sync/sheets/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAGjF,kEAAkE;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,EAAE,EAAE,sBAAsB;CAClB,CAAC;AAKX,mEAAmE;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,2BAA2B,CAAC,UAAU;IAClD,YAAY,EAAE,2BAA2B,CAAC,YAAY;IACtD,cAAc,EAAE,2BAA2B,CAAC,cAAc;CACC,CAAC;AAI9D,+DAA+D;AAC/D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,gFAAgF;IAChF,IAAI,EAAE,MAAM;IACZ,4EAA4E;IAC5E,UAAU,EAAE,YAAY;CAChB,CAAC;AAKX,2EAA2E;AAC3E,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC;AAEX,wEAAwE;AACxE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,SAAS;IAClB,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,iBAAiB;CAC1B,CAAC;AAKX,6EAA6E;AAC7E,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,OAAO,EAAE,SAAS;CACV,CAAC;AAKX,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,+EAA+E;IAC/E,MAAM,EAAE,QAAQ;IAChB,8EAA8E;IAC9E,QAAQ,EAAE,UAAU;CACZ,CAAC;AAKX,qEAAqE;AACrE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;CAClB,CAAC;AAKX,uEAAuE;AACvE,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;CAClB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { CoreErrorException } from "../../../domain/errors/index.js";
2
+ /** Stable error categories emitted by the runtime sync provider contract. */
3
+ export declare const SYNC_SHEETS_ERROR_CODES: {
4
+ readonly INVALID_EFFECT_PAYLOAD: "invalid_sync_effect_payload";
5
+ readonly INVALID_PROVISIONING_DEFINITIONS: "invalid_sync_provisioning";
6
+ readonly INVALID_CLIENT_OPTIONS: "invalid_sync_client_options";
7
+ readonly INVALID_PROVIDER_RESPONSE: "invalid_sync_provider_response";
8
+ readonly INVALID_FAKE_PROVIDER_INPUT: "invalid_fake_sync_provider_input";
9
+ };
10
+ export type SyncSheetsErrorCode = (typeof SYNC_SHEETS_ERROR_CODES)[keyof typeof SYNC_SHEETS_ERROR_CODES];
11
+ /** Error raised when a provider payload or provisioning contract is invalid. */
12
+ export declare class SyncSheetsContractError extends CoreErrorException<"runtime.sync_sheets", SyncSheetsErrorCode> {
13
+ constructor(code: SyncSheetsErrorCode, message: string);
14
+ }
15
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/application/sync/sheets/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB;;;;;;CAM1B,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE,gFAAgF;AAChF,qBAAa,uBAAwB,SAAQ,kBAAkB,CAC7D,qBAAqB,EACrB,mBAAmB,CACpB;gBACa,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM;CAGvD"}
@@ -0,0 +1,16 @@
1
+ import { CoreErrorException } from "../../../domain/errors/index.js";
2
+ /** Stable error categories emitted by the runtime sync provider contract. */
3
+ export const SYNC_SHEETS_ERROR_CODES = {
4
+ INVALID_EFFECT_PAYLOAD: "invalid_sync_effect_payload",
5
+ INVALID_PROVISIONING_DEFINITIONS: "invalid_sync_provisioning",
6
+ INVALID_CLIENT_OPTIONS: "invalid_sync_client_options",
7
+ INVALID_PROVIDER_RESPONSE: "invalid_sync_provider_response",
8
+ INVALID_FAKE_PROVIDER_INPUT: "invalid_fake_sync_provider_input",
9
+ };
10
+ /** Error raised when a provider payload or provisioning contract is invalid. */
11
+ export class SyncSheetsContractError extends CoreErrorException {
12
+ constructor(code, message) {
13
+ super("runtime.sync_sheets", code, message);
14
+ }
15
+ }
16
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/application/sync/sheets/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,sBAAsB,EAAE,6BAA6B;IACrD,gCAAgC,EAAE,2BAA2B;IAC7D,sBAAsB,EAAE,6BAA6B;IACrD,yBAAyB,EAAE,gCAAgC;IAC3D,2BAA2B,EAAE,kCAAkC;CACvD,CAAC;AAKX,gFAAgF;AAChF,MAAM,OAAO,uBAAwB,SAAQ,kBAG5C;IACC,YAAY,IAAyB,EAAE,OAAe;QACpD,KAAK,CAAC,qBAAqB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF"}
@@ -1,15 +1,16 @@
1
1
  /**
2
- * Per-spreadsheet Gateway coordinator that serializes remote mutations.
2
+ * Per-spreadsheet provider coordinator that serializes remote mutations.
3
3
  *
4
- * The deployed Apps Script Gateway guards every data-plane operation with one
5
- * global `LockService.getScriptLock()`. Before this coordinator, the outbound
6
- * effect worker, the User_Input polling supervisor, provisioning, and test
7
- * controls each called the Gateway directly, so several in-flight requests
8
- * competed for the same script lock and the same Sheet context at once. Under
9
- * load that produced lock-acquisition failures, duplicate-row races, and tail
10
- * latency dominated by lock waits.
4
+ * The Google Sheets API is not transactional across requests, and concurrent
5
+ * in-flight requests to one spreadsheet can race (duplicate-row appends,
6
+ * interleaved update/delete batches) and burn quota with lock-style retries.
7
+ * Before this coordinator, the outbound effect worker, the User_Input polling
8
+ * supervisor, provisioning, and test controls each called the provider
9
+ * directly, so several in-flight requests competed for the same Sheet context
10
+ * at once. Under load that produced write races and tail latency dominated by
11
+ * retries.
11
12
  *
12
- * The coordinator is a transparent decorator: it implements the same gateway
13
+ * The coordinator is a transparent decorator: it implements the same provider
13
14
  * boundary the worker and polling already use, so no caller changes are
14
15
  * required. It routes every mutation and recovery barrier through one
15
16
  * per-spreadsheet FIFO lane (default total concurrency 1) while leaving
@@ -18,8 +19,8 @@
18
19
  * side from issuing competing mutations.
19
20
  *
20
21
  * Invariants preserved:
21
- * - Total mutation concurrency is 1 per lane by default, matching the global
22
- * Apps Script script lock for single-spreadsheet deployments.
22
+ * - Total mutation concurrency is 1 per lane by default, giving one in-flight
23
+ * write per spreadsheet at a time.
23
24
  * - Lock-free reads (`readSnapshot`, `readRows`, `readRowsBatch`) never wait on
24
25
  * the mutation lane.
25
26
  * - Recovery barriers (`readEffectPostcondition(s)`) use the mutation lane so a
@@ -29,13 +30,13 @@
29
30
  * - Provisioning uses a dedicated lane so setup never races an append/write.
30
31
  * - A failing or throwing mutation releases the lane, so it never deadlocks.
31
32
  */
32
- import type { ApplySyncEffectsRequest, ApplySyncEffectsResult, EnsureSyncRowAnchorsRequest, EnsureSyncRowAnchorsResult, FastAppendRowsRequest, FastAppendRowsResult, ReadSyncEffectPostconditionsRequest, ReadSyncSnapshotRequest, ReadSyncTableRowsRequest, SyncEffectPostcondition, SyncGatewayEffect, SyncGatewayEffectPostconditionResult, SyncGatewaySnapshot, SyncObservedSnapshot, SyncSheetGateway, SyncSheetObservationBatchGateway, SyncSheetTableReaderGateway, SyncTableRowsResult } from "../syncGateway.js";
33
+ import type { ApplySyncEffectsRequest, ApplySyncEffectsResult, EnsureSyncRowAnchorsRequest, EnsureSyncRowAnchorsResult, FastAppendRowsRequest, FastAppendRowsResult, ReadSyncEffectPostconditionsRequest, ReadSyncSnapshotRequest, ReadSyncTableRowsRequest, SyncEffectPostcondition, SyncProjectionEffect, SyncEffectPostconditionResult, SyncSheetsSnapshot, SyncObservedSnapshot, SyncSheetsProvider, SyncSheetsObservationBatchProvider, SyncSheetsTableReader, SyncTableRowsResult } from "../syncSheets.js";
33
34
  import { AsyncMutex } from "./asyncMutex.js";
34
- import { type CoordinatorLaneEvent } from "./coordinatorTelemetry.js";
35
- /** Gateway boundary the coordinator wraps (effect + observation + table read). */
36
- export type CoordinatedGatewayInner = SyncSheetGateway & SyncSheetTableReaderGateway;
35
+ import { type CoordinatorLaneEvent } from "./laneTelemetry.js";
36
+ /** Provider boundary the coordinator wraps (effect + observation + table read). */
37
+ export type CoordinatedSheetsInner = SyncSheetsProvider & SyncSheetsTableReader;
37
38
  /** Options for constructing a per-spreadsheet coordinator. */
38
- export interface CoordinatedSyncGatewayOptions<TInner extends CoordinatedGatewayInner> {
39
+ export interface CoordinatedSheetsProviderOptions<TInner extends CoordinatedSheetsInner> {
39
40
  readonly inner: TInner;
40
41
  /**
41
42
  * Derives the mutation-lane key for one physical sheet. Defaults to a
@@ -50,43 +51,43 @@ export interface CoordinatedSyncGatewayOptions<TInner extends CoordinatedGateway
50
51
  readonly clock?: () => number;
51
52
  }
52
53
  /**
53
- * Serializes Gateway mutations per lane while keeping value reads lock-free.
54
+ * Serializes provider mutations per lane while keeping value reads lock-free.
54
55
  *
55
- * Implements the full gateway, table-reader, observation-batch, and provisioner
56
- * boundary, so it can wrap both the real Apps Script gateway and fakes. When
57
- * the inner gateway lacks the one-request observation path, observation is
56
+ * Implements the full provider, table-reader, observation-batch, and provisioner
57
+ * boundary, so it can wrap both the real Google Sheets API provider and fakes.
58
+ * When the inner provider lacks the one-request observation path, observation is
58
59
  * routed through `ensureRowAnchors` + `readSnapshot` inside the same held lane.
59
60
  */
60
- export declare class CoordinatedSyncGateway<TInner extends CoordinatedGatewayInner> implements SyncSheetGateway, SyncSheetTableReaderGateway, SyncSheetObservationBatchGateway {
61
+ export declare class CoordinatedSheetsProvider<TInner extends CoordinatedSheetsInner> implements SyncSheetsProvider, SyncSheetsTableReader, SyncSheetsObservationBatchProvider {
61
62
  private readonly inner;
62
63
  private readonly resolveKey;
63
64
  private readonly onLaneEvent;
64
65
  private readonly now;
65
66
  private readonly lanes;
66
- constructor(options: CoordinatedSyncGatewayOptions<TInner>);
67
+ constructor(options: CoordinatedSheetsProviderOptions<TInner>);
67
68
  /** Returns a snapshot of all known lane metrics; diagnostic only. */
68
69
  laneMetrics(): ReadonlyMap<string, ReturnType<AsyncMutex["metrics"]>>;
69
70
  /**
70
71
  * Runs an internal control-plane operation on the same mutation lane as
71
72
  * effects and anchor writes. Test/admin controls use this to avoid issuing a
72
- * competing Apps Script request outside the coordinator.
73
+ * competing provider request outside the coordinator.
73
74
  */
74
75
  runSerializedControl<T>(physicalSheetId: string, operation: string, task: () => Promise<T>): Promise<T>;
75
76
  fastAppendRows(request: FastAppendRowsRequest): Promise<FastAppendRowsResult>;
76
77
  applyEffects(request: ApplySyncEffectsRequest): Promise<ApplySyncEffectsResult>;
77
- readEffectPostcondition(effect: SyncGatewayEffect): Promise<SyncEffectPostcondition>;
78
- readEffectPostconditions(request: ReadSyncEffectPostconditionsRequest): Promise<readonly SyncGatewayEffectPostconditionResult[]>;
78
+ readEffectPostcondition(effect: SyncProjectionEffect): Promise<SyncEffectPostcondition>;
79
+ readEffectPostconditions(request: ReadSyncEffectPostconditionsRequest): Promise<readonly SyncEffectPostconditionResult[]>;
79
80
  ensureRowAnchors(request: EnsureSyncRowAnchorsRequest): Promise<EnsureSyncRowAnchorsResult>;
80
81
  observeSnapshot(request: ReadSyncSnapshotRequest): Promise<SyncObservedSnapshot>;
81
82
  observeSnapshots(requests: readonly ReadSyncSnapshotRequest[]): Promise<readonly SyncObservedSnapshot[]>;
82
83
  /** Lock-free snapshot read; never waits on the mutation lane. */
83
- readSnapshot(request: ReadSyncSnapshotRequest): Promise<SyncGatewaySnapshot>;
84
+ readSnapshot(request: ReadSyncSnapshotRequest): Promise<SyncSheetsSnapshot>;
84
85
  /** Lock-free values-only read; never waits on the mutation lane. */
85
86
  readRows(request: ReadSyncTableRowsRequest): Promise<SyncTableRowsResult>;
86
87
  /** Lock-free batched values-only read; never waits on the mutation lane. */
87
88
  readRowsBatch(requests: readonly ReadSyncTableRowsRequest[]): Promise<readonly SyncTableRowsResult[]>;
88
89
  /**
89
- * Observes one snapshot through the inner gateway, using its single-request
90
+ * Observes one snapshot through the inner provider, using its single-request
90
91
  * capability when present and falling back to ensure+read otherwise. Both
91
92
  * calls run inside the caller's already-held lane, so observation stays
92
93
  * serialized against competing mutations.
@@ -99,4 +100,4 @@ export declare class CoordinatedSyncGateway<TInner extends CoordinatedGatewayInn
99
100
  private emitFailure;
100
101
  private emit;
101
102
  }
102
- //# sourceMappingURL=CoordinatedSyncGateway.d.ts.map
103
+ //# sourceMappingURL=CoordinatedSheetsProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoordinatedSheetsProvider.d.ts","sourceRoot":"","sources":["../../../../../src/application/sync/sheets/mutationCoordinator/CoordinatedSheetsProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,mCAAmC,EACnC,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,6BAA6B,EAC7B,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,kCAAkC,EAClC,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAA0B,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,oBAAoB,CAAC;AAG5B,mFAAmF;AACnF,MAAM,MAAM,sBAAsB,GAChC,kBAAkB,GAClB,qBAAqB,CAAC;AAMxB,8DAA8D;AAC9D,MAAM,WAAW,gCAAgC,CAAC,MAAM,SAAS,sBAAsB;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;O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vC,gBAAgB,CAC3B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC;IAMzB,eAAe,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMhF,gBAAgB,CAC3B,QAAQ,EAAE,SAAS,uBAAuB,EAAE,GAC3C,OAAO,CAAC,SAAS,oBAAoB,EAAE,CAAC;IAqB3C,iEAAiE;IACpD,YAAY,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAIxF,oEAAoE;IACvD,QAAQ,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAItF,4EAA4E;IAC/D,aAAa,CACxB,QAAQ,EAAE,SAAS,wBAAwB,EAAE,GAC5C,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC;IAI1C;;;;;OAKG;YACW,eAAe;IAS7B,OAAO,CAAC,OAAO;YASD,WAAW;YASX,UAAU;IA4CxB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,IAAI;CAOb"}
@@ -1,15 +1,16 @@
1
1
  /**
2
- * Per-spreadsheet Gateway coordinator that serializes remote mutations.
2
+ * Per-spreadsheet provider coordinator that serializes remote mutations.
3
3
  *
4
- * The deployed Apps Script Gateway guards every data-plane operation with one
5
- * global `LockService.getScriptLock()`. Before this coordinator, the outbound
6
- * effect worker, the User_Input polling supervisor, provisioning, and test
7
- * controls each called the Gateway directly, so several in-flight requests
8
- * competed for the same script lock and the same Sheet context at once. Under
9
- * load that produced lock-acquisition failures, duplicate-row races, and tail
10
- * latency dominated by lock waits.
4
+ * The Google Sheets API is not transactional across requests, and concurrent
5
+ * in-flight requests to one spreadsheet can race (duplicate-row appends,
6
+ * interleaved update/delete batches) and burn quota with lock-style retries.
7
+ * Before this coordinator, the outbound effect worker, the User_Input polling
8
+ * supervisor, provisioning, and test controls each called the provider
9
+ * directly, so several in-flight requests competed for the same Sheet context
10
+ * at once. Under load that produced write races and tail latency dominated by
11
+ * retries.
11
12
  *
12
- * The coordinator is a transparent decorator: it implements the same gateway
13
+ * The coordinator is a transparent decorator: it implements the same provider
13
14
  * boundary the worker and polling already use, so no caller changes are
14
15
  * required. It routes every mutation and recovery barrier through one
15
16
  * per-spreadsheet FIFO lane (default total concurrency 1) while leaving
@@ -18,8 +19,8 @@
18
19
  * side from issuing competing mutations.
19
20
  *
20
21
  * Invariants preserved:
21
- * - Total mutation concurrency is 1 per lane by default, matching the global
22
- * Apps Script script lock for single-spreadsheet deployments.
22
+ * - Total mutation concurrency is 1 per lane by default, giving one in-flight
23
+ * write per spreadsheet at a time.
23
24
  * - Lock-free reads (`readSnapshot`, `readRows`, `readRowsBatch`) never wait on
24
25
  * the mutation lane.
25
26
  * - Recovery barriers (`readEffectPostcondition(s)`) use the mutation lane so a
@@ -29,19 +30,19 @@
29
30
  * - Provisioning uses a dedicated lane so setup never races an append/write.
30
31
  * - A failing or throwing mutation releases the lane, so it never deadlocks.
31
32
  */
32
- import { isSyncSheetObservationBatchGateway, } from "../syncGateway.js";
33
+ import { isSyncSheetsObservationBatchProvider, } from "../syncSheets.js";
33
34
  import { AsyncMutex } from "./asyncMutex.js";
34
- import { TRANSPORT_OUTCOME_KINDS, } from "./coordinatorTelemetry.js";
35
- import { classifyTransportOutcome } from "../transportClassification.js";
35
+ import { TRANSPORT_OUTCOME_KINDS, } from "./laneTelemetry.js";
36
+ import { classifyTransportOutcome } from "../transportOutcome.js";
36
37
  /**
37
- * Serializes Gateway mutations per lane while keeping value reads lock-free.
38
+ * Serializes provider mutations per lane while keeping value reads lock-free.
38
39
  *
39
- * Implements the full gateway, table-reader, observation-batch, and provisioner
40
- * boundary, so it can wrap both the real Apps Script gateway and fakes. When
41
- * the inner gateway lacks the one-request observation path, observation is
40
+ * Implements the full provider, table-reader, observation-batch, and provisioner
41
+ * boundary, so it can wrap both the real Google Sheets API provider and fakes.
42
+ * When the inner provider lacks the one-request observation path, observation is
42
43
  * routed through `ensureRowAnchors` + `readSnapshot` inside the same held lane.
43
44
  */
44
- export class CoordinatedSyncGateway {
45
+ export class CoordinatedSheetsProvider {
45
46
  inner;
46
47
  resolveKey;
47
48
  onLaneEvent;
@@ -63,7 +64,7 @@ export class CoordinatedSyncGateway {
63
64
  /**
64
65
  * Runs an internal control-plane operation on the same mutation lane as
65
66
  * effects and anchor writes. Test/admin controls use this to avoid issuing a
66
- * competing Apps Script request outside the coordinator.
67
+ * competing provider request outside the coordinator.
67
68
  */
68
69
  runSerializedControl(physicalSheetId, operation, task) {
69
70
  return this.runMutation(physicalSheetId, operation, task);
@@ -91,15 +92,15 @@ export class CoordinatedSyncGateway {
91
92
  return [];
92
93
  const keys = distinctLaneKeys(requests.map((request) => this.resolveKey(request.physicalSheetId)));
93
94
  return this.runInLanes(keys, "observeSnapshots", async () => {
94
- if (isSyncSheetObservationBatchGateway(this.inner)) {
95
- // Delegate the whole batch to the inner gateway so one remote request
95
+ if (isSyncSheetsObservationBatchProvider(this.inner)) {
96
+ // Delegate the whole batch to the inner provider so one remote request
96
97
  // covers every requested projection; serializing one request at a time
97
98
  // here would defeat that shared round trip.
98
99
  return this.inner.observeSnapshots(requests);
99
100
  }
100
101
  const results = [];
101
102
  for (const request of requests) {
102
- // Sequential fallback for inner gateways without the batch capability;
103
+ // Sequential fallback for inner providers without the batch capability;
103
104
  // each request still runs under the already-held lanes.
104
105
  // eslint-disable-next-line no-await-in-loop
105
106
  results.push(await this.observeOneInner(request));
@@ -120,13 +121,13 @@ export class CoordinatedSyncGateway {
120
121
  return this.inner.readRowsBatch(requests);
121
122
  }
122
123
  /**
123
- * Observes one snapshot through the inner gateway, using its single-request
124
+ * Observes one snapshot through the inner provider, using its single-request
124
125
  * capability when present and falling back to ensure+read otherwise. Both
125
126
  * calls run inside the caller's already-held lane, so observation stays
126
127
  * serialized against competing mutations.
127
128
  */
128
129
  async observeOneInner(request) {
129
- if (isSyncSheetObservationBatchGateway(this.inner)) {
130
+ if (isSyncSheetsObservationBatchProvider(this.inner)) {
130
131
  return this.inner.observeSnapshot(request);
131
132
  }
132
133
  const anchors = await this.inner.ensureRowAnchors(request);
@@ -218,4 +219,4 @@ const DEFAULT_LANE_KEY = "default";
218
219
  function distinctLaneKeys(keys) {
219
220
  return [...new Set(keys)].sort();
220
221
  }
221
- //# sourceMappingURL=CoordinatedSyncGateway.js.map
222
+ //# sourceMappingURL=CoordinatedSheetsProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoordinatedSheetsProvider.js","sourceRoot":"","sources":["../../../../../src/application/sync/sheets/mutationCoordinator/CoordinatedSheetsProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EACL,oCAAoC,GACrC,MAAM,kBAAkB,CAAC;AAqB1B,OAAO,EAAE,UAAU,EAA0B,MAAM,iBAAiB,CAAC;AACrE,OAAO,EACL,uBAAuB,GAExB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AA2BlE;;;;;;;GAOG;AACH,MAAM,OAAO,yBAAyB;IAEnB,KAAK,CAAS;IACd,UAAU,CAAsC;IAChD,WAAW,CAAsD;IACjE,GAAG,CAAe;IAClB,KAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;IAEvD,YAAmB,OAAiD;QAClE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,2BAA2B,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC;QAClF,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC;IACvC,CAAC;IAED,qEAAqE;IAC9D,WAAW;QAChB,MAAM,QAAQ,GAAG,IAA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AW,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;QAAC,MAAM,CAAC;YACP,iDAAiD;QACnD,CAAC;IACH,CAAC;CACF;AAED,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEnC,qEAAqE;AACrE,SAAS,gBAAgB,CAAC,IAAuB;IAC/C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACnC,CAAC"}
@@ -1,11 +1,10 @@
1
1
  /**
2
- * Minimal FIFO async mutex used to serialize Gateway mutations.
2
+ * Minimal FIFO async mutex used to serialize provider mutations.
3
3
  *
4
4
  * The coordinator owns one mutex per mutation lane. It is intentionally
5
5
  * in-process only: SQLite outbox, leases, and receipts remain the durable
6
6
  * authority. The mutex exists solely so the Node side never issues competing
7
- * mutations (and competing Apps Script `ScriptLock` acquisitions) for the same
8
- * spreadsheet within one process.
7
+ * mutations for the same spreadsheet within one process.
9
8
  *
10
9
  * Fairness is FIFO so an uncertain-recovery barrier cannot be starved by a
11
10
  * steady stream of new mutations.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asyncMutex.d.ts","sourceRoot":"","sources":["../../../../../src/application/sync/sheets/mutationCoordinator/asyncMutex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,6DAA6D;AAC7D,MAAM,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC;AAE3C;;;;;;GAMG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,IAAI,CAAoC;IAChD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,cAAc,CAAK;IAE3B;;;OAGG;IACU,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IASvD;;;;;OAKG;IACI,OAAO,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAgB5C,8DAA8D;IACvD,OAAO,IAAI,iBAAiB;IAQnC,OAAO,CAAC,OAAO;CAQhB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asyncMutex.js","sourceRoot":"","sources":["../../../../../src/application/sync/sheets/mutationCoordinator/asyncMutex.ts"],"names":[],"mappings":"AAuBA;;;;;;GAMG;AACH,MAAM,OAAO,UAAU;IACb,IAAI,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IACxC,MAAM,GAAG,KAAK,CAAC;IACf,UAAU,GAAG,CAAC,CAAC;IACf,cAAc,GAAG,CAAC,CAAC;IAE3B;;;OAGG;IACI,KAAK,CAAC,GAAG,CAAI,IAAsB;QACxC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrC,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,EAAE,CAAC;QACtB,CAAC;gBAAS,CAAC;YACT,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACI,OAAO;QACZ,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAC3B,IAAI,IAAgB,CAAC;QACrB,MAAM,IAAI,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACzC,IAAI,GAAG,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,0EAA0E;QAC1E,yDAAyD;QACzD,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE;YACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,8DAA8D;IACvD,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,SAAS,EAAE,IAAI,CAAC,cAAc;SAC/B,CAAC;IACJ,CAAC;IAEO,OAAO,CAAC,IAAgB;QAC9B,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO;QACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;QACnD,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;QACzB,qDAAqD;QACrD,IAAI,EAAE,CAAC;IACT,CAAC;CACF"}
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Telemetry contract for the per-spreadsheet Gateway coordinator.
2
+ * Telemetry contract for the per-spreadsheet provider coordinator.
3
3
  *
4
- * Lane events are diagnostic only: a sink failure must never change gateway
4
+ * Lane events are diagnostic only: a sink failure must never change provider
5
5
  * behavior. The fields are deliberately redacted — no signed payload, secret,
6
6
  * or operation arguments are recorded.
7
7
  */
8
- import { TRANSPORT_OUTCOME_KINDS, type TransportOutcomeKind } from "../transportClassification.js";
8
+ import { TRANSPORT_OUTCOME_KINDS, type TransportOutcomeKind } from "../transportOutcome.js";
9
9
  export { TRANSPORT_OUTCOME_KINDS };
10
10
  export type { TransportOutcomeKind };
11
11
  /** One observed mutation lane event emitted by the coordinator. */
@@ -28,4 +28,4 @@ export interface CoordinatorLaneEvent {
28
28
  /** Convenience type alias used by call sites that only need the event shape. */
29
29
  export type CoordinatorLaneSink = (event: CoordinatorLaneEvent) => void;
30
30
  /** Marker used so callers can type an absent presence without importing state. */
31
- //# sourceMappingURL=coordinatorTelemetry.d.ts.map
31
+ //# sourceMappingURL=laneTelemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"laneTelemetry.d.ts","sourceRoot":"","sources":["../../../../../src/application/sync/sheets/mutationCoordinator/laneTelemetry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,OAAO,EAAE,uBAAuB,EAAE,CAAC;AACnC,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC,mEAAmE;AACnE,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,qEAAqE;IACrE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC1C,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;CACrC;AAED,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;AAExE,kFAAkF"}
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Telemetry contract for the per-spreadsheet Gateway coordinator.
2
+ * Telemetry contract for the per-spreadsheet provider coordinator.
3
3
  *
4
- * Lane events are diagnostic only: a sink failure must never change gateway
4
+ * Lane events are diagnostic only: a sink failure must never change provider
5
5
  * behavior. The fields are deliberately redacted — no signed payload, secret,
6
6
  * or operation arguments are recorded.
7
7
  */
8
- import { TRANSPORT_OUTCOME_KINDS } from "../transportClassification.js";
8
+ import { TRANSPORT_OUTCOME_KINDS } from "../transportOutcome.js";
9
9
  export { TRANSPORT_OUTCOME_KINDS };
10
10
  /** Marker used so callers can type an absent presence without importing state. */
11
- // Presence is re-exported through transportClassification's redacted fields,
11
+ // Presence is re-exported through transportOutcome's redacted fields,
12
12
  // so this file does not need to import the shared state types directly.
13
- //# sourceMappingURL=coordinatorTelemetry.js.map
13
+ //# sourceMappingURL=laneTelemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"laneTelemetry.js","sourceRoot":"","sources":["../../../../../src/application/sync/sheets/mutationCoordinator/laneTelemetry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAA6B,MAAM,wBAAwB,CAAC;AAE5F,OAAO,EAAE,uBAAuB,EAAE,CAAC;AAwBnC,kFAAkF;AAClF,sEAAsE;AACtE,wEAAwE"}