@sublang/spex 6.0.0 → 7.0.0-beta.2

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 (108) hide show
  1. package/README.md +419 -12
  2. package/dist/cli.js +12 -1
  3. package/dist/commands/add.d.ts +1 -1
  4. package/dist/commands/add.js +2 -2
  5. package/dist/commands/environment.d.ts +3 -3
  6. package/dist/commands/environment.js +5 -7
  7. package/dist/commands/export.js +2 -2
  8. package/dist/commands/home.d.ts +2 -2
  9. package/dist/commands/home.js +3 -3
  10. package/dist/commands/list.js +1 -1
  11. package/dist/commands/login.js +12 -7
  12. package/dist/commands/logout.js +2 -3
  13. package/dist/commands/publish.js +1 -1
  14. package/dist/commands/remove.js +1 -1
  15. package/dist/commands/run.d.ts +1 -1
  16. package/dist/commands/run.js +16 -0
  17. package/dist/commands/settle.d.ts +1 -1
  18. package/dist/commands/settle.js +1 -1
  19. package/dist/guards/approval.d.ts +56 -0
  20. package/dist/guards/approval.js +158 -0
  21. package/dist/guards/checks.d.ts +207 -0
  22. package/dist/guards/checks.js +681 -0
  23. package/dist/guards/commands.d.ts +15 -0
  24. package/dist/guards/commands.js +313 -0
  25. package/dist/guards/copy.d.ts +67 -0
  26. package/dist/guards/copy.js +306 -0
  27. package/dist/guards/declaration.d.ts +45 -0
  28. package/dist/guards/declaration.js +224 -0
  29. package/dist/guards/files.d.ts +137 -0
  30. package/dist/guards/files.js +544 -0
  31. package/dist/guards/harness.d.ts +58 -0
  32. package/dist/guards/harness.js +420 -0
  33. package/dist/guards/items.d.ts +61 -0
  34. package/dist/guards/items.js +161 -0
  35. package/dist/guards/patch.d.ts +55 -0
  36. package/dist/guards/patch.js +258 -0
  37. package/dist/guards/processes.d.ts +49 -0
  38. package/dist/guards/processes.js +233 -0
  39. package/dist/guards/proofs.d.ts +88 -0
  40. package/dist/guards/proofs.js +503 -0
  41. package/dist/guards/records.d.ts +176 -0
  42. package/dist/guards/records.js +513 -0
  43. package/dist/guards/report.d.ts +26 -0
  44. package/dist/guards/report.js +492 -0
  45. package/dist/guards/runner.d.ts +42 -0
  46. package/dist/guards/runner.js +167 -0
  47. package/dist/guards/tla.d.ts +51 -0
  48. package/dist/guards/tla.js +352 -0
  49. package/dist/guards/tlapm.d.ts +81 -0
  50. package/dist/guards/tlapm.js +172 -0
  51. package/dist/guards/tlc.d.ts +191 -0
  52. package/dist/guards/tlc.js +457 -0
  53. package/dist/guards/translation.d.ts +66 -0
  54. package/dist/guards/translation.js +202 -0
  55. package/dist/guards/types.d.ts +185 -0
  56. package/dist/guards/types.js +437 -0
  57. package/dist/guards/verify.d.ts +290 -0
  58. package/dist/guards/verify.js +1191 -0
  59. package/dist/guards/xml.d.ts +18 -0
  60. package/dist/guards/xml.js +105 -0
  61. package/dist/lib/environment/archive.d.ts +2 -2
  62. package/dist/lib/environment/archive.js +1 -1
  63. package/dist/lib/environment/builtins.d.ts +10 -12
  64. package/dist/lib/environment/builtins.js +17 -19
  65. package/dist/lib/environment/exports.d.ts +14 -13
  66. package/dist/lib/environment/exports.js +31 -16
  67. package/dist/lib/environment/format.d.ts +2 -2
  68. package/dist/lib/environment/format.js +3 -3
  69. package/dist/lib/environment/git-source.js +6 -3
  70. package/dist/lib/environment/install.d.ts +14 -16
  71. package/dist/lib/environment/install.js +66 -61
  72. package/dist/lib/environment/lock.d.ts +4 -3
  73. package/dist/lib/environment/lock.js +6 -5
  74. package/dist/lib/environment/marker.js +1 -2
  75. package/dist/lib/environment/own-paths.d.ts +7 -10
  76. package/dist/lib/environment/own-paths.js +10 -13
  77. package/dist/lib/environment/placed-record.d.ts +3 -2
  78. package/dist/lib/environment/placed-record.js +5 -4
  79. package/dist/lib/environment/registry.d.ts +1 -1
  80. package/dist/lib/environment/registry.js +1 -1
  81. package/dist/lib/environment/requests.d.ts +2 -2
  82. package/dist/lib/environment/requests.js +2 -2
  83. package/dist/lib/environment/resolve.d.ts +4 -4
  84. package/dist/lib/environment/resolve.js +3 -4
  85. package/dist/lib/environment/store.d.ts +34 -8
  86. package/dist/lib/environment/store.js +138 -43
  87. package/dist/lib/files.d.ts +72 -12
  88. package/dist/lib/files.js +200 -65
  89. package/dist/lib/git-host.d.ts +52 -258
  90. package/dist/lib/git-host.js +52 -265
  91. package/dist/lib/home-file.d.ts +13 -10
  92. package/dist/lib/home-file.js +28 -18
  93. package/dist/lib/instance.d.ts +1 -1
  94. package/dist/lib/instance.js +1 -1
  95. package/dist/lint.d.ts +22 -0
  96. package/dist/lint.js +36 -0
  97. package/dist/testing/standin-registry.js +1 -1
  98. package/package.json +7 -3
  99. package/scaffold/.file-history.json +14 -7
  100. package/scaffold/i18n/zh/source-pins.json +41 -0
  101. package/scaffold/i18n/zh/specs/decisions/000-spec-structure-format.md +0 -1
  102. package/scaffold/i18n/zh/specs/intents/000-spdx-headers.md +0 -1
  103. package/scaffold/i18n/zh/specs/map.md +0 -1
  104. package/scaffold/i18n/zh/specs/meta.md +18 -35
  105. package/scaffold/i18n/zh/specs/packages/git.md +0 -1
  106. package/scaffold/i18n/zh/specs/packages/licensing.md +0 -1
  107. package/scaffold/specs/meta.md +18 -3
  108. package/scripts/test-exit-guard.mjs +28 -0
