@sealant/api-contracts-next 0.40.0-next.814 → 0.40.0-next.815

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.
@@ -24,12 +24,16 @@ export type ConnectedAccountCredential = typeof connectedAccountCredentialSchema
24
24
  /** What the person pays with: their subscription's login, or an API key billed per token. */
25
25
  export declare const connectedAccountLoginClassSchema: Schema.Literals<readonly ["subscription", "api-key"]>;
26
26
  export type ConnectedAccountLoginClass = typeof connectedAccountLoginClassSchema.Type;
27
- /** A Claude or Codex account's login class; a key with its last four characters. */
27
+ /**
28
+ * A Claude or Codex account's login class; a key with its last four characters, and the host of the
29
+ * endpoint it sends its requests to when it has one (the endpoint's full URL is never in a summary).
30
+ */
28
31
  export declare const connectedAccountLoginSchema: Schema.Union<readonly [Schema.Struct<{
29
32
  readonly kind: Schema.Literal<"subscription">;
30
33
  }>, Schema.Struct<{
31
34
  readonly kind: Schema.Literal<"api-key">;
32
35
  readonly suffix: Schema.String;
36
+ readonly endpointHost: Schema.optional<Schema.String>;
33
37
  }>]>;
34
38
  export type ConnectedAccountLogin = typeof connectedAccountLoginSchema.Type;
35
39
  export declare const connectedAccountSummarySchema: Schema.Struct<{
@@ -68,6 +72,7 @@ export declare const connectedAccountSummarySchema: Schema.Struct<{
68
72
  }>, Schema.Struct<{
69
73
  readonly kind: Schema.Literal<"api-key">;
70
74
  readonly suffix: Schema.String;
75
+ readonly endpointHost: Schema.optional<Schema.String>;
71
76
  }>]>>;
72
77
  }>;
73
78
  export type ConnectedAccountSummary = typeof connectedAccountSummarySchema.Type;
@@ -94,6 +99,13 @@ export declare const createConnectedAccountRequestSchema: Schema.Struct<{
94
99
  */
95
100
  readonly login: Schema.optional<Schema.Literals<readonly ["subscription", "api-key"]>>;
96
101
  readonly secret: Schema.String;
102
+ /**
103
+ * Claude and Codex API keys only: the base URL of a compatible endpoint to send this login's
104
+ * requests to, such as a company gateway (an `EndpointUrl`; anything else is refused with a
105
+ * `400`). With one, the key may be any value without spaces, for an endpoint that takes no real
106
+ * key. A reconnect without it stores the login without an endpoint.
107
+ */
108
+ readonly endpoint: Schema.optional<Schema.String>;
97
109
  }>;
98
110
  export type CreateConnectedAccountRequest = typeof createConnectedAccountRequestSchema.Type;
99
111
  export declare const listConnectedAccountsQuerySchema: Schema.Struct<{
@@ -137,6 +149,7 @@ export declare const listConnectedAccountsResponseSchema: Schema.Struct<{
137
149
  }>, Schema.Struct<{
138
150
  readonly kind: Schema.Literal<"api-key">;
139
151
  readonly suffix: Schema.String;
152
+ readonly endpointHost: Schema.optional<Schema.String>;
140
153
  }>]>>;
141
154
  }>>;
142
155
  /**
@@ -191,6 +204,7 @@ export declare const markConnectedAccountInvalidResponseSchema: Schema.Struct<{
191
204
  }>, Schema.Struct<{
192
205
  readonly kind: Schema.Literal<"api-key">;
193
206
  readonly suffix: Schema.String;
207
+ readonly endpointHost: Schema.optional<Schema.String>;
194
208
  }>]>>;
195
209
  /** `marked`: the account is now invalid. `superseded`: a newer credential, left as it was. */
196
210
  readonly outcome: Schema.optional<Schema.Literals<readonly ["marked", "superseded"]>>;
@@ -274,6 +288,7 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
274
288
  }>, Schema.Struct<{
275
289
  readonly kind: Schema.Literal<"api-key">;
276
290
  readonly suffix: Schema.String;
291
+ readonly endpointHost: Schema.optional<Schema.String>;
277
292
  }>]>>;
