@b3os/cli 0.2.0 → 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 +1 -0
- package/dist/commands/app.d.ts +5 -0
- package/dist/commands/app.js +373 -28
- package/dist/commands/app.js.map +1 -1
- package/dist/commands/auth.d.ts +18 -0
- package/dist/commands/auth.js +47 -12
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/manifest.js +24 -13
- package/dist/commands/manifest.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 +1 -1
- package/dist/manifest/apply.d.ts +4 -0
- package/dist/manifest/apply.js +2 -0
- package/dist/manifest/apply.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// b3os tool publish <dir> | earnings (hosted tools, slice A). A hosted tool is a pack whose actions run in a fresh
|
|
2
|
+
// microVM; packages/packs/src/cli/tool.ts builds a tool's directory into <dir>/dist/ (the archive, the signed
|
|
3
|
+
// manifest, the pack bundle). `publish` uploads that build: HEAD the archive, PUT it when the registry does not have
|
|
4
|
+
// it, then POST the pack; it prints the version, the exact pin of each action and one `b3os action call` line.
|
|
5
|
+
// `earnings` reads a namespace's earnings line: calls, gross, B3OS's cut at the rate in force and why, net.
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
8
|
+
import { join } from "node:path";
|
|
9
|
+
import { B3OSError } from "@b3os/sdk";
|
|
10
|
+
import { CliError, EXIT, parse, splitSub, UsageError } from "../ctx.js";
|
|
11
|
+
import { showUsage, unknownSub } from "./_common.js";
|
|
12
|
+
const TOOL_USAGE = `usage: b3os tool <command>
|
|
13
|
+
publish <dir> upload <dir>/dist/ (archive, then pack); print the pins
|
|
14
|
+
earnings [--namespace NS] [--period YYYY-MM] a namespace's earnings line, with B3OS's rate and why
|
|
15
|
+
|
|
16
|
+
Build first: node packages/packs/src/cli/tool.ts build <dir> --kid <namespace>#dev-<label>. Publishing a hosted
|
|
17
|
+
tool needs a key with actions:tools:publish (named exactly: * and actions:* do not grant it) and actions:write.`;
|
|
18
|
+
/** `b3os tool`'s options, each named after the request field it sets. */
|
|
19
|
+
export const TOOL_OPTIONS = {
|
|
20
|
+
namespace: { type: "string", fields: ["platformGetPublisherEarnings:namespace"] },
|
|
21
|
+
period: { type: "string", fields: ["platformGetPublisherEarnings:period"] },
|
|
22
|
+
};
|
|
23
|
+
/** USD from micro-USD: two decimals, more only when the amount has them ($1.23, $0.002, $0.000001). */
|
|
24
|
+
export function usd(micro) {
|
|
25
|
+
const s = (micro / 1_000_000).toFixed(6).replace(/0{1,4}$/, "");
|
|
26
|
+
return `$${s.endsWith(".") ? `${s}00` : s}`;
|
|
27
|
+
}
|
|
28
|
+
const pct = (rate) => `${Math.round(rate * 1000) / 10}%`;
|
|
29
|
+
/** The rate in force and why, as one phrase. */
|
|
30
|
+
export function rateLine(e) {
|
|
31
|
+
const t = e.take;
|
|
32
|
+
if (t.reason === "founding") {
|
|
33
|
+
if (!t.first_priced_call_on)
|
|
34
|
+
return "0% (founding: no priced call by another organization yet)";
|
|
35
|
+
return `0% until $1,000 of sales or ${t.founding_ends_on}, whichever comes first (${usd(t.sales_to_date_micro_usd)} so far)`;
|
|
36
|
+
}
|
|
37
|
+
const why = t.reason === "standard_after_12_months"
|
|
38
|
+
? `12 months after the first priced call on ${t.first_priced_call_on}`
|
|
39
|
+
: "sales passed $1,000";
|
|
40
|
+
return `${pct(t.rate)} since ${t.standard_since} (${why})`;
|
|
41
|
+
}
|
|
42
|
+
/** The earnings line as the console shows it, plus the parts of a period that straddles the change. */
|
|
43
|
+
export function earningsText(e) {
|
|
44
|
+
const lines = [
|
|
45
|
+
`${e.namespace} ${e.period}: earned ${usd(e.gross_micro_usd)} from ${e.calls} call${e.calls === 1 ? "" : "s"}. ` +
|
|
46
|
+
`B3OS keeps ${usd(e.fee_micro_usd)} (${rateLine(e)}). Net ${usd(e.net_micro_usd)}, ${e.status} (nothing is paid out in this version).`,
|
|
47
|
+
];
|
|
48
|
+
if (e.parts.length > 1)
|
|
49
|
+
for (const p of e.parts)
|
|
50
|
+
lines.push(` at ${pct(p.rate)}: ${usd(p.gross_micro_usd)}, B3OS keeps ${usd(p.fee_micro_usd)}`);
|
|
51
|
+
return lines;
|
|
52
|
+
}
|
|
53
|
+
/** A shell-safe single-quoted word. */
|
|
54
|
+
const quoted = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
|
|
55
|
+
/** One `b3os action call` line for the pack's first action, with its first example's input when it has one. */
|
|
56
|
+
function callLine(dir, m) {
|
|
57
|
+
const a = m.actions[0];
|
|
58
|
+
if (!a)
|
|
59
|
+
return "";
|
|
60
|
+
let input = {};
|
|
61
|
+
for (const ex of a.examples ?? []) {
|
|
62
|
+
if ("input" in ex) {
|
|
63
|
+
input = ex.input;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
const p = join(dir, ex.fixture);
|
|
67
|
+
if (existsSync(p)) {
|
|
68
|
+
input = JSON.parse(readFileSync(p, "utf8")).input ?? {};
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return `b3os action call ${m.pack}/${a.key}@${m.version} --input ${quoted(JSON.stringify(input))}`;
|
|
73
|
+
}
|
|
74
|
+
async function publish(ctx, dir) {
|
|
75
|
+
const dist = join(dir, "dist");
|
|
76
|
+
const manifestPath = join(dist, "b3pack.json");
|
|
77
|
+
if (!existsSync(manifestPath)) {
|
|
78
|
+
if (existsSync(join(dist, "release-request.json")))
|
|
79
|
+
throw new CliError(`${dist} holds a release request, not a signed build: nothing to publish`, {
|
|
80
|
+
code: "not_built",
|
|
81
|
+
exit: EXIT.USAGE,
|
|
82
|
+
hint: "the release key's holder signs the request's message; or build with a dev key id on a dev registry",
|
|
83
|
+
});
|
|
84
|
+
throw new CliError(`${dist} has no build`, {
|
|
85
|
+
code: "not_built",
|
|
86
|
+
exit: EXIT.USAGE,
|
|
87
|
+
hint: `node packages/packs/src/cli/tool.ts build ${dir} --kid <namespace>#dev-<label>`,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const m = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
91
|
+
const ar = m.tool?.bundle?.archive;
|
|
92
|
+
if (!ar)
|
|
93
|
+
throw new CliError(`${manifestPath} has no tool.bundle.archive: not a hosted tool`, {
|
|
94
|
+
code: "not_a_tool",
|
|
95
|
+
exit: EXIT.INVALID,
|
|
96
|
+
});
|
|
97
|
+
const archivePath = join(dist, `archive.${ar.format}`);
|
|
98
|
+
if (!existsSync(archivePath))
|
|
99
|
+
throw new CliError(`${archivePath} is missing; build again`, { code: "not_built", exit: EXIT.USAGE });
|
|
100
|
+
const archive = readFileSync(archivePath);
|
|
101
|
+
const sha = createHash("sha256").update(archive).digest("hex");
|
|
102
|
+
if (sha !== ar.sha256 || archive.length !== ar.bytes)
|
|
103
|
+
throw new CliError(`${archivePath} is sha256:${sha}, ${archive.length} bytes; the manifest names sha256:${ar.sha256}, ${ar.bytes} bytes`, {
|
|
104
|
+
code: "archive_mismatch",
|
|
105
|
+
exit: EXIT.INVALID,
|
|
106
|
+
hint: "build again: the archive and the manifest come from one build",
|
|
107
|
+
});
|
|
108
|
+
const bundle = readFileSync(join(dist, "bundle.tar.gz"));
|
|
109
|
+
const b3 = ctx.client();
|
|
110
|
+
const digest = `sha256:${ar.sha256}`;
|
|
111
|
+
let uploaded = false;
|
|
112
|
+
try {
|
|
113
|
+
await b3.actions.headRegistryBlob(digest);
|
|
114
|
+
}
|
|
115
|
+
catch (e) {
|
|
116
|
+
if (!(e instanceof B3OSError && e.status === 404))
|
|
117
|
+
throw e;
|
|
118
|
+
ctx.info(`uploading the archive ${digest} (${archive.length} bytes)`);
|
|
119
|
+
await b3.actions.putRegistryBlob(digest, archive);
|
|
120
|
+
uploaded = true;
|
|
121
|
+
}
|
|
122
|
+
const v = await b3.actions.publishPack(bundle);
|
|
123
|
+
const pins = m.actions.map((a) => `${m.pack}/${a.key}@${m.version}`);
|
|
124
|
+
const call = callLine(dir, m);
|
|
125
|
+
ctx.result({ ...v, archive: { digest, bytes: ar.bytes, uploaded }, pins, call }, () => {
|
|
126
|
+
ctx.out(`published ${v.pack}@${v.version} (signed ${v.signature.kid})`);
|
|
127
|
+
ctx.out(`archive ${digest}, ${ar.bytes} bytes, ${uploaded ? "uploaded" : "already in the registry"}`);
|
|
128
|
+
for (const p of pins)
|
|
129
|
+
ctx.out(`pin ${p}`);
|
|
130
|
+
ctx.out(`call it: ${call}`);
|
|
131
|
+
});
|
|
132
|
+
return EXIT.OK;
|
|
133
|
+
}
|
|
134
|
+
/** The namespace of the tool in the current directory (./dist/b3pack.json or ./b3pack.json), if there is one. */
|
|
135
|
+
function localNamespace() {
|
|
136
|
+
for (const p of [join("dist", "b3pack.json"), "b3pack.json"]) {
|
|
137
|
+
if (!existsSync(p))
|
|
138
|
+
continue;
|
|
139
|
+
try {
|
|
140
|
+
return (JSON.parse(readFileSync(p, "utf8")).pack ?? "").split("/")[0] || undefined;
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
async function earnings(ctx, values) {
|
|
149
|
+
const ns = values.namespace ?? localNamespace();
|
|
150
|
+
if (!ns)
|
|
151
|
+
throw new UsageError("name the publisher namespace: b3os tool earnings --namespace <namespace>");
|
|
152
|
+
const period = values.period;
|
|
153
|
+
if (period !== undefined && !/^[0-9]{4}-(0[1-9]|1[0-2])$/.test(period))
|
|
154
|
+
throw new UsageError("--period is a UTC month, YYYY-MM");
|
|
155
|
+
// The route has no SDK method (the generator names registry operations under /v1/actions/registry/ only).
|
|
156
|
+
const e = await ctx.client().request({
|
|
157
|
+
method: "GET",
|
|
158
|
+
path: `/v1/actions/publishers/${encodeURIComponent(ns)}/earnings`,
|
|
159
|
+
...(period ? { query: { period } } : {}),
|
|
160
|
+
edge: true,
|
|
161
|
+
});
|
|
162
|
+
ctx.result(e, () => {
|
|
163
|
+
for (const l of earningsText(e))
|
|
164
|
+
ctx.out(l);
|
|
165
|
+
});
|
|
166
|
+
return EXIT.OK;
|
|
167
|
+
}
|
|
168
|
+
export async function tool(ctx, argv) {
|
|
169
|
+
const [sub, rest] = splitSub(argv);
|
|
170
|
+
const a = parse(rest, TOOL_OPTIONS);
|
|
171
|
+
ctx.applyGlobals(a.values);
|
|
172
|
+
if (!sub || a.values.help)
|
|
173
|
+
return showUsage(ctx, TOOL_USAGE, sub, a.values.help);
|
|
174
|
+
switch (sub) {
|
|
175
|
+
case "publish": {
|
|
176
|
+
const dir = a.positionals[0];
|
|
177
|
+
if (!dir)
|
|
178
|
+
throw new UsageError("tool publish needs the tool's directory (it reads <dir>/dist/)");
|
|
179
|
+
return publish(ctx, dir);
|
|
180
|
+
}
|
|
181
|
+
case "earnings":
|
|
182
|
+
return earnings(ctx, a.values);
|
|
183
|
+
default:
|
|
184
|
+
throw unknownSub("tool", sub, TOOL_USAGE);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** This module's commands, found by main.ts (src/registry.ts). */
|
|
188
|
+
export const commands = [
|
|
189
|
+
{
|
|
190
|
+
name: "tool",
|
|
191
|
+
summary: "Publish a hosted tool and read its earnings",
|
|
192
|
+
order: 155,
|
|
193
|
+
run: tool,
|
|
194
|
+
options: TOOL_OPTIONS,
|
|
195
|
+
},
|
|
196
|
+
];
|
|
197
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../src/commands/tool.ts"],"names":[],"mappings":"AAAA,mHAAmH;AACnH,8GAA8G;AAC9G,qHAAqH;AACrH,+GAA+G;AAC/G,4GAA4G;AAE5G,OAAO,EAAE,UAAU,EA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C,MAAM,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjF,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,MAAM,GAAG,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG;gBAAE,MAAM,IAAI,UAAU,CAAC,gEAAgE,CAAC,CAAC;YACjG,OAAO,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC3B,CAAC;QACD,KAAK,UAAU;YACb,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;QACjC;YACE,MAAM,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC;AAED,kEAAkE;AAClE,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,IAAI;QACT,OAAO,EAAE,YAAY;KACtB;CACF,CAAC"}
|
package/dist/main.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Streams } from "./ctx.ts";
|
|
2
2
|
import { type CliCommand } from "./registry.ts";
|
|
3
|
-
export declare const CLI_VERSION = "0.2.
|
|
3
|
+
export declare const CLI_VERSION = "0.2.1";
|
|
4
4
|
/** Every command, in help order. */
|
|
5
5
|
export declare function commandList(): Promise<CliCommand[]>;
|
|
6
6
|
export declare function run(argv: string[], io?: Streams): Promise<number>;
|
package/dist/main.js
CHANGED
|
@@ -4,7 +4,7 @@ import { SDK_VERSION } from "@b3os/sdk";
|
|
|
4
4
|
import { authFailure, Ctx, EXIT, exitCodeFor, fileError, OptionError, renderError, UsageError, } from "./ctx.js";
|
|
5
5
|
import { loadCommands } from "./registry.js";
|
|
6
6
|
import { orList, suggest } from "./suggest.js";
|
|
7
|
-
export const CLI_VERSION = "0.2.
|
|
7
|
+
export const CLI_VERSION = "0.2.1";
|
|
8
8
|
// The commands come from the modules in commands/ (src/registry.ts): .ts beside src/main.ts, .js beside
|
|
9
9
|
// dist/main.js. Loaded once per process, on the first run().
|
|
10
10
|
const SELF = new URL(import.meta.url);
|
package/dist/manifest/apply.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export interface ApplyOptions {
|
|
|
21
21
|
signal?: AbortSignal;
|
|
22
22
|
/** Milliseconds between process polls while an old generation drains (default 1,000). */
|
|
23
23
|
pollMs?: number;
|
|
24
|
+
/** Milliseconds between a switch of the addresses and TERM to the old generation (default 7,000; tests). */
|
|
25
|
+
settleMs?: number;
|
|
24
26
|
}
|
|
25
27
|
export interface ApplyOutcome {
|
|
26
28
|
exit: number;
|
|
@@ -59,6 +61,8 @@ export interface RollbackTarget {
|
|
|
59
61
|
startedAt?: string | null;
|
|
60
62
|
/** The commit (7 hex) of what runs now, or null. */
|
|
61
63
|
from: string | null;
|
|
64
|
+
/** HEAD (7 hex), when its tree is the target's parent's: HEAD reverts it (DEFECTS 39). */
|
|
65
|
+
revertedBy?: string;
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* Plan a rollback: the manifest and the source as the target commit has them, read from the local repository without
|
package/dist/manifest/apply.js
CHANGED
|
@@ -19,6 +19,7 @@ function deps(b3, repo, o) {
|
|
|
19
19
|
log: o.log,
|
|
20
20
|
...(o.signal ? { signal: o.signal } : {}),
|
|
21
21
|
...(o.pollMs !== undefined ? { pollMs: o.pollMs } : {}),
|
|
22
|
+
...(o.settleMs !== undefined ? { settleMs: o.settleMs } : {}),
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
/** Build a v1 plan (no writes; the dry run's only POST is /v1/routines/validate, as for v0). */
|
|
@@ -100,6 +101,7 @@ export async function planRollback(b3, root, manifestInRepo, target, baseUrl, o)
|
|
|
100
101
|
live_at: target.liveAt,
|
|
101
102
|
...(target.startedAt ? { started_at: target.startedAt } : {}),
|
|
102
103
|
from: target.from,
|
|
104
|
+
...(target.revertedBy ? { reverted_by: target.revertedBy } : {}),
|
|
103
105
|
};
|
|
104
106
|
return {
|
|
105
107
|
...planned,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/manifest/apply.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,gHAAgH;AAChH,mHAAmH;AACnH,gHAAgH;AAChH,4GAA4G;AAC5G,EAAE;AACF,kHAAkH;AAClH,sHAAsH;AACtH,iGAAiG;AAEjG,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAKL,cAAc,EAEd,UAAU,EACV,MAAM,EACN,QAAQ,GACT,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,OAAO,EAEL,GAAG,EAEH,UAAU,EACV,WAAW,EACX,MAAM,EACN,MAAM,EAEN,GAAG,EACH,aAAa,GACd,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/manifest/apply.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,gHAAgH;AAChH,mHAAmH;AACnH,gHAAgH;AAChH,4GAA4G;AAC5G,EAAE;AACF,kHAAkH;AAClH,sHAAsH;AACtH,iGAAiG;AAEjG,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAKL,cAAc,EAEd,UAAU,EACV,MAAM,EACN,QAAQ,GACT,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,OAAO,EAEL,GAAG,EAEH,UAAU,EACV,WAAW,EACX,MAAM,EACN,MAAM,EAEN,GAAG,EACH,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3G,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,CAAe;IAC1D,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b3os/cli",
|
|
3
|
-
"version": "0.2.
|
|
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",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dev": "node --conditions=b3os-source src/main.ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@b3os/deploy": "0.2.
|
|
34
|
-
"@b3os/mcp": "0.2.
|
|
35
|
-
"@b3os/sdk": "0.2.
|
|
33
|
+
"@b3os/deploy": "0.2.1",
|
|
34
|
+
"@b3os/mcp": "0.2.1",
|
|
35
|
+
"@b3os/sdk": "0.2.1",
|
|
36
36
|
"yaml": "2.9.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|