@b3os/cli 0.1.3 → 0.2.1
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 +7 -3
- package/dist/commands/app.d.ts +7 -0
- package/dist/commands/app.js +922 -0
- package/dist/commands/app.js.map +1 -0
- package/dist/commands/auth.d.ts +18 -0
- package/dist/commands/auth.js +64 -17
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/manifest.d.ts +50 -0
- package/dist/commands/manifest.js +316 -24
- package/dist/commands/manifest.js.map +1 -1
- package/dist/commands/requests.d.ts +8 -1
- package/dist/commands/requests.js +42 -6
- package/dist/commands/requests.js.map +1 -1
- package/dist/commands/tool.d.ts +46 -0
- package/dist/commands/tool.js +197 -0
- package/dist/commands/tool.js.map +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +7 -2
- package/dist/main.js.map +1 -1
- package/dist/manifest/apply.d.ts +83 -0
- package/dist/manifest/apply.js +125 -0
- package/dist/manifest/apply.js.map +1 -0
- package/dist/manifest/grant.d.ts +1 -0
- package/dist/manifest/grant.js +3 -0
- package/dist/manifest/grant.js.map +1 -0
- package/dist/manifest/load.d.ts +4 -141
- package/dist/manifest/load.js +24 -268
- package/dist/manifest/load.js.map +1 -1
- package/dist/manifest/plan.d.ts +1 -52
- package/dist/manifest/plan.js +3 -627
- package/dist/manifest/plan.js.map +1 -1
- package/dist/manifest/record.d.ts +98 -0
- package/dist/manifest/record.js +233 -0
- package/dist/manifest/record.js.map +1 -0
- package/dist/manifest/skip.d.ts +1 -0
- package/dist/manifest/skip.js +3 -0
- package/dist/manifest/skip.js.map +1 -0
- package/dist/manifest/source.d.ts +48 -0
- package/dist/manifest/source.js +223 -0
- package/dist/manifest/source.js.map +1 -0
- package/package.json +6 -6
- package/schemas/b3os.v0.schema.json +0 -244
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// b3os.yaml v1: what apply deploys comes from a git commit, never from the working tree, so a deploy can be
|
|
2
|
+
// repeated from its `b3os.rev` tag (keepalive recreates a lost harness that way). Everything here runs the local
|
|
3
|
+
// `git` binary; no new dependency. Paths are relative to the repository's top level, with `/` separators.
|
|
4
|
+
// `GitRepository` is the CLI's side of @b3os/deploy's source interface (packages/deploy/src/source.ts); the edge's
|
|
5
|
+
// deployer reads the same things from GitHub instead.
|
|
6
|
+
import { execFileSync } from "node:child_process";
|
|
7
|
+
import { realpathSync } from "node:fs";
|
|
8
|
+
import { relative, sep } from "node:path";
|
|
9
|
+
import { MAX_SOURCE_BYTES, SourceError, tooLargeMessage, } from "@b3os/deploy";
|
|
10
|
+
export { MAX_SOURCE_BYTES, SourceError, secretLooking, sha256 } from "@b3os/deploy";
|
|
11
|
+
/** The most a git command may print here: room for a tarball just over the limit, so its size can be reported. */
|
|
12
|
+
const GIT_MAX_BYTES = MAX_SOURCE_BYTES + 16 * 1024 * 1024;
|
|
13
|
+
function git(repo, args, input) {
|
|
14
|
+
try {
|
|
15
|
+
return execFileSync("git", ["-C", repo, ...args], {
|
|
16
|
+
maxBuffer: GIT_MAX_BYTES,
|
|
17
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
18
|
+
...(input ? { input } : {}),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
const err = e;
|
|
23
|
+
if (err.code === "ENOBUFS")
|
|
24
|
+
throw new SourceError(`git ${args[0]}: over ${GIT_MAX_BYTES} bytes`, "too_large");
|
|
25
|
+
const why = err.stderr?.toString().trim().split("\n")[0] || err.message;
|
|
26
|
+
throw new SourceError(`git ${args[0]}: ${why}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const text = (b) => b.toString("utf8").trim();
|
|
30
|
+
/** The repository a folder is in (its real top-level path), or null outside git. */
|
|
31
|
+
export function repoOf(dir) {
|
|
32
|
+
try {
|
|
33
|
+
return text(execFileSync("git", ["-C", dir, "rev-parse", "--show-toplevel"], { stdio: ["ignore", "pipe", "ignore"] }));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** `path` (absolute) relative to the repository, with `/` separators; `.` for the top level. */
|
|
40
|
+
export function inRepo(repo, path) {
|
|
41
|
+
const r = relative(realpathSync(repo), realpathSync(path)).split(sep).join("/");
|
|
42
|
+
return r === "" ? "." : r;
|
|
43
|
+
}
|
|
44
|
+
/** Join repository-relative parts (`.` is the top level). */
|
|
45
|
+
export function join(...parts) {
|
|
46
|
+
const out = parts.filter((p) => p && p !== ".").join("/");
|
|
47
|
+
return out === "" ? "." : out;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The full commit id of `rev` (HEAD, a 12-hex prefix from a tag), or null when the repository lacks it. git reads a
|
|
51
|
+
* name before a short commit id, so a tag or a local branch named like a commit's first hex resolves to its own
|
|
52
|
+
* commit: when `rev` is hex, only a commit that starts with it is an answer.
|
|
53
|
+
*/
|
|
54
|
+
export function resolveCommit(repo, rev) {
|
|
55
|
+
let sha;
|
|
56
|
+
try {
|
|
57
|
+
sha = text(git(repo, ["rev-parse", "--verify", "--quiet", `${rev}^{commit}`]));
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return /^[0-9a-f]{7,40}$/.test(rev) && !sha.startsWith(rev) ? null : sha;
|
|
63
|
+
}
|
|
64
|
+
/** The first line of a commit's message (at most 500 characters), or null. */
|
|
65
|
+
export function commitSubject(repo, commit) {
|
|
66
|
+
try {
|
|
67
|
+
const s = text(git(repo, ["log", "-1", "--format=%s", commit]));
|
|
68
|
+
return s ? s.slice(0, 500) : null;
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** The branch checked out, or null when HEAD is detached (or outside git). */
|
|
75
|
+
export function currentBranch(repo) {
|
|
76
|
+
try {
|
|
77
|
+
const b = text(git(repo, ["symbolic-ref", "--quiet", "--short", "HEAD"]));
|
|
78
|
+
return b || null;
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/** Whether the working tree has changes (tracked or untracked, not ignored) under any of `paths`. */
|
|
85
|
+
export function dirty(repo, paths) {
|
|
86
|
+
const out = text(git(repo, ["status", "--porcelain", "--untracked-files=normal", "--", ...paths]));
|
|
87
|
+
return out.length > 0;
|
|
88
|
+
}
|
|
89
|
+
/** Those of `paths` (files) that differ from HEAD in the working tree or the index, or are not in HEAD at all
|
|
90
|
+
* (untracked, or ignored). */
|
|
91
|
+
export function uncommitted(repo, paths) {
|
|
92
|
+
return paths.filter((p) => dirty(repo, [p]) || !fileAt(repo, "HEAD", p));
|
|
93
|
+
}
|
|
94
|
+
/** The git object id of a folder or file at a commit: the tree hash that goes into a service's spec digest. */
|
|
95
|
+
export function treeHash(repo, commit, path) {
|
|
96
|
+
return text(git(repo, ["rev-parse", path === "." ? `${commit}^{tree}` : `${commit}:${path}`]));
|
|
97
|
+
}
|
|
98
|
+
/** A file's bytes at a commit. */
|
|
99
|
+
export function showFile(repo, commit, path) {
|
|
100
|
+
return git(repo, ["show", `${commit}:${path}`]);
|
|
101
|
+
}
|
|
102
|
+
/** Whether a file exists at a commit. */
|
|
103
|
+
export function fileAt(repo, commit, path) {
|
|
104
|
+
try {
|
|
105
|
+
git(repo, ["cat-file", "-e", `${commit}:${path}`]);
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/** The tracked files under `path` at a commit, relative to `path`. */
|
|
113
|
+
export function trackedFiles(repo, commit, path) {
|
|
114
|
+
const out = text(git(repo, ["ls-tree", "-r", "--name-only", "--full-tree", commit, "--", path === "." ? "." : path]));
|
|
115
|
+
const prefix = path === "." ? "" : `${path}/`;
|
|
116
|
+
return out
|
|
117
|
+
.split("\n")
|
|
118
|
+
.filter(Boolean)
|
|
119
|
+
.map((f) => (prefix && f.startsWith(prefix) ? f.slice(prefix.length) : f));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* A gzip tarball of the folder at a commit, its contents at the top level (`git archive <commit>:<path>`): tracked
|
|
123
|
+
* files only, so ignored files such as `.env` or `node_modules` never leave the machine.
|
|
124
|
+
*/
|
|
125
|
+
export function sourceTarball(repo, commit, path) {
|
|
126
|
+
const tree = path === "." ? commit : `${commit}:${path}`;
|
|
127
|
+
const over = (size) => new SourceError(tooLargeMessage(path, commit, size), "too_large");
|
|
128
|
+
let out;
|
|
129
|
+
try {
|
|
130
|
+
out = git(repo, ["archive", "--format=tar.gz", tree]);
|
|
131
|
+
}
|
|
132
|
+
catch (e) {
|
|
133
|
+
if (e instanceof SourceError && e.code === "too_large")
|
|
134
|
+
throw over(`more than ${GIT_MAX_BYTES}`);
|
|
135
|
+
throw e;
|
|
136
|
+
}
|
|
137
|
+
if (out.length > MAX_SOURCE_BYTES)
|
|
138
|
+
throw over(String(out.length));
|
|
139
|
+
return out;
|
|
140
|
+
}
|
|
141
|
+
/** What is at `path` in a commit: a folder, a file, or nothing. */
|
|
142
|
+
export function kindAt(repo, commit, path) {
|
|
143
|
+
if (path === ".")
|
|
144
|
+
return "dir";
|
|
145
|
+
try {
|
|
146
|
+
const t = text(git(repo, ["cat-file", "-t", `${commit}:${path}`]));
|
|
147
|
+
return t === "tree" ? "dir" : t === "blob" ? "file" : null;
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/** One commit of the local clone, read with git. The tarball of a folder is made once and uploaded as made. */
|
|
154
|
+
class GitCommit {
|
|
155
|
+
archives = new Map();
|
|
156
|
+
repo;
|
|
157
|
+
commit;
|
|
158
|
+
constructor(repo, commit) {
|
|
159
|
+
this.repo = repo;
|
|
160
|
+
this.commit = commit;
|
|
161
|
+
}
|
|
162
|
+
async kind(path) {
|
|
163
|
+
return kindAt(this.repo, this.commit, path);
|
|
164
|
+
}
|
|
165
|
+
async read(path, max) {
|
|
166
|
+
if (kindAt(this.repo, this.commit, path) !== "file")
|
|
167
|
+
return null;
|
|
168
|
+
const b = showFile(this.repo, this.commit, path);
|
|
169
|
+
if (b.length > max)
|
|
170
|
+
throw new SourceError(`${path} is ${b.length} bytes, over ${max}`, "too_large");
|
|
171
|
+
return b;
|
|
172
|
+
}
|
|
173
|
+
async objectId(path) {
|
|
174
|
+
return treeHash(this.repo, this.commit, path);
|
|
175
|
+
}
|
|
176
|
+
async files(path) {
|
|
177
|
+
return trackedFiles(this.repo, this.commit, path);
|
|
178
|
+
}
|
|
179
|
+
async archiveSize(path) {
|
|
180
|
+
return this.tarball(path).length;
|
|
181
|
+
}
|
|
182
|
+
async archive(path) {
|
|
183
|
+
return this.tarball(path);
|
|
184
|
+
}
|
|
185
|
+
tarball(path) {
|
|
186
|
+
let t = this.archives.get(path);
|
|
187
|
+
if (!t) {
|
|
188
|
+
t = sourceTarball(this.repo, this.commit, path);
|
|
189
|
+
this.archives.set(path, t);
|
|
190
|
+
}
|
|
191
|
+
return t;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/** The local clone at `root` (its top level), as @b3os/deploy reads a repository. */
|
|
195
|
+
export class GitRepository {
|
|
196
|
+
commits = new Map();
|
|
197
|
+
root;
|
|
198
|
+
constructor(root) {
|
|
199
|
+
this.root = root;
|
|
200
|
+
}
|
|
201
|
+
async resolve(rev) {
|
|
202
|
+
return resolveCommit(this.root, rev);
|
|
203
|
+
}
|
|
204
|
+
at(commit) {
|
|
205
|
+
let c = this.commits.get(commit);
|
|
206
|
+
if (!c) {
|
|
207
|
+
c = new GitCommit(this.root, commit);
|
|
208
|
+
this.commits.set(commit, c);
|
|
209
|
+
}
|
|
210
|
+
return c;
|
|
211
|
+
}
|
|
212
|
+
/** Files under `path` that differ between the two commits: one `git diff --name-only`. Null when git cannot say. */
|
|
213
|
+
async changedFiles(from, to, path) {
|
|
214
|
+
try {
|
|
215
|
+
const out = text(git(this.root, ["diff", "--name-only", "--no-renames", from, to, "--", path || "."]));
|
|
216
|
+
return out ? out.split("\n").filter(Boolean).length : 0;
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/manifest/source.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,iHAAiH;AACjH,0GAA0G;AAC1G,mHAAmH;AACnH,sDAAsD;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAEL,gBAAgB,EAGhB,WAAW,EACX,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEpF,kHAAkH;AAClH,MAAM,aAAa,GAAG,gBAAgB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1D,SAAS,GAAG,CAAC,IAAY,EAAE,IAAc,EAAE,KAAc;IACvD,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE;YAChD,SAAS,EAAE,aAAa;YACxB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;YAC/B,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5B,CAAC,CAAC;IACL,CAAC;I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AAE,IAAI,EAAE,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;YACvG,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b3os/cli",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "The B3OS command line: vision, render, infer, sandboxes, routines, actions and vault, plus keys and MCP setup.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"bin",
|
|
15
15
|
"dist",
|
|
16
|
-
"schemas",
|
|
17
16
|
"README.md",
|
|
18
17
|
"LICENSE"
|
|
19
18
|
],
|
|
@@ -31,13 +30,14 @@
|
|
|
31
30
|
"dev": "node --conditions=b3os-source src/main.ts"
|
|
32
31
|
},
|
|
33
32
|
"dependencies": {
|
|
34
|
-
"@b3os/
|
|
35
|
-
"@b3os/
|
|
36
|
-
"
|
|
33
|
+
"@b3os/deploy": "0.2.1",
|
|
34
|
+
"@b3os/mcp": "0.2.1",
|
|
35
|
+
"@b3os/sdk": "0.2.1",
|
|
37
36
|
"yaml": "2.9.1"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
|
-
"@types/node": "24.19.2"
|
|
39
|
+
"@types/node": "24.19.2",
|
|
40
|
+
"ajv": "8.20.0"
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://beta.b3os.org",
|
|
43
43
|
"repository": {
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "urn:b3os:schema:b3os-yaml:v0",
|
|
4
|
-
"title": "b3os.yaml v0 (design preview)",
|
|
5
|
-
"description": "A repository's declaration of the B3OS building blocks its agents use: models, packs, sandboxes, browser pools, routines and the external resources they reach. Version 0 is a design preview. B3OS reads it only through `b3os manifest validate` and `b3os apply --dry-run`, which print what an apply would do and change nothing. Field names are snake_case, like the REST API.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["version", "name"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"$schema": { "type": "string" },
|
|
11
|
-
"version": {
|
|
12
|
-
"const": 0,
|
|
13
|
-
"description": "The b3os.yaml format version. 0 is the design preview; it may change without notice."
|
|
14
|
-
},
|
|
15
|
-
"name": {
|
|
16
|
-
"$ref": "#/$defs/name",
|
|
17
|
-
"description": "The application's name, for the plan's heading. Not an API object."
|
|
18
|
-
},
|
|
19
|
-
"description": { "type": "string", "maxLength": 500 },
|
|
20
|
-
"project": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"pattern": "^prj_[0-9a-hjkmnp-tv-z]{26}$",
|
|
23
|
-
"description": "The project the declared objects belong to. When given, the plan stops with a problem if the credential in use belongs to another project."
|
|
24
|
-
},
|
|
25
|
-
"infer": {
|
|
26
|
-
"type": "object",
|
|
27
|
-
"additionalProperties": false,
|
|
28
|
-
"properties": {
|
|
29
|
-
"models": {
|
|
30
|
-
"type": "array",
|
|
31
|
-
"maxItems": 32,
|
|
32
|
-
"items": { "$ref": "#/$defs/model" }
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"actions": {
|
|
37
|
-
"type": "object",
|
|
38
|
-
"additionalProperties": false,
|
|
39
|
-
"properties": {
|
|
40
|
-
"packs": {
|
|
41
|
-
"type": "array",
|
|
42
|
-
"maxItems": 64,
|
|
43
|
-
"items": { "$ref": "#/$defs/pack" }
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"sandboxes": {
|
|
48
|
-
"type": "array",
|
|
49
|
-
"maxItems": 32,
|
|
50
|
-
"description": "Sandbox shapes the application creates at run time. Sandboxes are not long-lived objects in this beta: the plan checks each shape against the node's templates and your limits.",
|
|
51
|
-
"items": { "$ref": "#/$defs/sandbox" }
|
|
52
|
-
},
|
|
53
|
-
"vision": {
|
|
54
|
-
"type": "object",
|
|
55
|
-
"additionalProperties": false,
|
|
56
|
-
"properties": {
|
|
57
|
-
"pools": {
|
|
58
|
-
"type": "array",
|
|
59
|
-
"maxItems": 8,
|
|
60
|
-
"items": { "$ref": "#/$defs/browserPool" }
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"render": {
|
|
65
|
-
"type": "object",
|
|
66
|
-
"additionalProperties": false,
|
|
67
|
-
"properties": {
|
|
68
|
-
"pools": {
|
|
69
|
-
"type": "array",
|
|
70
|
-
"maxItems": 8,
|
|
71
|
-
"items": { "$ref": "#/$defs/browserPool" }
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"routines": {
|
|
76
|
-
"type": "array",
|
|
77
|
-
"maxItems": 64,
|
|
78
|
-
"items": { "$ref": "#/$defs/routine" }
|
|
79
|
-
},
|
|
80
|
-
"resources": {
|
|
81
|
-
"type": "array",
|
|
82
|
-
"maxItems": 32,
|
|
83
|
-
"description": "Services the application uses that B3OS does not run, such as a Postgres database or a vector index. The plan checks that the credential each one names is stored in the vault.",
|
|
84
|
-
"items": { "$ref": "#/$defs/resource" }
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
"$defs": {
|
|
88
|
-
"name": {
|
|
89
|
-
"type": "string",
|
|
90
|
-
"minLength": 1,
|
|
91
|
-
"maxLength": 63,
|
|
92
|
-
"pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$"
|
|
93
|
-
},
|
|
94
|
-
"connectionRef": {
|
|
95
|
-
"type": "string",
|
|
96
|
-
"minLength": 1,
|
|
97
|
-
"maxLength": 128,
|
|
98
|
-
"description": "A vault connection: its ID (`conn_…`) or its label."
|
|
99
|
-
},
|
|
100
|
-
"model": {
|
|
101
|
-
"type": "object",
|
|
102
|
-
"required": ["id"],
|
|
103
|
-
"additionalProperties": false,
|
|
104
|
-
"properties": {
|
|
105
|
-
"id": {
|
|
106
|
-
"type": "string",
|
|
107
|
-
"minLength": 1,
|
|
108
|
-
"maxLength": 128,
|
|
109
|
-
"description": "A model ID from `GET /v1/infer/models`, such as `b3os/default`."
|
|
110
|
-
},
|
|
111
|
-
"kind": { "enum": ["chat", "embedding", "speech"] },
|
|
112
|
-
"needs": {
|
|
113
|
-
"type": "array",
|
|
114
|
-
"uniqueItems": true,
|
|
115
|
-
"description": "Capabilities the application relies on, checked against the model's `b3os` object.",
|
|
116
|
-
"items": { "enum": ["tools", "json_schema", "image_input"] }
|
|
117
|
-
},
|
|
118
|
-
"min_context_tokens": {
|
|
119
|
-
"type": "integer",
|
|
120
|
-
"minimum": 1,
|
|
121
|
-
"description": "The smallest context length the application works with."
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
"pack": {
|
|
126
|
-
"type": "object",
|
|
127
|
-
"required": ["id"],
|
|
128
|
-
"additionalProperties": false,
|
|
129
|
-
"properties": {
|
|
130
|
-
"id": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+/[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$",
|
|
133
|
-
"description": "`<namespace>/<name>`, such as `io.b3os/slack`."
|
|
134
|
-
},
|
|
135
|
-
"version": {
|
|
136
|
-
"type": "string",
|
|
137
|
-
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
|
|
138
|
-
"description": "An exact published version. Omitted: the latest."
|
|
139
|
-
},
|
|
140
|
-
"connections": {
|
|
141
|
-
"type": "object",
|
|
142
|
-
"description": "The pack's connection keys, each bound to a stored vault connection.",
|
|
143
|
-
"maxProperties": 8,
|
|
144
|
-
"propertyNames": { "pattern": "^[a-z][a-z0-9_]{0,31}$" },
|
|
145
|
-
"additionalProperties": { "$ref": "#/$defs/connectionRef" }
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
"sandbox": {
|
|
150
|
-
"type": "object",
|
|
151
|
-
"required": ["name", "template"],
|
|
152
|
-
"additionalProperties": false,
|
|
153
|
-
"properties": {
|
|
154
|
-
"name": { "$ref": "#/$defs/name" },
|
|
155
|
-
"template": {
|
|
156
|
-
"type": "string",
|
|
157
|
-
"minLength": 1,
|
|
158
|
-
"maxLength": 64,
|
|
159
|
-
"description": "A template from `GET /v1/sandboxes/templates`."
|
|
160
|
-
},
|
|
161
|
-
"vcpu": { "type": "integer", "minimum": 1 },
|
|
162
|
-
"memory_mib": { "type": "integer", "minimum": 128 },
|
|
163
|
-
"disk_gib": { "type": "integer", "minimum": 1 },
|
|
164
|
-
"ports": {
|
|
165
|
-
"type": "array",
|
|
166
|
-
"uniqueItems": true,
|
|
167
|
-
"maxItems": 16,
|
|
168
|
-
"items": { "type": "integer", "minimum": 1, "maximum": 65535 }
|
|
169
|
-
},
|
|
170
|
-
"warm": {
|
|
171
|
-
"type": "integer",
|
|
172
|
-
"minimum": 0,
|
|
173
|
-
"description": "Sandboxes of this shape to keep started ahead of demand. Not declarable in this beta: the node sizes its warm pools."
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
"browserPool": {
|
|
178
|
-
"type": "object",
|
|
179
|
-
"required": ["name", "browsers"],
|
|
180
|
-
"additionalProperties": false,
|
|
181
|
-
"properties": {
|
|
182
|
-
"name": { "$ref": "#/$defs/name" },
|
|
183
|
-
"browsers": {
|
|
184
|
-
"type": "integer",
|
|
185
|
-
"minimum": 1,
|
|
186
|
-
"description": "Browsers to keep started for this application. Not declarable in this beta: the node sizes its browser pools."
|
|
187
|
-
},
|
|
188
|
-
"profile": {
|
|
189
|
-
"type": "string",
|
|
190
|
-
"minLength": 1,
|
|
191
|
-
"maxLength": 128,
|
|
192
|
-
"description": "A saved browser profile (its `vprof_` ID or its name) the pool's browsers start signed in with."
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
"routine": {
|
|
197
|
-
"type": "object",
|
|
198
|
-
"required": ["file"],
|
|
199
|
-
"additionalProperties": false,
|
|
200
|
-
"properties": {
|
|
201
|
-
"file": {
|
|
202
|
-
"type": "string",
|
|
203
|
-
"minLength": 1,
|
|
204
|
-
"maxLength": 512,
|
|
205
|
-
"pattern": "\\.(ya?ml|json)$",
|
|
206
|
-
"description": "A routine definition (routine.schema.json), relative to this file. Its `name` is the routine's name."
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
"resource": {
|
|
211
|
-
"type": "object",
|
|
212
|
-
"required": ["name", "kind"],
|
|
213
|
-
"additionalProperties": false,
|
|
214
|
-
"properties": {
|
|
215
|
-
"name": { "$ref": "#/$defs/name" },
|
|
216
|
-
"kind": {
|
|
217
|
-
"enum": ["postgres", "mysql", "redis", "vector", "object_store", "http"],
|
|
218
|
-
"description": "What the service is. `vector` covers vector indexes such as pgvector, Qdrant or Pinecone; name the product in `engine`."
|
|
219
|
-
},
|
|
220
|
-
"engine": { "type": "string", "maxLength": 64 },
|
|
221
|
-
"connection": {
|
|
222
|
-
"$ref": "#/$defs/connectionRef",
|
|
223
|
-
"description": "The vault connection that holds the service's credential."
|
|
224
|
-
},
|
|
225
|
-
"hosts": {
|
|
226
|
-
"type": "array",
|
|
227
|
-
"uniqueItems": true,
|
|
228
|
-
"maxItems": 16,
|
|
229
|
-
"description": "Hosts the service answers on. The plan checks that the connection is bound to them.",
|
|
230
|
-
"items": {
|
|
231
|
-
"type": "string",
|
|
232
|
-
"pattern": "^(\\*\\.)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*(:[0-9]{1,5})?$"
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
"used_by": {
|
|
236
|
-
"type": "array",
|
|
237
|
-
"uniqueItems": true,
|
|
238
|
-
"description": "Which declared routines and sandboxes use it: `routine/<name>` or `sandbox/<name>`.",
|
|
239
|
-
"items": { "type": "string", "pattern": "^(routine|sandbox)/[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$" }
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|