@ref0/git 0.12.0 → 0.20.0

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 (436) hide show
  1. package/dist/access/private-refs.mjs +3 -3
  2. package/dist/auth/access-jwt.mjs +2 -2
  3. package/dist/auth/auth.d.mts +2 -2
  4. package/dist/auth/auth.mjs +3 -6
  5. package/dist/auth/authorize.mjs +4 -20
  6. package/dist/auth/fences.d.mts +1 -2
  7. package/dist/auth/fences.mjs +3 -3
  8. package/dist/auth/grants.mjs +4 -4
  9. package/dist/auth/helpers.mjs +3 -11
  10. package/dist/auth/host-function.mjs +18 -1
  11. package/dist/auth/host-services.mjs +11 -0
  12. package/dist/auth/identify.d.mts +1 -1
  13. package/dist/auth/identify.mjs +3 -3
  14. package/dist/auth/policy.d.mts +27 -7
  15. package/dist/auth/policy.mjs +8 -4
  16. package/dist/auth/token-cleanup.mjs +67 -0
  17. package/dist/auth/token-rows.mjs +1 -1
  18. package/dist/auth/token-text.mjs +9 -1
  19. package/dist/auth/tokens-base.d.mts +35 -0
  20. package/dist/auth/tokens-base.mjs +13 -0
  21. package/dist/auth/tokens-layer.d.mts +2 -28
  22. package/dist/auth/tokens-layer.mjs +6 -12
  23. package/dist/auth/tokens-public.d.mts +3 -3
  24. package/dist/auth/tokens.d.mts +7 -17
  25. package/dist/auth/tokens.mjs +9 -87
  26. package/dist/auth.d.mts +1 -4
  27. package/dist/auth.mjs +1 -3
  28. package/dist/client/answer.mjs +21 -42
  29. package/dist/client/client.d.mts +2 -4
  30. package/dist/client/git-http.mjs +35 -11
  31. package/dist/client/local.mjs +14 -13
  32. package/dist/client/push-upload.mjs +39 -12
  33. package/dist/client/remote.mjs +95 -31
  34. package/dist/client/run-remote-helper.d.mts +1 -0
  35. package/dist/client/run-remote-helper.mjs +58 -24
  36. package/dist/client/slice-push.d.mts +1 -1
  37. package/dist/client/transport.mjs +105 -46
  38. package/dist/contracts/access.d.mts +8 -8
  39. package/dist/contracts/actors.d.mts +2 -34
  40. package/dist/contracts/blobs.d.mts +57 -10
  41. package/dist/contracts/blobs.mjs +16 -2
  42. package/dist/contracts/call-allowance.d.mts +13 -0
  43. package/dist/contracts/call-allowance.mjs +44 -0
  44. package/dist/contracts/calls-spent.mjs +8 -3
  45. package/dist/contracts/client.d.mts +23 -19
  46. package/dist/contracts/commits.d.mts +34 -26
  47. package/dist/contracts/commits.mjs +9 -1
  48. package/dist/contracts/engine.d.mts +6 -1
  49. package/dist/contracts/engine.mjs +10 -1
  50. package/dist/contracts/files.d.mts +12 -12
  51. package/dist/contracts/forks.d.mts +27 -17
  52. package/dist/contracts/git-events.d.mts +29 -1
  53. package/dist/contracts/git-hooks.d.mts +1 -1
  54. package/dist/contracts/git.d.mts +39 -7
  55. package/dist/contracts/git.mjs +3 -2
  56. package/dist/contracts/grants.d.mts +24 -4
  57. package/dist/contracts/handlers.d.mts +1 -1
  58. package/dist/contracts/lfs.d.mts +28 -9
  59. package/dist/contracts/merges.d.mts +3 -2
  60. package/dist/contracts/objects.d.mts +103 -35
  61. package/dist/contracts/operations.d.mts +3 -0
  62. package/dist/contracts/operations.mjs +12 -2
  63. package/dist/contracts/push-uploads.d.mts +44 -5
  64. package/dist/contracts/push-uploads.mjs +7 -3
  65. package/dist/contracts/queue.d.mts +40 -12
  66. package/dist/contracts/queue.mjs +3 -4
  67. package/dist/contracts/refs.d.mts +50 -25
  68. package/dist/contracts/remote.d.mts +6 -7
  69. package/dist/contracts/remote.mjs +5 -4
  70. package/dist/contracts/repo-records.d.mts +1 -0
  71. package/dist/contracts/repos.d.mts +106 -127
  72. package/dist/contracts/repos.mjs +33 -4
  73. package/dist/contracts/result.d.mts +49 -25
  74. package/dist/contracts/result.mjs +52 -11
  75. package/dist/contracts/rules.d.mts +22 -22
  76. package/dist/contracts/server.d.mts +37 -111
  77. package/dist/contracts/services.d.mts +1 -1
  78. package/dist/contracts/signin.d.mts +1 -1
  79. package/dist/contracts/store.d.mts +6 -5
  80. package/dist/contracts/sync.d.mts +90 -26
  81. package/dist/contracts/sync.mjs +45 -11
  82. package/dist/contracts/tags.d.mts +10 -10
  83. package/dist/contracts/time.d.mts +3 -0
  84. package/dist/contracts/{promises.mjs → time.mjs} +1 -1
  85. package/dist/contracts/tokens.d.mts +15 -22
  86. package/dist/contracts/tokens.mjs +3 -3
  87. package/dist/contracts/topics.d.mts +1 -6
  88. package/dist/contracts/trees.d.mts +12 -12
  89. package/dist/contracts/work.d.mts +87 -12
  90. package/dist/contracts/work.mjs +8 -1
  91. package/dist/core/access.d.mts +1 -2
  92. package/dist/core/access.mjs +46 -13
  93. package/dist/core/ancestry.d.mts +10 -0
  94. package/dist/core/ancestry.mjs +6 -6
  95. package/dist/core/asked.mjs +43 -5
  96. package/dist/core/call-names.mjs +7 -1
  97. package/dist/core/call-services.mjs +13 -4
  98. package/dist/core/events/deliver.d.mts +1 -2
  99. package/dist/core/events/deliver.mjs +48 -33
  100. package/dist/core/events/retired.mjs +119 -0
  101. package/dist/core/forks.mjs +931 -435
  102. package/dist/core/hooks/groups.mjs +1 -1
  103. package/dist/core/imports.mjs +159 -15
  104. package/dist/core/index-job.mjs +128 -37
  105. package/dist/core/index-lost.d.mts +1 -2
  106. package/dist/core/index-lost.mjs +2 -2
  107. package/dist/core/job-view.mjs +8 -9
  108. package/dist/core/loose-tally.mjs +1 -1
  109. package/dist/core/mirror-rows.mjs +19 -4
  110. package/dist/core/objects/blobs.mjs +129 -3
  111. package/dist/core/objects/commits.mjs +16 -6
  112. package/dist/core/objects/lines.mjs +2 -2
  113. package/dist/core/objects/merges.mjs +4 -1
  114. package/dist/core/objects/objects-layer.d.mts +1 -1
  115. package/dist/core/objects/objects-layer.mjs +3 -3
  116. package/dist/core/objects/reading.mjs +24 -13
  117. package/dist/core/objects/tags.mjs +4 -1
  118. package/dist/core/objects/trees.mjs +2 -2
  119. package/dist/core/objects/writing.mjs +2 -2
  120. package/dist/core/own-writes.mjs +1 -1
  121. package/dist/core/parts.d.mts +10 -6
  122. package/dist/core/parts.mjs +3 -11
  123. package/dist/core/promise.mjs +9 -12
  124. package/dist/core/purge.mjs +316 -42
  125. package/dist/core/push-decide.mjs +3 -1
  126. package/dist/core/push-files.d.mts +12 -0
  127. package/dist/core/push-files.mjs +225 -0
  128. package/dist/core/push-repo.d.mts +8 -0
  129. package/dist/core/push-repo.mjs +56 -0
  130. package/dist/core/push.d.mts +17 -0
  131. package/dist/core/push.mjs +153 -70
  132. package/dist/core/receipts.mjs +34 -13
  133. package/dist/core/ref-index-job.mjs +4 -4
  134. package/dist/core/ref-view.mjs +61 -7
  135. package/dist/core/refs.mjs +18 -13
  136. package/dist/core/registered-rows.mjs +2 -2
  137. package/dist/core/repack.mjs +46 -28
  138. package/dist/core/repo-info.mjs +19 -12
  139. package/dist/core/repos.mjs +50 -22
  140. package/dist/core/rules/commit-changes.d.mts +0 -1
  141. package/dist/core/saved-caller-views.d.mts +7 -2
  142. package/dist/core/saved-caller-views.mjs +2 -2
  143. package/dist/core/saved-callers.d.mts +19 -2
  144. package/dist/core/seam.d.mts +16 -26
  145. package/dist/core/seam.mjs +7 -28
  146. package/dist/core/tokens.mjs +1 -1
  147. package/dist/core/view.d.mts +6 -0
  148. package/dist/core/view.mjs +51 -26
  149. package/dist/core/work.mjs +105 -35
  150. package/dist/effect.d.mts +5 -12
  151. package/dist/effect.mjs +3 -10
  152. package/dist/engine/failures.mjs +2 -1
  153. package/dist/engine/reads.mjs +17 -10
  154. package/dist/engine/walk.mjs +4 -4
  155. package/dist/event-streams/event-streams.d.mts +1 -1
  156. package/dist/event-streams/event-streams.mjs +1 -1
  157. package/dist/event-streams/stream.d.mts +3 -3
  158. package/dist/event-streams/stream.mjs +38 -15
  159. package/dist/extend.d.mts +4 -5
  160. package/dist/extend.mjs +3 -2
  161. package/dist/http/answers.mjs +12 -7
  162. package/dist/http/core-parts.mjs +129 -64
  163. package/dist/http/handler.mjs +36 -9
  164. package/dist/http/node.d.mts +14 -1
  165. package/dist/http/node.mjs +61 -31
  166. package/dist/http/parts.d.mts +2 -0
  167. package/dist/http/push-upload-job.mjs +507 -0
  168. package/dist/http/push-uploads.d.mts +1 -0
  169. package/dist/http/push-uploads.mjs +142 -69
  170. package/dist/http/upload-pack.mjs +10 -9
  171. package/dist/index.d.mts +27 -28
  172. package/dist/index.mjs +5 -8
  173. package/dist/lfs/answer.mjs +37 -0
  174. package/dist/lfs/base.d.mts +9 -3
  175. package/dist/lfs/base.mjs +27 -2
  176. package/dist/lfs/copy.d.mts +60 -0
  177. package/dist/lfs/copy.mjs +109 -0
  178. package/dist/lfs/layer.d.mts +15 -1
  179. package/dist/lfs/layer.mjs +28 -13
  180. package/dist/lfs/locks.mjs +2 -2
  181. package/dist/lfs/objects.d.mts +7 -0
  182. package/dist/lfs/objects.mjs +152 -55
  183. package/dist/lfs/pointers.mjs +2 -2
  184. package/dist/lfs/rows.d.mts +13 -0
  185. package/dist/lfs/rows.mjs +42 -8
  186. package/dist/lfs/service.d.mts +1 -7
  187. package/dist/lfs/service.mjs +1 -9
  188. package/dist/lfs/upkeep.mjs +48 -14
  189. package/dist/lfs/upload-most.mjs +5 -5
  190. package/dist/lfs/wire.mjs +6 -31
  191. package/dist/merges/merges.mjs +2 -2
  192. package/dist/node.d.mts +3 -3
  193. package/dist/protocol/bytes/buffers.mjs +13 -5
  194. package/dist/protocol/bytes/reader.mjs +6 -1
  195. package/dist/protocol/bytes/sha256-hasher.d.mts +15 -0
  196. package/dist/protocol/bytes/sha256.d.mts +32 -0
  197. package/dist/protocol/bytes/sha256.mjs +105 -49
  198. package/dist/protocol/bytes/streams.mjs +27 -1
  199. package/dist/protocol/diff/read.d.mts +4 -3
  200. package/dist/protocol/diff/read.mjs +8 -3
  201. package/dist/protocol/objects/lfs-pointer.d.mts +14 -2
  202. package/dist/protocol/objects/lfs-pointer.mjs +1 -3
  203. package/dist/protocol/objects/links-raw.mjs +24 -10
  204. package/dist/protocol/objects/tag.d.mts +1 -1
  205. package/dist/protocol/objects/tree.mjs +23 -6
  206. package/dist/protocol/packs/delta.d.mts +6 -3
  207. package/dist/protocol/packs/delta.mjs +96 -32
  208. package/dist/protocol/packs/idx.d.mts +2 -1
  209. package/dist/protocol/packs/idx.mjs +22 -3
  210. package/dist/protocol/packs/parts.d.mts +4 -1
  211. package/dist/protocol/packs/parts.mjs +10 -7
  212. package/dist/protocol/packs/reader.d.mts +5 -0
  213. package/dist/protocol/packs/reader.mjs +3 -2
  214. package/dist/protocol/packs/writer.mjs +26 -8
  215. package/dist/protocol/wire/advertisement.mjs +9 -4
  216. package/dist/protocol/wire/lines.d.mts +4 -2
  217. package/dist/protocol/wire/lines.mjs +11 -5
  218. package/dist/protocol/wire/push-uploads.mjs +13 -1
  219. package/dist/protocol/wire/v2.mjs +2 -2
  220. package/dist/protocol.d.mts +3 -1
  221. package/dist/protocol.mjs +3 -1
  222. package/dist/queue/advance.mjs +22 -25
  223. package/dist/queue/base.d.mts +55 -0
  224. package/dist/queue/base.mjs +44 -0
  225. package/dist/queue/calls.mjs +51 -54
  226. package/dist/queue/commit.mjs +1 -1
  227. package/dist/queue/host.d.mts +2 -22
  228. package/dist/queue/host.mjs +2 -13
  229. package/dist/queue/layer.d.mts +2 -1
  230. package/dist/queue/layer.mjs +11 -4
  231. package/dist/queue/limits.mjs +2 -0
  232. package/dist/queue/push-option.mjs +9 -24
  233. package/dist/queue/schedule.mjs +1 -1
  234. package/dist/queue/state.mjs +2 -10
  235. package/dist/queue/trim.mjs +6 -4
  236. package/dist/rest/blobs.mjs +29 -5
  237. package/dist/rest/caller.d.mts +4 -4231
  238. package/dist/rest/caller.mjs +5 -1
  239. package/dist/rest/client.d.mts +15 -5
  240. package/dist/rest/client.mjs +23 -2
  241. package/dist/rest/events.mjs +1 -2
  242. package/dist/rest/handler.mjs +4 -57
  243. package/dist/rest/handlers.mjs +68 -9
  244. package/dist/rest/layer.d.mts +2 -2
  245. package/dist/rest/layer.mjs +7 -13
  246. package/dist/rest/me.d.mts +3 -428
  247. package/dist/rest/paths.mjs +1 -0
  248. package/dist/rest/work.mjs +8 -0
  249. package/dist/server/check-fetch.mjs +3 -3
  250. package/dist/server/edge-node.d.mts +14 -15
  251. package/dist/server/edge-node.mjs +12 -12
  252. package/dist/server/edge.d.mts +21 -7
  253. package/dist/server/edge.mjs +32 -11
  254. package/dist/server/extension.mjs +1 -1
  255. package/dist/server/git-layer.d.mts +6 -11
  256. package/dist/server/git-layer.mjs +29 -23
  257. package/dist/server/git-namespace.d.mts +5 -4
  258. package/dist/server/git-namespace.mjs +3 -2
  259. package/dist/server/joined.d.mts +21 -40
  260. package/dist/server/joined.mjs +11 -62
  261. package/dist/server/lifecycle.mjs +65 -69
  262. package/dist/server/registry.mjs +28 -3
  263. package/dist/server/server.mjs +245 -465
  264. package/dist/signin/context.d.mts +1 -2
  265. package/dist/signin/layer.d.mts +1 -1
  266. package/dist/signin/layer.mjs +1 -1
  267. package/dist/storage/allotted.mjs +18 -3
  268. package/dist/storage/batch-upkeep.mjs +274 -0
  269. package/dist/{core/purge.d.mts → storage/batches.d.mts} +4 -4
  270. package/dist/storage/batches.mjs +344 -0
  271. package/dist/storage/budget.mjs +2 -2
  272. package/dist/storage/calls.d.mts +1 -2
  273. package/dist/storage/calls.mjs +144 -158
  274. package/dist/storage/chunks.d.mts +9 -0
  275. package/dist/storage/chunks.mjs +297 -0
  276. package/dist/storage/clean-up.mjs +85 -19
  277. package/dist/storage/counted-bucket.mjs +4 -4
  278. package/dist/storage/fetch.d.mts +1 -0
  279. package/dist/storage/fetch.mjs +298 -216
  280. package/dist/storage/file-limits.mjs +24 -0
  281. package/dist/storage/host-bucket.mjs +1 -2
  282. package/dist/storage/id-mix.mjs +19 -5
  283. package/dist/storage/index-bitmaps.mjs +9 -2
  284. package/dist/storage/index-build.d.mts +1 -1
  285. package/dist/storage/index-build.mjs +185 -84
  286. package/dist/storage/index-fetch.mjs +128 -74
  287. package/dist/storage/index-files.d.mts +3 -0
  288. package/dist/storage/index-files.mjs +10 -5
  289. package/dist/storage/index-graph.mjs +72 -22
  290. package/dist/storage/index-reach.mjs +33 -5
  291. package/dist/storage/index-remap.mjs +208 -65
  292. package/dist/storage/index-shallow.mjs +5 -3
  293. package/dist/storage/index-whole.mjs +127 -0
  294. package/dist/storage/largest-files.mjs +48 -0
  295. package/dist/storage/layout.mjs +23 -0
  296. package/dist/storage/lfs-pointers.mjs +10 -1
  297. package/dist/storage/loose.d.mts +7 -4
  298. package/dist/storage/loose.mjs +214 -67
  299. package/dist/storage/memory-budget.mjs +44 -8
  300. package/dist/storage/merge-plan.mjs +3 -2
  301. package/dist/storage/merge-row.mjs +7 -1
  302. package/dist/storage/merge-stream.mjs +164 -25
  303. package/dist/storage/merge-walk.mjs +8 -4
  304. package/dist/storage/merge-write.mjs +1 -1
  305. package/dist/storage/merge.d.mts +1 -1
  306. package/dist/storage/merge.mjs +1 -1
  307. package/dist/storage/object-rows.d.mts +1 -0
  308. package/dist/storage/object-rows.mjs +385 -65
  309. package/dist/storage/oid-table.mjs +171 -0
  310. package/dist/storage/pack-order.mjs +8 -4
  311. package/dist/storage/pack-ranges.d.mts +1 -2
  312. package/dist/storage/pack-ranges.mjs +4 -5
  313. package/dist/storage/pack-reads.d.mts +2 -1
  314. package/dist/storage/pack-reads.mjs +165 -49
  315. package/dist/storage/pack-receive.d.mts +1 -1
  316. package/dist/storage/pack-receive.mjs +85 -27
  317. package/dist/storage/packs.d.mts +1 -1
  318. package/dist/storage/packs.mjs +172 -86
  319. package/dist/storage/placed-reads.mjs +1 -1
  320. package/dist/storage/plan-columns.d.mts +4 -0
  321. package/dist/storage/plan-columns.mjs +238 -0
  322. package/dist/storage/prune-keep.mjs +299 -37
  323. package/dist/storage/prune-walk.mjs +240 -62
  324. package/dist/storage/prune.mjs +749 -213
  325. package/dist/storage/push-allotment.mjs +91 -12
  326. package/dist/storage/push-uploads.mjs +40 -16
  327. package/dist/storage/pushed-commits.mjs +4 -2
  328. package/dist/storage/quarantine.d.mts +1 -1
  329. package/dist/storage/quarantine.mjs +9 -9
  330. package/dist/storage/range-cache.mjs +125 -8
  331. package/dist/storage/ready.d.mts +1 -1
  332. package/dist/storage/ready.mjs +55 -25
  333. package/dist/storage/receive-bounds.mjs +51 -15
  334. package/dist/storage/receive-state.mjs +8 -0
  335. package/dist/storage/receive-steps.mjs +71 -18
  336. package/dist/storage/repack-backlog.mjs +6 -3
  337. package/dist/storage/repack.d.mts +2 -2
  338. package/dist/storage/repack.mjs +1 -8
  339. package/dist/storage/rows.d.mts +1 -1
  340. package/dist/storage/rows.mjs +13 -2
  341. package/dist/storage/runs.mjs +195 -43
  342. package/dist/storage/send-list.d.mts +1 -0
  343. package/dist/storage/send-list.mjs +54 -10
  344. package/dist/storage/shallow.d.mts +1 -0
  345. package/dist/storage/shallow.mjs +26 -4
  346. package/dist/storage/single-flight.mjs +13 -7
  347. package/dist/storage/stream-whole.mjs +132 -28
  348. package/dist/storage/unpack.mjs +371 -79
  349. package/dist/storage/visible.mjs +31 -3
  350. package/dist/storage/walk.mjs +194 -39
  351. package/dist/storage/wants.mjs +5 -5
  352. package/dist/store/bodies.mjs +38 -0
  353. package/dist/store/call-count.d.mts +8 -12
  354. package/dist/store/call-count.mjs +34 -46
  355. package/dist/store/catalogue.d.mts +2 -2
  356. package/dist/store/catalogue.mjs +146 -35
  357. package/dist/store/crossing.mjs +1 -3
  358. package/dist/store/cursor-seal-namespace.d.mts +2 -0
  359. package/dist/store/cursor-seal-public.d.mts +5 -0
  360. package/dist/store/cursor-seal-public.mjs +5 -0
  361. package/dist/store/cursor-seal.d.mts +16 -3
  362. package/dist/store/cursor-seal.mjs +40 -18
  363. package/dist/store/door.mjs +183 -0
  364. package/dist/store/errors.d.mts +3 -4
  365. package/dist/store/errors.mjs +24 -34
  366. package/dist/store/git-store.mjs +25 -7
  367. package/dist/store/job-try.mjs +9 -32
  368. package/dist/store/list-job.mjs +44 -8
  369. package/dist/store/records.d.mts +5 -0
  370. package/dist/store/records.mjs +12 -6
  371. package/dist/store/repo-record.d.mts +10 -9
  372. package/dist/store/repo-record.mjs +123 -28
  373. package/dist/store/reservations.mjs +1 -1
  374. package/dist/store/scopes.mjs +21 -2
  375. package/dist/store/settle.mjs +4 -4
  376. package/dist/sync/bound.d.mts +2 -0
  377. package/dist/sync/bound.mjs +11 -2
  378. package/dist/sync/github.d.mts +6 -1
  379. package/dist/sync/github.mjs +56 -44
  380. package/dist/sync/http.mjs +36 -1
  381. package/dist/sync/import.mjs +32 -18
  382. package/dist/sync/layer.mjs +6 -2
  383. package/dist/sync/lfs-batch.mjs +118 -0
  384. package/dist/sync/lfs-copy.mjs +262 -0
  385. package/dist/sync/mirror.mjs +227 -151
  386. package/dist/sync/said.mjs +16 -37
  387. package/dist/sync/smart-http.mjs +4 -2
  388. package/dist/sync/step.mjs +58 -30
  389. package/dist/sync/tries.mjs +52 -21
  390. package/dist/sync.d.mts +2 -2
  391. package/dist/topics/advance.mjs +10 -11
  392. package/dist/topics/base.d.mts +15 -0
  393. package/dist/topics/base.mjs +8 -0
  394. package/dist/topics/host.mjs +2 -20
  395. package/dist/topics/layer.d.mts +4 -9
  396. package/dist/topics/layer.mjs +3 -4
  397. package/dist/topics/members.mjs +4 -4
  398. package/dist/topics/public.d.mts +2 -1
  399. package/dist/topics/topic.mjs +2 -2
  400. package/package.json +5 -9
  401. package/dist/auth/bridge.mjs +0 -30
  402. package/dist/auth/helpers.d.mts +0 -17
  403. package/dist/contracts/promises.d.mts +0 -39
  404. package/dist/core/call-names.d.mts +0 -3
  405. package/dist/core/clock.mjs +0 -18
  406. package/dist/core/registered-rows.d.mts +0 -5
  407. package/dist/core/repack.d.mts +0 -11
  408. package/dist/http/handler.d.mts +0 -2
  409. package/dist/lfs/calls.mjs +0 -26
  410. package/dist/rest/api.d.mts +0 -23
  411. package/dist/rest/blobs.d.mts +0 -825
  412. package/dist/rest/commits.d.mts +0 -3510
  413. package/dist/rest/errors.d.mts +0 -2104
  414. package/dist/rest/events.d.mts +0 -423
  415. package/dist/rest/files.d.mts +0 -1330
  416. package/dist/rest/forks.d.mts +0 -2136
  417. package/dist/rest/handler.d.mts +0 -21
  418. package/dist/rest/handlers.d.mts +0 -8
  419. package/dist/rest/merges.d.mts +0 -473
  420. package/dist/rest/queue.d.mts +0 -5861
  421. package/dist/rest/refs.d.mts +0 -2959
  422. package/dist/rest/repos.d.mts +0 -2539
  423. package/dist/rest/tags.d.mts +0 -1304
  424. package/dist/rest/tokens.d.mts +0 -2590
  425. package/dist/rest/topics.d.mts +0 -2204
  426. package/dist/rest/trees.d.mts +0 -1693
  427. package/dist/rest/work.d.mts +0 -1248
  428. package/dist/rest.d.mts +0 -2
  429. package/dist/rest.mjs +0 -1
  430. package/dist/server/lifecycle.d.mts +0 -2
  431. package/dist/server/registry.d.mts +0 -16
  432. package/dist/server/server.d.mts +0 -36
  433. package/dist/storage/repack-job.d.mts +0 -3
  434. package/dist/store/promises.d.mts +0 -11
  435. package/dist/store/promises.mjs +0 -327
  436. package/dist/topics/host.d.mts +0 -7