278
293
  }>>, Schema.toCodecJson<typeof ConnectedAccountNotFoundError | typeof ConnectedAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createConnectedAccount", "POST", "/", never, never, Schema.toCodecJson<Schema.Struct<{
279
294
  readonly ownerUserId: Schema.String;
@@ -298,6 +313,13 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
298
313
  */
299
314
  readonly login: Schema.optional<Schema.Literals<readonly ["subscription", "api-key"]>>;
300
315
  readonly secret: Schema.String;
316
+ /**
317
+ * Claude and Codex API keys only: the base URL of a compatible endpoint to send this login's
318
+ * requests to, such as a company gateway (an `EndpointUrl`; anything else is refused with a
319
+ * `400`). With one, the key may be any value without spaces, for an endpoint that takes no real
320
+ * key. A reconnect without it stores the login without an endpoint.
321
+ */
322
+ readonly endpoint: Schema.optional<Schema.String>;
301
323
  }>>, never, Schema.toCodecJson<Schema.Struct<{
302
324
  readonly connectedAccountId: Schema.String;
303
325
  readonly ownerUserId: Schema.String;
@@ -334,6 +356,7 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
334
356
  }>, Schema.Struct<{
335
357
  readonly kind: Schema.Literal<"api-key">;
336
358
  readonly suffix: Schema.String;
359
+ readonly endpointHost: Schema.optional<Schema.String>;
337
360
  }>]>>;
338
361
  }>>, Schema.toCodecJson<typeof ConnectedAccountBadRequestError | typeof ConnectedAccountNotFoundError | typeof ConnectedAccountConflictError | typeof ConnectedAccountServiceUnavailableError | typeof ConnectedAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listConnectedAccounts", "GET", "/", never, Schema.toCodecStringTree<Schema.Struct<{
339
362
  readonly ownerUserId: Schema.String;
@@ -374,6 +397,7 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
374
397
  }>, Schema.Struct<{
375
398
  readonly kind: Schema.Literal<"api-key">;
376
399
  readonly suffix: Schema.String;
400
+ readonly endpointHost: Schema.optional<Schema.String>;
377
401
  }>]>>;
378
402
  }>>;
379
403
  /**
@@ -426,6 +450,7 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
426
450
  }>, Schema.Struct<{
427
451
  readonly kind: Schema.Literal<"api-key">;
428
452
  readonly suffix: Schema.String;
453
+ readonly endpointHost: Schema.optional<Schema.String>;
429
454
  }>]>>;
430
455
  /** `marked`: the account is now invalid. `superseded`: a newer credential, left as it was. */
431
456
  readonly outcome: Schema.optional<Schema.Literals<readonly ["marked", "superseded"]>>;
@@ -470,6 +495,7 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
470
495
  }>, Schema.Struct<{
471
496
  readonly kind: Schema.Literal<"api-key">;
472
497
  readonly suffix: Schema.String;
498
+ readonly endpointHost: Schema.optional<Schema.String>;
473
499
  }>]>>;
474
500
  }>>, Schema.toCodecJson<typeof ConnectedAccountNotFoundError | typeof ConnectedAccountConflictError | typeof ConnectedAccountInternalServerError>, never, never>, false>;
475
501
  export {};
@@ -39,10 +39,17 @@ export const connectedAccountCredentialSchema = Schema.Struct({
39
39
  });
40
40
  /** What the person pays with: their subscription's login, or an API key billed per token. */
41
41
  export const connectedAccountLoginClassSchema = Schema.Literals(["subscription", "api-key"]);
42
- /** A Claude or Codex account's login class; a key with its last four characters. */
42
+ /**
43
+ * A Claude or Codex account's login class; a key with its last four characters, and the host of the
44
+ * endpoint it sends its requests to when it has one (the endpoint's full URL is never in a summary).
45
+ */
43
46
  export const connectedAccountLoginSchema = Schema.Union([
44
47
  Schema.Struct({ kind: Schema.Literal("subscription") }),
45
- Schema.Struct({ kind: Schema.Literal("api-key"), suffix: NonEmptyString }),
48
+ Schema.Struct({
49
+ kind: Schema.Literal("api-key"),
50
+ suffix: NonEmptyString,
51
+ endpointHost: Schema.optional(NonEmptyString),
52
+ }),
46
53
  ]);
