@sealant/api-contracts-next 0.40.0-next.763 → 0.40.0-next.765

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.
@@ -152,8 +152,13 @@ export declare class InferenceNotFoundError extends InferenceNotFoundError_base
152
152
  }
153
153
  declare const InferenceConflictError_base: Schema.Class<InferenceConflictError, Schema.TaggedStruct<"InferenceConflictError", {
154
154
  readonly message: Schema.String;
155
+ readonly code: Schema.optional<Schema.Literals<readonly ["connected-account-unsupported"]>>;
155
156
  }>, import("effect/Cause").YieldableError>;
156
- /** The selected account exists but is not usable (status "invalid") — reconnect it. */
157
+ /**
158
+ * The selected account exists but is not usable: its status is "invalid" (reconnect it), or, with
159
+ * `code` `connected-account-unsupported`, it is a login this control plane cannot run on yet (a
160
+ * Claude API key).
161
+ */
157
162
  export declare class InferenceConflictError extends InferenceConflictError_base {
158
163
  }
159
164
  declare const InferenceUnavailableError_base: Schema.Class<InferenceUnavailableError, Schema.TaggedStruct<"InferenceUnavailableError", {
@@ -113,8 +113,15 @@ export class InferenceBadRequestError extends Schema.TaggedError()("InferenceBad
113
113
  /** Unknown account/profile (uniform for foreign owners) or an expired/unknown inference session. */
114
114
  export class InferenceNotFoundError extends Schema.TaggedError()("InferenceNotFoundError", { message: Schema.String }, { httpApiStatus: 404 }) {
115
115
  }
116
- /** The selected account exists but is not usable (status "invalid") — reconnect it. */
117
- export class InferenceConflictError extends Schema.TaggedError()("InferenceConflictError", { message: Schema.String }, { httpApiStatus: 409 }) {
116
+ /**
117
+ * The selected account exists but is not usable: its status is "invalid" (reconnect it), or, with
118
+ * `code` `connected-account-unsupported`, it is a login this control plane cannot run on yet (a
119
+ * Claude API key).
120
+ */
121
+ export class InferenceConflictError extends Schema.TaggedError()("InferenceConflictError", {
122
+ message: Schema.String,
123
+ code: Schema.optional(Schema.Literals(["connected-account-unsupported"])),
124
+ }, { httpApiStatus: 409 }) {
118
125
  }
119
126
  export class InferenceUnavailableError extends Schema.TaggedError()("InferenceUnavailableError", { message: Schema.String }, { httpApiStatus: 503 }) {
120
127
  }
@@ -56,6 +56,12 @@ export declare const profileCredentialBindingWithAccountSchema: Schema.Struct<{
56
56
  }>;
57
57
  readonly isDefault: Schema.optional<Schema.Boolean>;
58
58
  readonly credentialRevision: Schema.optional<Schema.Int>;
59
+ readonly login: Schema.optional<Schema.Union<readonly [Schema.Struct<{
60
+ readonly kind: Schema.Literal<"subscription">;
61
+ }>, Schema.Struct<{
62
+ readonly kind: Schema.Literal<"api-key">;
63
+ readonly suffix: Schema.String;
64
+ }>]>>;
59
65
  }>;
60
66
  }>;
61
67
  export type ProfileCredentialBindingWithAccount = typeof profileCredentialBindingWithAccountSchema.Type;
@@ -84,6 +90,12 @@ export declare const listProfileCredentialBindingsResponseSchema: Schema.Struct<
84
90
  }>;
85
91
  readonly isDefault: Schema.optional<Schema.Boolean>;
86
92
  readonly credentialRevision: Schema.optional<Schema.Int>;
93
+ readonly login: Schema.optional<Schema.Union<readonly [Schema.Struct<{
94
+ readonly kind: Schema.Literal<"subscription">;
95
+ }>, Schema.Struct<{
96
+ readonly kind: Schema.Literal<"api-key">;
97
+ readonly suffix: Schema.String;
98
+ }>]>>;
87
99
  }>;
88
100
  }>>;
89
101
  }>;
@@ -148,6 +160,12 @@ export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpAp
148
160
  }>;
149
161
  readonly isDefault: Schema.optional<Schema.Boolean>;
150
162
  readonly credentialRevision: Schema.optional<Schema.Int>;
