@ref0/git 0.7.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 (191) hide show
  1. package/dist/access/private-refs.mjs +0 -2
  2. package/dist/auth/authorize.mjs +31 -24
  3. package/dist/auth/bridge.mjs +8 -8
  4. package/dist/auth/fences.d.mts +0 -1
  5. package/dist/auth/fences.mjs +1 -1
  6. package/dist/auth/grants.d.mts +0 -1
  7. package/dist/auth/grants.mjs +2 -2
  8. package/dist/auth/host-function.d.mts +1 -7
  9. package/dist/auth/host-function.mjs +38 -38
  10. package/dist/auth/identify.d.mts +0 -1
  11. package/dist/auth/identify.mjs +1 -1
  12. package/dist/auth/policy.d.mts +7 -4
  13. package/dist/auth/policy.mjs +13 -10
  14. package/dist/auth/token-rows.mjs +2 -5
  15. package/dist/auth/tokens-layer.d.mts +0 -2
  16. package/dist/auth/tokens-public.d.mts +3 -3
  17. package/dist/auth/tokens-public.mjs +4 -2
  18. package/dist/auth/tokens.d.mts +6 -1
  19. package/dist/auth/tokens.mjs +7 -1
  20. package/dist/client/client.d.mts +22 -15
  21. package/dist/client/client.mjs +31 -27
  22. package/dist/client/git-http.mjs +22 -5
  23. package/dist/client/local.mjs +1 -1
  24. package/dist/client/namespace.d.mts +2 -0
  25. package/dist/client/push-upload.d.mts +1 -0
  26. package/dist/client/push-upload.mjs +169 -2
  27. package/dist/client/remote-helper.mjs +2 -4
  28. package/dist/client/remote.mjs +37 -15
  29. package/dist/client/run-remote-helper.mjs +4 -4
  30. package/dist/client/transport.mjs +26 -19
  31. package/dist/contracts/actors.d.mts +57 -28
  32. package/dist/contracts/actors.mjs +38 -2
  33. package/dist/contracts/authorize.d.mts +21 -15
  34. package/dist/contracts/callers.mjs +40 -0
  35. package/dist/contracts/client.d.mts +16 -9
  36. package/dist/contracts/events.d.mts +12 -10
  37. package/dist/contracts/events.mjs +8 -6
  38. package/dist/contracts/files.d.mts +42 -42
  39. package/dist/contracts/forks.d.mts +0 -24
  40. package/dist/contracts/git-hooks.d.mts +217 -0
  41. package/dist/contracts/git-hooks.mjs +3 -1
  42. package/dist/contracts/grants.d.mts +46 -27
  43. package/dist/contracts/lfs.d.mts +17 -4
  44. package/dist/contracts/merges.d.mts +7 -7
  45. package/dist/contracts/objects.d.mts +20 -4
  46. package/dist/contracts/opaque.mjs +19 -1
  47. package/dist/contracts/operations.d.mts +8 -1
  48. package/dist/contracts/operations.mjs +209 -0
  49. package/dist/contracts/queue.d.mts +3 -3
  50. package/dist/contracts/queue.mjs +5 -18
  51. package/dist/contracts/remote.d.mts +13 -4
  52. package/dist/contracts/remote.mjs +3 -3
  53. package/dist/contracts/repos.d.mts +11 -40
  54. package/dist/contracts/repos.mjs +11 -10
  55. package/dist/contracts/result.d.mts +28 -11
  56. package/dist/contracts/result.mjs +32 -2
  57. package/dist/contracts/rules.d.mts +706 -46
  58. package/dist/contracts/rules.mjs +81 -2
  59. package/dist/contracts/server.d.mts +5 -275
  60. package/dist/contracts/services.d.mts +0 -3
  61. package/dist/contracts/services.mjs +1 -3
  62. package/dist/contracts/signin.d.mts +2 -2
  63. package/dist/contracts/signin.mjs +4 -5
  64. package/dist/contracts/sync.d.mts +1 -4
  65. package/dist/contracts/tokens.d.mts +29 -17
  66. package/dist/contracts/tokens.mjs +14 -3
  67. package/dist/contracts/topics.d.mts +38 -11
  68. package/dist/contracts/topics.mjs +8 -2
  69. package/dist/core/access.d.mts +0 -2
  70. package/dist/core/access.mjs +15 -4
  71. package/dist/core/events/deliver.mjs +19 -1
  72. package/dist/core/forks.mjs +30 -11
  73. package/dist/core/hooks/groups.d.mts +0 -1
  74. package/dist/core/hooks/groups.mjs +8 -9
  75. package/dist/core/loose-tally.mjs +46 -0
  76. package/dist/core/objects/writing.mjs +1 -0
  77. package/dist/core/promise.mjs +1 -15
  78. package/dist/core/purge.mjs +14 -9
  79. package/dist/core/push.mjs +13 -6
  80. package/dist/core/ref-view.mjs +14 -6
  81. package/dist/core/repack.mjs +19 -14
  82. package/dist/core/repo-info.mjs +8 -6
  83. package/dist/core/repos.mjs +1 -0
  84. package/dist/core/rules/check.mjs +10 -10
  85. package/dist/core/rules/context.d.mts +3 -1
  86. package/dist/core/rules/context.mjs +16 -13
  87. package/dist/core/rules/fetch.mjs +17 -23
  88. package/dist/core/tokens.mjs +2 -1
  89. package/dist/effect.d.mts +2 -4
  90. package/dist/effect.mjs +2 -4
  91. package/dist/engine/commits.mjs +19 -47
  92. package/dist/engine/failures.d.mts +1 -2
  93. package/dist/engine/failures.mjs +1 -3
  94. package/dist/engine/merge-base-walk.mjs +57 -142
  95. package/dist/engine/merge-bases.mjs +5 -5
  96. package/dist/engine/merge.mjs +16 -14
  97. package/dist/extend.d.mts +1 -2
  98. package/dist/extend.mjs +1 -2
  99. package/dist/http/core-parts.mjs +1 -2
  100. package/dist/http/handler.mjs +11 -31
  101. package/dist/http/parts.d.mts +0 -1
  102. package/dist/index.d.mts +28 -21
  103. package/dist/index.mjs +5 -2
  104. package/dist/lfs/base.d.mts +6 -3
  105. package/dist/lfs/base.mjs +2 -1
  106. package/dist/lfs/layer.d.mts +4 -3
  107. package/dist/lfs/layer.mjs +23 -9
  108. package/dist/lfs/objects.mjs +90 -41
  109. package/dist/lfs/pointers.mjs +69 -18
  110. package/dist/lfs/purge.mjs +6 -2
  111. package/dist/lfs/rows.mjs +24 -7
  112. package/dist/lfs/service.d.mts +6 -3
  113. package/dist/lfs/service.mjs +8 -2
  114. package/dist/lfs/upkeep.mjs +44 -26
  115. package/dist/lfs/upload-most.mjs +41 -0
  116. package/dist/lfs/uploaded.mjs +59 -0
  117. package/dist/protocol/bytes/sha256-hasher.mjs +51 -0
  118. package/dist/protocol/bytes/text.mjs +6 -1
  119. package/dist/protocol/objects/fsck.mjs +6 -3
  120. package/dist/queue/advance.mjs +38 -8
  121. package/dist/queue/calls.mjs +4 -14
  122. package/dist/queue/lanes.mjs +1 -1
  123. package/dist/queue/rows.mjs +8 -0
  124. package/dist/queue/schedule.mjs +1 -1
  125. package/dist/queue/search.mjs +3 -4
  126. package/dist/rest/client-namespace.d.mts +2 -0
  127. package/dist/rest/client.d.mts +32 -8
  128. package/dist/rest/client.mjs +308 -382
  129. package/dist/rest/commits.d.mts +240 -240
  130. package/dist/rest/files.d.mts +18 -18
  131. package/dist/rest/forks.d.mts +45 -57
  132. package/dist/rest/handlers.mjs +2 -1
  133. package/dist/rest/listen.d.mts +8 -6
  134. package/dist/rest/listen.mjs +31 -75
  135. package/dist/rest/me.d.mts +2 -2
  136. package/dist/rest/merges.d.mts +7 -7
  137. package/dist/rest/refs.d.mts +139 -139
  138. package/dist/rest/repos.d.mts +54 -66
  139. package/dist/rest/tokens.d.mts +12 -12
  140. package/dist/rest/topics.d.mts +110 -110
  141. package/dist/rest/trees.d.mts +66 -66
  142. package/dist/rest/wire.d.mts +1 -1
  143. package/dist/rest.d.mts +1 -7
  144. package/dist/rest.mjs +1 -5
  145. package/dist/server/git-layer.d.mts +10 -2
  146. package/dist/server/git-layer.mjs +29 -10
  147. package/dist/server/joined.d.mts +1 -1
  148. package/dist/server/server.d.mts +0 -1
  149. package/dist/server/server.mjs +26 -45
  150. package/dist/signin/context.d.mts +0 -1
  151. package/dist/signin/context.mjs +5 -9
  152. package/dist/storage/clean-up.mjs +3 -1
  153. package/dist/storage/fsck.mjs +12 -2
  154. package/dist/storage/graph-rebuild.mjs +262 -0
  155. package/dist/storage/index-build.mjs +100 -12
  156. package/dist/storage/lfs-pointers.d.mts +5 -5
  157. package/dist/storage/lfs-pointers.mjs +37 -11
  158. package/dist/storage/loose.mjs +4 -1
  159. package/dist/storage/memory-budget.mjs +1 -1
  160. package/dist/storage/merge-fence.mjs +81 -19
  161. package/dist/storage/merge-most.mjs +1 -0
  162. package/dist/storage/merge-row.mjs +16 -4
  163. package/dist/storage/merge-stream.mjs +9 -6
  164. package/dist/storage/object-rows.mjs +17 -1
  165. package/dist/storage/pack-receive.mjs +10 -6
  166. package/dist/storage/packs.mjs +58 -27
  167. package/dist/storage/prune.mjs +68 -40
  168. package/dist/storage/ready.d.mts +1 -1
  169. package/dist/storage/ready.mjs +12 -3
  170. package/dist/storage/receive-state.mjs +1 -1
  171. package/dist/storage/repack-contained.mjs +22 -14
  172. package/dist/storage/repack.d.mts +1 -1
  173. package/dist/storage/repack.mjs +3 -2
  174. package/dist/storage/unpack.mjs +7 -0
  175. package/dist/store/call-count.d.mts +23 -3
  176. package/dist/store/call-count.mjs +36 -13
  177. package/dist/store/records.mjs +10 -4
  178. package/dist/store/repo-record.mjs +29 -12
  179. package/dist/store/scopes.mjs +6 -1
  180. package/dist/sync/import.mjs +14 -2
  181. package/dist/sync/layer.d.mts +5 -1
  182. package/dist/sync/layer.mjs +7 -2
  183. package/dist/sync/step.mjs +15 -15
  184. package/dist/topics/advance.mjs +7 -6
  185. package/dist/topics/members.mjs +38 -9
  186. package/package.json +3 -3
  187. package/dist/engine/merge-base-walk.d.mts +0 -3
  188. package/dist/server/routes.d.mts +0 -32
  189. package/dist/server/routes.mjs +0 -69
  190. package/dist/sync/bridge.d.mts +0 -6
  191. package/dist/sync/bridge.mjs +0 -29
