@cef-ai/cli 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -1
- package/dist/cli-program.d.ts.map +1 -1
- package/dist/cli-program.js +95 -5
- package/dist/cli-program.js.map +1 -1
- package/dist/commands/cubby.d.ts +2 -0
- package/dist/commands/cubby.d.ts.map +1 -1
- package/dist/commands/cubby.js +1 -0
- package/dist/commands/cubby.js.map +1 -1
- package/dist/commands/external.d.ts +2 -0
- package/dist/commands/external.d.ts.map +1 -1
- package/dist/commands/external.js.map +1 -1
- package/dist/commands/push.d.ts +49 -3
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +172 -14
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/widget.d.ts +2 -0
- package/dist/commands/widget.d.ts.map +1 -1
- package/dist/commands/widget.js +1 -0
- package/dist/commands/widget.js.map +1 -1
- package/dist/lib/access-token.d.ts +51 -0
- package/dist/lib/access-token.d.ts.map +1 -0
- package/dist/lib/access-token.js +178 -0
- package/dist/lib/access-token.js.map +1 -0
- package/dist/lib/ddc.d.ts +35 -4
- package/dist/lib/ddc.d.ts.map +1 -1
- package/dist/lib/ddc.js +86 -10
- package/dist/lib/ddc.js.map +1 -1
- package/dist/lib/vault-publish.d.ts +106 -0
- package/dist/lib/vault-publish.d.ts.map +1 -0
- package/dist/lib/vault-publish.js +258 -0
- package/dist/lib/vault-publish.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cef push --vault <id> --vault-scope <scope>` — publish an agent version
|
|
3
|
+
* through vault-api instead of writing the registry DAG to DDC directly.
|
|
4
|
+
*
|
|
5
|
+
* Why a second path exists: a direct push holds a bucket-wide credential and
|
|
6
|
+
* rewrites the bucket's single `agents` CNS root, so anyone who can push can
|
|
7
|
+
* replace or drop ANY alias in it. For an organization's vault, vault-api owns
|
|
8
|
+
* that root: it checks that the caller may write the target scope, binds each
|
|
9
|
+
* alias to the scope it is first published from, serialises concurrent
|
|
10
|
+
* publishes, and writes with the owner's registry delegation. The CLI only
|
|
11
|
+
* hands it the files.
|
|
12
|
+
*
|
|
13
|
+
* POST {vaultApi}/api/v1/vaults/{vaultId}/scopes/{scope}/agents/{alias}/versions
|
|
14
|
+
*
|
|
15
|
+
* The body is multipart/form-data and each part's form name is the file's
|
|
16
|
+
* path inside the version: `manifest.json` (required, UNSTAMPED — the server
|
|
17
|
+
* writes `bundle` and each uploaded widget's `dag`), `bundle.js` (required),
|
|
18
|
+
* `bundle.js.map`, `widgets/<id>/<file>`, `sources/<file>`. The version is the
|
|
19
|
+
* manifest's own `version` field.
|
|
20
|
+
*
|
|
21
|
+
* Authentication is one of:
|
|
22
|
+
* - a wallet signature over a preamble `{method, path, query, timestamp,
|
|
23
|
+
* contentSha256}`, where `contentSha256` is the SHA-256 of the ENTIRE
|
|
24
|
+
* request body — the signature commits to the bytes without the server
|
|
25
|
+
* buffering them to verify it; or
|
|
26
|
+
* - a wallet-api bearer token (`Authorization: Bearer`).
|
|
27
|
+
*/
|
|
28
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
29
|
+
import { bytesToHex, encodeBase64Url } from "@cef-ai/transport";
|
|
30
|
+
/**
|
|
31
|
+
* A refused or failed publish, with the server's stable code kept for callers
|
|
32
|
+
* that branch on it. `retryable` is true when the same request may simply be
|
|
33
|
+
* sent again.
|
|
34
|
+
*
|
|
35
|
+
* That is not always "nothing was written". A `NETWORK` failure can happen
|
|
36
|
+
* after vault-api received the whole body, so the publish may have committed.
|
|
37
|
+
* Re-pushing the same version is still safe: vault-api does not refuse a
|
|
38
|
+
* version it already holds, it rewrites that version's link and `latest`, and
|
|
39
|
+
* the stored pieces are content-addressed, so identical content lands on the
|
|
40
|
+
* same ids. The one visible effect is that `latest` points at this version
|
|
41
|
+
* again if a newer one was published in between.
|
|
42
|
+
*/
|
|
43
|
+
export class VaultPublishError extends Error {
|
|
44
|
+
status;
|
|
45
|
+
code;
|
|
46
|
+
retryable;
|
|
47
|
+
constructor(message, status, code, retryable) {
|
|
48
|
+
super(message);
|
|
49
|
+
this.status = status;
|
|
50
|
+
this.code = code;
|
|
51
|
+
this.retryable = retryable;
|
|
52
|
+
this.name = "VaultPublishError";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Serialise parts as one multipart/form-data body.
|
|
57
|
+
*
|
|
58
|
+
* Built by hand into a single buffer rather than through `FormData` because
|
|
59
|
+
* the signature must commit to the SHA-256 of the exact bytes on the wire, and
|
|
60
|
+
* `FormData`'s encoding (boundary, part headers) is only known once fetch has
|
|
61
|
+
* produced it.
|
|
62
|
+
*/
|
|
63
|
+
export function buildMultipartBody(parts) {
|
|
64
|
+
const boundary = `----cef-push-${randomBytes(16).toString("hex")}`;
|
|
65
|
+
const enc = new TextEncoder();
|
|
66
|
+
const chunks = [];
|
|
67
|
+
for (const part of parts) {
|
|
68
|
+
if (/["\r\n]/.test(part.name)) {
|
|
69
|
+
throw new Error(`[cef push] file name ${JSON.stringify(part.name)} cannot be sent as a form field`);
|
|
70
|
+
}
|
|
71
|
+
// The last path segment doubles as the filename, so the part reads as a
|
|
72
|
+
// file upload to any multipart parser; the server keys on the form name.
|
|
73
|
+
const filename = part.name.split("/").pop();
|
|
74
|
+
chunks.push(enc.encode(`--${boundary}\r\n`
|
|
75
|
+
+ `Content-Disposition: form-data; name="${part.name}"; filename="${filename}"\r\n`
|
|
76
|
+
+ `Content-Type: ${partContentType(part.name)}\r\n\r\n`), part.bytes, enc.encode("\r\n"));
|
|
77
|
+
}
|
|
78
|
+
chunks.push(enc.encode(`--${boundary}--\r\n`));
|
|
79
|
+
return {
|
|
80
|
+
body: Buffer.concat(chunks),
|
|
81
|
+
contentType: `multipart/form-data; boundary=${boundary}`,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function partContentType(name) {
|
|
85
|
+
if (name.endsWith(".json") || name.endsWith(".map"))
|
|
86
|
+
return "application/json";
|
|
87
|
+
if (name.endsWith(".js") || name.endsWith(".mjs"))
|
|
88
|
+
return "text/javascript";
|
|
89
|
+
if (name.endsWith(".html"))
|
|
90
|
+
return "text/html";
|
|
91
|
+
if (name.endsWith(".css"))
|
|
92
|
+
return "text/css";
|
|
93
|
+
return "application/octet-stream";
|
|
94
|
+
}
|
|
95
|
+
/** Hex SHA-256 of the body — the value the signed preamble commits to. */
|
|
96
|
+
export function bodySha256(body) {
|
|
97
|
+
return createHash("sha256").update(body).digest("hex");
|
|
98
|
+
}
|
|
99
|
+
/** The route's URL, each path segment escaped the way it is signed. */
|
|
100
|
+
export function publishUrl(vaultApi, vaultId, scope, alias) {
|
|
101
|
+
const base = new URL(vaultApi);
|
|
102
|
+
const prefix = base.pathname.replace(/\/+$/, "");
|
|
103
|
+
const seg = encodeURIComponent;
|
|
104
|
+
base.pathname =
|
|
105
|
+
`${prefix}/api/v1/vaults/${seg(vaultId)}/scopes/${seg(scope)}/agents/${seg(alias)}/versions`;
|
|
106
|
+
base.search = "";
|
|
107
|
+
base.hash = "";
|
|
108
|
+
return base;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The wallet-signature headers for a publish. The preamble binds the method,
|
|
112
|
+
* the path and query exactly as sent, a timestamp inside vault-api's skew
|
|
113
|
+
* window, and the body's hash; the signature covers the preamble's raw JSON
|
|
114
|
+
* bytes, which travel base64url-encoded beside it.
|
|
115
|
+
*/
|
|
116
|
+
export async function signatureHeaders(signer, url, contentSha256, now) {
|
|
117
|
+
// vault-api pins wallet auth to ed25519 and answers 400 to any other type.
|
|
118
|
+
const type = signer.type;
|
|
119
|
+
if (type !== "ed25519") {
|
|
120
|
+
throw new Error(`[cef push] vault-api accepts only ed25519 signatures, not ${type}`);
|
|
121
|
+
}
|
|
122
|
+
const preamble = new TextEncoder().encode(JSON.stringify({
|
|
123
|
+
method: "POST",
|
|
124
|
+
path: url.pathname,
|
|
125
|
+
query: url.search.replace(/^\?/, ""),
|
|
126
|
+
timestamp: now.toISOString().replace(/\.\d+Z$/, "Z"),
|
|
127
|
+
contentSha256,
|
|
128
|
+
}));
|
|
129
|
+
const sig = await signer.sign(preamble);
|
|
130
|
+
return {
|
|
131
|
+
"X-Public-Key": `0x${bytesToHex(signer.publicKey)}`,
|
|
132
|
+
"X-Signature-Type": type,
|
|
133
|
+
"X-Signed-Preamble": encodeBase64Url(preamble),
|
|
134
|
+
"X-Signature": bytesToHex(sig),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/** POST the version to vault-api; the parsed 201 body, or a readable refusal. */
|
|
138
|
+
export async function publishToVault(input) {
|
|
139
|
+
const url = publishUrl(input.vaultApi, input.vaultId, input.scope, input.alias);
|
|
140
|
+
const { body, contentType } = buildMultipartBody(input.parts);
|
|
141
|
+
const headers = { "Content-Type": contentType };
|
|
142
|
+
if (input.auth.kind === "bearer") {
|
|
143
|
+
headers.Authorization = `Bearer ${input.auth.token}`;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
Object.assign(headers, await signatureHeaders(input.auth.signer, url, bodySha256(body), (input.now ?? (() => new Date()))()));
|
|
147
|
+
}
|
|
148
|
+
const doFetch = input.fetchImpl ?? fetch;
|
|
149
|
+
let res;
|
|
150
|
+
try {
|
|
151
|
+
res = await doFetch(url, { method: "POST", headers, body });
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
throw new VaultPublishError(`[cef push] could not reach vault-api at ${url.origin}: ${e.message}`, 0, "NETWORK", true);
|
|
155
|
+
}
|
|
156
|
+
const text = await res.text();
|
|
157
|
+
if (res.status === 201) {
|
|
158
|
+
try {
|
|
159
|
+
return JSON.parse(text);
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
throw new VaultPublishError(`[cef push] vault-api answered 201 but its body is not JSON — the publish may have landed; `
|
|
163
|
+
+ `check the registry before re-pushing`, res.status, "BAD_RESPONSE", false);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
throw describeRefusal(res.status, text, input);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* vault-api's refusals carry `{error: {code, message, retryable}}`; its
|
|
170
|
+
* authentication layer answers with a bare `{message}`. Either way the person
|
|
171
|
+
* gets what went wrong and what to do about it, with the server's own words
|
|
172
|
+
* appended rather than replaced.
|
|
173
|
+
*/
|
|
174
|
+
function describeRefusal(status, text, input) {
|
|
175
|
+
let code = "";
|
|
176
|
+
let detail = "";
|
|
177
|
+
let retryable = false;
|
|
178
|
+
try {
|
|
179
|
+
const parsed = JSON.parse(text);
|
|
180
|
+
code = parsed.error?.code ?? "";
|
|
181
|
+
detail = parsed.error?.message ?? parsed.message ?? "";
|
|
182
|
+
retryable = parsed.error?.retryable === true;
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
detail = text.trim().slice(0, 300);
|
|
186
|
+
}
|
|
187
|
+
const where = `scope "${input.scope}" of vault ${input.vaultId}`;
|
|
188
|
+
const said = detail ? ` (vault-api: ${code ? `${code}: ` : ""}${detail})` : code ? ` (vault-api: ${code})` : "";
|
|
189
|
+
let message;
|
|
190
|
+
switch (true) {
|
|
191
|
+
case code === "ALIAS_NOT_YOURS":
|
|
192
|
+
message =
|
|
193
|
+
`alias "${input.alias}" cannot be published from ${where}: an alias belongs to the scope it `
|
|
194
|
+
+ `was first published from, and one already in the registry that no scope has claimed can `
|
|
195
|
+
+ `be claimed only by the vault owner. Publish it from its own scope, or rename the agent.`;
|
|
196
|
+
break;
|
|
197
|
+
case code === "REGISTRY_NOT_CONFIGURED":
|
|
198
|
+
message =
|
|
199
|
+
`vault ${input.vaultId} cannot accept agent publishes yet: its owner has not recorded a `
|
|
200
|
+
+ `registry bucket and sealed a registry delegation for it (PUT /api/v1/vaults/${input.vaultId}/delegations, `
|
|
201
|
+
+ `a token signed by the bucket owner granting PUT on that bucket), or the delegation has expired. `
|
|
202
|
+
+ `Only the vault owner can do this: in ROC, "Enable agent publishing" on the organization page, or `
|
|
203
|
+
+ `\`sdk.vault.delegations.grant\` from @cef-ai/vault-sdk. Ask the owner to do that, then push again.`;
|
|
204
|
+
break;
|
|
205
|
+
case code === "REGISTRY_UNAVAILABLE":
|
|
206
|
+
retryable = true;
|
|
207
|
+
message =
|
|
208
|
+
`the registry of vault ${input.vaultId} could not be read or written right now; nothing was `
|
|
209
|
+
+ `changed. Retry the push.`;
|
|
210
|
+
break;
|
|
211
|
+
case status === 403:
|
|
212
|
+
message =
|
|
213
|
+
`you may not publish into ${where}: publishing needs write on the scope (the vault owner, or a `
|
|
214
|
+
+ `member with a member-level grant on "${input.scope}"), and the scope must exist. Ask the vault `
|
|
215
|
+
+ `owner for that grant, or check the scope name.`;
|
|
216
|
+
break;
|
|
217
|
+
case status === 401:
|
|
218
|
+
message =
|
|
219
|
+
`vault-api did not accept your credential — check the secret phrase or token, and that this machine's clock is within 5 minutes of real time.`;
|
|
220
|
+
break;
|
|
221
|
+
case code === "VAULT_NOT_FOUND":
|
|
222
|
+
message = `vault ${input.vaultId} does not exist on this vault-api.`;
|
|
223
|
+
break;
|
|
224
|
+
case status === 404:
|
|
225
|
+
message =
|
|
226
|
+
`vault-api does not serve the agent publish route here — it predates it, or it runs without `
|
|
227
|
+
+ `registry storage configured. Check --vault-api / --env.`;
|
|
228
|
+
break;
|
|
229
|
+
case status === 413:
|
|
230
|
+
message = `the version is larger than this vault-api accepts for one publish.`;
|
|
231
|
+
break;
|
|
232
|
+
case status === 400:
|
|
233
|
+
message = `vault-api refused the version as malformed.`;
|
|
234
|
+
break;
|
|
235
|
+
default:
|
|
236
|
+
message = `vault-api answered HTTP ${status}.`;
|
|
237
|
+
}
|
|
238
|
+
return new VaultPublishError(`[cef push] ${message}${said}`, status, code || `HTTP_${status}`, retryable);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* A signer from a substrate secret phrase or URI, through the DDC SDK's
|
|
242
|
+
* `UriSigner` — the same optional dependency the direct push already loads,
|
|
243
|
+
* so this path adds no package. It signs the raw preamble bytes, which is the
|
|
244
|
+
* first form vault-api verifies. The key is always derived as ed25519, the
|
|
245
|
+
* only scheme vault-api's wallet auth accepts.
|
|
246
|
+
*/
|
|
247
|
+
export async function signerFromPhrase(phrase) {
|
|
248
|
+
let mod;
|
|
249
|
+
try {
|
|
250
|
+
mod = (await import("@cere-ddc-sdk/ddc-client"));
|
|
251
|
+
}
|
|
252
|
+
catch {
|
|
253
|
+
throw new Error("[cef push] signing with a secret phrase needs the optional dependency @cere-ddc-sdk/ddc-client; "
|
|
254
|
+
+ "install it, or authenticate with --vault-token instead");
|
|
255
|
+
}
|
|
256
|
+
return mod.UriSigner.create(phrase, { type: "ed25519" });
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=vault-publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-publish.js","sourceRoot":"","sources":["../../src/lib/vault-publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAsChE;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAG/B;IACA;IACA;IAJX,YACE,OAAe,EACN,MAAc,EACd,IAAY,EACZ,SAAkB;QAE3B,KAAK,CAAC,OAAO,CAAC,CAAC;QAJN,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QACZ,cAAS,GAAT,SAAS,CAAS;QAG3B,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAgBD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAoB;IAIrD,MAAM,QAAQ,GAAG,gBAAgB,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,K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
{
|
|
2
2
|
"name": "@cef-ai/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"esbuild": "^0.21.0",
|
|
21
21
|
"json-schema-to-typescript": "^14.0.0",
|
|
22
22
|
"typescript": "^5.4.0",
|
|
23
|
-
"@cef-ai/agent-sdk": "5.3.0",
|
|
24
23
|
"@cef-ai/transport": "1.1.0",
|
|
25
|
-
"@cef-ai/
|
|
24
|
+
"@cef-ai/agent-sdk": "5.4.1",
|
|
25
|
+
"@cef-ai/widget-runtime": "2.2.2"
|
|
26
26
|
},
|
|
27
27
|
"optionalDependencies": {
|
|
28
28
|
"@cere-ddc-sdk/ddc-client": "^2.16.1"
|