@sealant/api-contracts-next 0.39.0-next.749 → 0.39.0-next.751
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.
- package/dist/core-api/access-tokens.d.ts +9 -9
- package/dist/core-api/access-tokens.js +4 -4
- package/dist/core-api/budgets.js +1 -1
- package/dist/core-api/connected-accounts.d.ts +12 -12
- package/dist/core-api/connected-accounts.js +6 -6
- package/dist/core-api/control-plane.d.ts +826 -826
- package/dist/core-api/control-plane.js +1 -1
- package/dist/core-api/github.d.ts +27 -27
- package/dist/core-api/github.js +7 -7
- package/dist/core-api/inference.d.ts +4 -4
- package/dist/core-api/inference.js +6 -6
- package/dist/core-api/packages.d.ts +4 -4
- package/dist/core-api/packages.js +3 -3
- package/dist/core-api/profiles.d.ts +10 -10
- package/dist/core-api/profiles.js +5 -5
- package/dist/core-api/registries.d.ts +14 -14
- package/dist/core-api/registries.js +3 -3
- package/dist/core-api/request-refusal.d.ts +8 -7
- package/dist/core-api/request-refusal.js +12 -12
- package/dist/core-api/runs.d.ts +27 -27
- package/dist/core-api/runs.js +4 -4
- package/dist/core-api/sessions.d.ts +35 -35
- package/dist/core-api/sessions.js +8 -8
- package/dist/core-api/ssh-keys.d.ts +12 -12
- package/dist/core-api/ssh-keys.js +7 -7
- package/dist/core-api/system.d.ts +6 -6
- package/dist/core-api/system.js +2 -2
- package/dist/core-api/users.d.ts +9 -9
- package/dist/core-api/users.js +5 -5
- package/dist/core-api/workspaces.d.ts +75 -75
- package/dist/core-api/workspaces.js +13 -13
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApi, OpenApi } from "effect/
|
|
1
|
+
import { HttpApi, OpenApi } from "effect/http-api";
|
|
2
2
|
import { AccessTokensGroup } from "./access-tokens.js";
|
|
3
3
|
import { ConnectedAccountsGroup } from "./connected-accounts.js";
|
|
4
4
|
import { GitHubGroup } from "./github.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApi, HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApi, HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
export declare const messageResponseSchema: Schema.Struct<{
|
|
4
4
|
readonly message: Schema.String;
|
|
5
5
|
}>;
|
|
@@ -134,17 +134,17 @@ declare const GitHubInternalServerError_base: Schema.Class<GitHubInternalServerE
|
|
|
134
134
|
}>, import("effect/Cause").YieldableError>;
|
|
135
135
|
export declare class GitHubInternalServerError extends GitHubInternalServerError_base {
|
|
136
136
|
}
|
|
137
|
-
export declare const GitHubGroup: HttpApiGroup.HttpApiGroup<"github", HttpApiEndpoint.HttpApiEndpoint<"handleWebhook", "POST", "/webhooks",
|
|
137
|
+
export declare const GitHubGroup: HttpApiGroup.HttpApiGroup<"github", HttpApiEndpoint.HttpApiEndpoint<"handleWebhook", "POST", "/webhooks", never, never, Schema.toCodecJson<Schema.String>, Schema.toCodecStringTree<Schema.Struct<{
|
|
138
138
|
readonly "x-github-delivery": Schema.optional<Schema.String>;
|
|
139
139
|
readonly "x-github-event": Schema.optional<Schema.String>;
|
|
140
140
|
readonly "x-hub-signature-256": Schema.optional<Schema.String>;
|
|
141
|
-
}>>,
|
|
141
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
142
142
|
readonly deliveryId: Schema.String;
|
|
143
143
|
readonly status: Schema.Literals<readonly ["received", "processed", "failed", "ignored"]>;
|
|
144
|
-
}>>,
|
|
144
|
+
}>>, Schema.toCodecJson<typeof GitHubBadRequestError | typeof GitHubUnauthorizedError | typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"importInstallation", "POST", "/installations/import", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
145
145
|
readonly userId: Schema.String;
|
|
146
146
|
readonly externalInstallationId: Schema.String;
|
|
147
|
-
}>>,
|
|
147
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
148
148
|
readonly installation: Schema.Struct<{
|
|
149
149
|
readonly installationId: Schema.String;
|
|
150
150
|
readonly externalInstallationId: Schema.String;
|
|
@@ -156,12 +156,12 @@ export declare const GitHubGroup: HttpApiGroup.HttpApiGroup<"github", HttpApiEnd
|
|
|
156
156
|
}>;
|
|
157
157
|
readonly syncedRepositoryCount: Schema.Number;
|
|
158
158
|
readonly syncedAt: Schema.String;
|
|
159
|
-
}>>,
|
|
159
|
+
}>>, Schema.toCodecJson<typeof GitHubNotFoundError | typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listInstallationRepositories", "GET", "/installations/:installationId/repositories", Schema.toCodecStringTree<Schema.Struct<{
|
|
160
160
|
readonly installationId: Schema.String;
|
|
161
|
-
}>>,
|
|
161
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
162
162
|
readonly userId: Schema.String;
|
|
163
163
|
readonly search: Schema.optional<Schema.String>;
|
|
164
|
-
}>>,
|
|
164
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
165
165
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
166
166
|
readonly installationRepositoryId: Schema.String;
|
|
167
167
|
readonly installationId: Schema.String;
|
|
@@ -175,9 +175,9 @@ export declare const GitHubGroup: HttpApiGroup.HttpApiGroup<"github", HttpApiEnd
|
|
|
175
175
|
readonly isArchived: Schema.Boolean;
|
|
176
176
|
readonly lastSyncedAt: Schema.optional<Schema.String>;
|
|
177
177
|
}>>;
|
|
178
|
-
}>>,
|
|
178
|
+
}>>, Schema.toCodecJson<typeof GitHubForbiddenError | typeof GitHubNotFoundError | typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listInstallations", "GET", "/installations", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
179
179
|
readonly userId: Schema.String;
|
|
180
|
-
}>>,
|
|
180
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
181
181
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
182
182
|
readonly installationId: Schema.String;
|
|
183
183
|
readonly externalInstallationId: Schema.String;
|
|
@@ -187,26 +187,26 @@ export declare const GitHubGroup: HttpApiGroup.HttpApiGroup<"github", HttpApiEnd
|
|
|
187
187
|
readonly repositorySelection: Schema.Literals<readonly ["all", "selected"]>;
|
|
188
188
|
readonly lastSyncedAt: Schema.optional<Schema.String>;
|
|
189
189
|
}>>;
|
|
190
|
-
}>>,
|
|
190
|
+
}>>, Schema.toCodecJson<typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"syncInstallation", "POST", "/installations/:installationId/sync", Schema.toCodecStringTree<Schema.Struct<{
|
|
191
191
|
readonly installationId: Schema.String;
|
|
192
|
-
}>>,
|
|
192
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
193
193
|
readonly userId: Schema.String;
|
|
194
|
-
}>>,
|
|
194
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
195
195
|
readonly installationId: Schema.String;
|
|
196
196
|
readonly syncedRepositoryCount: Schema.Number;
|
|
197
197
|
readonly syncedAt: Schema.String;
|
|
198
|
-
}>>,
|
|
199
|
-
export declare const GitHubApi: HttpApi.HttpApi<"sealantGitHubApi", HttpApiGroup.HttpApiGroup<"github", HttpApiEndpoint.HttpApiEndpoint<"handleWebhook", "POST", "/webhooks",
|
|
198
|
+
}>>, Schema.toCodecJson<typeof GitHubForbiddenError | typeof GitHubNotFoundError | typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never>, false>;
|
|
199
|
+
export declare const GitHubApi: HttpApi.HttpApi<"sealantGitHubApi", HttpApiGroup.HttpApiGroup<"github", HttpApiEndpoint.HttpApiEndpoint<"handleWebhook", "POST", "/webhooks", never, never, Schema.toCodecJson<Schema.String>, Schema.toCodecStringTree<Schema.Struct<{
|
|
200
200
|
readonly "x-github-delivery": Schema.optional<Schema.String>;
|
|
201
201
|
readonly "x-github-event": Schema.optional<Schema.String>;
|
|
202
202
|
readonly "x-hub-signature-256": Schema.optional<Schema.String>;
|
|
203
|
-
}>>,
|
|
203
|
+
}>>, Schema.toCodecJson<Schema.Struct<{
|
|
204
204
|
readonly deliveryId: Schema.String;
|
|
205
205
|
readonly status: Schema.Literals<readonly ["received", "processed", "failed", "ignored"]>;
|
|
206
|
-
}>>,
|
|
206
|
+
}>>, Schema.toCodecJson<typeof GitHubBadRequestError | typeof GitHubUnauthorizedError | typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"importInstallation", "POST", "/installations/import", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
207
207
|
readonly userId: Schema.String;
|
|
208
208
|
readonly externalInstallationId: Schema.String;
|
|
209
|
-
}>>,
|
|
209
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
210
210
|
readonly installation: Schema.Struct<{
|
|
211
211
|
readonly installationId: Schema.String;
|
|
212
212
|
readonly externalInstallationId: Schema.String;
|
|
@@ -218,12 +218,12 @@ export declare const GitHubApi: HttpApi.HttpApi<"sealantGitHubApi", HttpApiGroup
|
|
|
218
218
|
}>;
|
|
219
219
|
readonly syncedRepositoryCount: Schema.Number;
|
|
220
220
|
readonly syncedAt: Schema.String;
|
|
221
|
-
}>>,
|
|
221
|
+
}>>, Schema.toCodecJson<typeof GitHubNotFoundError | typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listInstallationRepositories", "GET", "/installations/:installationId/repositories", Schema.toCodecStringTree<Schema.Struct<{
|
|
222
222
|
readonly installationId: Schema.String;
|
|
223
|
-
}>>,
|
|
223
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
224
224
|
readonly userId: Schema.String;
|
|
225
225
|
readonly search: Schema.optional<Schema.String>;
|
|
226
|
-
}>>,
|
|
226
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
227
227
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
228
228
|
readonly installationRepositoryId: Schema.String;
|
|
229
229
|
readonly installationId: Schema.String;
|
|
@@ -237,9 +237,9 @@ export declare const GitHubApi: HttpApi.HttpApi<"sealantGitHubApi", HttpApiGroup
|
|
|
237
237
|
readonly isArchived: Schema.Boolean;
|
|
238
238
|
readonly lastSyncedAt: Schema.optional<Schema.String>;
|
|
239
239
|
}>>;
|
|
240
|
-
}>>,
|
|
240
|
+
}>>, Schema.toCodecJson<typeof GitHubForbiddenError | typeof GitHubNotFoundError | typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listInstallations", "GET", "/installations", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
241
241
|
readonly userId: Schema.String;
|
|
242
|
-
}>>,
|
|
242
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
243
243
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
244
244
|
readonly installationId: Schema.String;
|
|
245
245
|
readonly externalInstallationId: Schema.String;
|
|
@@ -249,13 +249,13 @@ export declare const GitHubApi: HttpApi.HttpApi<"sealantGitHubApi", HttpApiGroup
|
|
|
249
249
|
readonly repositorySelection: Schema.Literals<readonly ["all", "selected"]>;
|
|
250
250
|
readonly lastSyncedAt: Schema.optional<Schema.String>;
|
|
251
251
|
}>>;
|
|
252
|
-
}>>,
|
|
252
|
+
}>>, Schema.toCodecJson<typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"syncInstallation", "POST", "/installations/:installationId/sync", Schema.toCodecStringTree<Schema.Struct<{
|
|
253
253
|
readonly installationId: Schema.String;
|
|
254
|
-
}>>,
|
|
254
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
255
255
|
readonly userId: Schema.String;
|
|
256
|
-
}>>,
|
|
256
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
257
257
|
readonly installationId: Schema.String;
|
|
258
258
|
readonly syncedRepositoryCount: Schema.Number;
|
|
259
259
|
readonly syncedAt: Schema.String;
|
|
260
|
-
}>>,
|
|
260
|
+
}>>, Schema.toCodecJson<typeof GitHubForbiddenError | typeof GitHubNotFoundError | typeof GitHubServiceUnavailableError | typeof GitHubInternalServerError>, never, never>, false>>;
|
|
261
261
|
export {};
|
package/dist/core-api/github.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi
|
|
2
|
+
import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
// These literal sets mirror the control-plane DB enums (packages/db `control-plane.ts`). They are
|
|
4
4
|
// INLINED here so the public contract package carries NO @sealant/db dependency — which keeps
|
|
5
5
|
// consumers like @sealant/sdk free of drizzle/pg. Keep them in sync with the db schema.
|
|
@@ -77,27 +77,27 @@ export const githubWebhookResponseSchema = Schema.Struct({
|
|
|
77
77
|
deliveryId: NonEmptyString,
|
|
78
78
|
status: GitHubWebhookDeliveryStatusSchema,
|
|
79
79
|
});
|
|
80
|
-
export class GitHubBadRequestError extends Schema.
|
|
80
|
+
export class GitHubBadRequestError extends Schema.TaggedError()("GitHubBadRequestError", {
|
|
81
81
|
message: Schema.String,
|
|
82
82
|
}, { httpApiStatus: 400 }) {
|
|
83
83
|
}
|
|
84
|
-
export class GitHubUnauthorizedError extends Schema.
|
|
84
|
+
export class GitHubUnauthorizedError extends Schema.TaggedError()("GitHubUnauthorizedError", {
|
|
85
85
|
message: Schema.String,
|
|
86
86
|
}, { httpApiStatus: 401 }) {
|
|
87
87
|
}
|
|
88
|
-
export class GitHubForbiddenError extends Schema.
|
|
88
|
+
export class GitHubForbiddenError extends Schema.TaggedError()("GitHubForbiddenError", {
|
|
89
89
|
message: Schema.String,
|
|
90
90
|
}, { httpApiStatus: 403 }) {
|
|
91
91
|
}
|
|
92
|
-
export class GitHubNotFoundError extends Schema.
|
|
92
|
+
export class GitHubNotFoundError extends Schema.TaggedError()("GitHubNotFoundError", {
|
|
93
93
|
message: Schema.String,
|
|
94
94
|
}, { httpApiStatus: 404 }) {
|
|
95
95
|
}
|
|
96
|
-
export class GitHubServiceUnavailableError extends Schema.
|
|
96
|
+
export class GitHubServiceUnavailableError extends Schema.TaggedError()("GitHubServiceUnavailableError", {
|
|
97
97
|
message: Schema.String,
|
|
98
98
|
}, { httpApiStatus: 503 }) {
|
|
99
99
|
}
|
|
100
|
-
export class GitHubInternalServerError extends Schema.
|
|
100
|
+
export class GitHubInternalServerError extends Schema.TaggedError()("GitHubInternalServerError", {
|
|
101
101
|
message: Schema.String,
|
|
102
102
|
}, { httpApiStatus: 500 }) {
|
|
103
103
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* turn, and sending `tools` with a codex account is a 400.
|
|
21
21
|
*/
|
|
22
22
|
import { Schema } from "effect";
|
|
23
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
23
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
24
24
|
import { BudgetExceededError } from "./budgets.js";
|
|
25
25
|
/**
|
|
26
26
|
* Connected-account selection — the same reference shape as workspace creation: values are account
|
|
@@ -166,7 +166,7 @@ declare const InferenceInternalServerError_base: Schema.Class<InferenceInternalS
|
|
|
166
166
|
}>, import("effect/Cause").YieldableError>;
|
|
167
167
|
export declare class InferenceInternalServerError extends InferenceInternalServerError_base {
|
|
168
168
|
}
|
|
169
|
-
export declare const InferenceGroup: HttpApiGroup.HttpApiGroup<"inference", HttpApiEndpoint.HttpApiEndpoint<"respond", "POST", "/respond",
|
|
169
|
+
export declare const InferenceGroup: HttpApiGroup.HttpApiGroup<"inference", HttpApiEndpoint.HttpApiEndpoint<"respond", "POST", "/respond", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
170
170
|
readonly ownerUserId: Schema.String;
|
|
171
171
|
readonly credentials: Schema.optional<Schema.Struct<{
|
|
172
172
|
readonly profileId: Schema.optional<Schema.String>;
|
|
@@ -200,7 +200,7 @@ export declare const InferenceGroup: HttpApiGroup.HttpApiGroup<"inference", Http
|
|
|
200
200
|
readonly content: Schema.String;
|
|
201
201
|
readonly isError: Schema.optional<Schema.Boolean>;
|
|
202
202
|
}>>>;
|
|
203
|
-
}>>,
|
|
203
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
204
204
|
readonly sessionId: Schema.String;
|
|
205
205
|
readonly turn: Schema.Union<readonly [Schema.Struct<{
|
|
206
206
|
readonly type: Schema.Literal<"text">;
|
|
@@ -219,5 +219,5 @@ export declare const InferenceGroup: HttpApiGroup.HttpApiGroup<"inference", Http
|
|
|
219
219
|
readonly inputTokens: Schema.Number;
|
|
220
220
|
readonly outputTokens: Schema.Number;
|
|
221
221
|
}>>;
|
|
222
|
-
}>>,
|
|
222
|
+
}>>, Schema.toCodecJson<typeof BudgetExceededError | typeof InferenceBadRequestError | typeof InferenceNotFoundError | typeof InferenceConflictError | typeof InferenceUnavailableError | typeof InferenceInternalServerError>, never, never>, false>;
|
|
223
223
|
export {};
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* turn, and sending `tools` with a codex account is a 400.
|
|
21
21
|
*/
|
|
22
22
|
import { Schema } from "effect";
|
|
23
|
-
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
23
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
24
24
|
import { BudgetExceededError } from "./budgets.js";
|
|
25
25
|
const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
|
|
26
26
|
/**
|
|
@@ -108,17 +108,17 @@ export const inferenceRespondResponseSchema = Schema.Struct({
|
|
|
108
108
|
// ---------------------------------------------------------------------------------------------
|
|
109
109
|
// Errors
|
|
110
110
|
// ---------------------------------------------------------------------------------------------
|
|
111
|
-
export class InferenceBadRequestError extends Schema.
|
|
111
|
+
export class InferenceBadRequestError extends Schema.TaggedError()("InferenceBadRequestError", { message: Schema.String }, { httpApiStatus: 400 }) {
|
|
112
112
|
}
|
|
113
113
|
/** Unknown account/profile (uniform for foreign owners) or an expired/unknown inference session. */
|
|
114
|
-
export class InferenceNotFoundError extends Schema.
|
|
114
|
+
export class InferenceNotFoundError extends Schema.TaggedError()("InferenceNotFoundError", { message: Schema.String }, { httpApiStatus: 404 }) {
|
|
115
115
|
}
|
|
116
116
|
/** The selected account exists but is not usable (status "invalid") — reconnect it. */
|
|
117
|
-
export class InferenceConflictError extends Schema.
|
|
117
|
+
export class InferenceConflictError extends Schema.TaggedError()("InferenceConflictError", { message: Schema.String }, { httpApiStatus: 409 }) {
|
|
118
118
|
}
|
|
119
|
-
export class InferenceUnavailableError extends Schema.
|
|
119
|
+
export class InferenceUnavailableError extends Schema.TaggedError()("InferenceUnavailableError", { message: Schema.String }, { httpApiStatus: 503 }) {
|
|
120
120
|
}
|
|
121
|
-
export class InferenceInternalServerError extends Schema.
|
|
121
|
+
export class InferenceInternalServerError extends Schema.TaggedError()("InferenceInternalServerError", { message: Schema.String }, { httpApiStatus: 500 }) {
|
|
122
122
|
}
|
|
123
123
|
// ---------------------------------------------------------------------------------------------
|
|
124
124
|
// Group
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
export declare const packageTargetOsSchema: Schema.Literals<readonly ["arch", "fedora", "nix", "ubuntu"]>;
|
|
4
4
|
export type PackageTargetOs = typeof packageTargetOsSchema.Type;
|
|
5
5
|
export declare const packageResolutionStatusSchema: Schema.Literals<readonly ["resolved", "ambiguous", "unsupported", "not-found", "invalid"]>;
|
|
@@ -126,10 +126,10 @@ declare const PackagesInternalServerError_base: Schema.Class<PackagesInternalSer
|
|
|
126
126
|
}>, import("effect/Cause").YieldableError>;
|
|
127
127
|
export declare class PackagesInternalServerError extends PackagesInternalServerError_base {
|
|
128
128
|
}
|
|
129
|
-
export declare const PackagesGroup: HttpApiGroup.HttpApiGroup<"packages", HttpApiEndpoint.HttpApiEndpoint<"resolvePackage", "GET", "/resolve",
|
|
129
|
+
export declare const PackagesGroup: HttpApiGroup.HttpApiGroup<"packages", HttpApiEndpoint.HttpApiEndpoint<"resolvePackage", "GET", "/resolve", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
130
130
|
readonly query: Schema.String;
|
|
131
131
|
readonly targetOs: Schema.optional<Schema.Literals<readonly ["arch", "fedora", "nix", "ubuntu"]>>;
|
|
132
|
-
}>>,
|
|
132
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
133
133
|
readonly requested: Schema.String;
|
|
134
134
|
readonly normalized: Schema.String;
|
|
135
135
|
readonly status: Schema.Literals<readonly ["resolved", "ambiguous", "unsupported", "not-found", "invalid"]>;
|
|
@@ -175,5 +175,5 @@ export declare const PackagesGroup: HttpApiGroup.HttpApiGroup<"packages", HttpAp
|
|
|
175
175
|
}>>;
|
|
176
176
|
readonly fetchedAt: Schema.String;
|
|
177
177
|
readonly expiresAt: Schema.String;
|
|
178
|
-
}>>,
|
|
178
|
+
}>>, Schema.toCodecJson<typeof PackagesBadGatewayError | typeof PackagesInternalServerError>, never, never>, false>;
|
|
179
179
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
3
3
|
const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
|
|
4
4
|
export const packageTargetOsSchema = Schema.Literals(["arch", "fedora", "nix", "ubuntu"]);
|
|
5
5
|
export const packageResolutionStatusSchema = Schema.Literals([
|
|
@@ -43,11 +43,11 @@ export const resolvePackageQuerySchema = Schema.Struct({
|
|
|
43
43
|
targetOs: Schema.optional(packageTargetOsSchema),
|
|
44
44
|
});
|
|
45
45
|
export const resolvePackageResponseSchema = packageResolutionSchema;
|
|
46
|
-
export class PackagesBadGatewayError extends Schema.
|
|
46
|
+
export class PackagesBadGatewayError extends Schema.TaggedError()("PackagesBadGatewayError", {
|
|
47
47
|
message: Schema.String,
|
|
48
48
|
}, { httpApiStatus: 502 }) {
|
|
49
49
|
}
|
|
50
|
-
export class PackagesInternalServerError extends Schema.
|
|
50
|
+
export class PackagesInternalServerError extends Schema.TaggedError()("PackagesInternalServerError", {
|
|
51
51
|
message: Schema.String,
|
|
52
52
|
}, { httpApiStatus: 500 }) {
|
|
53
53
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
export declare const profileStatusSchema: Schema.Literals<readonly ["active", "archived"]>;
|
|
4
4
|
export type ProfileStatus = typeof profileStatusSchema.Type;
|
|
5
5
|
export declare const profileSummarySchema: Schema.Struct<{
|
|
@@ -110,11 +110,11 @@ declare const ProfileInternalServerError_base: Schema.Class<ProfileInternalServe
|
|
|
110
110
|
}>, import("effect/Cause").YieldableError>;
|
|
111
111
|
export declare class ProfileInternalServerError extends ProfileInternalServerError_base {
|
|
112
112
|
}
|
|
113
|
-
export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpApiEndpoint.HttpApiEndpoint<"listProfileCredentialBindings", "GET", "/:profileId/credential-bindings",
|
|
113
|
+
export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpApiEndpoint.HttpApiEndpoint<"listProfileCredentialBindings", "GET", "/:profileId/credential-bindings", Schema.toCodecStringTree<Schema.Struct<{
|
|
114
114
|
readonly profileId: Schema.String;
|
|
115
|
-
}>>,
|
|
115
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
116
116
|
readonly ownerUserId: Schema.String;
|
|
117
|
-
}>>,
|
|
117
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
118
118
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
119
119
|
readonly profileId: Schema.String;
|
|
120
120
|
readonly provider: Schema.Literals<readonly ["claude", "codex", "github"]>;
|
|
@@ -139,9 +139,9 @@ export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpAp
|
|
|
139
139
|
}>;
|
|
140
140
|
}>;
|
|
141
141
|
}>>;
|
|
142
|
-
}>>,
|
|
142
|
+
}>>, Schema.toCodecJson<typeof ProfileNotFoundError | typeof ProfileInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listProfiles", "GET", "/", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
143
143
|
readonly ownerUserId: Schema.String;
|
|
144
|
-
}>>,
|
|
144
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
145
145
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
146
146
|
readonly profileId: Schema.String;
|
|
147
147
|
readonly ownerUserId: Schema.String;
|
|
@@ -153,13 +153,13 @@ export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpAp
|
|
|
153
153
|
readonly createdAt: Schema.String;
|
|
154
154
|
readonly updatedAt: Schema.String;
|
|
155
155
|
}>>;
|
|
156
|
-
}>>,
|
|
156
|
+
}>>, Schema.toCodecJson<typeof ProfileInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"setProfileCredentialBinding", "PUT", "/:profileId/credential-bindings", Schema.toCodecStringTree<Schema.Struct<{
|
|
157
157
|
readonly profileId: Schema.String;
|
|
158
|
-
}>>,
|
|
158
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
159
159
|
readonly ownerUserId: Schema.String;
|
|
160
160
|
readonly provider: Schema.Literals<readonly ["claude", "codex", "github"]>;
|
|
161
161
|
readonly connectedAccountId: Schema.NullOr<Schema.String>;
|
|
162
|
-
}>>,
|
|
162
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
163
163
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
164
164
|
readonly profileId: Schema.String;
|
|
165
165
|
readonly provider: Schema.Literals<readonly ["claude", "codex", "github"]>;
|
|
@@ -184,5 +184,5 @@ export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpAp
|
|
|
184
184
|
}>;
|
|
185
185
|
}>;
|
|
186
186
|
}>>;
|
|
187
|
-
}>>,
|
|
187
|
+
}>>, Schema.toCodecJson<typeof ProfileBadRequestError | typeof ProfileNotFoundError | typeof ProfileConflictError | typeof ProfileInternalServerError>, never, never>, false>;
|
|
188
188
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
3
3
|
import { connectedAccountProviderSchema, connectedAccountSummarySchema, } from "./connected-accounts.js";
|
|
4
4
|
const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
|
|
5
5
|
/*
|
|
@@ -41,19 +41,19 @@ export const setProfileCredentialBindingRequestSchema = Schema.Struct({
|
|
|
41
41
|
// null clears the binding for that provider; the profile id travels in the URL.
|
|
42
42
|
connectedAccountId: Schema.NullOr(NonEmptyString),
|
|
43
43
|
});
|
|
44
|
-
export class ProfileBadRequestError extends Schema.
|
|
44
|
+
export class ProfileBadRequestError extends Schema.TaggedError()("ProfileBadRequestError", {
|
|
45
45
|
message: Schema.String,
|
|
46
46
|
}, { httpApiStatus: 400 }) {
|
|
47
47
|
}
|
|
48
|
-
export class ProfileNotFoundError extends Schema.
|
|
48
|
+
export class ProfileNotFoundError extends Schema.TaggedError()("ProfileNotFoundError", {
|
|
49
49
|
message: Schema.String,
|
|
50
50
|
}, { httpApiStatus: 404 }) {
|
|
51
51
|
}
|
|
52
|
-
export class ProfileConflictError extends Schema.
|
|
52
|
+
export class ProfileConflictError extends Schema.TaggedError()("ProfileConflictError", {
|
|
53
53
|
message: Schema.String,
|
|
54
54
|
}, { httpApiStatus: 409 }) {
|
|
55
55
|
}
|
|
56
|
-
export class ProfileInternalServerError extends Schema.
|
|
56
|
+
export class ProfileInternalServerError extends Schema.TaggedError()("ProfileInternalServerError", {
|
|
57
57
|
message: Schema.String,
|
|
58
58
|
}, { httpApiStatus: 500 }) {
|
|
59
59
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
export declare const registryIdParamsSchema: Schema.Struct<{
|
|
4
4
|
readonly registryId: Schema.String;
|
|
5
5
|
}>;
|
|
@@ -63,44 +63,44 @@ declare const RegistriesBadGatewayError_base: Schema.Class<RegistriesBadGatewayE
|
|
|
63
63
|
}>, import("effect/Cause").YieldableError>;
|
|
64
64
|
export declare class RegistriesBadGatewayError extends RegistriesBadGatewayError_base {
|
|
65
65
|
}
|
|
66
|
-
export declare const RegistriesGroup: HttpApiGroup.HttpApiGroup<"registries", HttpApiEndpoint.HttpApiEndpoint<"getRegistry", "GET", "/:registryId",
|
|
66
|
+
export declare const RegistriesGroup: HttpApiGroup.HttpApiGroup<"registries", HttpApiEndpoint.HttpApiEndpoint<"getRegistry", "GET", "/:registryId", Schema.toCodecStringTree<Schema.Struct<{
|
|
67
67
|
readonly registryId: Schema.String;
|
|
68
|
-
}>>,
|
|
68
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
69
69
|
readonly name: Schema.String;
|
|
70
70
|
readonly baseUrl: Schema.String;
|
|
71
71
|
readonly pushRegistry: Schema.String;
|
|
72
72
|
readonly hasBasicAuth: Schema.Boolean;
|
|
73
|
-
}>>,
|
|
73
|
+
}>>, Schema.toCodecJson<typeof RegistriesNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getRegistryManifest", "GET", "/:registryId/manifest", Schema.toCodecStringTree<Schema.Struct<{
|
|
74
74
|
readonly registryId: Schema.String;
|
|
75
|
-
}>>,
|
|
75
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
76
76
|
readonly repository: Schema.String;
|
|
77
77
|
readonly reference: Schema.String;
|
|
78
|
-
}>>,
|
|
78
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
79
79
|
readonly repository: Schema.String;
|
|
80
80
|
readonly reference: Schema.String;
|
|
81
81
|
readonly digest: Schema.optional<Schema.String>;
|
|
82
82
|
readonly contentType: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
83
83
|
readonly manifest: Schema.Unknown;
|
|
84
|
-
}>>,
|
|
84
|
+
}>>, Schema.toCodecJson<typeof RegistriesNotFoundError | typeof RegistriesBadGatewayError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listRegistryExtensions", "GET", "/:registryId/extensions", Schema.toCodecStringTree<Schema.Struct<{
|
|
85
85
|
readonly registryId: Schema.String;
|
|
86
|
-
}>>,
|
|
86
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
87
87
|
readonly extensions: Schema.$Array<Schema.Struct<{
|
|
88
88
|
readonly name: Schema.String;
|
|
89
89
|
readonly url: Schema.optional<Schema.String>;
|
|
90
90
|
readonly description: Schema.optional<Schema.String>;
|
|
91
91
|
readonly endpoints: Schema.$Array<Schema.String>;
|
|
92
92
|
}>>;
|
|
93
|
-
}>>,
|
|
93
|
+
}>>, Schema.toCodecJson<typeof RegistriesNotFoundError | typeof RegistriesBadGatewayError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listRegistryTags", "GET", "/:registryId/tags", Schema.toCodecStringTree<Schema.Struct<{
|
|
94
94
|
readonly registryId: Schema.String;
|
|
95
|
-
}>>,
|
|
95
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
96
96
|
readonly repository: Schema.String;
|
|
97
|
-
}>>,
|
|
97
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
98
98
|
readonly repository: Schema.String;
|
|
99
99
|
readonly tags: Schema.$Array<Schema.String>;
|
|
100
|
-
}>>,
|
|
100
|
+
}>>, Schema.toCodecJson<typeof RegistriesNotFoundError | typeof RegistriesBadGatewayError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pingRegistry", "GET", "/:registryId/ping", Schema.toCodecStringTree<Schema.Struct<{
|
|
101
101
|
readonly registryId: Schema.String;
|
|
102
|
-
}>>,
|
|
102
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
103
103
|
readonly name: Schema.String;
|
|
104
104
|
readonly reachable: Schema.Literal<true>;
|
|
105
|
-
}>>,
|
|
105
|
+
}>>, Schema.toCodecJson<typeof RegistriesNotFoundError | typeof RegistriesBadGatewayError>, never, never>, false>;
|
|
106
106
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
3
3
|
import { isOciReference, isOciRepository, OCI_REFERENCE_MESSAGE, OCI_REPOSITORY_MESSAGE, } from "./oci-names.js";
|
|
4
4
|
const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
|
|
5
5
|
/** Refused, never repaired: these become registry URL path segments (CORE-08). */
|
|
@@ -45,11 +45,11 @@ export const registryManifestResponseSchema = Schema.Struct({
|
|
|
45
45
|
contentType: Schema.Union([Schema.String, Schema.Null]),
|
|
46
46
|
manifest: Schema.Unknown,
|
|
47
47
|
});
|
|
48
|
-
export class RegistriesNotFoundError extends Schema.
|
|
48
|
+
export class RegistriesNotFoundError extends Schema.TaggedError()("RegistriesNotFoundError", {
|
|
49
49
|
message: Schema.String,
|
|
50
50
|
}, { httpApiStatus: 404 }) {
|
|
51
51
|
}
|
|
52
|
-
export class RegistriesBadGatewayError extends Schema.
|
|
52
|
+
export class RegistriesBadGatewayError extends Schema.TaggedError()("RegistriesBadGatewayError", {
|
|
53
53
|
message: Schema.String,
|
|
54
54
|
}, { httpApiStatus: 502 }) {
|
|
55
55
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Requests the contract cannot decode, on every route of the control plane API.
|
|
3
3
|
*
|
|
4
|
-
* Effect answers such a request with an empty `400
|
|
5
|
-
* log, every `ErrorReporter` and the request's tracing span)
|
|
6
|
-
* array, got "<argv>"`, a whole body that arrived wrapped in an array, `JSON.parse`'s
|
|
7
|
-
* malformed body
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* Effect answers such a request with an empty `400`. Before Effect 4.0.0, the failure it reports (to
|
|
5
|
+
* the request log, every `ErrorReporter` and the request's tracing span) quoted the rejected input:
|
|
6
|
+
* `Expected array, got "<argv>"`, a whole body that arrived wrapped in an array, `JSON.parse`'s
|
|
7
|
+
* excerpt of a malformed body; Effect 4 reports input only to a parse that asks for it. A request
|
|
8
|
+
* body can carry a process's arguments, a script or a credential, so `RequestRefusal`, applied to
|
|
9
|
+
* the whole API, answers `400` `RequestRefusedError` instead, with a reason that names where the
|
|
10
|
+
* request is wrong and never what it held, and Effect's failure goes no further. `describeRequestIssue` words
|
|
10
11
|
* that reason from the decode issue alone: field names the contract declares, array positions, and
|
|
11
12
|
* what was expected; a key the caller chose (an `env` or `metadata` name) reads `[…]`.
|
|
12
13
|
*/
|
|
13
14
|
import { Schema, SchemaIssue } from "effect";
|
|
14
|
-
import { HttpApiMiddleware } from "effect/
|
|
15
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
15
16
|
declare const RequestRefusedError_base: Schema.Class<RequestRefusedError, Schema.TaggedStruct<"RequestRefusedError", {
|
|
16
17
|
/** Where the request is wrong and what was expected; never a value it held. */
|
|
17
18
|
readonly message: Schema.String;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Requests the contract cannot decode, on every route of the control plane API.
|
|
3
3
|
*
|
|
4
|
-
* Effect answers such a request with an empty `400
|
|
5
|
-
* log, every `ErrorReporter` and the request's tracing span)
|
|
6
|
-
* array, got "<argv>"`, a whole body that arrived wrapped in an array, `JSON.parse`'s
|
|
7
|
-
* malformed body
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* Effect answers such a request with an empty `400`. Before Effect 4.0.0, the failure it reports (to
|
|
5
|
+
* the request log, every `ErrorReporter` and the request's tracing span) quoted the rejected input:
|
|
6
|
+
* `Expected array, got "<argv>"`, a whole body that arrived wrapped in an array, `JSON.parse`'s
|
|
7
|
+
* excerpt of a malformed body; Effect 4 reports input only to a parse that asks for it. A request
|
|
8
|
+
* body can carry a process's arguments, a script or a credential, so `RequestRefusal`, applied to
|
|
9
|
+
* the whole API, answers `400` `RequestRefusedError` instead, with a reason that names where the
|
|
10
|
+
* request is wrong and never what it held, and Effect's failure goes no further. `describeRequestIssue` words
|
|
10
11
|
* that reason from the decode issue alone: field names the contract declares, array positions, and
|
|
11
12
|
* what was expected; a key the caller chose (an `env` or `metadata` name) reads `[…]`.
|
|
12
13
|
*/
|
|
13
|
-
import {
|
|
14
|
-
import { HttpApiMiddleware } from "effect/
|
|
15
|
-
export class RequestRefusedError extends Schema.
|
|
14
|
+
import { Schema, SchemaAST, SchemaIssue } from "effect";
|
|
15
|
+
import { HttpApiMiddleware } from "effect/http-api";
|
|
16
|
+
export class RequestRefusedError extends Schema.TaggedError()("RequestRefusedError", {
|
|
16
17
|
/** Where the request is wrong and what was expected; never a value it held. */
|
|
17
18
|
message: Schema.String,
|
|
18
19
|
}, { httpApiStatus: 400 }) {
|
|
@@ -96,7 +97,7 @@ const reasonsOf = (issue, path, parent) => {
|
|
|
96
97
|
const inner = issue.issue instanceof SchemaIssue.InvalidValue
|
|
97
98
|
? stringAnnotation(issue.issue.annotations, "message")
|
|
98
99
|
: undefined;
|
|
99
|
-
const message = authoredMessage(inner ?? stringAnnotation(issue.filter.annotations, "message"), issue.
|
|
100
|
+
const message = authoredMessage(inner ?? stringAnnotation(issue.filter.annotations, "message"), issue.input);
|
|
100
101
|
if (message !== undefined)
|
|
101
102
|
return leaf(path, message);
|
|
102
103
|
const expected = stringAnnotation(issue.filter.annotations, "expected");
|
|
@@ -112,8 +113,7 @@ const reasonsOf = (issue, path, parent) => {
|
|
|
112
113
|
if (issue instanceof SchemaIssue.MissingKey)
|
|
113
114
|
return leaf(path, "is required");
|
|
114
115
|
if (issue instanceof SchemaIssue.InvalidValue) {
|
|
115
|
-
|
|
116
|
-
return leaf(path, authoredMessage(stringAnnotation(issue.annotations, "message"), actual) ?? "is invalid");
|
|
116
|
+
return leaf(path, authoredMessage(stringAnnotation(issue.annotations, "message"), issue.input) ?? "is invalid");
|
|
117
117
|
}
|
|
118
118
|
if (issue instanceof SchemaIssue.OneOf)
|
|
119
119
|
return leaf(path, "matches more than one allowed shape");
|