47
54
  export const connectedAccountSummarySchema = Schema.Struct({
48
55
  connectedAccountId: NonEmptyString,
@@ -98,6 +105,13 @@ export const createConnectedAccountRequestSchema = Schema.Struct({
98
105
  // never stored or echoed back as-is. Not trimmed here — pasted credential files are stored
99
106
  // verbatim.
100
107
  secret: Schema.String.check(Schema.isNonEmpty()),
108
+ /**
109
+ * Claude and Codex API keys only: the base URL of a compatible endpoint to send this login's
110
+ * requests to, such as a company gateway (an `EndpointUrl`; anything else is refused with a
111
+ * `400`). With one, the key may be any value without spaces, for an endpoint that takes no real
112
+ * key. A reconnect without it stores the login without an endpoint.
113
+ */
114
+ endpoint: Schema.optional(Schema.String),
101
115
  });
102
116
  export const listConnectedAccountsQuerySchema = Schema.Struct({
103
117
  ownerUserId: PersonId,
@@ -72,6 +72,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
72
72
  }>, import("effect/Schema").Struct<{
73
73
  readonly kind: import("effect/Schema").Literal<"api-key">;
74
74
  readonly suffix: import("effect/Schema").String;
75
+ readonly endpointHost: import("effect/Schema").optional<import("effect/Schema").String>;
75
76
  }>]>>;
76
77
  }>>, import("effect/Schema").toCodecJson<typeof import("./connected-accounts.js").ConnectedAccountNotFoundError | typeof import("./connected-accounts.js").ConnectedAccountInternalServerError>, RequestBudget | RequestRefusal, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"createConnectedAccount", "POST", "/v1/connected-accounts/", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
77
78
  readonly ownerUserId: import("effect/Schema").String;
@@ -81,6 +82,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
81
82
  readonly makeDefault: import("effect/Schema").optional<import("effect/Schema").Boolean>;
82
83
  readonly login: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["subscription", "api-key"]>>;
83
84
  readonly secret: import("effect/Schema").String;
85
+ readonly endpoint: import("effect/Schema").optional<import("effect/Schema").String>;
84
86
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
85
87
  readonly connectedAccountId: import("effect/Schema").String;
86
88
  readonly ownerUserId: import("effect/Schema").String;
@@ -106,6 +108,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
106
108
  }>, import("effect/Schema").Struct<{
107
109
  readonly kind: import("effect/Schema").Literal<"api-key">;
108
110
  readonly suffix: import("effect/Schema").String;
111
+ readonly endpointHost: import("effect/Schema").optional<import("effect/Schema").String>;
109
112
  }>]>>;
110
113
  }>>, import("effect/Schema").toCodecJson<typeof import("./connected-accounts.js").ConnectedAccountBadRequestError | typeof import("./connected-accounts.js").ConnectedAccountNotFoundError | typeof import("./connected-accounts.js").ConnectedAccountConflictError | typeof import("./connected-accounts.js").ConnectedAccountServiceUnavailableError | typeof import("./connected-accounts.js").ConnectedAccountInternalServerError>, RequestBudget | RequestRefusal, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listConnectedAccounts", "GET", "/v1/connected-accounts/", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
111
114
  readonly ownerUserId: import("effect/Schema").String;
@@ -135,6 +138,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
135
138
  }>, import("effect/Schema").Struct<{
136
139
  readonly kind: import("effect/Schema").Literal<"api-key">;
137
140
  readonly suffix: import("effect/Schema").String;
141
+ readonly endpointHost: import("effect/Schema").optional<import("effect/Schema").String>;
138
142
  }>]>>;
139
143
  }>>;
140
144
  readonly hasApiKeyHistory: import("effect/Schema").optional<import("effect/Schema").Boolean>;
@@ -168,6 +172,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
168
172
  }>, import("effect/Schema").Struct<{
169
173
  readonly kind: import("effect/Schema").Literal<"api-key">;
170
174
  readonly suffix: import("effect/Schema").String;
175
+ readonly endpointHost: import("effect/Schema").optional<import("effect/Schema").String>;
171
176
  }>]>>;
172
177
  readonly outcome: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["marked", "superseded"]>>;
