@forgezero/agent 0.1.64 → 0.1.65
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/cli/agent-install.d.ts +9 -0
- package/dist/fz-agent.js +1 -1
- package/dist/fz.js +15 -8
- package/dist/metal-bootstrap.js +1 -1
- package/dist/operator-bootstrap.js +1 -1
- 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
|
@@ -84,6 +84,15 @@ export interface InstallOptions {
|
|
|
84
84
|
nodeHostname?: string;
|
|
85
85
|
telemetryEndpoint?: string;
|
|
86
86
|
}
|
|
87
|
+
export type GitIdentityInstallOptions = Pick<InstallOptions, 'gitCredentialPath' | 'gitPublicKeyPath' | 'generateGitIdentity'>;
|
|
88
|
+
/**
|
|
89
|
+
* Resolve the optional compatibility Git identity from the explicit install
|
|
90
|
+
* environment. An ordinary Agent install must not load a credential merely
|
|
91
|
+
* because the CLI knows its conventional pathname: systemd treats every
|
|
92
|
+
* LoadCredentialEncrypted entry as required and refuses to start when that
|
|
93
|
+
* file does not exist.
|
|
94
|
+
*/
|
|
95
|
+
export declare function resolveGitIdentityInstallOptions(environment: Readonly<Record<string, string | undefined>>): GitIdentityInstallOptions;
|
|
87
96
|
export declare function planInstall(options: InstallOptions): ProvisionPlan;
|
|
88
97
|
/** Execute the same ordered plan the control plane executes over SSH. */
|
|
89
98
|
export declare function applyPlan(plan: ProvisionPlan, run: (operation: CapabilityOperation | ProvisionOperation) => Promise<{
|
package/dist/fz-agent.js
CHANGED
package/dist/fz.js
CHANGED
|
@@ -4829,7 +4829,7 @@ var UPDATE_RETRY_BASE_MS = 5 * 60000;
|
|
|
4829
4829
|
var UPDATE_RETRY_MAX_MS = 24 * 60 * 60000;
|
|
4830
4830
|
|
|
4831
4831
|
// src/version.ts
|
|
4832
|
-
var VERSION2 = "0.1.
|
|
4832
|
+
var VERSION2 = "0.1.65";
|
|
4833
4833
|
|
|
4834
4834
|
// src/software.ts
|
|
4835
4835
|
var PINNED_BUN_VERSION = "1.3.14";
|
|
@@ -6596,6 +6596,16 @@ async function localRunner(operation) {
|
|
|
6596
6596
|
`, exitCode: 1 };
|
|
6597
6597
|
}
|
|
6598
6598
|
}
|
|
6599
|
+
function resolveGitIdentityInstallOptions(environment) {
|
|
6600
|
+
const generateGitIdentity = environment.FZ_GENERATE_GIT_DEPLOY_KEY === "true";
|
|
6601
|
+
const explicitCredential = environment.FZ_GIT_CREDENTIAL_PATH?.trim() || undefined;
|
|
6602
|
+
const explicitPublicKey = environment.FZ_GIT_PUBLIC_KEY_PATH?.trim() || undefined;
|
|
6603
|
+
return {
|
|
6604
|
+
gitCredentialPath: explicitCredential ?? (generateGitIdentity ? "/etc/forgezero/creds/git-deploy-key.cred" : undefined),
|
|
6605
|
+
gitPublicKeyPath: explicitPublicKey ?? (generateGitIdentity ? "/etc/forgezero/git/deploy.pub" : undefined),
|
|
6606
|
+
generateGitIdentity
|
|
6607
|
+
};
|
|
6608
|
+
}
|
|
6599
6609
|
function planInstall(options) {
|
|
6600
6610
|
const { capabilities, ...unit } = options;
|
|
6601
6611
|
return planProvision({ ...unit, mode: modeFor(capabilities) });
|
|
@@ -17456,16 +17466,13 @@ async function cmdAgent(options, args) {
|
|
|
17456
17466
|
}
|
|
17457
17467
|
const enrolTokenCredentialPath = "/etc/forgezero/creds/enrol-token.cred";
|
|
17458
17468
|
const enrolStatePath = "/var/lib/forgezero/enrolment.json";
|
|
17459
|
-
const
|
|
17460
|
-
const gitPublicKeyPath = process.env.FZ_GIT_PUBLIC_KEY_PATH ?? "/etc/forgezero/git/deploy.pub";
|
|
17469
|
+
const gitIdentity = resolveGitIdentityInstallOptions(process.env);
|
|
17461
17470
|
const plan = planInstall({
|
|
17462
17471
|
capabilities: await readCapabilities(localRunner),
|
|
17463
17472
|
socketPath: process.env.FZ_SOCKET_PATH ?? DEFAULT_SOCKET,
|
|
17464
17473
|
seedPath: process.env.FZ_SEED_PATH ?? "/var/lib/forgezero/node.seed",
|
|
17465
17474
|
seedCredentialPath: process.env.FZ_SEED_CREDENTIAL_PATH,
|
|
17466
|
-
|
|
17467
|
-
gitPublicKeyPath,
|
|
17468
|
-
generateGitIdentity: process.env.FZ_GENERATE_GIT_DEPLOY_KEY === "true",
|
|
17475
|
+
...gitIdentity,
|
|
17469
17476
|
controlSocketPath: process.env.FZ_CONTROL_SOCKET,
|
|
17470
17477
|
repository: process.env.FZ_DEPLOY_REPO,
|
|
17471
17478
|
branch: process.env.FZ_DEPLOY_BRANCH,
|
|
@@ -17550,11 +17557,11 @@ async function cmdAgent(options, args) {
|
|
|
17550
17557
|
for (const step3 of transcript)
|
|
17551
17558
|
out.ok(step3.label);
|
|
17552
17559
|
out.ok("Agent service and socket verified");
|
|
17553
|
-
if (existsSync12(gitPublicKeyPath)) {
|
|
17560
|
+
if (gitIdentity.gitPublicKeyPath && existsSync12(gitIdentity.gitPublicKeyPath)) {
|
|
17554
17561
|
out.line();
|
|
17555
17562
|
out.line(" Compatibility SSH deploy public key:");
|
|
17556
17563
|
out.line();
|
|
17557
|
-
out.line(` ${readFileSync15(gitPublicKeyPath, "utf8").trim()}`);
|
|
17564
|
+
out.line(` ${readFileSync15(gitIdentity.gitPublicKeyPath, "utf8").trim()}`);
|
|
17558
17565
|
out.line();
|
|
17559
17566
|
}
|
|
17560
17567
|
return 0;
|
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.65";
|
|
296
296
|
|
|
297
297
|
// src/otel-collector.ts
|
|
298
298
|
var FORGEZERO_OTEL_COLLECTOR_UNIT = "forgezero-otel-collector.service";
|
|
@@ -2088,7 +2088,7 @@ function requestSoftware(requirements, socketPath = DEFAULT_SOFTWARE_HELPER_SOCK
|
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
2090
|
// src/version.ts
|
|
2091
|
-
var VERSION3 = "0.1.
|
|
2091
|
+
var VERSION3 = "0.1.65";
|
|
2092
2092
|
|
|
2093
2093
|
// src/egress-policy.ts
|
|
2094
2094
|
import { realpathSync as realpathSync3 } from "node:fs";
|
package/dist/provision.js
CHANGED
|
@@ -2088,7 +2088,7 @@ function requestSoftware(requirements, socketPath = DEFAULT_SOFTWARE_HELPER_SOCK
|
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
2090
|
// src/version.ts
|
|
2091
|
-
var VERSION3 = "0.1.
|
|
2091
|
+
var VERSION3 = "0.1.65";
|
|
2092
2092
|
|
|
2093
2093
|
// src/egress-policy.ts
|
|
2094
2094
|
import { realpathSync as realpathSync3 } 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.65";
|