163
+ readonly login: Schema.optional<Schema.Union<readonly [Schema.Struct<{
164
+ readonly kind: Schema.Literal<"subscription">;
165
+ }>, Schema.Struct<{
166
+ readonly kind: Schema.Literal<"api-key">;
167
+ readonly suffix: Schema.String;
168
+ }>]>>;
151
169
  }>;
152
170
  }>>;
153
171
  }>>, Schema.toCodecJson<typeof ProfileNotFoundError | typeof ProfileInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listProfiles", "GET", "/", never, Schema.toCodecStringTree<Schema.Struct<{
@@ -200,6 +218,12 @@ export declare const ProfilesGroup: HttpApiGroup.HttpApiGroup<"profiles", HttpAp
200
218
  }>;
201
219
  readonly isDefault: Schema.optional<Schema.Boolean>;
202
220
  readonly credentialRevision: Schema.optional<Schema.Int>;
221
+ readonly login: Schema.optional<Schema.Union<readonly [Schema.Struct<{
222
+ readonly kind: Schema.Literal<"subscription">;
223
+ }>, Schema.Struct<{
224
+ readonly kind: Schema.Literal<"api-key">;
225
+ readonly suffix: Schema.String;
226
+ }>]>>;
203
227
  }>;
204
228
  }>>;
205
229
  }>>, Schema.toCodecJson<typeof ProfileBadRequestError | typeof ProfileNotFoundError | typeof ProfileConflictError | typeof ProfileInternalServerError>, never, never>, false>;
@@ -52,11 +52,19 @@ export declare const systemIndexResponseSchema: Schema.Struct<{
52
52
  * it, a connect takes `accountId` and `makeDefault`, and summaries carry `isDefault`.
53
53
  */
54
54
  readonly connectedAccountDefaults: Schema.optional<Schema.Boolean>;
55
+ /**
56
+ * A connect takes `login` and refuses a secret of the other login class, Claude and Codex
57
+ * API keys connect beside a subscription, summaries carry `login`, and the list carries
58
+ * `hasApiKeyHistory`. Without it, `login` on a connect is dropped unread.
59
+ */
60
+ readonly connectedAccountLoginClass: Schema.optional<Schema.Boolean>;
55
61
  /**
56
62
  * `ownerMap` on a capture source is taken on Kubernetes (runc): the Pod lets each person's
57
63
  * `sudo` work, and the Kubernetes image builder records the image probe the launch checks.
58
64
  */
59
65
  readonly kubernetesPersonLayout: Schema.optional<Schema.Boolean>;
66
+ /** Credential homes answer placement receipts; a put takes `live`; prune exists. */
67
+ readonly credentialPlacements: Schema.optional<Schema.Boolean>;
60
68
  }>>;
61
69
  }>;
62
70
  export type SystemIndexResponse = typeof systemIndexResponseSchema.Type;
@@ -136,11 +144,19 @@ export declare const SystemGroup: HttpApiGroup.HttpApiGroup<"system", HttpApiEnd
136
144
  * it, a connect takes `accountId` and `makeDefault`, and summaries carry `isDefault`.
137
145
  */
138
146
  readonly connectedAccountDefaults: Schema.optional<Schema.Boolean>;
147
+ /**
148
+ * A connect takes `login` and refuses a secret of the other login class, Claude and Codex
149
+ * API keys connect beside a subscription, summaries carry `login`, and the list carries
150
+ * `hasApiKeyHistory`. Without it, `login` on a connect is dropped unread.
151
+ */
152
+ readonly connectedAccountLoginClass: Schema.optional<Schema.Boolean>;
139
153
  /**
140
154
  * `ownerMap` on a capture source is taken on Kubernetes (runc): the Pod lets each person's
141
155
  * `sudo` work, and the Kubernetes image builder records the image probe the launch checks.
142
156
  */
143
157
  readonly kubernetesPersonLayout: Schema.optional<Schema.Boolean>;
158
+ /** Credential homes answer placement receipts; a put takes `live`; prune exists. */
159
+ readonly credentialPlacements: Schema.optional<Schema.Boolean>;
144
160
  }>>;
145
161
  }>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getSetupState", "GET", "/v1/system/setup-state", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
146
162
  readonly needsSetup: Schema.Boolean;