@@ -1,105 +1,44 @@
1
1
  export { DEFAULT_HOST_URL, hostUrlFor } from "./instance.js";
2
2
  /** The public OAuth client id Spex signs in as. */
3
3
  export declare const CLIENT_ID = "spex";
4
- /** An access secret this close to expiring is refreshed first (git-host-4). */
4
+ /** An access secret this close to expiring is refreshed first. */
5
5
  export declare const REFRESH_MARGIN_MS = 60000;
6
- /** A browser sign-in without a callback ends `expired` after this long
7
- * (git-host-2). */
6
+ /** A browser sign-in without a callback ends `expired` after this long. */
8
7
  export declare const BROWSER_SIGN_IN_TIMEOUT_MS: number;
9
- /** The longest a rate limit holds the calls to the host (git-host-21). */
8
+ /** The longest a rate limit holds the calls to the host. */
10
9
  export declare const RATE_LIMIT_HOLD_MAX_MS = 120000;
11
- /** The longest a server's id or a person's id may be in a device
12
- * request (git-host-27; the instance's own bound). */
13
- export declare const SEAT_ID_MAX = 64;
14
10
  /**
15
- * The seconds a host's `Retry-After` asks to wait (git-host-11): its
11
+ * The seconds a host's `Retry-After` asks to wait: its
16
12
  * number where it is all digits, the seconds from `now` until its HTTP
17
13
  * date — none below zero — and null where it is absent or anything else.
18
14
  */
19
15
  export declare function retryAfterSeconds(value: string | null | undefined, now?: number): number | null;
20
- /** The person as the host reports them; `canCreateGroup` is whether the
21
- * host lets them create a group at the top (git-host-5, DR-114), false
22
- * where it says nothing. */
23
16
  export interface HostAccount {
24
17
  id: string;
25
18
  login: string;
26
19
  displayName: string | null;
27
- canCreateGroup: boolean;
28
20
  }
