@cat-factory/contracts 0.292.1 → 0.293.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 (40) hide show
  1. package/dist/github-pat-capability.d.ts +233 -0
  2. package/dist/github-pat-capability.d.ts.map +1 -0
  3. package/dist/github-pat-capability.js +265 -0
  4. package/dist/github-pat-capability.js.map +1 -0
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +2 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/provider-config.d.ts +3 -3
  10. package/dist/provider-config.d.ts.map +1 -1
  11. package/dist/provider-config.js +6 -0
  12. package/dist/provider-config.js.map +1 -1
  13. package/dist/public-api.d.ts +48 -0
  14. package/dist/public-api.d.ts.map +1 -1
  15. package/dist/public-api.js +12 -0
  16. package/dist/public-api.js.map +1 -1
  17. package/dist/public-provisioning.d.ts +668 -0
  18. package/dist/public-provisioning.d.ts.map +1 -0
  19. package/dist/public-provisioning.js +425 -0
  20. package/dist/public-provisioning.js.map +1 -0
  21. package/dist/routes/environments.d.ts +2 -2
  22. package/dist/routes/github.d.ts +63 -0
  23. package/dist/routes/github.d.ts.map +1 -1
  24. package/dist/routes/github.js +16 -0
  25. package/dist/routes/github.js.map +1 -1
  26. package/dist/routes/index.d.ts +1 -0
  27. package/dist/routes/index.d.ts.map +1 -1
  28. package/dist/routes/index.js +1 -0
  29. package/dist/routes/index.js.map +1 -1
  30. package/dist/routes/public-api.d.ts +14 -0
  31. package/dist/routes/public-api.d.ts.map +1 -1
  32. package/dist/routes/public-board.d.ts +14 -0
  33. package/dist/routes/public-board.d.ts.map +1 -1
  34. package/dist/routes/public-provisioning.d.ts +538 -0
  35. package/dist/routes/public-provisioning.d.ts.map +1 -0
  36. package/dist/routes/public-provisioning.js +128 -0
  37. package/dist/routes/public-provisioning.js.map +1 -0
  38. package/dist/routes/runners.d.ts +1 -1
  39. package/dist/routes/user-secret.d.ts +1 -1
  40. package/package.json +1 -1