173
178
  }>>, import("effect/Schema").toCodecJson<typeof import("./connected-accounts.js").ConnectedAccountNotFoundError | typeof import("./connected-accounts.js").ConnectedAccountInternalServerError>, RequestBudget | RequestRefusal, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"setConnectedAccountDefault", "PUT", "/v1/connected-accounts/defaults/:provider", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
@@ -200,6 +205,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
200
205
  }>, import("effect/Schema").Struct<{
201
206
  readonly kind: import("effect/Schema").Literal<"api-key">;
202
207
  readonly suffix: import("effect/Schema").String;
208
+ readonly endpointHost: import("effect/Schema").optional<import("effect/Schema").String>;
203
209
  }>]>>;
204
210
  }>>, import("effect/Schema").toCodecJson<typeof import("./connected-accounts.js").ConnectedAccountNotFoundError | typeof import("./connected-accounts.js").ConnectedAccountConflictError | typeof import("./connected-accounts.js").ConnectedAccountInternalServerError>, RequestBudget | RequestRefusal, never>, false> | import("effect/http-api/HttpApiGroup").HttpApiGroup<"github", import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"handleWebhook", "POST", "/v1/github/webhooks", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").String>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
205
211
  readonly "x-github-delivery": import("effect/Schema").optional<import("effect/Schema").String>;
@@ -395,6 +401,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
395
401
  }>, import("effect/Schema").Struct<{
396
402
  readonly kind: import("effect/Schema").Literal<"api-key">;
397
403
  readonly suffix: import("effect/Schema").String;
404
+ readonly endpointHost: import("effect/Schema").optional<import("effect/Schema").String>;
398
405
  }>]>>;
399
406
  }>;
400
407
  }>>;
@@ -448,6 +455,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
448
455
  }>, import("effect/Schema").Struct<{
449
456
  readonly kind: import("effect/Schema").Literal<"api-key">;
450
457
  readonly suffix: import("effect/Schema").String;
458
+ readonly endpointHost: import("effect/Schema").optional<import("effect/Schema").String>;
451
459
  }>]>>;
452
460
  }>;
453
461
  }>>;
@@ -1410,6 +1418,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
1410
1418
  readonly kubernetesPersonLayout: import("effect/Schema").optional<import("effect/Schema").Boolean>;
1411
1419
  readonly credentialPlacements: import("effect/Schema").optional<import("effect/Schema").Boolean>;
1412
1420
  readonly connectedAccountApiKeys: import("effect/Schema").optional<import("effect/Schema").Boolean>;
1421
+ readonly connectedAccountEndpoints: import("effect/Schema").optional<import("effect/Schema").Boolean>;
1413
1422
  readonly inferenceAllowedLogin: import("effect/Schema").optional<import("effect/Schema").Boolean>;
1414
1423
  }>>;
1415
1424
  }>>, never, RequestBudget | RequestRefusal, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getSetupState", "GET", "/v1/system/setup-state", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
@@ -2202,6 +2211,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
2202
2211
  readonly kind: import("effect/Schema").Literal<"api-key">;
2203
2212
  readonly suffix: import("effect/Schema").String;
2204
2213
  readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
2214
+ readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").toType<import("effect/Schema").String>, import("effect/Schema").String, never, never>, "EndpointUrl">>;
2205
2215
  }>]>;
2206
2216
  readonly pinned: import("effect/Schema").Boolean;
2207
2217
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -2374,6 +2384,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
2374
2384
  readonly kind: import("effect/Schema").Literal<"api-key">;
2375
2385
  readonly suffix: import("effect/Schema").String;
2376
2386
  readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
2387
+ readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").toType<import("effect/Schema").String>, import("effect/Schema").String, never, never>, "EndpointUrl">>;
2377
2388
  }>]>;
2378
2389
  readonly pinned: import("effect/Schema").Boolean;
2379
2390
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -2432,6 +2443,7 @@ export declare const ControlPlaneAPI: HttpApi.HttpApi<"sealantControlPlaneApi",
2432
2443
  readonly kind: import("effect/Schema").Literal<"api-key">;
2433
2444
  readonly suffix: import("effect/Schema").String;
