@ref0/git 0.6.0 → 0.8.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 (476) hide show
  1. package/dist/access/namespace.d.mts +2 -0
  2. package/dist/access/private-refs.d.mts +6 -29
  3. package/dist/access/private-refs.mjs +26 -13
  4. package/dist/access/public.d.mts +6 -0
  5. package/dist/access/public.mjs +9 -0
  6. package/dist/auth/access-jwt.d.mts +10 -6
  7. package/dist/auth/access-jwt.mjs +59 -40
  8. package/dist/auth/auth-namespace.d.mts +6 -0
  9. package/dist/auth/auth-namespace.mjs +12 -0
  10. package/dist/auth/auth.d.mts +3 -6
  11. package/dist/auth/auth.mjs +2 -9
  12. package/dist/auth/authorize.mjs +35 -29
  13. package/dist/auth/bridge.mjs +8 -8
  14. package/dist/auth/fences.d.mts +1 -2
  15. package/dist/auth/fences.mjs +1 -1
  16. package/dist/auth/grants.d.mts +0 -1
  17. package/dist/auth/grants.mjs +2 -2
  18. package/dist/auth/host-function.d.mts +1 -7
  19. package/dist/auth/host-function.mjs +51 -42
  20. package/dist/auth/identify.d.mts +0 -1
  21. package/dist/auth/identify.mjs +3 -2
  22. package/dist/auth/namespaces.d.mts +2 -2
  23. package/dist/auth/policy.d.mts +7 -4
  24. package/dist/auth/policy.mjs +13 -10
  25. package/dist/auth/token-rows.mjs +3 -6
  26. package/dist/auth/tokens-layer.d.mts +40 -0
  27. package/dist/auth/tokens-layer.mjs +29 -0
  28. package/dist/auth/tokens-namespace.d.mts +2 -0
  29. package/dist/auth/tokens-public.d.mts +6 -0
  30. package/dist/auth/tokens-public.mjs +31 -0
  31. package/dist/auth/tokens.d.mts +19 -7
  32. package/dist/auth/tokens.mjs +12 -6
  33. package/dist/auth.d.mts +2 -2
  34. package/dist/auth.mjs +2 -2
  35. package/dist/client/client.d.mts +22 -15
  36. package/dist/client/client.mjs +31 -27
  37. package/dist/client/git-http.mjs +23 -6
  38. package/dist/client/local.mjs +5 -4
  39. package/dist/client/namespace.d.mts +2 -0
  40. package/dist/client/push-upload.d.mts +1 -0
  41. package/dist/client/push-upload.mjs +169 -2
  42. package/dist/client/remote-helper.mjs +5 -12
  43. package/dist/client/remote.mjs +63 -22
  44. package/dist/client/run-remote-helper.d.mts +1 -1
  45. package/dist/client/run-remote-helper.mjs +6 -6
  46. package/dist/client/slice-push.d.mts +1 -1
  47. package/dist/client/transport.mjs +26 -19
  48. package/dist/contracts/access.d.mts +18 -10
  49. package/dist/contracts/access.mjs +17 -0
  50. package/dist/contracts/actors.d.mts +73 -28
  51. package/dist/contracts/actors.mjs +45 -2
  52. package/dist/contracts/authorize.d.mts +26 -17
  53. package/dist/contracts/blobs.d.mts +1 -1
  54. package/dist/contracts/blobs.mjs +1 -1
  55. package/dist/contracts/callers.mjs +40 -0
  56. package/dist/contracts/calls-spent.d.mts +6 -4
  57. package/dist/contracts/calls-spent.mjs +10 -8
  58. package/dist/contracts/client.d.mts +16 -9
  59. package/dist/contracts/commits.d.mts +2 -2
  60. package/dist/contracts/commits.mjs +1 -1
  61. package/dist/contracts/engine.d.mts +1 -1
  62. package/dist/contracts/events.d.mts +45 -32
  63. package/dist/contracts/events.mjs +21 -10
  64. package/dist/contracts/files.d.mts +44 -44
  65. package/dist/contracts/files.mjs +1 -1
  66. package/dist/contracts/forks.d.mts +34 -58
  67. package/dist/contracts/forks.mjs +1 -1
  68. package/dist/contracts/git-events.d.mts +50 -0
  69. package/dist/contracts/git-events.mjs +23 -0
  70. package/dist/contracts/git-hooks.d.mts +254 -0
  71. package/dist/contracts/git-hooks.mjs +12 -0
  72. package/dist/contracts/git.d.mts +93 -42
  73. package/dist/contracts/git.mjs +6 -5
  74. package/dist/contracts/grants.d.mts +46 -27
  75. package/dist/contracts/ids.d.mts +16 -0
  76. package/dist/contracts/ids.mjs +19 -4
  77. package/dist/contracts/lfs.d.mts +19 -4
  78. package/dist/contracts/merges.d.mts +7 -7
  79. package/dist/contracts/namespaces.d.mts +2 -2
  80. package/dist/contracts/objects.d.mts +21 -5
  81. package/dist/contracts/opaque.mjs +27 -0
  82. package/dist/contracts/operations.d.mts +301 -101
  83. package/dist/contracts/operations.mjs +209 -0
  84. package/dist/contracts/promises.d.mts +2 -0
  85. package/dist/contracts/push-uploads.d.mts +4 -1
  86. package/dist/contracts/push-uploads.mjs +9 -4
  87. package/dist/contracts/queue.d.mts +220 -49
  88. package/dist/contracts/queue.mjs +68 -6
  89. package/dist/contracts/refs.d.mts +30 -8
  90. package/dist/contracts/refs.mjs +1 -1
  91. package/dist/contracts/remote.d.mts +53 -23
  92. package/dist/contracts/remote.mjs +22 -0
  93. package/dist/contracts/repo-records.d.mts +2 -2
  94. package/dist/contracts/repos.d.mts +100 -82
  95. package/dist/contracts/repos.mjs +47 -8
  96. package/dist/contracts/result.d.mts +73 -41
  97. package/dist/contracts/result.mjs +74 -17
  98. package/dist/contracts/rules.d.mts +734 -68
  99. package/dist/contracts/rules.mjs +84 -1
  100. package/dist/contracts/server.d.mts +20 -206
  101. package/dist/contracts/services.d.mts +1 -10
  102. package/dist/contracts/services.mjs +1 -5
  103. package/dist/contracts/signin.d.mts +140 -43
  104. package/dist/contracts/signin.mjs +36 -3
  105. package/dist/contracts/store.d.mts +1 -1
  106. package/dist/contracts/sync.d.mts +109 -90
  107. package/dist/contracts/sync.mjs +34 -7
  108. package/dist/contracts/tags.d.mts +1 -1
  109. package/dist/contracts/tags.mjs +1 -1
  110. package/dist/contracts/tokens.d.mts +247 -60
  111. package/dist/contracts/tokens.mjs +93 -21
  112. package/dist/contracts/topics.d.mts +59 -20
  113. package/dist/contracts/topics.mjs +14 -5
  114. package/dist/contracts/trees.d.mts +2 -2
  115. package/dist/contracts/trees.mjs +1 -1
  116. package/dist/contracts/work.d.mts +2 -2
  117. package/dist/contracts/work.mjs +2 -2
  118. package/dist/core/access.d.mts +10 -12
  119. package/dist/core/access.mjs +45 -11
  120. package/dist/core/clock.mjs +1 -1
  121. package/dist/core/events/deliver.d.mts +3 -2
  122. package/dist/core/events/deliver.mjs +188 -92
  123. package/dist/core/forks.mjs +78 -34
  124. package/dist/core/hooks/groups.d.mts +26 -0
  125. package/dist/core/hooks/groups.mjs +73 -0
  126. package/dist/core/hooks/namespace.d.mts +2 -0
  127. package/dist/core/hooks/order.d.mts +2 -2
  128. package/dist/core/hooks/order.mjs +6 -6
  129. package/dist/core/hooks/public.d.mts +7 -0
  130. package/dist/core/hooks/public.mjs +5 -0
  131. package/dist/core/imports.mjs +94 -10
  132. package/dist/core/index-job.mjs +11 -8
  133. package/dist/core/loose-tally.mjs +46 -0
  134. package/dist/core/merge-parts.d.mts +1 -1
  135. package/dist/core/merge-parts.mjs +1 -1
  136. package/dist/core/mirror-rows.mjs +18 -0
  137. package/dist/core/names.mjs +1 -1
  138. package/dist/core/namespaces.d.mts +2 -1
  139. package/dist/core/objects/commit-writes.mjs +5 -5
  140. package/dist/core/objects/merges.mjs +1 -1
  141. package/dist/core/objects/objects-layer.mjs +1 -1
  142. package/dist/core/objects/reading.mjs +52 -7
  143. package/dist/core/objects/tree-edits.mjs +13 -28
  144. package/dist/core/objects/trees.mjs +4 -4
  145. package/dist/core/objects/writing.mjs +4 -3
  146. package/dist/core/own-writes.mjs +1 -1
  147. package/dist/core/parts.d.mts +22 -3
  148. package/dist/core/parts.mjs +5 -3
  149. package/dist/core/promise.mjs +23 -17
  150. package/dist/core/purge.d.mts +2 -2
  151. package/dist/core/purge.mjs +89 -34
  152. package/dist/core/push.mjs +67 -79
  153. package/dist/core/receipts.d.mts +2 -2
  154. package/dist/core/receipts.mjs +28 -4
  155. package/dist/core/ref-index-job.mjs +4 -4
  156. package/dist/core/ref-view.mjs +16 -8
  157. package/dist/core/refs.mjs +41 -10
  158. package/dist/core/registered-records.mjs +30 -0
  159. package/dist/core/{claim-rows.mjs → registered-rows.mjs} +6 -6
  160. package/dist/core/repack.d.mts +2 -2
  161. package/dist/core/repack.mjs +30 -23
  162. package/dist/core/repo-info.mjs +62 -26
  163. package/dist/core/repos.mjs +18 -11
  164. package/dist/core/rules/changes.mjs +2 -2
  165. package/dist/core/rules/check.mjs +10 -10
  166. package/dist/core/rules/commit-changes.mjs +1 -1
  167. package/dist/core/rules/context.d.mts +7 -6
  168. package/dist/core/rules/context.mjs +18 -16
  169. package/dist/core/rules/fetch.mjs +78 -31
  170. package/dist/core/saved-caller-views.d.mts +72 -0
  171. package/dist/core/saved-caller-views.mjs +123 -0
  172. package/dist/core/saved-callers-public.d.mts +5 -0
  173. package/dist/core/saved-callers-public.mjs +10 -0
  174. package/dist/core/saved-callers.mjs +95 -0
  175. package/dist/core/seam.d.mts +12 -1
  176. package/dist/core/seam.mjs +4 -2
  177. package/dist/core/tokens.mjs +7 -2
  178. package/dist/core/view.d.mts +1 -1
  179. package/dist/core/view.mjs +1 -1
  180. package/dist/core/work.mjs +6 -5
  181. package/dist/effect.d.mts +2 -4
  182. package/dist/effect.mjs +2 -4
  183. package/dist/engine/commits.mjs +19 -47
  184. package/dist/engine/content.d.mts +2 -2
  185. package/dist/engine/content.mjs +1 -1
  186. package/dist/engine/diff.mjs +2 -2
  187. package/dist/engine/failures.d.mts +1 -2
  188. package/dist/engine/failures.mjs +1 -3
  189. package/dist/engine/merge-base-walk.mjs +57 -142
  190. package/dist/engine/merge-bases.mjs +5 -5
  191. package/dist/engine/merge-renames.mjs +1 -1
  192. package/dist/engine/merge.mjs +16 -14
  193. package/dist/engine/reads.d.mts +2 -2
  194. package/dist/engine/reads.mjs +1 -1
  195. package/dist/engine/xdiff.d.mts +1 -1
  196. package/dist/engine/xdiff.mjs +2 -2
  197. package/dist/event-streams/event-streams.d.mts +6 -2
  198. package/dist/event-streams/event-streams.mjs +6 -2
  199. package/dist/event-streams/stream.mjs +5 -2
  200. package/dist/extend.d.mts +2 -3
  201. package/dist/extend.mjs +2 -2
  202. package/dist/http/answers.mjs +4 -3
  203. package/dist/http/core-parts.mjs +3 -4
  204. package/dist/http/handler.mjs +12 -32
  205. package/dist/http/parts.d.mts +1 -1
  206. package/dist/http/push-uploads.mjs +7 -5
  207. package/dist/http/receive-pack.mjs +3 -3
  208. package/dist/http/upload-pack.mjs +6 -5
  209. package/dist/index.d.mts +44 -24
  210. package/dist/index.mjs +17 -8
  211. package/dist/lfs/base.d.mts +8 -5
  212. package/dist/lfs/base.mjs +2 -1
  213. package/dist/lfs/calls.mjs +3 -2
  214. package/dist/lfs/layer.d.mts +9 -7
  215. package/dist/lfs/layer.mjs +37 -22
  216. package/dist/lfs/locks.mjs +3 -3
  217. package/dist/lfs/objects.d.mts +3 -2
  218. package/dist/lfs/objects.mjs +235 -71
  219. package/dist/lfs/pointers.mjs +70 -19
  220. package/dist/lfs/purge.mjs +7 -3
  221. package/dist/lfs/rows.mjs +25 -8
  222. package/dist/lfs/service.d.mts +6 -3
  223. package/dist/lfs/service.mjs +8 -2
  224. package/dist/lfs/upkeep.mjs +53 -31
  225. package/dist/lfs/upload-most.mjs +41 -0
  226. package/dist/lfs/uploaded.mjs +59 -0
  227. package/dist/lfs/wire.mjs +1 -1
  228. package/dist/protocol/bytes/buffers.d.mts +1 -1
  229. package/dist/protocol/bytes/buffers.mjs +1 -1
  230. package/dist/protocol/bytes/deflate.d.mts +1 -1
  231. package/dist/protocol/bytes/deflate.mjs +1 -1
  232. package/dist/protocol/bytes/hmac-sha256.mjs +3 -6
  233. package/dist/protocol/bytes/inflate.d.mts +1 -1
  234. package/dist/protocol/bytes/inflate.mjs +1 -1
  235. package/dist/protocol/bytes/sha1.d.mts +1 -1
  236. package/dist/protocol/bytes/sha1.mjs +2 -2
  237. package/dist/protocol/bytes/sha256-hasher.mjs +51 -0
  238. package/dist/protocol/bytes/text.mjs +6 -1
  239. package/dist/protocol/diff/read.d.mts +1 -1
  240. package/dist/protocol/diff/read.mjs +1 -1
  241. package/dist/protocol/diff/tree-diff.d.mts +1 -1
  242. package/dist/protocol/diff/tree-diff.mjs +11 -11
  243. package/dist/protocol/objects/fsck.mjs +6 -3
  244. package/dist/protocol/objects/lfs-pointer.mjs +6 -1
  245. package/dist/protocol/objects/tag.mjs +1 -1
  246. package/dist/protocol/objects/tree.mjs +1 -1
  247. package/dist/protocol/packs/graph.mjs +1 -1
  248. package/dist/protocol/packs/idx.d.mts +1 -1
  249. package/dist/protocol/packs/idx.mjs +1 -1
  250. package/dist/protocol/packs/parts.mjs +1 -1
  251. package/dist/protocol/packs/reader.d.mts +1 -1
  252. package/dist/protocol/packs/reader.mjs +2 -2
  253. package/dist/protocol/packs/write-error.d.mts +1 -1
  254. package/dist/protocol/packs/write-error.mjs +1 -1
  255. package/dist/protocol/packs/writer.mjs +4 -4
  256. package/dist/protocol/wire/advertisement.d.mts +1 -1
  257. package/dist/protocol/wire/advertisement.mjs +1 -1
  258. package/dist/protocol/wire/fetch.d.mts +1 -1
  259. package/dist/protocol/wire/fetch.mjs +1 -1
  260. package/dist/protocol/wire/lines.d.mts +1 -1
  261. package/dist/protocol/wire/lines.mjs +2 -2
  262. package/dist/protocol/wire/push-uploads.mjs +4 -2
  263. package/dist/protocol/wire/receive-pack.d.mts +1 -1
  264. package/dist/protocol/wire/receive-pack.mjs +1 -1
  265. package/dist/protocol/wire/report-status.d.mts +1 -1
  266. package/dist/protocol/wire/report-status.mjs +1 -1
  267. package/dist/protocol/wire/v2.d.mts +2 -2
  268. package/dist/protocol/wire/v2.mjs +2 -2
  269. package/dist/queue/advance.mjs +190 -68
  270. package/dist/queue/callers.mjs +56 -69
  271. package/dist/queue/calls.mjs +10 -11
  272. package/dist/queue/commit.mjs +28 -22
  273. package/dist/queue/host.d.mts +10 -11
  274. package/dist/queue/host.mjs +15 -7
  275. package/dist/queue/lanes.mjs +9 -18
  276. package/dist/queue/layer.d.mts +3 -3
  277. package/dist/queue/layer.mjs +11 -10
  278. package/dist/queue/limits.mjs +17 -5
  279. package/dist/queue/rows.mjs +13 -10
  280. package/dist/queue/schedule.mjs +7 -6
  281. package/dist/queue/search.mjs +11 -17
  282. package/dist/queue/state.mjs +7 -2
  283. package/dist/queue/trim.mjs +10 -5
  284. package/dist/rest/api.d.mts +1 -1
  285. package/dist/rest/blobs.d.mts +20 -20
  286. package/dist/rest/caller.d.mts +22 -20
  287. package/dist/rest/client-namespace.d.mts +2 -0
  288. package/dist/rest/client.d.mts +32 -8
  289. package/dist/rest/client.mjs +314 -388
  290. package/dist/rest/commits.d.mts +284 -284
  291. package/dist/rest/errors.d.mts +10 -10
  292. package/dist/rest/errors.mjs +1 -1
  293. package/dist/rest/events.d.mts +13 -11
  294. package/dist/rest/events.mjs +3 -1
  295. package/dist/rest/files.d.mts +48 -48
  296. package/dist/rest/forks.d.mts +131 -143
  297. package/dist/rest/handler.mjs +4 -3
  298. package/dist/rest/handlers.mjs +15 -8
  299. package/dist/rest/layer.d.mts +3 -3
  300. package/dist/rest/layer.mjs +8 -7
  301. package/dist/rest/listen.d.mts +8 -6
  302. package/dist/rest/listen.mjs +33 -77
  303. package/dist/rest/me.d.mts +18 -20
  304. package/dist/rest/me.mjs +1 -1
  305. package/dist/rest/merges.d.mts +17 -17
  306. package/dist/rest/queue.d.mts +140 -140
  307. package/dist/rest/queue.mjs +1 -1
  308. package/dist/rest/refs.d.mts +214 -214
  309. package/dist/rest/refs.mjs +1 -1
  310. package/dist/rest/repos.d.mts +123 -135
  311. package/dist/rest/tags.d.mts +30 -30
  312. package/dist/rest/tokens.d.mts +250 -260
  313. package/dist/rest/tokens.mjs +10 -42
  314. package/dist/rest/topics.d.mts +162 -162
  315. package/dist/rest/topics.mjs +1 -1
  316. package/dist/rest/trees.d.mts +117 -117
  317. package/dist/rest/wire.d.mts +7 -5
  318. package/dist/rest/wire.mjs +4 -3
  319. package/dist/rest/work.d.mts +69 -69
  320. package/dist/rest/work.mjs +1 -1
  321. package/dist/rest.d.mts +1 -7
  322. package/dist/rest.mjs +1 -5
  323. package/dist/server/check-fetch.mjs +9 -0
  324. package/dist/server/extension.mjs +3 -115
  325. package/dist/server/git-layer.d.mts +30 -5
  326. package/dist/server/git-layer.mjs +59 -29
  327. package/dist/server/git-namespace.d.mts +4 -4
  328. package/dist/server/git-namespace.mjs +6 -4
  329. package/dist/server/joined.d.mts +83 -0
  330. package/dist/server/joined.mjs +91 -0
  331. package/dist/server/registry.d.mts +7 -3
  332. package/dist/server/registry.mjs +135 -31
  333. package/dist/server/server.d.mts +9 -3
  334. package/dist/server/server.mjs +277 -208
  335. package/dist/signin/context.d.mts +2 -2
  336. package/dist/signin/context.mjs +28 -37
  337. package/dist/signin/device.mjs +5 -5
  338. package/dist/signin/forms.mjs +1 -1
  339. package/dist/signin/grants.d.mts +2 -3
  340. package/dist/signin/grants.mjs +5 -5
  341. package/dist/signin/layer.d.mts +9 -0
  342. package/dist/signin/layer.mjs +41 -0
  343. package/dist/signin/namespace.d.mts +2 -0
  344. package/dist/signin/public.d.mts +6 -0
  345. package/dist/signin/public.mjs +5 -0
  346. package/dist/signin/route.mjs +47 -21
  347. package/dist/signin/web.mjs +3 -3
  348. package/dist/signin/wire.mjs +1 -1
  349. package/dist/storage/calls.d.mts +1 -1
  350. package/dist/storage/calls.mjs +4 -4
  351. package/dist/storage/clean-up.mjs +15 -6
  352. package/dist/storage/counted-bucket.mjs +34 -51
  353. package/dist/storage/fetch.mjs +1 -1
  354. package/dist/storage/fsck.mjs +12 -2
  355. package/dist/storage/graph-rebuild.mjs +262 -0
  356. package/dist/storage/host-bucket.mjs +1 -1
  357. package/dist/storage/index-build.d.mts +2 -2
  358. package/dist/storage/index-build.mjs +103 -15
  359. package/dist/storage/index-fetch.mjs +10 -6
  360. package/dist/storage/index-graph.mjs +1 -1
  361. package/dist/storage/index-layers.mjs +1 -1
  362. package/dist/storage/index-visible.mjs +1 -1
  363. package/dist/storage/lfs-pointers.d.mts +5 -5
  364. package/dist/storage/lfs-pointers.mjs +37 -11
  365. package/dist/storage/loose.mjs +4 -1
  366. package/dist/storage/memory-budget.mjs +8 -2
  367. package/dist/storage/merge-cut.mjs +24 -1
  368. package/dist/storage/merge-fence.mjs +82 -20
  369. package/dist/storage/merge-most.mjs +1 -0
  370. package/dist/storage/merge-plan.mjs +5 -2
  371. package/dist/storage/merge-row.mjs +17 -5
  372. package/dist/storage/merge-stream.mjs +25 -13
  373. package/dist/storage/merge-write.mjs +1 -1
  374. package/dist/storage/merge.d.mts +2 -2
  375. package/dist/storage/merge.mjs +1 -1
  376. package/dist/storage/object-rows.d.mts +2 -2
  377. package/dist/storage/object-rows.mjs +20 -4
  378. package/dist/storage/pack-ranges.d.mts +3 -1
  379. package/dist/storage/pack-ranges.mjs +168 -69
  380. package/dist/storage/pack-reads.mjs +4 -4
  381. package/dist/storage/pack-receive.d.mts +1 -1
  382. package/dist/storage/pack-receive.mjs +17 -15
  383. package/dist/storage/packs.d.mts +1 -1
  384. package/dist/storage/packs.mjs +103 -79
  385. package/dist/storage/placed-reads.mjs +81 -15
  386. package/dist/storage/prune-seen.mjs +126 -0
  387. package/dist/storage/prune-walk.mjs +87 -99
  388. package/dist/storage/prune.mjs +113 -50
  389. package/dist/storage/push-uploads.mjs +4 -2
  390. package/dist/storage/quarantine.d.mts +2 -2
  391. package/dist/storage/ready.d.mts +2 -2
  392. package/dist/storage/ready.mjs +15 -6
  393. package/dist/storage/receive-files.mjs +1 -1
  394. package/dist/storage/receive-links.mjs +1 -1
  395. package/dist/storage/receive-state.d.mts +2 -2
  396. package/dist/storage/receive-state.mjs +2 -2
  397. package/dist/storage/receive-steps.mjs +1 -1
  398. package/dist/storage/repack-contained.mjs +24 -16
  399. package/dist/storage/repack-job.d.mts +2 -2
  400. package/dist/storage/repack-job.mjs +5 -4
  401. package/dist/storage/repack.d.mts +2 -2
  402. package/dist/storage/repack.mjs +12 -5
  403. package/dist/storage/rows.d.mts +2 -2
  404. package/dist/storage/rows.mjs +1 -1
  405. package/dist/storage/runs.d.mts +2 -2
  406. package/dist/storage/runs.mjs +15 -6
  407. package/dist/storage/send-list.mjs +6 -6
  408. package/dist/storage/single-flight.mjs +2 -2
  409. package/dist/storage/swap-walk.mjs +1 -1
  410. package/dist/storage/unpack.mjs +8 -1
  411. package/dist/store/call-count.d.mts +24 -4
  412. package/dist/store/call-count.mjs +158 -44
  413. package/dist/store/catalogue.d.mts +1 -1
  414. package/dist/store/catalogue.mjs +2 -2
  415. package/dist/store/crossing.mjs +2 -6
  416. package/dist/store/cursor-seal.mjs +1 -1
  417. package/dist/store/errors.d.mts +7 -3
  418. package/dist/store/errors.mjs +41 -13
  419. package/dist/store/job-try.mjs +119 -15
  420. package/dist/store/list-job.mjs +5 -5
  421. package/dist/store/outbox.d.mts +2 -2
  422. package/dist/store/outbox.mjs +75 -16
  423. package/dist/store/promises.d.mts +2 -2
  424. package/dist/store/promises.mjs +31 -6
  425. package/dist/store/queue-jobs.mjs +1 -1
  426. package/dist/store/records.d.mts +2 -2
  427. package/dist/store/records.mjs +22 -24
  428. package/dist/store/ref-rows.d.mts +2 -2
  429. package/dist/store/ref-rows.mjs +6 -6
  430. package/dist/store/repo-record.mjs +29 -12
  431. package/dist/store/reservations.mjs +35 -8
  432. package/dist/store/scopes.mjs +12 -5
  433. package/dist/store/topic-jobs.mjs +8 -8
  434. package/dist/sync/bound.d.mts +1 -3
  435. package/dist/sync/bound.mjs +30 -42
  436. package/dist/sync/github.d.mts +5 -6
  437. package/dist/sync/github.mjs +37 -42
  438. package/dist/sync/http.mjs +15 -0
  439. package/dist/sync/import.mjs +30 -19
  440. package/dist/sync/layer.d.mts +13 -0
  441. package/dist/sync/layer.mjs +73 -0
  442. package/dist/sync/mirror.mjs +137 -58
  443. package/dist/sync/publish.mjs +3 -6
  444. package/dist/sync/step.mjs +223 -85
  445. package/dist/sync/tries.mjs +22 -15
  446. package/dist/sync.d.mts +3 -6
  447. package/dist/sync.mjs +3 -6
  448. package/dist/topics/advance.mjs +210 -94
  449. package/dist/topics/calls.mjs +8 -8
  450. package/dist/topics/directory.mjs +35 -12
  451. package/dist/topics/host.d.mts +5 -8
  452. package/dist/topics/host.mjs +42 -19
  453. package/dist/topics/layer.d.mts +381 -0
  454. package/dist/topics/layer.mjs +62 -0
  455. package/dist/topics/members.mjs +39 -10
  456. package/dist/topics/namespace.d.mts +2 -0
  457. package/dist/topics/public.d.mts +6 -0
  458. package/dist/topics/public.mjs +13 -0
  459. package/dist/topics/rows.mjs +12 -3
  460. package/dist/topics/topic.mjs +11 -10
  461. package/package.json +8 -13
  462. package/dist/access.d.mts +0 -2
  463. package/dist/access.mjs +0 -1
  464. package/dist/core/hooks/post-receive.mjs +0 -216
  465. package/dist/core/hooks/pre-receive.d.mts +0 -12
  466. package/dist/core/hooks/pre-receive.mjs +0 -36
  467. package/dist/engine/merge-base-walk.d.mts +0 -3
  468. package/dist/server/extension.d.mts +0 -21
  469. package/dist/server/routes.d.mts +0 -32
  470. package/dist/server/routes.mjs +0 -69
  471. package/dist/sync/import.d.mts +0 -10
  472. package/dist/sync/jobs.d.mts +0 -9
  473. package/dist/sync/jobs.mjs +0 -75
  474. package/dist/sync/mirror.d.mts +0 -13
  475. package/dist/sync/publish.d.mts +0 -6
  476. /package/dist/core/{claim-rows.d.mts → registered-rows.d.mts} +0 -0
