withruntime 1.1.1 → 1.4.58
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/README.md +5 -2
- package/dist/generated/agentSessions.d.ts +2 -2
- package/dist/generated/agentSessions.js +2 -2
- package/dist/generated/agents.d.ts +2 -2
- package/dist/generated/agents.js +1 -1
- package/dist/generated/apps.d.ts +8 -6
- package/dist/generated/apps.js +10 -6
- package/dist/generated/browsers.d.ts +8 -6
- package/dist/generated/browsers.js +10 -6
- package/dist/generated/builds.d.ts +8 -6
- package/dist/generated/builds.js +10 -6
- package/dist/generated/ci.d.ts +106 -6
- package/dist/generated/ci.js +14 -6
- package/dist/generated/containers.d.ts +8 -6
- package/dist/generated/containers.js +10 -6
- package/dist/generated/desktops.d.ts +8 -6
- package/dist/generated/desktops.js +10 -6
- package/dist/generated/dropins/e2b.d.ts +180 -0
- package/dist/generated/dropins/e2b.js +342 -0
- package/dist/generated/dropins/e2b_code_interpreter.d.ts +180 -0
- package/dist/generated/dropins/e2b_code_interpreter.js +342 -0
- package/dist/generated/dropins/modal.d.ts +195 -0
- package/dist/generated/dropins/modal.js +375 -0
- package/dist/generated/dropins/runtime.d.ts +74 -0
- package/dist/generated/dropins/runtime.js +180 -0
- package/dist/generated/dropins/vercel.d.ts +78 -0
- package/dist/generated/dropins/vercel.js +154 -0
- package/dist/generated/egressIps.d.ts +2 -2
- package/dist/generated/egressIps.js +2 -2
- package/dist/generated/functions.d.ts +8 -6
- package/dist/generated/functions.js +10 -6
- package/dist/generated/identities.d.ts +42 -4
- package/dist/generated/identities.js +60 -0
- package/dist/generated/images.d.ts +3 -0
- package/dist/generated/images.js +4 -0
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/jobs.d.ts +2 -2
- package/dist/generated/jobs.js +1 -1
- package/dist/generated/keys.d.ts +28 -0
- package/dist/generated/keys.js +4 -0
- package/dist/generated/notebooks.d.ts +8 -6
- package/dist/generated/notebooks.js +10 -6
- package/dist/generated/ports.d.ts +2 -0
- package/dist/generated/projects.d.ts +49 -7
- package/dist/generated/projects.js +72 -3
- package/dist/generated/roles.d.ts +43 -5
- package/dist/generated/roles.js +61 -0
- package/dist/generated/routes.js +1 -1
- package/dist/generated/runtime.d.ts +49 -3
- package/dist/generated/runtime.js +235 -26
- package/dist/generated/sandboxes.d.ts +33 -14
- package/dist/generated/sandboxes.js +10 -6
- package/dist/generated/sites.d.ts +8 -6
- package/dist/generated/sites.js +10 -6
- package/dist/generated/snapshots.d.ts +7 -2
- package/dist/generated/snapshots.js +6 -2
- package/dist/generated/usage.d.ts +9 -3
- package/dist/generated/volumes.d.ts +30 -11
- package/dist/generated/volumes.js +19 -6
- package/dist/generated/workspaces.d.ts +8 -6
- package/dist/generated/workspaces.js +10 -6
- package/dist/v2/cli.d.ts +29 -0
- package/dist/v2/cli.js +156 -7
- package/dist/v2/login.d.ts +6 -0
- package/dist/v2/login.js +2 -1
- package/dist/v2/mcp.d.ts +5 -0
- package/dist/v2/mcp.js +196 -35
- package/dist/v2/openapi.json +3053 -1772
- package/dist/v2/shims/base.d.ts +0 -3
- package/dist/v2/shims/base.js +2 -7
- package/dist/v2/shims/blaxel.js +2 -1
- package/dist/v2/shims/daytona.js +3 -2
- package/dist/v2/shims/morph.js +3 -1
- package/dist/v2/shims/vercel.js +2 -1
- package/package.json +3 -2
- package/dist/v2/shims/e2b.d.ts +0 -142
- package/dist/v2/shims/e2b.js +0 -238
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type Runtime } from "../index.js";
|
|
2
|
+
import { Process } from "./runtime.js";
|
|
3
|
+
export declare class Command {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(p: Process);
|
|
6
|
+
get exitCode(): number | null;
|
|
7
|
+
stdout(): Promise<string>;
|
|
8
|
+
stderr(): Promise<string>;
|
|
9
|
+
output(): Promise<string>;
|
|
10
|
+
wait(): Promise<this>;
|
|
11
|
+
kill(signal?: string): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export declare class Snapshot {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly snapshotId: string;
|
|
16
|
+
readonly createdAt: string;
|
|
17
|
+
readonly sizeBytes: number;
|
|
18
|
+
constructor(_k: Runtime, v: {
|
|
19
|
+
id?: string;
|
|
20
|
+
snapshotId?: string;
|
|
21
|
+
createdAt?: string;
|
|
22
|
+
sizeBytes?: number;
|
|
23
|
+
});
|
|
24
|
+
static list(): Promise<{
|
|
25
|
+
snapshots: Snapshot[];
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
export declare class Sandbox {
|
|
29
|
+
#private;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
constructor(k: Runtime, name: string);
|
|
32
|
+
private get id();
|
|
33
|
+
static create(o?: {
|
|
34
|
+
timeout?: number;
|
|
35
|
+
resources?: {
|
|
36
|
+
vcpus?: number;
|
|
37
|
+
};
|
|
38
|
+
ports?: number[];
|
|
39
|
+
source?: {
|
|
40
|
+
type?: string;
|
|
41
|
+
snapshotId?: string;
|
|
42
|
+
};
|
|
43
|
+
image?: string;
|
|
44
|
+
[option: string]: unknown;
|
|
45
|
+
}): Promise<Sandbox>;
|
|
46
|
+
static get(o: {
|
|
47
|
+
name: string;
|
|
48
|
+
[option: string]: unknown;
|
|
49
|
+
}): Promise<Sandbox>;
|
|
50
|
+
runCommand(cmdOrParams: string | {
|
|
51
|
+
cmd: string;
|
|
52
|
+
args?: string[];
|
|
53
|
+
cwd?: string;
|
|
54
|
+
env?: Record<string, string>;
|
|
55
|
+
sudo?: boolean;
|
|
56
|
+
detached?: boolean;
|
|
57
|
+
[option: string]: unknown;
|
|
58
|
+
}, args?: string[]): Promise<Command>;
|
|
59
|
+
writeFiles(files: {
|
|
60
|
+
path: string;
|
|
61
|
+
content: Uint8Array | string;
|
|
62
|
+
}[]): Promise<void>;
|
|
63
|
+
readFile(o: {
|
|
64
|
+
path: string;
|
|
65
|
+
[option: string]: unknown;
|
|
66
|
+
}): Promise<ReadableStream<Uint8Array> | null>;
|
|
67
|
+
mkDir(path: string): Promise<void>;
|
|
68
|
+
domain(port: number): Promise<string>;
|
|
69
|
+
stop(): Promise<void>;
|
|
70
|
+
update(o: {
|
|
71
|
+
resources?: {
|
|
72
|
+
vcpus?: number;
|
|
73
|
+
};
|
|
74
|
+
[option: string]: unknown;
|
|
75
|
+
}): Promise<void>;
|
|
76
|
+
delete(): Promise<void>;
|
|
77
|
+
snapshot(): Promise<Snapshot>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// Generated by spec-gen from engines/front/crates/spec. Do not edit:
|
|
2
|
+
// change the spec and run `cargo run -p runtime-front-spec-gen -- write`.
|
|
3
|
+
/* withruntime/vercel: Vercel Sandbox on Runtime. Change the import from "@vercel/sandbox" to "withruntime/vercel"; RUNTIME_API_KEY replaces the OIDC token. A stopped sandbox is paused, and a command wakes it. */
|
|
4
|
+
import { NotFoundError } from "../index.js";
|
|
5
|
+
import { Process, client, portUrl, refuseOthers, registryImage } from "./runtime.js";
|
|
6
|
+
export class Command {
|
|
7
|
+
#p;
|
|
8
|
+
constructor(p) {
|
|
9
|
+
this.#p = p;
|
|
10
|
+
}
|
|
11
|
+
get exitCode() {
|
|
12
|
+
return this.#p.exitCode;
|
|
13
|
+
}
|
|
14
|
+
async stdout() {
|
|
15
|
+
return this.#p.readText("stdout");
|
|
16
|
+
}
|
|
17
|
+
async stderr() {
|
|
18
|
+
return this.#p.readText("stderr");
|
|
19
|
+
}
|
|
20
|
+
async output() {
|
|
21
|
+
return this.#p.readText();
|
|
22
|
+
}
|
|
23
|
+
async wait() {
|
|
24
|
+
await this.#p.wait();
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
async kill(signal) {
|
|
28
|
+
return this.#p.signal(signal);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export class Snapshot {
|
|
32
|
+
id;
|
|
33
|
+
snapshotId;
|
|
34
|
+
createdAt;
|
|
35
|
+
sizeBytes;
|
|
36
|
+
constructor(_k, v) {
|
|
37
|
+
this.id = v.id ?? "";
|
|
38
|
+
this.snapshotId = v.snapshotId ?? "";
|
|
39
|
+
this.createdAt = v.createdAt ?? "";
|
|
40
|
+
this.sizeBytes = v.sizeBytes ?? 0;
|
|
41
|
+
}
|
|
42
|
+
static async list() {
|
|
43
|
+
const k = client();
|
|
44
|
+
const answer = await k.snapshots.list({});
|
|
45
|
+
return { snapshots: answer.items.map((item) => new Snapshot(k, {
|
|
46
|
+
...(item.id !== undefined ? { id: item.id } : {}),
|
|
47
|
+
...(item.id !== undefined ? { snapshotId: item.id } : {}),
|
|
48
|
+
...(item.createdAt !== undefined ? { createdAt: item.createdAt } : {}),
|
|
49
|
+
...(item.sizeBytes !== undefined ? { sizeBytes: item.sizeBytes } : {}),
|
|
50
|
+
})) };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export class Sandbox {
|
|
54
|
+
name;
|
|
55
|
+
#k;
|
|
56
|
+
constructor(k, name) {
|
|
57
|
+
this.name = name;
|
|
58
|
+
this.#k = k;
|
|
59
|
+
}
|
|
60
|
+
get id() {
|
|
61
|
+
return this.name;
|
|
62
|
+
}
|
|
63
|
+
static async create(o = {}) {
|
|
64
|
+
const k = client();
|
|
65
|
+
refuseOthers("vercel", "Sandbox.create", o, ["image", "ports", "resources.vcpus", "source.snapshotId", "source.type", "timeout"]);
|
|
66
|
+
const answer = await k.sandboxes.create({
|
|
67
|
+
...(o.source?.snapshotId !== undefined ? { from: o.source?.snapshotId } : {}),
|
|
68
|
+
...(o.image !== undefined ? { from: await registryImage(k, o.image) } : {}),
|
|
69
|
+
...(o.timeout !== undefined ? { deleteAfterSeconds: Math.ceil(o.timeout / 1000) } : {}),
|
|
70
|
+
...(o.resources?.vcpus !== undefined ? { vcpu: o.resources?.vcpus } : {}),
|
|
71
|
+
});
|
|
72
|
+
for (const each of ["mkdir -p /vercel/sandbox && chown runtime:runtime /vercel/sandbox"])
|
|
73
|
+
await k.sandboxes.exec(answer.id, {
|
|
74
|
+
cmd: each,
|
|
75
|
+
user: "root",
|
|
76
|
+
});
|
|
77
|
+
for (const each of o.ports ?? [])
|
|
78
|
+
await k.previews.create(answer.id, {
|
|
79
|
+
port: each,
|
|
80
|
+
});
|
|
81
|
+
return new Sandbox(k, answer.id);
|
|
82
|
+
}
|
|
83
|
+
static async get(o) {
|
|
84
|
+
const k = client();
|
|
85
|
+
refuseOthers("vercel", "Sandbox.get", o, ["name"]);
|
|
86
|
+
const answer = await k.sandboxes.get(o.name, {});
|
|
87
|
+
return new Sandbox(k, answer.id);
|
|
88
|
+
}
|
|
89
|
+
async runCommand(cmdOrParams, args) {
|
|
90
|
+
refuseOthers("vercel", "Sandbox.runCommand", cmdOrParams, ["args", "cmd", "cwd", "detached", "env", "sudo"]);
|
|
91
|
+
const answer = await this.#k.sandboxes.exec(this.id, {
|
|
92
|
+
cmd: (typeof cmdOrParams === "string" ? [cmdOrParams, ...(args ?? [])] : [cmdOrParams.cmd, ...(cmdOrParams.args ?? [])]),
|
|
93
|
+
cwd: ((p) => (p === undefined ? "/vercel/sandbox" : p.startsWith("/") ? p : `/vercel/sandbox/${p}`))((typeof cmdOrParams === "object" ? cmdOrParams.cwd : undefined)),
|
|
94
|
+
...((typeof cmdOrParams === "object" ? cmdOrParams.env : undefined) !== undefined ? { env: (typeof cmdOrParams === "object" ? cmdOrParams.env : undefined) } : {}),
|
|
95
|
+
...((typeof cmdOrParams === "object" ? cmdOrParams.sudo : undefined) === true ? { user: "root" } : {}),
|
|
96
|
+
wait: false,
|
|
97
|
+
stdinOpen: true,
|
|
98
|
+
});
|
|
99
|
+
const p = new Process(this.#k, this.id, answer.id);
|
|
100
|
+
if ((typeof cmdOrParams === "object" ? cmdOrParams.detached : undefined) !== true)
|
|
101
|
+
await p.wait();
|
|
102
|
+
return new Command(p);
|
|
103
|
+
}
|
|
104
|
+
async writeFiles(files) {
|
|
105
|
+
for (const each of files ?? [])
|
|
106
|
+
await this.#k.sandboxes.write(this.id, each.content, {
|
|
107
|
+
path: ((p) => (p === undefined ? "/vercel/sandbox" : p.startsWith("/") ? p : `/vercel/sandbox/${p}`))(each.path),
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
async readFile(o) {
|
|
111
|
+
refuseOthers("vercel", "Sandbox.readFile", o, ["path"]);
|
|
112
|
+
try {
|
|
113
|
+
const answer = await this.#k.sandboxes.read(this.id, {
|
|
114
|
+
path: ((p) => (p === undefined ? "/vercel/sandbox" : p.startsWith("/") ? p : `/vercel/sandbox/${p}`))(o.path),
|
|
115
|
+
});
|
|
116
|
+
return new ReadableStream({ start: (c) => (c.enqueue(answer), c.close()) });
|
|
117
|
+
}
|
|
118
|
+
catch (e) {
|
|
119
|
+
if (e instanceof NotFoundError)
|
|
120
|
+
return null;
|
|
121
|
+
throw e;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async mkDir(path) {
|
|
125
|
+
await this.#k.sandboxes.mkdir(this.id, {
|
|
126
|
+
path: ((p) => (p === undefined ? "/vercel/sandbox" : p.startsWith("/") ? p : `/vercel/sandbox/${p}`))(path),
|
|
127
|
+
parents: true,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
async domain(port) {
|
|
131
|
+
return portUrl(this.#k, this.id, port);
|
|
132
|
+
}
|
|
133
|
+
async stop() {
|
|
134
|
+
await this.#k.sandboxes.pause(this.id);
|
|
135
|
+
}
|
|
136
|
+
async update(o) {
|
|
137
|
+
refuseOthers("vercel", "Sandbox.update", o, ["resources.vcpus"]);
|
|
138
|
+
await this.#k.sandboxes.update(this.id, {
|
|
139
|
+
...(o.resources?.vcpus !== undefined ? { vcpu: o.resources?.vcpus } : {}),
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
async delete() {
|
|
143
|
+
await this.#k.sandboxes.delete(this.id);
|
|
144
|
+
}
|
|
145
|
+
async snapshot() {
|
|
146
|
+
const answer = await this.#k.sandboxes.snapshot(this.id, {});
|
|
147
|
+
return new Snapshot(this.#k, {
|
|
148
|
+
...(answer.id !== undefined ? { id: answer.id } : {}),
|
|
149
|
+
...(answer.id !== undefined ? { snapshotId: answer.id } : {}),
|
|
150
|
+
...(answer.createdAt !== undefined ? { createdAt: answer.createdAt } : {}),
|
|
151
|
+
...(answer.sizeBytes !== undefined ? { sizeBytes: answer.sizeBytes } : {}),
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -27,10 +27,10 @@ export type EgressIpListQuery = {
|
|
|
27
27
|
/** The most items the page holds. At least 1. At most 200. Default: 50. */
|
|
28
28
|
limit?: number;
|
|
29
29
|
};
|
|
30
|
-
/**
|
|
30
|
+
/** Deprecated: static egress IPs are no longer offered, and the list is always empty. */
|
|
31
31
|
export declare class EgressIps {
|
|
32
32
|
readonly transport: Transport;
|
|
33
33
|
constructor(transport: Transport);
|
|
34
|
-
/**
|
|
34
|
+
/** Deprecated: always answers an empty page, as static egress IPs are no longer offered. */
|
|
35
35
|
list(query?: EgressIpListQuery & RequestOptions, options?: RequestOptions): Paginated<EgressIp>;
|
|
36
36
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Generated by spec-gen from engines/front/crates/spec. Do not edit:
|
|
2
2
|
// change the spec and run `cargo run -p runtime-front-spec-gen -- write`.
|
|
3
3
|
import { Paginated } from "./runtime.js";
|
|
4
|
-
/**
|
|
4
|
+
/** Deprecated: static egress IPs are no longer offered, and the list is always empty. */
|
|
5
5
|
export class EgressIps {
|
|
6
6
|
transport;
|
|
7
7
|
constructor(transport) {
|
|
8
8
|
this.transport = transport;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/** Deprecated: always answers an empty page, as static egress IPs are no longer offered. */
|
|
11
11
|
list(query = {}, options) {
|
|
12
12
|
return new Paginated((cursor) => this.transport.request("GET", `/v2/egress-ips`, { query: { ...query, cursor }, options, idempotent: true }));
|
|
13
13
|
}
|
|
@@ -164,7 +164,7 @@ export declare class FunctionMachineFiles {
|
|
|
164
164
|
beginFolderUpload(path: string, input?: Omit<FolderUploadBegin, "path">, options?: RequestOptions): Promise<FolderUpload>;
|
|
165
165
|
/** Sends the request's bytes, a part of the archive at its offset, into tar's input as they arrive, of any size, and returns the bytes received in all once tar took them. A part past them is refused 409 `upload_incomplete`, naming them: send the parts in order. */
|
|
166
166
|
writeFolderUpload(upload: string, data: Uint8Array | string, query?: FunctionWriteFolderUploadQuery & RequestOptions, options?: RequestOptions): Promise<FolderUploadReceived>;
|
|
167
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
167
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
168
168
|
commitFolderUpload(upload: string, options?: RequestOptions): Promise<FolderUnpacked>;
|
|
169
169
|
/** Stops a folder upload's tar; what it unpacked so far stays. */
|
|
170
170
|
abortFolderUpload(upload: string, options?: RequestOptions): Promise<FolderUploadAborted>;
|
|
@@ -172,7 +172,7 @@ export declare class FunctionMachineFiles {
|
|
|
172
172
|
mkdir(path: string, input?: Omit<FileMkdir, "path">, options?: RequestOptions): Promise<FileMade>;
|
|
173
173
|
/** Moves a file, a link or a directory; refused 409 when something is at its new path, unless overwrite. With sha256 or size, a file written in parts is put in place once whole: its writes ended, then only a file of that size with every byte written and whose bytes hash to it moves; refused 409 `upload_incomplete` or `checksum_mismatch`, nothing moved. With sha256, it is safe to send again: once moved, it returns the same answer while `from` is gone and `to` holds those bytes. */
|
|
174
174
|
rename(input: FileRename, options?: RequestOptions): Promise<FileRenamed>;
|
|
175
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its function. A paused function is woken for it unless wake is false. */
|
|
175
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its function. A paused function is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
176
176
|
link(path: string, input?: Omit<FileLinkCreate, "path">, options?: RequestOptions): Promise<FileLink>;
|
|
177
177
|
/** Ends every file link made for a function so far; links made after work. */
|
|
178
178
|
revokeLinks(options?: RequestOptions): Promise<FileLinksRevoked>;
|
|
@@ -212,7 +212,7 @@ export declare class FunctionMachine {
|
|
|
212
212
|
constructor(client: Functions, info: SandboxInfo);
|
|
213
213
|
/** Its id. */
|
|
214
214
|
get id(): string;
|
|
215
|
-
/** Its vCPUs; its product's default when omitted. At least
|
|
215
|
+
/** Its vCPUs, at least every plan's least (a smaller number is taken as it); its product's default when omitted. At least 2. */
|
|
216
216
|
get vcpu(): number | undefined;
|
|
217
217
|
/** Its memory in GB (1 GB is 1,024 MiB); a fraction is taken to the MiB (`1.5`). Its product's default when omitted. At least 1. */
|
|
218
218
|
get memoryGB(): number | undefined;
|
|
@@ -220,7 +220,7 @@ export declare class FunctionMachine {
|
|
|
220
220
|
get diskGB(): number | undefined;
|
|
221
221
|
/** The image it boots, by name (its newest version), `name:version` or ID; Runtime's default image when omitted. */
|
|
222
222
|
get image(): string | undefined;
|
|
223
|
-
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created.
|
|
223
|
+
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created. An update changes it; a fork or a copy of a snapshot keeps it. At most 64 items. */
|
|
224
224
|
get secrets(): string[] | undefined;
|
|
225
225
|
/** The command it starts at every fresh boot and keeps running, as a service: a web server, a runner, a desktop. A wake with its memory kept does not start it again. Its image's when omitted. */
|
|
226
226
|
get start(): MachineStart | undefined;
|
|
@@ -254,6 +254,8 @@ export declare class FunctionMachine {
|
|
|
254
254
|
get pausedAt(): string | undefined;
|
|
255
255
|
/** A create's answer alone, for a start with a ready check: how its wait went. */
|
|
256
256
|
get ready(): MachineReady | undefined;
|
|
257
|
+
/** For a machine that serves a port of its own (an app, a site or a function on 8080, a container on its image's, a notebook on 8888, a workspace on 8080, a desktop on 6080, a browser's DevTools on 9222): a link that opens it, answered by its create, get and update, none for a key that may not share its ports. It works for 10 minutes; a browser that opens it is given a cookie for that address for a day and sent on to the address without it, so no history keeps a link that still opens it. Another port is shared with previews.create. */
|
|
258
|
+
get url(): string | undefined;
|
|
257
259
|
/** When Runtime deletes it (`deleteAfterSeconds`), finally: it can't be undone, as its delete can't; none: kept until deleted. */
|
|
258
260
|
get deleteAt(): string | undefined;
|
|
259
261
|
/** Whether its delete is refused (409 `delete_protected`) until an update turns this off. */
|
|
@@ -335,7 +337,7 @@ export declare class Functions {
|
|
|
335
337
|
beginFolderUpload(id: string, input: FolderUploadBegin, options?: RequestOptions): Promise<FolderUpload>;
|
|
336
338
|
/** Sends the request's bytes, a part of the archive at its offset, into tar's input as they arrive, of any size, and returns the bytes received in all once tar took them. A part past them is refused 409 `upload_incomplete`, naming them: send the parts in order. */
|
|
337
339
|
writeFolderUpload(id: string, upload: string, data: Uint8Array | string, query?: FunctionWriteFolderUploadQuery & RequestOptions, options?: RequestOptions): Promise<FolderUploadReceived>;
|
|
338
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
340
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
339
341
|
commitFolderUpload(id: string, upload: string, options?: RequestOptions): Promise<FolderUnpacked>;
|
|
340
342
|
/** Stops a folder upload's tar; what it unpacked so far stays. */
|
|
341
343
|
abortFolderUpload(id: string, upload: string, options?: RequestOptions): Promise<FolderUploadAborted>;
|
|
@@ -343,7 +345,7 @@ export declare class Functions {
|
|
|
343
345
|
mkdir(id: string, input: FileMkdir, options?: RequestOptions): Promise<FileMade>;
|
|
344
346
|
/** Moves a file, a link or a directory; refused 409 when something is at its new path, unless overwrite. With sha256 or size, a file written in parts is put in place once whole: its writes ended, then only a file of that size with every byte written and whose bytes hash to it moves; refused 409 `upload_incomplete` or `checksum_mismatch`, nothing moved. With sha256, it is safe to send again: once moved, it returns the same answer while `from` is gone and `to` holds those bytes. */
|
|
345
347
|
rename(id: string, input: FileRename, options?: RequestOptions): Promise<FileRenamed>;
|
|
346
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its function. A paused function is woken for it unless wake is false. */
|
|
348
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its function. A paused function is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
347
349
|
link(id: string, input: FileLinkCreate, options?: RequestOptions): Promise<FileLink>;
|
|
348
350
|
/** Ends every file link made for a function so far; links made after work. */
|
|
349
351
|
revokeLinks(id: string, options?: RequestOptions): Promise<FileLinksRevoked>;
|
|
@@ -45,7 +45,7 @@ export class FunctionMachineFiles {
|
|
|
45
45
|
writeFolderUpload(upload, data, query = {}, options) {
|
|
46
46
|
return this.#c.writeFolderUpload(this.#id, upload, data, query, options);
|
|
47
47
|
}
|
|
48
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
48
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
49
49
|
commitFolderUpload(upload, options) {
|
|
50
50
|
return this.#c.commitFolderUpload(this.#id, upload, options);
|
|
51
51
|
}
|
|
@@ -61,7 +61,7 @@ export class FunctionMachineFiles {
|
|
|
61
61
|
rename(input, options) {
|
|
62
62
|
return this.#c.rename(this.#id, input, options);
|
|
63
63
|
}
|
|
64
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its function. A paused function is woken for it unless wake is false. */
|
|
64
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its function. A paused function is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
65
65
|
link(path, input = {}, options) {
|
|
66
66
|
return this.#c.link(this.#id, { ...input, path: path }, options);
|
|
67
67
|
}
|
|
@@ -135,7 +135,7 @@ export class FunctionMachine {
|
|
|
135
135
|
get id() {
|
|
136
136
|
return this.info.id;
|
|
137
137
|
}
|
|
138
|
-
/** Its vCPUs; its product's default when omitted. At least
|
|
138
|
+
/** Its vCPUs, at least every plan's least (a smaller number is taken as it); its product's default when omitted. At least 2. */
|
|
139
139
|
get vcpu() {
|
|
140
140
|
return this.info.vcpu;
|
|
141
141
|
}
|
|
@@ -151,7 +151,7 @@ export class FunctionMachine {
|
|
|
151
151
|
get image() {
|
|
152
152
|
return this.info.image;
|
|
153
153
|
}
|
|
154
|
-
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created.
|
|
154
|
+
/** The secrets it may get, by name, at most 64: only those of them whose scope admits it; [] none; every one whose scope admits it when omitted. A name with no secret yet takes effect once that secret is created. An update changes it; a fork or a copy of a snapshot keeps it. At most 64 items. */
|
|
155
155
|
get secrets() {
|
|
156
156
|
return this.info.secrets;
|
|
157
157
|
}
|
|
@@ -219,6 +219,10 @@ export class FunctionMachine {
|
|
|
219
219
|
get ready() {
|
|
220
220
|
return this.info.ready;
|
|
221
221
|
}
|
|
222
|
+
/** For a machine that serves a port of its own (an app, a site or a function on 8080, a container on its image's, a notebook on 8888, a workspace on 8080, a desktop on 6080, a browser's DevTools on 9222): a link that opens it, answered by its create, get and update, none for a key that may not share its ports. It works for 10 minutes; a browser that opens it is given a cookie for that address for a day and sent on to the address without it, so no history keeps a link that still opens it. Another port is shared with previews.create. */
|
|
223
|
+
get url() {
|
|
224
|
+
return this.info.url;
|
|
225
|
+
}
|
|
222
226
|
/** When Runtime deletes it (`deleteAfterSeconds`), finally: it can't be undone, as its delete can't; none: kept until deleted. */
|
|
223
227
|
get deleteAt() {
|
|
224
228
|
return this.info.deleteAt;
|
|
@@ -382,7 +386,7 @@ export class Functions {
|
|
|
382
386
|
writeFolderUpload(id, upload, data, query = {}, options) {
|
|
383
387
|
return this.transport.request("PUT", `/v2/functions/${encodeURIComponent(id)}/files/archive/uploads/${encodeURIComponent(upload)}`, { data: toBytes(data), query: { ...query }, options, idempotent: true });
|
|
384
388
|
}
|
|
385
|
-
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said.
|
|
389
|
+
/** Ends a folder upload's input and returns once tar has ended, as an exec returns once its command has: the folder, or 400 `invalid_archive` with what tar said. Sent again, it returns how tar ended. An upload no call has named for 10 minutes since its last part or commit is ended. */
|
|
386
390
|
commitFolderUpload(id, upload, options) {
|
|
387
391
|
return this.transport.request("POST", `/v2/functions/${encodeURIComponent(id)}/files/archive/uploads/${encodeURIComponent(upload)}:commit`, { options, idempotent: true });
|
|
388
392
|
}
|
|
@@ -398,7 +402,7 @@ export class Functions {
|
|
|
398
402
|
rename(id, input, options) {
|
|
399
403
|
return this.transport.request("POST", `/v2/functions/${encodeURIComponent(id)}/files:rename`, { body: input, options });
|
|
400
404
|
}
|
|
401
|
-
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its function. A paused function is woken for it unless wake is false. */
|
|
405
|
+
/** Makes an expiring address for one file that anyone may open with no API key, from a browser, curl or another service: GET downloads it (Range works, so videos play and downloads resume; archive: true downloads a folder as .tar.gz), PUT with the raw body uploads it (up to maxBytes, written whole; Content-Length required). The link acts as the key that made it: an upload link needs write, and the link ends with its key, with revokeLinks or with its function. A paused function is woken for it unless wake is false. A port it serves is shared by a preview (previews.create), not a link. */
|
|
402
406
|
link(id, input, options) {
|
|
403
407
|
return this.transport.request("POST", `/v2/functions/${encodeURIComponent(id)}/files:link`, { body: input, options });
|
|
404
408
|
}
|
|
@@ -2,7 +2,7 @@ import type { RequestOptions, Transport } from "./runtime.js";
|
|
|
2
2
|
import { Paginated } from "./runtime.js";
|
|
3
3
|
import type { Rename } from "./projects.js";
|
|
4
4
|
/** An agent or CI pipeline: who a key acts as, besides a person. */
|
|
5
|
-
export interface
|
|
5
|
+
export interface IdentityInfo {
|
|
6
6
|
/** Its ID, a key's `agentId`. */
|
|
7
7
|
id: string;
|
|
8
8
|
/** Always `identity`. */
|
|
@@ -23,14 +23,52 @@ export type IdentityListQuery = {
|
|
|
23
23
|
/** The most items the page holds. At least 1. At most 200. Default: 50. */
|
|
24
24
|
limit?: number;
|
|
25
25
|
};
|
|
26
|
+
/** What get takes in its query. */
|
|
27
|
+
export type IdentityGetQuery = {
|
|
28
|
+
/** Seconds to wait, at most 60, for its state to differ from `ifState`; it answers once it does, or as it is when the wait ends. At least 0. At most 60. */
|
|
29
|
+
wait?: number;
|
|
30
|
+
/** The state the caller last read, which `wait` waits for it to leave. */
|
|
31
|
+
ifState?: string;
|
|
32
|
+
};
|
|
33
|
+
/** One of identities: An agent or CI pipeline: who a key acts as besides a person, holding grants of its own. */
|
|
34
|
+
export declare class Identity {
|
|
35
|
+
#private;
|
|
36
|
+
/** What it was when last read. */
|
|
37
|
+
info: IdentityInfo;
|
|
38
|
+
constructor(client: Identities, info: IdentityInfo);
|
|
39
|
+
/** Its id. */
|
|
40
|
+
get id(): string;
|
|
41
|
+
/** Always `identity`. */
|
|
42
|
+
get object(): "identity" | (string & {});
|
|
43
|
+
/** `agent` or `ci`. */
|
|
44
|
+
get kind(): "agent" | "ci" | (string & {});
|
|
45
|
+
/** Its name, unique in the organization for its kind. */
|
|
46
|
+
get name(): string;
|
|
47
|
+
/** When it was made. */
|
|
48
|
+
get createdAt(): string;
|
|
49
|
+
/** `active`; `deleted` once deleted: a delete's answer. */
|
|
50
|
+
get state(): "active" | "deleted" | (string & {});
|
|
51
|
+
/** When it was deleted: a delete's answer, its state `deleted`. */
|
|
52
|
+
get deletedAt(): string | undefined;
|
|
53
|
+
/** Returns one by its ID. Another organization's, one deleted, or one past the key's reach returns 404. */
|
|
54
|
+
refresh(query?: IdentityGetQuery & RequestOptions, options?: RequestOptions): Promise<this>;
|
|
55
|
+
/** Renames an agent or CI pipeline; its keys and grants stay as they are. A name another of its kind has returns 409. */
|
|
56
|
+
update(name: string, input?: Omit<Rename, "name">, options?: RequestOptions): Promise<this>;
|
|
57
|
+
/** Deletes an agent or CI pipeline and frees its name, with its grants and keys: refused from their next call. The caller needs `grants:delete` as well, as the grants go with it. What it made stays. Deleted again, it returns 404. */
|
|
58
|
+
delete(options?: RequestOptions): Promise<IdentityInfo>;
|
|
59
|
+
/** Deletes it when the `await using` block that holds it ends. */
|
|
60
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
61
|
+
}
|
|
26
62
|
/** An agent or CI pipeline: who a key acts as besides a person, holding grants of its own. */
|
|
27
63
|
export declare class Identities {
|
|
28
64
|
readonly transport: Transport;
|
|
29
65
|
constructor(transport: Transport);
|
|
30
66
|
/** Lists the organization's agents and CI pipelines, by name. */
|
|
31
|
-
list(query?: IdentityListQuery & RequestOptions, options?: RequestOptions): Paginated<
|
|
67
|
+
list(query?: IdentityListQuery & RequestOptions, options?: RequestOptions): Paginated<IdentityInfo>;
|
|
68
|
+
/** Returns one by its ID. Another organization's, one deleted, or one past the key's reach returns 404. */
|
|
69
|
+
get(id: string, query?: IdentityGetQuery & RequestOptions, options?: RequestOptions): Promise<Identity>;
|
|
32
70
|
/** Renames an agent or CI pipeline; its keys and grants stay as they are. A name another of its kind has returns 409. */
|
|
33
|
-
update(id: string, input: Rename, options?: RequestOptions): Promise<
|
|
71
|
+
update(id: string, input: Rename, options?: RequestOptions): Promise<IdentityInfo>;
|
|
34
72
|
/** Deletes an agent or CI pipeline and frees its name, with its grants and keys: refused from their next call. The caller needs `grants:delete` as well, as the grants go with it. What it made stays. Deleted again, it returns 404. */
|
|
35
|
-
delete(id: string, options?: RequestOptions): Promise<
|
|
73
|
+
delete(id: string, options?: RequestOptions): Promise<IdentityInfo>;
|
|
36
74
|
}
|
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
// Generated by spec-gen from engines/front/crates/spec. Do not edit:
|
|
2
2
|
// change the spec and run `cargo run -p runtime-front-spec-gen -- write`.
|
|
3
3
|
import { Paginated } from "./runtime.js";
|
|
4
|
+
/** One of identities: An agent or CI pipeline: who a key acts as besides a person, holding grants of its own. */
|
|
5
|
+
export class Identity {
|
|
6
|
+
#c;
|
|
7
|
+
/** What it was when last read. */
|
|
8
|
+
info;
|
|
9
|
+
constructor(client, info) {
|
|
10
|
+
this.#c = client;
|
|
11
|
+
this.info = info;
|
|
12
|
+
}
|
|
13
|
+
/** Its id. */
|
|
14
|
+
get id() {
|
|
15
|
+
return this.info.id;
|
|
16
|
+
}
|
|
17
|
+
/** Always `identity`. */
|
|
18
|
+
get object() {
|
|
19
|
+
return this.info.object;
|
|
20
|
+
}
|
|
21
|
+
/** `agent` or `ci`. */
|
|
22
|
+
get kind() {
|
|
23
|
+
return this.info.kind;
|
|
24
|
+
}
|
|
25
|
+
/** Its name, unique in the organization for its kind. */
|
|
26
|
+
get name() {
|
|
27
|
+
return this.info.name;
|
|
28
|
+
}
|
|
29
|
+
/** When it was made. */
|
|
30
|
+
get createdAt() {
|
|
31
|
+
return this.info.createdAt;
|
|
32
|
+
}
|
|
33
|
+
/** `active`; `deleted` once deleted: a delete's answer. */
|
|
34
|
+
get state() {
|
|
35
|
+
return this.info.state;
|
|
36
|
+
}
|
|
37
|
+
/** When it was deleted: a delete's answer, its state `deleted`. */
|
|
38
|
+
get deletedAt() {
|
|
39
|
+
return this.info.deletedAt;
|
|
40
|
+
}
|
|
41
|
+
/** Returns one by its ID. Another organization's, one deleted, or one past the key's reach returns 404. */
|
|
42
|
+
async refresh(query = {}, options) {
|
|
43
|
+
this.info = (await this.#c.get(this.id, query, options)).info;
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
/** Renames an agent or CI pipeline; its keys and grants stay as they are. A name another of its kind has returns 409. */
|
|
47
|
+
async update(name, input = {}, options) {
|
|
48
|
+
this.info = await this.#c.update(this.id, { ...input, name: name }, options);
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
/** Deletes an agent or CI pipeline and frees its name, with its grants and keys: refused from their next call. The caller needs `grants:delete` as well, as the grants go with it. What it made stays. Deleted again, it returns 404. */
|
|
52
|
+
delete(options) {
|
|
53
|
+
return this.#c.delete(this.id, options);
|
|
54
|
+
}
|
|
55
|
+
/** Deletes it when the `await using` block that holds it ends. */
|
|
56
|
+
async [Symbol.asyncDispose]() {
|
|
57
|
+
await this.delete();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
4
60
|
/** An agent or CI pipeline: who a key acts as besides a person, holding grants of its own. */
|
|
5
61
|
export class Identities {
|
|
6
62
|
transport;
|
|
@@ -11,6 +67,10 @@ export class Identities {
|
|
|
11
67
|
list(query = {}, options) {
|
|
12
68
|
return new Paginated((cursor) => this.transport.request("GET", `/v2/identities`, { query: { ...query, cursor }, options, idempotent: true }));
|
|
13
69
|
}
|
|
70
|
+
/** Returns one by its ID. Another organization's, one deleted, or one past the key's reach returns 404. */
|
|
71
|
+
async get(id, query = {}, options) {
|
|
72
|
+
return new Identity(this, await this.transport.request("GET", `/v2/identities/${encodeURIComponent(id)}`, { query: { ...query }, options, idempotent: true }));
|
|
73
|
+
}
|
|
14
74
|
/** Renames an agent or CI pipeline; its keys and grants stay as they are. A name another of its kind has returns 409. */
|
|
15
75
|
update(id, input, options) {
|
|
16
76
|
return this.transport.request("POST", `/v2/identities/${encodeURIComponent(id)}:update`, { body: input, options, idempotent: true });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RequestOptions, ClientOptions } from "./runtime.js";
|
|
2
2
|
import { Paginated, Transport } from "./runtime.js";
|
|
3
|
+
import type { SnapshotSchedule } from "./sandboxes.js";
|
|
3
4
|
import type { Stored } from "./sandboxes.js";
|
|
4
5
|
import type { MachineStart } from "./sandboxes.js";
|
|
5
6
|
import type { StoredUpdate } from "./snapshots.js";
|
|
@@ -218,6 +219,8 @@ export declare class Image {
|
|
|
218
219
|
get deleteWaitsFor(): string | undefined;
|
|
219
220
|
/** Whether its delete is refused (409 `delete_protected`) until an update turns this off. */
|
|
220
221
|
get deleteProtection(): boolean | undefined;
|
|
222
|
+
/** A volume's snapshot schedule; none: off. */
|
|
223
|
+
get snapshotSchedule(): SnapshotSchedule | undefined;
|
|
221
224
|
/** Makes one and returns it, as `new Runtime().images.create()` does, with a client of its own: `RUNTIME_API_KEY`, or the key `options` names. */
|
|
222
225
|
static create(input?: ImageCreate, options?: ClientOptions & RequestOptions): Promise<Image>;
|
|
223
226
|
/** Returns an image, by its ID, its name (its newest version) or one of its tags (`name:tag`). */
|
package/dist/generated/images.js
CHANGED
|
@@ -78,6 +78,10 @@ export class Image {
|
|
|
78
78
|
get deleteProtection() {
|
|
79
79
|
return this.info.deleteProtection;
|
|
80
80
|
}
|
|
81
|
+
/** A volume's snapshot schedule; none: off. */
|
|
82
|
+
get snapshotSchedule() {
|
|
83
|
+
return this.info.snapshotSchedule;
|
|
84
|
+
}
|
|
81
85
|
/** Makes one and returns it, as `new Runtime().images.create()` does, with a client of its own: `RUNTIME_API_KEY`, or the key `options` names. */
|
|
82
86
|
static async create(input = {}, options = {}) {
|
|
83
87
|
return new Images(new Transport(options)).create(input, options);
|
|
@@ -80,7 +80,7 @@ export * from "./feedback.js";
|
|
|
80
80
|
export * from "./routes.js";
|
|
81
81
|
/** What run takes. */
|
|
82
82
|
export interface RunArgs {
|
|
83
|
-
/** The command: text is run by `bash -lc
|
|
83
|
+
/** The command: text is run by `bash -lc` (`sh -lc` in an image without bash); a list is the program and its arguments, run without a shell. */
|
|
84
84
|
cmd: string | string[];
|
|
85
85
|
/** The image it boots, by name or ID; Runtime's default image when omitted. */
|
|
86
86
|
image?: string;
|
package/dist/generated/jobs.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export interface JobSettings {
|
|
|
35
35
|
retry?: JobRetry;
|
|
36
36
|
/** Which of its org's secrets each run gets; every one whose scope admits it when omitted. */
|
|
37
37
|
secrets?: JobSecrets;
|
|
38
|
-
/** Each run's vCPUs; a job's default (
|
|
38
|
+
/** Each run's vCPUs, at least every plan's least (a smaller number is taken as it); a job's default (2) when omitted. At least 2. */
|
|
39
39
|
vcpu?: number;
|
|
40
40
|
/** Each run's memory in GB (1 GB is 1,024 MiB); a fraction is taken to the MiB (`0.5`). A job's default (1) when omitted. At least 1. */
|
|
41
41
|
memoryGB?: number;
|
|
@@ -121,7 +121,7 @@ export declare class Job {
|
|
|
121
121
|
get retry(): JobRetry | undefined;
|
|
122
122
|
/** Which of its org's secrets each run gets; every one whose scope admits it when omitted. */
|
|
123
123
|
get secrets(): JobSecrets | undefined;
|
|
124
|
-
/** Each run's vCPUs; a job's default (
|
|
124
|
+
/** Each run's vCPUs, at least every plan's least (a smaller number is taken as it); a job's default (2) when omitted. At least 2. */
|
|
125
125
|
get vcpu(): number | undefined;
|
|
126
126
|
/** Each run's memory in GB (1 GB is 1,024 MiB); a fraction is taken to the MiB (`0.5`). A job's default (1) when omitted. At least 1. */
|
|
127
127
|
get memoryGB(): number | undefined;
|
package/dist/generated/jobs.js
CHANGED
|
@@ -26,7 +26,7 @@ export class Job {
|
|
|
26
26
|
get secrets() {
|
|
27
27
|
return this.info.secrets;
|
|
28
28
|
}
|
|
29
|
-
/** Each run's vCPUs; a job's default (
|
|
29
|
+
/** Each run's vCPUs, at least every plan's least (a smaller number is taken as it); a job's default (2) when omitted. At least 2. */
|
|
30
30
|
get vcpu() {
|
|
31
31
|
return this.info.vcpu;
|
|
32
32
|
}
|