@@ -1,13 +1,92 @@
1
+ import { Actor, ActorId } from "./actors.mjs";
2
+ import { actingWith } from "./callers.mjs";
3
+ import "./engine.mjs";
4
+ import { Oid, RepoName } from "./ids.mjs";
5
+ import { FetchRequest } from "./object-values.mjs";
6
+ import { EffectValue, FunctionValue, RequestValue, StreamValue } from "./opaque.mjs";
7
+ import { RefSource, RefUpdate } from "./refs.mjs";
8
+ import { RepoStats } from "./repos.mjs";
1
9
  import * as Schema from "effect/Schema";
2
10
  import * as Context from "effect/Context";
3
11
  // src/contracts/rules.ts
12
+ const PushFacts = /* @__PURE__ */ Schema.Struct({
13
+ bytes: Schema.Number,
14
+ objects: Schema.Number,
15
+ updates: Schema.mutable(Schema.Array(RefUpdate))
16
+ });
17
+ Schema.Boolean;
18
+ /**
19
+ * The Schema of a shape typed `PushContext & { …fields }`, with `PushContext`'s request, Effect
20
+ * and Stream held as themselves.
21
+ */
22
+ const pushContextWith = (fields) => actingWith({
23
+ repo: RepoName,
24
+ subject: Schema.optionalKey(ActorId),
25
+ source: RefSource,
26
+ push: PushFacts,
27
+ stats: RepoStats,
28
+ request: Schema.optionalKey(RequestValue),
29
+ pushOptions: Schema.optionalKey(Schema.Array(Schema.String)),
30
+ changes: EffectValue(),
31
+ commitChanges: StreamValue(),
32
+ ...fields
33
+ });
34
+ FunctionValue();
35
+ /** What every fetch rule's input names: the caller's actor and the repo. */
36
+ const FetchRuleOf = /* @__PURE__ */ Schema.Struct({
37
+ actor: Actor,
38
+ repo: RepoName
39
+ });
40
+ ({
41
+ ...FetchRuleOf.fields,
42
+ ...FetchRequest.fields
43
+ }), Schema.Literal("git");
44
+ const FetchRawTarget = /* @__PURE__ */ Schema.Struct({
45
+ kind: Schema.Literal("raw"),
46
+ oid: Oid
47
+ });
48
+ const FetchArchiveTarget = /* @__PURE__ */ Schema.Struct({
49
+ kind: Schema.Literal("archive"),
50
+ oid: Oid
51
+ });
52
+ const FetchLfsTarget = /* @__PURE__ */ Schema.Struct({
53
+ kind: Schema.Literal("lfs"),
54
+ oid: Schema.String,
55
+ size: Schema.Number
56
+ });
57
+ /**
58
+ * Bytes read outside Git's protocol, once Git found them visible to the caller: a blob's raw
59
+ * bytes, an archive of a commit, checked as it's linked and again as it's downloaded, or a Git
60
+ * LFS object, by its SHA-256 and size. A hidden or missing object never reaches a rule.
61
+ */
62
+ const FetchReadTarget = /* @__PURE__ */ Schema.Union([
63
+ FetchRawTarget,
64
+ FetchArchiveTarget,
65
+ FetchLfsTarget
66
+ ]);
67
+ const readRuleOf = {
68
+ ...FetchRuleOf.fields,
69
+ request: Schema.optionalKey(RequestValue)
70
+ };
71
+ Schema.Struct({
72
+ ...readRuleOf,
73
+ ...FetchRawTarget.fields
74
+ }), Schema.Struct({
75
+ ...readRuleOf,
76
+ ...FetchArchiveTarget.fields
77
+ }), Schema.Struct({
78
+ ...readRuleOf,
79
+ ...FetchLfsTarget.fields
80
+ });
81
+ Schema.optional(RequestValue);
4
82
  /** A depth a fetch rule sets: a whole number above 0. */
