@b3os/cli 0.1.0 → 0.2.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.
Files changed (93) hide show
  1. package/README.md +72 -26
  2. package/bin/b3os.js +13 -3
  3. package/dist/commands/_common.d.ts +49 -0
  4. package/dist/commands/_common.js +174 -0
  5. package/dist/commands/_common.js.map +1 -0
  6. package/dist/commands/actions.d.ts +43 -0
  7. package/dist/commands/actions.js +184 -0
  8. package/dist/commands/actions.js.map +1 -0
  9. package/dist/commands/api.d.ts +24 -0
  10. package/dist/commands/api.js +14 -8
  11. package/dist/commands/api.js.map +1 -1
  12. package/dist/commands/app.d.ts +2 -0
  13. package/dist/commands/app.js +577 -0
  14. package/dist/commands/app.js.map +1 -0
  15. package/dist/commands/auth.d.ts +58 -0
  16. package/dist/commands/auth.js +228 -20
  17. package/dist/commands/auth.js.map +1 -1
  18. package/dist/commands/bench.d.ts +22 -0
  19. package/dist/commands/bench.js +19 -7
  20. package/dist/commands/bench.js.map +1 -1
  21. package/dist/commands/connect.d.ts +52 -0
  22. package/dist/commands/connect.js +221 -0
  23. package/dist/commands/connect.js.map +1 -0
  24. package/dist/commands/infer.d.ts +47 -0
  25. package/dist/commands/infer.js +152 -0
  26. package/dist/commands/infer.js.map +1 -0
  27. package/dist/commands/init.d.ts +45 -0
  28. package/dist/commands/init.js +267 -0
  29. package/dist/commands/init.js.map +1 -0
  30. package/dist/commands/keys.d.ts +42 -0
  31. package/dist/commands/keys.js +70 -38
  32. package/dist/commands/keys.js.map +1 -1
  33. package/dist/commands/manifest.d.ts +63 -0
  34. package/dist/commands/manifest.js +398 -0
  35. package/dist/commands/manifest.js.map +1 -0
  36. package/dist/commands/mcp.d.ts +65 -0
  37. package/dist/commands/mcp.js +167 -50
  38. package/dist/commands/mcp.js.map +1 -1
  39. package/dist/commands/render.d.ts +119 -0
  40. package/dist/commands/render.js +294 -0
  41. package/dist/commands/render.js.map +1 -0
  42. package/dist/commands/requests.d.ts +41 -0
  43. package/dist/commands/requests.js +99 -0
  44. package/dist/commands/requests.js.map +1 -0
  45. package/dist/commands/routine.d.ts +53 -1
  46. package/dist/commands/routine.js +246 -110
  47. package/dist/commands/routine.js.map +1 -1
  48. package/dist/commands/sandbox.d.ts +130 -0
  49. package/dist/commands/sandbox.js +327 -55
  50. package/dist/commands/sandbox.js.map +1 -1
  51. package/dist/commands/vision.d.ts +196 -0
  52. package/dist/commands/vision.js +478 -0
  53. package/dist/commands/vision.js.map +1 -0
  54. package/dist/commands/webhooks.d.ts +20 -0
  55. package/dist/commands/webhooks.js +76 -0
  56. package/dist/commands/webhooks.js.map +1 -0
  57. package/dist/ctx.d.ts +80 -6
  58. package/dist/ctx.js +233 -24
  59. package/dist/ctx.js.map +1 -1
  60. package/dist/main.d.ts +4 -1
  61. package/dist/main.js +78 -41
  62. package/dist/main.js.map +1 -1
  63. package/dist/manifest/apply.d.ts +79 -0
  64. package/dist/manifest/apply.js +123 -0
  65. package/dist/manifest/apply.js.map +1 -0
  66. package/dist/manifest/grant.d.ts +1 -0
  67. package/dist/manifest/grant.js +3 -0
  68. package/dist/manifest/grant.js.map +1 -0
  69. package/dist/manifest/load.d.ts +6 -0
  70. package/dist/manifest/load.js +35 -0
  71. package/dist/manifest/load.js.map +1 -0
  72. package/dist/manifest/plan.d.ts +1 -0
  73. package/dist/manifest/plan.js +4 -0
  74. package/dist/manifest/plan.js.map +1 -0
  75. package/dist/manifest/record.d.ts +98 -0
  76. package/dist/manifest/record.js +233 -0
  77. package/dist/manifest/record.js.map +1 -0
  78. package/dist/manifest/skip.d.ts +1 -0
  79. package/dist/manifest/skip.js +3 -0
  80. package/dist/manifest/skip.js.map +1 -0
  81. package/dist/manifest/source.d.ts +48 -0
  82. package/dist/manifest/source.js +223 -0
  83. package/dist/manifest/source.js.map +1 -0
  84. package/dist/registry.d.ts +19 -0
  85. package/dist/registry.js +52 -0
  86. package/dist/registry.js.map +1 -0
  87. package/dist/suggest.d.ts +9 -0
  88. package/dist/suggest.js +51 -0
  89. package/dist/suggest.js.map +1 -0
  90. package/package.json +9 -6
  91. package/dist/commands/web.d.ts +0 -4
  92. package/dist/commands/web.js +0 -205
  93. package/dist/commands/web.js.map +0 -1
