@forgezero/agent 0.1.116 → 0.1.117

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 CHANGED
@@ -229,8 +229,8 @@ import {
229
229
  ForgeZero,
230
230
  } from '@forgezero/vault';
231
231
 
232
- const fz = new ForgeZero({ project: 'altpilot', environment: 'production' });
233
- await fz.get('STRIPE_KEY');
232
+ const fz = new ForgeZero({ project: 'payments-api', environment: 'production' });
233
+ await fz.get('PAYMENT_PROVIDER');
234
234
  ```
235
235
 
236
236
  ## A local copy, not a cache
@@ -917,7 +917,7 @@ async function postSignedNode(options, path, body) {
917
917
  }
918
918
 
919
919
  // src/version.ts
920
- var VERSION3 = "0.1.116";
920
+ var VERSION3 = "0.1.117";
921
921
 
922
922
  // src/agent-heartbeat.ts
923
923
  function readAgentHostMetrics() {
@@ -89,7 +89,7 @@ export interface EnrolledComputeActivationConfig {
89
89
  profile?: string;
90
90
  deployRoot?: string;
91
91
  software?: SoftwareRequirement[];
92
- /** Compatibility-only per-node SSH deploy key. GitHub App is the scalable default. */
92
+ /** Compatibility-only per-node SSH deploy key for non-provider sources. */
93
93
  gitDeployKey?: boolean;
94
94
  installCloudflared?: boolean;
95
95
  installWarp?: boolean;
@@ -115,7 +115,6 @@ export interface PlatformBootstrapSecrets {
115
115
  backupS3Secret?: string;
116
116
  cloudflareTunnelToken?: string;
117
117
  cloudflareApiToken?: string;
118
- githubOAuthClientSecret: string;
119
118
  }
120
119
  export interface EnrolledComputeBootstrapSecrets {
121
120
  enrolmentToken: string;
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.116";
1463
+ var VERSION = "0.1.117";
1464
1464
 
1465
1465
  // src/software.ts
1466
1466
  var PINNED_BUN_VERSION = "1.3.14";
@@ -3272,9 +3272,6 @@ function validatePlatformSharedEnvironment(input) {
3272
3272
  } else if (input.email !== undefined) {
3273
3273
  throw new Error("Bootstrap email provider must be smtp or jetemail.");
3274
3274
  }
3275
- if (!input.githubOAuth || !/^(?:Iv1\.[A-Fa-f0-9]{16}|Ov23li[A-Za-z0-9]{14,})$/.test(input.githubOAuth.clientId)) {
3276
- throw new Error("GitHub OAuth client id is malformed.");
3277
- }
3278
3275
  boundedInteger("publicApiPort", input.publicApiPort, 1024, 65533);
3279
3276
  if (!Array.isArray(input.seedSyncMembers) || input.seedSyncMembers.length < 3 || input.seedSyncMembers.length > 64 || new Set(input.seedSyncMembers).size !== input.seedSyncMembers.length) {
3280
3277
  throw new Error("seedSyncMembers must contain 3 to 64 unique physical host identities.");
@@ -3405,7 +3402,6 @@ function renderPlatformSharedEnvironment(input) {
3405
3402
  FZ_REALTIME_WORKER_SCRIPT: value.realtime?.workerScriptName ?? "",
3406
3403
  FZ_REALTIME_ENDPOINT: value.realtime?.endpoint ?? "",
3407
3404
  FZ_REALTIME_PRODUCER: value.realtime?.producer ?? "",
3408
- FZ_GITHUB_OAUTH_CLIENT_ID: value.githubOAuth.clientId,
3409
3405
  FZ_PLATFORM_INITIAL_INVENTORY: value.initialInventory ? JSON.stringify(value.initialInventory) : ""
3410
3406
  };
3411
3407
  return `# Generated by fz bootstrap platform. Non-secret coordinates only.