5
83
  const RuledDepth = /* @__PURE__ */ Schema.Int.check(Schema.isGreaterThan(0));
6
- Schema.optionalKey(RuledDepth);
84
+ /** A depth is all a fetch rule may set: a client that asked for no filter is never given one. */
85
+ const FetchAdjustment = /* @__PURE__ */ Schema.Struct({ depth: Schema.optionalKey(RuledDepth) });
7
86
  /**
8
87
  * The host's push and fetch rules. Core reads it with `Effect.serviceOption` where it reads the
9
88
  * rules, after its own checks: a server with none runs none. Only core reads it, so it has no
10
89
  * accessors, as `Policy` has none.
11
90
  */
12
91
  var Rules = class extends (/* @__PURE__ */ Context.Service()("@ref0/git/Rules")) {};
13
- export { RuledDepth, Rules };
92
+ export { FetchAdjustment, FetchReadTarget, PushFacts, RuledDepth, Rules, pushContextWith };
@@ -7,7 +7,6 @@ import { CommitCalls, Commits } from "./commits.mjs";
7
7
  import { Events } from "./events.mjs";
8
8
  import { FileCalls, Files } from "./files.mjs";
9
9
  import { ForkCalls, Forks } from "./forks.mjs";
10
- import { RepoName } from "./ids.mjs";
11
10
  import { LfsCalls, LfsFeature } from "./lfs.mjs";
12
11
  import { MergeCalls } from "./merges.mjs";
13
12
  import { EffectiveLimits, IndexedObjectsFactory, ObjectsFactory } from "./objects.mjs";
@@ -18,14 +17,13 @@ import { RepoCalls, Repos } from "./repos.mjs";
18
17
  import { RepoRecords } from "./repo-records.mjs";
19
18
  import { TagCalls, Tags } from "./tags.mjs";
20
19
  import { TreeCalls, Trees } from "./trees.mjs";
21
- import { Awaitable, GitError, Result } from "./result.mjs";
20
+ import { GitError, Result } from "./result.mjs";
22
21
  import { FetchRule, PushRule, Rules } from "./rules.mjs";
23
22
  import { SignInLayerOptions } from "./signin.mjs";
24
23
  import { TokenCalls, TokensFeature } from "./tokens.mjs";
25
24
  import { Work, WorkCalls } from "./work.mjs";
26
25
  import { TopicCalls, TopicsFactory } from "./topics.mjs";
27
26
  import * as Effect from "effect/Effect";
28
- import * as Schema from "effect/Schema";
29
27
  import { Bucket, CallLimits, JobQueue, Records } from "@ref0/infra";
30
28
  import * as Layer from "effect/Layer";
31
29
  import * as ManagedRuntime from "effect/ManagedRuntime";
@@ -44,273 +42,6 @@ export type GitNeeds = Records.Records | JobQueue.JobQueue | CallLimits.CallLimi
44
42
  export type GitAdapter = Layer.Layer<never, Error> | readonly Layer.Layer<never, Error>[];
45
43
  /** What `adapter` gives. */
46
44
  export type ProvidedBy<A extends GitAdapter> = A extends readonly (infer L extends Layer.Any)[] ? Layer.Success<L> : A extends Layer.Any ? Layer.Success<A> : never;