2434
2445
  readonly keyPath: import("effect/Schema").optional<import("effect/Schema").String>;
2446
+ readonly baseUrl: import("effect/Schema").optional<import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").toType<import("effect/Schema").String>, import("effect/Schema").String, never, never>, "EndpointUrl">>;
2435
2447
  }>]>;
2436
2448
  readonly pinned: import("effect/Schema").Boolean;
2437
2449
  readonly provider: import("effect/Schema").Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The base URL of a compatible endpoint an API-key login sends its requests to, such as a company
3
+ * gateway: Anthropic-compatible for a Claude login, OpenAI-compatible for a Codex login.
4
+ */
5
+ import { Schema } from "effect";
6
+ /**
7
+ * An absolute `http:` or `https:` URL with a host, and no user name, password, query string or
8
+ * fragment. Decoding normalizes it: the host as the URL standard writes it, and the path without a
9
+ * trailing slash. `http:` is allowed, since an endpoint on a private network often has no TLS.
10
+ */
11
+ export declare const EndpointUrl: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">;
12
+ export type EndpointUrl = typeof EndpointUrl.Type;
13
+ /** The endpoint's host, with its port when that is not the scheme's default. */
14
+ export declare const endpointHostOf: (url: EndpointUrl) => string;
15
+ /** A pasted endpoint as an {@link EndpointUrl}, or the reason it is not one, for a person to read. */
16
+ export declare const parseEndpointUrl: (raw: string) => {
17
+ readonly valid: true;
18
+ readonly url: EndpointUrl;
19
+ } | {
20
+ readonly valid: false;
21
+ readonly reason: string;
22
+ };
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The base URL of a compatible endpoint an API-key login sends its requests to, such as a company
3
+ * gateway: Anthropic-compatible for a Claude login, OpenAI-compatible for a Codex login.
4
+ */
5
+ import { Schema, SchemaGetter } from "effect";
6
+ const parsed = (value) => {
7
+ try {
8
+ return new URL(value);
9
+ }
10
+ catch {
11
+ return undefined;
12
+ }
13
+ };
14
+ /** Why `value` is not an endpoint URL, or `undefined` when it is one. */
15
+ const endpointUrlProblem = (value) => {
16
+ const url = parsed(value);
17
+ if (url === undefined || (url.protocol !== "http:" && url.protocol !== "https:")) {
18
+ return "must be an absolute http: or https: URL";
19
+ }
20
+ if (url.hostname === "")
21
+ return "must name a host";
22
+ if (url.username !== "" || url.password !== "") {
23
+ return "must not carry a user name or password; the key is sent on its own";
24
+ }
25
+ if (url.search !== "" || value.includes("?"))
26
+ return "must not have a query string";
27
+ if (url.hash !== "" || value.includes("#"))
28
+ return "must not have a fragment";
29
+ return undefined;
30
+ };
31
+ /** Scheme, host (with a port that is not the scheme's default) and path, without a trailing slash. */
32
+ const canonicalEndpointUrl = (value) => {
33
+ const url = new URL(value);
34
+ return `${url.protocol}//${url.host}${url.pathname.replace(/\/+$/, "")}`;
35
+ };
36
+ /**
37
+ * An absolute `http:` or `https:` URL with a host, and no user name, password, query string or
38
+ * fragment. Decoding normalizes it: the host as the URL standard writes it, and the path without a
39
+ * trailing slash. `http:` is allowed, since an endpoint on a private network often has no TLS.
40
+ */
41
+ export const EndpointUrl = Schema.String.check(Schema.makeFilter(endpointUrlProblem)).pipe(Schema.decode({
42
+ decode: SchemaGetter.transform(canonicalEndpointUrl),
43
+ encode: SchemaGetter.passthrough(),
44
+ }), Schema.brand("EndpointUrl"));
45
+ /** The endpoint's host, with its port when that is not the scheme's default. */
46
+ export const endpointHostOf = (url) => new URL(url).host;
47
+ const decodeEndpointUrl = Schema.decodeSync(EndpointUrl);
48
+ /** A pasted endpoint as an {@link EndpointUrl}, or the reason it is not one, for a person to read. */
49
+ export const parseEndpointUrl = (raw) => {
50
+ const problem = endpointUrlProblem(raw);
51
+ return problem === undefined
52
+ ? { valid: true, url: decodeEndpointUrl(raw) }
53
+ : { valid: false, reason: `The endpoint ${problem}.` };
54
+ };
@@ -61,6 +61,7 @@ export declare const profileCredentialBindingWithAccountSchema: Schema.Struct<{
61
61
  }>, Schema.Struct<{
62
62
  readonly kind: Schema.Literal<"api-key">;
63
63
  readonly suffix: Schema.String;
64
+ readonly endpointHost: Schema.optional<Schema.String>;
64
65
  }>]>>;