@@ -3417,7 +3413,6 @@ function platformApiCredentialSpecs(options) {
3417
3413
  const optional = [
3418
3414
  ["fz_smtp.password", options.emailProvider === "smtp"],
3419
3415
  ["fz_jetemail.apiKey", options.emailProvider === "jetemail"],
3420
- ["fz_oauth.github.clientSecret", options.githubOAuth],
3421
3416
  ["CF_API_TOKEN", options.cloudflareKv],
3422
3417
  ["CF_TUNNEL_TOKEN", options.cloudflareKv],
3423
3418
  ["REALTIME_PUBLISH_SECRET", options.realtime],
@@ -3814,15 +3809,7 @@ function validatePlatformBootstrapSecrets(config, input) {
3814
3809
  if (!input || typeof input !== "object" || Array.isArray(input))
3815
3810
  throw new Error("bootstrap credential input must be an object");
3816
3811
  const source = input;
3817
- const allowed = [
3818
- "clusterBootstrapCode",
3819
- "emailSecret",
3820
- "enrolmentToken",
3821
- "backupS3Secret",
3822
- "cloudflareTunnelToken",
3823
- "cloudflareApiToken",
3824
- "githubOAuthClientSecret"
3825
- ];
3812
+ const allowed = ["clusterBootstrapCode", "emailSecret", "enrolmentToken", "backupS3Secret", "cloudflareTunnelToken", "cloudflareApiToken"];
3826
3813
  const unknown = Object.keys(source).filter((key) => !allowed.includes(key));
3827
3814
  if (unknown.length)
3828
3815
  throw new Error(`bootstrap credential input contains unsupported field ${unknown[0]}`);
@@ -3832,7 +3819,6 @@ function validatePlatformBootstrapSecrets(config, input) {
3832
3819
  const backupS3Secret = typeof source.backupS3Secret === "string" ? source.backupS3Secret.trim() : undefined;
3833
3820
  const cloudflareTunnelToken = typeof source.cloudflareTunnelToken === "string" ? source.cloudflareTunnelToken.trim() : undefined;
3834
3821
  const cloudflareApiToken = typeof source.cloudflareApiToken === "string" ? source.cloudflareApiToken.trim() : undefined;
3835
- const githubOAuthClientSecret = typeof source.githubOAuthClientSecret === "string" ? source.githubOAuthClientSecret.trim() : "";
3836
3822
  if (!/^[a-f0-9]{64}$/i.test(clusterBootstrapCode))
3837
3823
  throw new Error("cluster bootstrap code must contain exactly 64 hexadecimal characters");
3838
3824
  if (!emailSecret || emailSecret.length > 16384 || /[\r\n\0]/.test(emailSecret))
@@ -3852,16 +3838,12 @@ function validatePlatformBootstrapSecrets(config, input) {
3852
3838
  }
3853
3839
  if (cloudflareTunnelToken)
3854
3840
  validateCloudflareBootstrapSecretPair({ cloudflareTunnelToken, cloudflareApiToken });
3855
- if (githubOAuthClientSecret.length < 20 || githubOAuthClientSecret.length > 512 || /[\r\n\0]/.test(githubOAuthClientSecret)) {
3856
- throw new Error("GitHub OAuth client secret is malformed");
3857
- }
3858
3841
  return {
3859
3842
  clusterBootstrapCode,
3860
3843
  emailSecret,
3861
3844
  ...enrolmentToken ? { enrolmentToken } : {},
3862
3845
  ...backupS3Secret ? { backupS3Secret } : {},
3863
- ...cloudflareTunnelToken ? { cloudflareTunnelToken, cloudflareApiToken } : {},
3864
- githubOAuthClientSecret
3846
+ ...cloudflareTunnelToken ? { cloudflareTunnelToken, cloudflareApiToken } : {}
3865
3847
  };
3866
3848
  }
3867
3849
  var platformBootstrapRunner = (config) => config.kind === "platform" && config.database.role === "master";
@@ -4784,8 +4766,7 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
4784
4766
  enrolmentToken: checked4.enrolmentToken,
4785
4767
  backup: checked4.backupS3Secret,
4786
4768
  cloudflareTunnelToken: checked4.cloudflareTunnelToken,
4787
- cloudflareApiToken: checked4.cloudflareApiToken,
4788
- githubOAuthClientSecret: checked4.githubOAuthClientSecret
4769
+ cloudflareApiToken: checked4.cloudflareApiToken
4789
4770
  };
4790
4771
  })() : undefined;
4791
4772
  const enrolledPrivate = config.kind === "enrolled-compute" ? validateEnrolledComputeBootstrapSecrets(config, secrets) : undefined;
@@ -4886,7 +4867,6 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
4886
4867
  const emailCredentialName = config.runtime.environment.email?.provider === "smtp" ? "fz_smtp.password" : config.runtime.environment.email?.provider === "jetemail" ? "fz_jetemail.apiKey" : undefined;