47
- export declare const ResolveInput: Schema.Struct<{
48
- readonly actor: Schema.Union<readonly [Schema.Struct<{
49
- readonly id: Schema.String;
50
- readonly anonymous: Schema.optionalKey<Schema.Literal<false>>;
51
- readonly meta: Schema.optionalKey<Schema.Unknown>;
52
- }>, Schema.Struct<{
53
- readonly anonymous: Schema.Literal<true>;
54
- readonly meta: Schema.optionalKey<Schema.Unknown>;
55
- }>]>;
56
- readonly url: Schema.declare<URL, URL>;
57
- readonly path: Schema.String;
58
- readonly signal: Schema.declare<AbortSignal, AbortSignal>;
59
- }>;
60
- export type ResolveInput = typeof ResolveInput.Type;
61
- /** Names the repo an HTTP request means, after identification. Direct calls name it already. */
62
- export type Resolve = (input: ResolveInput) => Awaitable<RepoName | undefined>;
63
- export declare const HostFunctionFailure: Schema.Struct<{
64
- /** Also returned to the caller, in the error's context. */
65
- readonly id: Schema.String;
66
- readonly function: Schema.Literals<readonly ["auth", "authorize", "approvalPage", "grants", "rules.push", "rules.fetch", "hooks", "resolve", "join", "queue.merge", "queue.lanes", "queue.bisect", "queue.schedule", "topics.prepare", "topics.required"]>;
67
- readonly timedOut: Schema.Boolean;
68
- readonly repo: Schema.optionalKey<Schema.String>;
69
- readonly operation: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
70
- readonly kind: Schema.Literals<readonly ["fetch", "read", "object.create", "repo.create", "repo.update", "repo.delete"]>;
71
- readonly repo: Schema.String;
72
- }>, Schema.Struct<{
73
- readonly kind: Schema.Literal<"push">;
74
- readonly repo: Schema.String;
75
- readonly updates: Schema.$Array<Schema.Struct<{
76
- readonly ref: Schema.String;
77
- readonly from: Schema.NullOr<Schema.String>;
78
- readonly to: Schema.NullOr<Schema.String>;
79
- }>>;
80
- }>, Schema.Struct<{
81
- readonly kind: Schema.Literal<"files.allow">;
82
- readonly repo: Schema.String;
83
- readonly ref: Schema.String;
84
- readonly paths: Schema.$Array<Schema.String>;
85
- }>, Schema.Struct<{
86
- readonly kind: Schema.Literals<readonly ["protect.bypass", "lock.bypass"]>;
87
- readonly repo: Schema.String;
88
- readonly ref: Schema.String;
89
- readonly move: Schema.Literals<readonly ["fast-forward", "force", "delete"]>;
90
- readonly source: Schema.Literals<readonly ["git", "api", "queue", "import"]>;
91
- }>, Schema.Struct<{
92
- readonly kind: Schema.Literal<"repo.list">;
93
- readonly prefix: Schema.optionalKey<Schema.String>;
94
- }>, Schema.Struct<{
95
- readonly kind: Schema.Literals<readonly ["fork.create", "fork.sync"]>;
96
- readonly repo: Schema.String;
97
- readonly holder: Schema.String;
98
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
99
- readonly repo: Schema.String;
100
- readonly prefix: Schema.optionalKey<Schema.Never>;
101
- readonly subject: Schema.Struct<{
102
- readonly id: Schema.String;
103
- }>;
104
- readonly actor: Schema.optionalKey<Schema.Struct<{
105
- readonly id: Schema.String;
106
- }>>;
107
- readonly kind: Schema.Literal<"token.create">;
108
- }>, Schema.Struct<{
109
- readonly prefix: Schema.String;
110
- readonly repo: Schema.optionalKey<Schema.Never>;
111
- readonly subject: Schema.Struct<{
112
- readonly id: Schema.String;
113
- }>;
114
- readonly actor: Schema.optionalKey<Schema.Struct<{
115
- readonly id: Schema.String;
116
- }>>;
117
- readonly kind: Schema.Literal<"token.create">;
118
- }>]>, Schema.Union<readonly [Schema.Struct<{
119
- readonly repo: Schema.String;
120
- readonly prefix: Schema.optionalKey<Schema.Never>;
121
- readonly kind: Schema.Literal<"token.revoke">;
122
- readonly subject: Schema.Struct<{
123
- readonly id: Schema.String;
124
- }>;
125
- }>, Schema.Struct<{
126
- readonly prefix: Schema.String;
127
- readonly repo: Schema.optionalKey<Schema.Never>;
128
- readonly kind: Schema.Literal<"token.revoke">;
129
- readonly subject: Schema.Struct<{
130
- readonly id: Schema.String;
131
- }>;
132
- }>]>, Schema.Struct<{
133
- readonly repo: Schema.String;
134
- readonly prefix: Schema.optionalKey<Schema.Never>;
135
- readonly kind: Schema.Literal<"token.list">;
136
- }>, Schema.Struct<{
137
- readonly prefix: Schema.String;
138
- readonly repo: Schema.optionalKey<Schema.Never>;
139
- readonly kind: Schema.Literal<"token.list">;
140
- }>]>, Schema.Struct<{
141
- readonly kind: Schema.Literal<"queue.add">;
142
- readonly repo: Schema.String;
143
- readonly entry: Schema.Struct<{
144
- readonly target: Schema.String;
145
- readonly source: Schema.String;
146
- readonly head: Schema.String;
147
- readonly key: Schema.String;
148
- readonly priority: Schema.optionalKey<Schema.Number>;
149
- readonly meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
150
- }>;
151
- }>, Schema.Struct<{
152
- readonly kind: Schema.Literals<readonly ["queue.hold", "queue.restart"]>;
153
- readonly repo: Schema.String;
154
- readonly target: Schema.String;
155
- readonly entry: Schema.optionalKey<Schema.String>;
156
- }>, Schema.Struct<{
157
- readonly kind: Schema.Literal<"queue.remove">;
158
- readonly repo: Schema.String;
159
- readonly entry: Schema.String;
160
- }>, Schema.Struct<{
161
- readonly kind: Schema.Literals<readonly ["queue.report", "queue.retry"]>;
162
- readonly repo: Schema.String;
163
- readonly candidate: Schema.String;
164
- }>, Schema.Struct<{
165
- readonly kind: Schema.Literal<"queue.release">;
166
- readonly repo: Schema.String;
167
- readonly hold: Schema.String;
168
- }>, Schema.Struct<{
169
- readonly kind: Schema.Literals<readonly ["topic.add", "topic.remove", "topic.report", "topic.read"]>;
170
- readonly topic: Schema.optionalKey<Schema.String>;
171
- }>, Schema.Struct<{
172
- readonly kind: Schema.Literals<readonly ["work.list", "work.retry", "work.discard"]>;
173
- readonly repo: Schema.String;
174
- readonly name: Schema.optionalKey<Schema.String>;
175
- readonly key: Schema.optionalKey<Schema.String>;
176
- }>, Schema.Struct<{
177
- readonly kind: Schema.Literal<"refs.private">;
178
- readonly repo: Schema.String;
179
- readonly patterns: Schema.$Array<Schema.String>;
180
- }>, Schema.Struct<{
181
- readonly kind: Schema.Literal<"me">;
182
- }>]>>;
183
- }>;
184
- export type HostFunctionFailure = typeof HostFunctionFailure.Type;
185
- export declare const Refusal: Schema.Struct<{
186
- readonly code: Schema.Literals<readonly ("ALREADY_EXISTS" | "DATA_LOSS" | "DEADLINE_EXCEEDED" | "FAILED_PRECONDITION" | "INTERNAL" | "INVALID_ARGUMENT" | "NOT_ALLOWED" | "NOT_FOUND" | "RESOURCE_EXHAUSTED" | "UNAUTHENTICATED" | "UNAVAILABLE")[]>;
187
- readonly message: Schema.String;
188
- readonly function: Schema.optionalKey<Schema.Literals<readonly ["auth", "authorize", "approvalPage", "grants", "rules.push", "rules.fetch", "hooks", "resolve", "join", "queue.merge", "queue.lanes", "queue.bisect", "queue.schedule", "topics.prepare", "topics.required"]>>;
189
- readonly repo: Schema.optionalKey<Schema.String>;
190
- readonly operation: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
191
- readonly kind: Schema.Literals<readonly ["fetch", "read", "object.create", "repo.create", "repo.update", "repo.delete"]>;
192
- readonly repo: Schema.String;
193
- }>, Schema.Struct<{
194
- readonly kind: Schema.Literal<"push">;
195
- readonly repo: Schema.String;
196
- readonly updates: Schema.$Array<Schema.Struct<{
197
- readonly ref: Schema.String;
198
- readonly from: Schema.NullOr<Schema.String>;
199
- readonly to: Schema.NullOr<Schema.String>;
200
- }>>;
201
- }>, Schema.Struct<{
202
- readonly kind: Schema.Literal<"files.allow">;
203
- readonly repo: Schema.String;
204
- readonly ref: Schema.String;
205
- readonly paths: Schema.$Array<Schema.String>;
206
- }>, Schema.Struct<{
207
- readonly kind: Schema.Literals<readonly ["protect.bypass", "lock.bypass"]>;
208
- readonly repo: Schema.String;
209
- readonly ref: Schema.String;
210
- readonly move: Schema.Literals<readonly ["fast-forward", "force", "delete"]>;
211
- readonly source: Schema.Literals<readonly ["git", "api", "queue", "import"]>;
212
- }>, Schema.Struct<{
213
- readonly kind: Schema.Literal<"repo.list">;
214
- readonly prefix: Schema.optionalKey<Schema.String>;
215
- }>, Schema.Struct<{
216
- readonly kind: Schema.Literals<readonly ["fork.create", "fork.sync"]>;
217
- readonly repo: Schema.String;
218
- readonly holder: Schema.String;
219
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
220
- readonly repo: Schema.String;
221
- readonly prefix: Schema.optionalKey<Schema.Never>;
222
- readonly subject: Schema.Struct<{
223
- readonly id: Schema.String;
224
- }>;
225
- readonly actor: Schema.optionalKey<Schema.Struct<{
226
- readonly id: Schema.String;
227
- }>>;
228
- readonly kind: Schema.Literal<"token.create">;
229
- }>, Schema.Struct<{
230
- readonly prefix: Schema.String;
231
- readonly repo: Schema.optionalKey<Schema.Never>;
232
- readonly subject: Schema.Struct<{
233
- readonly id: Schema.String;
234
- }>;
235
- readonly actor: Schema.optionalKey<Schema.Struct<{
236
- readonly id: Schema.String;
237
- }>>;
238
- readonly kind: Schema.Literal<"token.create">;
239
- }>]>, Schema.Union<readonly [Schema.Struct<{
240
- readonly repo: Schema.String;
241
- readonly prefix: Schema.optionalKey<Schema.Never>;
242
- readonly kind: Schema.Literal<"token.revoke">;
243
- readonly subject: Schema.Struct<{
244
- readonly id: Schema.String;
245
- }>;
246
- }>, Schema.Struct<{
247
- readonly prefix: Schema.String;
248
- readonly repo: Schema.optionalKey<Schema.Never>;
249
- readonly kind: Schema.Literal<"token.revoke">;
250
- readonly subject: Schema.Struct<{
251
- readonly id: Schema.String;
252
- }>;
253
- }>]>, Schema.Struct<{
254
- readonly repo: Schema.String;
255
- readonly prefix: Schema.optionalKey<Schema.Never>;
256
- readonly kind: Schema.Literal<"token.list">;
257
- }>, Schema.Struct<{
258
- readonly prefix: Schema.String;
259
- readonly repo: Schema.optionalKey<Schema.Never>;
260
- readonly kind: Schema.Literal<"token.list">;
261
- }>]>, Schema.Struct<{
262
- readonly kind: Schema.Literal<"queue.add">;
263
- readonly repo: Schema.String;
264
- readonly entry: Schema.Struct<{
265
- readonly target: Schema.String;
266
- readonly source: Schema.String;
267
- readonly head: Schema.String;
268
- readonly key: Schema.String;
269
- readonly priority: Schema.optionalKey<Schema.Number>;
270
- readonly meta: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
271
- }>;
272
- }>, Schema.Struct<{
273
- readonly kind: Schema.Literals<readonly ["queue.hold", "queue.restart"]>;
274
- readonly repo: Schema.String;
275
- readonly target: Schema.String;
276
- readonly entry: Schema.optionalKey<Schema.String>;
277
- }>, Schema.Struct<{
278
- readonly kind: Schema.Literal<"queue.remove">;
279
- readonly repo: Schema.String;
280
- readonly entry: Schema.String;
281
- }>, Schema.Struct<{
282
- readonly kind: Schema.Literals<readonly ["queue.report", "queue.retry"]>;
283
- readonly repo: Schema.String;
284
- readonly candidate: Schema.String;
285
- }>, Schema.Struct<{
286
- readonly kind: Schema.Literal<"queue.release">;
287
- readonly repo: Schema.String;
288
- readonly hold: Schema.String;
289
- }>, Schema.Struct<{
290
- readonly kind: Schema.Literals<readonly ["topic.add", "topic.remove", "topic.report", "topic.read"]>;
291
- readonly topic: Schema.optionalKey<Schema.String>;
292
- }>, Schema.Struct<{
293
- readonly kind: Schema.Literals<readonly ["work.list", "work.retry", "work.discard"]>;
294
- readonly repo: Schema.String;
295
- readonly name: Schema.optionalKey<Schema.String>;
296
- readonly key: Schema.optionalKey<Schema.String>;
297
- }>, Schema.Struct<{
298
- readonly kind: Schema.Literal<"refs.private">;
299
- readonly repo: Schema.String;
300
- readonly patterns: Schema.$Array<Schema.String>;
301
- }>, Schema.Struct<{
302
- readonly kind: Schema.Literal<"me">;
303
- }>]>>;
304
- readonly actor: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
305
- readonly id: Schema.String;
306
- readonly anonymous: Schema.optionalKey<Schema.Literal<false>>;
307
- readonly meta: Schema.optionalKey<Schema.Unknown>;
308
- }>, Schema.Struct<{
309
- readonly anonymous: Schema.Literal<true>;
310
- readonly meta: Schema.optionalKey<Schema.Unknown>;
311
- }>]>>;
312
- }>;
313
- export type Refusal = typeof Refusal.Type;
314
45
  /** Each piece adds its own options: C's are these. */