@@ -1,20 +1,25 @@
1
- import { BeginPushUpload, FinishPushUpload, PushUploadPart, PushUploadStarted } from "../contracts/push-uploads.mjs";
1
+ import { BeginPushUpload, FinishPushUpload, PushUploadPart, PushUploadReceiving, PushUploadStarted } from "../contracts/push-uploads.mjs";
2
2
  import { fail, gitError } from "../contracts/result.mjs";
3
3
  import { openFor } from "../core/access.mjs";
4
+ import { readAsked } from "../core/asked.mjs";
4
5
  import { CoreParts, ObjectsParts } from "../core/parts.mjs";
5
6
  import { pushOptionsRefusal } from "../protocol/wire/receive-pack.mjs";
6
7
  import { pushReasonsCapability } from "../protocol/wire/push-limits.mjs";
8
+ import { retryAfterOf } from "../protocol/wire/push-uploads.mjs";
7
9
  import { decodeJson } from "../protocol/wire/json.mjs";
8
- import { bucketCall, bucketStream, readWhole } from "../storage/calls.mjs";
9
- import { PushUploadRow, completeMost, endUpload, partBytes, partLinkLife, partSizeOf, partsOf, pushPackTooLarge, pushUploadGrace, pushUploadKey, pushUploadLife, pushUploadMost, pushUploadRead, pushUploadRowKey } from "../storage/push-uploads.mjs";
10
- import { afterWrites, bestEffort, decodeRow, storeCall } from "../store/errors.mjs";
10
+ import { bucketCall, readWhole } from "../storage/calls.mjs";
11
+ import "../storage/receive-bounds.mjs";
12
+ import { PushUploadRow, claimLapsed, completingMost, endUpload, partBytes, partLinkLife, partSizeOf, partsOf, pushPackTooLarge, pushUploadGrace, pushUploadKey, pushUploadLife, pushUploadMost, pushUploadRead, pushUploadRowKey } from "../storage/push-uploads.mjs";
13
+ import { afterWrites, bestEffort, decodeRow, storeCommit } from "../store/errors.mjs";
11
14
  import { randomText } from "../store/random.mjs";
