@forgezero/agent 0.1.134 → 0.1.135

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.134";
920
+ var VERSION3 = "0.1.135";
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.134";
1463
+ var VERSION = "0.1.135";
1464
1464
 
1465
1465
  // src/software.ts
1466
1466
  var PINNED_BUN_VERSION = "1.3.14";
@@ -28,6 +28,7 @@ export interface DeploymentInitProvisioning {
28
28
  maxMonthlySpendMinor: string;
29
29
  }
30
30
  export interface DeploymentInitOptions {
31
+ branch?: string;
31
32
  runtime?: DeploymentInitRuntime;
32
33
  operatingSystem?: 'ubuntu-24.04' | 'ubuntu-26.04';
33
34
  isolation?: 'standard' | 'sev-snp';
@@ -172,7 +172,7 @@ function validateCapacityCalibrationOptions(options) {
172
172
 
173
173
  // src/deploy-plan.ts
174
174
  var DEPLOY_PLAN_FORMAT = "forgezero-deployment-plan";
175
- var DEPLOY_PLAN_VERSION = 1;
175
+ var DEPLOY_PLAN_VERSION = 2;
176
176
 
177
177
  class DeploymentPlanError extends Error {
178
178
  constructor(message) {
@@ -186,6 +186,13 @@ var ACTION = /^[a-z][a-z0-9.-]{0,127}\/[a-z][a-z0-9.-]{0,127}@[1-9][0-9]{0,5}$/;
186
186
  var VERSION = /^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/;
187
187
  var ABSOLUTE_PATH = /^\/(?:[A-Za-z0-9._-]+\/?)*$/;
188
188
  var HEALTH_PATH = /^\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]{0,255}$/;
189
+ function deploymentBranch(value, where = "deployment.spec.source.branch") {
190
+ const branch = boundedString(value, where, 255);
191
+ if (branch === "@" || branch.startsWith("/") || branch.endsWith("/") || branch.startsWith(".") || branch.endsWith(".") || branch.endsWith(".lock") || branch.includes("..") || branch.includes("//") || branch.includes("@{") || /[\x00-\x20~^:?*\[\\]/.test(branch)) {
192
+ fail(where, "must be one exact valid Git branch name.");
193
+ }
194
+ return branch;
195
+ }
189
196
  var fail = (where, message) => {
190
197
  throw new DeploymentPlanError(`${where} ${message}`);
191
198
  };
@@ -821,7 +828,10 @@ function compileDeployment(sourceValue) {
821
828
  if (metadata.description !== undefined)
822
829
  boundedString(metadata.description, "deployment.metadata.description", 1024);
823
830
  const spec = object(source.spec, "deployment.spec");
824
- exact3(spec, ["security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
831
+ exact3(spec, ["source", "security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
832
+ const sourceSelector = object(spec.source, "deployment.spec.source");
833
+ exact3(sourceSelector, ["branch"], "deployment.spec.source");
834
+ deploymentBranch(sourceSelector.branch);
825
835
  if (spec.security !== undefined) {
826
836
  const security = object(spec.security, "deployment.spec.security");
827
837
  exact3(security, ["attestation"], "deployment.spec.security");
@@ -1152,6 +1162,7 @@ function compileDeployment(sourceValue) {
1152
1162
  ...metadata.description ? { description: metadata.description } : {},
1153
1163
  requiredProviders: [...requiredProviders.values()].sort((left, right) => `${left.provider}:${left.contract}:${left.capability}`.localeCompare(`${right.provider}:${right.contract}:${right.capability}`)),
1154
1164
  spec: {
1165
+ source: sourceSelector,
1155
1166
  ...spec.security ? { security: spec.security } : {},
1156
1167
  inputs,
1157
1168
  credentials,
@@ -1248,6 +1259,7 @@ function initCoordinates(options) {
1248
1259
  const isolation = options.isolation ?? (runtime === "kata-snp" ? "sev-snp" : "standard");
1249
1260
  const operatingSystem = options.operatingSystem ?? (isolation === "sev-snp" ? "ubuntu-26.04" : "ubuntu-24.04");
1250
1261
  const result = {
1262
+ branch: options.branch ?? "main",
1251
1263
  runtime,
1252
1264
  isolation,
1253
1265
  operatingSystem,
@@ -1261,6 +1273,9 @@ function initCoordinates(options) {
1261
1273
  };
1262
1274
  if (!/^[a-z][a-z0-9-]{0,62}$/.test(result.profile))
1263
1275
  throw new Error("deployment profile must be a lowercase typed name");
1276
+ if (result.branch.length < 1 || result.branch.length > 255 || result.branch === "@" || result.branch.startsWith("/") || result.branch.endsWith("/") || result.branch.startsWith(".") || result.branch.endsWith(".") || result.branch.endsWith(".lock") || result.branch.includes("..") || result.branch.includes("//") || result.branch.includes("@{") || /[\x00-\x20~^:?*\[\\]/.test(result.branch)) {
1277
+ throw new Error("deployment branch must be one exact valid Git branch name");
1278
+ }
1264
1279
  if (!Number.isSafeInteger(result.replicas) || result.replicas < 1 || result.replicas > 1024)
1265
1280
  throw new Error("deployment replicas must be an integer from 1 to 1024");
1266
1281
  if (!Number.isSafeInteger(result.cpuCores) || result.cpuCores < 1 || result.cpuCores > 1024)
@@ -1379,6 +1394,7 @@ export default defineDeployment({
1379
1394
  kind: 'Deployment',
1380
1395
  metadata: { name: '${safeName(name)}' },
1381
1396
  spec: {
1397
+ source: { branch: '${selected.branch}' },
1382
1398
  security: { attestation: '${selected.isolation === "sev-snp" ? "required" : "preferred"}' },
1383
1399
  targets: {
1384
1400
  app: target.compute({
@@ -172,7 +172,7 @@ function validateCapacityCalibrationOptions(options) {
172
172
 
173
173
  // src/deploy-plan.ts
174
174
  var DEPLOY_PLAN_FORMAT = "forgezero-deployment-plan";
175
- var DEPLOY_PLAN_VERSION = 1;
175
+ var DEPLOY_PLAN_VERSION = 2;
176
176
 
177
177
  class DeploymentPlanError extends Error {
178
178
  constructor(message) {
@@ -186,6 +186,13 @@ var ACTION = /^[a-z][a-z0-9.-]{0,127}\/[a-z][a-z0-9.-]{0,127}@[1-9][0-9]{0,5}$/;
186
186
  var VERSION = /^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/;
187
187
  var ABSOLUTE_PATH = /^\/(?:[A-Za-z0-9._-]+\/?)*$/;
188
188
  var HEALTH_PATH = /^\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]{0,255}$/;
189
+ function deploymentBranch(value, where = "deployment.spec.source.branch") {
190
+ const branch = boundedString(value, where, 255);
191
+ if (branch === "@" || branch.startsWith("/") || branch.endsWith("/") || branch.startsWith(".") || branch.endsWith(".") || branch.endsWith(".lock") || branch.includes("..") || branch.includes("//") || branch.includes("@{") || /[\x00-\x20~^:?*\[\\]/.test(branch)) {
192
+ fail(where, "must be one exact valid Git branch name.");
193
+ }
194
+ return branch;
195
+ }
189
196
  var fail = (where, message) => {
190
197
  throw new DeploymentPlanError(`${where} ${message}`);
191
198
  };
@@ -821,7 +828,10 @@ function compileDeployment(sourceValue) {
821
828
  if (metadata.description !== undefined)
822
829
  boundedString(metadata.description, "deployment.metadata.description", 1024);
823
830
  const spec = object(source.spec, "deployment.spec");
824
- exact3(spec, ["security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
831
+ exact3(spec, ["source", "security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
832
+ const sourceSelector = object(spec.source, "deployment.spec.source");
833
+ exact3(sourceSelector, ["branch"], "deployment.spec.source");
834
+ deploymentBranch(sourceSelector.branch);
825
835
  if (spec.security !== undefined) {
826
836
  const security = object(spec.security, "deployment.spec.security");
827
837
  exact3(security, ["attestation"], "deployment.spec.security");
@@ -1152,6 +1162,7 @@ function compileDeployment(sourceValue) {
1152
1162
  ...metadata.description ? { description: metadata.description } : {},
1153
1163
  requiredProviders: [...requiredProviders.values()].sort((left, right) => `${left.provider}:${left.contract}:${left.capability}`.localeCompare(`${right.provider}:${right.contract}:${right.capability}`)),
1154
1164
  spec: {
1165
+ source: sourceSelector,
1155
1166
  ...spec.security ? { security: spec.security } : {},
1156
1167
  inputs,
1157
1168
  credentials,
@@ -1,6 +1,6 @@
1
1
  import type { DeploymentSource, StageDefinition, WorkflowStepDefinition } from './deploy';
2
2
  export declare const DEPLOY_PLAN_FORMAT: "forgezero-deployment-plan";
3
- export declare const DEPLOY_PLAN_VERSION: 1;
3
+ export declare const DEPLOY_PLAN_VERSION: 2;
4
4
  export interface PlannedStep extends WorkflowStepDefinition {
5
5
  id: string;
6
6
  }
@@ -34,6 +34,8 @@ export interface DeploymentPlan {
34
34
  export declare class DeploymentPlanError extends Error {
35
35
  constructor(message: string);
36
36
  }
37
+ /** Git check-ref-format compatible branch subset accepted by every source adapter. */
38
+ export declare function deploymentBranch(value: unknown, where?: string): string;
37
39
  export declare function canonicalJson(value: unknown): string;
38
40
  export declare function deploymentSourceDigest(source: DeploymentSource): `sha256:${string}`;
39
41
  export declare function compileDeployment(sourceValue: unknown): DeploymentPlan;
@@ -172,7 +172,7 @@ function validateCapacityCalibrationOptions(options) {
172
172
 
173
173
  // src/deploy-plan.ts
174
174
  var DEPLOY_PLAN_FORMAT = "forgezero-deployment-plan";
175
- var DEPLOY_PLAN_VERSION = 1;
175
+ var DEPLOY_PLAN_VERSION = 2;
176
176
 
177
177
  class DeploymentPlanError extends Error {
178
178
  constructor(message) {
@@ -186,6 +186,13 @@ var ACTION = /^[a-z][a-z0-9.-]{0,127}\/[a-z][a-z0-9.-]{0,127}@[1-9][0-9]{0,5}$/;
186
186
  var VERSION = /^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/;
187
187
  var ABSOLUTE_PATH = /^\/(?:[A-Za-z0-9._-]+\/?)*$/;
188
188
  var HEALTH_PATH = /^\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]{0,255}$/;
189
+ function deploymentBranch(value, where = "deployment.spec.source.branch") {
190
+ const branch = boundedString(value, where, 255);
191
+ if (branch === "@" || branch.startsWith("/") || branch.endsWith("/") || branch.startsWith(".") || branch.endsWith(".") || branch.endsWith(".lock") || branch.includes("..") || branch.includes("//") || branch.includes("@{") || /[\x00-\x20~^:?*\[\\]/.test(branch)) {
192
+ fail(where, "must be one exact valid Git branch name.");
193
+ }
194
+ return branch;
195
+ }
189
196
  var fail = (where, message) => {
190
197
  throw new DeploymentPlanError(`${where} ${message}`);
191
198
  };
@@ -821,7 +828,10 @@ function compileDeployment(sourceValue) {
821
828
  if (metadata.description !== undefined)
822
829
  boundedString(metadata.description, "deployment.metadata.description", 1024);
823
830
  const spec = object(source.spec, "deployment.spec");
824
- exact3(spec, ["security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
831
+ exact3(spec, ["source", "security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
832
+ const sourceSelector = object(spec.source, "deployment.spec.source");
833
+ exact3(sourceSelector, ["branch"], "deployment.spec.source");
834
+ deploymentBranch(sourceSelector.branch);
825
835
  if (spec.security !== undefined) {
826
836
  const security = object(spec.security, "deployment.spec.security");
827
837
  exact3(security, ["attestation"], "deployment.spec.security");
@@ -1152,6 +1162,7 @@ function compileDeployment(sourceValue) {
1152
1162
  ...metadata.description ? { description: metadata.description } : {},
1153
1163
  requiredProviders: [...requiredProviders.values()].sort((left, right) => `${left.provider}:${left.contract}:${left.capability}`.localeCompare(`${right.provider}:${right.contract}:${right.capability}`)),
1154
1164
  spec: {
1165
+ source: sourceSelector,
1155
1166
  ...spec.security ? { security: spec.security } : {},
1156
1167
  inputs,
1157
1168
  credentials,
@@ -1235,6 +1246,7 @@ export {
1235
1246
  parseDeploymentPlan,
1236
1247
  deploymentSourceDigest,
1237
1248
  deploymentPlanDigest,
1249
+ deploymentBranch,
1238
1250
  compileDeployment,
1239
1251
  canonicalJson,
1240
1252
  DeploymentPlanError,
package/dist/deploy.d.ts CHANGED
@@ -466,6 +466,10 @@ export interface DeploymentSource {
466
466
  description?: string;
467
467
  };
468
468
  spec: {
469
+ /** Exact Git branch this checked-in plan is valid for. */
470
+ source: {
471
+ branch: string;
472
+ };
469
473
  security?: {
470
474
  attestation?: 'required' | 'preferred' | 'disabled';
471
475
  };
@@ -12,6 +12,7 @@ export interface RemoteDeploymentClaim {
12
12
  releaseExecutor: boolean;
13
13
  assignment?: NonNullable<import('./deployment').DeploymentRequest['assignment']>;
14
14
  connectivityCapabilities?: import('./deployment-connectivity').DeploymentConnectivityCapabilities;
15
+ credentialBindings?: Readonly<Record<string, string>>;
15
16
  source: {
16
17
  repository: string;
17
18
  branch: string;
@@ -62,6 +62,8 @@ export interface DeploymentRequest {
62
62
  };
63
63
  /** Connector-scoped, one-claim capabilities. Never the project Cloudflare management token. */
64
64
  connectivityCapabilities?: DeploymentConnectivityCapabilities;
65
+ /** Server-owned alias to scoped Vault entry-name overrides. */
66
+ credentialBindings?: Readonly<Record<string, string>>;
65
67
  }
66
68
  export interface DeploymentResult {
67
69
  key: string;
package/dist/fz-agent.js CHANGED
@@ -6462,7 +6462,7 @@ function validateBuiltInProvider(requirement2, where) {
6462
6462
 
6463
6463
  // src/deploy-plan.ts
6464
6464
  var DEPLOY_PLAN_FORMAT = "forgezero-deployment-plan";
6465
- var DEPLOY_PLAN_VERSION = 1;
6465
+ var DEPLOY_PLAN_VERSION = 2;
6466
6466
 
6467
6467
  class DeploymentPlanError extends Error {
6468
6468
  constructor(message) {
@@ -6476,6 +6476,13 @@ var ACTION = /^[a-z][a-z0-9.-]{0,127}\/[a-z][a-z0-9.-]{0,127}@[1-9][0-9]{0,5}$/;
6476
6476
  var VERSION = /^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/;
6477
6477
  var ABSOLUTE_PATH = /^\/(?:[A-Za-z0-9._-]+\/?)*$/;
6478
6478
  var HEALTH_PATH = /^\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]{0,255}$/;
6479
+ function deploymentBranch(value, where = "deployment.spec.source.branch") {
6480
+ const branch = boundedString(value, where, 255);
6481
+ if (branch === "@" || branch.startsWith("/") || branch.endsWith("/") || branch.startsWith(".") || branch.endsWith(".") || branch.endsWith(".lock") || branch.includes("..") || branch.includes("//") || branch.includes("@{") || /[\x00-\x20~^:?*\[\\]/.test(branch)) {
6482
+ fail(where, "must be one exact valid Git branch name.");
6483
+ }
6484
+ return branch;
6485
+ }
6479
6486
  var fail = (where, message) => {
6480
6487
  throw new DeploymentPlanError(`${where} ${message}`);
6481
6488
  };
@@ -7111,7 +7118,10 @@ function compileDeployment(sourceValue) {
7111
7118
  if (metadata.description !== undefined)
7112
7119
  boundedString(metadata.description, "deployment.metadata.description", 1024);
7113
7120
  const spec = object(source.spec, "deployment.spec");
7114
- exact3(spec, ["security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
7121
+ exact3(spec, ["source", "security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
7122
+ const sourceSelector = object(spec.source, "deployment.spec.source");
7123
+ exact3(sourceSelector, ["branch"], "deployment.spec.source");
7124
+ deploymentBranch(sourceSelector.branch);
7115
7125
  if (spec.security !== undefined) {
7116
7126
  const security = object(spec.security, "deployment.spec.security");
7117
7127
  exact3(security, ["attestation"], "deployment.spec.security");
@@ -7442,6 +7452,7 @@ function compileDeployment(sourceValue) {
7442
7452
  ...metadata.description ? { description: metadata.description } : {},
7443
7453
  requiredProviders: [...requiredProviders.values()].sort((left, right) => `${left.provider}:${left.contract}:${left.capability}`.localeCompare(`${right.provider}:${right.contract}:${right.capability}`)),
7444
7454
  spec: {
7455
+ source: sourceSelector,
7445
7456
  ...spec.security ? { security: spec.security } : {},
7446
7457
  inputs,
7447
7458
  credentials,
@@ -8568,7 +8579,7 @@ function createDeploymentManager(options) {
8568
8579
  const credential = plan.spec.credentials?.[credentialName];
8569
8580
  if (!credential || !options.cache)
8570
8581
  throw new DeploymentActionError("refused", `credential ${credentialName} is unavailable`);
8571
- environment[environmentName] = await options.cache.get(credential.source.name);
8582
+ environment[environmentName] = await options.cache.get(request.credentialBindings?.[credentialName] ?? credential.source.name);
8572
8583
  credentialValues.push(environment[environmentName]);
8573
8584
  }
8574
8585
  }
@@ -9118,7 +9129,8 @@ async function deployClaim(options, claim) {
9118
9129
  revision: claim.revision,
9119
9130
  releaseExecutor: claim.releaseExecutor,
9120
9131
  ...claim.assignment ? { assignment: claim.assignment } : {},
9121
- ...claim.connectivityCapabilities ? { connectivityCapabilities: claim.connectivityCapabilities } : {}
9132
+ ...claim.connectivityCapabilities ? { connectivityCapabilities: claim.connectivityCapabilities } : {},
9133
+ ...claim.credentialBindings ? { credentialBindings: claim.credentialBindings } : {}
9122
9134
  }).result;
9123
9135
  result = options.telemetry ? await options.telemetry.observe("deployment.run", run2) : await run2();
9124
9136
  } finally {
@@ -9669,7 +9681,7 @@ async function writeAndCloseProcessInput(input, value) {
9669
9681
  }
9670
9682
 
9671
9683
  // src/version.ts
9672
- var VERSION2 = "0.1.134";
9684
+ var VERSION2 = "0.1.135";
9673
9685
 
9674
9686
  // src/ssh-bootstrap.ts
9675
9687
  function deriveMetalAdmissionProvisioning(lscpu) {
package/dist/fz.js CHANGED
@@ -6007,7 +6007,7 @@ var UPDATE_RETRY_BASE_MS = 5 * 60000;
6007
6007
  var UPDATE_RETRY_MAX_MS = 24 * 60 * 60000;
6008
6008
 
6009
6009
  // src/version.ts
6010
- var VERSION2 = "0.1.134";
6010
+ var VERSION2 = "0.1.135";
6011
6011
 
6012
6012
  // src/software.ts
6013
6013
  var PINNED_BUN_VERSION = "1.3.14";
@@ -10816,7 +10816,7 @@ function validateBuiltInProvider(requirement2, where) {
10816
10816
 
10817
10817
  // src/deploy-plan.ts
10818
10818
  var DEPLOY_PLAN_FORMAT = "forgezero-deployment-plan";
10819
- var DEPLOY_PLAN_VERSION = 1;
10819
+ var DEPLOY_PLAN_VERSION = 2;
10820
10820
 
10821
10821
  class DeploymentPlanError extends Error {
10822
10822
  constructor(message) {
@@ -10830,6 +10830,13 @@ var ACTION = /^[a-z][a-z0-9.-]{0,127}\/[a-z][a-z0-9.-]{0,127}@[1-9][0-9]{0,5}$/;
10830
10830
  var VERSION3 = /^[A-Za-z0-9][A-Za-z0-9.+_-]{0,63}$/;
10831
10831
  var ABSOLUTE_PATH = /^\/(?:[A-Za-z0-9._-]+\/?)*$/;
10832
10832
  var HEALTH_PATH = /^\/[A-Za-z0-9._~!$&'()*+,;=:@%/-]{0,255}$/;
10833
+ function deploymentBranch(value, where = "deployment.spec.source.branch") {
10834
+ const branch = boundedString(value, where, 255);
10835
+ if (branch === "@" || branch.startsWith("/") || branch.endsWith("/") || branch.startsWith(".") || branch.endsWith(".") || branch.endsWith(".lock") || branch.includes("..") || branch.includes("//") || branch.includes("@{") || /[\x00-\x20~^:?*\[\\]/.test(branch)) {
10836
+ fail2(where, "must be one exact valid Git branch name.");
10837
+ }
10838
+ return branch;
10839
+ }
10833
10840
  var fail2 = (where, message) => {
10834
10841
  throw new DeploymentPlanError(`${where} ${message}`);
10835
10842
  };
@@ -11465,7 +11472,10 @@ function compileDeployment(sourceValue) {
11465
11472
  if (metadata.description !== undefined)
11466
11473
  boundedString(metadata.description, "deployment.metadata.description", 1024);
11467
11474
  const spec = object(source.spec, "deployment.spec");
11468
- exact3(spec, ["security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
11475
+ exact3(spec, ["source", "security", "inputs", "credentials", "targets", "requirements", "components", "workflows"], "deployment.spec");
11476
+ const sourceSelector = object(spec.source, "deployment.spec.source");
11477
+ exact3(sourceSelector, ["branch"], "deployment.spec.source");
11478
+ deploymentBranch(sourceSelector.branch);
11469
11479
  if (spec.security !== undefined) {
11470
11480
  const security = object(spec.security, "deployment.spec.security");
11471
11481
  exact3(security, ["attestation"], "deployment.spec.security");
@@ -11796,6 +11806,7 @@ function compileDeployment(sourceValue) {
11796
11806
  ...metadata.description ? { description: metadata.description } : {},
11797
11807
  requiredProviders: [...requiredProviders.values()].sort((left, right) => `${left.provider}:${left.contract}:${left.capability}`.localeCompare(`${right.provider}:${right.contract}:${right.capability}`)),
11798
11808
  spec: {
11809
+ source: sourceSelector,
11799
11810
  ...spec.security ? { security: spec.security } : {},
11800
11811
  inputs,
11801
11812
  credentials,
@@ -11888,6 +11899,7 @@ function initCoordinates(options) {
11888
11899
  const isolation = options.isolation ?? (runtime === "kata-snp" ? "sev-snp" : "standard");
11889
11900
  const operatingSystem = options.operatingSystem ?? (isolation === "sev-snp" ? "ubuntu-26.04" : "ubuntu-24.04");
11890
11901
  const result = {
11902
+ branch: options.branch ?? "main",
11891
11903
  runtime,
11892
11904
  isolation,
11893
11905
  operatingSystem,
@@ -11901,6 +11913,9 @@ function initCoordinates(options) {
11901
11913
  };
11902
11914
  if (!/^[a-z][a-z0-9-]{0,62}$/.test(result.profile))
11903
11915
  throw new Error("deployment profile must be a lowercase typed name");
11916
+ if (result.branch.length < 1 || result.branch.length > 255 || result.branch === "@" || result.branch.startsWith("/") || result.branch.endsWith("/") || result.branch.startsWith(".") || result.branch.endsWith(".") || result.branch.endsWith(".lock") || result.branch.includes("..") || result.branch.includes("//") || result.branch.includes("@{") || /[\x00-\x20~^:?*\[\\]/.test(result.branch)) {
11917
+ throw new Error("deployment branch must be one exact valid Git branch name");
11918
+ }
11904
11919
  if (!Number.isSafeInteger(result.replicas) || result.replicas < 1 || result.replicas > 1024)
11905
11920
  throw new Error("deployment replicas must be an integer from 1 to 1024");
11906
11921
  if (!Number.isSafeInteger(result.cpuCores) || result.cpuCores < 1 || result.cpuCores > 1024)
@@ -12019,6 +12034,7 @@ export default defineDeployment({
12019
12034
  kind: 'Deployment',
12020
12035
  metadata: { name: '${safeName2(name)}' },
12021
12036
  spec: {
12037
+ source: { branch: '${selected.branch}' },
12022
12038
  security: { attestation: '${selected.isolation === "sev-snp" ? "required" : "preferred"}' },
12023
12039
  targets: {
12024
12040
  app: target.compute({
@@ -20977,6 +20993,7 @@ async function cmdDeploy(options, args) {
20977
20993
  initializeTypeScriptDeployment(options.projectRoot, {
20978
20994
  name: options.projectName ?? basename3(resolve13(options.projectRoot)),
20979
20995
  force: options.force,
20996
+ branch: options.branch,
20980
20997
  runtime: options.deployRuntime,
20981
20998
  operatingSystem: options.deployOperatingSystem,
20982
20999
  isolation: options.deployIsolation,
@@ -366,7 +366,7 @@ function systemdAgentEgressDirectives(loopbackTcpPorts = []) {
366
366
  }
367
367
 
368
368
  // src/version.ts
369
- var VERSION = "0.1.134";
369
+ var VERSION = "0.1.135";
370
370
 
371
371
  // src/otel-collector.ts
372
372
  var FORGEZERO_OTEL_COLLECTOR_UNIT = "forgezero-otel-collector.service";
@@ -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.134";
1463
+ var VERSION = "0.1.135";
1464
1464
 
1465
1465
  // src/software.ts
1466
1466
  var PINNED_BUN_VERSION = "1.3.14";
@@ -3049,7 +3049,7 @@ function requestSoftware(requirements, socketPath = DEFAULT_SOFTWARE_HELPER_SOCK
3049
3049
  }
3050
3050
 
3051
3051
  // src/version.ts
3052
- var VERSION3 = "0.1.134";
3052
+ var VERSION3 = "0.1.135";
3053
3053
 
3054
3054
  // src/egress-policy.ts
3055
3055
  import { realpathSync as realpathSync3 } from "node:fs";
package/dist/provision.js CHANGED
@@ -3049,7 +3049,7 @@ function requestSoftware(requirements, socketPath = DEFAULT_SOFTWARE_HELPER_SOCK
3049
3049
  }
3050
3050
 
3051
3051
  // src/version.ts
3052
- var VERSION3 = "0.1.134";
3052
+ var VERSION3 = "0.1.135";
3053
3053
 
3054
3054
  // src/egress-policy.ts
3055
3055
  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.134";
2
+ export declare const VERSION = "0.1.135";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgezero/agent",
3
- "version": "0.1.134",
3
+ "version": "0.1.135",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "check": "tsc --noEmit",