@b3os/sdk 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 +4 -3
- package/dist/cjs/core/client.d.ts +21 -2
- package/dist/cjs/core/client.js +26 -1
- package/dist/cjs/core/client.js.map +1 -1
- package/dist/cjs/core/handle.d.ts +5 -0
- package/dist/cjs/core/handle.js +13 -2
- package/dist/cjs/core/handle.js.map +1 -1
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +7 -1
- package/dist/cjs/core/index.js.map +1 -1
- package/dist/cjs/core/sse.d.ts +2 -0
- package/dist/cjs/core/sse.js +17 -5
- package/dist/cjs/core/sse.js.map +1 -1
- package/dist/cjs/core/traces-api.d.ts +42 -0
- package/dist/cjs/core/traces-api.js +54 -0
- package/dist/cjs/core/traces-api.js.map +1 -0
- package/dist/cjs/core/traces.d.ts +120 -0
- package/dist/cjs/core/traces.js +306 -0
- package/dist/cjs/core/traces.js.map +1 -0
- package/dist/cjs/core/util.d.ts +1 -1
- package/dist/cjs/core/util.js +1 -1
- package/dist/cjs/generated/errors.d.ts +1 -1
- package/dist/cjs/generated/errors.js +32 -0
- package/dist/cjs/generated/errors.js.map +1 -1
- package/dist/cjs/generated/ids.d.ts +12 -0
- package/dist/cjs/generated/ids.js +3 -0
- package/dist/cjs/generated/ids.js.map +1 -1
- package/dist/cjs/generated/ns/actions.d.ts +66 -1
- package/dist/cjs/generated/ns/actions.js +101 -1
- package/dist/cjs/generated/ns/actions.js.map +1 -1
- package/dist/cjs/generated/ns/keys.d.ts +2 -1
- package/dist/cjs/generated/ns/keys.js +2 -1
- package/dist/cjs/generated/ns/keys.js.map +1 -1
- package/dist/cjs/generated/ns/render.d.ts +22 -2
- package/dist/cjs/generated/ns/render.js +13 -2
- package/dist/cjs/generated/ns/render.js.map +1 -1
- package/dist/cjs/generated/ns/sandboxes.d.ts +29 -0
- package/dist/cjs/generated/ns/sandboxes.js +49 -0
- package/dist/cjs/generated/ns/sandboxes.js.map +1 -1
- package/dist/cjs/generated/types.d.ts +1038 -65
- package/dist/cjs/helpers/sandboxes.d.ts +26 -2
- package/dist/cjs/helpers/sandboxes.js +114 -13
- package/dist/cjs/helpers/sandboxes.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/core/client.d.ts +21 -2
- package/dist/esm/core/client.js +27 -2
- package/dist/esm/core/client.js.map +1 -1
- package/dist/esm/core/handle.d.ts +5 -0
- package/dist/esm/core/handle.js +13 -2
- package/dist/esm/core/handle.js.map +1 -1
- package/dist/esm/core/index.d.ts +2 -0
- package/dist/esm/core/index.js +2 -0
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/core/sse.d.ts +2 -0
- package/dist/esm/core/sse.js +17 -5
- package/dist/esm/core/sse.js.map +1 -1
- package/dist/esm/core/traces-api.d.ts +42 -0
- package/dist/esm/core/traces-api.js +50 -0
- package/dist/esm/core/traces-api.js.map +1 -0
- package/dist/esm/core/traces.d.ts +120 -0
- package/dist/esm/core/traces.js +295 -0
- package/dist/esm/core/traces.js.map +1 -0
- package/dist/esm/core/util.d.ts +1 -1
- package/dist/esm/core/util.js +1 -1
- package/dist/esm/generated/errors.d.ts +1 -1
- package/dist/esm/generated/errors.js +32 -0
- package/dist/esm/generated/errors.js.map +1 -1
- package/dist/esm/generated/ids.d.ts +12 -0
- package/dist/esm/generated/ids.js +3 -0
- package/dist/esm/generated/ids.js.map +1 -1
- package/dist/esm/generated/ns/actions.d.ts +66 -1
- package/dist/esm/generated/ns/actions.js +101 -1
- package/dist/esm/generated/ns/actions.js.map +1 -1
- package/dist/esm/generated/ns/keys.d.ts +2 -1
- package/dist/esm/generated/ns/keys.js +2 -1
- package/dist/esm/generated/ns/keys.js.map +1 -1
- package/dist/esm/generated/ns/render.d.ts +22 -2
- package/dist/esm/generated/ns/render.js +13 -2
- package/dist/esm/generated/ns/render.js.map +1 -1
- package/dist/esm/generated/ns/sandboxes.d.ts +29 -0
- package/dist/esm/generated/ns/sandboxes.js +49 -0
- package/dist/esm/generated/ns/sandboxes.js.map +1 -1
- package/dist/esm/generated/types.d.ts +1038 -65
- package/dist/esm/helpers/sandboxes.d.ts +26 -2
- package/dist/esm/helpers/sandboxes.js +113 -12
- package/dist/esm/helpers/sandboxes.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/core/client.ts +36 -4
- package/src/core/handle.ts +12 -2
- package/src/core/index.ts +10 -0
- package/src/core/sse.ts +17 -5
- package/src/core/traces-api.ts +80 -0
- package/src/core/traces.ts +375 -0
- package/src/core/util.ts +1 -1
- package/src/generated/errors.ts +64 -0
- package/src/generated/ids.ts +3 -0
- package/src/generated/ns/actions.ts +110 -1
- package/src/generated/ns/keys.ts +2 -1
- package/src/generated/ns/render.ts +22 -2
- package/src/generated/ns/sandboxes.ts +59 -0
- package/src/generated/types.ts +1057 -63
- package/src/helpers/sandboxes.ts +136 -12
- package/src/index.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../../src/generated/ids.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAE5G,0GAA0G;AAE1G,MAAM,CAAC,MAAM,UAAU,GAAG,iCAAiC,CAAC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,QAAQ,EAAE;IACrD,IAAI,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC9C,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC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AAO,EAAE,OAAO,EAAE,UAAU,EAAE;IAC7C,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE;IAC5C,GAAG,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE;IAC9C,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE;IAChD,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE;CACrC,CAAC;AAIX,oGAAoG;AACpG,MAAM,UAAU,IAAI,CAAC,EAAW,EAAE,MAAiB;IACjD,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAAE,OAAO,KAAK,CAAC;IACjE,OAAO,MAAM,KAAK,SAAS,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;AAC7D,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,UAAU,CAAC,EAAU;IACnC,OAAO,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -11,6 +11,9 @@ export declare const actionsOps: {
|
|
|
11
11
|
readonly getPack: Op;
|
|
12
12
|
readonly getPackTools: Op;
|
|
13
13
|
readonly getPackManifest: Op;
|
|
14
|
+
readonly getRegistryBlob: Op;
|
|
15
|
+
readonly headRegistryBlob: Op;
|
|
16
|
+
readonly putRegistryBlob: Op;
|
|
14
17
|
readonly listRegistryPacks: Op;
|
|
15
18
|
readonly publishPack: Op;
|
|
16
19
|
readonly getRegistryPack: Op;
|
|
@@ -55,6 +58,25 @@ export declare class ActionsAPI extends Namespace {
|
|
|
55
58
|
* (response mapping and output schema) for declarative HTTP actions; `sidecar` for JavaScript actions.
|
|
56
59
|
* Bills one `actions.call` once the action ran.
|
|
57
60
|
*
|
|
61
|
+
* **Hosted tools** (a preview, on for every organization in the beta; without `actions.tools` a `vm` call is
|
|
62
|
+
* `404 feature_not_enabled` and nothing runs). A `vm` action runs its publisher's command in a fresh microVM
|
|
63
|
+
* with no network, made for this call only and deleted before the call answers. A file field of the input
|
|
64
|
+
* schema (`x-b3os-file`) takes a file value inline, `{"$bytes": "<base64>", "name": "<name>"}` with `name`
|
|
65
|
+
* matching `^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$` (`ToolFileInput`); an output file comes back as
|
|
66
|
+
* `{"$bytes", "name", "bytes", "contentType"}` (`ToolFileOutput`), 262144 bytes of files in all. The budget is
|
|
67
|
+
* the least of `timeout_ms`, the action's own timeout and 60 seconds; a priced action refuses a `timeout_ms`
|
|
68
|
+
* below its own (`400 invalid_request`) here, and runs to its own timeout when a routine step calls it. Every
|
|
69
|
+
* call is a fresh VM, and a call that finished is charged even if the client had stopped waiting: send
|
|
70
|
+
* `Idempotency-Key` with a priced call, so a retry with the same key gets the stored answer and is not charged
|
|
71
|
+
* again (a routine step's retry with its key gets the answer of the call it started). Per organization: 120 tool calls started a minute, 4 at once, and
|
|
72
|
+
* 20 USD of publisher prices a month, counted on each node (`429`); per node, a limit of tool VMs at once (`503 tool_unavailable`,
|
|
73
|
+
* `reason: node_busy`). The answer has `tier: vm`, `cost` in micro-USD, and the `timing` phases `validate`,
|
|
74
|
+
* `start`, `copy`, `unpack`, `run`, `collect`, `delete` and `cost`. A tool call bills `actions.tool_call` (the
|
|
75
|
+
* floor, once the command ran) instead of `actions.call`, the VM's `actions.vcpu_ms` and `actions.gib_ms`,
|
|
76
|
+
* and, once the tool answered, its output matched its schema and its output files were read, the publisher's
|
|
77
|
+
* price as `actions.publisher_microusd`. A failure
|
|
78
|
+
* before the command ran bills nothing; a failure of the tool bills compute and the floor and no price.
|
|
79
|
+
*
|
|
58
80
|
* `POST /v1/actions/call` · scope `actions:run` · served by the node
|
|
59
81
|
*/
|
|
60
82
|
call(body: T.ActionCallRequest, options?: RequestOptions): APIPromise<T.ActionResult>;
|
|
@@ -104,6 +126,41 @@ export declare class ActionsAPI extends Namespace {
|
|
|
104
126
|
* `GET /v1/actions/packs/{namespace}/{name}/versions/{version}/manifest` · scope `actions:read` · served by the node
|
|
105
127
|
*/
|
|
106
128
|
getPackManifest(namespace: string, name: string, version: string, options?: RequestOptions): APIPromise<T.B3Pack>;
|
|
129
|
+
/**
|
|
130
|
+
* Download a hosted tool's archive
|
|
131
|
+
*
|
|
132
|
+
* Redirects to a short-lived signed URL for the archive (`application/octet-stream`). Served to a node's
|
|
133
|
+
* registry sync (a node-signed read), to the organization the publisher list names for a namespace that
|
|
134
|
+
* published a pack naming this archive, and to B3's organizations; to anyone else it is `404`, as if it did
|
|
135
|
+
* not exist. Verify the sha256 before use.
|
|
136
|
+
*
|
|
137
|
+
* `GET /v1/actions/registry/blobs/{digest}` · scope `actions:read` · served by beta-api.b3os.org
|
|
138
|
+
*/
|
|
139
|
+
getRegistryBlob(digest: string, options?: RequestOptions): APIPromise<Uint8Array>;
|
|
140
|
+
/**
|
|
141
|
+
* Check for a hosted tool's archive
|
|
142
|
+
*
|
|
143
|
+
* Answers `200` with the archive's `Content-Length` when the blob store holds `digest`, else `404` (a HEAD
|
|
144
|
+
* answer carries no body). `b3os tool
|
|
145
|
+
* publish` asks before it uploads. Needs the `actions.tools` flag and the scope `actions:tools:publish`.
|
|
146
|
+
*
|
|
147
|
+
* `HEAD /v1/actions/registry/blobs/{digest}` · scope `actions:tools:publish` · served by beta-api.b3os.org
|
|
148
|
+
*/
|
|
149
|
+
headRegistryBlob(digest: string, options?: RequestOptions): APIPromise<void>;
|
|
150
|
+
/**
|
|
151
|
+
* Upload a hosted tool's archive
|
|
152
|
+
*
|
|
153
|
+
* Stores a hosted tool's archive under its sha256, before the pack that names it is published
|
|
154
|
+
* (`platformPublishPack`). The body is the archive's bytes; `Content-Length` is required and at most
|
|
155
|
+
* 67108864 (64 MiB), and is checked before the body is read. The edge hashes the body as it streams it to
|
|
156
|
+
* storage: a body whose sha256 is not `digest`, or whose length is not `Content-Length`, is deleted and
|
|
157
|
+
* refused with `422 pack_invalid`. No `Content-Length` is `400 invalid_request`. A digest already stored answers `200` and stores nothing, so a retry is
|
|
158
|
+
* safe. Needs the `actions.tools` flag and the scope `actions:tools:publish`, which `*` and `actions:*` never
|
|
159
|
+
* grant; in the beta only B3's organizations may upload.
|
|
160
|
+
*
|
|
161
|
+
* `PUT /v1/actions/registry/blobs/{digest}` · scope `actions:tools:publish` · served by beta-api.b3os.org
|
|
162
|
+
*/
|
|
163
|
+
putRegistryBlob(digest: string, data: BinaryInput, options?: RequestOptions): APIPromise<T.RegistryBlob>;
|
|
107
164
|
/**
|
|
108
165
|
* List registry packs
|
|
109
166
|
*
|
|
@@ -119,7 +176,15 @@ export declare class ActionsAPI extends Namespace {
|
|
|
119
176
|
* most 2,000 files and 16 MiB once decompressed; other organizations are refused before the upload is read). The
|
|
120
177
|
* manifest's `signature` must verify: `sig` is Ed25519 over `b3pack-sig-v1\n<pack>\n<version>\n<contentHash>`
|
|
121
178
|
* with the publisher key `kid`, and `contentHash` covers the bundle with the signature removed. Versions are
|
|
122
|
-
* immutable. In the beta only
|
|
179
|
+
* immutable. In the beta only B3's organizations may publish, into `io.b3os` or a namespace the registry's
|
|
180
|
+
* publisher list names for the caller's organization.
|
|
181
|
+
*
|
|
182
|
+
* A pack with a `tool` block (a hosted tool) also needs: the `actions.tools` flag for the caller's
|
|
183
|
+
* organization (`404 feature_not_enabled`), the scope `actions:tools:publish`, which `*` and `actions:*` never
|
|
184
|
+
* grant (`403 forbidden` with `required_scope`), its archive already uploaded with the sha256 and size the
|
|
185
|
+
* manifest names (`PUT /v1/actions/registry/blobs/{digest}`; else `422 pack_invalid` with the pointer
|
|
186
|
+
* `/tool/bundle/archive`), and the hosted-tool and price rules of the b3pack publish checks (13 to 20). The
|
|
187
|
+
* version records who published it (`published_by`).
|
|
123
188
|
*
|
|
124
189
|
* `POST /v1/actions/registry/packs` · scope `actions:write` · served by beta-api.b3os.org
|
|
125
190
|
*/
|
|
@@ -48,6 +48,35 @@ const getPackManifestOp = {
|
|
|
48
48
|
timeoutMs: 10000,
|
|
49
49
|
scope: "actions:read",
|
|
50
50
|
};
|
|
51
|
+
const getRegistryBlobOp = {
|
|
52
|
+
id: "platformGetRegistryBlob",
|
|
53
|
+
method: "GET",
|
|
54
|
+
path: "/v1/actions/registry/blobs/{digest}",
|
|
55
|
+
params: ["digest"],
|
|
56
|
+
edge: true,
|
|
57
|
+
timeoutMs: 10000,
|
|
58
|
+
scope: "actions:read",
|
|
59
|
+
};
|
|
60
|
+
const headRegistryBlobOp = {
|
|
61
|
+
id: "platformHeadRegistryBlob",
|
|
62
|
+
method: "HEAD",
|
|
63
|
+
path: "/v1/actions/registry/blobs/{digest}",
|
|
64
|
+
params: ["digest"],
|
|
65
|
+
edge: true,
|
|
66
|
+
timeoutMs: 10000,
|
|
67
|
+
scope: "actions:tools:publish",
|
|
68
|
+
};
|
|
69
|
+
const putRegistryBlobOp = {
|
|
70
|
+
id: "platformPutRegistryBlob",
|
|
71
|
+
method: "PUT",
|
|
72
|
+
path: "/v1/actions/registry/blobs/{digest}",
|
|
73
|
+
params: ["digest"],
|
|
74
|
+
body: "bytes",
|
|
75
|
+
contentType: "application/octet-stream",
|
|
76
|
+
edge: true,
|
|
77
|
+
timeoutMs: 60000,
|
|
78
|
+
scope: "actions:tools:publish",
|
|
79
|
+
};
|
|
51
80
|
const listRegistryPacksOp = {
|
|
52
81
|
id: "platformListRegistryPacks",
|
|
53
82
|
method: "GET",
|
|
@@ -130,6 +159,9 @@ export const actionsOps = {
|
|
|
130
159
|
getPack: getPackOp,
|
|
131
160
|
getPackTools: getPackToolsOp,
|
|
132
161
|
getPackManifest: getPackManifestOp,
|
|
162
|
+
getRegistryBlob: getRegistryBlobOp,
|
|
163
|
+
headRegistryBlob: headRegistryBlobOp,
|
|
164
|
+
putRegistryBlob: putRegistryBlobOp,
|
|
133
165
|
listRegistryPacks: listRegistryPacksOp,
|
|
134
166
|
publishPack: publishPackOp,
|
|
135
167
|
getRegistryPack: getRegistryPackOp,
|
|
@@ -174,6 +206,25 @@ export class ActionsAPI extends Namespace {
|
|
|
174
206
|
* (response mapping and output schema) for declarative HTTP actions; `sidecar` for JavaScript actions.
|
|
175
207
|
* Bills one `actions.call` once the action ran.
|
|
176
208
|
*
|
|
209
|
+
* **Hosted tools** (a preview, on for every organization in the beta; without `actions.tools` a `vm` call is
|
|
210
|
+
* `404 feature_not_enabled` and nothing runs). A `vm` action runs its publisher's command in a fresh microVM
|
|
211
|
+
* with no network, made for this call only and deleted before the call answers. A file field of the input
|
|
212
|
+
* schema (`x-b3os-file`) takes a file value inline, `{"$bytes": "<base64>", "name": "<name>"}` with `name`
|
|
213
|
+
* matching `^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$` (`ToolFileInput`); an output file comes back as
|
|
214
|
+
* `{"$bytes", "name", "bytes", "contentType"}` (`ToolFileOutput`), 262144 bytes of files in all. The budget is
|
|
215
|
+
* the least of `timeout_ms`, the action's own timeout and 60 seconds; a priced action refuses a `timeout_ms`
|
|
216
|
+
* below its own (`400 invalid_request`) here, and runs to its own timeout when a routine step calls it. Every
|
|
217
|
+
* call is a fresh VM, and a call that finished is charged even if the client had stopped waiting: send
|
|
218
|
+
* `Idempotency-Key` with a priced call, so a retry with the same key gets the stored answer and is not charged
|
|
219
|
+
* again (a routine step's retry with its key gets the answer of the call it started). Per organization: 120 tool calls started a minute, 4 at once, and
|
|
220
|
+
* 20 USD of publisher prices a month, counted on each node (`429`); per node, a limit of tool VMs at once (`503 tool_unavailable`,
|
|
221
|
+
* `reason: node_busy`). The answer has `tier: vm`, `cost` in micro-USD, and the `timing` phases `validate`,
|
|
222
|
+
* `start`, `copy`, `unpack`, `run`, `collect`, `delete` and `cost`. A tool call bills `actions.tool_call` (the
|
|
223
|
+
* floor, once the command ran) instead of `actions.call`, the VM's `actions.vcpu_ms` and `actions.gib_ms`,
|
|
224
|
+
* and, once the tool answered, its output matched its schema and its output files were read, the publisher's
|
|
225
|
+
* price as `actions.publisher_microusd`. A failure
|
|
226
|
+
* before the command ran bills nothing; a failure of the tool bills compute and the floor and no price.
|
|
227
|
+
*
|
|
177
228
|
* `POST /v1/actions/call` · scope `actions:run` · served by the node
|
|
178
229
|
*/
|
|
179
230
|
call(body, options) {
|
|
@@ -235,6 +286,47 @@ export class ActionsAPI extends Namespace {
|
|
|
235
286
|
getPackManifest(namespace, name, version, options) {
|
|
236
287
|
return this._client._call(getPackManifestOp, { path: [namespace, name, version] }, options);
|
|
237
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* Download a hosted tool's archive
|
|
291
|
+
*
|
|
292
|
+
* Redirects to a short-lived signed URL for the archive (`application/octet-stream`). Served to a node's
|
|
293
|
+
* registry sync (a node-signed read), to the organization the publisher list names for a namespace that
|
|
294
|
+
* published a pack naming this archive, and to B3's organizations; to anyone else it is `404`, as if it did
|
|
295
|
+
* not exist. Verify the sha256 before use.
|
|
296
|
+
*
|
|
297
|
+
* `GET /v1/actions/registry/blobs/{digest}` · scope `actions:read` · served by beta-api.b3os.org
|
|
298
|
+
*/
|
|
299
|
+
getRegistryBlob(digest, options) {
|
|
300
|
+
return this._client._call(getRegistryBlobOp, { path: [digest] }, options, "application/gzip, application/octet-stream", "bytes");
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Check for a hosted tool's archive
|
|
304
|
+
*
|
|
305
|
+
* Answers `200` with the archive's `Content-Length` when the blob store holds `digest`, else `404` (a HEAD
|
|
306
|
+
* answer carries no body). `b3os tool
|
|
307
|
+
* publish` asks before it uploads. Needs the `actions.tools` flag and the scope `actions:tools:publish`.
|
|
308
|
+
*
|
|
309
|
+
* `HEAD /v1/actions/registry/blobs/{digest}` · scope `actions:tools:publish` · served by beta-api.b3os.org
|
|
310
|
+
*/
|
|
311
|
+
headRegistryBlob(digest, options) {
|
|
312
|
+
return this._client._call(headRegistryBlobOp, { path: [digest] }, options);
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Upload a hosted tool's archive
|
|
316
|
+
*
|
|
317
|
+
* Stores a hosted tool's archive under its sha256, before the pack that names it is published
|
|
318
|
+
* (`platformPublishPack`). The body is the archive's bytes; `Content-Length` is required and at most
|
|
319
|
+
* 67108864 (64 MiB), and is checked before the body is read. The edge hashes the body as it streams it to
|
|
320
|
+
* storage: a body whose sha256 is not `digest`, or whose length is not `Content-Length`, is deleted and
|
|
321
|
+
* refused with `422 pack_invalid`. No `Content-Length` is `400 invalid_request`. A digest already stored answers `200` and stores nothing, so a retry is
|
|
322
|
+
* safe. Needs the `actions.tools` flag and the scope `actions:tools:publish`, which `*` and `actions:*` never
|
|
323
|
+
* grant; in the beta only B3's organizations may upload.
|
|
324
|
+
*
|
|
325
|
+
* `PUT /v1/actions/registry/blobs/{digest}` · scope `actions:tools:publish` · served by beta-api.b3os.org
|
|
326
|
+
*/
|
|
327
|
+
putRegistryBlob(digest, data, options) {
|
|
328
|
+
return this._client._call(putRegistryBlobOp, { path: [digest], body: data }, options);
|
|
329
|
+
}
|
|
238
330
|
/**
|
|
239
331
|
* List registry packs
|
|
240
332
|
*
|
|
@@ -252,7 +344,15 @@ export class ActionsAPI extends Namespace {
|
|
|
252
344
|
* most 2,000 files and 16 MiB once decompressed; other organizations are refused before the upload is read). The
|
|
253
345
|
* manifest's `signature` must verify: `sig` is Ed25519 over `b3pack-sig-v1\n<pack>\n<version>\n<contentHash>`
|
|
254
346
|
* with the publisher key `kid`, and `contentHash` covers the bundle with the signature removed. Versions are
|
|
255
|
-
* immutable. In the beta only
|
|
347
|
+
* immutable. In the beta only B3's organizations may publish, into `io.b3os` or a namespace the registry's
|
|
348
|
+
* publisher list names for the caller's organization.
|
|
349
|
+
*
|
|
350
|
+
* A pack with a `tool` block (a hosted tool) also needs: the `actions.tools` flag for the caller's
|
|
351
|
+
* organization (`404 feature_not_enabled`), the scope `actions:tools:publish`, which `*` and `actions:*` never
|
|
352
|
+
* grant (`403 forbidden` with `required_scope`), its archive already uploaded with the sha256 and size the
|
|
353
|
+
* manifest names (`PUT /v1/actions/registry/blobs/{digest}`; else `422 pack_invalid` with the pointer
|
|
354
|
+
* `/tool/bundle/archive`), and the hosted-tool and price rules of the b3pack publish checks (13 to 20). The
|
|
355
|
+
* version records who published it (`published_by`).
|
|
256
356
|
*
|
|
257
357
|
* `POST /v1/actions/registry/packs` · scope `actions:write` · served by beta-api.b3os.org
|
|
258
358
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../src/generated/ns/actions.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKpD,MAAM,MAAM,GAAO;IACjB,EAAE,EAAE,aAAa;IACjB,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,aAAa;CACrB,CAAC;AACF,MAAM,UAAU,GAAO;IACrB,EAAE,EAAE,iBAAiB;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,sBAAsB;IAC5B,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,cAAc;CACtB,CAAC;AACF,MAAM,WAAW,GAAO;IACtB,EAAE,EAAE,kBAAkB;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,cAAc;CACtB,CAAC;AACF,MAAM,SAAS,GAAO;IACpB,EAAE,EAAE,gBAAgB;IACpB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,sCAAsC;IAC5C,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,cAAc;CACtB,CAAC;AACF,MAAM,cAAc,GAAO;IACzB,EAAE,EAAE,q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;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,sBAAsB,EAAE,wBAAwB;IAChD,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;IAChB,iBAAiB,EAAE,mBAAmB;IACtC,eAAe,EAAE,iBAAiB;IAClC,YAAY,EAAE,cAAc;CACpB,CAAC;AAEX,wGAAwG;AACxG,MAAM,OAAO,UAAW,SAAQ,SAAS;IACvC
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../src/generated/ns/actions.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKpD,MAAM,MAAM,GAAO;IACjB,EAAE,EAAE,aAAa;IACjB,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,aAAa;CACrB,CAAC;AACF,MAAM,UAAU,GAAO;IACrB,EAAE,EAAE,iBAAiB;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,sBAAsB;IAC5B,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,cAAc;CACtB,CAAC;AACF,MAAM,WAAW,GAAO;IACtB,EAAE,EAAE,kBAAkB;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,mBAAmB;IACzB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,cAAc;CACtB,CAAC;AACF,MAAM,SAAS,GAAO;IACpB,EAAE,EAAE,gBAAgB;IACpB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,sCAAsC;IAC5C,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,cAAc;CACtB,CAAC;AACF,MAAM,cAAc,GAAO;IACzB,EAAE,EAAE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,OAAO,CAAC,KAAK,CAAkC,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACzG,CAAC;CACF"}
|
|
@@ -49,7 +49,8 @@ export declare class KeysAPI extends Namespace {
|
|
|
49
49
|
* Describe the calling credential
|
|
50
50
|
*
|
|
51
51
|
* Returns who is calling: the key or CLI token (or dashboard session, or sandbox), its organization and
|
|
52
|
-
* project, scopes, spend cap and expiry. Any valid credential may call
|
|
52
|
+
* project, scopes, spend cap, what it has spent this billing period and expiry. Any valid credential may call
|
|
53
|
+
* it, whatever its scopes, so a key without `platform:read` can still see how much of its cap is used.
|
|
53
54
|
*
|
|
54
55
|
* `GET /v1/keys/current` · scope `authenticated` · served by beta-api.b3os.org
|
|
55
56
|
*/
|
|
@@ -114,7 +114,8 @@ export class KeysAPI extends Namespace {
|
|
|
114
114
|
* Describe the calling credential
|
|
115
115
|
*
|
|
116
116
|
* Returns who is calling: the key or CLI token (or dashboard session, or sandbox), its organization and
|
|
117
|
-
* project, scopes, spend cap and expiry. Any valid credential may call
|
|
117
|
+
* project, scopes, spend cap, what it has spent this billing period and expiry. Any valid credential may call
|
|
118
|
+
* it, whatever its scopes, so a key without `platform:read` can still see how much of its cap is used.
|
|
118
119
|
*
|
|
119
120
|
* `GET /v1/keys/current` · scope `authenticated` · served by beta-api.b3os.org
|
|
120
121
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../src/generated/ns/keys.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKpD,MAAM,UAAU,GAAO;IACrB,EAAE,EAAE,kBAAkB;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AACF,MAAM,WAAW,GAA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O,CAAC,KAAK,CAAW,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,KAAa,EAAE,IAA2B,EAAE,OAAwB;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAW,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -46,11 +46,13 @@ export declare class RenderAPI extends Namespace {
|
|
|
46
46
|
*
|
|
47
47
|
* - `css`: drawn by the compositor from CSS gradient layers (no image file), recolorable through `tokens`.
|
|
48
48
|
* - `procedural`: the `studio` pack, our own soft meshes computed by the compositor (no image file, no
|
|
49
|
-
* tokens); the ones tagged `auto` are the set
|
|
49
|
+
* tokens); the ones tagged `auto` are the set a screenshot's `auto` background (and anything's `studio`)
|
|
50
|
+
* picks from.
|
|
50
51
|
* - `image`: a lossless WebP from ScreenFramed's curated library (decisions T9 and T10: Sean's grants as owner
|
|
51
52
|
* of the library), up to 3840 px on the long edge, with its measured tone in `image` (theme, luminance, hue,
|
|
52
53
|
* detail; how `"auto"` matches a page). `image.coverage` is `full-bleed` for backgrounds; the `gradients`
|
|
53
|
-
* group holds transparent shapes (`cutout`) drawn over a matte.
|
|
54
|
+
* group holds transparent shapes (`cutout`) drawn over a matte. The images tagged `video` are the set a video's
|
|
55
|
+
* `auto` background picks from.
|
|
54
56
|
*
|
|
55
57
|
* Rows are in `ref` order, paged by `limit` and `cursor`. A ref whose bytes equal an earlier one's still
|
|
56
58
|
* resolves but is not listed. Public: no API key, rate limited per client address, and answered from the
|
|
@@ -109,6 +111,15 @@ export declare class RenderAPI extends Namespace {
|
|
|
109
111
|
* `final_url` and `page_state` say what the site answered, and `warnings` what a caller should know: an error
|
|
110
112
|
* status, a main area that stayed blank, a page taken before its load event, overlays or a wall left in place.
|
|
111
113
|
*
|
|
114
|
+
* `profile` names a vision profile (ID or name) of the key's project: its cookies and storage load into the
|
|
115
|
+
* page's own browser context before the page loads, so the capture shows the page signed in. It needs
|
|
116
|
+
* `vision:profiles:use` (403 without it, 404 `profile_not_found` for a profile the project does not have),
|
|
117
|
+
* and the answer's `source.profile` is the profile's `prof_` ID. Render writes the state into no answer,
|
|
118
|
+
* stored record or log line, but the image shows whatever the signed-in page shows: treat it and its link as
|
|
119
|
+
* private. A page that is still signed out after the profile loads (a sign-in form, a 401 or 403, a move to a
|
|
120
|
+
* sign-in page, or a sign-in wall) fails with 422 `profile_expired` and bills nothing: sign in again and save
|
|
121
|
+
* the profile.
|
|
122
|
+
*
|
|
112
123
|
* `POST /v1/render/screenshots` · scope `render:run` · served by the node
|
|
113
124
|
*/
|
|
114
125
|
createScreenshot(body: T.ScreenshotCreateRequest, options: RequestOptions & {
|
|
@@ -152,6 +163,15 @@ export declare class RenderAPI extends Namespace {
|
|
|
152
163
|
* (H.264, BT.709), GIF, poster and captions. Artifacts appear as they finish (`video.artifact` events, poster
|
|
153
164
|
* first). Bills `render.video_s` per second of output.
|
|
154
165
|
*
|
|
166
|
+
* `source.profile` names a vision profile (ID or name) of the key's project, found when the video is made
|
|
167
|
+
* (403 without `vision:profiles:use`, 404 `profile_not_found`). When the job runs, its state loads into the
|
|
168
|
+
* probe's browser context and every capture segment's, so the whole video is recorded signed in; the video,
|
|
169
|
+
* its timeline and its events name the profile by its `prof_` ID only, but the video shows whatever the
|
|
170
|
+
* signed-in pages show: treat it and its links as private. A page that opens still signed out (a sign-in form,
|
|
171
|
+
* a 401 or 403, or a move to a sign-in page) ends the job with `profile_expired` before any step runs, and
|
|
172
|
+
* nothing is billed. A recording made with a
|
|
173
|
+
* profile is reused (`recording.reuse`) only by videos with the same revision of the same profile.
|
|
174
|
+
*
|
|
155
175
|
* `POST /v1/render/videos` · scope `render:run` · served by the node
|
|
156
176
|
*/
|
|
157
177
|
createVideo(body: T.VideoCreateRequest, options?: RequestOptions): JobPromise<T.Video, T.VideoEvent>;
|
|
@@ -194,11 +194,13 @@ export class RenderAPI extends Namespace {
|
|
|
194
194
|
*
|
|
195
195
|
* - `css`: drawn by the compositor from CSS gradient layers (no image file), recolorable through `tokens`.
|
|
196
196
|
* - `procedural`: the `studio` pack, our own soft meshes computed by the compositor (no image file, no
|
|
197
|
-
* tokens); the ones tagged `auto` are the set
|
|
197
|
+
* tokens); the ones tagged `auto` are the set a screenshot's `auto` background (and anything's `studio`)
|
|
198
|
+
* picks from.
|
|
198
199
|
* - `image`: a lossless WebP from ScreenFramed's curated library (decisions T9 and T10: Sean's grants as owner
|
|
199
200
|
* of the library), up to 3840 px on the long edge, with its measured tone in `image` (theme, luminance, hue,
|
|
200
201
|
* detail; how `"auto"` matches a page). `image.coverage` is `full-bleed` for backgrounds; the `gradients`
|
|
201
|
-
* group holds transparent shapes (`cutout`) drawn over a matte.
|
|
202
|
+
* group holds transparent shapes (`cutout`) drawn over a matte. The images tagged `video` are the set a video's
|
|
203
|
+
* `auto` background picks from.
|
|
202
204
|
*
|
|
203
205
|
* Rows are in `ref` order, paged by `limit` and `cursor`. A ref whose bytes equal an earlier one's still
|
|
204
206
|
* resolves but is not listed. Public: no API key, rate limited per client address, and answered from the
|
|
@@ -292,6 +294,15 @@ export class RenderAPI extends Namespace {
|
|
|
292
294
|
* (H.264, BT.709), GIF, poster and captions. Artifacts appear as they finish (`video.artifact` events, poster
|
|
293
295
|
* first). Bills `render.video_s` per second of output.
|
|
294
296
|
*
|
|
297
|
+
* `source.profile` names a vision profile (ID or name) of the key's project, found when the video is made
|
|
298
|
+
* (403 without `vision:profiles:use`, 404 `profile_not_found`). When the job runs, its state loads into the
|
|
299
|
+
* probe's browser context and every capture segment's, so the whole video is recorded signed in; the video,
|
|
300
|
+
* its timeline and its events name the profile by its `prof_` ID only, but the video shows whatever the
|
|
301
|
+
* signed-in pages show: treat it and its links as private. A page that opens still signed out (a sign-in form,
|
|
302
|
+
* a 401 or 403, or a move to a sign-in page) ends the job with `profile_expired` before any step runs, and
|
|
303
|
+
* nothing is billed. A recording made with a
|
|
304
|
+
* profile is reused (`recording.reuse`) only by videos with the same revision of the same profile.
|
|
305
|
+
*
|
|
295
306
|
* `POST /v1/render/videos` · scope `render:run` · served by the node
|
|
296
307
|
*/
|
|
297
308
|
createVideo(body, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../src/generated/ns/render.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD,OAAO,EAAsB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG5E,MAAM,aAAa,GAAO;IACxB,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oCAAoC;IAC1C,MAAM,EAAE,CAAC,aAAa,CAAC;IACvB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,aAAa;CACrB,CAAC;AACF,MAAM,iBAAiB,GAAO;IAC5B,EAAE,EAAE,uBAAuB;IAC3B,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,wBAAwB;IAC9B,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,MAAM,qBAAqB,GAAO;IAChC,EAAE,EAAE,2BAA2B;IAC/B,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,8BAA8B;IACpC,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,MAAM,aAAa,GAAO;IACxB,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oBAAoB;IAC1B,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,MAAM,iBAAiB,GAAO;IAC5B,EAA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AE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -34,9 +34,11 @@ export declare const sandboxesOps: {
|
|
|
34
34
|
readonly killProcess: Op;
|
|
35
35
|
readonly openPty: Op;
|
|
36
36
|
readonly waitReady: Op;
|
|
37
|
+
readonly listRequests: Op;
|
|
37
38
|
readonly resumeSandbox: Op;
|
|
38
39
|
readonly runCode: Op;
|
|
39
40
|
readonly createSnapshot: Op;
|
|
41
|
+
readonly getStats: Op;
|
|
40
42
|
readonly createTicket: Op;
|
|
41
43
|
readonly setTimeout: Op;
|
|
42
44
|
};
|
|
@@ -474,6 +476,20 @@ export declare class SandboxesAPI extends Namespace {
|
|
|
474
476
|
* `POST /v1/sandboxes/{sandbox_id}/ready` · scope `sandboxes:run` · served by the node
|
|
475
477
|
*/
|
|
476
478
|
waitReady(sandboxId: string, body?: T.ReadinessWaitRequest, options?: RequestOptions): APIPromise<T.ReadinessResult>;
|
|
479
|
+
/**
|
|
480
|
+
* List the requests a sandbox made
|
|
481
|
+
*
|
|
482
|
+
* Lists the requests code inside this sandbox made to B3OS in the last 7 days (its model calls, scrapes,
|
|
483
|
+
* searches and calls to other sandboxes), newest first, from the node's request log. These are the records
|
|
484
|
+
* `GET /v1/requests?sandbox_id=` lists, for a caller that may read the sandbox: it needs only `sandboxes:read`,
|
|
485
|
+
* not `platform:read`, and never returns another sandbox's records. It takes the same paging and the
|
|
486
|
+
* `product`, `operation_id`, `status`, `trace_id` and `since` filters; any other query parameter is
|
|
487
|
+
* `400 invalid_request`. Requests made to the sandbox's public ports are not listed. A sandbox stopped more
|
|
488
|
+
* than 7 days ago is not found.
|
|
489
|
+
*
|
|
490
|
+
* `GET /v1/sandboxes/{sandbox_id}/requests` · scope `sandboxes:read` · served by the node
|
|
491
|
+
*/
|
|
492
|
+
listRequests(sandboxId: string, params?: T.SandboxesListRequestsParams, options?: RequestOptions): ListPromise<T.RequestRecordList, T.RequestRecord>;
|
|
477
493
|
/**
|
|
478
494
|
* Resume a sandbox
|
|
479
495
|
*
|
|
@@ -524,6 +540,19 @@ export declare class SandboxesAPI extends Namespace {
|
|
|
524
540
|
* `POST /v1/sandboxes/{sandbox_id}/snapshot` · scope `sandboxes:write` · served by the node
|
|
525
541
|
*/
|
|
526
542
|
createSnapshot(sandboxId: string, body?: T.SnapshotCreateRequest, options?: RequestOptions): APIPromise<T.Snapshot>;
|
|
543
|
+
/**
|
|
544
|
+
* Read what a sandbox uses now
|
|
545
|
+
*
|
|
546
|
+
* CPU, memory, disk and process counts of a running sandbox, read now and run no command in it. `cpu.percent`
|
|
547
|
+
* is the share of all the sandbox's vCPUs that was busy over the last `cpu.interval_ms`: since your previous
|
|
548
|
+
* stats read of this sandbox when that was 1 second to 5 minutes ago, else over 250 ms. Memory is the guest
|
|
549
|
+
* kernel's own count (`MemTotal` and `MemAvailable`). `disk` (the root filesystem) and `processes.total` are
|
|
550
|
+
* null in a sandbox whose image predates them. Poll it no faster than every 2 seconds. A paused or stopped
|
|
551
|
+
* sandbox answers `409 sandbox_not_running`.
|
|
552
|
+
*
|
|
553
|
+
* `GET /v1/sandboxes/{sandbox_id}/stats` · scope `sandboxes:read` · served by the node
|
|
554
|
+
*/
|
|
555
|
+
getStats(sandboxId: string, options?: RequestOptions): APIPromise<T.SandboxStats>;
|
|
527
556
|
/**
|
|
528
557
|
* Create a stream ticket
|
|
529
558
|
*
|
|
@@ -221,6 +221,14 @@ const waitReadyOp = {
|
|
|
221
221
|
timeoutMs: 65000,
|
|
222
222
|
scope: "sandboxes:run",
|
|
223
223
|
};
|
|
224
|
+
const listRequestsOp = {
|
|
225
|
+
id: "sandboxesListRequests",
|
|
226
|
+
method: "GET",
|
|
227
|
+
path: "/v1/sandboxes/{sandbox_id}/requests",
|
|
228
|
+
params: ["sandbox_id"],
|
|
229
|
+
timeoutMs: 15000,
|
|
230
|
+
scope: "sandboxes:read",
|
|
231
|
+
};
|
|
224
232
|
const resumeSandboxOp = {
|
|
225
233
|
id: "sandboxesResumeSandbox",
|
|
226
234
|
method: "POST",
|
|
@@ -248,6 +256,14 @@ const createSnapshotOp = {
|
|
|
248
256
|
timeoutMs: 65000,
|
|
249
257
|
scope: "sandboxes:write",
|
|
250
258
|
};
|
|
259
|
+
const getStatsOp = {
|
|
260
|
+
id: "sandboxesGetStats",
|
|
261
|
+
method: "GET",
|
|
262
|
+
path: "/v1/sandboxes/{sandbox_id}/stats",
|
|
263
|
+
params: ["sandbox_id"],
|
|
264
|
+
timeoutMs: 10000,
|
|
265
|
+
scope: "sandboxes:read",
|
|
266
|
+
};
|
|
251
267
|
const createTicketOp = {
|
|
252
268
|
id: "sandboxesCreateTicket",
|
|
253
269
|
method: "POST",
|
|
@@ -292,9 +308,11 @@ export const sandboxesOps = {
|
|
|
292
308
|
killProcess: killProcessOp,
|
|
293
309
|
openPty: openPtyOp,
|
|
294
310
|
waitReady: waitReadyOp,
|
|
311
|
+
listRequests: listRequestsOp,
|
|
295
312
|
resumeSandbox: resumeSandboxOp,
|
|
296
313
|
runCode: runCodeOp,
|
|
297
314
|
createSnapshot: createSnapshotOp,
|
|
315
|
+
getStats: getStatsOp,
|
|
298
316
|
createTicket: createTicketOp,
|
|
299
317
|
setTimeout: setTimeoutOp,
|
|
300
318
|
};
|
|
@@ -739,6 +757,22 @@ export class SandboxesAPI extends Namespace {
|
|
|
739
757
|
waitReady(sandboxId, body, options) {
|
|
740
758
|
return this._client._call(waitReadyOp, { path: [sandboxId], body }, options);
|
|
741
759
|
}
|
|
760
|
+
/**
|
|
761
|
+
* List the requests a sandbox made
|
|
762
|
+
*
|
|
763
|
+
* Lists the requests code inside this sandbox made to B3OS in the last 7 days (its model calls, scrapes,
|
|
764
|
+
* searches and calls to other sandboxes), newest first, from the node's request log. These are the records
|
|
765
|
+
* `GET /v1/requests?sandbox_id=` lists, for a caller that may read the sandbox: it needs only `sandboxes:read`,
|
|
766
|
+
* not `platform:read`, and never returns another sandbox's records. It takes the same paging and the
|
|
767
|
+
* `product`, `operation_id`, `status`, `trace_id` and `since` filters; any other query parameter is
|
|
768
|
+
* `400 invalid_request`. Requests made to the sandbox's public ports are not listed. A sandbox stopped more
|
|
769
|
+
* than 7 days ago is not found.
|
|
770
|
+
*
|
|
771
|
+
* `GET /v1/sandboxes/{sandbox_id}/requests` · scope `sandboxes:read` · served by the node
|
|
772
|
+
*/
|
|
773
|
+
listRequests(sandboxId, params, options) {
|
|
774
|
+
return this._client._list(listRequestsOp, { path: [sandboxId], query: params }, options);
|
|
775
|
+
}
|
|
742
776
|
/**
|
|
743
777
|
* Resume a sandbox
|
|
744
778
|
*
|
|
@@ -795,6 +829,21 @@ export class SandboxesAPI extends Namespace {
|
|
|
795
829
|
createSnapshot(sandboxId, body, options) {
|
|
796
830
|
return this._client._call(createSnapshotOp, { path: [sandboxId], body }, options);
|
|
797
831
|
}
|
|
832
|
+
/**
|
|
833
|
+
* Read what a sandbox uses now
|
|
834
|
+
*
|
|
835
|
+
* CPU, memory, disk and process counts of a running sandbox, read now and run no command in it. `cpu.percent`
|
|
836
|
+
* is the share of all the sandbox's vCPUs that was busy over the last `cpu.interval_ms`: since your previous
|
|
837
|
+
* stats read of this sandbox when that was 1 second to 5 minutes ago, else over 250 ms. Memory is the guest
|
|
838
|
+
* kernel's own count (`MemTotal` and `MemAvailable`). `disk` (the root filesystem) and `processes.total` are
|
|
839
|
+
* null in a sandbox whose image predates them. Poll it no faster than every 2 seconds. A paused or stopped
|
|
840
|
+
* sandbox answers `409 sandbox_not_running`.
|
|
841
|
+
*
|
|
842
|
+
* `GET /v1/sandboxes/{sandbox_id}/stats` · scope `sandboxes:read` · served by the node
|
|
843
|
+
*/
|
|
844
|
+
getStats(sandboxId, options) {
|
|
845
|
+
return this._client._call(getStatsOp, { path: [sandboxId] }, options);
|
|
846
|
+
}
|
|
798
847
|
/**
|
|
799
848
|
* Create a stream ticket
|
|
800
849
|
*
|