65
66
  }>;
66
67
  }>;
@@ -95,6 +96,7 @@ export declare const listProfileCredentialBindingsResponseSchema: Schema.Struct<
95
96
  }>, Schema.Struct<{
96
97
  readonly kind: Schema.Literal<"api-key">;
97
98
  readonly suffix: Schema.String;
99
+ readonly endpointHost: Schema.optional<Schema.String>;
98
100
  }>]>>;
99
101
  }>;
100
102
  }>>;
@@ -165,6 +167,7 @@ export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpAp
165
167
  }>, Schema.Struct<{
166
168
  readonly kind: Schema.Literal<"api-key">;
167
169
  readonly suffix: Schema.String;
170
+ readonly endpointHost: Schema.optional<Schema.String>;
168
171
  }>]>>;
169
172
  }>;
170
173
  }>>;
@@ -223,6 +226,7 @@ export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpAp
223
226
  }>, Schema.Struct<{
224
227
  readonly kind: Schema.Literal<"api-key">;
225
228
  readonly suffix: Schema.String;
229
+ readonly endpointHost: Schema.optional<Schema.String>;
226
230
  }>]>>;
227
231
  }>;
228
232
  }>>;
@@ -71,6 +71,13 @@ export declare const systemIndexResponseSchema: Schema.Struct<{
71
71
  * Codex's own key file. A `$HOME` launch still refuses a Claude key.
72
72
  */
73
73
  readonly connectedAccountApiKeys: Schema.optional<Schema.Boolean>;
74
+ /**
75
+ * A Claude or Codex API key connects with an `endpoint`, the base URL of a compatible
76
+ * endpoint its requests go to: the summary's `login` carries its `endpointHost`, a placement
77
+ * receipt its `baseUrl`, and inference sends the exchange there. Without it, `endpoint` on
78
+ * a connect is dropped unread.
79
+ */
80
+ readonly connectedAccountEndpoints: Schema.optional<Schema.Boolean>;
74
81
  /**
75
82
  * Inference takes `allowedLogin` and refuses a key when it says `subscription`, answers and
76
83
  * errors carry the exchange's `receipt`, and a Claude API key runs inference. Without it,
@@ -175,6 +182,13 @@ export declare const SystemGroup: HttpApiGroup.HttpApiGroup<"system", HttpApiEnd
175
182
  * Codex's own key file. A `$HOME` launch still refuses a Claude key.
176
183
  */
177
184
  readonly connectedAccountApiKeys: Schema.optional<Schema.Boolean>;
185
+ /**
186
+ * A Claude or Codex API key connects with an `endpoint`, the base URL of a compatible
187
+ * endpoint its requests go to: the summary's `login` carries its `endpointHost`, a placement
188
+ * receipt its `baseUrl`, and inference sends the exchange there. Without it, `endpoint` on
189
+ * a connect is dropped unread.
190
+ */
191
+ readonly connectedAccountEndpoints: Schema.optional<Schema.Boolean>;
178
192
  /**
179
193
  * Inference takes `allowedLogin` and refuses a key when it says `subscription`, answers and
180
194
  * errors carry the exchange's `receipt`, and a Claude API key runs inference. Without it,
@@ -72,6 +72,13 @@ export const systemIndexResponseSchema = Schema.Struct({
72
72
  * Codex's own key file. A `$HOME` launch still refuses a Claude key.
73
73
  */
74
74
  connectedAccountApiKeys: Schema.optional(Schema.Boolean),
75
+ /**
76
+ * A Claude or Codex API key connects with an `endpoint`, the base URL of a compatible
77
+ * endpoint its requests go to: the summary's `login` carries its `endpointHost`, a placement
78
+ * receipt its `baseUrl`, and inference sends the exchange there. Without it, `endpoint` on
79
+ * a connect is dropped unread.
80
+ */
81
+ connectedAccountEndpoints: Schema.optional(Schema.Boolean),
75
82
  /**
76
83
  * Inference takes `allowedLogin` and refuses a key when it says `subscription`, answers and
77
84
  * errors carry the exchange's `receipt`, and a Claude API key runs inference. Without it,
@@ -973,7 +973,8 @@ export declare const putWorkspaceCredentialsRequestSchema: Schema.Struct<{
973
973
  export type PutWorkspaceCredentialsRequest = typeof putWorkspaceCredentialsRequestSchema.Type;
974
974
  /**
975
975
  * What a placed login spends. A key carries its last four characters; a Claude key also its file's
976
- * absolute path, which Claude reads through an `apiKeyHelper` such as `cat <keyPath>`.
976
+ * absolute path, which Claude reads through an `apiKeyHelper` such as `cat <keyPath>`. A key with an
977
+ * endpoint carries its `baseUrl`, which nothing in the home holds: the harness's launch sets it.
977
978
  */
978
979
  export declare const credentialPlacementLoginSchema: Schema.Union<readonly [Schema.Struct<{
979
980
  readonly kind: Schema.Literal<"subscription">;
@@ -981,6 +982,7 @@ export declare const credentialPlacementLoginSchema: Schema.Union<readonly [Sche
981
982
  readonly kind: Schema.Literal<"api-key">;
982
983
  readonly suffix: Schema.String;
983
984
  readonly keyPath: Schema.optional<Schema.String>;
985
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
984
986
  }>]>;
985
987
  export type CredentialPlacementLogin = typeof credentialPlacementLoginSchema.Type;
986
988
  /** One login written into one home: its id stays the same while a refresh moves its revision. */
@@ -994,6 +996,7 @@ export declare const credentialPlacementReceiptSchema: Schema.Struct<{
994
996
  readonly kind: Schema.Literal<"api-key">;
995
997
  readonly suffix: Schema.String;
996
998
  readonly keyPath: Schema.optional<Schema.String>;
999
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
997
1000
  }>]>;
998
1001
  readonly pinned: Schema.Boolean;
999
1002
  }>;
