@forgezero/agent 0.1.40 → 0.1.42

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.
Files changed (64) hide show
  1. package/README.md +573 -424
  2. package/dist/agent-heartbeat.js +6 -3
  3. package/dist/agent-update-helper.js +5 -2
  4. package/dist/agent-update.js +5 -2
  5. package/dist/bootstrap.d.ts +17 -8
  6. package/dist/bootstrap.js +1504 -512
  7. package/dist/cli/agent-install.d.ts +6 -5
  8. package/dist/cli/cloudflare-bootstrap.d.ts +12 -1
  9. package/dist/cli/maintenance.d.ts +23 -0
  10. package/dist/cli/run.d.ts +3 -1
  11. package/dist/cli/session-store.d.ts +5 -0
  12. package/dist/cloudflare-bootstrap.d.ts +73 -35
  13. package/dist/cloudflare-bootstrap.js +587 -90
  14. package/dist/cloudflare-edge.d.ts +64 -12
  15. package/dist/cloudflare-edge.js +103 -8
  16. package/dist/community-rehearsal-host.d.ts +51 -0
  17. package/dist/community-rehearsal-host.js +272 -0
  18. package/dist/credential-schema.d.ts +54 -0
  19. package/dist/credential-schema.js +47 -0
  20. package/dist/definition.d.ts +31 -5
  21. package/dist/definition.js +271 -44
  22. package/dist/deploy-file.js +294 -68
  23. package/dist/deployment-runner.js +18 -5
  24. package/dist/deployment.d.ts +13 -1
  25. package/dist/fz-agent.js +9162 -7564
  26. package/dist/fz-git-ssh.js +122 -0
  27. package/dist/fz.js +5679 -5077
  28. package/dist/git-ssh.d.ts +5 -0
  29. package/dist/guest-enrolment.d.ts +2 -0
  30. package/dist/guest-enrolment.js +1 -0
  31. package/dist/host-maintenance.d.ts +39 -0
  32. package/dist/host-maintenance.js +135 -0
  33. package/dist/index.d.ts +4 -2
  34. package/dist/mesh-connector.d.ts +16 -0
  35. package/dist/mesh-connector.js +46 -0
  36. package/dist/metal-bootstrap.js +145 -7
  37. package/dist/metal-helper-socket.js +61 -31
  38. package/dist/metal-provision.d.ts +2 -2
  39. package/dist/metal-provision.js +62 -32
  40. package/dist/operator-bootstrap.d.ts +90 -0
  41. package/dist/operator-bootstrap.js +5704 -0
  42. package/dist/otel-collector.d.ts +18 -0
  43. package/dist/pipeline.d.ts +3 -2
  44. package/dist/pipeline.js +1 -1
  45. package/dist/platform-bootstrap-runtime.d.ts +39 -21
  46. package/dist/platform-bootstrap-runtime.js +182 -59
  47. package/dist/platform-fleet-verification.d.ts +19 -0
  48. package/dist/platform-fleet-verification.js +3873 -0
  49. package/dist/platform-genesis-config.d.ts +7 -0
  50. package/dist/platform-genesis.d.ts +17 -0
  51. package/dist/provision.d.ts +76 -3
  52. package/dist/provision.js +1061 -229
  53. package/dist/recovery-host.d.ts +7 -0
  54. package/dist/recovery-host.js +124 -0
  55. package/dist/service-supervisor.d.ts +42 -0
  56. package/dist/software-helper.d.ts +4 -0
  57. package/dist/software-helper.js +865 -63
  58. package/dist/software.d.ts +14 -3
  59. package/dist/software.js +163 -37
  60. package/dist/ssh-bootstrap.d.ts +97 -0
  61. package/dist/supervised-app.d.ts +2 -0
  62. package/dist/version.d.ts +1 -1
  63. package/package.json +175 -164
  64. package/schema/{deploy-v2.json → deploy-v3.json} +53 -6
