@forgezero/agent 0.1.49 → 0.1.50

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.
@@ -749,7 +749,7 @@ async function postSignedNode(options, path, body) {
749
749
  }
750
750
 
751
751
  // src/version.ts
752
- var VERSION3 = "0.1.49";
752
+ var VERSION3 = "0.1.50";
753
753
 
754
754
  // src/agent-heartbeat.ts
755
755
  var unquote = (value) => value.replace(/^['"]|['"]$/g, "");
package/dist/bootstrap.js CHANGED
@@ -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.49";
1210
+ var VERSION = "0.1.50";
1211
1211
 
1212
1212
  // src/software.ts
1213
1213
  var PINNED_BUN_VERSION = "1.3.14";
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.49";
7003
+ var VERSION = "0.1.50";
7004
7004
 
7005
7005
  // src/ssh-bootstrap.ts
7006
7006
  class SshBootstrapError extends Error {
@@ -13511,6 +13511,12 @@ async function runSupervisedApp(path2) {
13511
13511
  }
13512
13512
 
13513
13513
  // src/index.ts
13514
+ function agentCommandArgs(args, command2) {
13515
+ const index = args.indexOf(command2);
13516
+ if (index < 0)
13517
+ throw new Error(`missing Agent command ${command2}`);
13518
+ return args.slice(index + 1);
13519
+ }
13514
13520
  function loadOrCreateSeed(path2) {
13515
13521
  if (existsSync18(path2)) {
13516
13522
  const seed2 = new Uint8Array(Buffer.from(readFileSync18(path2, "utf8").trim(), "base64url"));
@@ -14014,15 +14020,17 @@ if (import.meta.main) {
14014
14020
  process.exit(0);
14015
14021
  }
14016
14022
  if (command2 === "platform-fleet-verify") {
14017
- const expectedVersion = args.find((arg) => arg.startsWith("--expected-version="))?.slice("--expected-version=".length);
14018
- if (!expectedVersion || args.length !== 1) {
14023
+ const commandArgs = agentCommandArgs(args, command2);
14024
+ const expectedVersion = commandArgs.find((arg) => arg.startsWith("--expected-version="))?.slice("--expected-version=".length);
14025
+ if (!expectedVersion || commandArgs.length !== 1) {
14019
14026
  throw new Error("platform-fleet-verify requires exactly --expected-version=<semver>");
14020
14027
  }
14021
14028
  console.log(JSON.stringify(await verifyPlatformFleetHost(expectedVersion)));
14022
14029
  process.exit(0);
14023
14030
  }
14024
14031
  if (command2 === "community-rehearsal") {
14025
- if (args.length !== 1 || args[0] !== "--request=-") {
14032
+ const commandArgs = agentCommandArgs(args, command2);
14033
+ if (commandArgs.length !== 1 || commandArgs[0] !== "--request=-") {
14026
14034
  throw new Error("community-rehearsal requires exactly --request=-");
14027
14035
  }
14028
14036
  const raw = readFileSync18("/dev/stdin", "utf8");
@@ -14609,6 +14617,7 @@ export {
14609
14617
  applyAgentEgressPolicy,
14610
14618
  allocateCpuPool,
14611
14619
  allocateAddress,
14620
+ agentCommandArgs,
14612
14621
  activateAgentRelease,
14613
14622
  VERSION,
14614
14623
  SYSTEMD_RESOLVED_STUB,
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.49";
4833
+ var VERSION2 = "0.1.50";
4834
4834
 
4835
4835
  // src/software.ts
4836
4836
  var PINNED_BUN_VERSION = "1.3.14";
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  import { type NodeKeyPair } from '@forgezero/runtime/identity';
3
3
  import { startAgent, type AgentOptions, type AttestationSource } from './socket';
4
4
  import type { SecretCache } from './cache';
5
+ export declare function agentCommandArgs(args: readonly string[], command: string): string[];
5
6
  import { type DeploymentCredentialSchema } from './credential-schema';
6
7
  export { VERSION } from './version';
7
8
  export { startAgent, handleRequest, handleApplicationRequest } from './socket';
@@ -292,7 +292,7 @@ function systemdAgentEgressDirectives(loopbackTcpPorts = []) {
292
292
  }
293
293
 
294
294
  // src/version.ts
295
- var VERSION = "0.1.49";
295
+ var VERSION = "0.1.50";
296
296
 
297
297
  // src/otel-collector.ts
298
298
  var FORGEZERO_OTEL_COLLECTOR_UNIT = "forgezero-otel-collector.service";
@@ -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.49";
1210
+ var VERSION = "0.1.50";
1211
1211
 
1212
1212
  // src/software.ts
1213
1213
  var PINNED_BUN_VERSION = "1.3.14";
@@ -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.49";
1700
+ var VERSION3 = "0.1.50";
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.49";
1700
+ var VERSION3 = "0.1.50";
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.49";
2
+ export declare const VERSION = "0.1.50";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgezero/agent",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "check": "tsc --noEmit",