315
46
  export interface GitServerOptions<A extends GitAdapter = GitAdapter> {
316
47
  readonly adapter: A;
@@ -351,14 +82,13 @@ export interface GitServerOptions<A extends GitAdapter = GitAdapter> {
351
82
  */
352
83
  readonly rules?: readonly (PushRule | FetchRule | Effect.Effect<PushRule | FetchRule, GitError>)[];
353
84
  readonly basePath?: string;
354
- readonly resolve?: Resolve;
355
- readonly onError?: (cause: unknown, failed: HostFunctionFailure) => void;
356
- readonly onRefused?: (refusal: Refusal) => void;
357
85
  /**
358
86
  * The most one fetch may send and how long it may stream: Git's HTTP limits each fetch by them,
359
87
  * and a fetch whose own `limits` pass them is refused. A deleted repo's packs stay readable for
360
- * their time, so no clone is cut by clean-up. By default 2,000,000 objects, 4 GiB and an hour;
361
- * the time is never under an hour, which streams about 3.6 GB at 1 MB/s.
88
+ * their time, so no clone is cut by clean-up. By default 2,000,000 objects, 4 GiB and an hour,
89
+ * which streams about 3.6 GB at 1 MB/s. The time guards every reader of a pack: a request's
90
+ * fetch, and the jobs and forks that read under their own leases, which a platform's request cap
91
+ * doesn't bound. A host may lower it as far as `pruneFloor`, an hour, never below.
362
92
  */
363
93
  readonly fetchLimits?: EffectiveLimits;
364
94
  /** A large push's pack straight to the bucket: off unless set, and a bucket that signs parts. */
@@ -1,5 +1,4 @@
1
1
  import { Caller } from "./actors.mjs";
2
- import { GitClient as GitClient$1 } from "./client.mjs";
3
2
  import { GitError, Result } from "./result.mjs";
4
3
  import { GitStore as GitStore$1 } from "./store.mjs";
5
4
  import * as Effect from "effect/Effect";
@@ -15,7 +14,5 @@ export type EffectCalls<T, R = never> = { readonly [K in keyof T]: NonNullable<T
15
14
  * direct calls do. A call module's service holds these, and its accessors pass `by` on.
16
15
  */
17
16
  export type ByCalls<T, R = never> = EffectCalls<{ readonly [K in keyof T]: T[K] extends ((...args: infer Args) => infer Answer) ? (...args: [...Args, by?: Caller]) => Answer : never; }, R>;
18
- /** A client of one remote, as `effectGitClient` makes it. */
19
- export declare const GitClient: Context.Service<EffectCalls<GitClient$1, never>, EffectCalls<GitClient$1, never>>;
20
17
  export declare const GitStore: Context.Service<EffectCalls<GitStore$1, never>, EffectCalls<GitStore$1, never>>;
21
18
  export declare const GitCaller: Context.Service<Caller<unknown>, Caller<unknown>>;
@@ -1,7 +1,5 @@
1
1
  import * as Context from "effect/Context";
2
2
  // src/contracts/services.ts
3
- /** A client of one remote, as `effectGitClient` makes it. */
4
- const GitClient = /* @__PURE__ */ Context.Service("@ref0/git/GitClient");
5
3
  const GitStore = /* @__PURE__ */ Context.Service("@ref0/git/GitStore");
6
4
  const GitCaller = /* @__PURE__ */ Context.Service("@ref0/git/GitCaller");
7
- export { GitCaller, GitClient, GitStore };
5
+ export { GitCaller, GitStore };
@@ -131,7 +131,7 @@ export declare const ConfirmApprovalPage: Schema.Struct<{
131
131
  /** Where the browser goes with the code once approved. */
132
132
  readonly redirectUri: Schema.String;
133
133
  }>]>;
134
- readonly decide: Schema.declare<(decision: ApprovalDecision) => Effect.Effect<Response, GitError>, unknown>;
134
+ readonly decide: Schema.declare<(decision: ApprovalDecision) => Effect.Effect<Response, GitError>, (decision: ApprovalDecision) => Effect.Effect<Response, GitError>>;
135
135
  }>;
136
136
  export type ConfirmApprovalPage = typeof ConfirmApprovalPage.Type;
137
137
  export declare const ApprovalPageInput: Schema.Union<readonly [Schema.Struct<{
@@ -165,7 +165,7 @@ export declare const ApprovalPageInput: Schema.Union<readonly [Schema.Struct<{
165
165
  /** Where the browser goes with the code once approved. */
166
166
  readonly redirectUri: Schema.String;
167
167
  }>]>;
168
- readonly decide: Schema.declare<(decision: ApprovalDecision) => Effect.Effect<Response, GitError>, unknown>;
168
+ readonly decide: Schema.declare<(decision: ApprovalDecision) => Effect.Effect<Response, GitError>, (decision: ApprovalDecision) => Effect.Effect<Response, GitError>>;
169
169
  }>]>;
170
170
  export type ApprovalPageInput = typeof ApprovalPageInput.Type;
171
171
  /** The person's token, for the repo or prefix, scope and expiry the host chose. */
@@ -1,10 +1,9 @@
1
1
  import "./actors.mjs";
2
2
  import { RepoName } from "./ids.mjs";
3
- import { AbortSignalValue, RequestValue } from "./opaque.mjs";
3
+ import { AbortSignalValue, FunctionValue, RequestValue } from "./opaque.mjs";
4
4
  import { Moment } from "./repos.mjs";
5
- import { tokenScopes } from "./tokens.mjs";
5
+ import { grantScopes } from "./tokens.mjs";
6
6
  import * as Schema from "effect/Schema";
7
- import * as Predicate from "effect/Predicate";
8
7
  // src/contracts/signin.ts
9
8
  /**
10
9
  * The GitHub scope a device asks for so its token can push, as gh does: Git's refusal of a push
@@ -43,8 +42,8 @@ const ApprovalPageContext = /* @__PURE__ */ Schema.Struct({
43
42
  signal: AbortSignalValue
44
43
  });
45
44
  ({ ...ApprovalPageContext.fields }), Schema.Literal("enter-code"), Schema.Literal("/login/device"), Schema.optionalKey(Schema.Literals(["invalid-code", "expired-code"]));
46
- ({ ...ApprovalPageContext.fields }), Schema.Literal("confirm"), Schema.declare((input) => Predicate.isFunction(input));
47
- Schema.Literal("approve"), Schema.Union([RepoName, Schema.Struct({ prefix: Schema.String })]), Schema.Literals(tokenScopes), Schema.Union([Moment, Schema.Date]);
45
+ ({ ...ApprovalPageContext.fields }), Schema.Literal("confirm"), FunctionValue();
46
+ Schema.Literal("approve"), Schema.Union([RepoName, Schema.Struct({ prefix: Schema.String })]), Schema.Literals(grantScopes), Schema.Union([Moment, Schema.Date]);
48
47
  Schema.Literal("deny");
49
48
  Schema.String, Schema.String, Schema.String, Schema.Number, Schema.Number;
50
49
  Schema.String, Schema.Literal("bearer"), Schema.String;
@@ -19,7 +19,7 @@ export declare const SyncRemote: Schema.Struct<{
19
19
  readonly password: Schema.String;
20
20
  }>, Schema.Struct<{
21
21
  readonly token: Schema.String;
22
- }>]>, Schema.declare<(input: CredentialInput) => Awaitable<ClientCredential>, unknown>]>>;
22
+ }>]>, Schema.declare<(input: CredentialInput) => Awaitable<ClientCredential>, (input: CredentialInput) => Awaitable<ClientCredential>>]>>;
23
23
  readonly transport: Schema.optionalKey<Schema.declare<(request: Request) => Promise<Response>, (request: Request) => Promise<Response>>>;
