@forgezero/agent 0.1.144 → 0.1.146

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.
@@ -917,7 +917,7 @@ async function postSignedNode(options, path, body) {
917
917
  }
918
918
 
919
919
  // src/version.ts
920
- var VERSION3 = "0.1.144";
920
+ var VERSION3 = "0.1.146";
921
921
 
922
922
  // src/agent-heartbeat.ts
923
923
  function readAgentHostMetrics() {
package/dist/bootstrap.js CHANGED
@@ -1460,7 +1460,7 @@ var UPDATE_RETRY_BASE_MS = 5 * 60000;
1460
1460
  var UPDATE_RETRY_MAX_MS = 24 * 60 * 60000;
1461
1461
 
1462
1462
  // src/version.ts
1463
- var VERSION = "0.1.144";
1463
+ var VERSION = "0.1.146";
1464
1464
 
1465
1465
  // src/software.ts
1466
1466
  var PINNED_BUN_VERSION = "1.3.14";
@@ -3555,6 +3555,9 @@ function renderPlatformActivationFiles(input) {
3555
3555
  boundedInteger("greenPort", input.greenPort, 1024, 65535);
3556
3556
  if (input.bluePort === input.greenPort)
3557
3557
  throw new Error("Activation slot ports must differ.");
3558
+ if (!/^[A-Za-z0-9.-]{1,253}$/.test(input.seedMeshAddress) || input.seedMeshAddress.startsWith(".") || input.seedMeshAddress.endsWith(".")) {
3559
+ throw new Error("Activation seed mesh address is malformed.");
3560
+ }
3558
3561
  boundedInteger("keepReleases", input.keepReleases, 2, 100);
3559
3562
  const drainDeadlineMs = boundedInteger("drainDeadlineMs", input.drainDeadlineMs ?? 35000, 1000, 300000);
3560
3563
  if (!/^\/[A-Za-z0-9/_-]{1,128}$/.test(input.healthPath) || input.healthPath.includes("..")) {
@@ -3565,6 +3568,7 @@ function renderPlatformActivationFiles(input) {
3565
3568
  `FZ_USER=${input.serviceUser}`,
3566
3569
  `FZ_BLUE_PORT=${input.bluePort}`,
3567
3570
  `FZ_GREEN_PORT=${input.greenPort}`,
3571
+ `FZ_SEED_MESH_ADDRESS=${input.seedMeshAddress}`,
3568
3572
  `FZ_HEALTH_PATH=${input.healthPath}`,
3569
3573
  `FZ_KEEP_RELEASES=${input.keepReleases}`,
3570
3574
  `FZ_DRAIN_DEADLINE_MS=${drainDeadlineMs}`
@@ -4937,11 +4941,15 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
4937
4941
  concurrencyLimit: runtime.environment.concurrencyLimit,
4938
4942
  workerDrainSeconds: Math.ceil(runtime.environment.drainDeadlineMs / 1000)
4939
4943
  });
4944
+ const seedMeshAddress = runtime.environment.databaseAddress ?? config.database.address;
4945
+ if (!seedMeshAddress)
4946
+ throw new Error("platform activation requires the private seed mesh address");
4940
4947
  const activation = renderPlatformActivationFiles({
4941
4948
  root: config.deployRoot ?? "/opt/forgezero",
4942
4949
  serviceUser: runtime.serviceUser,
4943
4950
  bluePort: runtime.bluePort,
4944
4951
  greenPort: runtime.greenPort,
4952
+ seedMeshAddress,
4945
4953
  healthPath: runtime.healthPath,
4946
4954
  keepReleases: runtime.keepReleases,
4947
4955
  drainDeadlineMs: runtime.environment.drainDeadlineMs