@@ -1,13 +1,11 @@
1
- import { gitError } from "../contracts/result.mjs";
2
- import { tryUnlessSpent } from "../contracts/calls-spent.mjs";
3
1
  import { routeEdge } from "../store/errors.mjs";
4
- import { moved, notFound, refusal, requestType, told } from "./answers.mjs";
2
+ import { moved, refusal, requestType, told } from "./answers.mjs";
5
3
  import { lfsAnswer, lfsRefusal } from "../lfs/wire.mjs";
6
4
  import { gitUrlOf, infoRefsPath, isGitService, normalBase } from "./paths.mjs";
7
5
  import { receivePack, receivePackRefs, routeCounted } from "./receive-pack.mjs";
8
6
  import { uploadPack, uploadPackRefs } from "./upload-pack.mjs";
9
- import * as Effect from "effect/Effect";
10
7
  import * as Clock$1 from "effect/Clock";
8
+ import * as Effect from "effect/Effect";
11
9
  // src/http/handler.ts
12
10
  const gitHttp = (parts) => {
13
11
  const base = normalBase(parts.basePath);
@@ -15,11 +13,11 @@ const gitHttp = (parts) => {
15
13
  const url = new URL(request.url);
16
14
  const git = gitUrlOf(url, base);
17
15
  if (git === void 0) return Effect.succeed(void 0);
18
- if (git.kind === "lfs") return lfsRoute(parts, git, url, request);
19
- if (git.kind === "push-upload") return uploadRoute(parts, git, url, request);
16
+ if (git.kind === "lfs") return lfsRoute(parts, git, request);
17
+ if (git.kind === "push-upload") return uploadRoute(parts, git, request);
20
18
  const malformed = malformedRequest(git, request);
21
19
  if (malformed !== void 0) return Effect.succeed(malformed);
22
- return answer(parts, base, git, url, request);
20
+ return answer(parts, base, git, request);
23
21
  } };