29
- /** What the host lets the person do in a group (git-host-5, DR-114,
30
- * DR-120): create a group inside it, add and remove its members, rename
31
- * it and delete it; false where the host says nothing, as for a
32
- * repository's group or your own. */
33
- export interface HostGroupCan {
34
- createSubgroup: boolean;
35
- manageMembers: boolean;
36
- rename: boolean;
37
- delete: boolean;
38
- restore?: boolean;
39
- }
40
- /** A group as the host answers it (git-host-5): `fullPath` its path in
41
- * the instance, taken as given (DR-120); `kind` `user` for an account's
42
- * own group, the person's or another's. No page of the host is held. */
43
- export interface HostGroup {
44
- id: string | null;
45
- fullPath: string;
46
- name: string;
47
- kind: "user" | "group";
48
- can: HostGroupCan;
49
- pendingDeletion?: boolean;
50
- deletionRoot?: string;
51
- }
52
- export type HostGroupDeletion = {
53
- status: "scheduled";
54
- group: HostGroup;
55
- } | {
56
- status: "deleted";
57
- };
58
- export interface HostGroupContent {
59
- kind: "project" | "group" | "records" | "server";
60
- name: string;
61
- }
62
- /** One of the host's own roles (git-host-16): the id a client sends
63
- * back, the host's name for it, and whether it may push. */
64
- export interface HostRole {
65
- id: string;
66
- name: string;
67
- mayPush: boolean;
68
- }
69
- /** The host's description (git-host-5): its name, its Git origin, and
70
- * the roles it grants in its own order, empty where it lists none. */
71
21
  export interface HostDescription {
72
22
  displayName: string;
73
23
  gitOrigin: string;
74
- roles: HostRole[];
75
24
  }