4887
4868
  for (const [name, source] of Object.entries({
4888
4869
  ...emailCredentialName ? { [emailCredentialName]: platformPrivate.email } : {},
4889
- "fz_oauth.github.clientSecret": platformPrivate.githubOAuthClientSecret,
4890
4870
  "backup.s3.secretAccessKey": platformPrivate.backup
4891
4871
  })) {
4892
4872
  if (source) {
@@ -4903,7 +4883,6 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
4903
4883
  const credentials = platformApiCredentialSpecs({
4904
4884
  emailProvider: runtime.environment.email?.provider,
4905
4885
  cloudflareKv: cloudflareConfigured,
4906
- githubOAuth: true,
4907
4886
  realtime: Boolean(runtime.environment.realtime)
4908
4887
  });
4909
4888
  const units = renderPlatformApiUnits({
@@ -5151,7 +5130,6 @@ function strictBootstrapDocument(value) {
5151
5130
  "agentOtlpEndpoint",
5152
5131
  "custodianEmail",
5153
5132
  "email",
5154
- "githubOAuth",
5155
5133
  "deployProfile",
5156
5134
  "otlpFlushIntervalMs",
5157
5135
  "otlpTraceSampleRatio",
@@ -5162,7 +5140,6 @@ function strictBootstrapDocument(value) {
5162
5140
  "databaseReadPreferredCoordinators"
5163
5141
  ], "runtime environment");
5164
5142
  const environment = runtime.environment;
5165
- exactKeys(environment.githubOAuth, ["clientId"], "GitHub OAuth config");
5166
5143
  if (environment.initialInventory !== undefined) {
5167
5144
  const inventory = exactKeys(environment.initialInventory, ["metalHostname", "metalIdentity", "region", "computes", "attestation", "deployment"], "initial inventory");
5168
5145
  if (inventory.metalIdentity !== undefined) {
package/dist/fz-agent.js CHANGED
@@ -9601,7 +9601,7 @@ async function writeAndCloseProcessInput(input, value) {
9601
9601
  }
9602
9602
 
9603
9603
  // src/version.ts
9604
- var VERSION2 = "0.1.116";
9604
+ var VERSION2 = "0.1.117";
9605
9605
 
9606
9606
  // src/ssh-bootstrap.ts
9607
9607
  class SshBootstrapError extends Error {
package/dist/fz.js CHANGED
@@ -4634,7 +4634,7 @@ var VaultError, runtimeEnvironment = () => typeof process !== "undefined" && pro
4634
4634
  } catch {
4635
4635
  return;
4636
4636
  }
4637
- }, VERSION = "0.1.20";
4637
+ }, VERSION = "0.1.21";
4638
4638
  var init_dist = __esm(() => {
4639
4639
  init_identity();
4640
4640
  VaultError = class VaultError extends Error {
@@ -4841,7 +4841,7 @@ var UPDATE_RETRY_BASE_MS = 5 * 60000;
4841
4841
  var UPDATE_RETRY_MAX_MS = 24 * 60 * 60000;
4842
4842
 
4843
4843
  // src/version.ts
4844
- var VERSION2 = "0.1.116";
4844
+ var VERSION2 = "0.1.117";
4845
4845
 
4846
4846
  // src/software.ts
4847
4847
  var PINNED_BUN_VERSION = "1.3.14";
@@ -12383,9 +12383,6 @@ function validatePlatformSharedEnvironment(input) {
12383
12383
  } else if (input.email !== undefined) {
12384
12384
  throw new Error("Bootstrap email provider must be smtp or jetemail.");
12385
12385
  }
12386
- if (!input.githubOAuth || !/^(?:Iv1\.[A-Fa-f0-9]{16}|Ov23li[A-Za-z0-9]{14,})$/.test(input.githubOAuth.clientId)) {
12387
- throw new Error("GitHub OAuth client id is malformed.");
12388
- }
12389
12386
  boundedInteger("publicApiPort", input.publicApiPort, 1024, 65533);
12390
12387
  if (!Array.isArray(input.seedSyncMembers) || input.seedSyncMembers.length < 3 || input.seedSyncMembers.length > 64 || new Set(input.seedSyncMembers).size !== input.seedSyncMembers.length) {
12391
12388
  throw new Error("seedSyncMembers must contain 3 to 64 unique physical host identities.");
@@ -12516,7 +12513,6 @@ function renderPlatformSharedEnvironment(input) {
12516
12513
  FZ_REALTIME_WORKER_SCRIPT: value.realtime?.workerScriptName ?? "",
12517
12514
  FZ_REALTIME_ENDPOINT: value.realtime?.endpoint ?? "",
12518
12515
  FZ_REALTIME_PRODUCER: value.realtime?.producer ?? "",
12519
- FZ_GITHUB_OAUTH_CLIENT_ID: value.githubOAuth.clientId,
12520
12516
  FZ_PLATFORM_INITIAL_INVENTORY: value.initialInventory ? JSON.stringify(value.initialInventory) : ""
12521
12517
  };
12522
12518
  return `# Generated by fz bootstrap platform. Non-secret coordinates only.
@@ -12528,7 +12524,6 @@ function platformApiCredentialSpecs(options) {
12528
12524
  const optional = [
12529
12525
  ["fz_smtp.password", options.emailProvider === "smtp"],
12530
12526
  ["fz_jetemail.apiKey", options.emailProvider === "jetemail"],
12531
- ["fz_oauth.github.clientSecret", options.githubOAuth],
12532
12527
  ["CF_API_TOKEN", options.cloudflareKv],
12533
12528
  ["CF_TUNNEL_TOKEN", options.cloudflareKv],
12534
12529
  ["REALTIME_PUBLISH_SECRET", options.realtime],
@@ -14201,15 +14196,7 @@ function validatePlatformBootstrapSecrets(config, input) {
14201
14196
  if (!input || typeof input !== "object" || Array.isArray(input))
14202
14197
  throw new Error("bootstrap credential input must be an object");
14203
14198
  const source = input;
14204
- const allowed = [
14205
- "clusterBootstrapCode",
14206
- "emailSecret",
14207
- "enrolmentToken",
14208
- "backupS3Secret",
14209
- "cloudflareTunnelToken",
14210
- "cloudflareApiToken",
14211
- "githubOAuthClientSecret"
14212
- ];
14199
+ const allowed = ["clusterBootstrapCode", "emailSecret", "enrolmentToken", "backupS3Secret", "cloudflareTunnelToken", "cloudflareApiToken"];
14213
14200
  const unknown = Object.keys(source).filter((key) => !allowed.includes(key));
14214
14201
  if (unknown.length)
14215
14202
  throw new Error(`bootstrap credential input contains unsupported field ${unknown[0]}`);
@@ -14219,7 +14206,6 @@ function validatePlatformBootstrapSecrets(config, input) {
14219
14206
  const backupS3Secret = typeof source.backupS3Secret === "string" ? source.backupS3Secret.trim() : undefined;
14220
14207
  const cloudflareTunnelToken = typeof source.cloudflareTunnelToken === "string" ? source.cloudflareTunnelToken.trim() : undefined;
14221
14208
  const cloudflareApiToken = typeof source.cloudflareApiToken === "string" ? source.cloudflareApiToken.trim() : undefined;
14222
- const githubOAuthClientSecret = typeof source.githubOAuthClientSecret === "string" ? source.githubOAuthClientSecret.trim() : "";
14223
14209
  if (!/^[a-f0-9]{64}$/i.test(clusterBootstrapCode))
14224
14210
  throw new Error("cluster bootstrap code must contain exactly 64 hexadecimal characters");
14225
14211
  if (!emailSecret || emailSecret.length > 16384 || /[\r\n\0]/.test(emailSecret))
@@ -14239,16 +14225,12 @@ function validatePlatformBootstrapSecrets(config, input) {
14239
14225
  }
14240
14226
  if (cloudflareTunnelToken)
14241
14227
  validateCloudflareBootstrapSecretPair({ cloudflareTunnelToken, cloudflareApiToken });
14242
- if (githubOAuthClientSecret.length < 20 || githubOAuthClientSecret.length > 512 || /[\r\n\0]/.test(githubOAuthClientSecret)) {
14243
- throw new Error("GitHub OAuth client secret is malformed");
14244
- }
14245
14228
  return {
14246
14229
  clusterBootstrapCode,
14247
14230
  emailSecret,
14248
14231
  ...enrolmentToken ? { enrolmentToken } : {},
14249
14232
  ...backupS3Secret ? { backupS3Secret } : {},
14250
- ...cloudflareTunnelToken ? { cloudflareTunnelToken, cloudflareApiToken } : {},
14251
- githubOAuthClientSecret
14233
+ ...cloudflareTunnelToken ? { cloudflareTunnelToken, cloudflareApiToken } : {}
14252
14234
  };
14253
14235
  }
14254
14236
  var platformBootstrapRunner = (config) => config.kind === "platform" && config.database.role === "master";
@@ -15171,8 +15153,7 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
15171
15153
  enrolmentToken: checked4.enrolmentToken,
15172
15154
  backup: checked4.backupS3Secret,
15173
15155
  cloudflareTunnelToken: checked4.cloudflareTunnelToken,
15174
- cloudflareApiToken: checked4.cloudflareApiToken,
15175
- githubOAuthClientSecret: checked4.githubOAuthClientSecret
15156
+ cloudflareApiToken: checked4.cloudflareApiToken
15176
15157
  };
15177
15158
  })() : undefined;
15178
15159
  const enrolledPrivate = config.kind === "enrolled-compute" ? validateEnrolledComputeBootstrapSecrets(config, secrets) : undefined;
@@ -15273,7 +15254,6 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
15273
15254
  const emailCredentialName = config.runtime.environment.email?.provider === "smtp" ? "fz_smtp.password" : config.runtime.environment.email?.provider === "jetemail" ? "fz_jetemail.apiKey" : undefined;
15274
15255
  for (const [name, source] of Object.entries({
15275
15256
  ...emailCredentialName ? { [emailCredentialName]: platformPrivate.email } : {},
15276
- "fz_oauth.github.clientSecret": platformPrivate.githubOAuthClientSecret,
15277
15257
  "backup.s3.secretAccessKey": platformPrivate.backup
15278
15258
  })) {
15279
15259
  if (source) {
@@ -15290,7 +15270,6 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
15290
15270
  const credentials = platformApiCredentialSpecs({
15291
15271
  emailProvider: runtime.environment.email?.provider,
15292
15272
  cloudflareKv: cloudflareConfigured,
15293
- githubOAuth: true,
15294
15273
  realtime: Boolean(runtime.environment.realtime)
15295
15274
  });
15296
15275
  const units = renderPlatformApiUnits({
@@ -15538,7 +15517,6 @@ function strictBootstrapDocument(value) {
15538
15517
  "agentOtlpEndpoint",
15539
15518
  "custodianEmail",
15540
15519
  "email",
15541
- "githubOAuth",
15542
15520
  "deployProfile",
15543
15521
  "otlpFlushIntervalMs",
15544
15522
  "otlpTraceSampleRatio",
@@ -15549,7 +15527,6 @@ function strictBootstrapDocument(value) {
15549
15527
  "databaseReadPreferredCoordinators"
15550
15528
  ], "runtime environment");
15551
15529
  const environment = runtime.environment;
15552
- exactKeys2(environment.githubOAuth, ["clientId"], "GitHub OAuth config");
15553
15530
  if (environment.initialInventory !== undefined) {
15554
15531
  const inventory = exactKeys2(environment.initialInventory, ["metalHostname", "metalIdentity", "region", "computes", "attestation", "deployment"], "initial inventory");
15555
15532
  if (inventory.metalIdentity !== undefined) {
@@ -18263,7 +18240,6 @@ function forgeZeroLaunchTemplate(profile, guests, bundle, owner) {
18263
18240
  otlpTraceSampleRatio: 0.1,
18264
18241
  custodianEmail: owner.custodianEmail,
18265
18242
  email: owner.email,
18266
- githubOAuth: owner.githubOAuth,
18267
18243
  deployProfile: profile.environment
18268
18244
  },
18269
18245
  serviceUser: "forgezero-api",
@@ -18651,18 +18627,15 @@ function readPlatformLaunchEnvironment(path) {
18651
18627
  throw new Error(`bootstrap secret environment is missing ${name}`);
18652
18628
  return value;
18653
18629
  };
18654
- const githubOAuth = { clientId: requiredValue("FZ_GITHUB_OAUTH_CLIENT_ID") };
18655
18630
  const owner = {
18656
18631
  custodianEmail: "info@axxra.in",
18657
- email: { provider: "jetemail", from: "noreply@forgezero.net", eu: false },
18658
- githubOAuth
18632
+ email: { provider: "jetemail", from: "noreply@forgezero.net", eu: false }
18659
18633
  };
18660
18634
  return {
18661
18635
  owner,
18662
18636
  emailSecret: requiredValue("FZ_JETEMAIL_API_KEY"),
18663
18637
  cloudflareTunnelToken: requiredValue("CF_TUNNEL_TOKEN"),
18664
- cloudflareApiToken: requiredValue("CF_API_TOKEN"),
18665
- githubOAuthClientSecret: requiredValue("FZ_GITHUB_OAUTH_CLIENT_SECRET")
18638
+ cloudflareApiToken: requiredValue("CF_API_TOKEN")
18666
18639
  };
18667
18640
  }
18668
18641
 
@@ -19488,8 +19461,7 @@ async function promptPlatformBootstrapSecrets(config, generatedClusterBootstrapC
19488
19461
  ...config.cloudflareHandoff || config.runtime.environment.cloudflare ? {
19489
19462
  cloudflareTunnelToken: await bootstrapSecret("CF_TUNNEL_TOKEN"),
19490
19463
  cloudflareApiToken: await bootstrapSecret("CF_API_TOKEN")
19491
- } : {},
19492
- githubOAuthClientSecret: await bootstrapSecret("GitHub OAuth client secret")
19464
+ } : {}
19493
19465
  });
19494
19466
  }
19495
19467
  var bootstrapList = (question, fallback) => bootstrapAnswer(question, fallback).split(",").map((value) => value.trim()).filter(Boolean);
@@ -19787,11 +19759,9 @@ function selectedForgeZeroLaunchEnvironment(value) {
19787
19759
  return value;
19788
19760
  }
19789
19761
  function forgeZeroLaunchOwnerInput() {
19790
- const githubOAuth = { clientId: bootstrapAnswer("GitHub OAuth client ID") };
19791
19762
  return {
19792
19763
  custodianEmail: "info@axxra.in",
19793
- email: { provider: "jetemail", from: "noreply@forgezero.net", eu: false },
19794
- githubOAuth
19764
+ email: { provider: "jetemail", from: "noreply@forgezero.net", eu: false }
19795
19765
  };
19796
19766
  }
19797
19767
  async function prepareForgeZeroPlatformLaunch(environment, outputDirectory, projectRoot, owner) {
@@ -19860,7 +19830,6 @@ function interactiveBootstrap(kind, genesisGuests, genesisCloudflareCheckpoint)
19860
19830
  const backupRegion = backupEndpoint ? bootstrapAnswer("Backup S3 region") : undefined;
19861
19831
  const backupBucket = backupEndpoint ? bootstrapAnswer("Backup S3 bucket") : undefined;
19862
19832
  const backupAccessKeyId = backupEndpoint ? bootstrapAnswer("Backup S3 access-key id") : undefined;
19863
- const githubOAuthClientId = bootstrapAnswer("GitHub OAuth client ID");
19864
19833
  const cloudflareHandoffFile = genesis ? cloudflareHostHandoffPath(genesisCloudflareCheckpoint, computeReference) : bootstrapAnswer("Node-specific Cloudflare host handoff (blank for no public edge)", "");
19865
19834
  const cloudflareNodeName = cloudflareHandoffFile ? genesis ? computeReference : bootstrapAnswer("Cloudflare handoff node name", computeReference) : undefined;
19866
19835
  const databaseNetworkMode = "private-lan";
@@ -19915,7 +19884,6 @@ function interactiveBootstrap(kind, genesisGuests, genesisCloudflareCheckpoint)
19915
19884
  otlpTraceSampleRatio: 0.1,
19916
19885
  custodianEmail: role === "master" ? bootstrapAnswer("First custodian email") : undefined,
19917
19886
  email: emailProvider === "smtp" ? { provider: "smtp", host: smtpHost, port: smtpPort, user: smtpUser, from: emailFrom } : { provider: "jetemail", from: emailFrom, eu: jetemailEu },
19918
- githubOAuth: { clientId: githubOAuthClientId },
19919
19887
  ...backupEndpoint && backupRegion && backupBucket && backupAccessKeyId ? {
19920
19888
  backup: { endpoint: backupEndpoint, region: backupRegion, bucket: backupBucket, accessKeyId: backupAccessKeyId }
19921
19889
  } : {},
@@ -19975,8 +19943,7 @@ async function runAttendedPlatformFleet(fleet, apply, generatedClusterBootstrapC
19975
19943
  clusterBootstrapCode: generatedClusterBootstrapCode,
19976
19944
  emailSecret: environmentInput.emailSecret,
19977
19945
  cloudflareTunnelToken: environmentInput.cloudflareTunnelToken,
19978
- cloudflareApiToken: environmentInput.cloudflareApiToken,
19979
- githubOAuthClientSecret: environmentInput.githubOAuthClientSecret
19946
+ cloudflareApiToken: environmentInput.cloudflareApiToken
19980
19947
  }) : await promptPlatformBootstrapSecrets(firstConfig, generatedClusterBootstrapCode);
19981
19948
  const cloudflare = await resolveCloudflareBootstrapCommandConfig(fleet.cloudflareConfigFile, {
19982
19949
  tunnelToken: secrets.cloudflareTunnelToken,
@@ -366,7 +366,7 @@ function systemdAgentEgressDirectives(loopbackTcpPorts = []) {
366
366
  }
367
367
 
368
368
  // src/version.ts
369
- var VERSION = "0.1.116";
369
+ var VERSION = "0.1.117";
370
370
 
371
371
  // src/otel-collector.ts
372
372
  var FORGEZERO_OTEL_COLLECTOR_UNIT = "forgezero-otel-collector.service";
@@ -8,7 +8,7 @@ export interface MetalCpuPool {
8
8
  key: string;
9
9
  /** Linux CPU-list syntax, including every SMT sibling in this pool. */
10
10
  cpus: string;
11
- /** Real cores represented by cpus; checked against the commercial promise. */
11
+ /** Real cores represented by cpus; checked against the sellable capacity promise. */
12
12
  physicalCores: number;
13
13
  /** Linux NUMA node-list syntax. Optional on a non-NUMA machine. */
14
14
  memoryNodes?: string;
@@ -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.116";
1463
+ var VERSION = "0.1.117";
1464
1464
 
1465
1465
  // src/software.ts
1466
1466
  var PINNED_BUN_VERSION = "1.3.14";
@@ -3272,9 +3272,6 @@ function validatePlatformSharedEnvironment(input) {
3272
3272
  } else if (input.email !== undefined) {
3273
3273
  throw new Error("Bootstrap email provider must be smtp or jetemail.");
3274
3274
  }
3275
- if (!input.githubOAuth || !/^(?:Iv1\.[A-Fa-f0-9]{16}|Ov23li[A-Za-z0-9]{14,})$/.test(input.githubOAuth.clientId)) {
3276
- throw new Error("GitHub OAuth client id is malformed.");
3277
- }
3278
3275
  boundedInteger("publicApiPort", input.publicApiPort, 1024, 65533);
3279
3276
  if (!Array.isArray(input.seedSyncMembers) || input.seedSyncMembers.length < 3 || input.seedSyncMembers.length > 64 || new Set(input.seedSyncMembers).size !== input.seedSyncMembers.length) {
3280
3277
  throw new Error("seedSyncMembers must contain 3 to 64 unique physical host identities.");
@@ -3405,7 +3402,6 @@ function renderPlatformSharedEnvironment(input) {
3405
3402
  FZ_REALTIME_WORKER_SCRIPT: value.realtime?.workerScriptName ?? "",
3406
3403
  FZ_REALTIME_ENDPOINT: value.realtime?.endpoint ?? "",
3407
3404
  FZ_REALTIME_PRODUCER: value.realtime?.producer ?? "",
3408
- FZ_GITHUB_OAUTH_CLIENT_ID: value.githubOAuth.clientId,
3409
3405
  FZ_PLATFORM_INITIAL_INVENTORY: value.initialInventory ? JSON.stringify(value.initialInventory) : ""
3410
3406
  };
3411
3407
  return `# Generated by fz bootstrap platform. Non-secret coordinates only.
@@ -3417,7 +3413,6 @@ function platformApiCredentialSpecs(options) {
3417
3413
  const optional = [
3418
3414
  ["fz_smtp.password", options.emailProvider === "smtp"],
3419
3415
  ["fz_jetemail.apiKey", options.emailProvider === "jetemail"],
3420
- ["fz_oauth.github.clientSecret", options.githubOAuth],
3421
3416
  ["CF_API_TOKEN", options.cloudflareKv],
3422
3417
  ["CF_TUNNEL_TOKEN", options.cloudflareKv],
3423
3418
  ["REALTIME_PUBLISH_SECRET", options.realtime],
@@ -3814,15 +3809,7 @@ function validatePlatformBootstrapSecrets(config, input) {
3814
3809
  if (!input || typeof input !== "object" || Array.isArray(input))
3815
3810
  throw new Error("bootstrap credential input must be an object");
3816
3811
  const source = input;
3817
- const allowed = [
3818
- "clusterBootstrapCode",
3819
- "emailSecret",
3820
- "enrolmentToken",
3821
- "backupS3Secret",
3822
- "cloudflareTunnelToken",
3823
- "cloudflareApiToken",
3824
- "githubOAuthClientSecret"
3825
- ];
3812
+ const allowed = ["clusterBootstrapCode", "emailSecret", "enrolmentToken", "backupS3Secret", "cloudflareTunnelToken", "cloudflareApiToken"];
3826
3813
  const unknown = Object.keys(source).filter((key) => !allowed.includes(key));
3827
3814
  if (unknown.length)
3828
3815
  throw new Error(`bootstrap credential input contains unsupported field ${unknown[0]}`);
@@ -3832,7 +3819,6 @@ function validatePlatformBootstrapSecrets(config, input) {
3832
3819
  const backupS3Secret = typeof source.backupS3Secret === "string" ? source.backupS3Secret.trim() : undefined;
3833
3820
  const cloudflareTunnelToken = typeof source.cloudflareTunnelToken === "string" ? source.cloudflareTunnelToken.trim() : undefined;
3834
3821
  const cloudflareApiToken = typeof source.cloudflareApiToken === "string" ? source.cloudflareApiToken.trim() : undefined;
3835
- const githubOAuthClientSecret = typeof source.githubOAuthClientSecret === "string" ? source.githubOAuthClientSecret.trim() : "";
3836
3822
  if (!/^[a-f0-9]{64}$/i.test(clusterBootstrapCode))
3837
3823
  throw new Error("cluster bootstrap code must contain exactly 64 hexadecimal characters");
3838
3824
  if (!emailSecret || emailSecret.length > 16384 || /[\r\n\0]/.test(emailSecret))
@@ -3852,16 +3838,12 @@ function validatePlatformBootstrapSecrets(config, input) {
3852
3838
  }
3853
3839
  if (cloudflareTunnelToken)
3854
3840
  validateCloudflareBootstrapSecretPair({ cloudflareTunnelToken, cloudflareApiToken });
3855
- if (githubOAuthClientSecret.length < 20 || githubOAuthClientSecret.length > 512 || /[\r\n\0]/.test(githubOAuthClientSecret)) {
3856
- throw new Error("GitHub OAuth client secret is malformed");
3857
- }
3858
3841
  return {
3859
3842
  clusterBootstrapCode,
3860
3843
  emailSecret,
3861
3844
  ...enrolmentToken ? { enrolmentToken } : {},
3862
3845
  ...backupS3Secret ? { backupS3Secret } : {},
3863
- ...cloudflareTunnelToken ? { cloudflareTunnelToken, cloudflareApiToken } : {},
3864
- githubOAuthClientSecret
3846
+ ...cloudflareTunnelToken ? { cloudflareTunnelToken, cloudflareApiToken } : {}
3865
3847
  };
3866
3848
  }
3867
3849
  var platformBootstrapRunner = (config) => config.kind === "platform" && config.database.role === "master";
@@ -4784,8 +4766,7 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
4784
4766
  enrolmentToken: checked4.enrolmentToken,
4785
4767
  backup: checked4.backupS3Secret,
4786
4768
  cloudflareTunnelToken: checked4.cloudflareTunnelToken,
4787
- cloudflareApiToken: checked4.cloudflareApiToken,
4788
- githubOAuthClientSecret: checked4.githubOAuthClientSecret
4769
+ cloudflareApiToken: checked4.cloudflareApiToken
4789
4770
  };
4790
4771
  })() : undefined;
4791
4772
  const enrolledPrivate = config.kind === "enrolled-compute" ? validateEnrolledComputeBootstrapSecrets(config, secrets) : undefined;
@@ -4886,7 +4867,6 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
4886
4867
  const emailCredentialName = config.runtime.environment.email?.provider === "smtp" ? "fz_smtp.password" : config.runtime.environment.email?.provider === "jetemail" ? "fz_jetemail.apiKey" : undefined;
4887
4868
  for (const [name, source] of Object.entries({
4888
4869
  ...emailCredentialName ? { [emailCredentialName]: platformPrivate.email } : {},
4889
- "fz_oauth.github.clientSecret": platformPrivate.githubOAuthClientSecret,
4890
4870
  "backup.s3.secretAccessKey": platformPrivate.backup
4891
4871
  })) {
4892
4872
  if (source) {
@@ -4903,7 +4883,6 @@ async function applyBootstrap(input, host = localBootstrapHost(), secrets, depen
4903
4883
  const credentials = platformApiCredentialSpecs({
4904
4884
  emailProvider: runtime.environment.email?.provider,
4905
4885
  cloudflareKv: cloudflareConfigured,
4906
- githubOAuth: true,
4907
4886
  realtime: Boolean(runtime.environment.realtime)
4908
4887
  });
4909
4888
  const units = renderPlatformApiUnits({
@@ -5151,7 +5130,6 @@ function strictBootstrapDocument(value) {
5151
5130
  "agentOtlpEndpoint",
5152
5131
  "custodianEmail",
5153
5132
  "email",
5154
- "githubOAuth",
5155
5133
  "deployProfile",
5156
5134
  "otlpFlushIntervalMs",
5157
5135
  "otlpTraceSampleRatio",
@@ -5162,7 +5140,6 @@ function strictBootstrapDocument(value) {
5162
5140
  "databaseReadPreferredCoordinators"
5163
5141
  ], "runtime environment");
5164
5142
  const environment = runtime.environment;
5165
- exactKeys(environment.githubOAuth, ["clientId"], "GitHub OAuth config");
5166
5143
  if (environment.initialInventory !== undefined) {
5167
5144
  const inventory = exactKeys(environment.initialInventory, ["metalHostname", "metalIdentity", "region", "computes", "attestation", "deployment"], "initial inventory");
5168
5145
  if (inventory.metalIdentity !== undefined) {
@@ -68,14 +68,6 @@ export type PlatformBootstrapEmail = {
68
68
  from: string;
69
69
  eu: boolean;
70
70
  };
71
- /**
72
- * Public coordinates for one GitHub App. Its client secret, RSA private key and
73
- * webhook secret are attended inputs sealed as systemd credentials and later
74
- * imported into the unlocked platform Vault.
75
- */
76
- export interface PlatformBootstrapGitHubOAuth {
77
- clientId: string;
78
- }
79
71
  export interface PlatformSharedEnvironment {
80
72
  softwareProfile: PlatformSoftwareProfile;
81
73
  databaseRole: PlatformDatabaseRole;
@@ -107,7 +99,6 @@ export interface PlatformSharedEnvironment {
107
99
  otlpTraceSampleRatio: number;
108
100
  custodianEmail?: string;
109
101
  email?: PlatformBootstrapEmail;
110
- githubOAuth: PlatformBootstrapGitHubOAuth;
111
102
  backup?: {
112
103
  endpoint: string;
113
104
  region: string;
@@ -135,13 +126,12 @@ export declare function validatePlatformSharedEnvironment(input: PlatformSharedE
135
126
  /** Render only non-secret runtime coordinates. Passwords/tokens have no field in this contract. */
136
127
  export declare function renderPlatformSharedEnvironment(input: PlatformSharedEnvironment): string;
137
128
  export interface SystemdCredentialSpec {
138
- name: 'arangodb-jwt' | 'arangodb-root-password' | 'seed-sync-root' | 'fz_smtp.password' | 'fz_jetemail.apiKey' | 'fz_oauth.github.clientSecret' | 'CF_API_TOKEN' | 'CF_TUNNEL_TOKEN' | 'REALTIME_PUBLISH_SECRET' | 'REALTIME_TICKET_SECRET';
129
+ name: 'arangodb-jwt' | 'arangodb-root-password' | 'seed-sync-root' | 'fz_smtp.password' | 'fz_jetemail.apiKey' | 'CF_API_TOKEN' | 'CF_TUNNEL_TOKEN' | 'REALTIME_PUBLISH_SECRET' | 'REALTIME_TICKET_SECRET';
139
130
  encryptedPath: string;
140
131
  required: boolean;
141
132
  }
142
133
  export declare function platformApiCredentialSpecs(options: {
143
134
  emailProvider?: PlatformBootstrapEmail['provider'];
144
- githubOAuth: boolean;
145
135
  cloudflareKv: boolean;
146
136
  realtime: boolean;
147
137
  }): SystemdCredentialSpec[];
@@ -831,9 +831,6 @@ function validatePlatformSharedEnvironment(input) {
831
831
  } else if (input.email !== undefined) {
832
832
  throw new Error("Bootstrap email provider must be smtp or jetemail.");
833
833
  }
834
- if (!input.githubOAuth || !/^(?:Iv1\.[A-Fa-f0-9]{16}|Ov23li[A-Za-z0-9]{14,})$/.test(input.githubOAuth.clientId)) {
835
- throw new Error("GitHub OAuth client id is malformed.");
836
- }
837
834
  boundedInteger("publicApiPort", input.publicApiPort, 1024, 65533);
838
835
  if (!Array.isArray(input.seedSyncMembers) || input.seedSyncMembers.length < 3 || input.seedSyncMembers.length > 64 || new Set(input.seedSyncMembers).size !== input.seedSyncMembers.length) {
839
836
  throw new Error("seedSyncMembers must contain 3 to 64 unique physical host identities.");
@@ -964,7 +961,6 @@ function renderPlatformSharedEnvironment(input) {
964
961
  FZ_REALTIME_WORKER_SCRIPT: value.realtime?.workerScriptName ?? "",
965
962
  FZ_REALTIME_ENDPOINT: value.realtime?.endpoint ?? "",
966
963
  FZ_REALTIME_PRODUCER: value.realtime?.producer ?? "",
967
- FZ_GITHUB_OAUTH_CLIENT_ID: value.githubOAuth.clientId,
968
964
  FZ_PLATFORM_INITIAL_INVENTORY: value.initialInventory ? JSON.stringify(value.initialInventory) : ""
969
965
  };
970
966
  return `# Generated by fz bootstrap platform. Non-secret coordinates only.
@@ -976,7 +972,6 @@ function platformApiCredentialSpecs(options) {
976
972
  const optional = [
977
973
  ["fz_smtp.password", options.emailProvider === "smtp"],
978
974
  ["fz_jetemail.apiKey", options.emailProvider === "jetemail"],
979
- ["fz_oauth.github.clientSecret", options.githubOAuth],
980
975
  ["CF_API_TOKEN", options.cloudflareKv],
981
976
  ["CF_TUNNEL_TOKEN", options.cloudflareKv],
982
977
  ["REALTIME_PUBLISH_SECRET", options.realtime],
@@ -3009,7 +3009,7 @@ function requestSoftware(requirements, socketPath = DEFAULT_SOFTWARE_HELPER_SOCK
3009
3009
  }
3010
3010
 
3011
3011
  // src/version.ts
3012
- var VERSION3 = "0.1.116";
3012
+ var VERSION3 = "0.1.117";
3013
3013
 
3014
3014
  // src/egress-policy.ts
3015
3015
  import { realpathSync as realpathSync3 } from "node:fs";
@@ -4347,9 +4347,6 @@ function validatePlatformSharedEnvironment(input) {
4347
4347
  } else if (input.email !== undefined) {
4348
4348
  throw new Error("Bootstrap email provider must be smtp or jetemail.");
4349
4349
  }
4350
- if (!input.githubOAuth || !/^(?:Iv1\.[A-Fa-f0-9]{16}|Ov23li[A-Za-z0-9]{14,})$/.test(input.githubOAuth.clientId)) {
4351
- throw new Error("GitHub OAuth client id is malformed.");
4352
- }
4353
4350
  boundedInteger("publicApiPort", input.publicApiPort, 1024, 65533);
4354
4351
  if (!Array.isArray(input.seedSyncMembers) || input.seedSyncMembers.length < 3 || input.seedSyncMembers.length > 64 || new Set(input.seedSyncMembers).size !== input.seedSyncMembers.length) {
4355
4352
  throw new Error("seedSyncMembers must contain 3 to 64 unique physical host identities.");
@@ -4480,7 +4477,6 @@ function renderPlatformSharedEnvironment(input) {
4480
4477
  FZ_REALTIME_WORKER_SCRIPT: value.realtime?.workerScriptName ?? "",
4481
4478
  FZ_REALTIME_ENDPOINT: value.realtime?.endpoint ?? "",
4482
4479
  FZ_REALTIME_PRODUCER: value.realtime?.producer ?? "",
4483
- FZ_GITHUB_OAUTH_CLIENT_ID: value.githubOAuth.clientId,
4484
4480
  FZ_PLATFORM_INITIAL_INVENTORY: value.initialInventory ? JSON.stringify(value.initialInventory) : ""
4485
4481
  };
4486
4482
  return `# Generated by fz bootstrap platform. Non-secret coordinates only.
@@ -4492,7 +4488,6 @@ function platformApiCredentialSpecs(options) {
4492
4488
  const optional = [
4493
4489
  ["fz_smtp.password", options.emailProvider === "smtp"],
4494
4490
  ["fz_jetemail.apiKey", options.emailProvider === "jetemail"],
4495
- ["fz_oauth.github.clientSecret", options.githubOAuth],
4496
4491
  ["CF_API_TOKEN", options.cloudflareKv],
4497
4492
  ["CF_TUNNEL_TOKEN", options.cloudflareKv],
4498
4493
  ["REALTIME_PUBLISH_SECRET", options.realtime],
@@ -4,7 +4,6 @@ export interface PlatformLaunchEnvironmentInput {
4
4
  emailSecret: string;
5
5
  cloudflareTunnelToken: string;
6
6
  cloudflareApiToken: string;
7
- githubOAuthClientSecret: string;
8
7
  }
9
8
  /**
10
9
  * Read the development-only attended-launch adapter.
@@ -45,10 +45,6 @@ export interface ForgeZeroLaunchOwnerInput {
45
45
  from: string;
46
46
  eu: boolean;
47
47
  };
48
- /** Required bootstrap identity provider. Repository automation is configured after genesis. */
49
- githubOAuth: {
50
- clientId: string;
51
- };
52
48
  }
53
49
  /**
54
50
  * ForgeZero's own genesis public coordinates. They are reviewed source data,
package/dist/provision.js CHANGED
@@ -3009,7 +3009,7 @@ function requestSoftware(requirements, socketPath = DEFAULT_SOFTWARE_HELPER_SOCK
3009
3009
  }
3010
3010
 
3011
3011
  // src/version.ts
3012
- var VERSION3 = "0.1.116";
3012
+ var VERSION3 = "0.1.117";
3013
3013
 
3014
3014
  // src/egress-policy.ts
3015
3015
  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.116";
2
+ export declare const VERSION = "0.1.117";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgezero/agent",
3
- "version": "0.1.116",
3
+ "version": "0.1.117",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "check": "tsc --noEmit",
@@ -11,13 +11,13 @@
11
11
  "typescript": "^5.6.0",
12
12
  "@types/bun": "latest",
13
13
  "@types/node": "^22.0.0",
14
- "@forgezero/access": "0.1.9",
14
+ "@forgezero/access": "0.1.11",
15
15
  "@noble/curves": "^2.2.0",
16
16
  "@noble/post-quantum": "^0.6.1"
17
17
  },
18
18
  "dependencies": {
19
- "@forgezero/runtime": "0.1.14",
20
- "@forgezero/vault": "0.1.20",
19
+ "@forgezero/runtime": "0.1.16",
20
+ "@forgezero/vault": "0.1.21",
21
21
  "@noble/curves": "2.2.0",
22
22
  "@noble/hashes": "2.2.0",
23
23
  "@noble/post-quantum": "0.6.1",