24
22
  };
25
23
  /**
@@ -28,12 +26,11 @@ const gitHttp = (parts) => {
28
26
  */
29
27
  const lfsOff = "This server has no Git LFS: its host turns it on";
30
28
  /** A request to Git LFS's API: its refusals are LFS's JSON, as git-lfs reads them. */
31
- const lfsRoute = /* @__PURE__ */ Effect.fnUntraced(function* (parts, git, url, request) {
29
+ const lfsRoute = /* @__PURE__ */ Effect.fnUntraced(function* (parts, git, request) {
32
30
  const lfs = parts.lfs();
33
31
  if (lfs === void 0) return lfsAnswer(404, { message: lfsOff });
34
32
  const caller = yield* parts.identify(request);
35
- const repo = yield* repoOf(parts, git, url, caller);
36
- if (repo === void 0) return lfsAnswer(404, { message: "Repository not found" });
33
+ const repo = git.path;
37
34
  return yield* routeCounted(parts, lfs({
38
35
  caller,
39
36
  repo,
@@ -43,13 +40,12 @@ const lfsRoute = /* @__PURE__ */ Effect.fnUntraced(function* (parts, git, url, r
43
40
  }));
44
41
  }, (route) => routeEdge(route, lfsRefusal));
45
42
  /** A large push's upload: its refusals are a push's, as `git-remote-ref0` reads them. */
46
- const uploadRoute = /* @__PURE__ */ Effect.fnUntraced(function* (parts, git, url, request) {
43
+ const uploadRoute = /* @__PURE__ */ Effect.fnUntraced(function* (parts, git, request) {
47
44
  const uploads = parts.uploads();
48
45
  if (uploads === void 0) return told(404, "This server takes no push uploads");
49
46
  if (request.method !== "POST") return told(405, "Method not allowed", { allow: "POST" });
50
47
  const caller = yield* parts.identify(request);
51
- const repo = yield* repoOf(parts, git, url, caller);
52
- if (repo === void 0) return notFound();
48
+ const repo = git.path;
53
49
  return yield* uploads.serve(parts, {
54
50
  caller,
55
51
  repo,
@@ -66,33 +62,17 @@ const malformedRequest = (git, request) => {
66
62
  if (request.method !== "POST") return told(405, "Method not allowed", { allow: "POST" });
67
63
  return (request.headers.get("content-type") ?? "").split(";")[0]?.trim().toLowerCase() === requestType(git.service) ? void 0 : told(415, "Unsupported media type");
68
64
  };
69
- /**
70
- * The repo `git` names for `caller`: the host's `resolve`, or the path itself. Its signal aborts
71
- * when the request does or the server closes.
72
- */
73
- const repoOf = (parts, git, url, caller) => {
74
- const { resolve } = parts;
75
- if (resolve === void 0) return Effect.succeed(git.path);
76
- return tryUnlessSpent(async (signal) => resolve({
77
- actor: caller.actor,
78
- url,
79
- path: git.path,
80
- signal
81
- }), (cause) => gitError("INTERNAL", "The host's resolve failed", { cause }));
82
- };
83
- const answer = /* @__PURE__ */ Effect.fnUntraced(function* (parts, base, git, url, request) {
65
+ const answer = /* @__PURE__ */ Effect.fnUntraced(function* (parts, base, git, request) {
84
66
  const started = yield* Clock$1.currentTimeMillis;
85
67
  const caller = yield* parts.identify(request);
86
- const repo = yield* repoOf(parts, git, url, caller);
87
- if (repo === void 0) return notFound();
88
- return yield* serve(parts, base, git, caller, repo, request, started);
68
+ return yield* serve(parts, base, git, caller, git.path, request, started);
89
69
  }, (route, _parts, _base, git) => routeEdge(route, (error) => refusal(error, git.service === "git-receive-pack")));
90
70
  /** A refusal a repo that isn't there gets, which a renamed repo's old name may answer instead. */
91
71
  const isMissing = (error) => error.code === "NOT_FOUND" || error.code === "UNAUTHENTICATED" || error.code === "NOT_ALLOWED";
92
72
  const serve = (parts, base, git, caller, repo, request, started) => {
93
73
  if (git.kind === "info-refs") {
94
74
  const { service, dotGit } = git;
95
- const missing = (error) => parts.resolve !== void 0 || !isMissing(error) || !isGitService(service) ? Effect.fail(error) : Effect.flatMap(parts.renamedTo(caller, repo), (renamed) => renamed === void 0 ? Effect.fail(error) : Effect.succeed(moved(infoRefsPath(base, renamed, dotGit, service))));
75
+ const missing = (error) => !isMissing(error) || !isGitService(service) ? Effect.fail(error) : Effect.flatMap(parts.renamedTo(caller, repo), (renamed) => renamed === void 0 ? Effect.fail(error) : Effect.succeed(moved(infoRefsPath(base, renamed, dotGit, service))));
96
76
  return git.service === "git-receive-pack" ? receivePackRefs(parts, caller, repo, missing) : uploadPackRefs(parts, caller, repo, request, started, missing);
97
77
  }
98
78
  return git.service === "git-receive-pack" ? receivePack(parts, caller, repo, request) : uploadPack(parts, caller, repo, request, started);
@@ -3,8 +3,8 @@ import "../contracts/ids.mjs";
3
3
  import "../contracts/objects.mjs";
4
4
  import "../contracts/refs.mjs";
5
5
  import "../contracts/result.mjs";
6
- import "../contracts/server.mjs";
7
6
  import "../auth/identify.mjs";
7
+ import "../core/access.mjs";
8
8
  import "../store/call-count.mjs";
9
9
  import "../protocol/wire/advertisement.mjs";
10
10
  import "../protocol/wire/lines.mjs";
@@ -13,9 +13,9 @@ import { newChangeId, repoScope } from "../store/scopes.mjs";
13
13
  import { gitAnswer, resultType } from "./answers.mjs";
14
14
  import { brokenBody, plainBody, readWhole as readWhole$1 } from "./bodies.mjs";
15
15
  import { refusalLog, reportOf, routeCounted, thrownLog } from "./receive-pack.mjs";
16
- import * as Schema from "effect/Schema";
17
- import * as Effect from "effect/Effect";
18
16
  import * as Clock$1 from "effect/Clock";
17
+ import * as Effect from "effect/Effect";
18
+ import * as Schema from "effect/Schema";
19
19
  import * as Result from "effect/Result";
20
20
  // src/http/push-uploads.ts
21
21
  /** A begin's or complete's JSON: at most 1 MiB. */
@@ -91,6 +91,7 @@ const begin = /* @__PURE__ */ Effect.fnUntraced(function* (uploads, call) {
91
91
  pushOptions: body.pushOptions ?? [],
92
92
  atomic: body.atomic ?? false,
93
93
  reasons: body.reasons ?? false,
94
+ shallow: body.shallow ?? [],
94
95
  expiresAt,
95
96
  removeAt,
96
97
  state: "open"
@@ -179,11 +180,11 @@ const objectsOf = /* @__PURE__ */ Effect.fnUntraced(function* (bucket, key) {
179
180
  return header.getUint32(0) === 1346454347 ? header.getUint32(8) : void 0;
180
181
  });
181
182
  /**
182
- * The push start complete answers for: what the upload's begin named, on side-band-64k, with
183
- * `atomic` and `ref0-push-reasons` when it asked for them.
183
+ * The push start complete answers for: what the upload's begin named, its shallow lines among
184
+ * them, on side-band-64k, with `atomic` and `ref0-push-reasons` when it asked for them.
184
185
  */
185
186
  const startOf = (row) => ({
186
- shallow: [],
187
+ shallow: row.shallow,
187
188
  commands: row.updates.map((update) => ({
188
189
  ref: update.ref,
189
190
  before: update.from ?? zero,
@@ -259,6 +260,7 @@ const pushStaged = /* @__PURE__ */ Effect.fnUntraced(function* ({ bucket, upload
259
260
  },
260
261
  signal: request.signal
261
262
  };
263
+ if (row.shallow.length > 0) input.shallow = row.shallow;
262
264
  return yield* Effect.result(push(input));
263
265
  });
264
266
  /**
@@ -13,11 +13,11 @@ import { pushUploadMost } from "../storage/push-uploads.mjs";
13
13
  import { advertisementType, gitAnswer, hintLines, resultType } from "./answers.mjs";
14
14
  import { brokenBody, drainLimit, plainBody, plainLength, pushStartLimit, readStart, receiveKeepAliveMs } from "./bodies.mjs";
15
15
  import * as Effect from "effect/Effect";
16
- import * as Predicate from "effect/Predicate";
17
- import * as Result from "effect/Result";
16
+ import * as Option from "effect/Option";
18
17
  import * as Cause from "effect/Cause";
19
18
  import * as Exit from "effect/Exit";
20
- import * as Option from "effect/Option";
19
+ import * as Result from "effect/Result";
20
+ import * as Predicate from "effect/Predicate";
21
21
  import * as Fiber from "effect/Fiber";
22
22
  // src/http/receive-pack.ts
23
23
  /**
@@ -12,12 +12,12 @@ 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 Effect from "effect/Effect";
16
- import * as Predicate from "effect/Predicate";
17
15
  import * as Clock$1 from "effect/Clock";
18
- import * as Result from "effect/Result";
16
+ import * as Effect from "effect/Effect";
19
17
  import * as Cause from "effect/Cause";
20
18
  import * as Exit from "effect/Exit";
19
+ import * as Result from "effect/Result";
20
+ import * as Predicate from "effect/Predicate";
21
21
  import * as Stream from "effect/Stream";
22
22
  // src/http/upload-pack.ts
23
23
  /**
@@ -106,8 +106,9 @@ const listingBody = (lines, next, refused, deadline, request) => Effect.suspend(
106
106
  const uploadPackRefs = (parts, caller, repo, request, started, missing) => {
107
107
  const deadline = parts.maxDuration === void 0 ? void 0 : deadlineOf(started, parts.maxDuration);
108
108
  const answered = Effect.gen(function* () {
109
- const open = yield* parts.fetchOpen(caller, repo);
110
- if (asksV2(request)) return gitAnswer(advertisementType(service), yield* encodeV2Capabilities(v2Capabilities(parts.agent)));
109
+ const v2 = asksV2(request);
110
+ const open = yield* parts.fetchOpen(caller, repo, v2 ? "skip" : "read");
111
+ if (v2) return gitAnswer(advertisementType(service), yield* encodeV2Capabilities(v2Capabilities(parts.agent)));
111
112
  const listed = yield* open.lists;
112
113
  const capabilities = uploadPackCapabilities(servedHead(listed), parts.agent);
113
114
  const body = yield* listingBody(advertisementPages(service, listed, capabilities, listed.hidden), listed.next, (message) => encodeRefusedAdvertisement(service, message), deadline, request);
package/dist/index.d.mts CHANGED
@@ -1,42 +1,50 @@
1
1
  import { Actor, ActorId, ActorInput, AnonymousActor, AuthInput, AuthorizeAnswer, AuthorizeInput, CallInput, Caller, CallerGrant, Credentials, CredentialsBasic, CredentialsBearer, GitAuth, GitAuthorize, NamedActor, RepoAccess, WriteInput } from "./contracts/actors.mjs";
2
2
  import { AccessOption, HiddenSpan, RefAudience, RefView } from "./contracts/access.mjs";
3
3
  import { Acting, Blob, BlobCalls, BlobCreateInput, CreatedObject, ObjectInput, blobs_d_exports } from "./contracts/blobs.mjs";
4
- import { ClientAdapter, ClientFetchInput, ClientFetchResult, ClientPushInput, GitClient, GitClientOptions, Localize, PagedInput, RefForced, RemoteRefsInput } from "./contracts/client.mjs";
5
- import { createGitClient, paginate } from "./client/client.mjs";
4
+ import { ClientAdapter, ClientFetchInput, ClientFetchResult, ClientPushInput, GitClientCalls, GitClientOptions, Localize, PagedInput, RefForced, RemoteRefsInput } from "./contracts/client.mjs";
5
+ import "./client/namespace.mjs";
6
+ import "./rest/client-namespace.mjs";
7
+ import { RestClientCalls, RestTokenCalls, client_d_exports as client_d_exports$1 } from "./rest/client.mjs";
8
+ import { ListenInput, RestEvents } from "./rest/listen.mjs";
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";
6
11
  import "./contracts/namespaces.mjs";
7
12
  import "./server/namespaces.mjs";
8
13
  import "./core/namespaces.mjs";
14
+ import { git_events_d_exports } from "./contracts/git-events.mjs";
9
15
  import "./auth/namespaces.mjs";
10
16
  import "./event-streams/namespace.mjs";
11
17
  import "./rest/namespace.mjs";
12
18
  import "./merges/namespace.mjs";
19
+ import { authorize_d_exports } from "./contracts/authorize.mjs";
13
20
  import "./queue/namespace.mjs";
14
21
  import "./lfs/namespace.mjs";
15
- import { mergeQueue } from "./queue/host.mjs";
22
+ import { QueueInternals, mergeQueue } from "./queue/host.mjs";
16
23
  import { CommitCalls, CommitCreateInput, CommitDiffInput, Compare, CompareInput, ComparisonFile, LineCounts, LogInput, RefPublication, Revision, commits_d_exports } from "./contracts/commits.mjs";
17
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";
18
- import { BeforeAfter, CandidateClosed, CandidateClosedFields, CandidateOpened, CandidateReported, EntryAdded, EntryFailed, EntryMerged, EntryRemoved, EntryRetried, EventDelivery, EventEnvelope, EventFeature, EventsHandler, EventsInput, FeedItem, FenceReason, FencedPack, GitEvent, HoldEvent, HoldEventFields, IndexRefusal, QueueEvent, QueueRestarted, RefPush, RefUpdated, RepoCreated, RepoDeletedEvent, RepoEnvelope, RepoEvent, RepoIndexRefused, RepoJobFailed, RepoMaintained, RepoRenamed, RepoVisibilityChanged, RepoWorkFailed, TokenEvent, TokenEventFields, TopicAdded, TopicEnvelope, TopicEvent, TopicFailed, TopicMerged, TopicOpened, TopicRemoved, TopicReported, TopicWorkFailed, events_d_exports } from "./contracts/events.mjs";
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, RepoRenamed, RepoVisibilityChanged, RepoWorkFailed, TokenEvent, TokenEventFields, TopicAdded, TopicEnvelope, TopicEvent, TopicFailed, TopicMerged, TopicOpened, TopicRemoved, TopicReported, TopicWorkFailed, events_d_exports } from "./contracts/events.mjs";
19
26
  import { File, FileCalls, FileDiff, FileReadInput, FilesDiffInput, FilesListInput, FilesRead, files_d_exports } from "./contracts/files.mjs";
20
27
  import { ForkCalls, ForkCreateInput, ForkFetched, ForkGetInput, ForkHolder, ForkListInput, forks_d_exports } from "./contracts/forks.mjs";
21
- import { LfsCalls, LfsFeature, LfsGetInput, LfsObject } from "./contracts/lfs.mjs";
28
+ import { LfsCalls, LfsFeature, LfsGetInput, LfsObject, LfsOptions } from "./contracts/lfs.mjs";
29
+ import { repo_records_d_exports } from "./contracts/repo-records.mjs";
22
30
  import { MergeAnswer, MergeCalls, MergeCreateInput } from "./contracts/merges.mjs";
23
31
  import { HandlerOptions, SavedHandlerOptions } from "./contracts/handlers.mjs";
24
32
  import { Grant, GrantAgainInput, GrantAgainRequest, GrantInput, GrantReachInput, GrantResolver } from "./contracts/grants.mjs";
25
- import { GitScope, InternalRepoId, Oid, RefName, RepoName, TopicId, isInternalId } from "./contracts/ids.mjs";
26
- import { authorize_d_exports } from "./contracts/authorize.mjs";
27
- 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, ShareInput, StageInput, Staged, StepAnswer, StepInput, WholeObject } from "./contracts/objects.mjs";
33
+ import { GitScope, InternalRepoId, Oid, RefName, RepoName, TopicId, isInternalId, maxActorIdLength, maxRefNameLength } from "./contracts/ids.mjs";
34
+ 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";
28
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
+ import { client_d_exports } from "./client/client.mjs";
29
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";
30
- import { repo_records_d_exports } from "./contracts/repo-records.mjs";
38
+ import { RepoStreamEvent } from "./rest/wire.mjs";
31
39
  import { Ref, RefCalls, RefCount, RefCountInput, RefEdit, RefInput, RefListInput, RefProtection, RefSource, RefUpdate, RefUpdateKind, RefsUpdateInput, RefsUpdated, refs_d_exports } from "./contracts/refs.mjs";
32
- import { BasicCredential, BearerCredential, ClientCredential, ClientCredentials, CredentialInput, RemoteCalls, RemoteOptions, TransportFailure, TransportRetry, WithoutActor } from "./contracts/remote.mjs";
33
- import { PinnedRepo, RepoCalls, RepoCatalogueEntry, RepoCreateInput, RepoDeleted, RepoIndexHold, RepoInfo, RepoInput, RepoListInput, RepoListOrder, RepoRecord, RepoRenameInput, RepoStats, RepoUpdateInput, RepoWork, repos_d_exports } from "./contracts/repos.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";
34
42
  import { PeelInput, Peeled, TagCalls, TagCreateInput, peelMost, peelTagsMost, tags_d_exports } from "./contracts/tags.mjs";
35
- import { Prepare, PrepareInput, Topic, TopicAddInput, TopicCalls, TopicCandidate, TopicEntry, TopicEntryInput, TopicFailure, TopicFailureReason, TopicListInput, TopicMergedEntry, TopicReportInput, TopicReportOptions, TopicReportQuestion, TopicState, TopicTarget, TopicWait, TopicsFactory, TopicsOptions } from "./contracts/topics.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";
44
+ import { policy_d_exports } from "./auth/policy.mjs";
36
45
  import { TreeCalls, TreeCreateInput, TreeEdit, TreeEntry, TreeInput, trees_d_exports } from "./contracts/trees.mjs";
37
- import { auth_d_exports } from "./auth/auth.mjs";
46
+ import { event_streams_d_exports } from "./event-streams/event-streams.mjs";
38
47
  import { BlobLimit, BlobNone, Bytes, FetchRequest, Filter, LfsPointers, ObjectType, ReadLimits, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
39
- import { policy_d_exports } from "./auth/policy.mjs";
40
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";
41
49
  import { SliceRefusal } from "./client/slice-push.mjs";
42
50
  import { gitPathOf } from "./http/paths.mjs";
@@ -48,23 +56,35 @@ import { topics } from "./topics/host.mjs";
48
56
  import { lfsPointerOid, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
49
57
  import { LfsPointersBuilder, lfsPointers } from "./storage/lfs-pointers.mjs";
50
58
  import { objects_namespace_d_exports } from "./core/objects/objects-namespace.mjs";
59
+ import { saved_callers_public_d_exports } from "./core/saved-callers-public.mjs";
51
60
  import { loose, looseLimits } from "./storage/loose.mjs";
61
+ import { auth_namespace_d_exports } from "./auth/auth-namespace.mjs";
52
62
  import { PacksOptions, UnpackOptions, packs } from "./storage/packs.mjs";
53
- import { event_streams_d_exports } from "./event-streams/event-streams.mjs";
54
63
  import { PacksMemory, packsMemory } from "./storage/packs-memory.mjs";
55
64
  import { layer_d_exports } from "./rest/layer.mjs";
56
65
  import { Option, RepackOptions } from "./storage/repack.mjs";
57
- import { public_d_exports as public_d_exports$2 } from "./merges/public.mjs";
66
+ import { public_d_exports as public_d_exports$3 } from "./merges/public.mjs";
58
67
  import "./core/rules/namespace.mjs";
59
- import { public_d_exports as public_d_exports$1 } from "./queue/public.mjs";
60
- import { FetchAdjustment, FetchRule, FetchRuleInput, FileRuleOptions, GitHooks, PostReceive, PostReceiveInput, PreReceive, ProtectOptions, PushContext, PushFacts, PushHookInput, PushRule, PushRuleInput, RefPatterns, RuleOperation } from "./contracts/rules.mjs";
61
- import { public_d_exports } from "./lfs/public.mjs";
68
+ import { public_d_exports as public_d_exports$2 } from "./queue/public.mjs";
69
+ import { FetchAdjustment, FetchReadInput, FetchReadTarget, FetchRule, FetchRuleInput, FileRuleOptions, ProtectOptions, PushContext, PushFacts, PushRule, PushRuleInput, RefPatterns, RuleOperation } from "./contracts/rules.mjs";
70
+ import { public_d_exports as public_d_exports$1 } from "./lfs/public.mjs";
62
71
  import { BeginPushUpload, FinishPushUpload, PushOptions, PushUploadOptions, PushUploadPart, PushUploadStarted } from "./contracts/push-uploads.mjs";
63
- import { BoundAdapter, ExtendedGit, GitAdapter, GitExtension, GitNeeds, GitRequest, GitServer, GitServerOptions, HostFunctionFailure, ProvidedBy, Refusal, Resolve, ResolveInput, ServerCalls, ServerSetup } from "./contracts/server.mjs";
72
+ import { GitAdapter, GitNeeds, GitServer, GitServerOptions, ProvidedBy, ServerCalls, ServerSetup } from "./contracts/server.mjs";
64
73
  import { ImportState } from "./contracts/sync.mjs";
65
- import { ApprovalBase, ApprovalDecision, ApprovalPageContext, ApprovalPageInput, ApprovalPrompt, ApprovedGrant, ConfirmApprovalPage, DeniedGrant, DeviceApproval, DeviceCodePage, DeviceCodeRequest, DeviceCodeResponse, DeviceExchange, GitSignInOptions, OAuthClient, OAuthError, OAuthTokenResponse, WebApproval, WebAuthorize, WebExchange } from "./contracts/signin.mjs";
74
+ import { ApprovalBase, ApprovalDecision, ApprovalPageContext, ApprovalPageInput, ApprovalPrompt, ApprovedGrant, ConfirmApprovalPage, DeniedGrant, DeviceApproval, DeviceCodePage, DeviceCodeRequest, DeviceCodeResponse, DeviceExchange, OAuthClient, OAuthError, OAuthTokenResponse, WebApproval, WebAuthorize, WebExchange } from "./contracts/signin.mjs";
66
75
  import { GitStore, GitStoreAddInput, GitStoreCommitInput, GitStoreReadInput, HeldPack, Holding, Listed, ListedInput, Pack } from "./contracts/store.mjs";
67
- import { CreatedToken, PrefixTarget, TokenCalls, TokenCoverage, TokenCreateInput, TokenFields, TokenId, TokenInfo, TokenListInput, TokenRecord, TokenScope, TokenState, TokenTarget, TokensFeature, TrustedWriteInput, VerifiedToken, tokens_d_exports } from "./contracts/tokens.mjs";
68
- import { rules_d_exports } from "./core/rules/rules.mjs";
69
76
  import { WorkCalls, WorkItem, WorkListInput, WorkWriteInput, work_d_exports } from "./contracts/work.mjs";
70
- 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_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 BoundAdapter, 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 EventDelivery, type EventEnvelope, type EventFeature, event_streams_d_exports as EventStreams, events_d_exports as Events, type EventsHandler, type EventsInput, ExistingContext, ExistingReason, type ExtendedGit, type FailureResult, type FeedItem, type FenceReason, type FencedPack, type FetchAdjustment, type FetchAnswer, 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, type GitClient, type GitClientOptions, type GitError, GitErrorBody, type GitErrorCode, type GitErrorContexts, type GitErrorFields, type GitErrorInput, type GitErrorTagged, type GitEvent, type GitExtension, type GitHooks, type GitNeeds, type GitObject, type GitObjects, type GitRequest, type GitScope, type GitServer, type GitServerOptions, type GitSignInOptions, type GitStore, type GitStoreAddInput, type GitStoreCommitInput, type GitStoreReadInput, type Grant, type GrantAgainInput, type GrantAgainRequest, type GrantInput, type GrantReachInput, type GrantResolver, 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 HostFunctionFailure, 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 as Lfs, type LfsCalls, type LfsFeature, type LfsGetInput, type LfsObject, type LfsPointers, type LfsPointersBuilder, type LineCounts, type LinkedObjects, type Listed, type ListedInput, type Localize, type LogInput, type MaintainInput, type MeOperation, type MergeAnswer, type MergeBaseInput, type MergeBases, type MergeCalls, type MergeCreateInput, type MergeInput, type MergeLabels, type MergeMethod, type MergePlan, public_d_exports$1 as MergeQueue, type MergeQueueCalls, type MergeQueueLayerOptions, type MergeQueueOptions, type MergeTree, public_d_exports$2 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, type PostReceive, type PostReceiveInput, type PreReceive, PreconditionContext, PreconditionReason, type PrefixTarget, type Prepare, type PrepareInput, type PreviousQueueSchedule, 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 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 Refusal, 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 RepoIndexHold, type RepoIndexRefused, type RepoInfo, type RepoInput, type RepoJobFailed, type RepoListInput, type RepoListOperation, type RepoListOrder, type RepoMaintained, type RepoName, type RepoOperation, type RepoRecord, repo_records_d_exports as RepoRecords, type RepoRenameInput, type RepoRenamed, type RepoStats, type RepoUpdateInput, type RepoVisibilityChanged, type RepoWork, type RepoWorkFailed, type Report, type ReportDetails, type ReportOptions, type ReportResult, type Reported, repos_d_exports as Repos, type Resolve, type ResolveInput, ResourceContext, ResourceReason, layer_d_exports as Rest, type RestartResult, type Restarted, type Result, type Retried, type RetryResult, type Revision, type RuleOperation, rules_d_exports as Rules, type SavedHandlerOptions, type ScheduleOption, type ServerCalls, type ServerSetup, type ShareInput, 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_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, type TopicsFactory, type TopicsOptions, 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, work_d_exports as Work, type WorkCalls, type WorkItem, type WorkListInput, type WorkOperation, type WorkWriteInput, type WriteInput, accept, allotmentWithin, branchRef, createGitClient, createGitServer, gitError, gitPathOf, httpStatus, isGitError, isInternalId, isRefusalReason, lfs, lfsPointerOid, lfsPointers, loose, looseLimits, maxLfsPointerBytes, mergeQueue, objectsReadMost, packs, packsMemory, paginate, peelMost, peelTagsMost, reject, shortTarget, topics };
77
+ import { rules_d_exports } from "./core/rules/rules.mjs";
78
+ import "./access/namespace.mjs";
79
+ import { public_d_exports as public_d_exports$4 } from "./access/public.mjs";
80
+ import "./topics/namespace.mjs";
81
+ import { public_d_exports as public_d_exports$6 } from "./topics/public.mjs";
82
+ import "./auth/tokens-namespace.mjs";
83
+ import { tokens_public_d_exports } from "./auth/tokens-public.mjs";
84
+ import "./core/hooks/namespace.mjs";
85
+ import { public_d_exports } from "./core/hooks/public.mjs";
86
+ import { PushHookInput } from "./contracts/git-hooks.mjs";
87
+ import { public_d_exports as public_d_exports$5 } from "./signin/public.mjs";
88
+ import "./signin/namespace.mjs";
89
+ 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 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, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, mergeQueue, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, reject, shortTarget, tokenScopes, tokenStates, topics };
package/dist/index.mjs CHANGED
@@ -1,28 +1,31 @@
1
- import { createGitClient, paginate } from "./client/client.mjs";
1
+ import { client_exports } from "./client/client.mjs";
2
+ import { client_exports as client_exports$1 } from "./rest/client.mjs";
3
+ import { grantScopes, tokenScopes, tokenStates } from "./contracts/tokens.mjs";
2
4
  import { authorize_exports } from "./contracts/authorize.mjs";
3
5
  import { blobs_exports } from "./contracts/blobs.mjs";
4
6
  import { commits_exports } from "./contracts/commits.mjs";
5
7
  import { events_exports } from "./contracts/events.mjs";
6
8
  import { files_exports } from "./contracts/files.mjs";
7
9
  import { forks_exports } from "./contracts/forks.mjs";
10
+ import { git_events_exports } from "./contracts/git-events.mjs";
8
11
  import { refs_exports } from "./contracts/refs.mjs";
9
12
  import { repo_records_exports } from "./contracts/repo-records.mjs";
10
13
  import { repos_exports } from "./contracts/repos.mjs";
11
14
  import { peelMost, peelTagsMost, tags_exports } from "./contracts/tags.mjs";
12
- import { tokens_exports } from "./contracts/tokens.mjs";
13
15
  import { trees_exports } from "./contracts/trees.mjs";
14
16
  import { work_exports } from "./contracts/work.mjs";
15
17
  import { git_namespace_exports } from "./server/git-namespace.mjs";
16
18
  import { objects_namespace_exports } from "./core/objects/objects-namespace.mjs";
17
- import { auth_exports } from "./auth/auth.mjs";
19
+ import { saved_callers_public_exports } from "./core/saved-callers-public.mjs";
20
+ import { auth_namespace_exports } from "./auth/auth-namespace.mjs";
18
21
  import { policy_exports } from "./auth/policy.mjs";
19
22
  import { event_streams_exports } from "./event-streams/event-streams.mjs";
20
23
  import { layer_exports } from "./rest/layer.mjs";
21
- import { public_exports as public_exports$2 } from "./merges/public.mjs";
22
- import { public_exports as public_exports$1 } from "./queue/public.mjs";
23
- import { public_exports } from "./lfs/public.mjs";
24
+ import { public_exports as public_exports$3 } from "./merges/public.mjs";
25
+ import { public_exports as public_exports$2 } from "./queue/public.mjs";
26
+ import { public_exports as public_exports$1 } from "./lfs/public.mjs";
24
27
  import { mergeQueue } from "./queue/host.mjs";
25
- import { InternalRepoId, isInternalId } from "./contracts/ids.mjs";
28
+ import { InternalRepoId, isInternalId, maxActorIdLength, maxRefNameLength } from "./contracts/ids.mjs";
26
29
  import { BlobLimit, BlobNone, FetchRequest, Filter, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
27
30
  import { ContextValue, DataLossContext, DataLossReason, ErrorContext, ExistingContext, ExistingReason, GitErrorBody, HostErrorContext, InvalidInputContext, InvalidInputReason, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, PreconditionContext, PreconditionReason, ResourceContext, ResourceReason, UnavailableContext, UnavailableReason, Verdict, accept, gitError, httpStatus, isGitError, isRefusalReason, reject } from "./contracts/result.mjs";
28
31
  import { gitPathOf } from "./http/paths.mjs";
@@ -37,4 +40,10 @@ import { packs } from "./storage/packs.mjs";
37
40
  import { packsMemory } from "./storage/packs-memory.mjs";
38
41
  import { rules_exports } from "./core/rules/rules.mjs";
39
42
  import { BeginPushUpload, FinishPushUpload, PushUploadPart, PushUploadStarted } from "./contracts/push-uploads.mjs";
40
- export { auth_exports as Auth, authorize_exports as Authorize, BeginPushUpload, BlobLimit, BlobNone, blobs_exports as Blobs, commits_exports as Commits, ContextValue, DataLossContext, DataLossReason, ErrorContext, event_streams_exports as EventStreams, events_exports as Events, ExistingContext, ExistingReason, FetchRequest, files_exports as Files, Filter, FinishPushUpload, forks_exports as Forks, git_namespace_exports as Git, GitErrorBody, HostErrorContext, InternalRepoId, InvalidInputContext, InvalidInputReason, public_exports as Lfs, public_exports$1 as MergeQueue, public_exports$2 as Merges, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, objects_namespace_exports as Objects, policy_exports as Policy, PreconditionContext, PreconditionReason, PushUploadPart, PushUploadStarted, refs_exports as Refs, repo_records_exports as RepoRecords, repos_exports as Repos, ResourceContext, ResourceReason, layer_exports as Rest, rules_exports as Rules, tags_exports as Tags, tokens_exports as Tokens, TreeFilter, trees_exports as Trees, UnavailableContext, UnavailableReason, Verdict, work_exports as Work, accept, allotmentWithin, branchRef, createGitClient, createGitServer, gitError, gitPathOf, httpStatus, isGitError, isInternalId, isRefusalReason, lfs, lfsPointerOid, lfsPointers, loose, looseLimits, maxLfsPointerBytes, mergeQueue, objectsReadMost, packs, packsMemory, paginate, peelMost, peelTagsMost, reject, shortTarget, topics };
43
+ import { public_exports as public_exports$4 } from "./access/public.mjs";
44
+ import { public_exports as public_exports$6 } from "./topics/public.mjs";
45
+ import { tokens_public_exports } from "./auth/tokens-public.mjs";
46
+ import { public_exports } from "./core/hooks/public.mjs";
47
+ import { public_exports as public_exports$5 } from "./signin/public.mjs";
48
+ import { jobStates } from "@ref0/infra";
49
+ export { auth_namespace_exports as Auth, authorize_exports as Authorize, BeginPushUpload, BlobLimit, BlobNone, blobs_exports as Blobs, commits_exports as Commits, ContextValue, DataLossContext, DataLossReason, ErrorContext, event_streams_exports as EventStreams, events_exports as Events, ExistingContext, ExistingReason, FetchRequest, files_exports as Files, Filter, FinishPushUpload, forks_exports as Forks, git_namespace_exports as Git, client_exports as GitClient, GitErrorBody, git_events_exports as GitEvents, public_exports as GitHooks, HostErrorContext, InternalRepoId, InvalidInputContext, InvalidInputReason, public_exports$1 as Lfs, public_exports$2 as MergeQueue, public_exports$3 as Merges, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, objects_namespace_exports as Objects, policy_exports as Policy, PreconditionContext, PreconditionReason, public_exports$4 as PrivateRefs, PushUploadPart, PushUploadStarted, refs_exports as Refs, repo_records_exports as RepoRecords, repos_exports as Repos, ResourceContext, ResourceReason, layer_exports as Rest, client_exports$1 as RestClient, rules_exports as Rules, saved_callers_public_exports as SavedCallers, public_exports$5 as SignIn, tags_exports as Tags, tokens_public_exports as Tokens, public_exports$6 as Topics, TreeFilter, trees_exports as Trees, UnavailableContext, UnavailableReason, Verdict, work_exports as Work, accept, allotmentWithin, branchRef, createGitServer, gitError, gitPathOf, grantScopes, httpStatus, isGitError, isInternalId, isRefusalReason, jobStates, lfs, lfsPointerOid, lfsPointers, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, mergeQueue, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, reject, shortTarget, tokenScopes, tokenStates, topics };
@@ -1,11 +1,12 @@
1
1
  import { LfsObject } from "../contracts/lfs.mjs";
2
2
  import { GitError } from "../contracts/result.mjs";
3
- import { ClaimedCheck } from "../core/rules/context.mjs";
4
- import { Bucket, Links } from "../contracts/objects.mjs";
3
+ import { RegisteredCheck } from "../core/rules/context.mjs";
4
+ import { Bucket as Bucket$1, Links } from "../contracts/objects.mjs";
5
5
  import { CoreNeeds } from "../core/parts.mjs";
6
6
  import { ObjectRead } from "./objects.mjs";
7
7
  import { LfsService } from "./service.mjs";
8
8
  import * as Effect from "effect/Effect";
9
+ import { RequestLimits } from "@ref0/infra";
9
10
  import * as Context from "effect/Context";
10
11
  /** A listed object's bytes, as `objectOf` reads them over LFS's parts. */
11
12
  export type LfsRead = (read: ObjectRead) => Effect.Effect<LfsObject, GitError, CoreNeeds>;
@@ -15,18 +16,20 @@ export type LfsRead = (read: ObjectRead) => Effect.Effect<LfsObject, GitError, C
15
16
  */
16
17
  export interface LfsAttached {
17
18
  readonly service: LfsService;
18
- readonly check: ClaimedCheck;
19
+ readonly check: RegisteredCheck;
19
20
  readonly read: LfsRead;
20
21
  }
21
22
  declare const LfsBase_base: Context.ServiceClass<LfsBase, "@ref0/git/lfs/LfsBase", {
22
23
  readonly needs: Context.Context<CoreNeeds>;
23
- readonly bucket: Bucket | undefined;
24
+ readonly bucket: Bucket$1 | undefined;
24
25
  readonly links: Links | undefined;
26
+ readonly requestLimits: RequestLimits.RequestLimits['Service'];
25
27
  readonly attach: (lfs: LfsAttached) => Effect.Effect<void>;
26
28
  }>;
27
29
  /**
28
30
  * What `Git.layer` gives `Lfs.layer`: the server's services, the adapter's bucket, each call it
29
- * makes charged, and its links, when it has them; and `attach`, once, before the seal.
31
+ * makes charged, its links, when it has them, and its `RequestLimits`, none when it gives none;
32
+ * and `attach`, once, before the seal.
30
33
  */
31
34
  export declare class LfsBase extends /* @__PURE__ */ LfsBase_base {}
32
35
  export {};
package/dist/lfs/base.mjs CHANGED
@@ -2,7 +2,8 @@ import * as Context from "effect/Context";
2
2
  // src/lfs/base.ts
3
3
  /**
4
4
  * What `Git.layer` gives `Lfs.layer`: the server's services, the adapter's bucket, each call it
5
- * makes charged, and its links, when it has them; and `attach`, once, before the seal.
5
+ * makes charged, its links, when it has them, and its `RequestLimits`, none when it gives none;
6
+ * and `attach`, once, before the seal.
6
7
  */
7
8
  var LfsBase = class extends (/* @__PURE__ */ Context.Service()("@ref0/git/lfs/LfsBase")) {};
8
9
  export { LfsBase };
@@ -9,7 +9,7 @@ import * as Effect from "effect/Effect";
9
9
  */
10
10
  const lfsCalls = (read, bound) => {
11
11
  const callerOf = callerFor(bound);
12
- return { get: (repo, { oid, size, signal, internalId, ...input }) => {
12
+ return { get: (repo, { oid, size, signal, internalId, request, ...input }) => {
13
13
  const caller = callerOf(input);
14
14
  const reading = read();
15
15
  return reading === void 0 ? Effect.andThen(openFor(caller, repo, false, internalId), fail("NOT_FOUND", "Object does not exist")) : reading({
@@ -18,7 +18,8 @@ const lfsCalls = (read, bound) => {
18
18
  oid,
19
19
  size,
20
20
  signal,
21
- internalId
21
+ internalId,
22
+ request
22
23
  });
23
24
  } };
24
25
  };
@@ -1,27 +1,29 @@
1
1
  import { Git } from "../contracts/git.mjs";
2
- import { LfsGetInput, LfsObject } from "../contracts/lfs.mjs";
2
+ import { LfsGetInput, LfsObject, LfsOptions } from "../contracts/lfs.mjs";
3
3
  import { RepoName } from "../contracts/ids.mjs";
4
4
  import { GitError } from "../contracts/result.mjs";
5
5
  import { LfsBase } from "./base.mjs";
6
- import { Bucket } from "@ref0/infra";
7
6
  import * as Effect from "effect/Effect";
7
+ import { Bucket } from "@ref0/infra";
8
8
  import * as Context from "effect/Context";
9
9
  import * as Layer from "effect/Layer";
10
10
  declare const Lfs_base: Context.ServiceClass<Lfs, "@ref0/git/Lfs", {
11
11
  /**
12
12
  * An object the repo lists, or a source up its fork chain does, for a caller who may read
13
13
  * the repo: the read refusal for any other. `NOT_FOUND` for an object none lists or of
14
- * another `size`; `DATA_LOSS` for a listed object whose bytes are gone. `signal` aborted
15
- * cancels the bucket's stream.
14
+ * another `size`, and, under `access`, for one no ref the caller sees points at, as
15
+ * `privateRefs` says; `DATA_LOSS` for a listed object whose bytes are gone. `signal`
16
+ * aborted cancels the bucket's stream.
16
17
  */
17
18
  readonly get: (repo: RepoName, input: LfsGetInput) => Effect.Effect<LfsObject, GitError>;
18
19
  }>;
19
20
  /** Git LFS's objects, read as a call rather than over git-lfs's own HTTP API. */
20
21
  export declare class Lfs extends /* @__PURE__ */ Lfs_base {}
21
22
  /**
22
- * Git LFS, a feature over core: it claims `lfs`, keeps its objects in the host's `Bucket`, and
23
+ * Git LFS, a feature over core: it registers `lfs`, keeps its objects in the host's `Bucket`, and
23
24
  * serves git-lfs's API under each repo's `info/lfs/`. With `BucketLinks` its transfers go straight
24
- * to the bucket; without, through the Worker.
25
+ * to the bucket; without, through the Worker, each upload held to what the host's caps let finish:
26
+ * `options`, each winning over the adapter's `RequestLimits`, as `LfsOptions` says.
25
27
  */
26
- export declare const layer: () => Layer.Layer<Lfs, GitError, Git | LfsBase | Bucket.Bucket>;
28
+ export declare const layer: (options?: LfsOptions) => Layer.Layer<Lfs, GitError, Git | LfsBase | Bucket.Bucket>;
27
29
  export {};