@@ -0,0 +1,294 @@
1
+ // b3os screenshot | video | presets (render): render.createScreenshot, render.createVideo and the style presets,
2
+ // with `ls` and `rm` for the screenshots and videos they make.
3
+ import { readFileSync, writeFileSync } from "node:fs";
4
+ import { EXIT, intFlag, parse, UsageError } from "../ctx.js";
5
+ import { imageExtension, imageFormat, jobStatusFlag, removeEach } from "./_common.js";
6
+ const SCREENSHOT_USAGE = `usage: b3os screenshot <url> [--out FILE] [--format webp|png|jpeg] [--width W --height H] [--dpr 1|2|3]
7
+ [--full-page] [--selector CSS] [--background PRESET] [--frame PRESET]
8
+ [--theme light|dark] [--wait-for-ms MS] [--hide CSS ...] [--html FILE] [--json]
9
+ b3os screenshot ls [--limit N] your screenshots, newest first (kept 7 days)
10
+ b3os screenshot rm <shot_…>... [--yes] delete them; their image URLs stop working
11
+ --out's extension picks the format (.webp, .png or .jpg), and WebP is the default: screenshot.webp.`;
12
+ const VIDEO_USAGE = `usage: b3os video <script.json> [--formats mp4,gif,poster] [--out FILE] [--kind KIND] [--no-wait] [--json]
13
+ b3os video ls [--status S] [--limit N] your videos, newest first (kept 7 days)
14
+ b3os video rm <vid_…>... [--yes] delete them; one still rendering is canceled first
15
+ script.json is a render video request (render.yaml VideoCreateRequest: source, beats, voice, style, ...).
16
+ --formats sets the request's formats (default mp4 and poster). One file is saved: --out's extension picks it
17
+ (.mp4, .gif, .jpg for the poster, .vtt or .srt for the captions), or --kind names the artifact (chapters too);
18
+ otherwise the MP4, as <vid_id>.mp4.`;
19
+ /** `screenshot ls|rm` and `video ls|rm`: the first word, when it is one of these rather than a URL or a file. */
20
+ const LIST = new Set(["ls", "list"]);
21
+ const REMOVE = new Set(["rm", "delete"]);
22
+ /** `b3os screenshot`'s options. One named after a request field sets that field (ctx.ts CliOption). */
23
+ export const SCREENSHOT_OPTIONS = {
24
+ out: { type: "string", short: "o" },
25
+ format: { type: "string", fields: ["renderCreateScreenshot:format"] },
26
+ width: { type: "string", fields: ["renderCreateScreenshot:viewport.width"] },
27
+ height: { type: "string", fields: ["renderCreateScreenshot:viewport.height"] },
28
+ dpr: { type: "string", fields: ["renderCreateScreenshot:dpr"] },
29
+ "full-page": { type: "boolean", fields: ["renderCreateScreenshot:full_page"] },
30
+ selector: { type: "string", fields: ["renderCreateScreenshot:target.selector"] },
31
+ background: { type: "string", fields: ["renderCreateScreenshot:style.background"] },
32
+ frame: { type: "string", fields: ["renderCreateScreenshot:style.frame"] },
33
+ theme: { type: "string", fields: ["renderCreateScreenshot:theme"] },
34
+ "wait-for-ms": { type: "string", alias: ["wait-for"], fields: ["renderCreateScreenshot:wait_for_ms"] },
35
+ hide: { type: "string", multiple: true, fields: ["renderCreateScreenshot:hide"] },
36
+ profile: { type: "string", fields: ["renderCreateScreenshot:profile"] },
37
+ html: { type: "string", fields: ["renderCreateScreenshot:html"] },
38
+ limit: { type: "string", fields: ["renderListScreenshots:limit"] },
39
+ };
40
+ export async function screenshot(ctx, argv) {
41
+ const a = parse(argv, SCREENSHOT_OPTIONS);
42
+ ctx.applyGlobals(a.values);
43
+ const url = a.positionals[0];
44
+ if ((!url && !a.values.html) || a.values.help) {
45
+ ctx.out(SCREENSHOT_USAGE);
46
+ return a.values.help ? EXIT.OK : EXIT.USAGE;
47
+ }
48
+ if (url && LIST.has(url)) {
49
+ const page = await ctx.client().render.listScreenshots({ limit: intFlag(a.values.limit, "--limit") });
50
+ ctx.result(page, () => ctx.table(page.data.map((x) => ({
51
+ ...x,
52
+ size: `${x.width}x${x.height}`,
53
+ source: x.source.url ?? (x.source.html ? "(html)" : null),
54
+ })), ["id", "format", "size", "source", "created_at", "expires_at"]));
55
+ return EXIT.OK;
56
+ }
57
+ if (url && REMOVE.has(url)) {
58
+ const ids = a.positionals.slice(1);
59
+ return removeEach(ctx, ids, {
60
+ need: "screenshot rm needs at least one screenshot id (shot_…); b3os screenshot ls lists them",
61
+ question: `Delete ${ids.join(", ")}? Their image URLs stop working within a minute.`,
62
+ remove: (id) => ctx.client().render.deleteScreenshot(id),
63
+ });
64
+ }
65
+ const outFlag = typeof a.values.out === "string" ? a.values.out : undefined;
66
+ const format = imageFormat(outFlag, a.values.format, "--out");
67
+ const body = { format };
68
+ if (url)
69
+ body.url = url;
70
+ if (typeof a.values.html === "string")
71
+ body.html = readFileSync(a.values.html, "utf8");
72
+ const w = intFlag(a.values.width, "--width");
73
+ const h = intFlag(a.values.height, "--height");
74
+ if (w !== undefined || h !== undefined)
75
+ body.viewport = { width: w ?? 1600, height: h ?? 900 };
76
+ const dpr = intFlag(a.values.dpr, "--dpr");
77
+ if (dpr !== undefined)
78
+ body.dpr = dpr;
79
+ if (a.values["full-page"])
80
+ body.full_page = true;
81
+ if (typeof a.values.selector === "string")
82
+ body.target = { selector: a.values.selector };
83
+ if (a.values.background || a.values.frame) {
84
+ body.style = {};
85
+ if (typeof a.values.background === "string")
86
+ body.style.background = a.values.background;
87
+ if (typeof a.values.frame === "string")
88
+ body.style.frame = a.values.frame;
89
+ }
90
+ if (typeof a.values.theme === "string")
91
+ body.theme = a.values.theme;
92
+ const wait = intFlag(a.values["wait-for-ms"], "--wait-for-ms");
93
+ if (wait !== undefined)
94
+ body.wait_for_ms = wait;
95
+ if (a.values.hide)
96
+ body.hide = a.values.hide;
97
+ if (typeof a.values.profile === "string")
98
+ body.profile = a.values.profile;
99
+ const b3 = ctx.client();
100
+ if (ctx.json) {
101
+ ctx.printJson(await b3.render.createScreenshot(body));
102
+ return EXIT.OK;
103
+ }
104
+ const accept = format === "jpeg" ? "image/jpeg" : format === "webp" ? "image/webp" : "image/png";
105
+ const { data, response } = await b3.render.createScreenshot(body, { accept }).withResponse();
106
+ const out = outFlag ?? `screenshot.${imageExtension(format)}`;
107
+ writeFileSync(out, data);
108
+ const t = response.timing.total_ms;
109
+ const id = response.headers.get("x-b3os-screenshot-id");
110
+ ctx.out(out);
111
+ ctx.info(`${id ? `${id}, ` : ""}${data.byteLength} bytes${t === null ? "" : `, server ${t} ms`}`);
112
+ return EXIT.OK;
113
+ }
114
+ function readJsonFile(path) {
115
+ const text = readFileSync(path, "utf8");
116
+ try {
117
+ return JSON.parse(text);
118
+ }
119
+ catch (e) {
120
+ throw new UsageError(`${path} is not JSON (${e.message}); video scripts are VideoCreateRequest JSON`);
121
+ }
122
+ }
123
+ /** `b3os video`'s options. `--kind` picks the artifact to save by its `kind`; it is not a request field. */
124
+ export const VIDEO_OPTIONS = {
125
+ out: { type: "string", short: "o" },
126
+ "no-wait": { type: "boolean" },
127
+ formats: { type: "string", multiple: true, fields: ["renderCreateVideo:formats"] },
128
+ kind: { type: "string" },
129
+ status: { type: "string", fields: ["renderListVideos:status"] },
130
+ limit: { type: "string", fields: ["renderListVideos:limit"] },
131
+ };
132
+ const VIDEO_FORMATS = ["mp4", "gif", "poster"];
133
+ /** The artifact kind a file name asks for, by its extension. */
134
+ const KIND_OF_EXTENSION = {
135
+ mp4: "mp4",
136
+ gif: "gif",
137
+ jpg: "poster",
138
+ jpeg: "poster",
139
+ vtt: "vtt",
140
+ srt: "srt",
141
+ };
142
+ /**
143
+ * `video`: the formats to ask for (--formats over the script's) and the artifact kind to save: --kind, else
144
+ * --out's extension, else the MP4 (or the first format when the request has none). Refuses an --out extension and
145
+ * a --kind that disagree, and a format to save that the request does not make.
146
+ */
147
+ export function videoOutput(script, flags) {
148
+ let formats = script.formats;
149
+ if (flags.formats !== undefined) {
150
+ const list = flags.formats.flatMap((f) => f.split(",")).filter(Boolean);
151
+ for (const f of list)
152
+ if (!VIDEO_FORMATS.includes(f))
153
+ throw new UsageError(`--formats takes ${VIDEO_FORMATS.join(", ")}; got "${f}"`);
154
+ formats = [...new Set(list)];
155
+ }
156
+ const out = typeof flags.out === "string" ? flags.out : undefined;
157
+ const ext = out ? /\.([^./\\]+)$/.exec(out)?.[1]?.toLowerCase() : undefined;
158
+ const fromExt = ext === undefined ? undefined : KIND_OF_EXTENSION[ext];
159
+ const kind = typeof flags.kind === "string" ? flags.kind : undefined;
160
+ if (kind && fromExt && kind !== fromExt && !(kind === "chapters" && fromExt === "vtt"))
161
+ throw new UsageError(`--out ${out} saves the ${fromExt} artifact but --kind is ${kind}; drop one`);
162
+ if (!kind && ext !== undefined && !fromExt)
163
+ throw new UsageError(`--out ${out}: name the file .mp4, .gif, .jpg (the poster), .vtt or .srt (the captions), or pass --kind`);
164
+ const asked = formats ?? ["mp4", "poster"];
165
+ const save = kind ?? fromExt ?? (asked.includes("mp4") ? "mp4" : (asked[0] ?? "mp4"));
166
+ if (VIDEO_FORMATS.includes(save) && !asked.includes(save))
167
+ throw new UsageError(`${kind ? `--kind ${kind}` : `--out ${out}`} saves the ${save}, but the request's formats are ${asked.join(", ")}: add --formats ${[...asked, save].join(",")}`);
168
+ return { formats, kind: save };
169
+ }
170
+ export async function video(ctx, argv) {
171
+ const a = parse(argv, VIDEO_OPTIONS);
172
+ ctx.applyGlobals(a.values);
173
+ const file = a.positionals[0];
174
+ if (!file || a.values.help) {
175
+ ctx.out(VIDEO_USAGE);
176
+ return a.values.help ? EXIT.OK : EXIT.USAGE;
177
+ }
178
+ if (LIST.has(file)) {
179
+ const status = jobStatusFlag(a.values.status);
180
+ const page = await ctx.client().render.listVideos({
181
+ limit: intFlag(a.values.limit, "--limit"),
182
+ ...(status ? { status } : {}),
183
+ });
184
+ ctx.result(page, () => ctx.table(page.data.map((v) => ({ ...v, source: v.source?.url })), ["id", "status", "source", "created_at", "expires_at"]));
185
+ return EXIT.OK;
186
+ }
187
+ if (REMOVE.has(file)) {
188
+ const ids = a.positionals.slice(1);
189
+ return removeEach(ctx, ids, {
190
+ need: "video rm needs at least one video id (vid_…); b3os video ls lists them",
191
+ question: `Delete ${ids.join(", ")}? A video still rendering is canceled; its files and share page are deleted.`,
192
+ remove: (id) => ctx.client().render.deleteVideo(id),
193
+ });
194
+ }
195
+ const body = readJsonFile(file);
196
+ const { formats, kind } = videoOutput(body, a.values);
197
+ if (formats)
198
+ body.formats = formats;
199
+ const b3 = ctx.client();
200
+ if (a.values["no-wait"]) {
201
+ const job = await b3.render.createVideo(body);
202
+ ctx.result(job, () => ctx.out(job.id));
203
+ return EXIT.OK;
204
+ }
205
+ const stream = b3.render.createVideo(body).events();
206
+ let named = false;
207
+ for await (const ev of stream) {
208
+ if (ctx.json)
209
+ ctx.printJsonLine(ev);
210
+ else {
211
+ // The ID first, so a video left rendering after Ctrl-C can be found (video ls) and deleted (video rm).
212
+ if (!named && ev.job_id) {
213
+ ctx.info(`video ${ev.job_id}`);
214
+ named = true;
215
+ }
216
+ logVideoEvent(ctx, ev);
217
+ }
218
+ }
219
+ const done = await stream.result;
220
+ if (done.status !== "succeeded") {
221
+ ctx.warn(`video ${done.id} ${done.status}: ${done.error?.detail ?? ""}`);
222
+ return EXIT.FAILED;
223
+ }
224
+ const art = done.result?.artifacts.find((x) => x.kind === kind);
225
+ if (!art?.url) {
226
+ ctx.warn(`video ${done.id} has no ${kind} artifact`);
227
+ return EXIT.FAILED;
228
+ }
229
+ const out = typeof a.values.out === "string"
230
+ ? a.values.out
231
+ : `${done.id}.${kind === "poster" ? "jpg" : kind === "chapters" ? "chapters.vtt" : kind}`;
232
+ const res = await fetch(art.url);
233
+ if (!res.ok)
234
+ throw new Error(`download of ${art.url} answered ${res.status}`);
235
+ writeFileSync(out, new Uint8Array(await res.arrayBuffer()));
236
+ if (!ctx.json)
237
+ ctx.out(out);
238
+ return EXIT.OK;
239
+ }
240
+ function logVideoEvent(ctx, ev) {
241
+ const e = ev;
242
+ if (e.type === "video.phase" && e.phase)
243
+ ctx.info(`${e.phase}...`);
244
+ else if (e.type === "job.progress" && e.progress)
245
+ ctx.info(`${e.progress.completed}/${e.progress.total ?? "?"}`);
246
+ else if (e.type.startsWith("job."))
247
+ ctx.info(e.type.slice(4));
248
+ }
249
+ const PRESETS_USAGE = `usage: b3os presets [--kind background|frame|cursor|captions|click_effect]
250
+ Style presets for screenshots and videos, with their preview images.`;
251
+ /** `b3os presets`'s options. */
252
+ export const PRESETS_OPTIONS = {
253
+ kind: { type: "string", fields: ["renderListPresets:kind"] },
254
+ };
255
+ export async function presets(ctx, argv) {
256
+ const a = parse(argv, PRESETS_OPTIONS);
257
+ ctx.applyGlobals(a.values);
258
+ if (a.values.help) {
259
+ ctx.out(PRESETS_USAGE);
260
+ return EXIT.OK;
261
+ }
262
+ // GET /v1/render/presets is public (no API key, edge-cached), so the SDK has no namespace method for it.
263
+ const kind = typeof a.values.kind === "string" ? a.values.kind : undefined;
264
+ const r = await ctx
265
+ .client()
266
+ .request({ method: "GET", path: "/v1/render/presets", query: kind ? { kind } : {}, edge: true });
267
+ ctx.result(r, () => ctx.table(r.data, ["id", "kind", "name", "preview_url"]));
268
+ return EXIT.OK;
269
+ }
270
+ /** This module's commands, found by main.ts (src/registry.ts). */
271
+ export const commands = [
272
+ {
273
+ name: "screenshot",
274
+ summary: "Take a styled screenshot and save the image",
275
+ order: 100,
276
+ run: screenshot,
277
+ options: SCREENSHOT_OPTIONS,
278
+ },
279
+ {
280
+ name: "video",
281
+ summary: "Render a scripted product video and save it",
282
+ order: 110,
283
+ run: video,
284
+ options: VIDEO_OPTIONS,
285
+ },
286
+ {
287
+ name: "presets",
288
+ summary: "Style presets for screenshots and videos, with previews",
289
+ order: 120,
290
+ run: presets,
291
+ options: PRESETS_OPTIONS,
292
+ },
293
+ ];
294
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/commands/render.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,+DAA+D;AAE/D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEtD,OAAO,EAAY,IAAI,EAAE,OAAO,EAAgB,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAErF,OAAO,EAAE,cAA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AAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/G,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC9E,OAAO,IAAI,CAAC,EAAE,CAAC;AACjB,CAAC;AAED,kEAAkE;AAClE,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC;QACE,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,UAAU;QACf,OAAO,EAAE,kBAAkB;KAC5B;IACD;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,aAAa;KACvB;IACD;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,yDAAyD;QAClE,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,OAAO;QACZ,OAAO,EAAE,eAAe;KACzB;CACF,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { type B3OS, type RequestRecordList, type SandboxesListRequestsParams } from "@b3os/sdk";
2
+ import { type Ctx } from "../ctx.ts";
3
+ import type { CliCommand } from "../registry.ts";
4
+ /**
5
+ * A page of the requests code in one sandbox made, under sandboxes:read (GET /v1/sandboxes/{id}/requests). An edge or
6
+ * node from before that route answers 404 route_not_found; then the project's log filtered to the sandbox is read
7
+ * (GET /v1/requests?sandbox_id=, platform:read), as the CLI did before.
8
+ */
9
+ export declare function sandboxRequests(b3: B3OS, sandboxId: string, params: SandboxesListRequestsParams): Promise<RequestRecordList>;
10
+ /** `b3os requests`'s options, each named after the query parameter it sets. */
11
+ export declare const REQUESTS_OPTIONS: {
12
+ readonly product: {
13
+ readonly type: "string";
14
+ readonly fields: readonly ["platformListRequests:product"];
15
+ };
16
+ readonly status: {
17
+ readonly type: "string";
18
+ readonly fields: readonly ["platformListRequests:status"];
19
+ };
20
+ readonly "operation-id": {
21
+ readonly type: "string";
22
+ readonly alias: readonly ["operation"];
23
+ readonly fields: readonly ["platformListRequests:operation_id"];
24
+ };
25
+ readonly "sandbox-id": {
26
+ readonly type: "string";
27
+ readonly alias: readonly ["sandbox"];
28
+ readonly fields: readonly ["platformListRequests:sandbox_id", "sandboxesListRequests:sandbox_id"];
29
+ };
30
+ readonly since: {
31
+ readonly type: "string";
32
+ readonly fields: readonly ["platformListRequests:since"];
33
+ };
34
+ readonly limit: {
35
+ readonly type: "string";
36
+ readonly fields: readonly ["platformListRequests:limit"];
37
+ };
38
+ };
39
+ export declare function requests(ctx: Ctx, argv: string[]): Promise<number>;
40
+ /** This module's commands, found by main.ts (src/registry.ts). */
41
+ export declare const commands: CliCommand[];
@@ -0,0 +1,99 @@
1
+ // b3os requests (platform): the node's request log with timing phases.
2
+ import { B3OSError, } from "@b3os/sdk";
3
+ import { CliError, EXIT, intFlag, parse, UsageError } from "../ctx.js";
4
+ const REQUESTS_USAGE = `usage: b3os requests [ls] [--product P] [--status 2xx|4xx|5xx] [--operation-id ID] [--sandbox-id sbx_…]
5
+ [--since RFC3339] [--limit N]
6
+ b3os requests get <req_id> one request with its timing phases (the node keeps 7 days)
7
+
8
+ With --sandbox-id it lists the calls code in that sandbox made, which needs only sandboxes:read; the rest of the
9
+ log needs platform:read.`;
10
+ /**
11
+ * A page of the requests code in one sandbox made, under sandboxes:read (GET /v1/sandboxes/{id}/requests). An edge or
12
+ * node from before that route answers 404 route_not_found; then the project's log filtered to the sandbox is read
13
+ * (GET /v1/requests?sandbox_id=, platform:read), as the CLI did before.
14
+ */
15
+ export async function sandboxRequests(b3, sandboxId, params) {
16
+ try {
17
+ return await b3.sandboxes.listRequests(sandboxId, params);
18
+ }
19
+ catch (e) {
20
+ if (!(e instanceof B3OSError && e.status === 404 && e.code === "route_not_found"))
21
+ throw e;
22
+ try {
23
+ return await b3.requests.listRequests({ ...params, sandbox_id: sandboxId });
24
+ }
25
+ catch (f) {
26
+ // Harness run 3: a deploy key (no platform:read) on such a node got only "lacks the scope platform:read",
27
+ // while the help says sandboxes:read is enough. Say which route is missing and why the fallback was refused.
28
+ if (!(f instanceof B3OSError && f.status === 403))
29
+ throw f;
30
+ throw new CliError(`this node predates GET /v1/sandboxes/{id}/requests (404 route_not_found), and the project's request log ` +
31
+ `read in its place needs platform:read, which this key lacks (request ${f.requestId ?? "?"})`, {
32
+ code: "forbidden",
33
+ exit: EXIT.AUTH,
34
+ hint: `the console's request log lists ${sandboxId}'s calls; a key with platform:read reads them here`,
35
+ });
36
+ }
37
+ }
38
+ }
39
+ /** `b3os requests`'s options, each named after the query parameter it sets. */
40
+ export const REQUESTS_OPTIONS = {
41
+ product: { type: "string", fields: ["platformListRequests:product"] },
42
+ status: { type: "string", fields: ["platformListRequests:status"] },
43
+ "operation-id": { type: "string", alias: ["operation"], fields: ["platformListRequests:operation_id"] },
44
+ "sandbox-id": {
45
+ type: "string",
46
+ alias: ["sandbox"],
47
+ fields: ["platformListRequests:sandbox_id", "sandboxesListRequests:sandbox_id"],
48
+ },
49
+ since: { type: "string", fields: ["platformListRequests:since"] },
50
+ limit: { type: "string", fields: ["platformListRequests:limit"] },
51
+ };
52
+ export async function requests(ctx, argv) {
53
+ const sub = argv[0] && !argv[0].startsWith("-") ? argv[0] : "ls";
54
+ const rest = argv[0] && !argv[0].startsWith("-") ? argv.slice(1) : argv;
55
+ const a = parse(rest, REQUESTS_OPTIONS);
56
+ ctx.applyGlobals(a.values);
57
+ if (a.values.help) {
58
+ ctx.out(REQUESTS_USAGE);
59
+ return EXIT.OK;
60
+ }
61
+ const b3 = ctx.client();
62
+ if (sub === "get") {
63
+ const id = a.positionals[0];
64
+ if (!id)
65
+ throw new UsageError("requests get needs a req_ id");
66
+ ctx.printJson(await b3.requests.getRequest(id));
67
+ return EXIT.OK;
68
+ }
69
+ if (sub !== "ls" && sub !== "list")
70
+ throw new UsageError(`unknown requests command "${sub}"\n${REQUESTS_USAGE}`);
71
+ const s = (k) => (typeof a.values[k] === "string" ? a.values[k] : undefined);
72
+ const status = s("status");
73
+ if (status !== undefined && status !== "2xx" && status !== "4xx" && status !== "5xx")
74
+ throw new UsageError("--status is 2xx, 4xx or 5xx");
75
+ const params = { limit: intFlag(a.values.limit, "--limit") ?? 20 };
76
+ if (s("product"))
77
+ params.product = s("product");
78
+ if (status)
79
+ params.status = status;
80
+ if (s("operation-id"))
81
+ params.operation_id = s("operation-id");
82
+ if (s("since"))
83
+ params.since = s("since");
84
+ const sandbox = s("sandbox-id");
85
+ const page = sandbox ? await sandboxRequests(b3, sandbox, params) : await b3.requests.listRequests(params);
86
+ ctx.result(page, () => ctx.table(page.data, ["id", "method", "path", "status_code", "duration_ms", "started_at"]));
87
+ return EXIT.OK;
88
+ }
89
+ /** This module's commands, found by main.ts (src/registry.ts). */
90
+ export const commands = [
91
+ {
92
+ name: "requests",
93
+ summary: "Your recent requests and their timing (the node's request log)",
94
+ order: 180,
95
+ run: requests,
96
+ options: REQUESTS_OPTIONS,
97
+ },
98
+ ];
99
+ //# sourceMappingURL=requests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requests.js","sourceRoot":"","sources":["../../src/commands/requests.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,OAAO,EAEL,SAAS,GAIV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAY,IAAI,EAAE,OAAO,EAAgB,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG/F,MAAM,cAAc,GAAG;;;;;yBAKE,CAAC;AAE1B;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,EAAQ,EACR,SAAiB,EACjB,MAAmC;IAEnC,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAA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AE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3G,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACnH,OAAO,IAAI,CAAC,EAAE,CAAC;AACjB,CAAC;AAED,kEAAkE;AAClE,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,gEAAgE;QACzE,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,QAAQ;QACb,OAAO,EAAE,gBAAgB;KAC1B;CACF,CAAC"}
@@ -1,5 +1,57 @@
1
+ import { type Routine } from "@b3os/sdk";
1
2
  import { type Ctx } from "../ctx.ts";