@@ -0,0 +1,233 @@
1
+ import * as v from 'valibot';
2
+ /**
3
+ * Which credential the check looked at — the two shapes on which a PAT is what a run
4
+ * authenticates as. Named on the wire because the REMEDY differs: a `deployment` token is
5
+ * replaced by whoever runs the deployment, an `initiator` one by the signed-in user in their
6
+ * own settings, and a banner that could not tell them apart would send half its readers to a
7
+ * page they cannot act on.
8
+ */
9
+ export declare const githubPatSourceSchema: v.PicklistSchema<["deployment", "initiator"], undefined>;
10
+ export type GitHubPatSource = v.InferOutput<typeof githubPatSourceSchema>;
11
+ /**
12
+ * How a token's reach was determined, mirroring `describeGitHubPatScope`'s own classification.
13
+ * `unknown` is a token GitHub accepted while reporting no scopes and whose prefix is not the
14
+ * fine-grained one, so nothing about its breadth can be stated.
15
+ */
16
+ export declare const githubPatKindSchema: v.PicklistSchema<["classic", "fine_grained", "unknown"], undefined>;
17
+ export type GitHubPatKind = v.InferOutput<typeof githubPatKindSchema>;
18
+ /**
19
+ * The things a pipeline needs the token to be able to do. Kept to what actually stops work:
20
+ * every step from the coder onward pushes a branch, the merger opens and merges a pull
21
+ * request, and the coder/ci-fixer may edit `.github/workflows/*`.
22
+ *
23
+ * Read-only reach is absent on purpose. A token that cannot read the repository fails at
24
+ * `GET /user` or at the repo probe, which is `token_rejected` / an unreadable repo rather than
25
+ * a capability verdict.
26
+ */
27
+ export declare const githubPatCapabilitySchema: v.PicklistSchema<["push", "pullRequests", "workflows"], undefined>;
28
+ export type GitHubPatCapability = v.InferOutput<typeof githubPatCapabilitySchema>;
29
+ /** Every capability, as a plain tuple — the source of truth for iteration. */
30
+ export declare const GITHUB_PAT_CAPABILITIES: ["push", "pullRequests", "workflows"];
31
+ /**
32
+ * Whether the token holds one capability.
33
+ * - `granted` — positively established (a classic scope GitHub named, or a repo probe that
34
+ * reported `permissions.push`).
35
+ * - `missing` — positively established as ABSENT. The only status that raises a banner.
36
+ * - `unknown` — not determinable from what GitHub exposes. NOT a synonym for either: a
37
+ * fine-grained token's pull-request and workflow permissions have no endpoint that reports
38
+ * them, and rendering that as `granted` would silence a real gap while rendering it as
39
+ * `missing` would nag every correctly-configured fine-grained deployment forever.
40
+ */
41
+ export declare const githubPatCapabilityStatusSchema: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
42
+ export type GitHubPatCapabilityStatus = v.InferOutput<typeof githubPatCapabilityStatusSchema>;
43
+ /**
44
+ * The per-capability verdict. Spelled as an explicit object rather than a `v.record` over the
45
+ * picklist so a new capability fails the typecheck at every construction site instead of
46
+ * silently defaulting to absent; `githubPatCapabilities.spec.ts` pins the two lists together.
47
+ */
48
+ export declare const githubPatCapabilitiesSchema: v.ObjectSchema<{
49
+ readonly push: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
50
+ readonly pullRequests: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
51
+ readonly workflows: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
52
+ }, undefined>;
53
+ export type GitHubPatCapabilities = v.InferOutput<typeof githubPatCapabilitiesSchema>;
54
+ /**
55
+ * The capabilities whose absence STOPS a pipeline, as opposed to narrowing what it may change.
56
+ *
57
+ * `workflows` is deliberately not among them, and it is the exclusion worth stating: without it
58
+ * a run pushes, opens its PR and merges exactly as normal, and fails only on the subset of
59
+ * changes that touch `.github/workflows/*`. Treating that as blocking would raise the loud
60
+ * banner on the many deployments whose agents never edit CI, which is how a warning surface
61
+ * teaches people to dismiss it unread.
62
+ */
63
+ export declare const GITHUB_PAT_BLOCKING_CAPABILITIES: readonly ["push", "pullRequests"];
64
+ /**
65
+ * The classic scopes a replacement token needs, and the single source of truth for them: the
66
+ * local facade's setup link, the SPA's re-mint link and this module's own classification all
67
+ * read this one list.
68
+ *
69
+ * `repo` covers cloning, pushing a branch, opening the pull request, reading the head's Actions
70
+ * check runs for the CI gate and merging. `workflow` is needed only to push a change that
71
+ * touches a workflow file, but it is pre-selected anyway: a token is minted once, and sending
72
+ * someone back to GitHub a second time the first time an agent edits CI is worse than the
73
+ * narrower grant is worth. What it costs is stated in `githubPatScope.ts`.
74
+ */
75
+ export declare const GITHUB_PAT_CLASSIC_SCOPES: readonly ['repo', 'workflow'];
76
+ /**
77
+ * The fine-grained REPOSITORY permissions a replacement token needs, for the banner to list.
78
+ * Prose rather than a query parameter because GitHub's fine-grained token form accepts no
79
+ * prefill: see {@link githubPatCreateUrl}.
80
+ */
81
+ export declare const GITHUB_PAT_FINE_GRAINED_PERMISSIONS: readonly ['contents:write', 'pull_requests:write', 'workflows:write'];
82
+ /**
83
+ * Where each token kind is minted, relative to the instance's web root. Exported because the
84
+ * SPA's generic connect-box link (`vcsTokenCreateUrl`, which offers no scopes) has to land on
85
+ * the same page this module's pre-filled link does; two spellings of GitHub's settings path
86
+ * would send the two surfaces to different places the day GitHub moves one.
87
+ */
88
+ export declare const GITHUB_TOKEN_CREATE_PATHS: Record<GitHubPatKind, string>;
89
+ /**
90
+ * The URL that mints a replacement token, pre-filled as far as GitHub allows.
91
+ *
92
+ * The KIND is carried over from the token being replaced rather than chosen for the user: a
93
+ * deployment that standardised on fine-grained tokens should not be pushed back to a classic
94
+ * one by a warning banner, and vice versa.
95
+ *
96
+ * Only the CLASSIC form takes a prefill. GitHub's fine-grained form accepts no permission query
97
+ * parameters at all, so that half of the fork is a bare link and the caller must render
98
+ * {@link GITHUB_PAT_FINE_GRAINED_PERMISSIONS} beside it — a link that silently arrived with
99
+ * nothing selected would read as "these are already set for you", which is precisely the
100
+ * misreading that produced the missing permission in the first place.
101
+ *
102
+ * `webUrl` is the instance the workspace is bound to; absent, the caller has already decided to
103
+ * fall back to the public host (the SPA's `vcsTokenCreateUrl` states why that is safe for a
104
+ * settings page and not for a repository link).
105
+ */
106
+ export declare function githubPatCreateUrl(kind: GitHubPatKind, options: {
107
+ webUrl: string;
108
+ description?: string;
109
+ }): string;
110
+ /**
111
+ * What the check found about the token a workspace's runs would use.
112
+ *
113
+ * `probedRepos` / `unprobedRepoCount` exist because the fine-grained answer is a SAMPLE: the
114
+ * probe reads the repositories this board's services target, capped, and a reader who assumed
115
+ * it read all of them would take a clean verdict as a guarantee about a repository nobody
116
+ * looked at. Both are empty/zero for a classic token, whose scopes answer for every repository
117
+ * at once.
118
+ *
119
+ * The token's raw scope list is deliberately NOT here. Nothing renders it, and the one source
120
+ * whose scopes this endpoint could expose is `deployment` — a shared operational credential
121
+ * whose breadth every workspace member would then be able to read off a route that lets reads
122
+ * through. The per-capability verdict is what a reader can act on; the scope list is what the
123
+ * person who pasted the token already saw on the connect form.
124
+ */
125
+ export declare const githubPatCapabilityReportSchema: v.ObjectSchema<{
126
+ readonly source: v.PicklistSchema<["deployment", "initiator"], undefined>;
127
+ readonly kind: v.PicklistSchema<["classic", "fine_grained", "unknown"], undefined>;
128
+ readonly capabilities: v.ObjectSchema<{
129
+ readonly push: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
130
+ readonly pullRequests: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
131
+ readonly workflows: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
132
+ }, undefined>;
133
+ /** The `owner/name` of each repository the probe actually asked GitHub about. */
134
+ readonly probedRepos: v.ArraySchema<v.StringSchema<undefined>, undefined>;
135
+ /**
136
+ * The probed repositories GitHub answered 404 for. A subset of {@link probedRepos}, and the
137
+ * one detail that turns "push is missing" into something a reader can act on for a
138
+ * fine-grained token: these are the repositories the token was not granted (GitHub 404s
139
+ * rather than 403s for a repository a credential may not see, so it cannot leak existence).
140
+ */
141
+ readonly deniedRepos: v.ArraySchema<v.StringSchema<undefined>, undefined>;
142
+ /** Targeted repositories the probe's cap left unread, so a verdict never reads as exhaustive. */
143
+ readonly unprobedRepoCount: v.NumberSchema<undefined>;
144
+ /** The instance the token authenticates against, for the re-mint link. Null ⇒ not derivable. */
145
+ readonly webUrl: v.NullableSchema<v.StringSchema<undefined>, undefined>;
146
+ }, undefined>;
147
+ export type GitHubPatCapabilityReport = v.InferOutput<typeof githubPatCapabilityReportSchema>;
148
+ /**
149
+ * The check's outcome. A variant rather than a nullable report because the four states need
150
+ * four different reactions, and three of them are not "the token lacks something":
151
+ *
152
+ * - `not_applicable` — no PAT is in play (a GitHub App deployment, GitLab, or nothing
153
+ * connected at all), or this board's services target no GitHub repository, so no run here
154
+ * would ever authenticate with one. There is no token whose reach could be wrong.
155
+ * - `token_rejected` — GitHub refused the token outright (401/403). Blocking, and a strictly
156
+ * worse problem than a missing scope, so it gets its own state instead of collapsing into
157
+ * "everything is missing". It carries `source` for the same reason the report does: the
158
+ * remedy for a rejected DEPLOYMENT credential is not the one for a rejected personal token,
159
+ * and this is the state in which the reader is least able to work that out for themselves.
160
+ * - `probe_failed` — GitHub could not be reached, refused to answer for now (a rate limit),
161
+ * or answered in a way the probe could not read. NOT a verdict about the token: an upstream
162
+ * condition must never render as a permissions problem, because the remedy it would
163
+ * advertise (mint a new token) is wrong and costly.
164
+ * - `checked` — a report was produced. It may still be entirely clean.
165
+ */
166
+ export declare const githubPatCheckSchema: v.VariantSchema<"state", [v.ObjectSchema<{
167
+ readonly state: v.LiteralSchema<"not_applicable", undefined>;
168
+ }, undefined>, v.ObjectSchema<{
169
+ readonly state: v.LiteralSchema<"token_rejected", undefined>;
170
+ readonly status: v.NumberSchema<undefined>;
171
+ readonly source: v.PicklistSchema<["deployment", "initiator"], undefined>;
172
+ }, undefined>, v.ObjectSchema<{
173
+ readonly state: v.LiteralSchema<"probe_failed", undefined>;
174
+ readonly message: v.StringSchema<undefined>;
175
+ }, undefined>, v.ObjectSchema<{
176
+ readonly state: v.LiteralSchema<"checked", undefined>;
177
+ readonly report: v.ObjectSchema<{
178
+ readonly source: v.PicklistSchema<["deployment", "initiator"], undefined>;
179
+ readonly kind: v.PicklistSchema<["classic", "fine_grained", "unknown"], undefined>;
180
+ readonly capabilities: v.ObjectSchema<{
181
+ readonly push: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
182
+ readonly pullRequests: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
183
+ readonly workflows: v.PicklistSchema<["granted", "missing", "unknown"], undefined>;
184
+ }, undefined>;
185
+ /** The `owner/name` of each repository the probe actually asked GitHub about. */
186
+ readonly probedRepos: v.ArraySchema<v.StringSchema<undefined>, undefined>;
187
+ /**
188
+ * The probed repositories GitHub answered 404 for. A subset of {@link probedRepos}, and the
189
+ * one detail that turns "push is missing" into something a reader can act on for a
190
+ * fine-grained token: these are the repositories the token was not granted (GitHub 404s
191
+ * rather than 403s for a repository a credential may not see, so it cannot leak existence).
192
+ */
193
+ readonly deniedRepos: v.ArraySchema<v.StringSchema<undefined>, undefined>;
194
+ /** Targeted repositories the probe's cap left unread, so a verdict never reads as exhaustive. */
195
+ readonly unprobedRepoCount: v.NumberSchema<undefined>;
196
+ /** The instance the token authenticates against, for the re-mint link. Null ⇒ not derivable. */
197
+ readonly webUrl: v.NullableSchema<v.StringSchema<undefined>, undefined>;
198
+ }, undefined>;
199
+ }, undefined>], undefined>;
200
+ export type GitHubPatCheck = v.InferOutput<typeof githubPatCheckSchema>;
201
+ /**
202
+ * The capabilities a report positively established as ABSENT, split by whether losing them
203
+ * stops a pipeline. `unknown` is in neither list by construction — see
204
+ * {@link githubPatCapabilityStatusSchema} for why it may not be folded into either.
205
+ *
206
+ * The one reduction both the banner and its tests read, so "is there anything to say" and "what
207
+ * do we say" can never disagree about which capability belongs on which side.
208
+ */
209
+ export declare function missingGitHubPatCapabilities(report: GitHubPatCapabilityReport): {
210
+ blocking: GitHubPatCapability[];
211
+ advisory: GitHubPatCapability[];
212
+ };
213
+ /**
214
+ * WHOSE credential the check judged, or null when it judged none.
215
+ *
216
+ * The one place that answer is derived, because it decides which remedy a surface offers: a
217
+ * `deployment` token is replaced by whoever runs the deployment, an `initiator` one by the
218
+ * signed-in user in their own settings, and sending one reader to the other's remedy is worse
219
+ * than saying nothing. Two of the four states carry a source and two cannot have one, which is
220
+ * the shape a caller gets wrong by reading `report?.source` and letting the absent case fall
221
+ * through to whichever branch its ternary happened to end on.
222
+ */
223
+ export declare function githubPatCheckSource(check: GitHubPatCheck): GitHubPatSource | null;
224
+ /**
225
+ * Whether a check warrants interrupting the user with a banner.
226
+ *
227
+ * True for a rejected token and for any established BLOCKING gap. False for `probe_failed` (an
228
+ * outage is not a permissions problem), for `not_applicable`, and for a report whose only
229
+ * findings are advisory or `unknown` — those are visible in the settings surface, where someone
230
+ * who came to look at the connection can act on them, rather than over the board.
231
+ */
232
+ export declare function githubPatCheckNeedsAttention(check: GitHubPatCheck): boolean;
233
+ //# sourceMappingURL=github-pat-capability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-pat-capability.d.ts","sourceRoot":"","sources":["../src/github-pat-capability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAwB5B;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,0DAA0C,CAAA;AAC5E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,qEAAqD,CAAA;AACrF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,oEAAoD,CAAA;AAC1F,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,uCAAoC,CAAA;AAExE;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,gEAAgD,CAAA;AAC5F,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;aAItC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAA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AG,eAAe,GAAG,IAAI,CAYlF;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAI3E"}
@@ -0,0 +1,265 @@
1
+ import * as v from 'valibot';
2
+ // ---------------------------------------------------------------------------
3
+ // What the GitHub personal access token a workspace's runs authenticate with can actually
4
+ // DO, answered once the board has loaded rather than discovered when a run fails at its push.
5
+ //
6
+ // A PAT is the operational credential on two deployment shapes: local mode, where one token is
7
+ // both the sign-in identity and what every agent step clones, pushes and merges with, and a
8
+ // hosted deployment whose run initiator stored a `github_pat`, which OUTRANKS the App
9
+ // installation on the run path (`backend/docs/security-model.md`, Layer 3). On both, a token
10
+ // minted without `repo` reaches its first failure several steps into a pipeline, as a 403 out
11
+ // of a container, after the run has already spent money.
12
+ //
13
+ // This module holds the vocabulary BOTH sides agree about: the backend probes, the SPA renders
14
+ // the verdict and the re-mint link, so the capability list, which capabilities are BLOCKING,
15
+ // and the scopes a replacement token needs live here instead of being restated on each side.
16
+ //
17
+ // Deliberately not a boolean, and deliberately per-capability. GitHub reports a CLASSIC token's
18
+ // scopes in the `x-oauth-scopes` header and reports nothing whatsoever for a fine-grained one,
19
+ // whose reach is knowable only by probing a repository — which answers for push and answers
20
+ // nothing for the rest. "Not granted" and "not knowable" are different facts with different
21
+ // remedies, so each capability carries its own tri-state and an unknowable one says so.
22
+ // ---------------------------------------------------------------------------
23
+ /**
24
+ * Which credential the check looked at — the two shapes on which a PAT is what a run
25
+ * authenticates as. Named on the wire because the REMEDY differs: a `deployment` token is
26
+ * replaced by whoever runs the deployment, an `initiator` one by the signed-in user in their
27
+ * own settings, and a banner that could not tell them apart would send half its readers to a
28
+ * page they cannot act on.
29
+ */
30
+ export const githubPatSourceSchema = v.picklist(['deployment', 'initiator']);
31
+ /**
32
+ * How a token's reach was determined, mirroring `describeGitHubPatScope`'s own classification.
33
+ * `unknown` is a token GitHub accepted while reporting no scopes and whose prefix is not the
34
+ * fine-grained one, so nothing about its breadth can be stated.
35
+ */
36
+ export const githubPatKindSchema = v.picklist(['classic', 'fine_grained', 'unknown']);
37
+ /**
38
+ * The things a pipeline needs the token to be able to do. Kept to what actually stops work:
39
+ * every step from the coder onward pushes a branch, the merger opens and merges a pull
40
+ * request, and the coder/ci-fixer may edit `.github/workflows/*`.
41
+ *
42
+ * Read-only reach is absent on purpose. A token that cannot read the repository fails at
43
+ * `GET /user` or at the repo probe, which is `token_rejected` / an unreadable repo rather than
44
+ * a capability verdict.
45
+ */
46
+ export const githubPatCapabilitySchema = v.picklist(['push', 'pullRequests', 'workflows']);
47
+ /** Every capability, as a plain tuple — the source of truth for iteration. */
48
+ export const GITHUB_PAT_CAPABILITIES = githubPatCapabilitySchema.options;
49
+ /**
50
+ * Whether the token holds one capability.
51
+ * - `granted` — positively established (a classic scope GitHub named, or a repo probe that
52
+ * reported `permissions.push`).
53
+ * - `missing` — positively established as ABSENT. The only status that raises a banner.
54
+ * - `unknown` — not determinable from what GitHub exposes. NOT a synonym for either: a
55
+ * fine-grained token's pull-request and workflow permissions have no endpoint that reports
56
+ * them, and rendering that as `granted` would silence a real gap while rendering it as
57
+ * `missing` would nag every correctly-configured fine-grained deployment forever.
58
+ */
59
+ export const githubPatCapabilityStatusSchema = v.picklist(['granted', 'missing', 'unknown']);
60
+ /**
61
+ * The per-capability verdict. Spelled as an explicit object rather than a `v.record` over the
62
+ * picklist so a new capability fails the typecheck at every construction site instead of
63
+ * silently defaulting to absent; `githubPatCapabilities.spec.ts` pins the two lists together.
64
+ */
65
+ export const githubPatCapabilitiesSchema = v.object({
66
+ push: githubPatCapabilityStatusSchema,
67
+ pullRequests: githubPatCapabilityStatusSchema,
68
+ workflows: githubPatCapabilityStatusSchema,
69
+ });
70
+ /**
71
+ * The capabilities whose absence STOPS a pipeline, as opposed to narrowing what it may change.
72
+ *
73
+ * `workflows` is deliberately not among them, and it is the exclusion worth stating: without it
74
+ * a run pushes, opens its PR and merges exactly as normal, and fails only on the subset of
75
+ * changes that touch `.github/workflows/*`. Treating that as blocking would raise the loud
76
+ * banner on the many deployments whose agents never edit CI, which is how a warning surface
77
+ * teaches people to dismiss it unread.
78
+ */
79
+ export const GITHUB_PAT_BLOCKING_CAPABILITIES = [
80
+ 'push',
81
+ 'pullRequests',
82
+ ];
83
+ /**
84
+ * The classic scopes a replacement token needs, and the single source of truth for them: the
85
+ * local facade's setup link, the SPA's re-mint link and this module's own classification all
86
+ * read this one list.
87
+ *
88
+ * `repo` covers cloning, pushing a branch, opening the pull request, reading the head's Actions
89
+ * check runs for the CI gate and merging. `workflow` is needed only to push a change that
90
+ * touches a workflow file, but it is pre-selected anyway: a token is minted once, and sending
91
+ * someone back to GitHub a second time the first time an agent edits CI is worse than the
92
+ * narrower grant is worth. What it costs is stated in `githubPatScope.ts`.
93
+ */
94
+ export const GITHUB_PAT_CLASSIC_SCOPES = ['repo', 'workflow'];
95
+ /**
96
+ * The fine-grained REPOSITORY permissions a replacement token needs, for the banner to list.
97
+ * Prose rather than a query parameter because GitHub's fine-grained token form accepts no
98
+ * prefill: see {@link githubPatCreateUrl}.
99
+ */
100
+ export const GITHUB_PAT_FINE_GRAINED_PERMISSIONS = [
101
+ 'contents:write',
102
+ 'pull_requests:write',
103
+ 'workflows:write',
104
+ ];
105
+ /**
106
+ * Where each token kind is minted, relative to the instance's web root. Exported because the
107
+ * SPA's generic connect-box link (`vcsTokenCreateUrl`, which offers no scopes) has to land on
108
+ * the same page this module's pre-filled link does; two spellings of GitHub's settings path
109
+ * would send the two surfaces to different places the day GitHub moves one.
110
+ */
111
+ export const GITHUB_TOKEN_CREATE_PATHS = {
112
+ classic: '/settings/tokens/new',
113
+ fine_grained: '/settings/personal-access-tokens/new',
114
+ // Nothing is known about the token in play, so the form that CAN be pre-filled is the better
115
+ // landing place: it arrives with the right scopes ticked, and a reader who wanted the
116
+ // fine-grained one is one link away on the same settings page.
117
+ unknown: '/settings/tokens/new',
118
+ };
119
+ /** Strip a trailing slash so a host and a path never join into a double slash. */
120
+ function root(webUrl) {
121
+ return webUrl.replace(/\/+$/, '');
122
+ }
123
+ /**
124
+ * The URL that mints a replacement token, pre-filled as far as GitHub allows.
125
+ *
126
+ * The KIND is carried over from the token being replaced rather than chosen for the user: a
127
+ * deployment that standardised on fine-grained tokens should not be pushed back to a classic
128
+ * one by a warning banner, and vice versa.
129
+ *
130
+ * Only the CLASSIC form takes a prefill. GitHub's fine-grained form accepts no permission query
131
+ * parameters at all, so that half of the fork is a bare link and the caller must render
132
+ * {@link GITHUB_PAT_FINE_GRAINED_PERMISSIONS} beside it — a link that silently arrived with
133
+ * nothing selected would read as "these are already set for you", which is precisely the
134
+ * misreading that produced the missing permission in the first place.
135
+ *
136
+ * `webUrl` is the instance the workspace is bound to; absent, the caller has already decided to
137
+ * fall back to the public host (the SPA's `vcsTokenCreateUrl` states why that is safe for a
138
+ * settings page and not for a repository link).
139
+ */
140
+ export function githubPatCreateUrl(kind, options) {
141
+ const page = `${root(options.webUrl)}${GITHUB_TOKEN_CREATE_PATHS[kind]}`;
142
+ if (kind === 'fine_grained')
143
+ return page;
144
+ // Hand-built rather than via `URLSearchParams`: this package is dependency-free and compiles
145
+ // with neither the DOM nor the Node lib, and it is imported by the SPA, both facades and the
146
+ // local runtime alike — so the one place the query string is assembled cannot assume a global.
147
+ const query = [
148
+ `scopes=${encodeURIComponent(GITHUB_PAT_CLASSIC_SCOPES.join(','))}`,
149
+ ...(options.description ? [`description=${encodeURIComponent(options.description)}`] : []),
150
+ ];
151
+ return `${page}?${query.join('&')}`;
152
+ }
153
+ /**
154
+ * What the check found about the token a workspace's runs would use.
155
+ *
156
+ * `probedRepos` / `unprobedRepoCount` exist because the fine-grained answer is a SAMPLE: the
157
+ * probe reads the repositories this board's services target, capped, and a reader who assumed
158
+ * it read all of them would take a clean verdict as a guarantee about a repository nobody
159
+ * looked at. Both are empty/zero for a classic token, whose scopes answer for every repository
160
+ * at once.
161
+ *
162
+ * The token's raw scope list is deliberately NOT here. Nothing renders it, and the one source
163
+ * whose scopes this endpoint could expose is `deployment` — a shared operational credential
164
+ * whose breadth every workspace member would then be able to read off a route that lets reads
165
+ * through. The per-capability verdict is what a reader can act on; the scope list is what the
166
+ * person who pasted the token already saw on the connect form.
167
+ */
168
+ export const githubPatCapabilityReportSchema = v.object({
169
+ source: githubPatSourceSchema,
170
+ kind: githubPatKindSchema,
171
+ capabilities: githubPatCapabilitiesSchema,
172
+ /** The `owner/name` of each repository the probe actually asked GitHub about. */
173
+ probedRepos: v.array(v.string()),
174
+ /**
175
+ * The probed repositories GitHub answered 404 for. A subset of {@link probedRepos}, and the
176
+ * one detail that turns "push is missing" into something a reader can act on for a
177
+ * fine-grained token: these are the repositories the token was not granted (GitHub 404s
178
+ * rather than 403s for a repository a credential may not see, so it cannot leak existence).
179
+ */
180
+ deniedRepos: v.array(v.string()),
181
+ /** Targeted repositories the probe's cap left unread, so a verdict never reads as exhaustive. */
182
+ unprobedRepoCount: v.number(),
183
+ /** The instance the token authenticates against, for the re-mint link. Null ⇒ not derivable. */
184
+ webUrl: v.nullable(v.string()),
185
+ });
186
+ /**
187
+ * The check's outcome. A variant rather than a nullable report because the four states need
188
+ * four different reactions, and three of them are not "the token lacks something":
189
+ *
190
+ * - `not_applicable` — no PAT is in play (a GitHub App deployment, GitLab, or nothing
191
+ * connected at all), or this board's services target no GitHub repository, so no run here
192
+ * would ever authenticate with one. There is no token whose reach could be wrong.
193
+ * - `token_rejected` — GitHub refused the token outright (401/403). Blocking, and a strictly
194
+ * worse problem than a missing scope, so it gets its own state instead of collapsing into
195
+ * "everything is missing". It carries `source` for the same reason the report does: the
196
+ * remedy for a rejected DEPLOYMENT credential is not the one for a rejected personal token,
197
+ * and this is the state in which the reader is least able to work that out for themselves.
198
+ * - `probe_failed` — GitHub could not be reached, refused to answer for now (a rate limit),
199
+ * or answered in a way the probe could not read. NOT a verdict about the token: an upstream
200
+ * condition must never render as a permissions problem, because the remedy it would
201
+ * advertise (mint a new token) is wrong and costly.
202
+ * - `checked` — a report was produced. It may still be entirely clean.
203
+ */
204
+ export const githubPatCheckSchema = v.variant('state', [
205
+ v.object({ state: v.literal('not_applicable') }),
206
+ v.object({
207
+ state: v.literal('token_rejected'),
208
+ status: v.number(),
209
+ source: githubPatSourceSchema,
210
+ }),
211
+ v.object({ state: v.literal('probe_failed'), message: v.string() }),
212
+ v.object({ state: v.literal('checked'), report: githubPatCapabilityReportSchema }),
213
+ ]);
214
+ /**
215
+ * The capabilities a report positively established as ABSENT, split by whether losing them
216
+ * stops a pipeline. `unknown` is in neither list by construction — see
217
+ * {@link githubPatCapabilityStatusSchema} for why it may not be folded into either.
218
+ *
219
+ * The one reduction both the banner and its tests read, so "is there anything to say" and "what
220
+ * do we say" can never disagree about which capability belongs on which side.
221
+ */
222
+ export function missingGitHubPatCapabilities(report) {
223
+ const missing = GITHUB_PAT_CAPABILITIES.filter((c) => report.capabilities[c] === 'missing');
224
+ const isBlocking = (c) => GITHUB_PAT_BLOCKING_CAPABILITIES.includes(c);
225
+ return { blocking: missing.filter(isBlocking), advisory: missing.filter((c) => !isBlocking(c)) };
226
+ }
227
+ /**
228
+ * WHOSE credential the check judged, or null when it judged none.
229
+ *
230
+ * The one place that answer is derived, because it decides which remedy a surface offers: a
231
+ * `deployment` token is replaced by whoever runs the deployment, an `initiator` one by the
232
+ * signed-in user in their own settings, and sending one reader to the other's remedy is worse
233
+ * than saying nothing. Two of the four states carry a source and two cannot have one, which is
234
+ * the shape a caller gets wrong by reading `report?.source` and letting the absent case fall
235
+ * through to whichever branch its ternary happened to end on.
236
+ */
237
+ export function githubPatCheckSource(check) {
238
+ switch (check.state) {
239
+ case 'checked':
240
+ return check.report.source;
241
+ case 'token_rejected':
242
+ return check.source;
243
+ // Neither state judged a credential: `not_applicable` found none in play, and
244
+ // `probe_failed` never got an answer about the one it found.
245
+ case 'not_applicable':
246
+ case 'probe_failed':
247
+ return null;
248
+ }
249
+ }
250
+ /**
251
+ * Whether a check warrants interrupting the user with a banner.
252
+ *
253
+ * True for a rejected token and for any established BLOCKING gap. False for `probe_failed` (an
254
+ * outage is not a permissions problem), for `not_applicable`, and for a report whose only
255
+ * findings are advisory or `unknown` — those are visible in the settings surface, where someone
256
+ * who came to look at the connection can act on them, rather than over the board.
257
+ */
258
+ export function githubPatCheckNeedsAttention(check) {
259
+ if (check.state === 'token_rejected')
260
+ return true;
261
+ if (check.state !== 'checked')
262
+ return false;
263
+ return missingGitHubPatCapabilities(check.report).blocking.length > 0;
264
+ }
265
+ //# sourceMappingURL=github-pat-capability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-pat-capability.js","sourceRoot":"","sources":["../src/github-pat-capability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,0FAA0F;AAC1F,8FAA8F;AAC9F,EAAE;AACF,+FAA+F;AAC/F,4FAA4F;AAC5F,sFAAsF;AACtF,6FAA6F;AAC7F,8FAA8F;AAC9F,yDAAyD;AACzD,EAAE;AACF,+FAA+F;AAC/F,6FAA6F;AAC7F,6FAA6F;AAC7F,EAAE;AACF,gGAAgG;AAChG,+FAA+F;AAC/F,4FAA4F;AAC5F,4FAA4F;AAC5F,wFAAwF;AACxF,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAA;AAG5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC,CAAA;AAGrF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC,CAAA;AAG1F,8EAA8E;AAC9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBA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AAK,gBAAgB;QAAE,OAAO,IAAI,CAAA;IACjD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAA;IAC3C,OAAO,4BAA4B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAA;AACvE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -59,6 +59,7 @@ export * from './bootstrap.js';
59
59
  export * from './env-config-repair.js';