12
15
  import { heldAdd, heldStore } from "../store/repo-record.mjs";
13
16
  import { newChangeId, repoScope } from "../store/scopes.mjs";
14
17
  import { gitAnswer, resultType } from "./answers.mjs";
15
18
  import { brokenBody, plainBody, readWhole as readWhole$1 } from "./bodies.mjs";
19
+ import { keptError } from "../core/receipts.mjs";
20
+ import { answerRow, pushedOf, rowsOf, startSteps } from "./push-upload-job.mjs";
16
21
  import { refusalLog, reportOf, routeCounted, thrownLog } from "./receive-pack.mjs";
17
- import * as Clock$1 from "effect/Clock";
22
+ import * as Clock from "effect/Clock";
18
23
  import * as Effect from "effect/Effect";
19
24
  import * as Schema from "effect/Schema";
20
25
  import * as Result from "effect/Result";
@@ -24,8 +29,11 @@ const bodyMost = 1048576;
24
29
  /** A pack's header: `PACK`, its version, and how many objects it holds. */
25
30
  const packHeader = 12;
26
31
  const zero = "0".repeat(40);
27
- /** Push uploads over `needs`, the server's, staged in `staging`, offered above `above` bytes. */
28
- const pushUploads = (needs, staging, above) => ({
32
+ /**
33
+ * Push uploads over `needs`, the server's, staged in `staging`, offered above `above` bytes, on a
34
+ * host whose requests get `cpuMs` of CPU: complete's 202 asks a client to wait that long.
35
+ */
36
+ const make = (needs, staging, above, cpuMs) => ({
29
37
  above,
30
38
  serve: (parts, call) => {
31
39
  const { route } = call;
@@ -34,13 +42,15 @@ const pushUploads = (needs, staging, above) => ({
34
42
  const parted = part(staging.uploads, call, route.upload, route.part);
35
43
  return routeCounted(parts, Effect.provideContext(parted, needs));
36
44
  }
37
- return routeCounted(parts, complete(staging, parts, call, route.upload).pipe(Effect.tapError((error) => refusalLog(call.repo, error)), Effect.provideContext(needs)));
45
+ const retryAfter = retryAfterOf((cpuMs ?? 3e4) / 1e3);
46
+ return routeCounted(parts, complete(staging, call, route.upload, retryAfter).pipe(Effect.tapError((error) => refusalLog(call.repo, error)), Effect.provideContext(needs)));
38
47
  }
39
48
  });
40
- /** `body` as `schema`'s JSON, the answer a push upload's begin or part gives. */
41
- const jsonAnswer = (schema, body) => new Response(Schema.encodeSync(Schema.fromJsonString(schema))(body), {
42
- status: 200,
49
+ /** `body` as `schema`'s JSON, the answer a push upload's route gives, with `headers` beside. */
50
+ const jsonAnswer = (schema, body, status = 200, headers = {}) => new Response(Schema.encodeSync(Schema.fromJsonString(schema))(body), {
51
+ status,
43
52
  headers: {
53
+ ...headers,
44
54
  "content-type": "application/json",
45
55
  "cache-control": "no-store"
46
56
  }
@@ -70,14 +80,22 @@ const beginRefusal = (body) => {
70
80
  * `POST <repo>/push-uploads`: a multipart upload at the upload's own key, then its row, with
71
81
  * `git.repack` due at its `removeAt` to end it. A crash between leaves an upload no link was
72
82
  * given for, which the bucket's lifecycle drops.
83
+ *
84
+ * Its open confirms nothing, as `Confirm`'s `skip` says of a write that lands by `internalId`: the
85
+ * answer carries none of the repo's state. A rename that lands while `authorize` decides puts the
86
+ * row in the repo it was asked of, under its new name, where part and complete find it by that
87
+ * name. A delete then leaves the bucket's multipart upload with no row, as a crash between does:
88
+ * `heldAdd` refuses the row, so the purge that drops the scope is never undone, and only the
89
+ * bucket's lifecycle rule for unfinished uploads ends the upload, R2's by default 7 days after it
90
+ * began, a day with the rule `docs/deploy` gives. A part link is never given for it.
73
91
  */
74
92
  const begin = /* @__PURE__ */ Effect.fnUntraced(function* (uploads, call) {
75
93
  const body = yield* bodyOf(call.request, BeginPushUpload);
76
94
  const refused = beginRefusal(body);
77
95
  if (refused !== void 0) return yield* Effect.fail(refused);
78
- const repo = yield* openFor(call.caller, call.repo, true);
96
+ const repo = yield* openFor(call.caller, call.repo, true, void 0, "skip");
79
97
  const actor = yield* actorOf(call.caller);
80
- const at = yield* Clock$1.currentTimeMillis;
98
+ const at = yield* Clock.currentTimeMillis;
81
99
  const upload = randomText(16);
82
100
  const key = pushUploadKey(repo.internalId, upload);
83
101
  const uploadId = yield* bucketCall(uploads.beginUpload(key));
@@ -113,10 +131,13 @@ const begin = /* @__PURE__ */ Effect.fnUntraced(function* (uploads, call) {
113
131
  expiresAt
114
132
  });
115
133
  });
116
- /** The upload's row and the version it was read at, when it's `actor`'s. */
117
- const rowOf = /* @__PURE__ */ Effect.fnUntraced(function* (repo, upload, actor) {
134
+ /**
135
+ * The upload's row and the version it was read at, when it's `actor`'s. With `asked`, the open's
136
+ * confirm is on this read, as `readAsked` says.
137
+ */
138
+ const rowOf = /* @__PURE__ */ Effect.fnUntraced(function* (repo, upload, actor, asked) {
118
139
  const { store } = yield* CoreParts;
119
- const snapshot = yield* storeCall(() => store.read(repoScope(repo), [pushUploadRead(upload)]));
140
+ const snapshot = yield* readAsked(store, repo, [pushUploadRead(upload)], [], asked);
120
141
  const found = snapshot.results[0]?.[0];
121
142
  const row = found === void 0 ? void 0 : yield* decodeRow(PushUploadRow, found, `push upload ${upload}`);
122
143
  if (row === void 0 || row.actor !== actor) return yield* ended(upload);
@@ -127,10 +148,10 @@ const rowOf = /* @__PURE__ */ Effect.fnUntraced(function* (repo, upload, actor)
127
148
  });
128
149
  /** `POST <repo>/push-uploads/{upload}/parts/{part}`: a PUT link for the part, while it's open. */
129
150
  const part = /* @__PURE__ */ Effect.fnUntraced(function* (uploads, call, upload, number) {
130
- const repo = yield* openFor(call.caller, call.repo, true);
151
+ const repo = yield* openFor(call.caller, call.repo, true, void 0, "first-read");
131
152
  const actor = yield* actorOf(call.caller);
132
- const { row } = yield* rowOf(repo.internalId, upload, actor);
133
- const at = yield* Clock$1.currentTimeMillis;
153
+ const { row } = yield* rowOf(repo.internalId, upload, actor, repo);
154
+ const at = yield* Clock.currentTimeMillis;
134
155
  if (row.state !== "open" || at >= row.expiresAt) return yield* ended(upload);
135
156
  const size = partSizeOf(row.bytes, uploads.maxParts);
136
157
  const count = partsOf(row.bytes, size);
@@ -147,21 +168,24 @@ const part = /* @__PURE__ */ Effect.fnUntraced(function* (uploads, call, upload,
147
168
  });
148
169
  /**
149
170
  * The upload, `completing` from now: committed at the version its row was read, so of two
150
- * completes only one pushes, and no part link is given after.
171
+ * completes only one pushes, and no part link is given after. `undefined` when another complete
172
+ * claimed it first.
151
173
  */
152
174
  const claim = /* @__PURE__ */ Effect.fnUntraced(function* (repo, upload, actor, parts, maxParts) {
153
175
  for (let tries = 0; tries < 5; tries += 1) {
154
176
  const { row, version } = yield* rowOf(repo, upload, actor);
155
- const at = yield* Clock$1.currentTimeMillis;
156
- if (row.state !== "open" || at >= row.removeAt - completeMost) return yield* ended(upload);
177
+ if (row.state !== "open") return void 0;
178
+ const at = yield* Clock.currentTimeMillis;
179
+ if (at >= row.removeAt - 432e5) return yield* ended(upload);
157
180
  const count = partsOf(row.bytes, partSizeOf(row.bytes, maxParts));
158
181
  if (!(parts.length === count && parts.every((one, at) => one.part === at + 1))) return yield* fail("INVALID_ARGUMENT", `Name each of its ${count} parts, in order`);
159
182
  const claimed = {
160
183
  ...row,
161
- state: "completing"
184
+ state: "completing",
185
+ claimedAt: at
162
186
  };
163
187
  const { store } = yield* CoreParts;
164
- if ((yield* storeCall(() => store.commit(repoScope(repo), {
188
+ if ((yield* storeCommit(store.commit(repoScope(repo), {
165
189
  id: newChangeId(),
166
190
  expect: version,
167
191
  put: [{
@@ -203,20 +227,52 @@ const startOf = (row) => ({
203
227
  packOffset: 0
204
228
  });
205
229
  /**
206
- * `POST <repo>/push-uploads/{upload}/complete`: the upload claimed, its parts joined, and its pack
207
- * streamed from the bucket into the push, which checks the caller's grant again, as any push. It
208
- * answers `git-receive-pack`'s report; then the upload ends, its key deleted and its row `ended`,
209
- * and upkeep at its `removeAt` deletes both.
230
+ * `POST <repo>/push-uploads/{upload}/complete`: an open upload claimed, its parts joined, and
231
+ * handed to `git.push-upload`'s steps, which check the caller's grant again each try; then the
232
+ * same complete sent again answers 202 while they receive it, asking the client to wait
233
+ * `retryAfter` seconds, and once the upload ended, the report its push answered, as
234
+ * `git-receive-pack` does. Upkeep at its `removeAt` deletes the upload, and its answer with it.
210
235
  */
211
- const complete = /* @__PURE__ */ Effect.fnUntraced(function* (staging, parts, call, upload) {
236
+ const complete = /* @__PURE__ */ Effect.fnUntraced(function* (staging, call, upload, retryAfter) {
212
237
  const finish = yield* bodyOf(call.request, FinishPushUpload);
213
- const repo = yield* openFor(call.caller, call.repo, true);
238
+ const repo = yield* openFor(call.caller, call.repo, true, void 0, "first-read");
214
239
  const actor = yield* actorOf(call.caller);
215
- const receiving = yield* parts.receive(call.caller, call.repo);
216
- const row = yield* claim(repo.internalId, upload, actor, finish.parts, staging.uploads.maxParts);
217
- const pushed = yield* pushStaged(staging, receiving.push, call.request, row, finish.parts).pipe(Effect.map(Result.mapError(afterWrites)), Effect.mapError(afterWrites), Effect.ensuring(ending(staging, repo.internalId, upload, row)));
218
- yield* thrownLog(call.repo, pushed);
219
- return gitAnswer(resultType("git-receive-pack"), yield* reportOf(startOf(row), pushed));
240
+ const first = yield* uploadOf(repo.internalId, upload, actor, repo);
241
+ const receiving = (step) => jsonAnswer(PushUploadReceiving, { step }, 202, { "retry-after": String(retryAfter) });
242
+ const handed = first.row.state === "open" ? yield* handOff(staging, repo.internalId, upload, call.caller, finish.parts) : void 0;
243
+ if (handed?.kind === "handed") return receiving(0);
244
+ const refused = handed?.kind === "refused" ? Result.fail(handed.error) : void 0;
245
+ if (refused !== void 0) yield* thrownLog(call.repo, refused);
246
+ const read = first.row.state === "open" ? yield* uploadOf(repo.internalId, upload, actor) : first;
247
+ const at = yield* Clock.currentTimeMillis;
248
+ const lapsed = read.row.state === "completing" && at >= (read.row.claimedAt ?? 0) + completingMost;
249
+ if (lapsed) {
250
+ const failed = {
251
+ kind: "failed",
252
+ error: keptError(claimLapsed)
253
+ };
254
+ yield* ending(staging, repo.internalId, upload, read.row, failed);
255
+ }
256
+ const { row, steps, answer } = lapsed ? yield* uploadOf(repo.internalId, upload, actor) : read;
257
+ if (row.state === "ended" && answer !== void 0) return yield* report(row, pushedOf(answer));
258
+ if (refused !== void 0) return yield* report(first.row, refused);
259
+ if (row.state === "completing" || row.state === "receiving") return receiving(steps?.step ?? 0);
260
+ return yield* ended(upload);
261
+ });
262
+ /** `pushed` as receive-pack's report on the start `row` names. */
263
+ const report = (row, pushed) => Effect.map(reportOf(startOf(row), pushed), (body) => gitAnswer(resultType("git-receive-pack"), body));
264
+ /**
265
+ * The upload's rows, when it's `actor`'s: its own, its steps' and its answer. With `asked`, the
266
+ * open's confirm is on this read, as `readAsked` says.
267
+ */
268
+ const uploadOf = /* @__PURE__ */ Effect.fnUntraced(function* (repo, upload, actor, asked) {
269
+ const { row, steps, answer } = yield* rowsOf(repo, upload, asked);
270
+ if (row === void 0 || row.actor !== actor) return yield* ended(upload);
271
+ return {
272
+ row,
273
+ steps,
274
+ answer
275
+ };
220
276
  });
221
277
  /** The upload's parts as the bucket lists them, each the length signed and the one named. */
222
278
  const checkedParts = (row, size, named, listed) => {
@@ -234,11 +290,12 @@ const checkedParts = (row, size, named, listed) => {
234
290
  etag
235
291
  })));
236
292
  };
293
+ const notAPack = () => gitError("INVALID_ARGUMENT", "the push's pack is missing or isn't a pack");
237
294
  /**
238
- * The parts checked and joined, then the pack they make pushed, or why it can't be. The join names
239
- * the ETags the bucket listed, so a part sent again after the check makes the bucket refuse it.
295
+ * The upload's parts checked and joined, or why they can't be. The join names the ETags the bucket
296
+ * listed, so a part sent again after the check makes the bucket refuse it.
240
297
  */
241
- const pushStaged = /* @__PURE__ */ Effect.fnUntraced(function* ({ bucket, uploads }, push, request, row, named) {
298
+ const joinedParts = /* @__PURE__ */ Effect.fnUntraced(function* ({ uploads }, row, named) {
242
299
  const listed = yield* Effect.result(bucketCall(uploads.listParts(row.key, row.uploadId)));
243
300
  const size = partSizeOf(row.bytes, uploads.maxParts);
244
301
  const parts = Result.flatMap(listed, (listing) => checkedParts(row, size, named, listing));
@@ -247,52 +304,68 @@ const pushStaged = /* @__PURE__ */ Effect.fnUntraced(function* ({ bucket, upload
247
304
  uploadId: row.uploadId,
248
305
  parts: parts.success
249
306
  })));
250
- if (Result.isFailure(stored)) return Result.fail(stored.failure);
251
- const objects = yield* objectsOf(bucket, row.key);
252
- const bytes = objects === void 0 ? void 0 : yield* bucketStream(bucket, row.key);
253
- if (objects === void 0 || bytes === void 0) return Result.fail(gitError("INVALID_ARGUMENT", "the push's pack is missing or isn't a pack"));
254
- const input = {
255
- request,
256
- edits: row.updates,
257
- atomic: row.atomic,
258
- pushOptions: row.pushOptions,
259
- pack: {
260
- bytes,
261
- objects,
262
- length: row.bytes
263
- },
264
- signal: request.signal
307
+ return Result.map(stored, () => void 0);
308
+ });
309
+ /**
310
+ * An upload `actor` claims, its parts joined, handed to `git.push-upload`'s steps as `caller`:
311
+ * what complete does with an open upload, `handed` once the job is saved, or `undefined` when
312
+ * another complete claimed it first. An upload whose parts or pack are refused after the claim,
313
+ * or whose claim lapsed, ends with the refusal as its answer, unless another complete ended it
314
+ * first, and complete reports the answer that's stored.
315
+ */
316
+ const handOff = /* @__PURE__ */ Effect.fnUntraced(function* (staging, internalId, upload, caller, named) {
317
+ const actor = yield* actorOf(caller);
318
+ const row = yield* claim(internalId, upload, actor, named, staging.uploads.maxParts);
319
+ if (row === void 0) return void 0;
320
+ const started = Effect.gen(function* () {
321
+ const joined = yield* joinedParts(staging, row, named);
322
+ if (Result.isFailure(joined)) return joined;
323
+ const objects = yield* objectsOf(staging.bucket, row.key);
324
+ if (objects === void 0) return Result.fail(notAPack());
325
+ return yield* startSteps(internalId, upload, actor, caller, objects, row.claimedAt);
326
+ });
327
+ const failed = (error) => ending(staging, internalId, upload, row, {
328
+ kind: "failed",
329
+ error: keptError(error)
330
+ });
331
+ const begun = yield* started.pipe(Effect.mapError(afterWrites), Effect.tapError(failed), Effect.map(Result.mapError(afterWrites)));
332
+ if (Result.isSuccess(begun)) return { kind: "handed" };
333
+ yield* failed(begun.failure);
334
+ return {
335
+ kind: "refused",
336
+ error: begun.failure
265
337
  };
266
- if (row.shallow.length > 0) input.shallow = row.shallow;
267
- return yield* Effect.result(push(input));
268
338
  });
269
339
  /**
270
- * The upload ended: its parts aborted and its key deleted, then its row marked `ended`. Upkeep at
271
- * its `removeAt` deletes the key again, and the row, so a PUT that lands while a link lives goes too.
272
- * A row upkeep already deleted, under a complete stalled past `removeAt`, stays deleted. An end
273
- * refused, as past a spent count, is logged at warning, and upkeep ends it instead.
340
+ * The upload ended, with `answer` when given, while its row is as `row` holds it, the same state
341
+ * and the same claim: its row marked `ended`, its answer beside it, at the version it was read,
342
+ * then, only once that lands, its parts aborted and its key deleted. An end that loses to a
343
+ * hand-off frees nothing, so the job the hand-off saved still finds its pack. Upkeep at its
344
+ * `removeAt` deletes the key again, and the row, so a PUT that lands while a link lives goes too.
345
+ * A row upkeep already deleted, or one a hand-off moved on, is left as it is. An end refused, as
346
+ * past a spent count, is logged at warning, and upkeep ends it instead.
274
347
  */
275
- const ending = /* @__PURE__ */ Effect.fnUntraced(function* (staging, repo, upload, row) {
276
- yield* endUpload(staging.bucket, staging.uploads, row);
348
+ const ending = /* @__PURE__ */ Effect.fnUntraced(function* (staging, repo, upload, row, answer) {
277
349
  const { store } = yield* CoreParts;
278
- const snapshot = yield* storeCall(() => store.read(repoScope(repo), [pushUploadRead(upload)]));
279
- if ((snapshot.results[0] ?? []).length === 0) return;
280
- yield* storeCall(() => store.commit(repoScope(repo), {
350
+ const now = yield* rowsOf(repo, upload);
351
+ if (!(now.row?.state === row.state && now.row.claimedAt === row.claimedAt)) return;
352
+ if (!(yield* storeCommit(store.commit(repoScope(repo), {
281
353
  id: newChangeId(),
282
- expect: snapshot.version,
354
+ expect: now.version,
283
355
  put: [{
284
356
  ...pushUploadRowKey(upload),
285
357
  value: {
286
358
  ...row,
287
359
  state: "ended"
288
360
  }
289
- }]
290
- }));
291
- }, (ended, _staging, repo, upload, row) => bestEffort(ended, (error) => Effect.logWarning("An upload's end was refused: upkeep ends it at its removeAt").pipe(Effect.annotateLogs({
361
+ }, ...answer === void 0 ? [] : [answerRow(upload, answer)]]
362
+ }))).ok) return;
363
+ yield* endUpload(staging.bucket, staging.uploads, row);
364
+ }, (ended, _staging, repo, upload, row, _answer) => bestEffort(ended, (error) => Effect.logWarning("An upload's end was refused: upkeep ends it at its removeAt").pipe(Effect.annotateLogs({
292
365
  repo,
293
366
  upload,
294
367
  key: row.key,
295
368
  code: error.code,
296
369
  reason: error.message
297
370
  }))));
298
- export { pushUploads };
371
+ export { handOff, make };
@@ -12,7 +12,7 @@ import { withRuledDepth } from "./fetch-depth.mjs";
12
12
  import { requestSpent } from "../storage/fetch.mjs";
13
13
  import { RequestCalls, countedAs } from "../store/call-count.mjs";
14
14
  import { scopedReader } from "../protocol/bytes/reader.mjs";
15
- import * as Clock$1 from "effect/Clock";
15
+ import * as Clock from "effect/Clock";
16
16
  import * as Effect from "effect/Effect";
17
17
  import * as Cause from "effect/Cause";
18
18
  import * as Exit from "effect/Exit";
@@ -69,19 +69,20 @@ const wentAwayMidAnswer = (request) => request.method === "HEAD" ? Effect.void :
69
69
  }));
70
70
  /**
71
71
  * A listing's body (Q884): `lines.start`, then each page `next` answers as the client reads it,
72
- * then `lines.end`, so it holds one page at a time. Its pages' reads count on the request's one
72
+ * then `lines.end` with the roots `roots` answers once the last page is read, so it holds one page
73
+ * at a time. Its pages' reads count on the request's one
73
74
  * count (#709). Once its status has gone, a failure can't be one: a page that fails, a tag row
74
75
  * with no stored peel, a store's refusal or a spent count among them, ends the body with an `ERR`
75
76
  * in its words, which Git prints as `remote error:`, or, before any page, `refused`'s bytes. A
76
77
  * page asked past `deadline`, as a client that stalls asks it, ends the body so too, unread. A
77
78
  * client that cancels the body logs `wentAwayMidAnswer` of `request`.
78
79
  */
79
- const listingBody = (lines, next, refused, deadline, request) => Effect.suspend(() => {
80
+ const listingBody = (lines, next, roots, refused, deadline, request) => Effect.suspend(() => {
80
81
  let begun = false;
81
82
  const chunk = Effect.gen(function* () {
82
83
  const refs = yield* next;
83
84
  const start = begun ? /* @__PURE__ */ new Uint8Array() : yield* lines.start;
84
- const body = refs === void 0 ? yield* lines.end : yield* lines.page(refs);
85
+ const body = refs === void 0 ? yield* lines.end(roots === void 0 ? [] : yield* roots) : yield* lines.page(refs);
85
86
  return {
86
87
  bytes: joinedBytes([start, body]),
87
88
  done: refs === void 0
@@ -107,11 +108,11 @@ const uploadPackRefs = (parts, caller, repo, request, started, missing) => {
107
108
  const deadline = parts.maxDuration === void 0 ? void 0 : deadlineOf(started, parts.maxDuration);
108
109
  const answered = Effect.gen(function* () {
109
110
  const v2 = asksV2(request);
110
- const open = yield* parts.fetchOpen(caller, repo, v2 ? "skip" : "read");
111
+ const open = yield* parts.fetchOpen(caller, repo, v2 ? "skip" : "first-read");
111
112
  if (v2) return gitAnswer(advertisementType(service), yield* encodeV2Capabilities(v2Capabilities(parts.agent)));
112
113
  const listed = yield* open.lists;
113
114
  const capabilities = uploadPackCapabilities(servedHead(listed), parts.agent);
114
- const body = yield* listingBody(advertisementPages(service, listed, capabilities, listed.hidden), listed.next, (message) => encodeRefusedAdvertisement(service, message), deadline, request);
115
+ const body = yield* listingBody(advertisementPages(service, listed, capabilities, listed.hidden), listed.next, listed.roots, (message) => encodeRefusedAdvertisement(service, message), deadline, request);
115
116
  return gitAnswer(advertisementType(service), body);
116
117
  }).pipe(Effect.catchTag("WireEncodeError", (error) => Effect.fail(unwritable(error))), Effect.catch(missing));
117
118
  return countedRequest(parts, Effect.fail)(answered);
@@ -145,7 +146,7 @@ var Late = class {
145
146
  * `effect`'s answer, or `Late` once `deadline` passes first, `effect` not started when it has
146
147
  * passed already; with none, `effect` as it is.
147
148
  */
148
- const byDeadline = (effect, deadline) => deadline === void 0 ? effect : Effect.flatMap(Clock$1.currentTimeMillis, (now) => now >= deadline.at ? Effect.succeed(new Late(deadline)) : Effect.timeoutOrElse(effect, {
149
+ const byDeadline = (effect, deadline) => deadline === void 0 ? effect : Effect.flatMap(Clock.currentTimeMillis, (now) => now >= deadline.at ? Effect.succeed(new Late(deadline)) : Effect.timeoutOrElse(effect, {
149
150
  duration: deadline.at - now,
150
151
  orElse: () => Effect.succeed(new Late(deadline))
151
152
  }));
@@ -169,7 +170,7 @@ const uploadPack = (parts, caller, repo, request, started) => {
169
170
  if (command.command === "ls-refs") {
170
171
  const asked = yield* readLsRefs(command);
171
172
  const listed = yield* open.lists;
172
- const pages = yield* listingBody(lsRefsPages(listed, asked, listed.hidden), listed.next, encodeErr, deadline, request);
173
+ const pages = yield* listingBody(lsRefsPages(listed, asked, listed.hidden), listed.next, void 0, encodeErr, deadline, request);
173
174
  return gitAnswer(resultType(service), pages);
174
175
  }
175
176
  const served = yield* open.serve;
@@ -213,7 +214,7 @@ const answerRound = /* @__PURE__ */ Effect.fnUntraced(function* (served, asked,
213
214
  const fetched = yield* Effect.result(served.fetch(request, AbortSignal.any([http.signal, stop.signal]))).pipe(Effect.onInterrupt(() => Effect.sync(() => stop.abort())));
214
215
  if (Result.isFailure(fetched)) return yield* errAnswer(refusalOf(request, fetched.failure));
215
216
  const answer = fetched.success;
216
- const shallowLines = version === "v2" ? deepens || request.shallows.length > 0 ? encodeShallowInfo(answer) : Effect.succeed(/* @__PURE__ */ new Uint8Array()) : deepens ? encodeV0Shallow(answer) : Effect.succeed(/* @__PURE__ */ new Uint8Array());
217
+ const shallowLines = version === "v2" ? deepens || request.shallows.length > 0 || answer.shallow.length > 0 ? encodeShallowInfo(answer) : Effect.succeed(/* @__PURE__ */ new Uint8Array()) : deepens ? encodeV0Shallow(answer) : Effect.succeed(/* @__PURE__ */ new Uint8Array());
217
218
  const shallow = yield* Effect.mapError(shallowLines, unwritable);
218
219
  const acks = version === "v2" ? Effect.succeed(packfileLine) : round.wantsOnly ? Effect.succeed(/* @__PURE__ */ new Uint8Array()) : Effect.mapError(encodeV0Acks(round, held), unwritable);
219
220
  const before = joinedBytes([shallow, yield* acks]);
package/dist/index.d.mts CHANGED
@@ -1,76 +1,75 @@
1
- import { Actor, ActorId, ActorInput, AnonymousActor, AuthInput, AuthorizeAnswer, AuthorizeInput, CallInput, Caller, CallerGrant, Credentials, CredentialsBasic, CredentialsBearer, GitAuth, GitAuthorize, NamedActor, RepoAccess, WriteInput } from "./contracts/actors.mjs";
1
+ import { Actor, ActorId, ActorInput, AnonymousActor, AuthInput, AuthorizeAnswer, AuthorizeInput, CallInput, Caller, CallerGrant, Credentials, CredentialsBasic, CredentialsBearer, NamedActor, RepoAccess, WriteInput } from "./contracts/actors.mjs";
2
2
  import { AccessOption, HiddenSpan, RefAudience, RefView } from "./contracts/access.mjs";
3
- import { Acting, Blob, BlobCalls, BlobCreateInput, CreatedObject, ObjectInput, blobs_d_exports } from "./contracts/blobs.mjs";
3
+ import { Acting, Blob, BlobCalls, BlobCreateInput, BlobsRead, CreatedObject, GetManyInput, ObjectInput, blobs_d_exports } from "./contracts/blobs.mjs";
4
4
  import { ClientAdapter, ClientFetchInput, ClientFetchResult, ClientPushInput, GitClientCalls, GitClientOptions, Localize, PagedInput, RefForced, RemoteRefsInput } from "./contracts/client.mjs";
5
5
  import "./client/namespace.mjs";
6
6
  import "./rest/client-namespace.mjs";
7
7
  import { RestClientCalls, RestTokenCalls, client_d_exports as client_d_exports$1 } from "./rest/client.mjs";
8
8
  import { ListenInput, RestEvents } from "./rest/listen.mjs";
9
9
  import { Me } from "./rest/me.mjs";
10
- import { CreatedToken, GrantScope, PrefixTarget, TokenCalls, TokenCoverage, TokenCreateInput, TokenFields, TokenId, TokenInfo, TokenListInput, TokenRecord, TokenScope, TokenState, TokenTarget, TokensFeature, TrustedWriteInput, VerifiedToken, grantScopes, tokenScopes, tokenStates } from "./contracts/tokens.mjs";
10
+ import { CreatedToken, GrantScope, PrefixTarget, TokenCoverage, TokenCreateInput, TokenFields, TokenId, TokenInfo, TokenListInput, TokenRecord, TokenScope, TokenState, TokenTarget, TrustedWriteInput, VerifiedToken, grantScopes, tokenScopes, tokenStates } from "./contracts/tokens.mjs";
11
11
  import "./contracts/namespaces.mjs";
12
12
  import "./server/namespaces.mjs";
13
13
  import "./core/namespaces.mjs";
14
- import { git_events_d_exports } from "./contracts/git-events.mjs";
15
14
  import "./auth/namespaces.mjs";
16
15
  import "./event-streams/namespace.mjs";
16
+ import { git_events_d_exports } from "./contracts/git-events.mjs";
17
17
  import "./rest/namespace.mjs";
18
18
  import "./merges/namespace.mjs";
19
- import { authorize_d_exports } from "./contracts/authorize.mjs";
20
19
  import "./queue/namespace.mjs";
21
20
  import "./lfs/namespace.mjs";
22
- import { QueueInternals, mergeQueue } from "./queue/host.mjs";
21
+ import "./store/cursor-seal-namespace.mjs";
22
+ import { QueueInternals } from "./queue/host.mjs";
23
23
  import { CommitCalls, CommitCreateInput, CommitDiffInput, Compare, CompareInput, ComparisonFile, LineCounts, LogInput, RefPublication, Revision, commits_d_exports, logEmailsMost } from "./contracts/commits.mjs";
24
24
  import { Commit, DiffListing, MergeBaseInput, MergeBases, MergeLabels, MergeTree, ObjectWrite, ObjectWrites, PathObject, ReadOptions, ReadPage, RenamesSkipped, Signature, Tag, TagFields, TreeChange, TreeChanges, TreeDiffInput, TreeMergeInput, WalkInput } from "./contracts/engine.mjs";
25
25
  import { BeforeAfter, CandidateClosed, CandidateClosedFields, CandidateOpened, CandidateReported, EntryAdded, EntryFailed, EntryMerged, EntryRemoved, EntryRetried, EventEnvelope, EventFeature, FeedItem, FenceReason, FencedPack, GitEvent, HoldEvent, HoldEventFields, IndexRefusal, QueueEvent, QueueRestarted, RefPush, RefUpdated, RepoCreated, RepoDeletedEvent, RepoEnvelope, RepoEvent, RepoIndexRefused, RepoJobFailed, RepoMaintained, RepoPruneRefused, RepoRenamed, RepoVisibilityChanged, RepoWorkFailed, TokenEvent, TokenEventFields, TopicAdded, TopicEnvelope, TopicEvent, TopicFailed, TopicMerged, TopicOpened, TopicRemoved, TopicReported, TopicWorkFailed, events_d_exports } from "./contracts/events.mjs";
26
26
  import { File, FileCalls, FileDiff, FileReadInput, FilesDiffInput, FilesListInput, FilesRead, files_d_exports } from "./contracts/files.mjs";
27
27
  import { ForkCalls, ForkCreateInput, ForkFetched, ForkGetInput, ForkHolder, ForkListInput, forks_d_exports } from "./contracts/forks.mjs";
28
- import { LfsCalls, LfsFeature, LfsGetInput, LfsObject, LfsOptions } from "./contracts/lfs.mjs";
29
- import { repo_records_d_exports } from "./contracts/repo-records.mjs";
28
+ import { LfsCalls, LfsGetInput, LfsGetManyInput, LfsObject, LfsObjects, LfsOptions } from "./contracts/lfs.mjs";
30
29
  import { MergeAnswer, MergeCalls, MergeCreateInput } from "./contracts/merges.mjs";
31
30
  import { HandlerOptions, SavedHandlerOptions } from "./contracts/handlers.mjs";
32
31
  import { Grant, GrantAgainInput, GrantAgainRequest, GrantInput, GrantReachInput, GrantResolver } from "./contracts/grants.mjs";
33
32
  import { GitScope, InternalRepoId, Oid, RefName, RepoName, TopicId, isInternalId, maxActorIdLength, maxRefNameLength } from "./contracts/ids.mjs";
34
33
  import { Allotment, CopyRow, CopyRowsInput, CopyRowsPage, EffectiveLimits, FetchAnswer, GitObject, GitObjects, HoldingsInput, HoldingsWalked, IndexCalls, IndexReachInput, IndexReached, IndexStatus, IndexTip, IndexTry, IndexTryInput, LinkedObjects, MaintainInput, ObjectHeader, ObjectHeadersInput, ObjectReadInput, ObjectReadResult, ObjectReader, ObjectReaderInput, ObjectSizesInput, ObjectsChange, ObjectsFactory, ObjectsFetchInput, ObjectsOpenInput, ObjectsRead, ObjectsReadInput, ObjectsStarting, ObjectsStartingInput, ObjectsStep, PushedCommit, PushedCommitsInput, Quarantine, ReadObject, ReadObjects, ReceiveInput, RowsMoved, ShareInput, StageInput, Staged, StepAnswer, StepInput, WholeObject } from "./contracts/objects.mjs";
34
+ import { authorize_d_exports } from "./contracts/authorize.mjs";
35
35
  import { BypassOperation, FilesAllowOperation, ForkOperation, MeOperation, Operation, OperationKind, PushOperation, QueueAddOperation, QueueCandidateOperation, QueueEntryOperation, QueueReleaseOperation, QueueTargetOperation, RefsPrivateOperation, RepoListOperation, RepoOperation, TokenCreateOperation, TokenOperation, TokenParties, TopicOperation, WorkOperation } from "./contracts/operations.mjs";
36
36
  import { client_d_exports } from "./client/client.mjs";
37
37
  import { AddResult, Added, BatchOptions, Bisect, Candidate, CandidateCloseReason, CandidateId, CandidateReportInput, CandidateResult, CandidateState, CandidatesResult, Entry, EntryFailureReason, EntryFields, EntryGroups, EntryHoldInput, EntryHoldsInput, EntryId, EntryResult, EntryState, Held, Hold, HoldFields, HoldId, HoldResult, HoldsResult, JoinInput, Judged, LanesInput, MergeInput, MergeMethod, MergePlan, MergeQueueCalls, MergeQueueLayerOptions, MergeQueueOptions, MetaValue, PreviousQueueSchedule, QueueAddInput, QueueFailureCounts, QueueKeys, QueueListInput, QueueListResult, QueueMeta, QueueOf, QueueRecent, QueueTargetInput, QueueView, ReleaseResult, Released, RemoveResult, Removed, Report, ReportDetails, ReportOptions, ReportResult, Reported, RestartResult, Restarted, Retried, RetryResult, ScheduleOption, TargetHoldInput } from "./contracts/queue.mjs";
38
38
  import { RepoStreamEvent } from "./rest/wire.mjs";
39
- import { Ref, RefCalls, RefCount, RefCountInput, RefEdit, RefInput, RefListInput, RefProtection, RefSource, RefUpdate, RefUpdateKind, RefsUpdateInput, RefsUpdated, maxSeenRefs, refs_d_exports } from "./contracts/refs.mjs";
40
- import { BasicCredential, BearerCredential, ClientCredential, ClientCredentials, CredentialInput, RemoteCalls, RemoteOptions, TransportFailure, TransportRetry, WithoutActor, WithoutSignal } from "./contracts/remote.mjs";
41
- import { PinnedRepo, RepoCalls, RepoCatalogueEntry, RepoCreateInput, RepoDeleted, RepoGetInput, RepoIndexHold, RepoInfo, RepoInfoStats, RepoInput, RepoListInput, RepoListOrder, RepoRecord, RepoRenameInput, RepoStats, RepoUpdateInput, RepoWork, repos_d_exports } from "./contracts/repos.mjs";
39
+ import { Ref, RefCalls, RefCount, RefCountInput, RefEdit, RefGetInput, RefInput, RefListInput, RefProtection, RefSource, RefUpdate, RefUpdateKind, RefsUpdateInput, RefsUpdated, maxSeenRefs, refs_d_exports } from "./contracts/refs.mjs";
40
+ import { BasicCredential, BearerCredential, ClientCredential, ClientCredentials, RemoteCalls, RemoteOptions, TransportFailure, TransportRetry, WithoutActor, WithoutSignal } from "./contracts/remote.mjs";
41
+ import { PinnedRepo, RenamedRepo, RepoCatalogueEntry, RepoCreateInput, RepoDeleted, RepoGetInput, RepoIndexHold, RepoInfo, RepoInfoStats, RepoInput, RepoListInput, RepoListOrder, RepoRecord, RepoRenameInput, RepoStats, RepoUpdateInput, RepoWork, repos_d_exports } from "./contracts/repos.mjs";
42
42
  import { PeelInput, Peeled, TagCalls, TagCreateInput, peelMost, peelTagsMost, tags_d_exports } from "./contracts/tags.mjs";
43
- import { Prepare, PrepareInput, Topic, TopicAddInput, TopicCalls, TopicCandidate, TopicEntry, TopicEntryInput, TopicFailure, TopicFailureReason, TopicListInput, TopicMergedEntry, TopicReportInput, TopicReportOptions, TopicReportQuestion, TopicState, TopicTarget, TopicWait, TopicsFactory } from "./contracts/topics.mjs";
43
+ import { repo_records_d_exports } from "./contracts/repo-records.mjs";
44
+ import { Prepare, PrepareInput, Topic, TopicAddInput, TopicCalls, TopicCandidate, TopicEntry, TopicEntryInput, TopicFailure, TopicFailureReason, TopicListInput, TopicMergedEntry, TopicReportInput, TopicReportOptions, TopicReportQuestion, TopicState, TopicTarget, TopicWait } from "./contracts/topics.mjs";
44
45
  import { policy_d_exports } from "./auth/policy.mjs";
45
- import { TreeCalls, TreeCreateInput, TreeEdit, TreeEntry, TreeInput, trees_d_exports } from "./contracts/trees.mjs";
46
46
  import { event_streams_d_exports } from "./event-streams/event-streams.mjs";
47
+ import { TreeCalls, TreeCreateInput, TreeEdit, TreeEntry, TreeInput, trees_d_exports } from "./contracts/trees.mjs";
47
48
  import { BlobLimit, BlobNone, Bytes, FetchRequest, Filter, LfsPointers, ObjectType, ReadLimits, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
48
- import { Accepted, Awaitable, ContextValue, DataLossContext, DataLossReason, DecisionAnswer, ErrorContext, ExistingContext, ExistingReason, FailureResult, GitError, GitErrorBody, GitErrorCode, GitErrorContexts, GitErrorFields, GitErrorInput, GitErrorTagged, HostErrorContext, HostFunctionName, InvalidInputContext, InvalidInputReason, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, PreconditionContext, PreconditionReason, RefusalReason, RejectInput, Rejected, ResourceContext, ResourceReason, Result, Success, UnavailableContext, UnavailableReason, Verdict, accept, gitError, httpStatus, isGitError, isRefusalReason, reject } from "./contracts/result.mjs";
49
+ import { Accepted, Awaitable, ContextValue, DataLossContext, DataLossReason, DecisionAnswer, ErrorContext, ExistingContext, ExistingReason, FailureResult, GitError, GitErrorBody, GitErrorCode, GitErrorContexts, GitErrorFields, GitErrorInput, GitErrorTagged, HostErrorContext, HostFunctionName, InvalidInputContext, InvalidInputReason, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, PreconditionContext, PreconditionReason, RefusalReason, RejectInput, Rejected, ResourceContext, ResourceReason, Result, Success, UnavailableContext, UnavailableReason, Verdict, gitError, httpStatus, isGitError, isRefusalReason } from "./contracts/result.mjs";
50
+ import { git_namespace_d_exports } from "./server/git-namespace.mjs";
49
51
  import { SliceRefusal } from "./client/slice-push.mjs";
50
52
  import { gitPathOf } from "./http/paths.mjs";
51
- import { git_namespace_d_exports } from "./server/git-namespace.mjs";
52
- import { createGitServer } from "./server/server.mjs";
53
- import { lfs } from "./lfs/service.mjs";
54
53
  import { branchRef, shortTarget } from "./queue/ids.mjs";
55
- import { topics } from "./topics/host.mjs";
56
- import { lfsPointerOid, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
54
+ import { LfsPointerTarget, lfsPointerOf, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
57
55
  import { LfsPointersBuilder, lfsPointers } from "./storage/lfs-pointers.mjs";
56
+ import { loose, looseLimits } from "./storage/loose.mjs";
58
57
  import { objects_namespace_d_exports } from "./core/objects/objects-namespace.mjs";
59
58
  import { saved_callers_public_d_exports } from "./core/saved-callers-public.mjs";
60
- import { loose, looseLimits } from "./storage/loose.mjs";
61
- import { auth_namespace_d_exports } from "./auth/auth-namespace.mjs";
62
59
  import { PacksOptions, UnpackOptions, packs } from "./storage/packs.mjs";
60
+ import { auth_namespace_d_exports } from "./auth/auth-namespace.mjs";
63
61
  import { PacksMemory, packsMemory } from "./storage/packs-memory.mjs";
64
- import { layer_d_exports } from "./rest/layer.mjs";
65
62
  import { Option, RepackOptions } from "./storage/repack.mjs";
66
- import { public_d_exports as public_d_exports$3 } from "./merges/public.mjs";
63
+ import { layer_d_exports } from "./rest/layer.mjs";
67
64
  import "./core/rules/namespace.mjs";
68
- import { public_d_exports as public_d_exports$2 } from "./queue/public.mjs";
65
+ import { public_d_exports as public_d_exports$3 } from "./merges/public.mjs";
69
66
  import { FetchAdjustment, FetchReadInput, FetchReadTarget, FetchRule, FetchRuleInput, FileRuleOptions, ProtectOptions, PushContext, PushFacts, PushRule, PushRuleInput, RefPatterns, RuleOperation } from "./contracts/rules.mjs";
67
+ import { public_d_exports as public_d_exports$2 } from "./queue/public.mjs";
68
+ import { BeginPushUpload, FinishPushUpload, PushFileOptions, PushOptions, PushRepoOptions, PushUploadOptions, PushUploadPart, PushUploadReceiving, PushUploadStarted } from "./contracts/push-uploads.mjs";
70
69
  import { public_d_exports as public_d_exports$1 } from "./lfs/public.mjs";
71
- import { BeginPushUpload, FinishPushUpload, PushOptions, PushUploadOptions, PushUploadPart, PushUploadStarted } from "./contracts/push-uploads.mjs";
72
- import { GitAdapter, GitNeeds, GitServer, GitServerOptions, ProvidedBy, ServerCalls, ServerSetup } from "./contracts/server.mjs";
73
- import { ImportState } from "./contracts/sync.mjs";
70
+ import { GitNeeds, ServerCalls } from "./contracts/server.mjs";
71
+ import { cursor_seal_public_d_exports } from "./store/cursor-seal-public.mjs";
72
+ import { ImportLfsMissed, ImportLfsReason, ImportState, ImportStatus } from "./contracts/sync.mjs";
74
73
  import { ApprovalBase, ApprovalDecision, ApprovalPageContext, ApprovalPageInput, ApprovalPrompt, ApprovedGrant, ConfirmApprovalPage, DeniedGrant, DeviceApproval, DeviceCodePage, DeviceCodeRequest, DeviceCodeResponse, DeviceExchange, OAuthClient, OAuthError, OAuthTokenResponse, WebApproval, WebAuthorize, WebExchange } from "./contracts/signin.mjs";
75
74
  import { GitStore, GitStoreAddInput, GitStoreCommitInput, GitStoreReadInput, HeldPack, Holding, Listed, ListedInput, Pack } from "./contracts/store.mjs";
76
75
  import { WorkCalls, WorkItem, WorkListInput, WorkWriteInput, work_d_exports } from "./contracts/work.mjs";
@@ -87,4 +86,4 @@ import { PushHookInput } from "./contracts/git-hooks.mjs";
87
86
  import { public_d_exports as public_d_exports$5 } from "./signin/public.mjs";
88
87
  import "./signin/namespace.mjs";
89
88
  import { jobStates } from "@ref0/infra";
90
- export { type Accepted, type AccessOption, type Acting, type Actor, type ActorId, type ActorInput, type AddResult, type Added, type Allotment, type AnonymousActor, type ApprovalBase, type ApprovalDecision, type ApprovalPageContext, type ApprovalPageInput, type ApprovalPrompt, type ApprovedGrant, auth_namespace_d_exports as Auth, type AuthInput, authorize_d_exports as Authorize, type AuthorizeAnswer, type AuthorizeInput, type Awaitable, type BasicCredential, type BatchOptions, type BearerCredential, type BeforeAfter, BeginPushUpload, type Bisect, type Blob, type BlobCalls, type BlobCreateInput, BlobLimit, BlobNone, blobs_d_exports as Blobs, type BypassOperation, type Bytes, type CallInput, type Caller, type CallerGrant, type Candidate, type CandidateCloseReason, type CandidateClosed, type CandidateClosedFields, type CandidateId, type CandidateOpened, type CandidateReportInput, type CandidateReported, type CandidateResult, type CandidateState, type CandidatesResult, type ClientAdapter, type ClientCredential, type ClientCredentials, type ClientFetchInput, type ClientFetchResult, type ClientPushInput, type Commit, type CommitCalls, type CommitCreateInput, type CommitDiffInput, commits_d_exports as Commits, type Compare, type CompareInput, type ComparisonFile, type ConfirmApprovalPage, ContextValue, type CopyRow, type CopyRowsInput, type CopyRowsPage, type CreatedObject, type CreatedToken, type CredentialInput, type Credentials, type CredentialsBasic, type CredentialsBearer, DataLossContext, DataLossReason, type DecisionAnswer, type DeniedGrant, type DeviceApproval, type DeviceCodePage, type DeviceCodeRequest, type DeviceCodeResponse, type DeviceExchange, type DiffListing, type EffectiveLimits, type Entry, type EntryAdded, type EntryFailed, type EntryFailureReason, type EntryFields, type EntryGroups, type EntryHoldInput, type EntryHoldsInput, type EntryId, type EntryMerged, type EntryRemoved, type EntryResult, type EntryRetried, type EntryState, ErrorContext, type EventEnvelope, type EventFeature, event_streams_d_exports as EventStreams, events_d_exports as Events, ExistingContext, ExistingReason, type FailureResult, type FeedItem, type FenceReason, type FencedPack, type FetchAdjustment, type FetchAnswer, type FetchReadInput, type FetchReadTarget, FetchRequest, type FetchRule, type FetchRuleInput, type File, type FileCalls, type FileDiff, type FileReadInput, type FileRuleOptions, files_d_exports as Files, type FilesAllowOperation, type FilesDiffInput, type FilesListInput, type FilesRead, Filter, FinishPushUpload, type ForkCalls, type ForkCreateInput, type ForkFetched, type ForkGetInput, type ForkHolder, type ForkListInput, type ForkOperation, forks_d_exports as Forks, git_namespace_d_exports as Git, type GitAdapter, type GitAuth, type GitAuthorize, client_d_exports as GitClient, type GitClientCalls, type GitClientOptions, type GitError, GitErrorBody, type GitErrorCode, type GitErrorContexts, type GitErrorFields, type GitErrorInput, type GitErrorTagged, type GitEvent, git_events_d_exports as GitEvents, public_d_exports as GitHooks, type GitNeeds, type GitObject, type GitObjects, type GitScope, type GitServer, type GitServerOptions, type GitStore, type GitStoreAddInput, type GitStoreCommitInput, type GitStoreReadInput, type Grant, type GrantAgainInput, type GrantAgainRequest, type GrantInput, type GrantReachInput, type GrantResolver, type GrantScope, type HandlerOptions, type Held, type HeldPack, type HiddenSpan, type Hold, type HoldEvent, type HoldEventFields, type HoldFields, type HoldId, type HoldResult, type Holding, type HoldingsInput, type HoldingsWalked, type HoldsResult, HostErrorContext, type HostFunctionName, type ImportState, type IndexCalls, type IndexReachInput, type IndexReached, type IndexRefusal, type IndexStatus, type IndexTip, type IndexTry, type IndexTryInput, InternalRepoId, InvalidInputContext, InvalidInputReason, type JoinInput, type Judged, type LanesInput, public_d_exports$1 as Lfs, type LfsCalls, type LfsFeature, type LfsGetInput, type LfsObject, type LfsOptions, type LfsPointers, type LfsPointersBuilder, type LineCounts, type LinkedObjects, type Listed, type ListedInput, type ListenInput, type Localize, type LogInput, type MaintainInput, type Me, type MeOperation, type MergeAnswer, type MergeBaseInput, type MergeBases, type MergeCalls, type MergeCreateInput, type MergeInput, type MergeLabels, type MergeMethod, type MergePlan, public_d_exports$2 as MergeQueue, type MergeQueueCalls, type MergeQueueLayerOptions, type MergeQueueOptions, type MergeTree, public_d_exports$3 as Merges, type MetaValue, MissingContext, MissingReason, type NamedActor, NotAllowedContext, NotAllowedReason, type OAuthClient, type OAuthError, type OAuthTokenResponse, type ObjectHeader, type ObjectHeadersInput, type ObjectInput, type ObjectReadInput, type ObjectReadResult, type ObjectReader, type ObjectReaderInput, type ObjectSizesInput, type ObjectType, type ObjectWrite, type ObjectWrites, objects_namespace_d_exports as Objects, type ObjectsChange, type ObjectsFactory, type ObjectsFetchInput, type ObjectsOpenInput, type ObjectsRead, type ObjectsReadInput, type ObjectsStarting, type ObjectsStartingInput, type ObjectsStep, type Oid, type Operation, type OperationKind, type Option, type Pack, type PacksMemory, type PacksOptions, type PagedInput, type PathObject, type PeelInput, type Peeled, type PinnedRepo, policy_d_exports as Policy, PreconditionContext, PreconditionReason, type PrefixTarget, type Prepare, type PrepareInput, type PreviousQueueSchedule, public_d_exports$4 as PrivateRefs, type ProtectOptions, type ProvidedBy, type PushContext, type PushFacts, type PushHookInput, type PushOperation, type PushOptions, type PushRule, type PushRuleInput, type PushUploadOptions, PushUploadPart, PushUploadStarted, type PushedCommit, type PushedCommitsInput, type Quarantine, type QueueAddInput, type QueueAddOperation, type QueueCandidateOperation, type QueueEntryOperation, type QueueEvent, type QueueFailureCounts, type QueueInternals, type QueueKeys, type QueueListInput, type QueueListResult, type QueueMeta, type QueueOf, type QueueRecent, type QueueReleaseOperation, type QueueRestarted, type QueueTargetInput, type QueueTargetOperation, type QueueView, type ReadLimits, type ReadObject, type ReadObjects, type ReadOptions, type ReadPage, type ReceiveInput, type Ref, type RefAudience, type RefCalls, type RefCount, type RefCountInput, type RefEdit, type RefForced, type RefInput, type RefListInput, type RefName, type RefPatterns, type RefProtection, type RefPublication, type RefPush, type RefSource, type RefUpdate, type RefUpdateKind, type RefUpdated, type RefView, refs_d_exports as Refs, type RefsPrivateOperation, type RefsUpdateInput, type RefsUpdated, type RefusalReason, type RejectInput, type Rejected, type ReleaseResult, type Released, type RemoteCalls, type RemoteOptions, type RemoteRefsInput, type RemoveResult, type Removed, type RenamesSkipped, type RepackOptions, type RepoAccess, type RepoCalls, type RepoCatalogueEntry, type RepoCreateInput, type RepoCreated, type RepoDeleted, type RepoDeletedEvent, type RepoEnvelope, type RepoEvent, type RepoGetInput, type RepoIndexHold, type RepoIndexRefused, type RepoInfo, type RepoInfoStats, type RepoInput, type RepoJobFailed, type RepoListInput, type RepoListOperation, type RepoListOrder, type RepoMaintained, type RepoName, type RepoOperation, type RepoPruneRefused, type RepoRecord, repo_records_d_exports as RepoRecords, type RepoRenameInput, type RepoRenamed, type RepoStats, type RepoStreamEvent, type RepoUpdateInput, type RepoVisibilityChanged, type RepoWork, type RepoWorkFailed, type Report, type ReportDetails, type ReportOptions, type ReportResult, type Reported, repos_d_exports as Repos, ResourceContext, ResourceReason, layer_d_exports as Rest, client_d_exports$1 as RestClient, type RestClientCalls, type RestEvents, type RestTokenCalls, type RestartResult, type Restarted, type Result, type Retried, type RetryResult, type Revision, type RowsMoved, type RuleOperation, rules_d_exports as Rules, saved_callers_public_d_exports as SavedCallers, type SavedHandlerOptions, type ScheduleOption, type ServerCalls, type ServerSetup, type ShareInput, public_d_exports$5 as SignIn, type Signature, type SliceRefusal, type StageInput, type Staged, type StepAnswer, type StepInput, type Success, type Tag, type TagCalls, type TagCreateInput, type TagFields, tags_d_exports as Tags, type TargetHoldInput, type TokenCalls, type TokenCoverage, type TokenCreateInput, type TokenCreateOperation, type TokenEvent, type TokenEventFields, type TokenFields, type TokenId, type TokenInfo, type TokenListInput, type TokenOperation, type TokenParties, type TokenRecord, type TokenScope, type TokenState, type TokenTarget, tokens_public_d_exports as Tokens, type TokensFeature, type Topic, type TopicAddInput, type TopicAdded, type TopicCalls, type TopicCandidate, type TopicEntry, type TopicEntryInput, type TopicEnvelope, type TopicEvent, type TopicFailed, type TopicFailure, type TopicFailureReason, type TopicId, type TopicListInput, type TopicMerged, type TopicMergedEntry, type TopicOpened, type TopicOperation, type TopicRemoved, type TopicReportInput, type TopicReportOptions, type TopicReportQuestion, type TopicReported, type TopicState, type TopicTarget, type TopicWait, type TopicWorkFailed, public_d_exports$6 as Topics, type TopicsFactory, type TransportFailure, type TransportRetry, type TreeCalls, type TreeChange, type TreeChanges, type TreeCreateInput, type TreeDiffInput, type TreeEdit, type TreeEntry, TreeFilter, type TreeInput, type TreeMergeInput, trees_d_exports as Trees, type TrustedWriteInput, UnavailableContext, UnavailableReason, type UnpackOptions, Verdict, type VerifiedToken, type WalkInput, type WebApproval, type WebAuthorize, type WebExchange, type WholeObject, type WithoutActor, type WithoutSignal, work_d_exports as Work, type WorkCalls, type WorkItem, type WorkListInput, type WorkOperation, type WorkWriteInput, type WriteInput, accept, allotmentWithin, branchRef, createGitServer, gitError, gitPathOf, grantScopes, httpStatus, isGitError, isInternalId, isRefusalReason, jobStates, lfs, lfsPointerOid, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, mergeQueue, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, reject, shortTarget, tokenScopes, tokenStates, topics };
89
+ export { type Accepted, type AccessOption, type Acting, type Actor, type ActorId, type ActorInput, type AddResult, type Added, type Allotment, type AnonymousActor, type ApprovalBase, type ApprovalDecision, type ApprovalPageContext, type ApprovalPageInput, type ApprovalPrompt, type ApprovedGrant, auth_namespace_d_exports as Auth, type AuthInput, authorize_d_exports as Authorize, type AuthorizeAnswer, type AuthorizeInput, type Awaitable, type BasicCredential, type BatchOptions, type BearerCredential, type BeforeAfter, BeginPushUpload, type Bisect, type Blob, type BlobCalls, type BlobCreateInput, BlobLimit, BlobNone, blobs_d_exports as Blobs, type BlobsRead, type BypassOperation, type Bytes, type CallInput, type Caller, type CallerGrant, type Candidate, type CandidateCloseReason, type CandidateClosed, type CandidateClosedFields, type CandidateId, type CandidateOpened, type CandidateReportInput, type CandidateReported, type CandidateResult, type CandidateState, type CandidatesResult, type ClientAdapter, type ClientCredential, type ClientCredentials, type ClientFetchInput, type ClientFetchResult, type ClientPushInput, type Commit, type CommitCalls, type CommitCreateInput, type CommitDiffInput, commits_d_exports as Commits, type Compare, type CompareInput, type ComparisonFile, type ConfirmApprovalPage, ContextValue, type CopyRow, type CopyRowsInput, type CopyRowsPage, type CreatedObject, type CreatedToken, type Credentials, type CredentialsBasic, type CredentialsBearer, cursor_seal_public_d_exports as CursorSeal, DataLossContext, DataLossReason, type DecisionAnswer, type DeniedGrant, type DeviceApproval, type DeviceCodePage, type DeviceCodeRequest, type DeviceCodeResponse, type DeviceExchange, type DiffListing, type EffectiveLimits, type Entry, type EntryAdded, type EntryFailed, type EntryFailureReason, type EntryFields, type EntryGroups, type EntryHoldInput, type EntryHoldsInput, type EntryId, type EntryMerged, type EntryRemoved, type EntryResult, type EntryRetried, type EntryState, ErrorContext, type EventEnvelope, type EventFeature, event_streams_d_exports as EventStreams, events_d_exports as Events, ExistingContext, ExistingReason, type FailureResult, type FeedItem, type FenceReason, type FencedPack, type FetchAdjustment, type FetchAnswer, type FetchReadInput, type FetchReadTarget, FetchRequest, type FetchRule, type FetchRuleInput, type File, type FileCalls, type FileDiff, type FileReadInput, type FileRuleOptions, files_d_exports as Files, type FilesAllowOperation, type FilesDiffInput, type FilesListInput, type FilesRead, Filter, FinishPushUpload, type ForkCalls, type ForkCreateInput, type ForkFetched, type ForkGetInput, type ForkHolder, type ForkListInput, type ForkOperation, forks_d_exports as Forks, type GetManyInput, git_namespace_d_exports as Git, client_d_exports as GitClient, type GitClientCalls, type GitClientOptions, type GitError, GitErrorBody, type GitErrorCode, type GitErrorContexts, type GitErrorFields, type GitErrorInput, type GitErrorTagged, type GitEvent, git_events_d_exports as GitEvents, public_d_exports as GitHooks, type GitNeeds, type GitObject, type GitObjects, type GitScope, type GitStore, type GitStoreAddInput, type GitStoreCommitInput, type GitStoreReadInput, type Grant, type GrantAgainInput, type GrantAgainRequest, type GrantInput, type GrantReachInput, type GrantResolver, type GrantScope, type HandlerOptions, type Held, type HeldPack, type HiddenSpan, type Hold, type HoldEvent, type HoldEventFields, type HoldFields, type HoldId, type HoldResult, type Holding, type HoldingsInput, type HoldingsWalked, type HoldsResult, HostErrorContext, type HostFunctionName, type ImportLfsMissed, type ImportLfsReason, type ImportState, type ImportStatus, type IndexCalls, type IndexReachInput, type IndexReached, type IndexRefusal, type IndexStatus, type IndexTip, type IndexTry, type IndexTryInput, InternalRepoId, InvalidInputContext, InvalidInputReason, type JoinInput, type Judged, type LanesInput, public_d_exports$1 as Lfs, type LfsCalls, type LfsGetInput, type LfsGetManyInput, type LfsObject, type LfsObjects, type LfsOptions, type LfsPointerTarget, type LfsPointers, type LfsPointersBuilder, type LineCounts, type LinkedObjects, type Listed, type ListedInput, type ListenInput, type Localize, type LogInput, type MaintainInput, type Me, type MeOperation, type MergeAnswer, type MergeBaseInput, type MergeBases, type MergeCalls, type MergeCreateInput, type MergeInput, type MergeLabels, type MergeMethod, type MergePlan, public_d_exports$2 as MergeQueue, type MergeQueueCalls, type MergeQueueLayerOptions, type MergeQueueOptions, type MergeTree, public_d_exports$3 as Merges, type MetaValue, MissingContext, MissingReason, type NamedActor, NotAllowedContext, NotAllowedReason, type OAuthClient, type OAuthError, type OAuthTokenResponse, type ObjectHeader, type ObjectHeadersInput, type ObjectInput, type ObjectReadInput, type ObjectReadResult, type ObjectReader, type ObjectReaderInput, type ObjectSizesInput, type ObjectType, type ObjectWrite, type ObjectWrites, objects_namespace_d_exports as Objects, type ObjectsChange, type ObjectsFactory, type ObjectsFetchInput, type ObjectsOpenInput, type ObjectsRead, type ObjectsReadInput, type ObjectsStarting, type ObjectsStartingInput, type ObjectsStep, type Oid, type Operation, type OperationKind, type Option, type Pack, type PacksMemory, type PacksOptions, type PagedInput, type PathObject, type PeelInput, type Peeled, type PinnedRepo, policy_d_exports as Policy, PreconditionContext, PreconditionReason, type PrefixTarget, type Prepare, type PrepareInput, type PreviousQueueSchedule, public_d_exports$4 as PrivateRefs, type ProtectOptions, type PushContext, type PushFacts, type PushFileOptions, type PushHookInput, type PushOperation, type PushOptions, type PushRepoOptions, type PushRule, type PushRuleInput, type PushUploadOptions, PushUploadPart, PushUploadReceiving, PushUploadStarted, type PushedCommit, type PushedCommitsInput, type Quarantine, type QueueAddInput, type QueueAddOperation, type QueueCandidateOperation, type QueueEntryOperation, type QueueEvent, type QueueFailureCounts, type QueueInternals, type QueueKeys, type QueueListInput, type QueueListResult, type QueueMeta, type QueueOf, type QueueRecent, type QueueReleaseOperation, type QueueRestarted, type QueueTargetInput, type QueueTargetOperation, type QueueView, type ReadLimits, type ReadObject, type ReadObjects, type ReadOptions, type ReadPage, type ReceiveInput, type Ref, type RefAudience, type RefCalls, type RefCount, type RefCountInput, type RefEdit, type RefForced, type RefGetInput, type RefInput, type RefListInput, type RefName, type RefPatterns, type RefProtection, type RefPublication, type RefPush, type RefSource, type RefUpdate, type RefUpdateKind, type RefUpdated, type RefView, refs_d_exports as Refs, type RefsPrivateOperation, type RefsUpdateInput, type RefsUpdated, type RefusalReason, type RejectInput, type Rejected, type ReleaseResult, type Released, type RemoteCalls, type RemoteOptions, type RemoteRefsInput, type RemoveResult, type Removed, type RenamedRepo, type RenamesSkipped, type RepackOptions, type RepoAccess, type RepoCatalogueEntry, type RepoCreateInput, type RepoCreated, type RepoDeleted, type RepoDeletedEvent, type RepoEnvelope, type RepoEvent, type RepoGetInput, type RepoIndexHold, type RepoIndexRefused, type RepoInfo, type RepoInfoStats, type RepoInput, type RepoJobFailed, type RepoListInput, type RepoListOperation, type RepoListOrder, type RepoMaintained, type RepoName, type RepoOperation, type RepoPruneRefused, type RepoRecord, repo_records_d_exports as RepoRecords, type RepoRenameInput, type RepoRenamed, type RepoStats, type RepoStreamEvent, type RepoUpdateInput, type RepoVisibilityChanged, type RepoWork, type RepoWorkFailed, type Report, type ReportDetails, type ReportOptions, type ReportResult, type Reported, repos_d_exports as Repos, ResourceContext, ResourceReason, layer_d_exports as Rest, client_d_exports$1 as RestClient, type RestClientCalls, type RestEvents, type RestTokenCalls, type RestartResult, type Restarted, type Result, type Retried, type RetryResult, type Revision, type RowsMoved, type RuleOperation, rules_d_exports as Rules, saved_callers_public_d_exports as SavedCallers, type SavedHandlerOptions, type ScheduleOption, type ServerCalls, type ShareInput, public_d_exports$5 as SignIn, type Signature, type SliceRefusal, type StageInput, type Staged, type StepAnswer, type StepInput, type Success, type Tag, type TagCalls, type TagCreateInput, type TagFields, tags_d_exports as Tags, type TargetHoldInput, type TokenCoverage, type TokenCreateInput, type TokenCreateOperation, type TokenEvent, type TokenEventFields, type TokenFields, type TokenId, type TokenInfo, type TokenListInput, type TokenOperation, type TokenParties, type TokenRecord, type TokenScope, type TokenState, type TokenTarget, tokens_public_d_exports as Tokens, type Topic, type TopicAddInput, type TopicAdded, type TopicCalls, type TopicCandidate, type TopicEntry, type TopicEntryInput, type TopicEnvelope, type TopicEvent, type TopicFailed, type TopicFailure, type TopicFailureReason, type TopicId, type TopicListInput, type TopicMerged, type TopicMergedEntry, type TopicOpened, type TopicOperation, type TopicRemoved, type TopicReportInput, type TopicReportOptions, type TopicReportQuestion, type TopicReported, type TopicState, type TopicTarget, type TopicWait, type TopicWorkFailed, public_d_exports$6 as Topics, type TransportFailure, type TransportRetry, type TreeCalls, type TreeChange, type TreeChanges, type TreeCreateInput, type TreeDiffInput, type TreeEdit, type TreeEntry, TreeFilter, type TreeInput, type TreeMergeInput, trees_d_exports as Trees, type TrustedWriteInput, UnavailableContext, UnavailableReason, type UnpackOptions, Verdict, type VerifiedToken, type WalkInput, type WebApproval, type WebAuthorize, type WebExchange, type WholeObject, type WithoutActor, type WithoutSignal, work_d_exports as Work, type WorkCalls, type WorkItem, type WorkListInput, type WorkOperation, type WorkWriteInput, type WriteInput, allotmentWithin, branchRef, gitError, gitPathOf, grantScopes, httpStatus, isGitError, isInternalId, isRefusalReason, jobStates, lfsPointerOf, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, shortTarget, tokenScopes, tokenStates };