3
+ import type { CliCommand } from "../registry.ts";
2
4
  /** The routine's name from its definition (JSON `name`, or a top-level `name:` line of YAML). */
3
5
  export declare function routineName(text: string, file: string): string;
6
+ /** The earliest next run among a routine's active triggers, or null when none is scheduled. */
7
+ export declare function nextRun(r: Pick<Routine, "status" | "triggers">): string | null;
8
+ /** `b3os routine`'s options. One named after a request field sets that field (ctx.ts CliOption). */
9
+ export declare const ROUTINE_OPTIONS: {
10
+ readonly name: {
11
+ readonly type: "string";
12
+ readonly fields: readonly ["routinesPublishRoutine:routine"];
13
+ readonly rename: "the routine's name is the path";
14
+ };
15
+ readonly input: {
16
+ readonly type: "string";
17
+ readonly fields: readonly ["routinesCreateRun:input", "routinesReplayRun:input"];
18
+ };
19
+ readonly version: {
20
+ readonly type: "string";
21
+ readonly fields: readonly ["routinesCreateRun:version", "routinesReplayRun:version", "routinesRollbackRoutine:version"];
22
+ };
23
+ readonly "no-wait": {
24
+ readonly type: "boolean";
25
+ };
26
+ readonly follow: {
27
+ readonly type: "boolean";
28
+ readonly short: "f";
29
+ };
30
+ readonly limit: {
31
+ readonly type: "string";
32
+ readonly fields: readonly ["routinesListRoutines:limit", "routinesListRuns:limit", "routinesListVersions:limit"];
33
+ };
34
+ readonly payload: {
35
+ readonly type: "string";
36
+ readonly fields: readonly ["routinesSignalRun:payload"];
37
+ };
38
+ readonly format: {
39
+ readonly type: "string";
40
+ readonly fields: readonly ["routinesImportRoutine:format"];
41
+ };
42
+ readonly publish: {
43
+ readonly type: "boolean";
44
+ readonly alias: readonly ["deploy"];
45
+ };
46
+ readonly "from-step": {
47
+ readonly type: "string";
48
+ readonly fields: readonly ["routinesReplayRun:from_step"];
49
+ };
50
+ readonly status: {
51
+ readonly type: "string";
52
+ readonly fields: readonly ["routinesListRuns:status"];
53
+ };
54
+ };
4
55
  export declare function routine(ctx: Ctx, argv: string[]): Promise<number>;
5
- export declare function action(ctx: Ctx, argv: string[]): Promise<number>;
56
+ /** This module's commands, found by main.ts (src/registry.ts). */
57
+ export declare const commands: CliCommand[];