@sealant/api-contracts-next 0.40.0-next.768 → 0.40.0-next.770
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.js +5 -4
- package/dist/core-api/connected-accounts.js +6 -5
- package/dist/core-api/control-plane.d.ts +835 -781
- package/dist/core-api/control-plane.js +2 -0
- package/dist/core-api/github.js +5 -4
- package/dist/core-api/inference.js +2 -1
- package/dist/core-api/person-id.d.ts +17 -0
- package/dist/core-api/person-id.js +17 -0
- package/dist/core-api/profiles.js +4 -3
- package/dist/core-api/resource-domains.d.ts +184 -0
- package/dist/core-api/resource-domains.js +152 -0
- package/dist/core-api/runs.js +8 -7
- package/dist/core-api/sessions.js +10 -9
- package/dist/core-api/ssh-keys.js +5 -4
- package/dist/core-api/users.js +5 -4
- package/dist/core-api/workspace-forward.d.ts +4 -2
- package/dist/core-api/workspace-forward.js +3 -0
- package/dist/core-api/workspaces.js +31 -30
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
|
+
import { PersonId } from "./person-id.js";
|
|
3
4
|
const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
|
|
4
5
|
/*
|
|
5
6
|
User SSH public keys. Two audiences:
|
|
@@ -15,21 +16,21 @@ export const sshKeyGatewayHeadersSchema = Schema.Struct({
|
|
|
15
16
|
export const createSshKeyRequestSchema = Schema.Struct({
|
|
16
17
|
// Same trust model as createWorkspace: the internal API trusts the caller-supplied owner; the web
|
|
17
18
|
// server injects the session user id.
|
|
18
|
-
ownerUserId:
|
|
19
|
+
ownerUserId: PersonId,
|
|
19
20
|
name: Schema.optional(NonEmptyString),
|
|
20
21
|
// Raw `<algorithm> <base64> [comment]` line; the API normalizes and fingerprints it.
|
|
21
22
|
publicKey: NonEmptyString,
|
|
22
23
|
});
|
|
23
24
|
export const sshKeySummarySchema = Schema.Struct({
|
|
24
25
|
sshKeyId: NonEmptyString,
|
|
25
|
-
ownerUserId:
|
|
26
|
+
ownerUserId: PersonId,
|
|
26
27
|
name: NonEmptyString,
|
|
27
28
|
algorithm: NonEmptyString,
|
|
28
29
|
fingerprint: NonEmptyString,
|
|
29
30
|
createdAt: Schema.String,
|
|
30
31
|
});
|
|
31
32
|
export const listSshKeysQuerySchema = Schema.Struct({
|
|
32
|
-
ownerUserId:
|
|
33
|
+
ownerUserId: PersonId,
|
|
33
34
|
});
|
|
34
35
|
export const listSshKeysResponseSchema = Schema.Struct({
|
|
35
36
|
items: Schema.Array(sshKeySummarySchema),
|
|
@@ -41,7 +42,7 @@ export const resolveSshPrincipalRequestSchema = Schema.Struct({
|
|
|
41
42
|
publicKeyBase64: NonEmptyString,
|
|
42
43
|
});
|
|
43
44
|
export const resolveSshPrincipalResponseSchema = Schema.Struct({
|
|
44
|
-
principalId:
|
|
45
|
+
principalId: PersonId,
|
|
45
46
|
sshKeyId: NonEmptyString,
|
|
46
47
|
fingerprint: NonEmptyString,
|
|
47
48
|
});
|
package/dist/core-api/users.js
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Schema } from "effect";
|
|
10
10
|
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
11
|
+
import { PersonId } from "./person-id.js";
|
|
11
12
|
const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
|
|
12
13
|
export const userSchema = Schema.Struct({
|
|
13
|
-
userId:
|
|
14
|
+
userId: PersonId,
|
|
14
15
|
email: NonEmptyString,
|
|
15
16
|
name: NonEmptyString,
|
|
16
17
|
createdAt: Schema.String,
|
|
@@ -20,7 +21,7 @@ export const ensureUserRequestSchema = Schema.Struct({
|
|
|
20
21
|
email: NonEmptyString,
|
|
21
22
|
name: NonEmptyString,
|
|
22
23
|
/** Caller-chosen id for a NEW user (`usr_…`); ignored when the email already exists. */
|
|
23
|
-
userId: Schema.optional(
|
|
24
|
+
userId: Schema.optional(PersonId),
|
|
24
25
|
});
|
|
25
26
|
export const ensureUserResponseSchema = Schema.Struct({
|
|
26
27
|
...userSchema.fields,
|
|
@@ -38,7 +39,7 @@ export const personBindingSchema = Schema.Struct({
|
|
|
38
39
|
home: NonEmptyString,
|
|
39
40
|
});
|
|
40
41
|
export const bindUserPersonResponseSchema = Schema.Struct({
|
|
41
|
-
userId:
|
|
42
|
+
userId: PersonId,
|
|
42
43
|
person: personBindingSchema,
|
|
43
44
|
/** True when this call made the binding; false when it was already exactly this. */
|
|
44
45
|
created: Schema.Boolean,
|
|
@@ -59,7 +60,7 @@ export class UserNotFoundError extends Schema.TaggedError()("UserNotFoundError",
|
|
|
59
60
|
}
|
|
60
61
|
export class UserInternalServerError extends Schema.TaggedError()("UserInternalServerError", { message: Schema.String }, { httpApiStatus: 500 }) {
|
|
61
62
|
}
|
|
62
|
-
const userIdParams = Schema.Struct({ userId:
|
|
63
|
+
const userIdParams = Schema.Struct({ userId: PersonId });
|
|
63
64
|
export const UsersGroup = HttpApiGroup.make("users")
|
|
64
65
|
.add(HttpApiEndpoint.post("ensureUser", "/", {
|
|
65
66
|
payload: ensureUserRequestSchema,
|
|
@@ -19,7 +19,7 @@ export declare const FORWARD_V2_SUBPROTOCOL = "sealant.forward.v2";
|
|
|
19
19
|
export declare const FORWARD_V2_MAX_FRAME_BYTES: number;
|
|
20
20
|
/** Ends the socket after a `refused` frame. It says nothing about why: the frame's reason does. */
|
|
21
21
|
export declare const FORWARD_REFUSED_CLOSE_CODE = 4400;
|
|
22
|
-
export declare const forwardRefusalReasonSchema: Schema.Literals<readonly ["workspace-not-ready", "runtime-unreachable", "runtime-untargetable", "connection-refused", "name-unresolved", "network-unreachable", "dial-timeout", "dial-failed", "not-found", "unauthorized", "forbidden", "budget-exceeded", "invalid-target", "owner-required", "internal", "owner-exited", "peer-mismatch", "binding-unverifiable", "binding-unsupported"]>;
|
|
22
|
+
export declare const forwardRefusalReasonSchema: Schema.Literals<readonly ["workspace-not-ready", "runtime-unreachable", "runtime-untargetable", "connection-refused", "name-unresolved", "network-unreachable", "dial-timeout", "dial-failed", "not-found", "unauthorized", "forbidden", "budget-exceeded", "invalid-target", "owner-required", "not-a-person", "internal", "owner-exited", "peer-mismatch", "binding-unverifiable", "binding-unsupported"]>;
|
|
23
23
|
export type ForwardRefusalReason = typeof forwardRefusalReasonSchema.Type;
|
|
24
24
|
/** The HTTP status each refusal would have had before the upgrade. Callers branch on the reason. */
|
|
25
25
|
export declare const FORWARD_REFUSAL_STATUS: {
|
|
@@ -37,6 +37,8 @@ export declare const FORWARD_REFUSAL_STATUS: {
|
|
|
37
37
|
readonly "budget-exceeded": 429;
|
|
38
38
|
readonly "invalid-target": 400;
|
|
39
39
|
readonly "owner-required": 400;
|
|
40
|
+
/** The asserted owner is a resource domain, which never opens a forward. */
|
|
41
|
+
readonly "not-a-person": 400;
|
|
40
42
|
readonly internal: 500;
|
|
41
43
|
readonly "owner-exited": 409;
|
|
42
44
|
readonly "peer-mismatch": 409;
|
|
@@ -76,7 +78,7 @@ export declare const forwardRefusedFrameSchema: Schema.Struct<{
|
|
|
76
78
|
readonly status: Schema.Int;
|
|
77
79
|
}>;
|
|
78
80
|
export type ForwardRefusedFrame = typeof forwardRefusedFrameSchema.Type;
|
|
79
|
-
export declare const forwardRefusedFrame: (reason: "binding-unsupported" | "binding-unverifiable" | "budget-exceeded" | "connection-refused" | "dial-failed" | "dial-timeout" | "forbidden" | "internal" | "invalid-target" | "name-unresolved" | "network-unreachable" | "not-found" | "owner-exited" | "owner-required" | "peer-mismatch" | "runtime-unreachable" | "runtime-untargetable" | "unauthorized" | "workspace-not-ready", message: string) => {
|
|
81
|
+
export declare const forwardRefusedFrame: (reason: "binding-unsupported" | "binding-unverifiable" | "budget-exceeded" | "connection-refused" | "dial-failed" | "dial-timeout" | "forbidden" | "internal" | "invalid-target" | "name-unresolved" | "network-unreachable" | "not-a-person" | "not-found" | "owner-exited" | "owner-required" | "peer-mismatch" | "runtime-unreachable" | "runtime-untargetable" | "unauthorized" | "workspace-not-ready", message: string) => {
|
|
80
82
|
readonly t: "refused";
|
|
81
83
|
readonly reason: string;
|
|
82
84
|
readonly message: string;
|
|
@@ -34,6 +34,7 @@ export const forwardRefusalReasonSchema = Schema.Literals([
|
|
|
34
34
|
"budget-exceeded",
|
|
35
35
|
"invalid-target",
|
|
36
36
|
"owner-required",
|
|
37
|
+
"not-a-person",
|
|
37
38
|
"internal",
|
|
38
39
|
"owner-exited",
|
|
39
40
|
"peer-mismatch",
|
|
@@ -56,6 +57,8 @@ export const FORWARD_REFUSAL_STATUS = {
|
|
|
56
57
|
"budget-exceeded": 429,
|
|
57
58
|
"invalid-target": 400,
|
|
58
59
|
"owner-required": 400,
|
|
60
|
+
/** The asserted owner is a resource domain, which never opens a forward. */
|
|
61
|
+
"not-a-person": 400,
|
|
59
62
|
internal: 500,
|
|
60
63
|
"owner-exited": 409,
|
|
61
64
|
"peer-mismatch": 409,
|
|
@@ -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 { PersonId } from "./person-id.js";
|
|
5
6
|
import { runCommandSchema, runSchema } from "./runs.js";
|
|
6
7
|
import { workspaceProcessUserSchema } from "./sessions.js";
|
|
7
8
|
const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
|
|
@@ -136,7 +137,7 @@ export const createWorkspaceCredentialsSchema = Schema.Struct({
|
|
|
136
137
|
github: Schema.optional(NonEmptyString),
|
|
137
138
|
});
|
|
138
139
|
export const createWorkspaceRequestSchema = Schema.Struct({
|
|
139
|
-
ownerUserId:
|
|
140
|
+
ownerUserId: PersonId,
|
|
140
141
|
registryId: NonEmptyString,
|
|
141
142
|
repository: NonEmptyString,
|
|
142
143
|
tag: NonEmptyString,
|
|
@@ -203,7 +204,7 @@ export const execRunHarnessId = "exec";
|
|
|
203
204
|
* "can I trust these exit codes", not "did the checks pass".
|
|
204
205
|
*/
|
|
205
206
|
export const execWorkspaceRequestSchema = Schema.Struct({
|
|
206
|
-
ownerUserId:
|
|
207
|
+
ownerUserId: PersonId,
|
|
207
208
|
/** Commands execute sequentially in the workspace, each recorded like any other process. */
|
|
208
209
|
commands: Schema.Array(runCommandSchema).check(Schema.isNonEmpty(), Schema.isMaxLength(32)),
|
|
209
210
|
/**
|
|
@@ -273,9 +274,9 @@ export const applyWorkspaceDotfilesArchiveSchema = Schema.Struct({
|
|
|
273
274
|
*/
|
|
274
275
|
export const applyWorkspaceDotfilesRequestSchema = Schema.Struct({
|
|
275
276
|
/** The workspace's owner (owner scope; uniform 404 otherwise). */
|
|
276
|
-
ownerUserId:
|
|
277
|
+
ownerUserId: PersonId,
|
|
277
278
|
/** The Sealant user whose dotfiles these are: recorded on the run (`metadata.dotfiles`). */
|
|
278
|
-
onBehalfOfUserId:
|
|
279
|
+
onBehalfOfUserId: PersonId,
|
|
279
280
|
/** The Linux user to apply as (a login name or a uid); never root. */
|
|
280
281
|
user: workspaceProcessUserSchema,
|
|
281
282
|
/** The user's passwd home: absolute, normalised, never under `/workspace`. */
|
|
@@ -306,7 +307,7 @@ export const workspaceDotfilesConflictCodes = [
|
|
|
306
307
|
* unbinds. The reply is the workspace's full set of live bindings, which every relaunch re-applies.
|
|
307
308
|
*/
|
|
308
309
|
export const bindWorkspaceRequestSchema = Schema.Struct({
|
|
309
|
-
ownerUserId:
|
|
310
|
+
ownerUserId: PersonId,
|
|
310
311
|
mountPath: Schema.optional(NonEmptyString),
|
|
311
312
|
subpath: Schema.String,
|
|
312
313
|
});
|
|
@@ -332,7 +333,7 @@ export const workspaceCaptureFlushKindSchema = Schema.Literals(["final", "suspen
|
|
|
332
333
|
* `kind: "suspend"` (the default) is a checkpoint: the executor keeps running.
|
|
333
334
|
*/
|
|
334
335
|
export const flushWorkspaceCaptureRequestSchema = Schema.Struct({
|
|
335
|
-
ownerUserId:
|
|
336
|
+
ownerUserId: PersonId,
|
|
336
337
|
/** `final` or `suspend` (the default). */
|
|
337
338
|
kind: Schema.optional(workspaceCaptureFlushKindSchema),
|
|
338
339
|
/** How long the daemon may take before it answers, in milliseconds. Absent: its own default. */
|
|
@@ -348,7 +349,7 @@ export const flushWorkspaceCaptureRequestSchema = Schema.Struct({
|
|
|
348
349
|
* what a drain polls to show `saving · N left` and to know when the executor may go away.
|
|
349
350
|
*/
|
|
350
351
|
export const getWorkspaceCaptureStatusQuerySchema = Schema.Struct({
|
|
351
|
-
ownerUserId:
|
|
352
|
+
ownerUserId: PersonId,
|
|
352
353
|
});
|
|
353
354
|
export const captureClassSchema = Schema.Literals(["small", "bulk"]);
|
|
354
355
|
/** One capture class's snaps (sealantd `CaptureClassSnaps`). */
|
|
@@ -503,7 +504,7 @@ export const workspaceCaptureStatusSchema = Schema.Struct({
|
|
|
503
504
|
* answer named the worktree and epoch already in force.
|
|
504
505
|
*/
|
|
505
506
|
export const replanWorkspaceCaptureRequestSchema = Schema.Struct({
|
|
506
|
-
ownerUserId:
|
|
507
|
+
ownerUserId: PersonId,
|
|
507
508
|
/**
|
|
508
509
|
* The owner map the claim needs (a capture source's `ownerMap`), or `null` for none. The daemon
|
|
509
510
|
* reads its map only at boot, so a re-plan restores under the map the executor was launched
|
|
@@ -532,7 +533,7 @@ export const workspaceCaptureReplannedSchema = Schema.Struct({
|
|
|
532
533
|
export const renameWorkspaceRequestSchema = Schema.Struct({
|
|
533
534
|
name: NonEmptyString,
|
|
534
535
|
/** The workspace's owner. Required by the control plane: a rename that names none finds nothing. */
|
|
535
|
-
ownerUserId: Schema.optional(
|
|
536
|
+
ownerUserId: Schema.optional(PersonId),
|
|
536
537
|
});
|
|
537
538
|
/**
|
|
538
539
|
* `DELETE /v1/workspaces/:id/ssh-user`: the gateway runs the workspace's SSH sessions as root from
|
|
@@ -540,12 +541,12 @@ export const renameWorkspaceRequestSchema = Schema.Struct({
|
|
|
540
541
|
*/
|
|
541
542
|
export const clearWorkspaceSshUserQuerySchema = Schema.Struct({
|
|
542
543
|
/** The workspace's owner. Required by the control plane: a request that names none finds nothing. */
|
|
543
|
-
ownerUserId: Schema.optional(
|
|
544
|
+
ownerUserId: Schema.optional(PersonId),
|
|
544
545
|
});
|
|
545
546
|
// Lifecycle actions are owner-scoped like execWorkspace: ownerUserId rides in the payload and a
|
|
546
547
|
// mismatch yields a uniform 404 (existence is not leaked).
|
|
547
548
|
export const stopWorkspaceRequestSchema = Schema.Struct({
|
|
548
|
-
ownerUserId:
|
|
549
|
+
ownerUserId: PersonId,
|
|
549
550
|
/**
|
|
550
551
|
* End the workspace WITHOUT saving its unsaved captures. A capture-sourced workspace is
|
|
551
552
|
* otherwise drained before it stops, and kept running for as long as its work cannot be
|
|
@@ -615,7 +616,7 @@ export const stopWorkspaceResponseSchema = Schema.Struct({
|
|
|
615
616
|
});
|
|
616
617
|
/** Owner-scoped: ask the control plane to recover the workspace's retained executor now. */
|
|
617
618
|
export const recoverWorkspaceRequestSchema = Schema.Struct({
|
|
618
|
-
ownerUserId:
|
|
619
|
+
ownerUserId: PersonId,
|
|
619
620
|
});
|
|
620
621
|
/**
|
|
621
622
|
* `requested`: the workspace's executor is retained (its disk holds work not confirmed saved) and
|
|
@@ -629,7 +630,7 @@ export const recoverWorkspaceResponseSchema = Schema.Struct({
|
|
|
629
630
|
recoverable: Schema.optional(Schema.Boolean),
|
|
630
631
|
});
|
|
631
632
|
export const restartWorkspaceRequestSchema = Schema.Struct({
|
|
632
|
-
ownerUserId:
|
|
633
|
+
ownerUserId: PersonId,
|
|
633
634
|
});
|
|
634
635
|
export const restartWorkspaceResponseSchema = Schema.Struct({
|
|
635
636
|
workspaceId: NonEmptyString,
|
|
@@ -643,7 +644,7 @@ export const restartWorkspaceResponseSchema = Schema.Struct({
|
|
|
643
644
|
* image published for that plan answers. Nothing is created, built or reserved.
|
|
644
645
|
*/
|
|
645
646
|
export const inspectWorkspaceImageRequestSchema = Schema.Struct({
|
|
646
|
-
ownerUserId:
|
|
647
|
+
ownerUserId: PersonId,
|
|
647
648
|
registryId: NonEmptyString,
|
|
648
649
|
/** The spec a create would send (`CreateWorkspaceRequest.spec`). */
|
|
649
650
|
spec: Schema.Unknown,
|
|
@@ -697,9 +698,9 @@ export const workspaceCredentialHomeAccountProvider = { claude: "claude", codex:
|
|
|
697
698
|
*/
|
|
698
699
|
export const putWorkspaceCredentialsRequestSchema = Schema.Struct({
|
|
699
700
|
/** The workspace's owner (owner scope; uniform 404 otherwise). */
|
|
700
|
-
ownerUserId:
|
|
701
|
+
ownerUserId: PersonId,
|
|
701
702
|
/** The person whose logins the home holds: every named account must be theirs. */
|
|
702
|
-
onBehalfOfUserId:
|
|
703
|
+
onBehalfOfUserId: PersonId,
|
|
703
704
|
/**
|
|
704
705
|
* Absolute path of the home inside the executor: a person's home, a conversation home, or
|
|
705
706
|
* `/root`. Normalised, never under `/workspace`, and reached without a symbolic link. It must
|
|
@@ -776,7 +777,7 @@ export const workspaceHomeAccountSchema = Schema.Struct({
|
|
|
776
777
|
export const workspaceCredentialHomeSchema = Schema.Struct({
|
|
777
778
|
home: NonEmptyString,
|
|
778
779
|
/** The one person whose logins the home holds. */
|
|
779
|
-
onBehalfOfUserId:
|
|
780
|
+
onBehalfOfUserId: PersonId,
|
|
780
781
|
/** The logins written there, one receipt each. Absent from a server without placements. */
|
|
781
782
|
placements: Schema.optional(Schema.Array(workspaceCredentialPlacementReceiptSchema)),
|
|
782
783
|
/**
|
|
@@ -817,7 +818,7 @@ export const putWorkspaceCredentialsResponseSchema = Schema.Struct({
|
|
|
817
818
|
});
|
|
818
819
|
/** Remove every login of one home that is neither live nor the ready one of the person's default. */
|
|
819
820
|
export const pruneWorkspaceCredentialsRequestSchema = Schema.Struct({
|
|
820
|
-
ownerUserId:
|
|
821
|
+
ownerUserId: PersonId,
|
|
821
822
|
home: NonEmptyString,
|
|
822
823
|
live: Schema.Array(NonEmptyString),
|
|
823
824
|
});
|
|
@@ -829,7 +830,7 @@ export const pruneWorkspaceCredentialsResponseSchema = Schema.Struct({
|
|
|
829
830
|
});
|
|
830
831
|
/** Release one home: its login files are removed and its record deleted. */
|
|
831
832
|
export const releaseWorkspaceCredentialsQuerySchema = Schema.Struct({
|
|
832
|
-
ownerUserId:
|
|
833
|
+
ownerUserId: PersonId,
|
|
833
834
|
home: NonEmptyString,
|
|
834
835
|
});
|
|
835
836
|
export const releaseWorkspaceCredentialsResponseSchema = Schema.Struct({
|
|
@@ -840,7 +841,7 @@ export const releaseWorkspaceCredentialsResponseSchema = Schema.Struct({
|
|
|
840
841
|
released: Schema.Boolean,
|
|
841
842
|
});
|
|
842
843
|
export const listWorkspaceCredentialsQuerySchema = Schema.Struct({
|
|
843
|
-
ownerUserId:
|
|
844
|
+
ownerUserId: PersonId,
|
|
844
845
|
});
|
|
845
846
|
/** The homes of the workspace's running executor, oldest first. */
|
|
846
847
|
export const listWorkspaceCredentialsResponseSchema = Schema.Struct({
|
|
@@ -869,7 +870,7 @@ export const workspaceCredentialsConflictCodes = [
|
|
|
869
870
|
"home-busy",
|
|
870
871
|
];
|
|
871
872
|
export const expireWorkspaceRequestSchema = Schema.Struct({
|
|
872
|
-
ownerUserId:
|
|
873
|
+
ownerUserId: PersonId,
|
|
873
874
|
// Seconds from now until the workspace expires; null clears the TTL (never expires); omitted =
|
|
874
875
|
// expire immediately (the reaper stops it on its next tick).
|
|
875
876
|
ttlSeconds: Schema.optional(Schema.NullOr(Schema.Int.check(Schema.isGreaterThan(0)))),
|
|
@@ -927,11 +928,11 @@ export const workspaceCreateStateSchema = Schema.Struct({
|
|
|
927
928
|
launchId: Schema.optional(NonEmptyString),
|
|
928
929
|
});
|
|
929
930
|
export const getWorkspaceCreateQuerySchema = Schema.Struct({
|
|
930
|
-
ownerUserId:
|
|
931
|
+
ownerUserId: PersonId,
|
|
931
932
|
});
|
|
932
933
|
/** Owner-scoped: cancel the create with this key, so it never commits. */
|
|
933
934
|
export const cancelWorkspaceCreateRequestSchema = Schema.Struct({
|
|
934
|
-
ownerUserId:
|
|
935
|
+
ownerUserId: PersonId,
|
|
935
936
|
});
|
|
936
937
|
/**
|
|
937
938
|
* Where a workspace that is not ready yet is in its launch:
|
|
@@ -963,7 +964,7 @@ export const workspacePhaseSchema = Schema.Struct({
|
|
|
963
964
|
export const workspaceSummarySchema = Schema.Struct({
|
|
964
965
|
workspaceId: NonEmptyString,
|
|
965
966
|
name: NonEmptyString,
|
|
966
|
-
ownerUserId:
|
|
967
|
+
ownerUserId: PersonId,
|
|
967
968
|
status: workspaceStatusSchema,
|
|
968
969
|
registryId: Schema.optional(NonEmptyString),
|
|
969
970
|
repository: Schema.optional(NonEmptyString),
|
|
@@ -1061,7 +1062,7 @@ export const workspaceCaptureDrainSchema = Schema.Struct({
|
|
|
1061
1062
|
export const workspaceDetailsSchema = Schema.Struct({
|
|
1062
1063
|
workspaceId: NonEmptyString,
|
|
1063
1064
|
name: NonEmptyString,
|
|
1064
|
-
ownerUserId:
|
|
1065
|
+
ownerUserId: PersonId,
|
|
1065
1066
|
status: workspaceStatusSchema,
|
|
1066
1067
|
registryId: Schema.optional(NonEmptyString),
|
|
1067
1068
|
repository: Schema.optional(NonEmptyString),
|
|
@@ -1090,10 +1091,10 @@ export const workspaceDetailsSchema = Schema.Struct({
|
|
|
1090
1091
|
* Optional on the wire for older callers; the control plane requires it.
|
|
1091
1092
|
*/
|
|
1092
1093
|
export const getWorkspaceQuerySchema = Schema.Struct({
|
|
1093
|
-
ownerUserId: Schema.optional(
|
|
1094
|
+
ownerUserId: Schema.optional(PersonId),
|
|
1094
1095
|
});
|
|
1095
1096
|
export const listWorkspacesQuerySchema = Schema.Struct({
|
|
1096
|
-
ownerUserId:
|
|
1097
|
+
ownerUserId: PersonId,
|
|
1097
1098
|
status: Schema.optional(workspaceStatusSchema),
|
|
1098
1099
|
limit: Schema.optional(NonEmptyString),
|
|
1099
1100
|
/** Only the owner's workspace created with this `idempotencyKey` (none or one item). */
|
|
@@ -1103,7 +1104,7 @@ export const listWorkspacesResponseSchema = Schema.Struct({
|
|
|
1103
1104
|
items: Schema.Array(workspaceSummarySchema),
|
|
1104
1105
|
});
|
|
1105
1106
|
export const listWorkspaceAttemptsQuerySchema = Schema.Struct({
|
|
1106
|
-
ownerUserId: Schema.optional(
|
|
1107
|
+
ownerUserId: Schema.optional(PersonId),
|
|
1107
1108
|
limit: Schema.optional(NonEmptyString),
|
|
1108
1109
|
});
|
|
1109
1110
|
export const workspaceAttemptSummarySchema = Schema.Struct({
|
|
@@ -1128,7 +1129,7 @@ export const listWorkspaceAttemptsResponseSchema = Schema.Struct({
|
|
|
1128
1129
|
items: Schema.Array(workspaceAttemptSummarySchema),
|
|
1129
1130
|
});
|
|
1130
1131
|
export const listWorkspaceEventsQuerySchema = Schema.Struct({
|
|
1131
|
-
ownerUserId: Schema.optional(
|
|
1132
|
+
ownerUserId: Schema.optional(PersonId),
|
|
1132
1133
|
limit: Schema.optional(NonEmptyString),
|
|
1133
1134
|
});
|
|
1134
1135
|
export const workspaceEventTypeSchema = Schema.Literals([
|
|
@@ -1162,7 +1163,7 @@ export const workspaceGatewayHeadersSchema = Schema.Struct({
|
|
|
1162
1163
|
"x-sealant-gateway-token": Schema.optional(NonEmptyString),
|
|
1163
1164
|
// Identifies the client principal (the SSH key's owner). The API authorizes principal x workspace
|
|
1164
1165
|
// before returning a control target (gateway-spec §3.4).
|
|
1165
|
-
"x-sealant-principal-id": Schema.optional(
|
|
1166
|
+
"x-sealant-principal-id": Schema.optional(PersonId),
|
|
1166
1167
|
// `1` from a gateway that runs a workspace's SSH sessions as its `sshUser`. A workspace with a
|
|
1167
1168
|
// user answers no target to a gateway without it, which would run the session as root.
|
|
1168
1169
|
"x-sealant-gateway-ssh-user": Schema.optional(NonEmptyString),
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./core-api/control-plane.js";
|
|
|
3
3
|
export * from "./core-api/github.js";
|
|
4
4
|
export * from "./core-api/inference.js";
|
|
5
5
|
export * from "./core-api/packages.js";
|
|
6
|
+
export * from "./core-api/person-id.js";
|
|
6
7
|
export * from "./core-api/profiles.js";
|
|
7
8
|
export * from "./core-api/record-events.js";
|
|
8
9
|
export * from "./core-api/budgets.js";
|
|
@@ -10,6 +11,7 @@ export * from "./core-api/oci-names.js";
|
|
|
10
11
|
export * from "./core-api/registries.js";
|
|
11
12
|
export * from "./core-api/runs.js";
|
|
12
13
|
export * from "./core-api/request-refusal.js";
|
|
14
|
+
export * from "./core-api/resource-domains.js";
|
|
13
15
|
export * from "./core-api/sessions.js";
|
|
14
16
|
export * from "./core-api/access-tokens.js";
|
|
15
17
|
export * from "./core-api/workspaces.js";
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./core-api/control-plane.js";
|
|
|
3
3
|
export * from "./core-api/github.js";
|
|
4
4
|
export * from "./core-api/inference.js";
|
|
5
5
|
export * from "./core-api/packages.js";
|
|
6
|
+
export * from "./core-api/person-id.js";
|
|
6
7
|
export * from "./core-api/profiles.js";
|
|
7
8
|
export * from "./core-api/record-events.js";
|
|
8
9
|
export * from "./core-api/budgets.js";
|
|
@@ -10,6 +11,7 @@ export * from "./core-api/oci-names.js";
|
|
|
10
11
|
export * from "./core-api/registries.js";
|
|
11
12
|
export * from "./core-api/runs.js";
|
|
12
13
|
export * from "./core-api/request-refusal.js";
|
|
14
|
+
export * from "./core-api/resource-domains.js";
|
|
13
15
|
export * from "./core-api/sessions.js";
|
|
14
16
|
export * from "./core-api/access-tokens.js";
|
|
15
17
|
export * from "./core-api/workspaces.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sealant/api-contracts-next",
|
|
3
|
-
"version": "0.40.0-next.
|
|
3
|
+
"version": "0.40.0-next.770",
|
|
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": "
|
|
39
|
+
"gitHead": "1e8b4f1153f5107504649c863c305cd31f424d58",
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
}
|