@@ -33,6 +33,7 @@ var syncReleaseDirectory = (directory) => {
33
33
  join(directory, "package.json"),
34
34
  join(directory, "dist", "fz-agent.js"),
35
35
  join(directory, "dist", "fz.js"),
36
+ join(directory, "dist", "fz-git-ssh.js"),
36
37
  join(directory, "dist"),
37
38
  directory,
38
39
  dirname(directory)
@@ -101,7 +102,8 @@ async function validateReleaseDirectory(directory, release, run) {
101
102
  }
102
103
  const agent = join(directory, "dist", "fz-agent.js");
103
104
  const cli = join(directory, "dist", "fz.js");
104
- for (const binary of [agent, cli]) {
105
+ const gitSsh = join(directory, "dist", "fz-git-ssh.js");
106
+ for (const binary of [agent, cli, gitSsh]) {
105
107
  if (!readFileSync(binary, "utf8").startsWith(`#!/usr/bin/env bun
106
108
  `)) {
107
109
  throw new Error("agent update artifact is not a self-contained Bun executable");
@@ -148,7 +150,8 @@ async function stageAgentRelease(releaseInput, options) {
148
150
  for (const [member, relative] of [
149
151
  ["package/package.json", "package.json"],
150
152
  ["package/dist/fz-agent.js", "dist/fz-agent.js"],
151
- ["package/dist/fz.js", "dist/fz.js"]
153
+ ["package/dist/fz.js", "dist/fz.js"],
154
+ ["package/dist/fz-git-ssh.js", "dist/fz-git-ssh.js"]
152
155
  ]) {
153
156
  const extracted = await checked(run, {
154
157
  command: "/usr/bin/tar",
@@ -746,7 +749,7 @@ async function postSignedNode(options, path, body) {
746
749
  }
747
750
 
748
751
  // src/version.ts
749
- var VERSION3 = "0.1.40";
752
+ var VERSION3 = "0.1.42";
750
753
 
751
754
  // src/agent-heartbeat.ts
752
755
  var unquote = (value) => value.replace(/^['"]|['"]$/g, "");
@@ -33,6 +33,7 @@ var syncReleaseDirectory = (directory) => {
33
33
  join(directory, "package.json"),
34
34
  join(directory, "dist", "fz-agent.js"),
35
35
  join(directory, "dist", "fz.js"),
36
+ join(directory, "dist", "fz-git-ssh.js"),
36
37
  join(directory, "dist"),
37
38
  directory,
38
39
  dirname(directory)
@@ -101,7 +102,8 @@ async function validateReleaseDirectory(directory, release, run) {
101
102
  }
102
103
  const agent = join(directory, "dist", "fz-agent.js");
103
104
  const cli = join(directory, "dist", "fz.js");
104
- for (const binary of [agent, cli]) {
105
+ const gitSsh = join(directory, "dist", "fz-git-ssh.js");
106
+ for (const binary of [agent, cli, gitSsh]) {
105
107
  if (!readFileSync(binary, "utf8").startsWith(`#!/usr/bin/env bun
106
108
  `)) {
107
109
  throw new Error("agent update artifact is not a self-contained Bun executable");
@@ -148,7 +150,8 @@ async function stageAgentRelease(releaseInput, options) {
148
150
  for (const [member, relative] of [
149
151
  ["package/package.json", "package.json"],
150
152
  ["package/dist/fz-agent.js", "dist/fz-agent.js"],
151
- ["package/dist/fz.js", "dist/fz.js"]
153
+ ["package/dist/fz.js", "dist/fz.js"],
154
+ ["package/dist/fz-git-ssh.js", "dist/fz-git-ssh.js"]
152
155
  ]) {
153
156
  const extracted = await checked(run, {
154
157
  command: "/usr/bin/tar",
@@ -33,6 +33,7 @@ var syncReleaseDirectory = (directory) => {
33
33
  join(directory, "package.json"),
34
34
  join(directory, "dist", "fz-agent.js"),
35
35
  join(directory, "dist", "fz.js"),
36
+ join(directory, "dist", "fz-git-ssh.js"),
36
37
  join(directory, "dist"),
37
38
  directory,
38
39
  dirname(directory)
@@ -101,7 +102,8 @@ async function validateReleaseDirectory(directory, release, run) {
101
102
  }
102
103
  const agent = join(directory, "dist", "fz-agent.js");
103
104
  const cli = join(directory, "dist", "fz.js");
104
- for (const binary of [agent, cli]) {
105
+ const gitSsh = join(directory, "dist", "fz-git-ssh.js");
106
+ for (const binary of [agent, cli, gitSsh]) {
105
107
  if (!readFileSync(binary, "utf8").startsWith(`#!/usr/bin/env bun
106
108
  `)) {
107
109
  throw new Error("agent update artifact is not a self-contained Bun executable");
@@ -148,7 +150,8 @@ async function stageAgentRelease(releaseInput, options) {
148
150
  for (const [member, relative] of [
149
151
  ["package/package.json", "package.json"],
150
152
  ["package/dist/fz-agent.js", "dist/fz-agent.js"],
151
- ["package/dist/fz.js", "dist/fz.js"]
153
+ ["package/dist/fz.js", "dist/fz.js"],
154
+ ["package/dist/fz-git-ssh.js", "dist/fz-git-ssh.js"]
152
155
  ]) {
153
156
  const extracted = await checked(run, {
154
157
  command: "/usr/bin/tar",
@@ -52,7 +52,7 @@ export interface PlatformBootstrapConfig {
52
52
  healthPath: string;
53
53
  keepReleases: number;
54
54
  credentialFiles?: {
55
- smtpPassword?: string;
55
+ emailSecret?: string;
56
56
  backupS3Secret?: string;
57
57
  };
58
58
  };
@@ -61,16 +61,18 @@ export interface PlatformBootstrapConfig {
61
61
  sshPort: number;
62
62
  privateCidrs: string[];
63
63
  };
64
- /** Install the connector binary only. Resource creation belongs to attended Cloudflare bootstrap. */
64
+ /** Install and configure public ingress from a node-specific attended handoff. */
65
65
  installCloudflared?: boolean;
66
+ /** Install Cloudflare Mesh/WARP only when the handoff contains a Mesh connector. */
67
+ installWarp?: boolean;
66
68
  /** Node-specific attended handoff; a host must never receive the fleet checkpoint. */
67
69
  cloudflareHandoff?: {
68
70
  handoffFile: string;
69
71
  nodeName: string;
70
72
  };
71
73
  }
72
- export interface TenantBootstrapConfig {
73
- kind: 'tenant';
74
+ export interface EnrolledComputeActivationConfig {
75
+ kind: 'enrolled-compute';
74
76
  apiUrl: string;
75
77
  realm: string;
76
78
  nodeHostname: string;
@@ -84,18 +86,20 @@ export interface TenantBootstrapConfig {
84
86
  deployRoot?: string;
85
87
  software?: SoftwareRequirement[];
86
88
  installCloudflared?: boolean;
87
- /** Optional node-specific attended Tunnel/KV handoff, identical to platform hosts. */
89
+ installWarp?: boolean;
90
+ /** Optional node-specific attended Tunnel/KV/Mesh handoff, identical to platform hosts. */
88
91
  cloudflareHandoff?: {
89
92
  handoffFile: string;
90
93
  nodeName: string;
91
94
  };
92
95
  /** Local-only runner authority. The API receives only the resulting node scope. */
93
96
  bootstrapRunner?: {
94
- sshPrivateKeyFile: string;
97
+ /** Optional imported key; omit to generate a unique runner key on this host. */
98
+ sshPrivateKeyFile?: string;
95
99
  targetTelemetryEndpoint: string;
96
100
  };
97
101
  }
98
- export type BootstrapConfig = PlatformBootstrapConfig | TenantBootstrapConfig;
102
+ export type BootstrapConfig = PlatformBootstrapConfig | EnrolledComputeActivationConfig;
99
103
  export interface BootstrapStep {
100
104
  id: string;
101
105
  label: string;
@@ -114,7 +118,12 @@ export interface BootstrapResult {
114
118
  applied: boolean;
115
119
  status: BootstrapStatus;
116
120
  launch?: {
117
- command: string;
121
+ executable: '/usr/local/bin/fz';
122
+ argv: readonly string[];
123
+ environment: {
124
+ FZ_SHARED_DIR: string;
125
+ };
126
+ runAs: string;
118
127
  inviteUrl: string;
119
128
  };
120
129
  }