60
60
  export * from './environment-test.js';
61
61
  export * from './infra-setup.js';
62
+ export * from './github-pat-capability.js';
62
63
  export * from './snapshot.js';
63
64
  export * from './sso.js';
64
65
  export * from './board-scan.js';
@@ -120,6 +121,7 @@ export * from './api-keys.js';
120
121
  export * from './public-api-keys.js';
121
122
  export * from './public-api.js';
122
123
  export * from './public-board.js';
124
+ export * from './public-provisioning.js';
123
125
  export * from './public-evidence.js';
124
126
  export * from './public-spec.js';
125
127
  export * from './public-merge-evidence.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;A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ClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -59,6 +59,7 @@ export * from './bootstrap.js';
59
59
  export * from './env-config-repair.js';
60
60
  export * from './environment-test.js';
61
61
  export * from './infra-setup.js';
62
+ export * from './github-pat-capability.js';
62
63
  export * from './snapshot.js';
63
64
  export * from './sso.js';
64
65
  export * from './board-scan.js';
@@ -120,6 +121,7 @@ export * from './api-keys.js';
120
121
  export * from './public-api-keys.js';
121
122
  export * from './public-api.js';
122
123
  export * from './public-board.js';
124
+ export * from './public-provisioning.js';
123
125
  export * from './public-evidence.js';
