@forgezero/agent 0.1.45 → 0.1.47
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/dist/agent-heartbeat.js +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/fz-agent.js +5 -2
- package/dist/fz.js +19 -4
- package/dist/metal-bootstrap.d.ts +1 -0
- package/dist/metal-bootstrap.js +20 -4
- package/dist/operator-bootstrap.js +19 -4
- package/dist/platform-fleet-verification.js +1 -1
- package/dist/provision.js +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/agent-heartbeat.js
CHANGED
package/dist/bootstrap.js
CHANGED
package/dist/fz-agent.js
CHANGED
|
@@ -7000,7 +7000,7 @@ function assertSupportedGuestImage(imageKey) {
|
|
|
7000
7000
|
}
|
|
7001
7001
|
|
|
7002
7002
|
// src/version.ts
|
|
7003
|
-
var VERSION = "0.1.
|
|
7003
|
+
var VERSION = "0.1.47";
|
|
7004
7004
|
|
|
7005
7005
|
// src/ssh-bootstrap.ts
|
|
7006
7006
|
class SshBootstrapError extends Error {
|
|
@@ -10538,7 +10538,10 @@ var systemCommand = (argv2, stdin) => {
|
|
|
10538
10538
|
stdin: stdin === undefined ? undefined : Buffer.from(stdin),
|
|
10539
10539
|
stdout: "pipe",
|
|
10540
10540
|
stderr: "pipe",
|
|
10541
|
-
env: {
|
|
10541
|
+
env: {
|
|
10542
|
+
PATH: "/usr/sbin:/usr/bin:/sbin:/bin",
|
|
10543
|
+
...process.env.NOTIFY_SOCKET ? { NOTIFY_SOCKET: process.env.NOTIFY_SOCKET } : {}
|
|
10544
|
+
}
|
|
10542
10545
|
});
|
|
10543
10546
|
return {
|
|
10544
10547
|
exitCode: result.exitCode,
|
package/dist/fz.js
CHANGED
|
@@ -4830,7 +4830,7 @@ var UPDATE_RETRY_BASE_MS = 5 * 60000;
|
|
|
4830
4830
|
var UPDATE_RETRY_MAX_MS = 24 * 60 * 60000;
|
|
4831
4831
|
|
|
4832
4832
|
// src/version.ts
|
|
4833
|
-
var VERSION2 = "0.1.
|
|
4833
|
+
var VERSION2 = "0.1.47";
|
|
4834
4834
|
|
|
4835
4835
|
// src/software.ts
|
|
4836
4836
|
var PINNED_BUN_VERSION = "1.3.14";
|
|
@@ -13634,6 +13634,23 @@ var SUPPORTED_BUN_RELEASE_SHA256 = "951ee2aee855f08595aeec6225226a298d3fea83a3dc
|
|
|
13634
13634
|
|
|
13635
13635
|
class MetalBootstrapError extends Error {
|
|
13636
13636
|
}
|
|
13637
|
+
function normalizeMetalPublicIdentity(value) {
|
|
13638
|
+
let parsed;
|
|
13639
|
+
try {
|
|
13640
|
+
parsed = JSON.parse(value);
|
|
13641
|
+
} catch {
|
|
13642
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
13643
|
+
}
|
|
13644
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
13645
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
13646
|
+
}
|
|
13647
|
+
const identity = parsed;
|
|
13648
|
+
const keys = identity.publicKeys;
|
|
13649
|
+
if (Object.keys(identity).some((key) => !["nodeKey", "publicKeys"].includes(key)) || typeof identity.nodeKey !== "string" || !/^[A-Za-z0-9_-]{43}$/.test(identity.nodeKey) || !keys || Object.keys(keys).some((key) => !["ed25519", "mlDsa"].includes(key)) || keys.ed25519 !== identity.nodeKey || typeof keys.mlDsa !== "string" || !/^[A-Za-z0-9_-]{1,8192}$/.test(keys.mlDsa)) {
|
|
13650
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
13651
|
+
}
|
|
13652
|
+
return JSON.stringify(parsed);
|
|
13653
|
+
}
|
|
13637
13654
|
var defaultExec2 = async (argv2, stdin) => {
|
|
13638
13655
|
const child = Bun.spawn([...argv2], {
|
|
13639
13656
|
stdin: stdin === undefined ? undefined : new Blob([stdin]),
|
|
@@ -14147,9 +14164,7 @@ async function applyMetalBootstrap(config, options) {
|
|
|
14147
14164
|
AGENT_PATH,
|
|
14148
14165
|
"identity"
|
|
14149
14166
|
]);
|
|
14150
|
-
const publicIdentity = identity.stdout.trim();
|
|
14151
|
-
if (!publicIdentity || /[\r\n]/.test(publicIdentity))
|
|
14152
|
-
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
14167
|
+
const publicIdentity = normalizeMetalPublicIdentity(identity.stdout.trim());
|
|
14153
14168
|
const state = {
|
|
14154
14169
|
initializedAt: new Date().toISOString(),
|
|
14155
14170
|
role: "metal",
|
|
@@ -42,6 +42,7 @@ export interface MetalBootstrapApplyOptions {
|
|
|
42
42
|
}
|
|
43
43
|
export declare class MetalBootstrapError extends Error {
|
|
44
44
|
}
|
|
45
|
+
export declare function normalizeMetalPublicIdentity(value: string): string;
|
|
45
46
|
export declare function validateMetalBootstrapConfig(config: MetalBootstrapConfig): MetalBootstrapConfig;
|
|
46
47
|
/** Reject symlinks and group/world access before parsing coordinates or entropy. */
|
|
47
48
|
export declare function validateOwnerOnlyPath(path: string, requireRootOwner: boolean): void;
|
package/dist/metal-bootstrap.js
CHANGED
|
@@ -292,7 +292,7 @@ function systemdAgentEgressDirectives(loopbackTcpPorts = []) {
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
// src/version.ts
|
|
295
|
-
var VERSION = "0.1.
|
|
295
|
+
var VERSION = "0.1.47";
|
|
296
296
|
|
|
297
297
|
// src/otel-collector.ts
|
|
298
298
|
var FORGEZERO_OTEL_COLLECTOR_UNIT = "forgezero-otel-collector.service";
|
|
@@ -466,6 +466,23 @@ var SUPPORTED_BUN_RELEASE_SHA256 = "951ee2aee855f08595aeec6225226a298d3fea83a3dc
|
|
|
466
466
|
|
|
467
467
|
class MetalBootstrapError extends Error {
|
|
468
468
|
}
|
|
469
|
+
function normalizeMetalPublicIdentity(value) {
|
|
470
|
+
let parsed;
|
|
471
|
+
try {
|
|
472
|
+
parsed = JSON.parse(value);
|
|
473
|
+
} catch {
|
|
474
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
475
|
+
}
|
|
476
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
477
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
478
|
+
}
|
|
479
|
+
const identity = parsed;
|
|
480
|
+
const keys = identity.publicKeys;
|
|
481
|
+
if (Object.keys(identity).some((key) => !["nodeKey", "publicKeys"].includes(key)) || typeof identity.nodeKey !== "string" || !/^[A-Za-z0-9_-]{43}$/.test(identity.nodeKey) || !keys || Object.keys(keys).some((key) => !["ed25519", "mlDsa"].includes(key)) || keys.ed25519 !== identity.nodeKey || typeof keys.mlDsa !== "string" || !/^[A-Za-z0-9_-]{1,8192}$/.test(keys.mlDsa)) {
|
|
482
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
483
|
+
}
|
|
484
|
+
return JSON.stringify(parsed);
|
|
485
|
+
}
|
|
469
486
|
var defaultExec2 = async (argv, stdin) => {
|
|
470
487
|
const child = Bun.spawn([...argv], {
|
|
471
488
|
stdin: stdin === undefined ? undefined : new Blob([stdin]),
|
|
@@ -979,9 +996,7 @@ async function applyMetalBootstrap(config, options) {
|
|
|
979
996
|
AGENT_PATH,
|
|
980
997
|
"identity"
|
|
981
998
|
]);
|
|
982
|
-
const publicIdentity = identity.stdout.trim();
|
|
983
|
-
if (!publicIdentity || /[\r\n]/.test(publicIdentity))
|
|
984
|
-
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
999
|
+
const publicIdentity = normalizeMetalPublicIdentity(identity.stdout.trim());
|
|
985
1000
|
const state = {
|
|
986
1001
|
initializedAt: new Date().toISOString(),
|
|
987
1002
|
role: "metal",
|
|
@@ -1102,6 +1117,7 @@ export {
|
|
|
1102
1117
|
renderMetalUnits,
|
|
1103
1118
|
readMetalBootstrapConfig,
|
|
1104
1119
|
planMetalBootstrap,
|
|
1120
|
+
normalizeMetalPublicIdentity,
|
|
1105
1121
|
metalBootstrapStatus,
|
|
1106
1122
|
applyMetalBootstrap,
|
|
1107
1123
|
MetalBootstrapError,
|
|
@@ -1207,7 +1207,7 @@ var UPDATE_RETRY_BASE_MS = 5 * 60000;
|
|
|
1207
1207
|
var UPDATE_RETRY_MAX_MS = 24 * 60 * 60000;
|
|
1208
1208
|
|
|
1209
1209
|
// src/version.ts
|
|
1210
|
-
var VERSION = "0.1.
|
|
1210
|
+
var VERSION = "0.1.47";
|
|
1211
1211
|
|
|
1212
1212
|
// src/software.ts
|
|
1213
1213
|
var PINNED_BUN_VERSION = "1.3.14";
|
|
@@ -4538,6 +4538,23 @@ var SUPPORTED_BUN_RELEASE_SHA256 = "951ee2aee855f08595aeec6225226a298d3fea83a3dc
|
|
|
4538
4538
|
|
|
4539
4539
|
class MetalBootstrapError extends Error {
|
|
4540
4540
|
}
|
|
4541
|
+
function normalizeMetalPublicIdentity(value) {
|
|
4542
|
+
let parsed;
|
|
4543
|
+
try {
|
|
4544
|
+
parsed = JSON.parse(value);
|
|
4545
|
+
} catch {
|
|
4546
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
4547
|
+
}
|
|
4548
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
4549
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
4550
|
+
}
|
|
4551
|
+
const identity = parsed;
|
|
4552
|
+
const keys = identity.publicKeys;
|
|
4553
|
+
if (Object.keys(identity).some((key) => !["nodeKey", "publicKeys"].includes(key)) || typeof identity.nodeKey !== "string" || !/^[A-Za-z0-9_-]{43}$/.test(identity.nodeKey) || !keys || Object.keys(keys).some((key) => !["ed25519", "mlDsa"].includes(key)) || keys.ed25519 !== identity.nodeKey || typeof keys.mlDsa !== "string" || !/^[A-Za-z0-9_-]{1,8192}$/.test(keys.mlDsa)) {
|
|
4554
|
+
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
4555
|
+
}
|
|
4556
|
+
return JSON.stringify(parsed);
|
|
4557
|
+
}
|
|
4541
4558
|
var defaultExec2 = async (argv, stdin) => {
|
|
4542
4559
|
const child = Bun.spawn([...argv], {
|
|
4543
4560
|
stdin: stdin === undefined ? undefined : new Blob([stdin]),
|
|
@@ -5051,9 +5068,7 @@ async function applyMetalBootstrap(config, options) {
|
|
|
5051
5068
|
AGENT_PATH,
|
|
5052
5069
|
"identity"
|
|
5053
5070
|
]);
|
|
5054
|
-
const publicIdentity = identity.stdout.trim();
|
|
5055
|
-
if (!publicIdentity || /[\r\n]/.test(publicIdentity))
|
|
5056
|
-
throw new MetalBootstrapError("metal public identity proof was invalid");
|
|
5071
|
+
const publicIdentity = normalizeMetalPublicIdentity(identity.stdout.trim());
|
|
5057
5072
|
const state = {
|
|
5058
5073
|
initializedAt: new Date().toISOString(),
|
|
5059
5074
|
role: "metal",
|
|
@@ -1697,7 +1697,7 @@ function requestSoftware(requirements, socketPath = DEFAULT_SOFTWARE_HELPER_SOCK
|
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
1699
|
// src/version.ts
|
|
1700
|
-
var VERSION3 = "0.1.
|
|
1700
|
+
var VERSION3 = "0.1.47";
|
|
1701
1701
|
|
|
1702
1702
|
// src/egress-policy.ts
|
|
1703
1703
|
import { realpathSync as realpathSync2 } from "node:fs";
|
package/dist/provision.js
CHANGED
|
@@ -1697,7 +1697,7 @@ function requestSoftware(requirements, socketPath = DEFAULT_SOFTWARE_HELPER_SOCK
|
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
1699
|
// src/version.ts
|
|
1700
|
-
var VERSION3 = "0.1.
|
|
1700
|
+
var VERSION3 = "0.1.47";
|
|
1701
1701
|
|
|
1702
1702
|
// src/egress-policy.ts
|
|
1703
1703
|
import { realpathSync as realpathSync2 } from "node:fs";
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** One package version shared by both public binaries. Pinned to package.json by tests. */
|
|
2
|
-
export declare const VERSION = "0.1.
|
|
2
|
+
export declare const VERSION = "0.1.47";
|