@@ -53,11 +53,19 @@ export const systemIndexResponseSchema = Schema.Struct({
53
53
  * it, a connect takes `accountId` and `makeDefault`, and summaries carry `isDefault`.
54
54
  */
55
55
  connectedAccountDefaults: Schema.optional(Schema.Boolean),
56
+ /**
57
+ * A connect takes `login` and refuses a secret of the other login class, Claude and Codex
58
+ * API keys connect beside a subscription, summaries carry `login`, and the list carries
59
+ * `hasApiKeyHistory`. Without it, `login` on a connect is dropped unread.
60
+ */
61
+ connectedAccountLoginClass: Schema.optional(Schema.Boolean),
56
62
  /**
57
63
  * `ownerMap` on a capture source is taken on Kubernetes (runc): the Pod lets each person's
58
64
  * `sudo` work, and the Kubernetes image builder records the image probe the launch checks.
59
65
  */
60
66
  kubernetesPersonLayout: Schema.optional(Schema.Boolean),
67
+ /** Credential homes answer placement receipts; a put takes `live`; prune exists. */
68
+ credentialPlacements: Schema.optional(Schema.Boolean),
61
69
  })),
62
70
  });
63
71
  export const systemHealthResponseSchema = Schema.Struct({
@@ -793,7 +793,8 @@ export type InspectWorkspaceImageResponse = typeof inspectWorkspaceImageResponse
793
793
  * else's) and `connected-account-invalid` (`WorkspaceConflictError`, 409: the account is marked
794
794
  * invalid, or holds an unusable credential; reconnect it) and `connected-account-unsupported`
795
795
  * (`WorkspaceConflictError`, 409: the account cannot serve what was asked, as a Codex API key cannot
796
- * be pi's or opencode's ChatGPT login). Nothing was written either way.
796
+ * be pi's or opencode's ChatGPT login, and a Claude API key cannot be placed yet). Nothing was
797
+ * written either way.
797
798
  */
798
799
  export declare const connectedAccountRefusalCodes: readonly ["connected-account-missing", "connected-account-invalid", "connected-account-unsupported"];
799
800
  export type ConnectedAccountRefusalCode = (typeof connectedAccountRefusalCodes)[number];
@@ -856,8 +857,36 @@ export declare const putWorkspaceCredentialsRequestSchema: Schema.Struct<{
856
857
  * of the whole put failing. Every other refusal still fails the put. Default false.
857
858
  */
858
859
  readonly partial: Schema.optional<Schema.Boolean>;
860
+ /**
861
+ * The placements the person's running processes hold in this home: a provider whose slot one of
862
+ * them holds is not written over with another login. Absent, nothing is held.
863
+ */
864
+ readonly live: Schema.optional<Schema.$Array<Schema.String>>;
859
865
  }>;
860
866
  export type PutWorkspaceCredentialsRequest = typeof putWorkspaceCredentialsRequestSchema.Type;
867
+ /** One login written into one home: its id stays the same while a refresh moves its revision. */
868
+ export declare const credentialPlacementReceiptSchema: Schema.Struct<{
869
+ readonly placementId: Schema.String;
870
+ readonly accountId: Schema.String;
871
+ readonly revision: Schema.Int;
872
+ readonly login: Schema.Struct<{
873
+ readonly kind: Schema.Literal<"subscription">;
874
+ }>;
875
+ readonly pinned: Schema.Boolean;
876
+ }>;
877
+ export type CredentialPlacementReceipt = typeof credentialPlacementReceiptSchema.Type;
878
+ /** A receipt tagged with the home provider whose slot it occupies. */
879
+ export declare const workspaceCredentialPlacementReceiptSchema: Schema.Struct<{
880
+ readonly placementId: Schema.String;
881
+ readonly accountId: Schema.String;
882
+ readonly revision: Schema.Int;
883
+ readonly login: Schema.Struct<{
884
+ readonly kind: Schema.Literal<"subscription">;
885
+ }>;
886
+ readonly pinned: Schema.Boolean;
887
+ readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
888
+ }>;
889
+ export type WorkspaceCredentialPlacementReceipt = typeof workspaceCredentialPlacementReceiptSchema.Type;
861
890
  /** One account whose copy a home holds. */