24
24
  }>;
25
25
  export type SyncRemote = typeof SyncRemote.Type;
@@ -222,9 +222,6 @@ export declare const importRepo: (input: SyncImportInput) => Effect.Effect<{
222
222
  readonly packs?: number;
223
223
  readonly packBytes?: number;
224
224
  readonly ownBytes?: number;
225
- readonly looseObjects?: number;
226
- readonly looseBytes?: number;
227
- readonly leavingBytes?: number;
228
225
  readonly pushedAt?: number;
229
226
  readonly maintainedAt?: number;
230
227
  };
@@ -7,9 +7,21 @@ import { Listing } from "@ref0/infra";
7
7
  import * as Context from "effect/Context";
8
8
  export declare const TokenId: Schema.String;
9
9
  export type TokenId = typeof TokenId.Type;
10
- /** Each scope a token can have, a ceiling `authorize` can narrow: `read`, then `report`, then `write`. */
11
- export declare const tokenScopes: readonly ['read', 'report', 'write'];
12
- export declare const TokenScope: Schema.Literals<readonly ["read", "report", "write"]>;
10
+ /**
11
+ * The scopes a grant may hold, a sign-in's or an extension's, and what Git's ceiling on a repo
12
+ * answers: `read`, then `report`, then `write`.
13
+ */
14
+ export declare const grantScopes: readonly ['read', 'report', 'write'];
15
+ export declare const GrantScope: Schema.Literals<readonly ["read", "report", "write"]>;
16
+ export type GrantScope = typeof GrantScope.Type;
17
+ /**
18
+ * Each scope a token can have, a ceiling `authorize` can narrow: the grant scopes, then `admin`.
19
+ * An `admin` token reaches every operation kind, as a host's own sign-in does, and covers only
20
+ * the whole host, `{ prefix: '' }`. Its ceiling never opens past the host's `Policy`: a policy
21
+ * that doesn't accept `admin` refuses it, as `Policy.signedIn` does.
22
+ */
23
+ export declare const tokenScopes: readonly ["read", "report", "write", "admin"];
24
+ export declare const TokenScope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
13
25
  export type TokenScope = typeof TokenScope.Type;
