@ref0/git 0.14.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 (351) hide show
  1. package/dist/auth/access-jwt.mjs +2 -2
  2. package/dist/auth/authorize.mjs +3 -3
  3. package/dist/auth/fences.d.mts +1 -2
  4. package/dist/auth/fences.mjs +3 -3
  5. package/dist/auth/grants.mjs +4 -4
  6. package/dist/auth/host-function.mjs +18 -1
  7. package/dist/auth/identify.d.mts +1 -1
  8. package/dist/auth/identify.mjs +3 -3
  9. package/dist/auth/token-cleanup.mjs +67 -0
  10. package/dist/auth/token-rows.mjs +1 -1
  11. package/dist/auth/token-text.mjs +9 -1
  12. package/dist/auth/tokens-base.d.mts +35 -0
  13. package/dist/auth/tokens-base.mjs +13 -0
  14. package/dist/auth/tokens-layer.d.mts +2 -27
  15. package/dist/auth/tokens-layer.mjs +6 -11
  16. package/dist/auth/tokens-public.d.mts +3 -3
  17. package/dist/auth/tokens.d.mts +7 -10
  18. package/dist/auth/tokens.mjs +9 -80
  19. package/dist/client/answer.mjs +21 -42
  20. package/dist/client/client.d.mts +2 -4
  21. package/dist/client/git-http.mjs +17 -7
  22. package/dist/client/local.mjs +14 -13
  23. package/dist/client/push-upload.mjs +9 -8
  24. package/dist/client/remote.mjs +8 -10
  25. package/dist/client/run-remote-helper.d.mts +1 -0
  26. package/dist/client/run-remote-helper.mjs +58 -24
  27. package/dist/client/slice-push.d.mts +1 -1
  28. package/dist/client/transport.mjs +105 -46
  29. package/dist/contracts/blobs.d.mts +55 -8
  30. package/dist/contracts/blobs.mjs +16 -2
  31. package/dist/contracts/call-allowance.d.mts +13 -0
  32. package/dist/contracts/call-allowance.mjs +44 -0
  33. package/dist/contracts/calls-spent.mjs +8 -3
  34. package/dist/contracts/client.d.mts +15 -16
  35. package/dist/contracts/commits.d.mts +24 -24
  36. package/dist/contracts/engine.d.mts +6 -1
  37. package/dist/contracts/engine.mjs +10 -1
  38. package/dist/contracts/files.d.mts +10 -10
  39. package/dist/contracts/forks.d.mts +17 -17
  40. package/dist/contracts/git-events.d.mts +29 -1
  41. package/dist/contracts/git-hooks.d.mts +1 -1
  42. package/dist/contracts/git.d.mts +21 -0
  43. package/dist/contracts/grants.d.mts +24 -4
  44. package/dist/contracts/handlers.d.mts +1 -1
  45. package/dist/contracts/lfs.d.mts +28 -2
  46. package/dist/contracts/merges.d.mts +3 -2
  47. package/dist/contracts/objects.d.mts +23 -25
  48. package/dist/contracts/queue.d.mts +40 -12
  49. package/dist/contracts/queue.mjs +3 -4
  50. package/dist/contracts/refs.d.mts +26 -23
  51. package/dist/contracts/remote.d.mts +6 -7
  52. package/dist/contracts/remote.mjs +4 -1
  53. package/dist/contracts/repos.d.mts +29 -138
  54. package/dist/contracts/repos.mjs +5 -3
  55. package/dist/contracts/result.d.mts +35 -16
  56. package/dist/contracts/result.mjs +35 -7
  57. package/dist/contracts/server.d.mts +25 -50
  58. package/dist/contracts/services.d.mts +1 -1
  59. package/dist/contracts/store.d.mts +6 -5
  60. package/dist/contracts/sync.d.mts +11 -7
  61. package/dist/contracts/sync.mjs +12 -2
  62. package/dist/contracts/tags.d.mts +10 -10
  63. package/dist/contracts/time.d.mts +3 -0
  64. package/dist/contracts/{promises.mjs → time.mjs} +1 -1
  65. package/dist/contracts/tokens.d.mts +15 -17
  66. package/dist/contracts/tokens.mjs +3 -2
  67. package/dist/contracts/topics.d.mts +1 -1
  68. package/dist/contracts/trees.d.mts +12 -12
  69. package/dist/contracts/work.d.mts +24 -13
  70. package/dist/core/access.d.mts +1 -2
  71. package/dist/core/access.mjs +20 -9
  72. package/dist/core/ancestry.d.mts +1 -0
  73. package/dist/core/asked.mjs +1 -1
  74. package/dist/core/call-names.mjs +6 -1
  75. package/dist/core/call-services.mjs +11 -3
  76. package/dist/core/events/deliver.d.mts +1 -2
  77. package/dist/core/events/deliver.mjs +43 -36
  78. package/dist/core/events/retired.mjs +119 -0
  79. package/dist/core/forks.mjs +928 -432
  80. package/dist/core/hooks/groups.mjs +1 -1
  81. package/dist/core/imports.mjs +29 -23
  82. package/dist/core/index-job.mjs +122 -34
  83. package/dist/core/index-lost.d.mts +1 -2
  84. package/dist/core/index-lost.mjs +2 -2
  85. package/dist/core/loose-tally.mjs +1 -1
  86. package/dist/core/objects/blobs.mjs +129 -3
  87. package/dist/core/objects/lines.mjs +2 -2
  88. package/dist/core/objects/merges.mjs +4 -1
  89. package/dist/core/objects/objects-layer.d.mts +1 -1
  90. package/dist/core/objects/objects-layer.mjs +3 -3
  91. package/dist/core/objects/reading.mjs +24 -13
  92. package/dist/core/objects/tags.mjs +4 -1
  93. package/dist/core/objects/trees.mjs +2 -2
  94. package/dist/core/objects/writing.mjs +2 -2
  95. package/dist/core/own-writes.mjs +1 -1
  96. package/dist/core/parts.d.mts +4 -5
  97. package/dist/core/parts.mjs +3 -8
  98. package/dist/core/promise.mjs +9 -12
  99. package/dist/core/purge.mjs +287 -83
  100. package/dist/core/push-decide.mjs +2 -0
  101. package/dist/core/push-files.d.mts +1 -1
  102. package/dist/core/push.mjs +58 -47
  103. package/dist/core/receipts.mjs +8 -3
  104. package/dist/core/ref-index-job.mjs +4 -4
  105. package/dist/core/ref-view.mjs +2 -2
  106. package/dist/core/refs.mjs +5 -5
  107. package/dist/core/registered-rows.mjs +2 -2
  108. package/dist/core/repack.mjs +36 -21
  109. package/dist/core/repo-info.mjs +3 -3
  110. package/dist/core/repos.mjs +21 -9
  111. package/dist/core/rules/commit-changes.d.mts +0 -1
  112. package/dist/core/saved-caller-views.d.mts +7 -2
  113. package/dist/core/saved-caller-views.mjs +2 -2
  114. package/dist/core/saved-callers.d.mts +19 -2
  115. package/dist/core/seam.d.mts +16 -26
  116. package/dist/core/seam.mjs +7 -28
  117. package/dist/core/tokens.mjs +1 -1
  118. package/dist/core/view.mjs +7 -15
  119. package/dist/core/work.mjs +59 -14
  120. package/dist/effect.d.mts +3 -12
  121. package/dist/effect.mjs +1 -10
  122. package/dist/engine/failures.mjs +2 -1
  123. package/dist/engine/reads.mjs +4 -4
  124. package/dist/event-streams/stream.d.mts +2 -2
  125. package/dist/event-streams/stream.mjs +37 -14
  126. package/dist/extend.d.mts +2 -3
  127. package/dist/extend.mjs +2 -1
  128. package/dist/http/answers.mjs +8 -5
  129. package/dist/http/core-parts.mjs +95 -79
  130. package/dist/http/handler.mjs +34 -7
  131. package/dist/http/node.d.mts +14 -1
  132. package/dist/http/node.mjs +56 -27
  133. package/dist/http/parts.d.mts +1 -0
  134. package/dist/http/push-upload-job.mjs +30 -26
  135. package/dist/http/push-uploads.mjs +36 -21
  136. package/dist/http/upload-pack.mjs +3 -3
  137. package/dist/index.d.mts +14 -14
  138. package/dist/index.mjs +2 -2
  139. package/dist/lfs/answer.mjs +37 -0
  140. package/dist/lfs/base.d.mts +2 -0
  141. package/dist/lfs/base.mjs +25 -1
  142. package/dist/lfs/copy.d.mts +21 -7
  143. package/dist/lfs/copy.mjs +89 -6
  144. package/dist/lfs/layer.d.mts +15 -1
  145. package/dist/lfs/layer.mjs +24 -11
  146. package/dist/lfs/locks.mjs +2 -2
  147. package/dist/lfs/objects.d.mts +1 -0
  148. package/dist/lfs/objects.mjs +87 -17
  149. package/dist/lfs/pointers.mjs +2 -2
  150. package/dist/lfs/rows.mjs +42 -8
  151. package/dist/lfs/upkeep.mjs +48 -14
  152. package/dist/lfs/wire.mjs +6 -31
  153. package/dist/merges/merges.mjs +2 -2
  154. package/dist/node.d.mts +2 -2
  155. package/dist/protocol/bytes/buffers.mjs +13 -5
  156. package/dist/protocol/bytes/reader.mjs +6 -1
  157. package/dist/protocol/bytes/streams.mjs +27 -1
  158. package/dist/protocol/diff/read.d.mts +4 -3
  159. package/dist/protocol/diff/read.mjs +8 -3
  160. package/dist/protocol/objects/lfs-pointer.d.mts +14 -2
  161. package/dist/protocol/objects/lfs-pointer.mjs +1 -3
  162. package/dist/protocol/objects/links-raw.mjs +24 -10
  163. package/dist/protocol/objects/tag.d.mts +1 -1
  164. package/dist/protocol/objects/tree.mjs +23 -6
  165. package/dist/protocol/packs/delta.d.mts +6 -3
  166. package/dist/protocol/packs/delta.mjs +96 -32
  167. package/dist/protocol/packs/idx.d.mts +2 -1
  168. package/dist/protocol/packs/idx.mjs +22 -3
  169. package/dist/protocol/packs/parts.d.mts +4 -1
  170. package/dist/protocol/packs/parts.mjs +10 -7
  171. package/dist/protocol/packs/reader.d.mts +5 -0
  172. package/dist/protocol/packs/reader.mjs +3 -2
  173. package/dist/protocol/packs/writer.mjs +26 -8
  174. package/dist/queue/advance.mjs +21 -24
  175. package/dist/queue/base.d.mts +55 -0
  176. package/dist/queue/base.mjs +44 -0
  177. package/dist/queue/calls.mjs +51 -54
  178. package/dist/queue/commit.mjs +1 -1
  179. package/dist/queue/host.d.mts +1 -15
  180. package/dist/queue/host.mjs +2 -7
  181. package/dist/queue/layer.d.mts +2 -1
  182. package/dist/queue/layer.mjs +10 -3
  183. package/dist/queue/limits.mjs +2 -0
  184. package/dist/queue/push-option.mjs +9 -24
  185. package/dist/queue/schedule.mjs +1 -1
  186. package/dist/queue/state.mjs +2 -10
  187. package/dist/queue/trim.mjs +5 -3
  188. package/dist/rest/blobs.mjs +29 -5
  189. package/dist/rest/caller.d.mts +4 -4271
  190. package/dist/rest/caller.mjs +4 -0
  191. package/dist/rest/client.d.mts +8 -5
  192. package/dist/rest/client.mjs +19 -2
  193. package/dist/rest/handlers.mjs +50 -5
  194. package/dist/rest/layer.d.mts +2 -2
  195. package/dist/rest/layer.mjs +5 -12
  196. package/dist/rest/me.d.mts +3 -432
  197. package/dist/server/check-fetch.mjs +3 -3
  198. package/dist/server/edge-node.d.mts +11 -8
  199. package/dist/server/edge-node.mjs +9 -6
  200. package/dist/server/edge.d.mts +21 -7
  201. package/dist/server/edge.mjs +32 -11
  202. package/dist/server/extension.mjs +1 -1
  203. package/dist/server/git-layer.d.mts +5 -5
  204. package/dist/server/git-layer.mjs +28 -22
  205. package/dist/server/git-namespace.d.mts +4 -3
  206. package/dist/server/git-namespace.mjs +3 -2
  207. package/dist/server/joined.d.mts +6 -18
  208. package/dist/server/joined.mjs +9 -36
  209. package/dist/server/lifecycle.mjs +18 -106
  210. package/dist/server/registry.mjs +24 -7
  211. package/dist/server/server.mjs +205 -346
  212. package/dist/signin/context.d.mts +1 -2
  213. package/dist/signin/layer.d.mts +1 -1
  214. package/dist/signin/layer.mjs +1 -1
  215. package/dist/storage/allotted.mjs +18 -3
  216. package/dist/storage/batch-upkeep.mjs +274 -0
  217. package/dist/storage/batches.d.mts +8 -0
  218. package/dist/storage/batches.mjs +344 -0
  219. package/dist/storage/calls.d.mts +1 -2
  220. package/dist/storage/calls.mjs +144 -158
  221. package/dist/storage/chunks.d.mts +9 -0
  222. package/dist/storage/chunks.mjs +297 -0
  223. package/dist/storage/clean-up.mjs +72 -9
  224. package/dist/storage/counted-bucket.mjs +4 -4
  225. package/dist/storage/fetch.d.mts +1 -0
  226. package/dist/storage/fetch.mjs +287 -210
  227. package/dist/storage/host-bucket.mjs +1 -2
  228. package/dist/storage/id-mix.mjs +19 -5
  229. package/dist/storage/index-bitmaps.mjs +9 -2
  230. package/dist/storage/index-build.d.mts +0 -1
  231. package/dist/storage/index-build.mjs +80 -23
  232. package/dist/storage/index-fetch.mjs +113 -72
  233. package/dist/storage/index-files.d.mts +3 -0
  234. package/dist/storage/index-files.mjs +10 -5
  235. package/dist/storage/index-graph.mjs +72 -22
  236. package/dist/storage/index-remap.mjs +200 -64
  237. package/dist/storage/index-whole.mjs +127 -0
  238. package/dist/storage/largest-files.mjs +1 -1
  239. package/dist/storage/layout.mjs +23 -0
  240. package/dist/storage/loose.d.mts +7 -4
  241. package/dist/storage/loose.mjs +212 -67
  242. package/dist/storage/memory-budget.mjs +16 -4
  243. package/dist/storage/merge-plan.mjs +3 -2
  244. package/dist/storage/merge-row.mjs +7 -1
  245. package/dist/storage/merge-stream.mjs +164 -25
  246. package/dist/storage/merge-walk.mjs +8 -4
  247. package/dist/storage/merge-write.mjs +1 -1
  248. package/dist/storage/merge.d.mts +1 -1
  249. package/dist/storage/merge.mjs +1 -1
  250. package/dist/storage/object-rows.d.mts +1 -0
  251. package/dist/storage/object-rows.mjs +385 -65
  252. package/dist/storage/oid-table.mjs +171 -0
  253. package/dist/storage/pack-order.mjs +8 -4
  254. package/dist/storage/pack-ranges.d.mts +1 -2
  255. package/dist/storage/pack-ranges.mjs +4 -5
  256. package/dist/storage/pack-reads.d.mts +2 -1
  257. package/dist/storage/pack-reads.mjs +158 -42
  258. package/dist/storage/pack-receive.d.mts +1 -1
  259. package/dist/storage/pack-receive.mjs +2 -2
  260. package/dist/storage/packs.d.mts +1 -1
  261. package/dist/storage/packs.mjs +136 -66
  262. package/dist/storage/placed-reads.mjs +1 -1
  263. package/dist/storage/plan-columns.d.mts +4 -0
  264. package/dist/storage/plan-columns.mjs +238 -0
  265. package/dist/storage/prune-keep.mjs +134 -41
  266. package/dist/storage/prune-walk.mjs +202 -62
  267. package/dist/storage/prune.mjs +194 -91
  268. package/dist/storage/push-allotment.mjs +91 -12
  269. package/dist/storage/push-uploads.mjs +4 -4
  270. package/dist/storage/pushed-commits.mjs +4 -2
  271. package/dist/storage/quarantine.d.mts +1 -1
  272. package/dist/storage/range-cache.mjs +125 -8
  273. package/dist/storage/ready.d.mts +1 -1
  274. package/dist/storage/ready.mjs +8 -6
  275. package/dist/storage/receive-bounds.mjs +23 -8
  276. package/dist/storage/repack-backlog.mjs +6 -3
  277. package/dist/storage/repack.d.mts +1 -1
  278. package/dist/storage/rows.d.mts +1 -1
  279. package/dist/storage/rows.mjs +1 -1
  280. package/dist/storage/runs.mjs +195 -43
  281. package/dist/storage/send-list.d.mts +1 -0
  282. package/dist/storage/send-list.mjs +54 -10
  283. package/dist/storage/single-flight.mjs +13 -7
  284. package/dist/storage/stream-whole.mjs +127 -26
  285. package/dist/storage/unpack.mjs +371 -79
  286. package/dist/storage/visible.mjs +2 -2
  287. package/dist/storage/walk.mjs +192 -38
  288. package/dist/storage/wants.mjs +5 -5
  289. package/dist/store/bodies.mjs +38 -0
  290. package/dist/store/call-count.d.mts +8 -12
  291. package/dist/store/call-count.mjs +34 -46
  292. package/dist/store/catalogue.d.mts +2 -2
  293. package/dist/store/catalogue.mjs +145 -35
  294. package/dist/store/crossing.mjs +1 -3
  295. package/dist/store/cursor-seal.d.mts +1 -2
  296. package/dist/store/cursor-seal.mjs +16 -6
  297. package/dist/store/door.mjs +183 -0
  298. package/dist/store/errors.d.mts +3 -4
  299. package/dist/store/errors.mjs +15 -33
  300. package/dist/store/git-store.mjs +25 -7
  301. package/dist/store/job-try.mjs +9 -32
  302. package/dist/store/list-job.mjs +44 -8
  303. package/dist/store/records.d.mts +3 -0
  304. package/dist/store/records.mjs +3 -0
  305. package/dist/store/repo-record.d.mts +1 -2
  306. package/dist/store/repo-record.mjs +32 -20
  307. package/dist/store/reservations.mjs +1 -1
  308. package/dist/store/scopes.mjs +11 -0
  309. package/dist/store/settle.mjs +4 -4
  310. package/dist/sync/github.mjs +3 -3
  311. package/dist/sync/import.mjs +31 -18
  312. package/dist/sync/lfs-batch.mjs +4 -5
  313. package/dist/sync/lfs-copy.mjs +17 -6
  314. package/dist/sync/mirror.mjs +34 -31
  315. package/dist/sync/said.mjs +16 -37
  316. package/dist/sync/step.mjs +33 -25
  317. package/dist/sync/tries.mjs +9 -9
  318. package/dist/topics/advance.mjs +10 -11
  319. package/dist/topics/base.d.mts +15 -0
  320. package/dist/topics/base.mjs +8 -0
  321. package/dist/topics/host.mjs +1 -1
  322. package/dist/topics/layer.d.mts +4 -9
  323. package/dist/topics/layer.mjs +2 -3
  324. package/dist/topics/members.mjs +4 -4
  325. package/dist/topics/public.d.mts +2 -1
  326. package/dist/topics/topic.mjs +2 -2
  327. package/package.json +5 -4
  328. package/dist/contracts/promises.d.mts +0 -39
  329. package/dist/core/call-names.d.mts +0 -3
  330. package/dist/core/clock.mjs +0 -18
  331. package/dist/lfs/calls.mjs +0 -26
  332. package/dist/rest/api.d.mts +0 -23
  333. package/dist/rest/blobs.d.mts +0 -833
  334. package/dist/rest/commits.d.mts +0 -3543
  335. package/dist/rest/errors.d.mts +0 -2124
  336. package/dist/rest/events.d.mts +0 -426
  337. package/dist/rest/files.d.mts +0 -1342
  338. package/dist/rest/forks.d.mts +0 -2160
  339. package/dist/rest/handlers.d.mts +0 -8
  340. package/dist/rest/merges.d.mts +0 -477
  341. package/dist/rest/queue.d.mts +0 -5917
  342. package/dist/rest/refs.d.mts +0 -2988
  343. package/dist/rest/repos.d.mts +0 -2567
  344. package/dist/rest/tags.d.mts +0 -1316
  345. package/dist/rest/tokens.d.mts +0 -2614
  346. package/dist/rest/topics.d.mts +0 -2224
  347. package/dist/rest/trees.d.mts +0 -1709
  348. package/dist/rest/work.d.mts +0 -1695
  349. package/dist/server/lifecycle.d.mts +0 -2
  350. package/dist/store/promises.d.mts +0 -11
  351. package/dist/store/promises.mjs +0 -327