124
126
  export * from './public-spec.js';
125
127
  export * from './public-merge-evidence.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,CAAA;AACtC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BAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
@@ -179,10 +179,10 @@ export type ProviderDescriptor = v.InferOutput<typeof providerDescriptorSchema>;
179
179
  * incident. Machine-readable, because the backend does not localize prose — the SPA maps the
180
180
  * `code` to its own copy and keeps `message` only as the untranslated last resort.
181
181
  */
182
- export declare const connectionWarningCodeSchema: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path", "github_pat_classic_account_wide", "github_pat_scopes_beyond_need", "github_pat_scope_unreadable"], undefined>;
182
+ export declare const connectionWarningCodeSchema: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path", "github_pat_classic_account_wide", "github_pat_scopes_beyond_need", "github_pat_scope_unreadable", "github_pat_no_scopes"], undefined>;
183
183
  export type ConnectionWarningCode = v.InferOutput<typeof connectionWarningCodeSchema>;
184
184
  export declare const connectionWarningSchema: v.ObjectSchema<{
185
- readonly code: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path", "github_pat_classic_account_wide", "github_pat_scopes_beyond_need", "github_pat_scope_unreadable"], undefined>;
185
+ readonly code: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path", "github_pat_classic_account_wide", "github_pat_scopes_beyond_need", "github_pat_scope_unreadable", "github_pat_no_scopes"], undefined>;
186
186
  /** The backend's own English account of the gap, also written to the deployment log. */
187
187
  readonly message: v.StringSchema<undefined>;
188
188
  }, undefined>;