14
26
  /** One repo, or every repo whose ID starts with `prefix`, which ends in `/` or is empty. */
15
27
  export declare const TokenCoverage: Schema.Union<readonly [Schema.Struct<{
@@ -26,7 +38,7 @@ export type TokenCoverage = typeof TokenCoverage.Type;
26
38
  */
27
39
  export declare const TokenFields: Schema.Struct<{
28
40
  readonly id: Schema.String;
29
- readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
41
+ readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
30
42
  readonly expiresAt: Schema.Number;
31
43
  readonly createdAt: Schema.Number;
32
44
  }>;
@@ -36,14 +48,14 @@ export declare const TokenInfo: Schema.Union<readonly [Schema.Struct<{
36
48
  readonly repo: Schema.String;
37
49
  readonly prefix: Schema.optionalKey<Schema.Never>;
38
50
  readonly id: Schema.String;
39
- readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
51
+ readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
40
52
  readonly expiresAt: Schema.Number;
41
53
  readonly createdAt: Schema.Number;
42
54
  }>, Schema.Struct<{
43
55
  readonly prefix: Schema.String;
44
56
  readonly repo: Schema.optionalKey<Schema.Never>;
45
57
  readonly id: Schema.String;
46
- readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
58
+ readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
47
59
  readonly expiresAt: Schema.Number;
48
60
  readonly createdAt: Schema.Number;
49
61
  }>]>;
@@ -52,7 +64,7 @@ export declare const TokenRecord: Schema.Union<readonly [Schema.Struct<{
52
64
  readonly repo: Schema.String;
53
65
  readonly prefix: Schema.optionalKey<Schema.Never>;
54
66
  readonly id: Schema.String;
55
- readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
67
+ readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
56
68
  readonly expiresAt: Schema.Number;
57
69
  readonly createdAt: Schema.Number;
58
70
  readonly subject: Schema.Struct<{
@@ -66,7 +78,7 @@ export declare const TokenRecord: Schema.Union<readonly [Schema.Struct<{
66
78
  readonly prefix: Schema.String;
67
79
  readonly repo: Schema.optionalKey<Schema.Never>;
68
80
  readonly id: Schema.String;
69
- readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
81
+ readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
70
82
  readonly expiresAt: Schema.Number;
71
83
  readonly createdAt: Schema.Number;
72
84
  readonly subject: Schema.Struct<{
@@ -83,7 +95,7 @@ export declare const CreatedToken: Schema.Union<readonly [Schema.Struct<{
83
95
  readonly repo: Schema.String;
84
96
  readonly prefix: Schema.optionalKey<Schema.Never>;
85
97
  readonly id: Schema.String;
86
- readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
98
+ readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
87
99
  readonly expiresAt: Schema.Number;
88
100
  readonly createdAt: Schema.Number;
89
101
  readonly subject: Schema.Struct<{
@@ -98,7 +110,7 @@ export declare const CreatedToken: Schema.Union<readonly [Schema.Struct<{
98
110
  readonly prefix: Schema.String;
99
111
  readonly repo: Schema.optionalKey<Schema.Never>;
100
112
  readonly id: Schema.String;
101
- readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
113
+ readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
102
114
  readonly expiresAt: Schema.Number;
103
115
  readonly createdAt: Schema.Number;
104
116
  readonly subject: Schema.Struct<{
@@ -121,7 +133,7 @@ export declare const TokenTarget: Schema.Union<readonly [Schema.String, Schema.S
121
133
  export type TokenTarget = typeof TokenTarget.Type;
122
134
  /** `subject` answers for the token; `actor` acts for them, and is left out when it's the same party. */
123
135
  export declare const TokenCreate: Schema.Struct<{
124
- readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
136
+ readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
125
137
  readonly expiresAt: Schema.Union<readonly [Schema.Number, Schema.Date]>;
126
138
  readonly subject: Schema.Struct<{
127
139
  readonly id: Schema.String;
@@ -197,7 +209,7 @@ export declare const create: (target: TokenTarget, input: TokenCreateInput) => E
197
209
  readonly repo: string;
198
210
  readonly prefix?: never;
199
211
  readonly id: string;
200
- readonly scope: "read" | "report" | "write";
212
+ readonly scope: "admin" | "read" | "report" | "write";
201
213
  readonly expiresAt: number;
202
214
  readonly createdAt: number;
203
215
  readonly subject: {
@@ -212,7 +224,7 @@ export declare const create: (target: TokenTarget, input: TokenCreateInput) => E
212
224
  readonly prefix: string;
213
225
  readonly repo?: never;
214
226
  readonly id: string;
215
- readonly scope: "read" | "report" | "write";
227
+ readonly scope: "admin" | "read" | "report" | "write";
216
228
  readonly expiresAt: number;
217
229
  readonly createdAt: number;
218
230
  readonly subject: {
@@ -228,7 +240,7 @@ export declare const list: (target: TokenTarget, input?: TokenListInput) => Effe
228
240
  readonly repo: string;
229
241
  readonly prefix?: never;
230
242
  readonly id: string;
231
- readonly scope: "read" | "report" | "write";
243
+ readonly scope: "admin" | "read" | "report" | "write";
232
244
  readonly expiresAt: number;
233
245
  readonly createdAt: number;
234
246
  readonly subject: {
@@ -242,7 +254,7 @@ export declare const list: (target: TokenTarget, input?: TokenListInput) => Effe
242
254
  readonly prefix: string;
243
255
  readonly repo?: never;
244
256
  readonly id: string;
245
- readonly scope: "read" | "report" | "write";
257
+ readonly scope: "admin" | "read" | "report" | "write";
246
258
  readonly expiresAt: number;
247
259
  readonly createdAt: number;
248
260
  readonly subject: {
@@ -257,7 +269,7 @@ export declare const get: (token: TokenId, input?: CallInput) => Effect.Effect<{
257
269
  readonly repo: string;
258
270
  readonly prefix?: never;
259
271
  readonly id: string;
260
- readonly scope: "read" | "report" | "write";
272
+ readonly scope: "admin" | "read" | "report" | "write";
261
273
  readonly expiresAt: number;
262
274
  readonly createdAt: number;
263
275
  readonly subject: {
@@ -271,7 +283,7 @@ export declare const get: (token: TokenId, input?: CallInput) => Effect.Effect<{
271
283
  readonly prefix: string;
272
284
  readonly repo?: never;
273
285
  readonly id: string;
274
- readonly scope: "read" | "report" | "write";
286
+ readonly scope: "admin" | "read" | "report" | "write";
275
287
  readonly expiresAt: number;
276
288
  readonly createdAt: number;
277
289
  readonly subject: {