@forgezero/agent 0.1.41 → 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.
- package/README.md +299 -86
- package/dist/agent-heartbeat.js +6 -3
- package/dist/agent-update-helper.js +5 -2
- package/dist/agent-update.js +5 -2
- package/dist/bootstrap.d.ts +17 -8
- package/dist/bootstrap.js +1504 -512
- package/dist/cli/agent-install.d.ts +6 -5
- package/dist/cli/cloudflare-bootstrap.d.ts +12 -1
- package/dist/cli/maintenance.d.ts +23 -0
- package/dist/cli/run.d.ts +3 -1
- package/dist/cli/session-store.d.ts +5 -0
- package/dist/cloudflare-bootstrap.d.ts +73 -35
- package/dist/cloudflare-bootstrap.js +587 -90
- package/dist/cloudflare-edge.d.ts +64 -12
- package/dist/cloudflare-edge.js +103 -8
- package/dist/community-rehearsal-host.d.ts +51 -0
- package/dist/community-rehearsal-host.js +272 -0
- package/dist/credential-schema.d.ts +54 -0
- package/dist/credential-schema.js +47 -0
- package/dist/definition.d.ts +31 -5
- package/dist/definition.js +271 -44
- package/dist/deploy-file.js +294 -68
- package/dist/deployment-runner.js +18 -5
- package/dist/deployment.d.ts +13 -1
- package/dist/fz-agent.js +3932 -582
- package/dist/fz-git-ssh.js +122 -0
- package/dist/fz.js +3634 -1266
- package/dist/git-ssh.d.ts +5 -0
- package/dist/guest-enrolment.d.ts +2 -0
- package/dist/guest-enrolment.js +1 -0
- package/dist/host-maintenance.d.ts +39 -0
- package/dist/host-maintenance.js +135 -0
- package/dist/index.d.ts +4 -2
- package/dist/mesh-connector.d.ts +16 -0
- package/dist/mesh-connector.js +46 -0
- package/dist/metal-bootstrap.js +145 -7
- package/dist/metal-helper-socket.js +61 -31
- package/dist/metal-provision.d.ts +2 -2
- package/dist/metal-provision.js +62 -32
- package/dist/operator-bootstrap.d.ts +90 -0
- package/dist/operator-bootstrap.js +5704 -0
- package/dist/otel-collector.d.ts +18 -0
- package/dist/pipeline.d.ts +3 -2
- package/dist/pipeline.js +1 -1
- package/dist/platform-bootstrap-runtime.d.ts +39 -21
- package/dist/platform-bootstrap-runtime.js +182 -59
- package/dist/platform-fleet-verification.d.ts +19 -0
- package/dist/platform-fleet-verification.js +3873 -0
- package/dist/platform-genesis-config.d.ts +7 -0
- package/dist/platform-genesis.d.ts +17 -0
- package/dist/provision.d.ts +76 -3
- package/dist/provision.js +1061 -229
- package/dist/recovery-host.d.ts +7 -0
- package/dist/recovery-host.js +124 -0
- package/dist/service-supervisor.d.ts +42 -0
- package/dist/software-helper.d.ts +4 -0
- package/dist/software-helper.js +865 -63
- package/dist/software.d.ts +14 -3
- package/dist/software.js +163 -37
- package/dist/ssh-bootstrap.d.ts +97 -0
- package/dist/supervised-app.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/package.json +175 -164
- package/schema/{deploy-v2.json → deploy-v3.json} +53 -6
package/dist/agent-heartbeat.js
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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
|
-
|
|
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",
|
package/dist/agent-update.js
CHANGED
|
@@ -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
|
-
|
|
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",
|
package/dist/bootstrap.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export interface PlatformBootstrapConfig {
|
|
|
52
52
|
healthPath: string;
|
|
53
53
|
keepReleases: number;
|
|
54
54
|
credentialFiles?: {
|
|
55
|
-
|
|
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
|
|
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
|
|
73
|
-
kind: '
|
|
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
|
-
|
|
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
|
-
|
|
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 |
|
|
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
|
-
|
|
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
|
}
|