@sealant/api-contracts-next 0.40.0-next.777 → 0.40.0-next.783
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/control-plane.d.ts +1166 -872
- package/dist/core-api/control-plane.js +2 -0
- package/dist/core-api/resource-domains.d.ts +1 -0
- package/dist/core-api/resource-domains.js +1 -1
- package/dist/core-api/resource-instances.d.ts +636 -0
- package/dist/core-api/resource-instances.js +344 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource instances: long-running containers a resource domain (a project) runs, such as a
|
|
3
|
+
* Postgres server, a Redis or a mail catcher, with named volumes that outlive every stop.
|
|
4
|
+
*
|
|
5
|
+
* An instance is addressed by its domain and its `key`, the application's own name for it (Mend:
|
|
6
|
+
* `<definition>` or `<definition>@<worktree>`). Its `alias` is the short name a linked workspace
|
|
7
|
+
* resolves it by (`db`). An instance whose `worktreeKey` is null is reached by every workspace
|
|
8
|
+
* linked to the domain; one with a worktree key only by workspaces linked with that key.
|
|
9
|
+
*
|
|
10
|
+
* The spec has no field for privileged mode, capabilities, host networking, host paths, devices,
|
|
11
|
+
* the Docker socket or shared namespaces, and the decoder names each one it is sent.
|
|
12
|
+
*/
|
|
13
|
+
import { Schema } from "effect";
|
|
14
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
15
|
+
import { ResourceDomainForbiddenError, ResourceDomainInternalServerError, ResourceDomainNotFoundError } from "./resource-domains.js";
|
|
16
|
+
export declare const RESOURCE_INSTANCE_ID_PREFIX = "rin:";
|
|
17
|
+
export declare const ResourceInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
18
|
+
export type ResourceInstanceId = typeof ResourceInstanceId.Type;
|
|
19
|
+
export declare const ResourceInstanceKey: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
20
|
+
export type ResourceInstanceKey = typeof ResourceInstanceKey.Type;
|
|
21
|
+
/** One DNS label: the name a linked workspace resolves the instance by. */
|
|
22
|
+
export declare const ResourceInstanceAlias: Schema.brand<Schema.String, "ResourceInstanceAlias">;
|
|
23
|
+
export type ResourceInstanceAlias = typeof ResourceInstanceAlias.Type;
|
|
24
|
+
/** The application's opaque name for a worktree: links and worktree instances match on it. */
|
|
25
|
+
export declare const ResourceWorktreeKey: Schema.brand<Schema.String, "ResourceWorktreeKey">;
|
|
26
|
+
export type ResourceWorktreeKey = typeof ResourceWorktreeKey.Type;
|
|
27
|
+
/** An image pinned by digest (a tag may precede it). Core never resolves a tag. */
|
|
28
|
+
export declare const ResourcePinnedImage: Schema.brand<Schema.String, "ResourcePinnedImage">;
|
|
29
|
+
export type ResourcePinnedImage = typeof ResourcePinnedImage.Type;
|
|
30
|
+
export declare const resourceInstanceVolumeSchema: Schema.Struct<{
|
|
31
|
+
readonly name: Schema.String;
|
|
32
|
+
readonly mountPath: Schema.String;
|
|
33
|
+
}>;
|
|
34
|
+
export type ResourceInstanceVolume = typeof resourceInstanceVolumeSchema.Type;
|
|
35
|
+
export declare const resourceInstanceReadySchema: Schema.Union<readonly [Schema.Struct<{
|
|
36
|
+
readonly kind: Schema.Literal<"tcp">;
|
|
37
|
+
readonly port: Schema.Int;
|
|
38
|
+
}>, Schema.Struct<{
|
|
39
|
+
readonly kind: Schema.Literal<"exec">;
|
|
40
|
+
readonly argv: Schema.$Array<Schema.String>;
|
|
41
|
+
readonly user: Schema.NullOr<Schema.String>;
|
|
42
|
+
}>]>;
|
|
43
|
+
export type ResourceInstanceReady = typeof resourceInstanceReadySchema.Type;
|
|
44
|
+
/** Ten days: the longest an instance may wait unreached before Core stops it. */
|
|
45
|
+
export declare const RESOURCE_INSTANCE_MAX_IDLE_SECONDS = 864000;
|
|
46
|
+
/** What an instance runs. Excess keys are refused; see the header for what has no field. */
|
|
47
|
+
export declare const resourceInstanceSpecSchema: Schema.Struct<{
|
|
48
|
+
readonly alias: Schema.brand<Schema.String, "ResourceInstanceAlias">;
|
|
49
|
+
/** Null: every workspace linked to the domain reaches it. Set: only links with this key. */
|
|
50
|
+
readonly worktreeKey: Schema.NullOr<Schema.brand<Schema.String, "ResourceWorktreeKey">>;
|
|
51
|
+
readonly image: Schema.brand<Schema.String, "ResourcePinnedImage">;
|
|
52
|
+
/** Replaces the image's CMD; its ENTRYPOINT always runs. */
|
|
53
|
+
readonly command: Schema.NullOr<Schema.$Array<Schema.String>>;
|
|
54
|
+
readonly env: Schema.$Record<Schema.String, Schema.String>;
|
|
55
|
+
/** Named volumes only. Every image `VOLUME` this does not cover gets a named volume too. */
|
|
56
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
57
|
+
readonly name: Schema.String;
|
|
58
|
+
readonly mountPath: Schema.String;
|
|
59
|
+
}>>;
|
|
60
|
+
readonly limits: Schema.Struct<{
|
|
61
|
+
readonly cpuMillicores: Schema.Int;
|
|
62
|
+
readonly memoryBytes: Schema.Int;
|
|
63
|
+
}>;
|
|
64
|
+
readonly ready: Schema.Union<readonly [Schema.Struct<{
|
|
65
|
+
readonly kind: Schema.Literal<"tcp">;
|
|
66
|
+
readonly port: Schema.Int;
|
|
67
|
+
}>, Schema.Struct<{
|
|
68
|
+
readonly kind: Schema.Literal<"exec">;
|
|
69
|
+
readonly argv: Schema.$Array<Schema.String>;
|
|
70
|
+
readonly user: Schema.NullOr<Schema.String>;
|
|
71
|
+
}>]>;
|
|
72
|
+
/** Seconds with no live linked executor reaching it before Core stops it. */
|
|
73
|
+
readonly idleStopAfterSeconds: Schema.Int;
|
|
74
|
+
}>;
|
|
75
|
+
export type ResourceInstanceSpec = typeof resourceInstanceSpecSchema.Type;
|
|
76
|
+
export declare const resourceInstanceStopReasonSchema: Schema.Union<readonly [Schema.Struct<{
|
|
77
|
+
readonly kind: Schema.Literal<"idle">;
|
|
78
|
+
}>, Schema.Struct<{
|
|
79
|
+
readonly kind: Schema.Literal<"person">;
|
|
80
|
+
readonly by: Schema.String;
|
|
81
|
+
}>]>;
|
|
82
|
+
export type ResourceInstanceStopReason = typeof resourceInstanceStopReasonSchema.Type;
|
|
83
|
+
/** What Core last observed of an instance, apart from what was asked of it. Times are ISO. */
|
|
84
|
+
export declare const resourceInstanceStateSchema: Schema.Union<readonly [Schema.Struct<{
|
|
85
|
+
readonly kind: Schema.Literal<"not-started">;
|
|
86
|
+
}>, Schema.Struct<{
|
|
87
|
+
readonly kind: Schema.Literal<"starting">;
|
|
88
|
+
readonly since: Schema.String;
|
|
89
|
+
}>, Schema.Struct<{
|
|
90
|
+
readonly kind: Schema.Literal<"running">;
|
|
91
|
+
readonly since: Schema.String;
|
|
92
|
+
}>, Schema.Struct<{
|
|
93
|
+
readonly kind: Schema.Literal<"stopped">;
|
|
94
|
+
readonly at: Schema.String;
|
|
95
|
+
readonly reason: Schema.Union<readonly [Schema.Struct<{
|
|
96
|
+
readonly kind: Schema.Literal<"idle">;
|
|
97
|
+
}>, Schema.Struct<{
|
|
98
|
+
readonly kind: Schema.Literal<"person">;
|
|
99
|
+
readonly by: Schema.String;
|
|
100
|
+
}>]>;
|
|
101
|
+
}>, Schema.Struct<{
|
|
102
|
+
readonly kind: Schema.Literal<"exited">;
|
|
103
|
+
readonly at: Schema.String;
|
|
104
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
105
|
+
}>, Schema.Struct<{
|
|
106
|
+
readonly kind: Schema.Literal<"failed">;
|
|
107
|
+
readonly at: Schema.String;
|
|
108
|
+
readonly message: Schema.String;
|
|
109
|
+
}>, Schema.Struct<{
|
|
110
|
+
readonly kind: Schema.Literal<"archived">;
|
|
111
|
+
readonly at: Schema.String;
|
|
112
|
+
}>]>;
|
|
113
|
+
export type ResourceInstanceState = typeof resourceInstanceStateSchema.Type;
|
|
114
|
+
/**
|
|
115
|
+
* What a spec may never ask for, by the names a caller might send it under, each with the sentence
|
|
116
|
+
* the refusal carries. None of them is a field of `resourceInstanceSpecSchema`.
|
|
117
|
+
*/
|
|
118
|
+
export declare const FORBIDDEN_RESOURCE_INSTANCE_SPEC_FIELDS: Readonly<Record<string, string>>;
|
|
119
|
+
export interface ResourceInstanceSpecRefusal {
|
|
120
|
+
/** Where the spec is wrong (`privileged`, `volumes[0].mountPath`); never a value it held. */
|
|
121
|
+
readonly field: string;
|
|
122
|
+
readonly reason: string;
|
|
123
|
+
}
|
|
124
|
+
export type ResourceInstanceSpecDecoding = {
|
|
125
|
+
readonly kind: "spec";
|
|
126
|
+
readonly spec: ResourceInstanceSpec;
|
|
127
|
+
} | {
|
|
128
|
+
readonly kind: "refused";
|
|
129
|
+
readonly refusals: ReadonlyArray<ResourceInstanceSpecRefusal>;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* A spec from outside: each forbidden field refused by name with its sentence, then the schema's
|
|
133
|
+
* own decode with no excess key allowed.
|
|
134
|
+
*/
|
|
135
|
+
export declare const decodeResourceInstanceSpec: (input: unknown) => ResourceInstanceSpecDecoding;
|
|
136
|
+
export declare const resourceInstanceUpCauseSchema: Schema.Literals<readonly ["use", "person"]>;
|
|
137
|
+
export type ResourceInstanceUpCause = typeof resourceInstanceUpCauseSchema.Type;
|
|
138
|
+
export declare const upResourceInstanceRequestSchema: Schema.Struct<{
|
|
139
|
+
/**
|
|
140
|
+
* A `ResourceInstanceSpec`, decoded by `decodeResourceInstanceSpec` so a refused field is named
|
|
141
|
+
* with its sentence (`ResourceInstanceSpecRefusedError`).
|
|
142
|
+
*/
|
|
143
|
+
readonly spec: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
144
|
+
/** `use`: a launch or a wake, which leaves a person's stop standing. `person`: a person's Start. */
|
|
145
|
+
readonly cause: Schema.Literals<readonly ["use", "person"]>;
|
|
146
|
+
}>;
|
|
147
|
+
export type UpResourceInstanceRequest = typeof upResourceInstanceRequestSchema.Type;
|
|
148
|
+
export declare const stopResourceInstanceRequestSchema: Schema.Struct<{
|
|
149
|
+
/** The application's words for who stopped it (Mend: a display name). */
|
|
150
|
+
readonly by: Schema.String;
|
|
151
|
+
}>;
|
|
152
|
+
export type StopResourceInstanceRequest = typeof stopResourceInstanceRequestSchema.Type;
|
|
153
|
+
export declare const resourceInstanceSchema: Schema.Struct<{
|
|
154
|
+
readonly resourceInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
155
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
156
|
+
readonly alias: Schema.brand<Schema.String, "ResourceInstanceAlias">;
|
|
157
|
+
readonly worktreeKey: Schema.NullOr<Schema.brand<Schema.String, "ResourceWorktreeKey">>;
|
|
158
|
+
readonly specDigest: Schema.String;
|
|
159
|
+
/** What was asked of it. */
|
|
160
|
+
readonly desired: Schema.Literals<readonly ["running", "stopped", "archived"]>;
|
|
161
|
+
/** Why it is stopped, while `desired` is `stopped`. */
|
|
162
|
+
readonly stopReason: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
163
|
+
readonly kind: Schema.Literal<"idle">;
|
|
164
|
+
}>, Schema.Struct<{
|
|
165
|
+
readonly kind: Schema.Literal<"person">;
|
|
166
|
+
readonly by: Schema.String;
|
|
167
|
+
}>]>>;
|
|
168
|
+
/** What Core last observed, and when. */
|
|
169
|
+
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
170
|
+
readonly kind: Schema.Literal<"not-started">;
|
|
171
|
+
}>, Schema.Struct<{
|
|
172
|
+
readonly kind: Schema.Literal<"starting">;
|
|
173
|
+
readonly since: Schema.String;
|
|
174
|
+
}>, Schema.Struct<{
|
|
175
|
+
readonly kind: Schema.Literal<"running">;
|
|
176
|
+
readonly since: Schema.String;
|
|
177
|
+
}>, Schema.Struct<{
|
|
178
|
+
readonly kind: Schema.Literal<"stopped">;
|
|
179
|
+
readonly at: Schema.String;
|
|
180
|
+
readonly reason: Schema.Union<readonly [Schema.Struct<{
|
|
181
|
+
readonly kind: Schema.Literal<"idle">;
|
|
182
|
+
}>, Schema.Struct<{
|
|
183
|
+
readonly kind: Schema.Literal<"person">;
|
|
184
|
+
readonly by: Schema.String;
|
|
185
|
+
}>]>;
|
|
186
|
+
}>, Schema.Struct<{
|
|
187
|
+
readonly kind: Schema.Literal<"exited">;
|
|
188
|
+
readonly at: Schema.String;
|
|
189
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
190
|
+
}>, Schema.Struct<{
|
|
191
|
+
readonly kind: Schema.Literal<"failed">;
|
|
192
|
+
readonly at: Schema.String;
|
|
193
|
+
readonly message: Schema.String;
|
|
194
|
+
}>, Schema.Struct<{
|
|
195
|
+
readonly kind: Schema.Literal<"archived">;
|
|
196
|
+
readonly at: Schema.String;
|
|
197
|
+
}>]>;
|
|
198
|
+
readonly observedAt: Schema.String;
|
|
199
|
+
readonly startedAt: Schema.NullOr<Schema.String>;
|
|
200
|
+
readonly lastReachedAt: Schema.NullOr<Schema.String>;
|
|
201
|
+
/** The Docker volumes it mounts, which outlive it. */
|
|
202
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
203
|
+
readonly name: Schema.String;
|
|
204
|
+
readonly dockerName: Schema.String;
|
|
205
|
+
}>>;
|
|
206
|
+
}>;
|
|
207
|
+
export type ResourceInstanceWire = typeof resourceInstanceSchema.Type;
|
|
208
|
+
export declare const resourceInstanceArchivedVolumeSchema: Schema.Struct<{
|
|
209
|
+
readonly instanceKey: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
210
|
+
readonly name: Schema.String;
|
|
211
|
+
readonly dockerName: Schema.String;
|
|
212
|
+
/** Measured at archive; null when it could not be. */
|
|
213
|
+
readonly bytes: Schema.NullOr<Schema.Int>;
|
|
214
|
+
}>;
|
|
215
|
+
export type ResourceInstanceArchivedVolumeWire = typeof resourceInstanceArchivedVolumeSchema.Type;
|
|
216
|
+
export declare const listResourceInstancesQuerySchema: Schema.Struct<{
|
|
217
|
+
/** `true`: the archived instances, whose volumes are kept. Otherwise every other one. */
|
|
218
|
+
readonly archived: Schema.optional<Schema.Literals<readonly ["true", "false"]>>;
|
|
219
|
+
}>;
|
|
220
|
+
export declare const linkResourceWorkspaceRequestSchema: Schema.Struct<{
|
|
221
|
+
readonly worktreeKey: Schema.brand<Schema.String, "ResourceWorktreeKey">;
|
|
222
|
+
}>;
|
|
223
|
+
export declare const resourceWorkspaceLinkSchema: Schema.Struct<{
|
|
224
|
+
readonly workspaceId: Schema.String;
|
|
225
|
+
readonly worktreeKey: Schema.brand<Schema.String, "ResourceWorktreeKey">;
|
|
226
|
+
/** How many of the workspace's live executors were attached by this call. */
|
|
227
|
+
readonly attachedExecutors: Schema.Int;
|
|
228
|
+
}>;
|
|
229
|
+
export type ResourceWorkspaceLinkWire = typeof resourceWorkspaceLinkSchema.Type;
|
|
230
|
+
declare const ResourceInstanceSpecRefusedError_base: Schema.Class<ResourceInstanceSpecRefusedError, Schema.TaggedStruct<"ResourceInstanceSpecRefusedError", {
|
|
231
|
+
readonly message: Schema.String;
|
|
232
|
+
readonly refusals: Schema.$Array<Schema.Struct<{
|
|
233
|
+
readonly field: Schema.String;
|
|
234
|
+
readonly reason: Schema.String;
|
|
235
|
+
}>>;
|
|
236
|
+
}>, import("effect/Cause").YieldableError>;
|
|
237
|
+
/** The spec asks for what an instance may never have, or is not a spec; nothing was written. */
|
|
238
|
+
export declare class ResourceInstanceSpecRefusedError extends ResourceInstanceSpecRefusedError_base {
|
|
239
|
+
}
|
|
240
|
+
declare const ResourceInstanceNotFoundError_base: Schema.Class<ResourceInstanceNotFoundError, Schema.TaggedStruct<"ResourceInstanceNotFoundError", {
|
|
241
|
+
readonly message: Schema.String;
|
|
242
|
+
}>, import("effect/Cause").YieldableError>;
|
|
243
|
+
export declare class ResourceInstanceNotFoundError extends ResourceInstanceNotFoundError_base {
|
|
244
|
+
}
|
|
245
|
+
declare const ResourceRuntimeUnsupportedError_base: Schema.Class<ResourceRuntimeUnsupportedError, Schema.TaggedStruct<"ResourceRuntimeUnsupportedError", {
|
|
246
|
+
readonly message: Schema.String;
|
|
247
|
+
readonly runtime: Schema.String;
|
|
248
|
+
}>, import("effect/Cause").YieldableError>;
|
|
249
|
+
/** This Sealant's workspace runtime cannot run instances: `resources run on Docker; this Sealant runs <runtime>`. */
|
|
250
|
+
export declare class ResourceRuntimeUnsupportedError extends ResourceRuntimeUnsupportedError_base {
|
|
251
|
+
}
|
|
252
|
+
declare const ResourceInstanceArchivedError_base: Schema.Class<ResourceInstanceArchivedError, Schema.TaggedStruct<"ResourceInstanceArchivedError", {
|
|
253
|
+
readonly message: Schema.String;
|
|
254
|
+
}>, import("effect/Cause").YieldableError>;
|
|
255
|
+
/** The key names an archived instance: it stays archived, and its volumes are kept. */
|
|
256
|
+
export declare class ResourceInstanceArchivedError extends ResourceInstanceArchivedError_base {
|
|
257
|
+
}
|
|
258
|
+
declare const ResourceInstanceAliasTakenError_base: Schema.Class<ResourceInstanceAliasTakenError, Schema.TaggedStruct<"ResourceInstanceAliasTakenError", {
|
|
259
|
+
readonly message: Schema.String;
|
|
260
|
+
}>, import("effect/Cause").YieldableError>;
|
|
261
|
+
/** Another instance that is not archived answers to this alias for the same worktree key. */
|
|
262
|
+
export declare class ResourceInstanceAliasTakenError extends ResourceInstanceAliasTakenError_base {
|
|
263
|
+
}
|
|
264
|
+
declare const ResourceDomainNotActiveError_base: Schema.Class<ResourceDomainNotActiveError, Schema.TaggedStruct<"ResourceDomainNotActiveError", {
|
|
265
|
+
readonly message: Schema.String;
|
|
266
|
+
readonly state: Schema.Literals<readonly ["fenced", "archived"]>;
|
|
267
|
+
}>, import("effect/Cause").YieldableError>;
|
|
268
|
+
/** The domain is fenced or archived and admits no new instance or link. */
|
|
269
|
+
export declare class ResourceDomainNotActiveError extends ResourceDomainNotActiveError_base {
|
|
270
|
+
}
|
|
271
|
+
declare const ResourceWorkspaceNotFoundError_base: Schema.Class<ResourceWorkspaceNotFoundError, Schema.TaggedStruct<"ResourceWorkspaceNotFoundError", {
|
|
272
|
+
readonly message: Schema.String;
|
|
273
|
+
}>, import("effect/Cause").YieldableError>;
|
|
274
|
+
export declare class ResourceWorkspaceNotFoundError extends ResourceWorkspaceNotFoundError_base {
|
|
275
|
+
}
|
|
276
|
+
declare const ResourceWorkspaceLinkedElsewhereError_base: Schema.Class<ResourceWorkspaceLinkedElsewhereError, Schema.TaggedStruct<"ResourceWorkspaceLinkedElsewhereError", {
|
|
277
|
+
readonly message: Schema.String;
|
|
278
|
+
readonly resourceDomainId: Schema.String;
|
|
279
|
+
}>, import("effect/Cause").YieldableError>;
|
|
280
|
+
/** A workspace links to one domain; it is linked to `resourceDomainId`. */
|
|
281
|
+
export declare class ResourceWorkspaceLinkedElsewhereError extends ResourceWorkspaceLinkedElsewhereError_base {
|
|
282
|
+
}
|
|
283
|
+
export declare const ResourceInstancesGroup: HttpApiGroup.HttpApiGroup<"resourceInstances", HttpApiEndpoint.HttpApiEndpoint<"archiveResourceDomain", "POST", "/:resourceDomainId/archive", Schema.toCodecStringTree<Schema.Struct<{
|
|
284
|
+
readonly resourceDomainId: Schema.String;
|
|
285
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
286
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
287
|
+
readonly instanceKey: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
288
|
+
readonly name: Schema.String;
|
|
289
|
+
readonly dockerName: Schema.String;
|
|
290
|
+
/** Measured at archive; null when it could not be. */
|
|
291
|
+
readonly bytes: Schema.NullOr<Schema.Int>;
|
|
292
|
+
}>>;
|
|
293
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceRuntimeUnsupportedError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"archiveResourceInstance", "POST", "/:resourceDomainId/instances/:key/archive", Schema.toCodecStringTree<Schema.Struct<{
|
|
294
|
+
readonly resourceDomainId: Schema.String;
|
|
295
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
296
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
297
|
+
readonly instance: Schema.Struct<{
|
|
298
|
+
readonly resourceInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
299
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
300
|
+
readonly alias: Schema.brand<Schema.String, "ResourceInstanceAlias">;
|
|
301
|
+
readonly worktreeKey: Schema.NullOr<Schema.brand<Schema.String, "ResourceWorktreeKey">>;
|
|
302
|
+
readonly specDigest: Schema.String;
|
|
303
|
+
/** What was asked of it. */
|
|
304
|
+
readonly desired: Schema.Literals<readonly ["running", "stopped", "archived"]>;
|
|
305
|
+
/** Why it is stopped, while `desired` is `stopped`. */
|
|
306
|
+
readonly stopReason: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
307
|
+
readonly kind: Schema.Literal<"idle">;
|
|
308
|
+
}>, Schema.Struct<{
|
|
309
|
+
readonly kind: Schema.Literal<"person">;
|
|
310
|
+
readonly by: Schema.String;
|
|
311
|
+
}>]>>;
|
|
312
|
+
/** What Core last observed, and when. */
|
|
313
|
+
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
314
|
+
readonly kind: Schema.Literal<"not-started">;
|
|
315
|
+
}>, Schema.Struct<{
|
|
316
|
+
readonly kind: Schema.Literal<"starting">;
|
|
317
|
+
readonly since: Schema.String;
|
|
318
|
+
}>, Schema.Struct<{
|
|
319
|
+
readonly kind: Schema.Literal<"running">;
|
|
320
|
+
readonly since: Schema.String;
|
|
321
|
+
}>, Schema.Struct<{
|
|
322
|
+
readonly kind: Schema.Literal<"stopped">;
|
|
323
|
+
readonly at: Schema.String;
|
|
324
|
+
readonly reason: Schema.Union<readonly [Schema.Struct<{
|
|
325
|
+
readonly kind: Schema.Literal<"idle">;
|
|
326
|
+
}>, Schema.Struct<{
|
|
327
|
+
readonly kind: Schema.Literal<"person">;
|
|
328
|
+
readonly by: Schema.String;
|
|
329
|
+
}>]>;
|
|
330
|
+
}>, Schema.Struct<{
|
|
331
|
+
readonly kind: Schema.Literal<"exited">;
|
|
332
|
+
readonly at: Schema.String;
|
|
333
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
334
|
+
}>, Schema.Struct<{
|
|
335
|
+
readonly kind: Schema.Literal<"failed">;
|
|
336
|
+
readonly at: Schema.String;
|
|
337
|
+
readonly message: Schema.String;
|
|
338
|
+
}>, Schema.Struct<{
|
|
339
|
+
readonly kind: Schema.Literal<"archived">;
|
|
340
|
+
readonly at: Schema.String;
|
|
341
|
+
}>]>;
|
|
342
|
+
readonly observedAt: Schema.String;
|
|
343
|
+
readonly startedAt: Schema.NullOr<Schema.String>;
|
|
344
|
+
readonly lastReachedAt: Schema.NullOr<Schema.String>;
|
|
345
|
+
/** The Docker volumes it mounts, which outlive it. */
|
|
346
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
347
|
+
readonly name: Schema.String;
|
|
348
|
+
readonly dockerName: Schema.String;
|
|
349
|
+
}>>;
|
|
350
|
+
}>;
|
|
351
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
352
|
+
readonly instanceKey: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
353
|
+
readonly name: Schema.String;
|
|
354
|
+
readonly dockerName: Schema.String;
|
|
355
|
+
/** Measured at archive; null when it could not be. */
|
|
356
|
+
readonly bytes: Schema.NullOr<Schema.Int>;
|
|
357
|
+
}>>;
|
|
358
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceInstanceNotFoundError | typeof ResourceRuntimeUnsupportedError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getResourceInstance", "GET", "/:resourceDomainId/instances/:key", Schema.toCodecStringTree<Schema.Struct<{
|
|
359
|
+
readonly resourceDomainId: Schema.String;
|
|
360
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
361
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
362
|
+
readonly resourceInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
363
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
364
|
+
readonly alias: Schema.brand<Schema.String, "ResourceInstanceAlias">;
|
|
365
|
+
readonly worktreeKey: Schema.NullOr<Schema.brand<Schema.String, "ResourceWorktreeKey">>;
|
|
366
|
+
readonly specDigest: Schema.String;
|
|
367
|
+
/** What was asked of it. */
|
|
368
|
+
readonly desired: Schema.Literals<readonly ["running", "stopped", "archived"]>;
|
|
369
|
+
/** Why it is stopped, while `desired` is `stopped`. */
|
|
370
|
+
readonly stopReason: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
371
|
+
readonly kind: Schema.Literal<"idle">;
|
|
372
|
+
}>, Schema.Struct<{
|
|
373
|
+
readonly kind: Schema.Literal<"person">;
|
|
374
|
+
readonly by: Schema.String;
|
|
375
|
+
}>]>>;
|
|
376
|
+
/** What Core last observed, and when. */
|
|
377
|
+
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
378
|
+
readonly kind: Schema.Literal<"not-started">;
|
|
379
|
+
}>, Schema.Struct<{
|
|
380
|
+
readonly kind: Schema.Literal<"starting">;
|
|
381
|
+
readonly since: Schema.String;
|
|
382
|
+
}>, Schema.Struct<{
|
|
383
|
+
readonly kind: Schema.Literal<"running">;
|
|
384
|
+
readonly since: Schema.String;
|
|
385
|
+
}>, Schema.Struct<{
|
|
386
|
+
readonly kind: Schema.Literal<"stopped">;
|
|
387
|
+
readonly at: Schema.String;
|
|
388
|
+
readonly reason: Schema.Union<readonly [Schema.Struct<{
|
|
389
|
+
readonly kind: Schema.Literal<"idle">;
|
|
390
|
+
}>, Schema.Struct<{
|
|
391
|
+
readonly kind: Schema.Literal<"person">;
|
|
392
|
+
readonly by: Schema.String;
|
|
393
|
+
}>]>;
|
|
394
|
+
}>, Schema.Struct<{
|
|
395
|
+
readonly kind: Schema.Literal<"exited">;
|
|
396
|
+
readonly at: Schema.String;
|
|
397
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
398
|
+
}>, Schema.Struct<{
|
|
399
|
+
readonly kind: Schema.Literal<"failed">;
|
|
400
|
+
readonly at: Schema.String;
|
|
401
|
+
readonly message: Schema.String;
|
|
402
|
+
}>, Schema.Struct<{
|
|
403
|
+
readonly kind: Schema.Literal<"archived">;
|
|
404
|
+
readonly at: Schema.String;
|
|
405
|
+
}>]>;
|
|
406
|
+
readonly observedAt: Schema.String;
|
|
407
|
+
readonly startedAt: Schema.NullOr<Schema.String>;
|
|
408
|
+
readonly lastReachedAt: Schema.NullOr<Schema.String>;
|
|
409
|
+
/** The Docker volumes it mounts, which outlive it. */
|
|
410
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
411
|
+
readonly name: Schema.String;
|
|
412
|
+
readonly dockerName: Schema.String;
|
|
413
|
+
}>>;
|
|
414
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceInstanceNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"linkResourceWorkspace", "PUT", "/:resourceDomainId/workspace-links/:workspaceId", Schema.toCodecStringTree<Schema.Struct<{
|
|
415
|
+
readonly resourceDomainId: Schema.String;
|
|
416
|
+
readonly workspaceId: Schema.String;
|
|
417
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
418
|
+
readonly worktreeKey: Schema.brand<Schema.String, "ResourceWorktreeKey">;
|
|
419
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
420
|
+
readonly workspaceId: Schema.String;
|
|
421
|
+
readonly worktreeKey: Schema.brand<Schema.String, "ResourceWorktreeKey">;
|
|
422
|
+
/** How many of the workspace's live executors were attached by this call. */
|
|
423
|
+
readonly attachedExecutors: Schema.Int;
|
|
424
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceRuntimeUnsupportedError | typeof ResourceDomainNotActiveError | typeof ResourceWorkspaceNotFoundError | typeof ResourceWorkspaceLinkedElsewhereError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listResourceInstances", "GET", "/:resourceDomainId/instances", Schema.toCodecStringTree<Schema.Struct<{
|
|
425
|
+
readonly resourceDomainId: Schema.String;
|
|
426
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
427
|
+
/** `true`: the archived instances, whose volumes are kept. Otherwise every other one. */
|
|
428
|
+
readonly archived: Schema.optional<Schema.Literals<readonly ["true", "false"]>>;
|
|
429
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
430
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
431
|
+
readonly resourceInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
432
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
433
|
+
readonly alias: Schema.brand<Schema.String, "ResourceInstanceAlias">;
|
|
434
|
+
readonly worktreeKey: Schema.NullOr<Schema.brand<Schema.String, "ResourceWorktreeKey">>;
|
|
435
|
+
readonly specDigest: Schema.String;
|
|
436
|
+
/** What was asked of it. */
|
|
437
|
+
readonly desired: Schema.Literals<readonly ["running", "stopped", "archived"]>;
|
|
438
|
+
/** Why it is stopped, while `desired` is `stopped`. */
|
|
439
|
+
readonly stopReason: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
440
|
+
readonly kind: Schema.Literal<"idle">;
|
|
441
|
+
}>, Schema.Struct<{
|
|
442
|
+
readonly kind: Schema.Literal<"person">;
|
|
443
|
+
readonly by: Schema.String;
|
|
444
|
+
}>]>>;
|
|
445
|
+
/** What Core last observed, and when. */
|
|
446
|
+
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
447
|
+
readonly kind: Schema.Literal<"not-started">;
|
|
448
|
+
}>, Schema.Struct<{
|
|
449
|
+
readonly kind: Schema.Literal<"starting">;
|
|
450
|
+
readonly since: Schema.String;
|
|
451
|
+
}>, Schema.Struct<{
|
|
452
|
+
readonly kind: Schema.Literal<"running">;
|
|
453
|
+
readonly since: Schema.String;
|
|
454
|
+
}>, Schema.Struct<{
|
|
455
|
+
readonly kind: Schema.Literal<"stopped">;
|
|
456
|
+
readonly at: Schema.String;
|
|
457
|
+
readonly reason: Schema.Union<readonly [Schema.Struct<{
|
|
458
|
+
readonly kind: Schema.Literal<"idle">;
|
|
459
|
+
}>, Schema.Struct<{
|
|
460
|
+
readonly kind: Schema.Literal<"person">;
|
|
461
|
+
readonly by: Schema.String;
|
|
462
|
+
}>]>;
|
|
463
|
+
}>, Schema.Struct<{
|
|
464
|
+
readonly kind: Schema.Literal<"exited">;
|
|
465
|
+
readonly at: Schema.String;
|
|
466
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
467
|
+
}>, Schema.Struct<{
|
|
468
|
+
readonly kind: Schema.Literal<"failed">;
|
|
469
|
+
readonly at: Schema.String;
|
|
470
|
+
readonly message: Schema.String;
|
|
471
|
+
}>, Schema.Struct<{
|
|
472
|
+
readonly kind: Schema.Literal<"archived">;
|
|
473
|
+
readonly at: Schema.String;
|
|
474
|
+
}>]>;
|
|
475
|
+
readonly observedAt: Schema.String;
|
|
476
|
+
readonly startedAt: Schema.NullOr<Schema.String>;
|
|
477
|
+
readonly lastReachedAt: Schema.NullOr<Schema.String>;
|
|
478
|
+
/** The Docker volumes it mounts, which outlive it. */
|
|
479
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
480
|
+
readonly name: Schema.String;
|
|
481
|
+
readonly dockerName: Schema.String;
|
|
482
|
+
}>>;
|
|
483
|
+
}>>;
|
|
484
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"stopResourceInstance", "POST", "/:resourceDomainId/instances/:key/stop", Schema.toCodecStringTree<Schema.Struct<{
|
|
485
|
+
readonly resourceDomainId: Schema.String;
|
|
486
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
487
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
488
|
+
/** The application's words for who stopped it (Mend: a display name). */
|
|
489
|
+
readonly by: Schema.String;
|
|
490
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
491
|
+
readonly resourceInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
492
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
493
|
+
readonly alias: Schema.brand<Schema.String, "ResourceInstanceAlias">;
|
|
494
|
+
readonly worktreeKey: Schema.NullOr<Schema.brand<Schema.String, "ResourceWorktreeKey">>;
|
|
495
|
+
readonly specDigest: Schema.String;
|
|
496
|
+
/** What was asked of it. */
|
|
497
|
+
readonly desired: Schema.Literals<readonly ["running", "stopped", "archived"]>;
|
|
498
|
+
/** Why it is stopped, while `desired` is `stopped`. */
|
|
499
|
+
readonly stopReason: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
500
|
+
readonly kind: Schema.Literal<"idle">;
|
|
501
|
+
}>, Schema.Struct<{
|
|
502
|
+
readonly kind: Schema.Literal<"person">;
|
|
503
|
+
readonly by: Schema.String;
|
|
504
|
+
}>]>>;
|
|
505
|
+
/** What Core last observed, and when. */
|
|
506
|
+
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
507
|
+
readonly kind: Schema.Literal<"not-started">;
|
|
508
|
+
}>, Schema.Struct<{
|
|
509
|
+
readonly kind: Schema.Literal<"starting">;
|
|
510
|
+
readonly since: Schema.String;
|
|
511
|
+
}>, Schema.Struct<{
|
|
512
|
+
readonly kind: Schema.Literal<"running">;
|
|
513
|
+
readonly since: Schema.String;
|
|
514
|
+
}>, Schema.Struct<{
|
|
515
|
+
readonly kind: Schema.Literal<"stopped">;
|
|
516
|
+
readonly at: Schema.String;
|
|
517
|
+
readonly reason: Schema.Union<readonly [Schema.Struct<{
|
|
518
|
+
readonly kind: Schema.Literal<"idle">;
|
|
519
|
+
}>, Schema.Struct<{
|
|
520
|
+
readonly kind: Schema.Literal<"person">;
|
|
521
|
+
readonly by: Schema.String;
|
|
522
|
+
}>]>;
|
|
523
|
+
}>, Schema.Struct<{
|
|
524
|
+
readonly kind: Schema.Literal<"exited">;
|
|
525
|
+
readonly at: Schema.String;
|
|
526
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
527
|
+
}>, Schema.Struct<{
|
|
528
|
+
readonly kind: Schema.Literal<"failed">;
|
|
529
|
+
readonly at: Schema.String;
|
|
530
|
+
readonly message: Schema.String;
|
|
531
|
+
}>, Schema.Struct<{
|
|
532
|
+
readonly kind: Schema.Literal<"archived">;
|
|
533
|
+
readonly at: Schema.String;
|
|
534
|
+
}>]>;
|
|
535
|
+
readonly observedAt: Schema.String;
|
|
536
|
+
readonly startedAt: Schema.NullOr<Schema.String>;
|
|
537
|
+
readonly lastReachedAt: Schema.NullOr<Schema.String>;
|
|
538
|
+
/** The Docker volumes it mounts, which outlive it. */
|
|
539
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
540
|
+
readonly name: Schema.String;
|
|
541
|
+
readonly dockerName: Schema.String;
|
|
542
|
+
}>>;
|
|
543
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceInstanceNotFoundError | typeof ResourceRuntimeUnsupportedError | typeof ResourceInstanceArchivedError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"upResourceInstance", "POST", "/:resourceDomainId/instances/:key/up", Schema.toCodecStringTree<Schema.Struct<{
|
|
544
|
+
readonly resourceDomainId: Schema.String;
|
|
545
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
546
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
547
|
+
/**
|
|
548
|
+
* A `ResourceInstanceSpec`, decoded by `decodeResourceInstanceSpec` so a refused field is named
|
|
549
|
+
* with its sentence (`ResourceInstanceSpecRefusedError`).
|
|
550
|
+
*/
|
|
551
|
+
readonly spec: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
552
|
+
/** `use`: a launch or a wake, which leaves a person's stop standing. `person`: a person's Start. */
|
|
553
|
+
readonly cause: Schema.Literals<readonly ["use", "person"]>;
|
|
554
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
555
|
+
readonly resourceInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
556
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
557
|
+
readonly alias: Schema.brand<Schema.String, "ResourceInstanceAlias">;
|
|
558
|
+
readonly worktreeKey: Schema.NullOr<Schema.brand<Schema.String, "ResourceWorktreeKey">>;
|
|
559
|
+
readonly specDigest: Schema.String;
|
|
560
|
+
/** What was asked of it. */
|
|
561
|
+
readonly desired: Schema.Literals<readonly ["running", "stopped", "archived"]>;
|
|
562
|
+
/** Why it is stopped, while `desired` is `stopped`. */
|
|
563
|
+
readonly stopReason: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
|
|
564
|
+
readonly kind: Schema.Literal<"idle">;
|
|
565
|
+
}>, Schema.Struct<{
|
|
566
|
+
readonly kind: Schema.Literal<"person">;
|
|
567
|
+
readonly by: Schema.String;
|
|
568
|
+
}>]>>;
|
|
569
|
+
/** What Core last observed, and when. */
|
|
570
|
+
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
571
|
+
readonly kind: Schema.Literal<"not-started">;
|
|
572
|
+
}>, Schema.Struct<{
|
|
573
|
+
readonly kind: Schema.Literal<"starting">;
|
|
574
|
+
readonly since: Schema.String;
|
|
575
|
+
}>, Schema.Struct<{
|
|
576
|
+
readonly kind: Schema.Literal<"running">;
|
|
577
|
+
readonly since: Schema.String;
|
|
578
|
+
}>, Schema.Struct<{
|
|
579
|
+
readonly kind: Schema.Literal<"stopped">;
|
|
580
|
+
readonly at: Schema.String;
|
|
581
|
+
readonly reason: Schema.Union<readonly [Schema.Struct<{
|
|
582
|
+
readonly kind: Schema.Literal<"idle">;
|
|
583
|
+
}>, Schema.Struct<{
|
|
584
|
+
readonly kind: Schema.Literal<"person">;
|
|
585
|
+
readonly by: Schema.String;
|
|
586
|
+
}>]>;
|
|
587
|
+
}>, Schema.Struct<{
|
|
588
|
+
readonly kind: Schema.Literal<"exited">;
|
|
589
|
+
readonly at: Schema.String;
|
|
590
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
591
|
+
}>, Schema.Struct<{
|
|
592
|
+
readonly kind: Schema.Literal<"failed">;
|
|
593
|
+
readonly at: Schema.String;
|
|
594
|
+
readonly message: Schema.String;
|
|
595
|
+
}>, Schema.Struct<{
|
|
596
|
+
readonly kind: Schema.Literal<"archived">;
|
|
597
|
+
readonly at: Schema.String;
|
|
598
|
+
}>]>;
|
|
599
|
+
readonly observedAt: Schema.String;
|
|
600
|
+
readonly startedAt: Schema.NullOr<Schema.String>;
|
|
601
|
+
readonly lastReachedAt: Schema.NullOr<Schema.String>;
|
|
602
|
+
/** The Docker volumes it mounts, which outlive it. */
|
|
603
|
+
readonly volumes: Schema.$Array<Schema.Struct<{
|
|
604
|
+
readonly name: Schema.String;
|
|
605
|
+
readonly dockerName: Schema.String;
|
|
606
|
+
}>>;
|
|
607
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceInstanceSpecRefusedError | typeof ResourceRuntimeUnsupportedError | typeof ResourceInstanceArchivedError | typeof ResourceInstanceAliasTakenError | typeof ResourceDomainNotActiveError>, never, never>, false>;
|
|
608
|
+
/**
|
|
609
|
+
* The raw exec route, beside the contract: `POST /v1/resource-domains/:id/instances/:key/exec`.
|
|
610
|
+
* Its body is one JSON line (`execFrame`, at most `maxFrameBytes`) and then the command's stdin,
|
|
611
|
+
* raw, to the end of the body. It answers `ResourceInstanceExecResult` as JSON. No header, query or
|
|
612
|
+
* log line carries the argv or stdin, and no run record is written: a secret goes in stdin.
|
|
613
|
+
*/
|
|
614
|
+
export declare const RESOURCE_INSTANCE_EXEC: {
|
|
615
|
+
readonly path: "/v1/resource-domains/:resourceDomainId/instances/:key/exec";
|
|
616
|
+
readonly maxFrameBytes: number;
|
|
617
|
+
readonly defaultTimeoutMs: number;
|
|
618
|
+
readonly maxTimeoutMs: number;
|
|
619
|
+
};
|
|
620
|
+
export declare const resourceInstanceExecFrameSchema: Schema.Struct<{
|
|
621
|
+
readonly argv: Schema.$Array<Schema.String>;
|
|
622
|
+
readonly user: Schema.NullOr<Schema.String>;
|
|
623
|
+
readonly timeoutMs: Schema.Int;
|
|
624
|
+
}>;
|
|
625
|
+
export type ResourceInstanceExecFrame = typeof resourceInstanceExecFrameSchema.Type;
|
|
626
|
+
export declare const resourceInstanceExecResultSchema: Schema.Struct<{
|
|
627
|
+
/** Null when the command was killed at its timeout. */
|
|
628
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
629
|
+
/** The tail of stdout, at most 1 MiB. */
|
|
630
|
+
readonly stdout: Schema.String;
|
|
631
|
+
readonly stderr: Schema.String;
|
|
632
|
+
readonly truncated: Schema.Boolean;
|
|
633
|
+
readonly timedOut: Schema.Boolean;
|
|
634
|
+
}>;
|
|
635
|
+
export type ResourceInstanceExecResult = typeof resourceInstanceExecResultSchema.Type;
|
|
636
|
+
export {};
|