@@ -1009,6 +1012,7 @@ export declare const workspaceCredentialPlacementReceiptSchema: Schema.Struct<{
1009
1012
  readonly kind: Schema.Literal<"api-key">;
1010
1013
  readonly suffix: Schema.String;
1011
1014
  readonly keyPath: Schema.optional<Schema.String>;
1015
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
1012
1016
  }>]>;
1013
1017
  readonly pinned: Schema.Boolean;
1014
1018
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -1037,6 +1041,7 @@ export declare const workspaceCredentialHomeSchema: Schema.Struct<{
1037
1041
  readonly kind: Schema.Literal<"api-key">;
1038
1042
  readonly suffix: Schema.String;
1039
1043
  readonly keyPath: Schema.optional<Schema.String>;
1044
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
1040
1045
  }>]>;
1041
1046
  readonly pinned: Schema.Boolean;
1042
1047
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -1110,6 +1115,7 @@ export declare const putWorkspaceCredentialsResponseSchema: Schema.Struct<{
1110
1115
  readonly kind: Schema.Literal<"api-key">;
1111
1116
  readonly suffix: Schema.String;
1112
1117
  readonly keyPath: Schema.optional<Schema.String>;
1118
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
1113
1119
  }>]>;
1114
1120
  readonly pinned: Schema.Boolean;
1115
1121
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -1189,6 +1195,7 @@ export declare const pruneWorkspaceCredentialsResponseSchema: Schema.Struct<{
1189
1195
  readonly kind: Schema.Literal<"api-key">;
1190
1196
  readonly suffix: Schema.String;
1191
1197
  readonly keyPath: Schema.optional<Schema.String>;
1198
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
1192
1199
  }>]>;
1193
1200
  readonly pinned: Schema.Boolean;
