withruntime 0.21.0 → 0.33.0
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/COMPATIBILITY.md +64 -3
- package/E2B.md +1 -1
- package/README.md +36 -2
- package/README.src.md +35 -1
- package/compatibility-lock.json +3 -3
- package/dist/agents/browser.d.ts +12 -0
- package/dist/agents/browser.js +12 -0
- package/dist/agents/index.d.ts +7 -7
- package/dist/agents/index.js +7 -8
- package/dist/agents-cli.d.ts +1 -1
- package/dist/agents-cli.js +250 -3
- package/dist/agents-deploy.d.ts +186 -0
- package/dist/agents-deploy.js +752 -0
- package/dist/agents-file.d.ts +19 -0
- package/dist/agents-file.js +135 -0
- package/dist/apps/index.d.ts +10 -0
- package/dist/apps/index.js +11 -0
- package/dist/apps-cli.d.ts +3 -1
- package/dist/apps-cli.js +285 -38
- package/dist/blaxel/errors.js +2 -1
- package/dist/ci/index.d.ts +10 -0
- package/dist/ci/index.js +11 -0
- package/dist/ci-cli.d.ts +10 -0
- package/dist/ci-cli.js +343 -0
- package/dist/cli.d.ts +18 -7
- package/dist/cli.js +862 -99
- package/dist/daytona/errors.js +2 -1
- package/dist/e2b/errors.js +2 -1
- package/dist/e2b/filesystem.d.ts +1 -0
- package/dist/e2b/filesystem.js +1 -1
- package/dist/e2b/sandbox.d.ts +11 -2
- package/dist/e2b/sandbox.js +22 -6
- package/dist/errors.d.ts +11 -4
- package/dist/errors.js +27 -4
- package/dist/fly/index.d.ts +102 -0
- package/dist/fly/index.js +930 -0
- package/dist/index.d.ts +7 -3
- package/dist/keys.d.ts +6 -0
- package/dist/keys.js +10 -1
- package/dist/machine.d.ts +10 -6
- package/dist/machine.js +14 -6
- package/dist/modal/index.d.ts +34 -0
- package/dist/modal/index.js +128 -22
- package/dist/product-names.js +7 -0
- package/dist/products/agents.d.ts +101 -3
- package/dist/products/agents.js +49 -0
- package/dist/products/apps.d.ts +206 -10
- package/dist/products/apps.js +172 -1
- package/dist/products/ci.d.ts +332 -0
- package/dist/products/ci.js +101 -0
- package/dist/products/index.d.ts +8 -0
- package/dist/products/index.js +15 -0
- package/dist/products/jobs.d.ts +105 -5
- package/dist/products/jobs.js +47 -3
- package/dist/products/network.d.ts +13 -0
- package/dist/products/observability.d.ts +1 -1
- package/dist/products/plans.d.ts +131 -0
- package/dist/products/plans.js +24 -0
- package/dist/products/reservations.d.ts +108 -0
- package/dist/products/reservations.js +41 -0
- package/dist/products/resources.d.ts +2 -1
- package/dist/products/secrets.d.ts +109 -6
- package/dist/products/secrets.js +38 -2
- package/dist/proxy.d.ts +3 -3
- package/dist/proxy.js +20 -0
- package/dist/sandbox.d.ts +29 -1
- package/dist/sandbox.js +56 -3
- package/dist/snapshots.d.ts +1 -1
- package/dist/switched-off.d.ts +5 -0
- package/dist/switched-off.js +8 -0
- package/dist/tar.d.ts +1 -1
- package/dist/tar.js +19 -1
- package/dist/transport.d.ts +1 -1
- package/dist/transport.js +48 -9
- package/dist/types.d.ts +35 -4
- package/dist/vercel/errors.d.ts +1 -1
- package/dist/vercel/errors.js +2 -1
- package/dist/vercel/snapshot.js +4 -2
- package/package.json +23 -6
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AgentsSource } from "./agents-deploy.js";
|
|
2
|
+
export declare const AGENTS_FILE = "runtime.yml";
|
|
3
|
+
/** Reads a runtime.yml for `agents().deploy`. YAML mistakes are
|
|
4
|
+
* refused here with their line; the agents' fields are checked by deploy. */
|
|
5
|
+
export declare function loadAgentsFile(path?: string): AgentsSource;
|
|
6
|
+
/** The largest runtime.yml read: 256 KiB. */
|
|
7
|
+
export declare const AGENTS_FILE_MAX_BYTES: number;
|
|
8
|
+
/** runtime.yml's text, parsed. `folder` is where `instructionsFile` is read
|
|
9
|
+
* from; without it, instructionsFile is refused. At most 256 KiB, and no
|
|
10
|
+
* anchors or aliases: a document of aliases of aliases ("billion laughs")
|
|
11
|
+
* would grow past every cap once expanded, so none is expanded at all. */
|
|
12
|
+
export declare function parseAgentsFile(text: string, file?: string, folder?: string): AgentsSource;
|
|
13
|
+
/** A starter `agents:` section for `runtime agents init`. */
|
|
14
|
+
export declare function starterAgents(options: {
|
|
15
|
+
name: string;
|
|
16
|
+
template: string;
|
|
17
|
+
use?: "support" | "team";
|
|
18
|
+
instructionsFile?: string;
|
|
19
|
+
}): string;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/* runtime.yml on disk: read, parsed as YAML, with the line of each field for
|
|
2
|
+
messages and a reader for `instructionsFile` that stays inside the file's
|
|
3
|
+
folder. Node and Bun only (a browser gets agents/browser.ts, which leaves
|
|
4
|
+
it out, and the browser field maps it to a stub); the
|
|
5
|
+
check and the plan are agents-deploy.ts's. */
|
|
6
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
7
|
+
import { dirname, relative, resolve, sep } from "node:path";
|
|
8
|
+
import { isMap, isNode, isScalar, isSeq, LineCounter, parseDocument, visit } from "yaml";
|
|
9
|
+
import { RuntimeError } from "./errors.js";
|
|
10
|
+
import { AGENT_USES, agentTemplate } from "./products/agents.js";
|
|
11
|
+
export const AGENTS_FILE = "runtime.yml";
|
|
12
|
+
/** Reads a runtime.yml for `agents().deploy`. YAML mistakes are
|
|
13
|
+
* refused here with their line; the agents' fields are checked by deploy. */
|
|
14
|
+
export function loadAgentsFile(path = AGENTS_FILE) {
|
|
15
|
+
const full = resolve(path);
|
|
16
|
+
if (!existsSync(full))
|
|
17
|
+
throw new RuntimeError({
|
|
18
|
+
message: `${path} is not there.`,
|
|
19
|
+
code: "invalid_file",
|
|
20
|
+
status: 0,
|
|
21
|
+
hint: "Write one with `runtime agents init --template claude-code`, or pass --file.",
|
|
22
|
+
details: { file: path },
|
|
23
|
+
});
|
|
24
|
+
// Its size before a byte is read: a runtime.yml is a few KiB.
|
|
25
|
+
if (statSync(full).size > AGENTS_FILE_MAX_BYTES)
|
|
26
|
+
throw tooBig(path);
|
|
27
|
+
return parseAgentsFile(readFileSync(full, "utf8"), path, dirname(full));
|
|
28
|
+
}
|
|
29
|
+
/** The largest runtime.yml read: 256 KiB. */
|
|
30
|
+
export const AGENTS_FILE_MAX_BYTES = 256 * 1024;
|
|
31
|
+
const tooBig = (file) => new RuntimeError({
|
|
32
|
+
message: `${file} is over 256 KiB; a runtime.yml is a few KiB.`,
|
|
33
|
+
code: "invalid_file",
|
|
34
|
+
status: 0,
|
|
35
|
+
hint: "Keep long instructions in a file of their own and name it in instructionsFile.",
|
|
36
|
+
details: { file },
|
|
37
|
+
});
|
|
38
|
+
const refused = (file, message, hint) => new RuntimeError({ message, code: "invalid_file", status: 0, hint, details: { file } });
|
|
39
|
+
/** runtime.yml's text, parsed. `folder` is where `instructionsFile` is read
|
|
40
|
+
* from; without it, instructionsFile is refused. At most 256 KiB, and no
|
|
41
|
+
* anchors or aliases: a document of aliases of aliases ("billion laughs")
|
|
42
|
+
* would grow past every cap once expanded, so none is expanded at all. */
|
|
43
|
+
export function parseAgentsFile(text, file = AGENTS_FILE, folder) {
|
|
44
|
+
if (text.length > AGENTS_FILE_MAX_BYTES || Buffer.byteLength(text) > AGENTS_FILE_MAX_BYTES)
|
|
45
|
+
throw tooBig(file);
|
|
46
|
+
const lines = new LineCounter();
|
|
47
|
+
const doc = parseDocument(text, { lineCounter: lines, prettyErrors: true, uniqueKeys: true });
|
|
48
|
+
if (doc.errors.length)
|
|
49
|
+
throw refused(file, doc.errors
|
|
50
|
+
.map((e) => {
|
|
51
|
+
const at = e.linePos?.[0];
|
|
52
|
+
const said = e.message.split("\n")[0].replace(/ at line \d+, column \d+:?$/, "");
|
|
53
|
+
return `${file}${at ? `:${at.line}:${at.col}` : ""}: ${said}`;
|
|
54
|
+
})
|
|
55
|
+
.join("\n"), "runtime.yml is YAML; fix the line named and run it again. Nothing was changed.");
|
|
56
|
+
// Parsing keeps an alias as a node; only toJS would expand it.
|
|
57
|
+
let alias;
|
|
58
|
+
visit(doc, {
|
|
59
|
+
Alias(_, node) {
|
|
60
|
+
alias = node.range ? lines.linePos(node.range[0]).line : 0;
|
|
61
|
+
return visit.BREAK;
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
if (alias !== undefined)
|
|
65
|
+
throw refused(file, `${file}${alias ? `:${alias}` : ""}: anchors and aliases (&name, *name) are not taken in runtime.yml.`, "Write each value out where it is used. Nothing was changed.");
|
|
66
|
+
const config = doc.toJS({ maxAliasCount: 0 });
|
|
67
|
+
// The line of the deepest key the path reaches: a field's own, or for a
|
|
68
|
+
// missing one, its agent's name.
|
|
69
|
+
const line = (path) => {
|
|
70
|
+
let node = doc.contents;
|
|
71
|
+
let found;
|
|
72
|
+
const at = (n) => isNode(n) && n.range ? (found = lines.linePos(n.range[0]).line) : undefined;
|
|
73
|
+
for (const part of path) {
|
|
74
|
+
if (isMap(node)) {
|
|
75
|
+
const pair = node.items.find((p) => (isScalar(p.key) ? p.key.value : p.key) === part);
|
|
76
|
+
if (!pair)
|
|
77
|
+
break;
|
|
78
|
+
at(pair.key);
|
|
79
|
+
node = pair.value;
|
|
80
|
+
}
|
|
81
|
+
else if (isSeq(node) && typeof part === "number" && node.items[part] !== undefined) {
|
|
82
|
+
node = node.items[part];
|
|
83
|
+
at(node);
|
|
84
|
+
}
|
|
85
|
+
else
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
return found;
|
|
89
|
+
};
|
|
90
|
+
return {
|
|
91
|
+
file,
|
|
92
|
+
config,
|
|
93
|
+
line,
|
|
94
|
+
...(folder === undefined ? {} : { readFile: (name) => readInside(folder, name) }),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** A file inside `folder`, never outside it, through a link included. */
|
|
98
|
+
function readInside(folder, name) {
|
|
99
|
+
const root = realpathSync(folder);
|
|
100
|
+
const target = realpathSync(resolve(root, name));
|
|
101
|
+
const rel = relative(root, target);
|
|
102
|
+
if (rel === "" || rel.startsWith(`..${sep}`) || rel === ".." || resolve(rel) === rel)
|
|
103
|
+
throw new Error(`${name} is outside ${folder}`);
|
|
104
|
+
return readFileSync(target, "utf8");
|
|
105
|
+
}
|
|
106
|
+
/** A starter `agents:` section for `runtime agents init`. */
|
|
107
|
+
export function starterAgents(options) {
|
|
108
|
+
const t = agentTemplate(options.template);
|
|
109
|
+
const words = options.instructionsFile
|
|
110
|
+
? ` instructionsFile: ${options.instructionsFile}${pad(options.instructionsFile.length + 18)}# its instructions, read from the repo`
|
|
111
|
+
: ` instructions: |\n You work on this repository. Say what you changed and why.`;
|
|
112
|
+
const use = options.use
|
|
113
|
+
? ` use: ${options.use}${pad(options.use.length + 5)}# ${AGENT_USES[options.use].title.toLowerCase()}: its size and bounds`
|
|
114
|
+
: ` # use: team # or support: a size and bounds for that use`;
|
|
115
|
+
return [
|
|
116
|
+
"# Runtime Agents. `runtime agents deploy` makes your account's agents match",
|
|
117
|
+
"# this section; `runtime agents deploy --dry-run` shows what it would change.",
|
|
118
|
+
"agents:",
|
|
119
|
+
` ${options.name}:`,
|
|
120
|
+
` template: ${options.template}${pad(options.template.length + 10)}# ${t.title}: its command, and its model key's secret`,
|
|
121
|
+
words,
|
|
122
|
+
use,
|
|
123
|
+
" # vcpu: 4 # the default size: 4 vCPU, 8 GiB",
|
|
124
|
+
" # memoryMiB: 8192",
|
|
125
|
+
" # maxSessionDollars: 5 # the default budgets: a session stops at $5,",
|
|
126
|
+
" # maxDayDollars: 100 # and the agent starts nothing new past $100 a day",
|
|
127
|
+
" # triggers:",
|
|
128
|
+
" # - kind: schedule",
|
|
129
|
+
' # config: { cron: "0 9 * * 1-5", input: "Triage the new issues." }',
|
|
130
|
+
`# Its model key, stored once as an egress secret the sandbox never sees:`,
|
|
131
|
+
`# printf %s "$${t.apiKeySecret}" | runtime secrets set ${t.apiKeySecret} --host ${t.apiKeyHost}`,
|
|
132
|
+
"",
|
|
133
|
+
].join("\n");
|
|
134
|
+
}
|
|
135
|
+
const pad = (used) => " ".repeat(Math.max(1, 29 - used));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** `withruntime/apps`: Apps alone. An image served on copies that wake on a
|
|
2
|
+
* request and freeze when quiet. In a private beta.
|
|
3
|
+
*
|
|
4
|
+
* import { apps } from "withruntime/apps";
|
|
5
|
+
* const client = apps(); // RUNTIME_API_KEY, or this machine's saved connection
|
|
6
|
+
*/
|
|
7
|
+
import { Runtime, type RuntimeOptions } from "../client.js";
|
|
8
|
+
export type * from "../products/apps.js";
|
|
9
|
+
/** `runtime.apps` of a client made with `options`. */
|
|
10
|
+
export declare function apps(options?: RuntimeOptions): Runtime["apps"];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** `withruntime/apps`: Apps alone. An image served on copies that wake on a
|
|
2
|
+
* request and freeze when quiet. In a private beta.
|
|
3
|
+
*
|
|
4
|
+
* import { apps } from "withruntime/apps";
|
|
5
|
+
* const client = apps(); // RUNTIME_API_KEY, or this machine's saved connection
|
|
6
|
+
*/
|
|
7
|
+
import { Runtime } from "../client.js";
|
|
8
|
+
/** `runtime.apps` of a client made with `options`. */
|
|
9
|
+
export function apps(options) {
|
|
10
|
+
return new Runtime(options).apps;
|
|
11
|
+
}
|
package/dist/apps-cli.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ type Out = {
|
|
|
5
5
|
write: (text: string) => void;
|
|
6
6
|
error: (text: string) => void;
|
|
7
7
|
};
|
|
8
|
-
export declare const APP_HELP = "runtime apps <command>\n\n An App serves your web server from an image or a build. Copies start when\n requests come and stop when they end, between --min-copies and --max-copies.\n In a private beta: outside it, each command says how to ask to join.\n\n create [<name>] --vcpu <1-16> --memory <128-65536> --max-copies <1-1000>\n [--min-copies 0] [--concurrency 100] [--spares 2] [--port 8080]\n [--health-path /healthz] [--label key=value]...\n Make an App, waiting for its first deploy; prints its id\n ls [--all] Your Apps: state, live version, copies; --all, deleted too\n get <app> One App, in full (an id or its name)\n update <app> [--name <name>] [--vcpu n] [--memory n] [--min-copies n] [--max-copies n]\n [--concurrency n] [--spares n] [--port n] [--health-path /path] [--label key=value]...\n Change its settings\n rm <app> Delete it and stop its copies\n deploy <app> (--image <image> | --build <buildId>) [--env KEY=VALUE]... [--keep-env]\n [--port 8080] [--health-path /healthz] [--no-wait]\n A new version. Waits until it is live, or says why it\n failed; --no-wait prints the deploy's id at once.\n --image: an image of yours (id, name, name:tag);\n --build: a build that succeeded (runtime builds).\n --env KEY alone sends KEY's value from your environment.\n --keep-env keeps the last deploy's environment, sealed\n deploys <app> [<deployId>] [--wait] Each version's deploy: state and address; with an id,\n that one (--wait: until it ends)\n versions <app> Its versions; the live and previous ones keep saved copies\n copies <app> Its copies now: version, region, state\n rollback <app> [--no-wait] Put the previous version live again\n\nExamples\n runtime apps create web --vcpu 1 --memory 512 --max-copies 3\n runtime apps deploy web --image web:latest --env NODE_ENV=production\n runtime apps rollback web\n";
|
|
8
|
+
export declare const APP_HELP = "runtime apps <command>\n\n An App serves your web server from an image or a build. Copies start when\n requests come and stop when they end, between --min-copies and --max-copies.\n In a private beta: outside it, each command says how to ask to join.\n\n create [<name>] --vcpu <1-16> --memory <128-65536> --max-copies <1-1000>\n [--min-copies 0] [--concurrency 100] [--spares 2] [--port 8080]\n [--health-path /healthz] [--health-fail 60] [--stop-grace 30] [--cdn on|off]\n [--volume <volumeId>:<path>] [--label key=value]...\n Make an App, waiting for its first deploy; prints its id.\n --health-fail: seconds a live copy may fail its health\n check before it is replaced. --stop-grace: seconds a\n stopped copy has after SIGTERM. --volume mounts one\n volume of yours at a path under /data, /mnt, /state,\n /storage or /volumes, in the App's one copy: it needs\n --max-copies 1 (--min-copies is then 1, --spares 0), and\n each deploy stops the old copy before the new one boots\n ls [--all] Your Apps: state, live version, copies; --all, deleted too\n get <app> One App, in full (an id or its name)\n update <app> [--name <name>] [--vcpu n] [--memory n] [--min-copies n] [--max-copies n]\n [--concurrency n] [--spares n] [--port n] [--health-path /path] [--health-fail n]\n [--stop-grace n] [--volume <volumeId>:<path> | none] [--cdn on|off]\n [--label key=value]...\n Change its settings; --volume none takes the volume\n away, only before its first deploy;\n --cdn off sends visitors straight to Runtime's routers,\n with nothing cached (on: Cloudflare's CDN in front)\n rm <app> Delete it and stop its copies\n deploy <app> (--image <image> | --build <buildId>) [--env KEY=VALUE]... [--keep-env]\n [--port 8080] [--health-path /healthz] [--no-wait]\n A new version. Waits until it is live, or says why it\n failed; --no-wait prints the deploy's id at once.\n --image: an image of yours (id, name, name:tag);\n --build: a build that succeeded (runtime builds).\n --env KEY alone sends KEY's value from your environment.\n --keep-env keeps the last deploy's environment, sealed\n deploys <app> [<deployId>] [--wait] Each version's deploy: state and address; with an id,\n that one (--wait: until it ends)\n versions <app> Its versions; the live and previous ones keep saved copies\n copies <app> Its copies now: version, region, state\n logs <app> [--follow] [--since 1h] [--version n] [--copy <copyId>] [--stream stdout|stderr]\n [--limit 100] [--raw] What its copies printed: the newest lines since --since\n (a time, or 30s, 15m, 2h, 7d; kept 14 days), or with\n --follow every line as it comes, until Ctrl-C. On a\n terminal control characters show as \\uXXXX unless --raw\n exec <app> [--copy <id>] [--root] [--cwd <dir>] [--env K=V]... [--timeout <ms>] [--trace-files <file.json>] -- <command>\n Run a command in its live copy\n cp <file> <app>:/<path> [--copy <id>] Copy a file onto its live copy\n cp <app>:/<path> <file> [--copy <id>] Copy a file off it\n exec and cp go to a serving copy of the live version unless --copy names\n one. A copy holds the App's secrets, so only an owner's or admin's key\n reaches into one. A file written to a copy lasts as long as that copy; a\n deploy replaces its copies.\n rollback <app> [--no-wait] Put the previous version live again\n restart <app> [--no-wait] Start the live version afresh, as a deploy of its own;\n with a volume, the old copy stops first and the\n downtime is said\n\nExamples\n runtime apps create web --vcpu 1 --memory 512 --max-copies 3\n runtime apps deploy web --image web:latest --env NODE_ENV=production\n runtime apps logs web --follow\n runtime apps rollback web\n runtime apps create db --vcpu 1 --memory 1024 --max-copies 1 --volume <volumeId>:/data\n";
|
|
9
|
+
export declare const FUNCTION_HELP = "runtime functions <command>\n\n A Function serves your HTTP handler from an image or a build, at its own\n address. Copies start when calls come, up to --max-copies, and sleep when\n they stop: an idle Function has no copy awake.\n In a private beta: outside it, each command says how to ask to join.\n\n create [<name>] --vcpu <1-16> --memory <128-65536> --max-copies <1-1000>\n [--concurrency 100] [--spares 2] [--port 8080]\n [--health-path /healthz] [--health-fail 60] [--label key=value]...\n Make a Function, waiting for its first deploy; prints its id.\n --health-fail: seconds a live copy may fail its health\n check before it is replaced\n ls [--all] Your Functions: state, live version, copies; --all, deleted too\n get <function> One Function, in full (an id or its name)\n update <function> [--name <name>] [--vcpu n] [--memory n] [--max-copies n]\n [--concurrency n] [--spares n] [--port n] [--health-path /path] [--health-fail n]\n [--label key=value]...\n Change its settings\n rm <function> Delete it and stop its copies\n deploy <function> (--image <image> | --build <buildId>) [--env KEY=VALUE]... [--keep-env]\n [--port 8080] [--health-path /healthz] [--no-wait]\n A new version. Waits until it is live, or says why it\n failed; --no-wait prints the deploy's id at once.\n --image: an image of yours (id, name, name:tag);\n --build: a build that succeeded (runtime builds).\n --env KEY alone sends KEY's value from your environment.\n --keep-env keeps the last deploy's environment, sealed\n deploys <function> [<deployId>] [--wait] Each version's deploy: state and address; with an id,\n that one (--wait: until it ends)\n versions <function> Its versions; the live and previous ones keep saved copies\n copies <function> Its copies now: version, region, state\n logs <function> [--follow] [--since 1h] [--version n] [--copy <copyId>] [--stream stdout|stderr]\n [--limit 100] [--raw] What its copies printed: the newest lines since --since\n (a time, or 30s, 15m, 2h, 7d; kept 14 days), or with\n --follow every line as it comes, until Ctrl-C. On a\n terminal control characters show as \\uXXXX unless --raw\n rollback <function> [--no-wait] Put the previous version live again\n restart <function> [--no-wait] Start the live version afresh, as a deploy of its own\n\nExamples\n runtime functions create resize --vcpu 1 --memory 512 --max-copies 10\n runtime functions deploy resize --image resize:latest\n runtime functions logs resize --follow\n runtime functions rollback resize\n";
|
|
9
10
|
export declare const BUILD_HELP = "runtime builds <command>\n\n A build turns a commit of a connected repository into a saved server an App\n deploys. A push to the production branch builds and deploys by itself.\n In a private beta: outside it, each command says how to ask to join.\n\n repos connect <owner/name | https URL> --deploy <app name> [--branch main] [--no-previews]\n [--root <folder>] [--install <command>] [--build <command>] [--start <command>]\n [--port 8080] [--health-path /healthz] [--build-env KEY=VALUE]... [--name <name>]\n Connect a repository; prints its id. --deploy takes an\n App's name, or function:<name>. --start runs once the\n build is done, with PORT set: the server the App deploys\n repos ls Connected repositories\n repos change <repoId> [the options of connect but the repository]\n Change its settings; its id and builds stay\n repos disconnect <repoId> Stop building it; its builds stay\n repos install A link to install Runtime's GitHub App, so a private\n repository builds\n create <repoId> [--ref main] [--branch <name>] [--name <name>]\n Build a branch, tag or commit now; prints the build's id\n run <repoId> [--ref main] [--branch <name>] [--name <name>] [--raw]\n The same, then follows its log; exits 0 once it succeeds\n ls [--repository <repoId>] [--commit <sha>] [--state <state>]...\n Builds, oldest first; --commit: a full sha\n get <buildId> One build: state, commit, step times, what it made\n cancel <buildId> Stop a build that has not ended\n logs <buildId> [--follow] [--raw] Its last 200 lines, or every line as it comes until it\n ends; on a terminal control characters show as \\uXXXX\n unless --raw\n\nExamples\n runtime builds repos connect acme/web --deploy web --start \"npm start\"\n runtime builds run <repoId> --ref main\n runtime builds ls --commit $(git rev-parse HEAD)\n";
|
|
10
11
|
export declare const CONTAINER_HELP = "runtime containers <command>\n\n A container runs one OCI image's process on its own microVM, billed at the\n sandbox rates. It never sleeps unless --sleep; on exit it restarts when it\n serves a port, else it stops (--on-exit sets either).\n In a private beta: outside it, each command says how to ask to join.\n\n create <image> --vcpu <1-16> --memory <128-65536> [--name <name>] [--label key=value]...\n [--env KEY[=VALUE]]... [--entrypoint <program>] [--workdir /app] [--user <user>]\n [--port <1-65535>] [--on-exit restart|stop] [--sleep] [-- <command...>]\n Run it; prints its id. The image's digest is pinned.\n --env KEY alone sends KEY's value from your environment.\n --entrypoint drops the image's command; after --, the\n command replaces the image's\n ls [--all] [--state <state>]... [--label key=value]...\n Your containers: all but deleting and deleted, unless\n --all or --state\n get <container> One container, in full (an id or its name): its\n environment's names, never their values\n update <container> [--name <name>] [--label key=value]...\n Rename it or replace its labels\n rm <container> [--wait] Delete it and stop its process; --wait: until deleted\n\nExamples\n runtime containers create nginx:1.27 --vcpu 1 --memory 512 --name web\n runtime containers create python:3.12 --vcpu 1 --memory 1024 -- python3 -m http.server 8000\n runtime containers rm web --wait\n";
|
|
11
12
|
export declare function appsCommand(argv: string[], env: NodeJS.ProcessEnv, out: Out, client: () => Promise<Runtime>, kit: CliKit): Promise<number>;
|
|
13
|
+
export declare function functionsCommand(argv: string[], env: NodeJS.ProcessEnv, out: Out, client: () => Promise<Runtime>, kit: CliKit): Promise<number>;
|
|
12
14
|
export declare function buildsCommand(argv: string[], out: Out, client: () => Promise<Runtime>, kit: CliKit): Promise<number>;
|
|
13
15
|
export declare function containersCommand(argv: string[], env: NodeJS.ProcessEnv, out: Out, client: () => Promise<Runtime>, kit: CliKit): Promise<number>;
|
|
14
16
|
export {};
|