76
- /** A group or a spex repository at the host, by the host's id, whose
77
- * members are read, added or removed (git-host-8, git-host-16,
78
- * git-host-17). */
79
- export interface MembersTarget {
80
- kind: "group" | "repository";
81
- id: string;
25
+ /** Namespace identity as reported by the Space. */
26
+ export interface HostNamespace {
27
+ fullPath: string;
28
+ kind: "user" | "group";
82
29
  }
83
30
  export interface HostRepository {
84
31
  id: string;
85
32
  name: string;
86
33
  path: string;
87
- group: HostGroup;
88
- /** The Git URL the core hands to Git alone (git-host-5, DR-120). */
34
+ group: HostNamespace;
35
+ /** The Git URL the core hands to Git alone (DR-120). */
89
36
  remoteUrl: string;
90
- visibility: string;
91
37
  archived: boolean;
92
38
  empty: boolean;
93
39
  lfs: boolean;
94
40
  spexBranch: boolean;
95
41
  project: Record<string, unknown> | null;
96
- /** Whether the host lets the person add and remove its members
97
- * (git-host-5, DR-114) and move it to another group (DR-120); false
98
- * where it says nothing. */
99
- can: {
100
- manageMembers: boolean;
101
- transfer: boolean;
102
- };
103
42
  }
104
43
  export interface HostRepositoryDetail extends HostRepository {
105
44
  readOnly: null | {
@@ -113,52 +52,12 @@ export interface HostRepositoryDetail extends HostRepository {
113
52
  blocked: boolean;
114
53
  };
115
54
  }
116
- /** A member as the host lists them (git-host-8): `direct` where the
117
- * membership is the group's or repository's own, else `via` the path in
118
- * the instance of the group it comes through. */
119
- export interface HostMember {
120
- id: string;
121
- login: string;
122
- displayName: string | null;
123
- role: string;
124
- direct: boolean;
125
- via: string | null;
126
- }
127
- /** A team server the person may open a seat on, as the instance lists it
128
- * (git-host-29, DR-133): its id, name and address — the https origin it
129
- * listens at — and its group by the instance's id, path, name and kind,
130
- * with no abilities. */
131
- export interface HostServer {
132
- id: string;
133
- name: string;
134
- group: {
135
- id: string | null;
136
- fullPath: string;
137
- name: string;
138
- kind: "user" | "group";
139
- };
140
- address: string;
141
- }
142
- /** A ticket the instance minted for a seat on one of its servers
143
- * (git-host-29): single use and short-lived — `expiresIn` its seconds —
144
- * presented to the server at its address. A secret: never held after the
145
- * caller presents it, never in a log or a message. */
146
- export interface HostTicket {
147
- ticket: string;
148
- expiresIn: number;
149
- server: {
150
- id: string;
151
- name: string;
152
- address: string;
153
- };
154
- }
155
55
  export type HostErrorKind = "pending" | "name_taken" | "host_refused" | "not_found" | "rate_limited" | "reauth" | "unreachable" | "bad_request";
156
- /** Why a sign-in ended without an account (git-host-2, git-host-3):
157
- * `account` a person other than a listed instance's account, `person` a
158
- * person other than the one a seat's device request named (git-host-27). */
159
- export type SignInCause = "denied" | "expired" | "stopped" | "refused" | "state" | "unreachable" | "account" | "person";
56
+ /** Why a sign-in ended without an account (git-host-40):
57
+ * `account` a person other than the account listed for that Space. */
58
+ export type SignInCause = "denied" | "expired" | "stopped" | "refused" | "state" | "unreachable" | "account";
160
59
  /**
161
- * A host answer other than success (git-host-11). `words` is the host's
60
+ * A host answer other than success. `words` is the host's
162
61
  * own message, kept whole; `retryAfter` the host's `Retry-After` for
163
62
  * `rate_limited`, raw, read as seconds by `retryAfterSeconds`; `code`
164
63
  * the envelope's `error.code` where one came; and,
@@ -180,13 +79,13 @@ export declare class HostError extends Error {
180
79
  });
181
80
  }
182
81
  /** A call's own Stop ended its wait for the host's rate limit before it
183
- * was sent (git-host-21). Local; not the host's. */
82
+ * was sent. Local; not the host's. */
184
83
  export declare class HostWaitStopped extends Error {
185
84
  readonly code = "stopped";
186
85
  constructor();
187
86
  }
188
87
  /**
189
- * How a call meets the host's rate limit (git-host-21): one carrying
88
+ * How a call meets the host's rate limit: one carrying
190
89
  * `signal` — a sync step's, whose Stop aborts it and so ends the wait
191
90
  * unsent — or `wait` — the host read's — waits the hold out; any other
192
91
  * call made while the hold stands is refused at once as `rate_limited`
@@ -199,13 +98,13 @@ export interface HostCallOptions {
199
98
  retryRead?: boolean;
200
99
  }
201
100
  /** The pair a step used was no longer the stored one when its answer
202
- * came (git-host-4, git-host-10, storage-19): nothing was stored or
101
+ * came (git-host-31, storage-19): nothing was stored or
203
102
  * removed, and the step may be made again. Local; not the host's. */
204
103
  export declare class CredentialChanged extends Error {
205
104
  readonly code = "changed";
206
105
  constructor();
207
106
  }
208
- /** A sign-in started while another runs (git-host-2: a second start is
107
+ /** A sign-in started while another runs (a second start is
209
108
  * `busy`). */
210
109
  export declare class SignInBusyError extends Error {
211
110
  readonly code = "busy";
@@ -227,7 +126,7 @@ export interface CredentialStore {
227
126
  */
228
127
  replace(expected: StoredCredential | null, next: StoredCredential | null): boolean;
229
128
  /**
230
- * For a sign-out whose read failed (git-host-10, storage-19): remove
129
+ * For a sign-out whose read failed (git-host-31, storage-19): remove
231
130
  * this host's malformed entry in one synchronous step, other hosts'
232
131
  * kept; true where it is gone or none stands, false, and nothing
233
132
  * written, where a well-formed pair stands by then. A file of another
@@ -263,37 +162,24 @@ export interface GitHostClientOptions {
263
162
  fetch?: typeof fetch;
264
163
  now?: () => number;
265
164
  /** Called once the client has signed the device out on the host's
266
- * refusal (git-host-4); never on an explicit `signOut()`. */
165
+ * refusal; never on an explicit `signOut()`. */
267
166
  onSignedOut?: (cause: HostErrorKind) => void;
268
167
  /** Bound on each host request; a request past it is unreachable. */
269
168
  requestTimeoutMs?: number;
270
169
  /** Called when an answer of 429 sets the instant the calls are held
271
- * until (git-host-21), with that instant in Unix milliseconds. */
170
+ * until, with that instant in Unix milliseconds. */
272
171
  onHold?: (until: number) => void;
273
- /** Test seam (git-host-21): the hold and per-request recovery bounds;
172
+ /** Test seam: the hold and per-request recovery bounds;
274
173
  * 120 s by default. */
275
174
  holdMaxMs?: number;
276
- /** On a seat (git-host-27): the server's id and the admitted person's
277
- * permanent account id at the instance, which the device request
278
- * carries as `server_id` and `person_id`; a sign-in whose person bears
279
- * another id ends `failed`, storing nothing. */
280
- server?: {
281
- id: string;
282
- personId: string;
283
- };
284
175
  }
285
- /** Whether a sign-in may store its token for the person it read
286
- * (git-host-2): null admits them; a refusal ends the sign-in `failed`
176
+ /** Whether a sign-in may store its token for the person it read: null admits them; a refusal ends the sign-in `failed`
287
177
  * with it, storing nothing. Called in the turn that would store it. */
288
178
  export type AdmitAccount = (account: HostAccount) => HostError | null;
289
179
  /** The refusal of a sign-in at a listed instance as another person than
290
- * its entry's account (git-host-2): `words` carries the entry's login. */
180
+ * its entry's account: `words` carries the entry's login. */
291
181
  export declare function anotherAccountError(login: string): HostError;
292
- /** The refusal of a seat's sign-in as a person other than the one its
293
- * device request named (git-host-27): `words` carries the login the
294
- * instance signed in. */
295
- export declare function anotherPersonError(login: string): HostError;
296
- /** A running browser sign-in (git-host-2). */
182
+ /** A running browser sign-in. */
297
183
  export interface BrowserSignIn {
298
184
  /** The host's `/login/app` URL for the system browser. */
299
185
  url: string;
@@ -304,13 +190,13 @@ export interface BrowserSignIn {
304
190
  done: Promise<HostAccount>;
305
191
  cancel(): void;
306
192
  }
307
- /** A running device sign-in (git-host-3). */
193
+ /** A running device sign-in (git-host-40). */
308
194
  export interface DeviceSignIn {
309
195
  userCode: string;
310
196
  verificationUri: string;
311
197
  /** Unix milliseconds. */
312
198
  expiresAt: number;
313
- /** The seconds between polls the host named (git-host-3). */
199
+ /** The seconds between polls the host named (git-host-40). */
314
200
  interval: number;
315
201
  done: Promise<HostAccount>;
316
202
  cancel(): void;
@@ -322,7 +208,7 @@ export interface CallbackPages {
322
208
  }
323
209
  /**
324
210
  * The client of one Git host. Every call to a host route presents the
325
- * stored access secret and keeps the app token current (git-host-4);
211
+ * stored access secret and keeps the app token current;
326
212
  * `describe()` alone needs no token.
327
213
  */
328
214
  export declare class GitHostClient {
@@ -337,24 +223,23 @@ export declare class GitHostClient {
337
223
  private readonly requestTimeoutMs;
338
224
  private readonly onHold?;
339
225
  private readonly holdMaxMs;
340
- private readonly server?;
341
226
  private refreshing;
342
227
  private signIn;
343
228
  /** The instant the host's last rate limit asked every call to wait
344
- * until (git-host-21); 0 where none holds. */
229
+ * until; 0 where none holds. */
345
230
  private holdUntil;
346
231
  constructor(options: GitHostClientOptions);
347
- /** Whether the host's rate limit holds the calls now (git-host-21). */
232
+ /** Whether the host's rate limit holds the calls now. */
348
233
  holding(): boolean;
349
234
  /** `GET /api/v1/host`: the host's display name, the Git origin its
350
- * credentials are valid for, and the roles it grants (git-host-5). */
235
+ * credentials are valid for. */
351
236
  describe(options?: HostCallOptions): Promise<HostDescription>;
352
237
  /** Whether this device holds an app token for the host. */
353
238
  signedIn(): Promise<boolean>;
354
239
  /** Whether a sign-in is running. */
355
240
  signingIn(): boolean;
356
241
  /**
357
- * The browser flow with PKCE (git-host-2): a loopback listener on
242
+ * The browser flow with PKCE: a loopback listener on
358
243
  * `127.0.0.1` at an OS-assigned port for one callback, an S256
359
244
  * challenge, and the host's `/login/app` URL to open.
360
245
  */
@@ -365,18 +250,15 @@ export declare class GitHostClient {
365
250
  }): Promise<BrowserSignIn>;
366
251
  private answerCallback;
367
252
  /**
368
- * The device flow (git-host-3): the host's user code and verification
253
+ * The device flow (git-host-40): the host's user code and verification
369
254
  * URL, completed with the code where the host gives it, then polling the token endpoint at its interval, five seconds
370
255
  * slower on each `slow_down`, until the token, a denial or the expiry.
371
- * On a seat, `ticket` is the one the member's client presented for it,
372
- * on which the host may grant the code without its page (git-host-27).
373
256
  */
374
257
  startDeviceSignIn(options?: {
375
258
  admit?: AdmitAccount;
376
- ticket?: string;
377
259
  }): Promise<DeviceSignIn>;
378
260
  /**
379
- * Sign this device out (git-host-10): revoke it at the host with its
261
+ * Sign this device out (git-host-31): revoke it at the host with its
380
262
  * app token, tried once, and remove that pair either way, calling
381
263
  * `onRemoved` in the same turn as the removal. Where another pair was
382
264
  * stored in its place meanwhile, that pair stays, `onRemoved` is not
@@ -389,85 +271,16 @@ export declare class GitHostClient {
389
271
  holdsNone(): boolean;
390
272
  /** The selected purpose's account; registry identity needs no host API. */
391
273
  me(options?: HostCallOptions): Promise<HostAccount>;
392
- /** `GET /api/v1/host/groups`: the person's own group and every group
393
- * they belong to. */
394
- groups(options?: HostCallOptions): Promise<HostGroup[]>;
395
274
  /** `GET /api/v1/host/repositories`, every page. */
396
275
  repositories(options?: HostCallOptions): Promise<HostRepository[]>;
397
276
  /** `GET /api/v1/host/repositories/:id`, with its read-only state and
398
277
  * the `spex` branch's. */
399
278
  repository(id: string, options?: HostCallOptions): Promise<HostRepositoryDetail>;
400
- /** `GET /api/v1/host/repositories/:id/members` or
401
- * `GET /api/v1/host/groups/:id/members` (git-host-8): every member with
402
- * the host's role name and source. */
403
- members(target: MembersTarget, options?: HostCallOptions): Promise<{
404
- members: HostMember[];
405
- }>;
406
- /**
407
- * `POST /api/v1/host/groups` (git-host-15): a private group named
408
- * `name` at the path `path`, inside the group `parentId` or at the top
409
- * where it is null. A taken name throws `name_taken`, the host's
410
- * refusal `host_refused` with its words.
411
- */
412
- createGroup(input: {
413
- name: string;
414
- path: string;
415
- parentId: string | null;
416
- }): Promise<HostGroup>;
417
- /**
418
- * `PATCH /api/v1/host/groups/:id` (git-host-18): give a group of the
419
- * instance the name, the path segment, or both, given. A path taken
420
- * there throws `name_taken`, the host's refusal `host_refused` with
421
- * its words.
422
- */
423
- renameGroup(id: string, input: {
424
- name?: string;
425
- path?: string;
426
- }): Promise<HostGroup>;
427
- /** Request normal deletion through the confirmation-aware route
428
- * (git-host-19). Older deployments are refused, never retried through
429
- * the legacy route, whose behavior may permanently delete a group. */
430
- deleteGroup(id: string, confirmPath?: string): Promise<HostGroupDeletion>;
431
- /** Read the Space's current contents, including contents omitted from
432
- * the records listing. Members are not contents. */
433
- inspectGroupDeletion(id: string): Promise<{
434
- group: HostGroup;
435
- contents: HostGroupContent[];
436
- }>;
437
- /** Restore the group's normal scheduled deletion, where the Space
438
- * permits it; no retention period is inferred by the client. */
439
- restoreGroup(id: string): Promise<HostGroup>;
440
- /**
441
- * `POST /api/v1/host/repositories/:id/transfer` (git-host-20): move a
442
- * spex repository into the group `groupId`, or the person's own group
443
- * where it is null. A name taken there throws `name_taken`, the host's
444
- * refusal `host_refused` with its words.
445
- */
446
- transferRepository(id: string, groupId: string | null): Promise<HostRepository>;
447
279
  /**
448
- * `POST …/members` (git-host-16): add the account the host lists under
449
- * exactly `login` to the group or repository at the role whose id is
450
- * `role`. No such account throws `not_found` with the host's words
451
- * naming the login; a refusal `host_refused` with its words.
452
- */
453
- addMember(target: MembersTarget, input: {
454
- login: string;
455
- role: string;
456
- }): Promise<HostMember>;
457
- /**
458
- * `DELETE …/members/:login` (git-host-17): remove the account under
459
- * `login` from the group's or repository's own members. No account, or
460
- * no membership of its own there, throws `not_found` with the host's
461
- * words; a refusal `host_refused` with its words.
462
- */
463
- removeMember(target: MembersTarget, login: string): Promise<void>;
464
- /**
465
- * `POST /api/v1/host/repositories` (git-host-6): `name` is the whole
466
- * repository name, `<name>-spex`; `groupId` null means the person's own
467
- * group. A taken name throws `name_taken`.
280
+ * `POST /api/v1/host/repositories`: `name` is the whole
281
+ * repository name, `<name>-spex`; creation uses the authenticated account’s namespace. A taken name throws `name_taken`.
468
282
  */
469
283
  create(input: {
470
- groupId: string | null;
471
284
  name: string;
472
285
  description: string;
473
286
  }): Promise<{
@@ -477,28 +290,14 @@ export declare class GitHostClient {
477
290
  status: "pending";
478
291
  message: string;
479
292
  }>;
480
- /** `POST /api/v1/host/repositories/:id/spex-branch` (git-host-7). */
293
+ /** `POST /api/v1/host/repositories/:id/spex-branch`. */
481
294
  prepareBranch(id: string, options?: HostCallOptions): Promise<{
482
295
  status: "ready";
483
296
  } | {
484
297
  status: "pending";
485
298
  message: string;
486
299
  }>;
487
- /**
488
- * `GET /api/v1/host/servers` (git-host-29): the servers the person may
489
- * open a seat on, as the instance answers them, in its order. The
490
- * client keeps nothing of the answer.
491
- */
492
- servers(options?: HostCallOptions): Promise<HostServer[]>;
493
- /**
494
- * `POST /api/v1/host/servers/:id/tickets` (git-host-29): a ticket for a
495
- * seat on the server `id`, as the instance answers it; the client keeps
496
- * nothing of it. A server the instance does not list for the person
497
- * throws `not_found`, a membership below the role it needs
498
- * `host_refused`, each with the instance's words.
499
- */
500
- ticket(id: string, options?: HostCallOptions): Promise<HostTicket>;
501
- /** `POST /api/v1/host/credential` (git-host-9): the Git credential for
300
+ /** `POST /api/v1/host/credential` (git-host-41): the Git credential for
502
301
  * the host's Git origin, with its expiry in Unix milliseconds. */
503
302
  credential(origin: string, options?: HostCallOptions): Promise<{
504
303
  username: string;
@@ -508,7 +307,7 @@ export declare class GitHostClient {
508
307
  /**
509
308
  * The access secret a call to the host presents now, for a client of
510
309
  * the same host outside this one — the registry (environments-12):
511
- * kept current as every call's is (git-host-4), refreshed first where
310
+ * kept current as every call's is, refreshed first where
512
311
  * it is within a minute of expiring; null where this device holds no
513
312
  * app token, or the host refused the refresh and so signed it out.
514
313
  * An unreachable host or a rate limit is thrown as the host answered.
@@ -517,7 +316,7 @@ export declare class GitHostClient {
517
316
  /**
518
317
  * A client of the same host outside this one — the registry
519
318
  * (environments-12) — was refused `access` with a code that signs the
520
- * device out: as a refusal of this client's own call does (git-host-4),
319
+ * device out: as a refusal of this client's own call does,
521
320
  * the pair that presented it is removed and the device signed out of
522
321
  * this host alone in one step, `onSignedOut` called; true then. Where
523
322
  * it is no longer the stored pair's — a sign-in, a refresh or a
@@ -527,26 +326,23 @@ export declare class GitHostClient {
527
326
  signOutRefused(access: string): Promise<boolean>;
528
327
  private claimSignIn;
529
328
  /** Claim the one sign-in, and read the pair it begins over: its token
530
- * is stored only in that pair's place (git-host-2). */
329
+ * is stored only in that pair's place. */
531
330
  private beginSignIn;
532
331
  private releaseSignIn;
533
332
  /** The issued app token and the person read with it, nothing stored
534
- * yet; a person the host does not return throws (git-host-2). */
333
+ * yet; a person the host does not return throws. */
535
334
  private issued;
536
335
  /** Store an issued token in place of the pair its sign-in began over;
537
- * the caller ends the sign-in in the same turn. On a seat, a person
538
- * bearing another permanent id than the one the request named ends it
539
- * naming the account signed in (git-host-27); a person `admit` refuses
336
+ * the caller ends the sign-in in the same turn. A person `admit` refuses
540
337
  * ends it with that refusal; and another pair stored meanwhile ends it
541
- * `stopped`, that pair kept: each stores nothing (git-host-2). */
338
+ * `stopped`, that pair kept: each stores nothing. */
542
339
  private publish;
543
- /** A host route with the bearer kept current (git-host-4). Only a
340
+ /** A host route with the bearer kept current. Only a
544
341
  * success, `202` included, comes back; everything else throws.
545
- * `signal` ends the call's wait for the host's rate limit (git-host-21). */
342
+ * `signal` ends the call's wait for the host's rate limit. */
546
343
  private call;
547
344
  /** The pair a call presents, refreshed first near its expiry; the
548
- * refresh waits out the host's rate limit where the call does
549
- * (git-host-21). */
345
+ * refresh waits out the host's rate limit where the call does. */
550
346
  private current;
551
347
  /** One refresh at a time: a caller arriving while one runs joins it,
552
348
  * and one arriving after it finds the rotated pair already stored.
@@ -554,26 +350,24 @@ export declare class GitHostClient {
554
350
  * stores and removes nothing, and `CredentialChanged` is thrown. */
555
351
  private refresh;
556
352
  private runRefresh;
557
- /** The host refused `used` (git-host-4): remove it and say the device
353
+ /** The host refused `used`: remove it and say the device
558
354
  * is signed out in the same turn, giving back `refusal` to throw;
559
355
  * where another pair is stored in its place, nothing is removed or
560
356
  * said, and `CredentialChanged` comes back instead. */
561
357
  private signOutLocally;
562
- /** Wait out the host's rate limit (git-host-21): until the instant it
358
+ /** Wait out the host's rate limit: until the instant it
563
359
  * holds, again where a later answer moves it on meanwhile; `signal`
564
360
  * ends the wait. The timer keeps no process alive. */
565
361
  private waitOut;
566
362
  /** An answer of 429 holds the calls until the instant it asks for —
567
363
  * its time plus its seconds, `holdMaxMs` at most — keeping a later
568
- * instant already held; none where its seconds are unknown
569
- * (git-host-21). */
364
+ * instant already held; none where its seconds are unknown. */
570
365
  private hold;
571
366
  /** A call that does not wait, made while the hold stands, is refused
572
- * at once as the host asking to wait the seconds that remain
573
- * (git-host-21). */
367
+ * at once as the host asking to wait the seconds that remain. */
574
368
  private refuseWhileHeld;
575
369
  /** One request to the host. A call carrying a signal, or asked to
576
370
  * wait, waits out the host's rate limit first; any other is refused
577
- * while it holds (git-host-21). */
371
+ * while it holds. */
578
372
  private send;
579
373
  }