1194
1201
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -1268,6 +1275,7 @@ export declare const listWorkspaceCredentialsResponseSchema: Schema.Struct<{
1268
1275
  readonly kind: Schema.Literal<"api-key">;
1269
1276
  readonly suffix: Schema.String;
1270
1277
  readonly keyPath: Schema.optional<Schema.String>;
1278
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
1271
1279
  }>]>;
1272
1280
  readonly pinned: Schema.Boolean;
1273
1281
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -3647,6 +3655,7 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
3647
3655
  readonly kind: Schema.Literal<"api-key">;
3648
3656
  readonly suffix: Schema.String;
3649
3657
  readonly keyPath: Schema.optional<Schema.String>;
3658
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
3650
3659
  }>]>;
3651
3660
  readonly pinned: Schema.Boolean;
3652
3661
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -3868,6 +3877,7 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
3868
3877
  readonly kind: Schema.Literal<"api-key">;
3869
3878
  readonly suffix: Schema.String;
3870
3879
  readonly keyPath: Schema.optional<Schema.String>;
3880
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
3871
3881
  }>]>;
3872
3882
  readonly pinned: Schema.Boolean;
3873
3883
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -3975,6 +3985,7 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
3975
3985
  readonly kind: Schema.Literal<"api-key">;
3976
3986
  readonly suffix: Schema.String;
3977
3987
  readonly keyPath: Schema.optional<Schema.String>;
3988
+ readonly baseUrl: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "EndpointUrl">>;
3978
3989
  }>]>;
3979
3990
  readonly pinned: Schema.Boolean;
3980
3991
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
@@ -2,6 +2,7 @@ import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  import { BudgetExceededError } from "./budgets.js";
4
4
  import { connectedAccountProviderSchema } from "./connected-accounts.js";
5
+ import { EndpointUrl } from "./endpoint-url.js";
5
6
  import { PersonId } from "./person-id.js";
6
7
  import { runCommandSchema, runSchema } from "./runs.js";
7
8
  import { workspaceProcessUserSchema } from "./sessions.js";
@@ -805,7 +806,8 @@ export const putWorkspaceCredentialsRequestSchema = Schema.Struct({
805
806
  });
806
807
  /**
807
808
  * What a placed login spends. A key carries its last four characters; a Claude key also its file's
808
- * absolute path, which Claude reads through an `apiKeyHelper` such as `cat <keyPath>`.
809
+ * absolute path, which Claude reads through an `apiKeyHelper` such as `cat <keyPath>`. A key with an
810
+ * endpoint carries its `baseUrl`, which nothing in the home holds: the harness's launch sets it.
809
811
  */
810
812
  export const credentialPlacementLoginSchema = Schema.Union([
811
813
  Schema.Struct({ kind: Schema.Literal("subscription") }),
@@ -813,6 +815,7 @@ export const credentialPlacementLoginSchema = Schema.Union([
813
815
  kind: Schema.Literal("api-key"),
814
816
  suffix: NonEmptyString,
815
817
  keyPath: Schema.optional(NonEmptyString),
818
+ baseUrl: Schema.optional(EndpointUrl),
816
819
  }),
817
820
  ]);
818
821
  /** One login written into one home: its id stays the same while a refresh moves its revision. */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./core-api/connected-accounts.js";
2
2
  export * from "./core-api/control-plane.js";
3
+ export * from "./core-api/endpoint-url.js";
3
4
  export * from "./core-api/github.js";
4
5
  export * from "./core-api/inference.js";
5
6
  export * from "./core-api/packages.js";
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./core-api/connected-accounts.js";
2
2
  export * from "./core-api/control-plane.js";
3
+ export * from "./core-api/endpoint-url.js";
3
4
  export * from "./core-api/github.js";
4
5
  export * from "./core-api/inference.js";
5
6
  export * from "./core-api/packages.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealant/api-contracts-next",
3
- "version": "0.40.0-next.814",
3
+ "version": "0.40.0-next.815",
4
4
  "description": "Contract-first HTTP API definitions for Sealant services",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  "peerDependencies": {
37
37
  "effect": "^4.0.5"
38
38
  },
39
- "gitHead": "fcc1174e4f3a10476b1f7cbbe209734f557570e6",
39
+ "gitHead": "7c62e60f6ddc96a2de5cc52c43586676818dd971",
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  }