buckyos 0.7.138 → 0.7.142
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/cli/core/app.ts +4 -0
- package/cli/core/auth.ts +2 -3
- package/cli/dist/cli.mjs +547 -127
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/modules/aiws.ts +294 -0
- package/cli/modules/executor.ts +98 -0
- package/cli/version.ts +1 -1
- package/dist/account.d.ts +0 -2
- package/dist/account.d.ts.map +1 -1
- package/dist/aiworkspace_client.d.ts +91 -0
- package/dist/aiworkspace_client.d.ts.map +1 -0
- package/dist/app-frame.cjs +1 -1
- package/dist/app-frame.cjs.map +1 -1
- package/dist/app-frame.d.ts +103 -3
- package/dist/app-frame.d.ts.map +1 -1
- package/dist/app-frame.mjs +189 -8
- package/dist/app-frame.mjs.map +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.ts +2 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.mjs +18 -15
- package/dist/browser.mjs.map +1 -1
- package/dist/content.cjs +1 -1
- package/dist/content.cjs.map +1 -1
- package/dist/content.d.ts +18 -0
- package/dist/content.d.ts.map +1 -1
- package/dist/content.mjs +61 -1
- package/dist/content.mjs.map +1 -1
- package/dist/executor_client-b3ff97ba.js +13 -0
- package/dist/executor_client-b3ff97ba.js.map +1 -0
- package/dist/{ndm_proxy-6b03b9ec.mjs → executor_client-eb372968.mjs} +901 -396
- package/dist/executor_client-eb372968.mjs.map +1 -0
- package/dist/executor_client.d.ts +138 -0
- package/dist/executor_client.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +23 -15
- package/dist/index.mjs.map +1 -1
- package/dist/internal/hash_worker.d.ts +2 -1
- package/dist/internal/hash_worker.d.ts.map +1 -1
- package/dist/internal/tus_client.d.ts +3 -0
- package/dist/internal/tus_client.d.ts.map +1 -1
- package/dist/namelib.d.ts +1 -10
- package/dist/namelib.d.ts.map +1 -1
- package/dist/ndm_client.d.ts +56 -7
- package/dist/ndm_client.d.ts.map +1 -1
- package/dist/ndn_types-08dc9ef1.js +2 -0
- package/dist/ndn_types-08dc9ef1.js.map +1 -0
- package/dist/{ndn_types-ac9c1e48.mjs → ndn_types-bbb1f6a6.mjs} +53 -100
- package/dist/ndn_types-bbb1f6a6.mjs.map +1 -0
- package/dist/nfsp.cjs +1 -1
- package/dist/nfsp.cjs.map +1 -1
- package/dist/nfsp.d.ts +16 -0
- package/dist/nfsp.d.ts.map +1 -1
- package/dist/nfsp.mjs +6 -0
- package/dist/nfsp.mjs.map +1 -1
- package/dist/node.cjs +1 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.ts +2 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.mjs +18 -15
- package/dist/node.mjs.map +1 -1
- package/dist/provision.cjs +2 -2
- package/dist/provision.cjs.map +1 -1
- package/dist/provision.mjs +18 -12
- package/dist/provision.mjs.map +1 -1
- package/dist/provision_activate.d.ts.map +1 -1
- package/dist/runtime.d.ts +3 -4
- package/dist/runtime.d.ts.map +1 -1
- package/dist/sdk_core.d.ts +4 -0
- package/dist/sdk_core.d.ts.map +1 -1
- package/dist/{tus_client-2b915a81.js → tus_client-65c5fc5e.js} +4 -4
- package/dist/tus_client-65c5fc5e.js.map +1 -0
- package/dist/{tus_client-19baa342.mjs → tus_client-d313689e.mjs} +40 -2
- package/dist/tus_client-d313689e.mjs.map +1 -0
- package/dist/types.d.ts +0 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/verify-hub-client.d.ts +1 -9
- package/dist/verify-hub-client.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/ndm_proxy-67651066.js +0 -13
- package/dist/ndm_proxy-67651066.js.map +0 -1
- package/dist/ndm_proxy-6b03b9ec.mjs.map +0 -1
- package/dist/ndn_types-324121ae.js +0 -2
- package/dist/ndn_types-324121ae.js.map +0 -1
- package/dist/ndn_types-ac9c1e48.mjs.map +0 -1
- package/dist/tus_client-19baa342.mjs.map +0 -1
- package/dist/tus_client-2b915a81.js.map +0 -1
package/dist/provision.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
|
-
import { N as NODE_IDENTITY_SCHEMA_V2,
|
|
8
|
+
import { N as NODE_IDENTITY_SCHEMA_V2, u as DID, K as newDeviceDocumentByJwk, L as verifyJwtEdDSA, M as deviceDocumentToOrderedJson, P as decodeJwtClaimWithoutVerify, Q as commonjsGlobal, R as DEFAULT_EXPIRE_TIME, h as hashPassword, T as buckyosGetUnixTimestamp, U as getPublicKeyXFromPrivatePem, V as getXFromJwk, W as createJwkByX, X as newOwnerDocument, Y as ownerDocumentSetDefaultZoneDid, Z as ownerDocumentToOrderedJson, _ as oodDescriptionToString, $ as parseOODDescription, a0 as encodeZoneBootDocument, a1 as newZoneBootDocument, a2 as encodeDeviceDocument, a3 as newDeviceMiniDocumentByDeviceDocument, a4 as deviceMiniDocumentToJwt, a5 as newZoneDocument, a6 as encodeZoneDocument, a7 as zoneDocumentToOrderedJson, a8 as newDeviceMiniDocument, a9 as newDeviceDocumentByMiniDocument, aa as buildNamedObjectByJson } from "./ndn_types-bbb1f6a6.mjs";
|
|
9
9
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
10
10
|
import { pbkdf2Sync, createPublicKey, createPrivateKey, createECDH, createHmac } from "node:crypto";
|
|
11
11
|
const DEVICE_DOC_JWT_FILE_NAME = "device_doc.jwt";
|
|
@@ -14339,7 +14339,7 @@ function layoutFor(rootDir, zoneDid, deviceDid) {
|
|
|
14339
14339
|
etcDir,
|
|
14340
14340
|
lockPath: path.join(etcDir, ACTIVATION_LOCK_FILE_NAME),
|
|
14341
14341
|
nodeIdentityPath: path.join(etcDir, "node_identity.json"),
|
|
14342
|
-
startConfigPath: path.join(
|
|
14342
|
+
startConfigPath: path.join(rootDir, "security", "start_config.json"),
|
|
14343
14343
|
zoneDocumentJwtPath: path.join(etcDir, ZONE_DOCUMENT_JWT_FILE_NAME),
|
|
14344
14344
|
gatewayParamsPath: path.join(etcDir, "node_gateway_params.json"),
|
|
14345
14345
|
dnsRecordsPath: path.join(etcDir, ZONE_DNS_RECORDS_FILE_NAME),
|
|
@@ -14370,7 +14370,7 @@ function plannedFiles(rootDir, layout) {
|
|
|
14370
14370
|
entry(layout.zoneBootOverridePath, "zone_boot_override", true, false),
|
|
14371
14371
|
entry(layout.zoneDocumentJwtPath, "zone_document_jwt", true, false),
|
|
14372
14372
|
entry(layout.dnsRecordsPath, "dns_records", false, false),
|
|
14373
|
-
entry(layout.startConfigPath, "start_config", true,
|
|
14373
|
+
entry(layout.startConfigPath, "start_config", true, true),
|
|
14374
14374
|
entry(layout.gatewayParamsPath, "gateway_params", true, false),
|
|
14375
14375
|
entry(layout.nodeIdentityPath, "node_identity", true, false)
|
|
14376
14376
|
];
|
|
@@ -14511,35 +14511,35 @@ async function validateActivationMaterials(rootDir, layout, identity, problems)
|
|
|
14511
14511
|
try {
|
|
14512
14512
|
startConfig = readJsonObjectOrThrow(layout.startConfigPath);
|
|
14513
14513
|
} catch (error) {
|
|
14514
|
-
problem("START_CONFIG_UNREADABLE", `
|
|
14514
|
+
problem("START_CONFIG_UNREADABLE", `security/start_config.json cannot be parsed: ${error instanceof Error ? error.message : String(error)}`);
|
|
14515
14515
|
}
|
|
14516
14516
|
let accessHostname = null;
|
|
14517
14517
|
const jwts = {};
|
|
14518
14518
|
if (startConfig) {
|
|
14519
14519
|
for (const key of ["user_name", "zone_name", "access_hostname", "admin_password_hash"]) {
|
|
14520
14520
|
if (typeof startConfig[key] !== "string" || startConfig[key].length === 0) {
|
|
14521
|
-
problem("START_CONFIG_FIELD", `
|
|
14521
|
+
problem("START_CONFIG_FIELD", `security/start_config.json is missing ${key}`);
|
|
14522
14522
|
}
|
|
14523
14523
|
}
|
|
14524
14524
|
for (const key of ["boot_config_jwt", "device_doc_jwt", "device_mini_doc_jwt", "zone_document_jwt", "ood_jwt"]) {
|
|
14525
14525
|
if (typeof startConfig[key] === "string" && startConfig[key].length > 0) {
|
|
14526
14526
|
jwts[key] = startConfig[key];
|
|
14527
14527
|
} else {
|
|
14528
|
-
problem("START_CONFIG_FIELD", `
|
|
14528
|
+
problem("START_CONFIG_FIELD", `security/start_config.json is missing ${key}`);
|
|
14529
14529
|
}
|
|
14530
14530
|
}
|
|
14531
14531
|
if (startConfig.zone_name !== zoneDid.toString()) {
|
|
14532
|
-
problem("START_CONFIG_ZONE", `
|
|
14532
|
+
problem("START_CONFIG_ZONE", `security/start_config.json zone_name is not ${zoneDid.toString()}`);
|
|
14533
14533
|
}
|
|
14534
14534
|
if (typeof startConfig.access_hostname === "string") {
|
|
14535
14535
|
accessHostname = startConfig.access_hostname;
|
|
14536
14536
|
if (accessHostname !== zoneDid.toRawHostName()) {
|
|
14537
|
-
problem("START_CONFIG_HOSTNAME", `
|
|
14537
|
+
problem("START_CONFIG_HOSTNAME", `security/start_config.json access_hostname is not ${zoneDid.toRawHostName()}`);
|
|
14538
14538
|
}
|
|
14539
14539
|
}
|
|
14540
14540
|
const ownerDocument = startConfig.owner_document;
|
|
14541
14541
|
if (!ownerDocument || typeof ownerDocument !== "object") {
|
|
14542
|
-
problem("START_CONFIG_OWNER", "
|
|
14542
|
+
problem("START_CONFIG_OWNER", "security/start_config.json is missing owner_document");
|
|
14543
14543
|
} else {
|
|
14544
14544
|
if (ownerDocument.id !== ownerDid) {
|
|
14545
14545
|
problem("START_CONFIG_OWNER", `owner_document id ${String(ownerDocument.id)} is not ${ownerDid}`);
|
|
@@ -14550,11 +14550,11 @@ async function validateActivationMaterials(rootDir, layout, identity, problems)
|
|
|
14550
14550
|
}
|
|
14551
14551
|
}
|
|
14552
14552
|
if (jwts.ood_jwt && jwts.device_doc_jwt && jwts.ood_jwt !== jwts.device_doc_jwt) {
|
|
14553
|
-
problem("START_CONFIG_OOD_JWT", "
|
|
14553
|
+
problem("START_CONFIG_OOD_JWT", "security/start_config.json ood_jwt differs from device_doc_jwt");
|
|
14554
14554
|
}
|
|
14555
14555
|
for (const [key, secret] of [["private_key", true], ["device_private_key", true], ["sn_access_token", true], ["bns_evm_private_key", true]]) {
|
|
14556
14556
|
if (secret && key in startConfig)
|
|
14557
|
-
problem("START_CONFIG_SECRET", `
|
|
14557
|
+
problem("START_CONFIG_SECRET", `security/start_config.json must not contain ${key}`);
|
|
14558
14558
|
}
|
|
14559
14559
|
}
|
|
14560
14560
|
const readText = (filePath, label) => {
|
|
@@ -14732,13 +14732,19 @@ async function inspectActivationRoot(rootDir) {
|
|
|
14732
14732
|
} else {
|
|
14733
14733
|
for (const [name, role, required] of [
|
|
14734
14734
|
["node_identity.json", "node_identity", true],
|
|
14735
|
-
["start_config.json", "start_config", true],
|
|
14736
14735
|
[ZONE_DOCUMENT_JWT_FILE_NAME, "zone_document_jwt", true],
|
|
14737
14736
|
["node_gateway_params.json", "gateway_params", true],
|
|
14738
14737
|
[ZONE_DNS_RECORDS_FILE_NAME, "dns_records", false]
|
|
14739
14738
|
]) {
|
|
14740
14739
|
files.push({ path: `etc/${name}`, role, required, secret: false, present: isFile(path.join(etcDir, name)) });
|
|
14741
14740
|
}
|
|
14741
|
+
files.push({
|
|
14742
|
+
path: "security/start_config.json",
|
|
14743
|
+
role: "start_config",
|
|
14744
|
+
required: true,
|
|
14745
|
+
secret: true,
|
|
14746
|
+
present: isFile(path.join(root, "security", "start_config.json"))
|
|
14747
|
+
});
|
|
14742
14748
|
for (const name of zoneJsonFiles) {
|
|
14743
14749
|
files.push({ path: `etc/${name}`, role: "zone_boot_override", required: true, secret: false, present: true });
|
|
14744
14750
|
}
|