862
891
  export declare const workspaceHomeAccountSchema: Schema.Struct<{
863
892
  readonly connectedAccountId: Schema.String;
@@ -870,6 +899,17 @@ export declare const workspaceCredentialHomeSchema: Schema.Struct<{
870
899
  readonly home: Schema.String;
871
900
  /** The one person whose logins the home holds. */
872
901
  readonly onBehalfOfUserId: Schema.String;
902
+ /** The logins written there, one receipt each. Absent from a server without placements. */
903
+ readonly placements: Schema.optional<Schema.$Array<Schema.Struct<{
904
+ readonly placementId: Schema.String;
905
+ readonly accountId: Schema.String;
906
+ readonly revision: Schema.Int;
907
+ readonly login: Schema.Struct<{
908
+ readonly kind: Schema.Literal<"subscription">;
909
+ }>;
910
+ readonly pinned: Schema.Boolean;
911
+ readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
912
+ }>>>;
873
913
  /** By provider; a provider the home holds no login for is absent. */
874
914
  readonly accounts: Schema.Struct<{
875
915
  readonly claude: Schema.optional<Schema.Struct<{
@@ -923,6 +963,17 @@ export declare const putWorkspaceCredentialsResponseSchema: Schema.Struct<{
923
963
  readonly home: Schema.String;
924
964
  /** The one person whose logins the home holds. */
925
965
  readonly onBehalfOfUserId: Schema.String;
966
+ /** The logins written there, one receipt each. Absent from a server without placements. */
967
+ readonly placements: Schema.optional<Schema.$Array<Schema.Struct<{
968
+ readonly placementId: Schema.String;
969
+ readonly accountId: Schema.String;
970
+ readonly revision: Schema.Int;
971
+ readonly login: Schema.Struct<{
972
+ readonly kind: Schema.Literal<"subscription">;
973
+ }>;
974
+ readonly pinned: Schema.Boolean;
975
+ readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
976
+ }>>>;
926
977
  /** By provider; a provider the home holds no login for is absent. */
927
978
  readonly accounts: Schema.Struct<{
928
979
  readonly claude: Schema.optional<Schema.Struct<{
@@ -967,6 +1018,65 @@ export declare const putWorkspaceCredentialsResponseSchema: Schema.Struct<{
967
1018
  }>>>;
968
1019
  }>;
969
1020
  export type PutWorkspaceCredentialsResponse = typeof putWorkspaceCredentialsResponseSchema.Type;
1021
+ /** Remove every login of one home that is neither live nor the ready one of the person's default. */
1022
+ export declare const pruneWorkspaceCredentialsRequestSchema: Schema.Struct<{
1023
+ readonly ownerUserId: Schema.String;
1024
+ readonly home: Schema.String;
1025
+ readonly live: Schema.$Array<Schema.String>;
1026
+ }>;
1027
+ export type PruneWorkspaceCredentialsRequest = typeof pruneWorkspaceCredentialsRequestSchema.Type;
1028
+ export declare const pruneWorkspaceCredentialsResponseSchema: Schema.Struct<{
1029
+ readonly workspaceId: Schema.String;
1030
+ readonly runId: Schema.String;
1031
+ /** Absent when the home holds nothing (any more). */
1032
+ readonly home: Schema.optional<Schema.Struct<{
1033
+ readonly home: Schema.String;
1034
+ /** The one person whose logins the home holds. */
1035
+ readonly onBehalfOfUserId: Schema.String;
1036
+ /** The logins written there, one receipt each. Absent from a server without placements. */
1037
+ readonly placements: Schema.optional<Schema.$Array<Schema.Struct<{
1038
+ readonly placementId: Schema.String;
1039
+ readonly accountId: Schema.String;
1040
+ readonly revision: Schema.Int;
1041
+ readonly login: Schema.Struct<{
1042
+ readonly kind: Schema.Literal<"subscription">;
1043
+ }>;
1044
+ readonly pinned: Schema.Boolean;
1045
+ readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
1046
+ }>>>;
1047
+ /** By provider; a provider the home holds no login for is absent. */
1048
+ readonly accounts: Schema.Struct<{
1049
+ readonly claude: Schema.optional<Schema.Struct<{
1050
+ readonly connectedAccountId: Schema.String;
1051
+ /** The account's name under its provider, as it is now. */
1052
+ readonly name: Schema.String;
1053
+ }>>;
1054
+ readonly codex: Schema.optional<Schema.Struct<{
1055
+ readonly connectedAccountId: Schema.String;
1056
+ /** The account's name under its provider, as it is now. */
1057
+ readonly name: Schema.String;
1058
+ }>>;
1059
+ readonly github: Schema.optional<Schema.Struct<{
1060
+ readonly connectedAccountId: Schema.String;
1061
+ /** The account's name under its provider, as it is now. */
1062
+ readonly name: Schema.String;
1063
+ }>>;
1064
+ /** The Codex account pi's ChatGPT login is made from. */
1065
+ readonly pi: Schema.optional<Schema.Struct<{
1066
+ readonly connectedAccountId: Schema.String;
1067
+ /** The account's name under its provider, as it is now. */
1068
+ readonly name: Schema.String;
1069
+ }>>;
1070
+ /** The Codex account opencode's ChatGPT login is made from. */
1071
+ readonly opencode: Schema.optional<Schema.Struct<{
1072
+ readonly connectedAccountId: Schema.String;
1073
+ /** The account's name under its provider, as it is now. */
1074
+ readonly name: Schema.String;
1075
+ }>>;
1076
+ }>;
1077
+ }>>;
1078
+ }>;
1079
+ export type PruneWorkspaceCredentialsResponse = typeof pruneWorkspaceCredentialsResponseSchema.Type;
970
1080
  /** Release one home: its login files are removed and its record deleted. */
971
1081
  export declare const releaseWorkspaceCredentialsQuerySchema: Schema.Struct<{
972
1082
  readonly ownerUserId: Schema.String;
@@ -993,6 +1103,17 @@ export declare const listWorkspaceCredentialsResponseSchema: Schema.Struct<{
993
1103
  readonly home: Schema.String;
994
1104
  /** The one person whose logins the home holds. */
995
1105
  readonly onBehalfOfUserId: Schema.String;
1106
+ /** The logins written there, one receipt each. Absent from a server without placements. */
1107
+ readonly placements: Schema.optional<Schema.$Array<Schema.Struct<{
1108
+ readonly placementId: Schema.String;
1109
+ readonly accountId: Schema.String;
1110
+ readonly revision: Schema.Int;
1111
+ readonly login: Schema.Struct<{
1112
+ readonly kind: Schema.Literal<"subscription">;
1113
+ }>;
1114
+ readonly pinned: Schema.Boolean;
1115
+ readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
1116
+ }>>>;
996
1117
  /** By provider; a provider the home holds no login for is absent. */
997
1118
  readonly accounts: Schema.Struct<{
998
1119
  readonly claude: Schema.optional<Schema.Struct<{
@@ -1031,11 +1152,12 @@ export type ListWorkspaceCredentialsResponse = typeof listWorkspaceCredentialsRe
1031
1152
  * `workspace-not-running` (no ready executor), `connected-account-invalid` (a named account is
1032
1153
  * marked invalid or unusable: reconnect it; `provider` names its provider),
1033
1154
  * `connected-account-unsupported` (a Codex account named for pi or opencode is not a ChatGPT
1034
- * login), `home-held` (the home holds another person's logins: release it
1035
- * first; `/root` while the launch's own logins are at `$HOME`, or for anyone but the workspace's
1036
- * owner), `home-unusable` (the home does not exist, is not a directory, is reached through a
1037
- * symbolic link, or a login directory in it links outside it), `home-busy` (another write into the
1038
- * home, or too many into this workspace, is still running: nothing was done, try again).
1155
+ * login, or a Claude account is an API key, which cannot be placed yet), `home-held` (the home
1156
+ * holds another person's logins: release it first; `/root` while the launch's own logins are at
1157
+ * `$HOME`, or for anyone but the workspace's owner), `home-unusable` (the home does not exist, is
1158
+ * not a directory, is reached through a symbolic link, or a login directory in it links outside
1159
+ * it), `home-busy` (another write into the home, or too many into this workspace, is still
1160
+ * running: nothing was done, try again).
1039
1161
  */
1040
1162
  export declare const workspaceCredentialsConflictCodes: readonly ["workspace-not-running", "connected-account-invalid", "connected-account-unsupported", "home-held", "home-unusable", "home-busy"];
1041
1163
  export type WorkspaceCredentialsConflictCode = (typeof workspaceCredentialsConflictCodes)[number];
@@ -2710,6 +2832,17 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
2710
2832
  readonly home: Schema.String;
2711
2833
  /** The one person whose logins the home holds. */
2712
2834
  readonly onBehalfOfUserId: Schema.String;
2835
+ /** The logins written there, one receipt each. Absent from a server without placements. */
2836
+ readonly placements: Schema.optional<Schema.$Array<Schema.Struct<{
2837
+ readonly placementId: Schema.String;
2838
+ readonly accountId: Schema.String;
2839
+ readonly revision: Schema.Int;
2840
+ readonly login: Schema.Struct<{
2841
+ readonly kind: Schema.Literal<"subscription">;
2842
+ }>;
2843
+ readonly pinned: Schema.Boolean;
2844
+ readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
2845
+ }>>>;
2713
2846
  /** By provider; a provider the home holds no login for is absent. */
2714
2847
  readonly accounts: Schema.Struct<{
2715
2848
  readonly claude: Schema.optional<Schema.Struct<{
@@ -2847,7 +2980,63 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
2847
2980
  readonly finishedAt: Schema.optional<Schema.String>;
2848
2981
  readonly expiresAt: Schema.optional<Schema.String>;
2849
2982
  }>>;
2850
- }>>, Schema.toCodecJson<typeof WorkspaceBadRequestError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"putWorkspaceCredentials", "POST", "/:workspaceId/credentials", Schema.toCodecStringTree<Schema.Struct<{
2983
+ }>>, Schema.toCodecJson<typeof WorkspaceBadRequestError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pruneWorkspaceCredentials", "POST", "/:workspaceId/credentials/prune", Schema.toCodecStringTree<Schema.Struct<{
2984
+ readonly workspaceId: Schema.String;
2985
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2986
+ readonly ownerUserId: Schema.String;
2987
+ readonly home: Schema.String;
2988
+ readonly live: Schema.$Array<Schema.String>;
2989
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
2990
+ readonly workspaceId: Schema.String;
2991
+ readonly runId: Schema.String;
2992
+ /** Absent when the home holds nothing (any more). */
2993
+ readonly home: Schema.optional<Schema.Struct<{
2994
+ readonly home: Schema.String;
2995
+ /** The one person whose logins the home holds. */
2996
+ readonly onBehalfOfUserId: Schema.String;
2997
+ /** The logins written there, one receipt each. Absent from a server without placements. */
2998
+ readonly placements: Schema.optional<Schema.$Array<Schema.Struct<{
2999
+ readonly placementId: Schema.String;
3000
+ readonly accountId: Schema.String;
3001
+ readonly revision: Schema.Int;
3002
+ readonly login: Schema.Struct<{
3003
+ readonly kind: Schema.Literal<"subscription">;
3004
+ }>;
3005
+ readonly pinned: Schema.Boolean;
3006
+ readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
3007
+ }>>>;
3008
+ /** By provider; a provider the home holds no login for is absent. */
3009
+ readonly accounts: Schema.Struct<{
3010
+ readonly claude: Schema.optional<Schema.Struct<{
3011
+ readonly connectedAccountId: Schema.String;
3012
+ /** The account's name under its provider, as it is now. */
3013
+ readonly name: Schema.String;
3014
+ }>>;
3015
+ readonly codex: Schema.optional<Schema.Struct<{
3016
+ readonly connectedAccountId: Schema.String;
3017
+ /** The account's name under its provider, as it is now. */
3018
+ readonly name: Schema.String;
3019
+ }>>;
3020
+ readonly github: Schema.optional<Schema.Struct<{
3021
+ readonly connectedAccountId: Schema.String;
3022
+ /** The account's name under its provider, as it is now. */
3023
+ readonly name: Schema.String;
3024
+ }>>;
3025
+ /** The Codex account pi's ChatGPT login is made from. */
3026
+ readonly pi: Schema.optional<Schema.Struct<{
3027
+ readonly connectedAccountId: Schema.String;
3028
+ /** The account's name under its provider, as it is now. */
3029
+ readonly name: Schema.String;
3030
+ }>>;
3031
+ /** The Codex account opencode's ChatGPT login is made from. */
3032
+ readonly opencode: Schema.optional<Schema.Struct<{
3033
+ readonly connectedAccountId: Schema.String;
3034
+ /** The account's name under its provider, as it is now. */
3035
+ readonly name: Schema.String;
3036
+ }>>;
3037
+ }>;
3038
+ }>>;
3039
+ }>>, Schema.toCodecJson<typeof WorkspaceBadRequestError | typeof WorkspaceForbiddenError | typeof WorkspaceNotFoundError | typeof WorkspaceConflictError | typeof WorkspaceBadGatewayError | typeof WorkspaceServiceUnavailableError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"putWorkspaceCredentials", "POST", "/:workspaceId/credentials", Schema.toCodecStringTree<Schema.Struct<{
2851
3040
  readonly workspaceId: Schema.String;
2852
3041
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2853
3042
  /** The workspace's owner (owner scope; uniform 404 otherwise). */
@@ -2889,6 +3078,11 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
2889
3078
  * of the whole put failing. Every other refusal still fails the put. Default false.
2890
3079
  */
2891
3080
  readonly partial: Schema.optional<Schema.Boolean>;
3081
+ /**
3082
+ * The placements the person's running processes hold in this home: a provider whose slot one of
3083
+ * them holds is not written over with another login. Absent, nothing is held.
3084
+ */
3085
+ readonly live: Schema.optional<Schema.$Array<Schema.String>>;
2892
3086
  }>>, never, Schema.toCodecJson<Schema.Struct<{
2893
3087
  readonly workspaceId: Schema.String;
2894
3088
  /** The launch attempt whose executor was written. */
@@ -2898,6 +3092,17 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
2898
3092
  readonly home: Schema.String;
2899
3093
  /** The one person whose logins the home holds. */
2900
3094
  readonly onBehalfOfUserId: Schema.String;
3095
+ /** The logins written there, one receipt each. Absent from a server without placements. */
3096
+ readonly placements: Schema.optional<Schema.$Array<Schema.Struct<{
3097
+ readonly placementId: Schema.String;
3098
+ readonly accountId: Schema.String;
3099
+ readonly revision: Schema.Int;
3100
+ readonly login: Schema.Struct<{
3101
+ readonly kind: Schema.Literal<"subscription">;
3102
+ }>;
3103
+ readonly pinned: Schema.Boolean;
3104
+ readonly provider: Schema.Literals<readonly ["claude", "codex", "github", "pi", "opencode"]>;
3105
+ }>>>;
2901
3106
  /** By provider; a provider the home holds no login for is absent. */
2902
3107
  readonly accounts: Schema.Struct<{
2903
3108
  readonly claude: Schema.optional<Schema.Struct<{
@@ -663,7 +663,8 @@ export const inspectWorkspaceImageResponseSchema = Schema.Struct({
663
663
  * else's) and `connected-account-invalid` (`WorkspaceConflictError`, 409: the account is marked
664
664
  * invalid, or holds an unusable credential; reconnect it) and `connected-account-unsupported`
665
665
  * (`WorkspaceConflictError`, 409: the account cannot serve what was asked, as a Codex API key cannot
666
- * be pi's or opencode's ChatGPT login). Nothing was written either way.
666
+ * be pi's or opencode's ChatGPT login, and a Claude API key cannot be placed yet). Nothing was
667
+ * written either way.
667
668
  */
668
669
  export const connectedAccountRefusalCodes = [
669
670
  "connected-account-missing",
@@ -734,6 +735,24 @@ export const putWorkspaceCredentialsRequestSchema = Schema.Struct({
734
735
  * of the whole put failing. Every other refusal still fails the put. Default false.
735
736
  */
736
737
  partial: Schema.optional(Schema.Boolean),
738
+ /**
739
+ * The placements the person's running processes hold in this home: a provider whose slot one of
740
+ * them holds is not written over with another login. Absent, nothing is held.
741
+ */
742
+ live: Schema.optional(Schema.Array(NonEmptyString)),
743
+ });
744
+ /** One login written into one home: its id stays the same while a refresh moves its revision. */
745
+ export const credentialPlacementReceiptSchema = Schema.Struct({
746
+ placementId: NonEmptyString,
747
+ accountId: NonEmptyString,
748
+ revision: Schema.Int.check(Schema.isGreaterThan(0)),
749
+ login: Schema.Struct({ kind: Schema.Literal("subscription") }),
750
+ pinned: Schema.Boolean,
751
+ });
752
+ /** A receipt tagged with the home provider whose slot it occupies. */
753
+ export const workspaceCredentialPlacementReceiptSchema = Schema.Struct({
754
+ provider: Schema.Literals(workspaceCredentialHomeProviders),
755
+ ...credentialPlacementReceiptSchema.fields,
737
756
  });
738
757
  /** One account whose copy a home holds. */
739
758
  export const workspaceHomeAccountSchema = Schema.Struct({
@@ -746,6 +765,8 @@ export const workspaceCredentialHomeSchema = Schema.Struct({
746
765
  home: NonEmptyString,
747
766
  /** The one person whose logins the home holds. */
748
767
  onBehalfOfUserId: NonEmptyString,
768
+ /** The logins written there, one receipt each. Absent from a server without placements. */
769
+ placements: Schema.optional(Schema.Array(workspaceCredentialPlacementReceiptSchema)),
749
770
  /** By provider; a provider the home holds no login for is absent. */
750
771
  accounts: Schema.Struct({
751
772
  claude: Schema.optional(workspaceHomeAccountSchema),
@@ -777,6 +798,18 @@ export const putWorkspaceCredentialsResponseSchema = Schema.Struct({
777
798
  /** A partial put's left-out providers, in the order named (empty when all were written). */
778
799
  skipped: Schema.optional(Schema.Array(workspaceCredentialSkipSchema)),
779
800
  });
801
+ /** Remove every login of one home that is neither live nor the ready one of the person's default. */
802
+ export const pruneWorkspaceCredentialsRequestSchema = Schema.Struct({
803
+ ownerUserId: NonEmptyString,
804
+ home: NonEmptyString,
805
+ live: Schema.Array(NonEmptyString),
806
+ });
807
+ export const pruneWorkspaceCredentialsResponseSchema = Schema.Struct({
808
+ workspaceId: NonEmptyString,
809
+ runId: NonEmptyString,
810
+ /** Absent when the home holds nothing (any more). */
811
+ home: Schema.optional(workspaceCredentialHomeSchema),
812
+ });
780
813
  /** Release one home: its login files are removed and its record deleted. */
781
814
  export const releaseWorkspaceCredentialsQuerySchema = Schema.Struct({
782
815
  ownerUserId: NonEmptyString,
@@ -803,11 +836,12 @@ export const listWorkspaceCredentialsResponseSchema = Schema.Struct({
803
836
  * `workspace-not-running` (no ready executor), `connected-account-invalid` (a named account is
804
837
  * marked invalid or unusable: reconnect it; `provider` names its provider),
805
838
  * `connected-account-unsupported` (a Codex account named for pi or opencode is not a ChatGPT
806
- * login), `home-held` (the home holds another person's logins: release it
807
- * first; `/root` while the launch's own logins are at `$HOME`, or for anyone but the workspace's
808
- * owner), `home-unusable` (the home does not exist, is not a directory, is reached through a
809
- * symbolic link, or a login directory in it links outside it), `home-busy` (another write into the
810
- * home, or too many into this workspace, is still running: nothing was done, try again).
839
+ * login, or a Claude account is an API key, which cannot be placed yet), `home-held` (the home
840
+ * holds another person's logins: release it first; `/root` while the launch's own logins are at
841
+ * `$HOME`, or for anyone but the workspace's owner), `home-unusable` (the home does not exist, is
842
+ * not a directory, is reached through a symbolic link, or a login directory in it links outside
843
+ * it), `home-busy` (another write into the home, or too many into this workspace, is still
844
+ * running: nothing was done, try again).
811
845
  */
812
846
  export const workspaceCredentialsConflictCodes = [
813
847
  "workspace-not-running",
@@ -1457,6 +1491,20 @@ HttpApiEndpoint.delete("releaseWorkspaceCredentials", "/:workspaceId/credentials
1457
1491
  WorkspaceServiceUnavailableError,
1458
1492
  WorkspaceInternalServerError,
1459
1493
  ],
1494
+ }))
1495
+ .add(HttpApiEndpoint.post("pruneWorkspaceCredentials", "/:workspaceId/credentials/prune", {
1496
+ params: workspaceIdParams,
1497
+ payload: pruneWorkspaceCredentialsRequestSchema,
1498
+ success: pruneWorkspaceCredentialsResponseSchema,
1499
+ error: [
1500
+ WorkspaceBadRequestError,
1501
+ WorkspaceForbiddenError,
1502
+ WorkspaceNotFoundError,
1503
+ WorkspaceConflictError,
1504
+ WorkspaceBadGatewayError,
1505
+ WorkspaceServiceUnavailableError,
1506
+ WorkspaceInternalServerError,
1507
+ ],
1460
1508
  }))
1461
1509
  .add(HttpApiEndpoint.get("listWorkspaceCredentials", "/:workspaceId/credentials", {
1462
1510
  params: workspaceIdParams,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealant/api-contracts-next",
3
- "version": "0.40.0-next.763",
3
+ "version": "0.40.0-next.765",
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": "c741e10743b2c553b526f93565c256fe8fa4bd8b",
39
+ "gitHead": "9802ef32e54645b875272fecf15d036bf7f095e1",
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  }