package/dist/index.d.mts CHANGED
@@ -1,22 +1,21 @@
1
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, 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
21
  import "./store/cursor-seal-namespace.mjs";
@@ -26,23 +25,24 @@ import { Commit, DiffListing, MergeBaseInput, MergeBases, MergeLabels, MergeTree
26
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";
27
26
  import { File, FileCalls, FileDiff, FileReadInput, FilesDiffInput, FilesListInput, FilesRead, files_d_exports } from "./contracts/files.mjs";
28
27
  import { ForkCalls, ForkCreateInput, ForkFetched, ForkGetInput, ForkHolder, ForkListInput, forks_d_exports } from "./contracts/forks.mjs";
29
- import { repo_records_d_exports } from "./contracts/repo-records.mjs";
30
- import { LfsCalls, LfsGetInput, LfsObject, LfsOptions } from "./contracts/lfs.mjs";
28
+ import { LfsCalls, LfsGetInput, LfsGetManyInput, LfsObject, LfsObjects, LfsOptions } from "./contracts/lfs.mjs";
31
29
  import { MergeAnswer, MergeCalls, MergeCreateInput } from "./contracts/merges.mjs";
32
30
  import { HandlerOptions, SavedHandlerOptions } from "./contracts/handlers.mjs";
33
31
  import { Grant, GrantAgainInput, GrantAgainRequest, GrantInput, GrantReachInput, GrantResolver } from "./contracts/grants.mjs";
34
32
  import { GitScope, InternalRepoId, Oid, RefName, RepoName, TopicId, isInternalId, maxActorIdLength, maxRefNameLength } from "./contracts/ids.mjs";
35
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";
36
- import { client_d_exports } from "./client/client.mjs";
34
+ import { authorize_d_exports } from "./contracts/authorize.mjs";
37
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";
38
- import { RepoStreamEvent } from "./rest/wire.mjs";
36
+ import { client_d_exports } from "./client/client.mjs";
39
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
+ import { RepoStreamEvent } from "./rest/wire.mjs";
40
39
  import { Ref, RefCalls, RefCount, RefCountInput, RefEdit, RefGetInput, RefInput, RefListInput, RefProtection, RefSource, RefUpdate, RefUpdateKind, RefsUpdateInput, RefsUpdated, maxSeenRefs, refs_d_exports } from "./contracts/refs.mjs";
41
- import { BasicCredential, BearerCredential, ClientCredential, ClientCredentials, CredentialInput, RemoteCalls, RemoteOptions, TransportFailure, TransportRetry, WithoutActor, WithoutSignal } from "./contracts/remote.mjs";
42
- import { PinnedRepo, RenamedRepo, RepoCalls, RepoCatalogueEntry, RepoCreateInput, RepoDeleted, RepoGetInput, RepoIndexHold, RepoInfo, RepoInfoStats, RepoInput, RepoListInput, RepoListOrder, RepoRecord, RepoRenameInput, RepoStats, RepoUpdateInput, RepoWork, repos_d_exports } from "./contracts/repos.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";
43
42
  import { PeelInput, Peeled, TagCalls, TagCreateInput, peelMost, peelTagsMost, tags_d_exports } from "./contracts/tags.mjs";
44
- import { policy_d_exports } from "./auth/policy.mjs";
43
+ import { repo_records_d_exports } from "./contracts/repo-records.mjs";
45
44
  import { Prepare, PrepareInput, Topic, TopicAddInput, TopicCalls, TopicCandidate, TopicEntry, TopicEntryInput, TopicFailure, TopicFailureReason, TopicListInput, TopicMergedEntry, TopicReportInput, TopicReportOptions, TopicReportQuestion, TopicState, TopicTarget, TopicWait } from "./contracts/topics.mjs";
45
+ import { policy_d_exports } from "./auth/policy.mjs";
46
46
  import { event_streams_d_exports } from "./event-streams/event-streams.mjs";
47
47
  import { TreeCalls, TreeCreateInput, TreeEdit, TreeEntry, TreeInput, trees_d_exports } from "./contracts/trees.mjs";
48
48
  import { BlobLimit, BlobNone, Bytes, FetchRequest, Filter, LfsPointers, ObjectType, ReadLimits, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
@@ -51,7 +51,7 @@ import { git_namespace_d_exports } from "./server/git-namespace.mjs";
51
51
  import { SliceRefusal } from "./client/slice-push.mjs";
52
52
  import { gitPathOf } from "./http/paths.mjs";
53
53
  import { branchRef, shortTarget } from "./queue/ids.mjs";
54
- import { lfsPointerOid, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
54
+ import { LfsPointerTarget, lfsPointerOf, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
55
55
  import { LfsPointersBuilder, lfsPointers } from "./storage/lfs-pointers.mjs";
56
56
  import { loose, looseLimits } from "./storage/loose.mjs";
57
57
  import { objects_namespace_d_exports } from "./core/objects/objects-namespace.mjs";
@@ -67,7 +67,7 @@ import { FetchAdjustment, FetchReadInput, FetchReadTarget, FetchRule, FetchRuleI
67
67
  import { public_d_exports as public_d_exports$2 } from "./queue/public.mjs";
68
68
  import { BeginPushUpload, FinishPushUpload, PushFileOptions, PushOptions, PushRepoOptions, PushUploadOptions, PushUploadPart, PushUploadReceiving, PushUploadStarted } from "./contracts/push-uploads.mjs";
69
69
  import { public_d_exports as public_d_exports$1 } from "./lfs/public.mjs";
70
- import { GitAdapter, GitNeeds, ProvidedBy, ServerCalls } from "./contracts/server.mjs";
70
+ import { GitNeeds, ServerCalls } from "./contracts/server.mjs";
71
71
  import { cursor_seal_public_d_exports } from "./store/cursor-seal-public.mjs";
72
72
  import { ImportLfsMissed, ImportLfsReason, ImportState, ImportStatus } from "./contracts/sync.mjs";
73
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";
@@ -86,4 +86,4 @@ import { PushHookInput } from "./contracts/git-hooks.mjs";
86
86
  import { public_d_exports as public_d_exports$5 } from "./signin/public.mjs";
87
87
  import "./signin/namespace.mjs";
88
88
  import { jobStates } from "@ref0/infra";
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 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, 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, git_namespace_d_exports as Git, type GitAdapter, 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 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 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 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 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 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, lfsPointerOid, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, shortTarget, tokenScopes, tokenStates };
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 };
package/dist/index.mjs CHANGED
@@ -30,7 +30,7 @@ import { BlobLimit, BlobNone, FetchRequest, Filter, TreeFilter, allotmentWithin,
30
30
  import { ContextValue, DataLossContext, DataLossReason, ErrorContext, ExistingContext, ExistingReason, GitErrorBody, HostErrorContext, InvalidInputContext, InvalidInputReason, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, PreconditionContext, PreconditionReason, ResourceContext, ResourceReason, UnavailableContext, UnavailableReason, Verdict, gitError, httpStatus, isGitError, isRefusalReason } from "./contracts/result.mjs";
31
31
  import { gitPathOf } from "./http/paths.mjs";
32
32
  import { branchRef, shortTarget } from "./queue/ids.mjs";
33
- import { lfsPointerOid, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
33
+ import { lfsPointerOf, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
34
34
  import { lfsPointers } from "./storage/lfs-pointers.mjs";
35
35
  import { loose, looseLimits } from "./storage/loose.mjs";
36
36
  import { packs } from "./storage/packs.mjs";
@@ -43,4 +43,4 @@ import { tokens_public_exports } from "./auth/tokens-public.mjs";
43
43
  import { public_exports } from "./core/hooks/public.mjs";
44
44
  import { public_exports as public_exports$5 } from "./signin/public.mjs";
45
45
  import { jobStates } from "@ref0/infra";
46
- export { auth_namespace_exports as Auth, authorize_exports as Authorize, BeginPushUpload, BlobLimit, BlobNone, blobs_exports as Blobs, commits_exports as Commits, ContextValue, cursor_seal_public_exports as CursorSeal, 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, PushUploadReceiving, 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, allotmentWithin, branchRef, gitError, gitPathOf, grantScopes, httpStatus, isGitError, isInternalId, isRefusalReason, jobStates, lfsPointerOid, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, shortTarget, tokenScopes, tokenStates };
46
+ export { auth_namespace_exports as Auth, authorize_exports as Authorize, BeginPushUpload, BlobLimit, BlobNone, blobs_exports as Blobs, commits_exports as Commits, ContextValue, cursor_seal_public_exports as CursorSeal, 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, PushUploadReceiving, 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, 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 };
@@ -0,0 +1,37 @@
1
+ import { httpStatus } from "../contracts/result.mjs";
2
+ // src/lfs/answer.ts
3
+ /**
4
+ * Git LFS's answers that carry no body of its own: a refusal's `{ message }`, which a server
5
+ * without `Lfs.layer` gives too, so a bare host keeps this and none of LFS's schemas. A 401 asks
6
+ * for Basic credentials as `LFS-Authenticate`, so the client asks Git's credential helper for the
7
+ * same ones a push sends.
8
+ */
9
+ const lfsType = "application/vnd.git-lfs+json";
10
+ /** A JSON answer of LFS's, its body encoded already. */
11
+ const lfsResponse = (status, json, headers) => {
12
+ const answer = new Headers(headers);
13
+ answer.set("content-type", lfsType);
14
+ answer.set("cache-control", "no-store");
15
+ return new Response(json, {
16
+ status,
17
+ headers: answer
18
+ });
19
+ };
20
+ /** LFS's `{ message }`, as `LfsBody` encodes it: its one key. */
21
+ const lfsMessage = (status, message, headers) => lfsResponse(status, JSON.stringify({ message }), headers);
22
+ /** Where LFS's status differs from Git's: a body it can't take is its validation error. */
23
+ const lfsStatus = { INVALID_ARGUMENT: 422 };
24
+ /**
25
+ * A refusal as LFS answers one. An anonymous caller is asked for Basic credentials; a repo a
26
+ * caller can't read is a 404, as a missing one is, and so is a write's refusal for a caller
27
+ * that can't read the repo, which the caller of `lfsRefusal` arranges. A body LFS can't take is
28
+ * its validation error, 422, but one that ended early is a 400, as Git's is.
29
+ */
30
+ const lfsRefusal = (error) => {
31
+ if (error.code === "UNAUTHENTICATED") return lfsMessage(401, error.message, { "lfs-authenticate": "Basic realm=\"Git LFS\"" });
32
+ if (error.code === "NOT_FOUND") return lfsMessage(404, error.message);
33
+ const status = error.code === "INVALID_ARGUMENT" && error.context?.reason === "body-ended" ? httpStatus[error.code] : lfsStatus[error.code] ?? httpStatus[error.code];
34
+ const retry = error.code === "UNAVAILABLE" ? { "retry-after": "1" } : void 0;
35
+ return lfsMessage(status, error.message, retry);
36
+ };
37
+ export { lfsMessage, lfsRefusal, lfsResponse, lfsType };
@@ -1,5 +1,7 @@
1
+ import "../contracts/actors.mjs";
1
2
  import { LfsObject } from "../contracts/lfs.mjs";
2
3
  import { GitError } from "../contracts/result.mjs";
4
+ import "../contracts/services.mjs";
3
5
  import { RegisteredCheck } from "../core/rules/context.mjs";
4
6
  import { Bucket as Bucket$1, Links } from "../contracts/objects.mjs";
5
7
  import { CoreNeeds } from "../core/parts.mjs";
package/dist/lfs/base.mjs CHANGED
@@ -1,3 +1,6 @@
1
+ import { fail } from "../contracts/result.mjs";
2
+ import { callerFor, openFor } from "../core/access.mjs";
3
+ import * as Effect from "effect/Effect";
1
4
  import * as Context from "effect/Context";
2
5
  // src/lfs/base.ts
3
6
  /**
@@ -7,4 +10,25 @@ import * as Context from "effect/Context";
7
10
  * `Sync.layer` built beside `Lfs.layer`, in either order, finds it: `undefined` without LFS.
8
11
  */
9
12
  var LfsBase = class extends (/* @__PURE__ */ Context.Service()("@ref0/git/lfs/LfsBase")) {};
10
- export { LfsBase };
13
+ /**
14
+ * `lfs.get`: an object's bytes as the Worker's download reads them, for a call, not a client, through
15
+ * `read`, the one `Lfs.layer` attached. Without it, every object is `NOT_FOUND` to a caller who may
16
+ * read the repo. The drop-in's contents and archives call it until they move onto `Lfs` (2c).
17
+ */
18
+ const lfsCalls = (read, bound) => {
19
+ const callerOf = callerFor(bound);
20
+ return { get: (repo, { oid, size, signal, internalId, request, ...input }) => {
21
+ const caller = callerOf(input);
22
+ const reading = read();
23
+ return reading === void 0 ? Effect.andThen(openFor(caller, repo, false, internalId), fail("NOT_FOUND", "Object does not exist")) : reading({
24
+ caller,
25
+ repo,
26
+ oid,
27
+ size,
28
+ signal,
29
+ internalId,
30
+ request
31
+ });
32
+ } };
33
+ };
34
+ export { LfsBase, lfsCalls };
@@ -16,10 +16,15 @@ export interface LfsCopy {
16
16
  /** Of `oids`, those `repo` lists, with their rows. */
17
17
  readonly listed: (repo: InternalRepoId, oids: readonly string[]) => Effect.Effect<ReadonlyMap<string, ListedRow>, GitError>;
18
18
  /**
19
- * A staging key for each of `count` objects, each row added with upkeep's wake at its
20
- * `removeAt`, `uploadGrace` from now: bytes put there that no commit lists are deleted then.
19
+ * A stage for each of `objects`, in order. An object an earlier try staged keeps its copy row's
20
+ * key, `landed` when its bytes are there at the object's size, as `heldAt` reads, so the copy
21
+ * lists them without a download. With no bytes there, it keeps the key only while the stage has
22
+ * `streamMost` left, so its put lands before upkeep may end the stage. Any other gets a key of a
23
+ * new generation, its staging row, and its copy row unless one stands, added with upkeep's wake
24
+ * at their `removeAt`, `uploadGrace` from now: bytes put there that no commit lists are deleted
25
+ * then.
21
26
  */
22
- readonly stage: (repo: InternalRepoId, count: number) => Effect.Effect<readonly LfsStaging[], GitError>;
27
+ readonly stage: (repo: InternalRepoId, objects: readonly CopiedObject[]) => Effect.Effect<readonly LfsCopyStage[], GitError>;
23
28
  /**
24
29
  * `body`, `size` bytes whose SHA-256 is `oid`, put at `staging`'s key with nothing buffered, the
25
30
  * bucket checking the SHA-256: other bytes fail `INVALID_ARGUMENT`, keeping nothing. No
@@ -28,16 +33,25 @@ export interface LfsCopy {
28
33
  */
29
34
  readonly put: (staging: LfsStaging, body: Stream.Stream<Uint8Array, GitError>, size: number, oid: string) => Effect.Effect<void, GitError>;
30
35
  /**
31
- * The writes that list each of `landed` at its staging key and drop its staging row, for the
32
- * copy's own commit, which moves its cursor with them. A staged object that didn't land keeps
33
- * its row: a put that failed may still have stored its bytes, so upkeep deletes them at
34
- * `removeAt`.
36
+ * The writes that list each of `landed` at its staging key and drop its staging row and its
37
+ * copy row, for the copy's own commit, which moves its cursor with them. A staged object that
38
+ * didn't land keeps its rows: a put that failed may still have stored its bytes, which the next
39
+ * try finds, or upkeep deletes at `removeAt`.
35
40
  */
36
41
  readonly listing: (landed: readonly LfsLanded[]) => {
37
42
  readonly put: readonly Row[];
38
43
  readonly delete: readonly Key[];
39
44
  };
40
45
  }
46
+ /** An object the copy asks for: its oid, and its size as its pointer names it. */
47
+ export interface CopiedObject {
48
+ readonly oid: string;
49
+ readonly size: number;
50
+ }
51
+ /** An object's staging key and row, and whether an earlier try's bytes are there already. */
52
+ export interface LfsCopyStage extends LfsStaging {
53
+ readonly landed: boolean;
54
+ }
41
55
  /** An object the copy put, checked, at its staging key. */
42
56
  export interface LfsLanded {
43
57
  readonly oid: string;
package/dist/lfs/copy.mjs CHANGED
@@ -1,13 +1,96 @@
1
1
  import { bucketDo } from "../storage/calls.mjs";
2
- import { listedOf, stagedKeys } from "./objects.mjs";
3
- import { listedKey, uploadGrace } from "./rows.mjs";
4
- import * as Clock$1 from "effect/Clock";
2
+ import { decodeRow } from "../store/errors.mjs";
3
+ import { randomText } from "../store/random.mjs";
4
+ import { listedOf } from "./objects.mjs";
5
+ import { CopyRow, copyKey, copyRead, copyRowKey, lfsCollections, listedKey, stagingId, streamMost, uploadGrace } from "./rows.mjs";
6
+ import * as Clock from "effect/Clock";
5
7
  import * as Effect from "effect/Effect";
6
8
  // src/lfs/copy.ts
9
+ /**
10
+ * What `key` holds: `size` bytes, other bytes, or none. One `list` at the key itself, limit 1,
11
+ * which every bucket has: a `head` would be one call too, but a public API of its own. Only the
12
+ * copy puts at a copy key, and the bucket checks each put against the oid's SHA-256 and keeps all
13
+ * of it or nothing, so bytes there at the size are the oid's, and no hash is read.
14
+ */
15
+ const heldAt = /* @__PURE__ */ Effect.fnUntraced(function* (bucket, key, size) {
16
+ const held = (yield* bucketDo(bucket.list(key, { limit: 1 }))).items.find((item) => item.key === key);
17
+ if (held === void 0) return "none";
18
+ return held.size === size ? "same" : "other";
19
+ });
20
+ /** The repo's copy rows of `oids`, read in chunks. */
21
+ const copiesOf = /* @__PURE__ */ Effect.fnUntraced(function* (rows, repo, oids) {
22
+ const copies = /* @__PURE__ */ new Map();
23
+ for (let at = 0; at < oids.length; at += 100) {
24
+ const chunk = oids.slice(at, at + 100);
25
+ const snapshot = yield* rows.read(repo, chunk.map(copyRead));
26
+ for (const [index, oid] of chunk.entries()) {
27
+ const row = snapshot.results[index]?.[0];
28
+ if (row !== void 0) copies.set(oid, yield* decodeRow(CopyRow, row, `LFS copy ${oid}`));
29
+ }
30
+ }
31
+ return copies;
32
+ });
33
+ /** `stage`, over `rows` and `bucket`. */
34
+ const copyStages = /* @__PURE__ */ Effect.fnUntraced(function* (rows, bucket, repo, objects) {
35
+ const now = yield* Clock.currentTimeMillis;
36
+ const removeAt = now + uploadGrace;
37
+ const copies = yield* copiesOf(rows, repo, objects.map(({ oid }) => oid));
38
+ const stages = [];
39
+ const put = [];
40
+ for (const { oid, size } of objects) {
41
+ const copy = copies.get(oid);
42
+ const held = copy === void 0 ? "none" : yield* heldAt(bucket, copy.key, size);
43
+ const putsBefore = copy !== void 0 && copy.removeAt - streamMost > now;
44
+ if (copy !== void 0 && (held === "same" || held === "none" && putsBefore)) {
45
+ const row = {
46
+ collection: lfsCollections.staging,
47
+ id: copy.staged
48
+ };
49
+ stages.push({
50
+ key: copy.key,
51
+ row,
52
+ landed: held === "same"
53
+ });
54
+ continue;
55
+ }
56
+ const generation = randomText(16);
57
+ const key = copyKey(repo, oid, generation);
58
+ const row = {
59
+ collection: lfsCollections.staging,
60
+ id: stagingId(removeAt, generation)
61
+ };
62
+ put.push({
63
+ ...row,
64
+ value: {
65
+ key,
66
+ removeAt,
67
+ oid
68
+ }
69
+ });
70
+ if (copy === void 0) put.push({
71
+ ...copyRowKey(oid),
72
+ value: {
73
+ key,
74
+ staged: row.id,
75
+ removeAt
76
+ }
77
+ });
78
+ stages.push({
79
+ key,
80
+ row,
81
+ landed: false
82
+ });
83
+ }
84
+ if (put.length > 0) yield* rows.add(repo, {
85
+ put,
86
+ wake: removeAt
87
+ });
88
+ return stages;
89
+ });
7
90
  /** The copy over LFS's registration's rows and its bucket. */
8
91
  const lfsCopy = (rows, bucket) => ({
9
92
  listed: (repo, oids) => listedOf(rows, repo, oids),
10
- stage: (repo, count) => Effect.flatMap(Clock$1.currentTimeMillis, (now) => stagedKeys(rows, repo, now + uploadGrace, count)),
93
+ stage: (repo, objects) => copyStages(rows, bucket, repo, objects),
11
94
  put: (staging, body, size, oid) => Effect.asVoid(Effect.uninterruptible(bucketDo(bucket.put(staging.key, body, {
12
95
  size,
13
96
  sha256: oid
@@ -20,7 +103,7 @@ const lfsCopy = (rows, bucket) => ({
20
103
  key: staging.key
21
104
  }
22
105
  })),
23
- delete: landed.map(({ staging }) => staging.row)
106
+ delete: landed.flatMap(({ oid, staging }) => [staging.row, copyRowKey(oid)])
24
107
  })
25
108
  });
26
- export { lfsCopy };
109
+ export { heldAt, lfsCopy };
@@ -1,5 +1,6 @@
1
+ import { Caller } from "../contracts/actors.mjs";
1
2
  import { Git } from "../contracts/git.mjs";
2
- import { LfsGetInput, LfsObject, LfsOptions } from "../contracts/lfs.mjs";
3
+ import { LfsGetInput, LfsGetManyInput, LfsObject, LfsObjects, LfsOptions } from "../contracts/lfs.mjs";
3
4
  import { RepoName } from "../contracts/ids.mjs";
4
5
  import { GitError } from "../contracts/result.mjs";
5
6
  import { LfsBase } from "./base.mjs";
@@ -16,6 +17,19 @@ declare const Lfs_base: Context.ServiceClass<Lfs, "@ref0/git/Lfs", {
16
17
  * aborted cancels the bucket's stream.
17
18
  */
18
19
  readonly get: (repo: RepoName, input: LfsGetInput) => Effect.Effect<LfsObject, GitError>;
20
+ /**
21
+ * Many objects at once, every read made but each one's bytes: `readable`, each object the
22
+ * caller may read, by its oid and size, in the order asked, each once, as `get` would read
23
+ * it, a rule's `NOT_FOUND` left out and its other refusals failing the call; and `open`, one
24
+ * bucket read of one of them, charged to the call budget `getMany` ran in. `open` fails
25
+ * `FAILED_PRECONDITION` for an oid outside `readable`, and once `signal`, which the owner
26
+ * aborts when the work the read serves ends, is aborted: an open waiting for the bucket then
27
+ * ends too, and an opened stream is cancelled. 1 to 1,000 objects; another count is
28
+ * `INVALID_ARGUMENT`. It decides for `by` when given, as each call module's call does: a
29
+ * caller `identify` answered, its token's or grant's ceiling with it, or `Git.host`; else
30
+ * for the actor `input` names.
31
+ */
32
+ readonly getMany: (repo: RepoName, input: LfsGetManyInput, by?: Caller) => Effect.Effect<LfsObjects, GitError>;
19
33
  }>;
20
34
  /** Git LFS's objects, read as a call rather than over git-lfs's own HTTP API. */
21
35
  export declare class Lfs extends /* @__PURE__ */ Lfs_base {}
@@ -1,9 +1,9 @@
1
1
  import { register } from "../contracts/git.mjs";
2
- import { callerFor, resolvedAs } from "../core/access.mjs";
2
+ import { acting, callerFor, resolvedAs } from "../core/access.mjs";
3
3
  import { seenIn } from "../core/objects/reading.mjs";
4
4
  import { LfsBase } from "./base.mjs";
5
5
  import { lfsCopy } from "./copy.mjs";
6
- import { objectOf } from "./objects.mjs";
6
+ import { objectOf, objectsOf } from "./objects.mjs";
7
7
  import { pointerCheck } from "./pointers.mjs";
8
8
  import { lfsPurge } from "./purge.mjs";
9
9
  import { lfsService } from "./service.mjs";
@@ -57,15 +57,28 @@ const lfsRegistration = /* @__PURE__ */ Effect.fnUntraced(function* (registratio
57
57
  });
58
58
  yield* registration.addUpkeep(lfsUpkeep(registration.rows, bucket, links !== void 0));
59
59
  yield* registration.addPurge(lfsPurge(registration.rows, bucket));
60
- return Lfs.of({ get: (repo, { oid, size, signal, internalId, request, ...input }) => Effect.provideContext(read({
61
- caller: callerOf(input),
62
- repo,
63
- oid,
64
- size,
65
- signal,
66
- internalId,
67
- request
68
- }), needs) });
60
+ return Lfs.of({
61
+ get: (repo, { oid, size, signal, internalId, request, ...input }) => Effect.provideContext(read({
62
+ caller: callerOf(input),
63
+ repo,
64
+ oid,
65
+ size,
66
+ signal,
67
+ internalId,
68
+ request
69
+ }), needs),
70
+ getMany: (repo, { objects, signal, internalId, request, ...input }, by) => Effect.provideContext(Effect.map(acting(by, objectsOf(parts, {
71
+ caller: callerFor(by)(input),
72
+ repo,
73
+ objects,
74
+ signal,
75
+ internalId,
76
+ request
77
+ })), ({ readable, open }) => ({
78
+ readable,
79
+ open: (oid) => Effect.provideContext(open(oid), needs)
80
+ })), needs)
81
+ });
69
82
  });
70
83
  /**
71
84
  * Git LFS, a feature over core: it registers `lfs`, keeps its objects in the host's `Bucket`, and
@@ -6,7 +6,7 @@ import { decodeRow } from "../store/errors.mjs";
6
6
  import { randomText } from "../store/random.mjs";
7
7
  import { LockRow, lfsCollections, lockKey, lockRead } from "./rows.mjs";
8
8
  import { LockCreate, LockQuery, LockVerify, Unlock, bodyOf, lfsAnswer } from "./wire.mjs";
9
- import * as Clock$1 from "effect/Clock";
9
+ import * as Clock from "effect/Clock";
10
10
  import * as Effect from "effect/Effect";
11
11
  import * as Schema from "effect/Schema";
12
12
  import * as DateTime from "effect/DateTime";
@@ -58,7 +58,7 @@ const createLock = /* @__PURE__ */ Effect.fnUntraced(function* (parts, call) {
58
58
  const value = {
59
59
  path,
60
60
  owner,
61
- lockedAt: yield* Clock$1.currentTimeMillis,
61
+ lockedAt: yield* Clock.currentTimeMillis,
62
62
  held: randomText(12)
63
63
  };
64
64
  if ((yield* parts.rows.commit(repo.internalId, read.version, { put: [{
@@ -1,6 +1,7 @@
1
1
  import "../core/parts.mjs";
2
2
  import "../contracts/objects.mjs";
3
3
  import { Caller } from "../contracts/actors.mjs";
4
+ import "../contracts/lfs.mjs";
4
5
  import "../contracts/git.mjs";
5
6
  import { InternalRepoId, RepoName } from "../contracts/ids.mjs";
6
7
  import "../contracts/result.mjs";