@@ -223,7 +223,7 @@ export declare const connectionTestResultSchema: v.ObjectSchema<{
223
223
  * find out. Absent/empty ⇒ nothing to report.
224
224
  */
225
225
  readonly warnings: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
226
- readonly code: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path", "github_pat_classic_account_wide", "github_pat_scopes_beyond_need", "github_pat_scope_unreadable"], undefined>;
226
+ readonly code: v.PicklistSchema<["runner_manifest_no_release", "runner_manifest_no_status_path", "github_pat_classic_account_wide", "github_pat_scopes_beyond_need", "github_pat_scope_unreadable", "github_pat_no_scopes"], undefined>;
227
227
  /** The backend's own English account of the gap, also written to the deployment log. */
228
228
  readonly message: v.StringSchema<undefined>;
229
229
  }, undefined>, undefined>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"provider-config.d.ts","sourceRoot":"","sources":["../src/provider-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAc5B;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,+FAOxC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEzF,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB;IACpC,iFAAiF;;IAEjF,sCAAsC;;IAEtC,kDAAkD;;IAElD,kCAAkC;;IAElC,gEAAgE;;IAEhE,oEAAoE;;IAEpE,+CAA+C;;IAE/C,oCAAoC;;;;;IAEpC;;;;;;;OAOG;;aAEH,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEj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AC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF,2DAA2D;AAC3D,eAAO,MAAM,4BAA4B,mDAAmC,CAAA;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF,0DAA0D;AAC1D,eAAO,MAAM,yBAAyB;;;IAGpC,uFAAuF;;aAEvF,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,uFAAuF;AACvF,eAAO,MAAM,0BAA0B;;;;;QANrC,uFAAuF;;;aASvF,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB;;;;;;IAMpC;;;OAGG;;;;;QAhCH,uFAAuF;;;aAmCvF,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
@@ -148,6 +148,12 @@ export const connectionWarningCodeSchema = v.picklist([
148
148
  // its reach. Reported rather than assumed: "unknown breadth" and "narrow" are not the same
149
149
  // fact, and treating them alike is exactly how an over-broad token stays silent.
150
150
  'github_pat_scope_unreadable',
151
+ // GitHub returned the scope header with an EMPTY value: a classic token minted with nothing
152
+ // ticked. Distinct from the code above because it is the opposite fact — a positively stated
153
+ // "this token grants no scopes at all" rather than an unreadable one — and it is the state a
154
+ // reader is most likely to have produced by accident, since GitHub's form ticks nothing by
155
+ // default and the token still authenticates.
156
+ 'github_pat_no_scopes',
151
157
  ]);
152
158
  export const connectionWarningSchema = v.object({
153
159
  code: connectionWarningCodeSchema,