@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/package.json
CHANGED
|
@@ -1,166 +1,177 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"@forgezero/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
2
|
+
"name": "@forgezero/agent",
|
|
3
|
+
"version": "0.1.42",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"check": "tsc --noEmit",
|
|
7
|
+
"build": "bun ../tools/package-task.ts build agent",
|
|
8
|
+
"prepublishOnly": "bun ../tools/package-task.ts prepublish agent"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"typescript": "^5.6.0",
|
|
12
|
+
"@types/bun": "latest",
|
|
13
|
+
"@types/node": "^22.0.0",
|
|
14
|
+
"@forgezero/access": "0.1.4",
|
|
15
|
+
"@noble/curves": "^2.2.0",
|
|
16
|
+
"@noble/post-quantum": "^0.6.1"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@forgezero/runtime": "0.1.8",
|
|
20
|
+
"@forgezero/vault": "0.1.12",
|
|
21
|
+
"@noble/curves": "2.2.0",
|
|
22
|
+
"@noble/hashes": "2.2.0",
|
|
23
|
+
"@noble/post-quantum": "0.6.1",
|
|
24
|
+
"@scure/bip39": "2.2.0"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"fz-agent": "dist/fz-agent.js",
|
|
28
|
+
"fz": "dist/fz.js"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public",
|
|
32
|
+
"provenance": false
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"schema",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"description": "ForgeZero machine tooling: the fz operator command and fz-agent for vault access, provisioning and deployment.",
|
|
42
|
+
"keywords": [
|
|
43
|
+
"agent",
|
|
44
|
+
"forgezero",
|
|
45
|
+
"vault",
|
|
46
|
+
"secrets",
|
|
47
|
+
"systemd",
|
|
48
|
+
"attestation",
|
|
49
|
+
"sev-snp"
|
|
50
|
+
],
|
|
51
|
+
"homepage": "https://www.forgezero.net/docs/agent",
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "git+https://github.com/forgezero-net/packages.git",
|
|
55
|
+
"directory": "agent"
|
|
56
|
+
},
|
|
57
|
+
"bugs": "https://github.com/forgezero-net/packages/issues",
|
|
58
|
+
"exports": {
|
|
59
|
+
"./provision": {
|
|
60
|
+
"types": "./dist/provision.d.ts",
|
|
61
|
+
"default": "./dist/provision.js"
|
|
62
|
+
},
|
|
63
|
+
"./subscribe": {
|
|
64
|
+
"types": "./dist/subscribe.d.ts",
|
|
65
|
+
"default": "./dist/subscribe.js"
|
|
66
|
+
},
|
|
67
|
+
"./pipeline": {
|
|
68
|
+
"types": "./dist/pipeline.d.ts",
|
|
69
|
+
"default": "./dist/pipeline.js"
|
|
70
|
+
},
|
|
71
|
+
"./definition": {
|
|
72
|
+
"types": "./dist/definition.d.ts",
|
|
73
|
+
"default": "./dist/definition.js"
|
|
74
|
+
},
|
|
75
|
+
"./deploy-file": {
|
|
76
|
+
"types": "./dist/deploy-file.d.ts",
|
|
77
|
+
"default": "./dist/deploy-file.js"
|
|
78
|
+
},
|
|
79
|
+
"./schema/deploy-v3.json": "./schema/deploy-v3.json",
|
|
80
|
+
"./ssh-listen": {
|
|
81
|
+
"types": "./dist/ssh-listen.d.ts",
|
|
82
|
+
"default": "./dist/ssh-listen.js"
|
|
83
|
+
},
|
|
84
|
+
"./ssh-server": {
|
|
85
|
+
"types": "./dist/ssh-server.d.ts",
|
|
86
|
+
"default": "./dist/ssh-server.js"
|
|
87
|
+
},
|
|
88
|
+
"./compute": {
|
|
89
|
+
"types": "./dist/compute.d.ts",
|
|
90
|
+
"default": "./dist/compute.js"
|
|
91
|
+
},
|
|
92
|
+
"./provisioning-pull": {
|
|
93
|
+
"types": "./dist/provisioning-pull.d.ts",
|
|
94
|
+
"default": "./dist/provisioning-pull.js"
|
|
95
|
+
},
|
|
96
|
+
"./migration-pull": {
|
|
97
|
+
"types": "./dist/migration-pull.d.ts",
|
|
98
|
+
"default": "./dist/migration-pull.js"
|
|
99
|
+
},
|
|
100
|
+
"./lifecycle-helper": {
|
|
101
|
+
"types": "./dist/lifecycle-helper.d.ts",
|
|
102
|
+
"default": "./dist/lifecycle-helper.js"
|
|
103
|
+
},
|
|
104
|
+
"./agent-update": {
|
|
105
|
+
"types": "./dist/agent-update.d.ts",
|
|
106
|
+
"default": "./dist/agent-update.js"
|
|
107
|
+
},
|
|
108
|
+
"./agent-update-helper": {
|
|
109
|
+
"types": "./dist/agent-update-helper.d.ts",
|
|
110
|
+
"default": "./dist/agent-update-helper.js"
|
|
111
|
+
},
|
|
112
|
+
"./agent-heartbeat": {
|
|
113
|
+
"types": "./dist/agent-heartbeat.d.ts",
|
|
114
|
+
"default": "./dist/agent-heartbeat.js"
|
|
115
|
+
},
|
|
116
|
+
"./software": {
|
|
117
|
+
"types": "./dist/software.d.ts",
|
|
118
|
+
"default": "./dist/software.js"
|
|
119
|
+
},
|
|
120
|
+
"./software-helper": {
|
|
121
|
+
"types": "./dist/software-helper.d.ts",
|
|
122
|
+
"default": "./dist/software-helper.js"
|
|
123
|
+
},
|
|
124
|
+
"./operator-bootstrap": {
|
|
125
|
+
"types": "./dist/operator-bootstrap.d.ts",
|
|
126
|
+
"default": "./dist/operator-bootstrap.js"
|
|
127
|
+
},
|
|
128
|
+
"./host-maintenance": {
|
|
129
|
+
"types": "./dist/host-maintenance.d.ts",
|
|
130
|
+
"default": "./dist/host-maintenance.js"
|
|
131
|
+
},
|
|
132
|
+
"./metal-provision": {
|
|
133
|
+
"types": "./dist/metal-provision.d.ts",
|
|
134
|
+
"default": "./dist/metal-provision.js"
|
|
135
|
+
},
|
|
136
|
+
"./ubuntu": {
|
|
137
|
+
"types": "./dist/ubuntu.d.ts",
|
|
138
|
+
"default": "./dist/ubuntu.js"
|
|
139
|
+
},
|
|
140
|
+
"./project-context": {
|
|
141
|
+
"types": "./dist/project-context.d.ts",
|
|
142
|
+
"default": "./dist/project-context.js"
|
|
143
|
+
},
|
|
144
|
+
"./capacity-calibration": {
|
|
145
|
+
"types": "./dist/capacity-calibration.d.ts",
|
|
146
|
+
"default": "./dist/capacity-calibration.js"
|
|
147
|
+
},
|
|
148
|
+
"./cloudflare-bootstrap": {
|
|
149
|
+
"types": "./dist/cloudflare-bootstrap.d.ts",
|
|
150
|
+
"default": "./dist/cloudflare-bootstrap.js"
|
|
151
|
+
},
|
|
152
|
+
"./cloudflare-edge": {
|
|
153
|
+
"types": "./dist/cloudflare-edge.d.ts",
|
|
154
|
+
"default": "./dist/cloudflare-edge.js"
|
|
155
|
+
},
|
|
156
|
+
"./mesh-connector": {
|
|
157
|
+
"types": "./dist/mesh-connector.d.ts",
|
|
158
|
+
"default": "./dist/mesh-connector.js"
|
|
159
|
+
},
|
|
160
|
+
"./bootstrap": {
|
|
161
|
+
"types": "./dist/bootstrap.d.ts",
|
|
162
|
+
"default": "./dist/bootstrap.js"
|
|
163
|
+
},
|
|
164
|
+
"./credential-schema": {
|
|
165
|
+
"types": "./dist/credential-schema.d.ts",
|
|
166
|
+
"default": "./dist/credential-schema.js"
|
|
167
|
+
},
|
|
168
|
+
"./platform-bootstrap-runtime": {
|
|
169
|
+
"types": "./dist/platform-bootstrap-runtime.d.ts",
|
|
170
|
+
"default": "./dist/platform-bootstrap-runtime.js"
|
|
171
|
+
},
|
|
172
|
+
"./metal-bootstrap": {
|
|
173
|
+
"types": "./dist/metal-bootstrap.d.ts",
|
|
174
|
+
"default": "./dist/metal-bootstrap.js"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
166
177
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://www.forgezero.net/schemas/deploy-
|
|
3
|
+
"$id": "https://www.forgezero.net/schemas/deploy-v3.json",
|
|
4
4
|
"title": "ForgeZero deployment pipeline",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["version", "name", "profiles", "steps"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"$schema": { "type": "string", "const": "https://www.forgezero.net/schemas/deploy-
|
|
10
|
-
"version": { "const":
|
|
9
|
+
"$schema": { "type": "string", "const": "https://www.forgezero.net/schemas/deploy-v3.json" },
|
|
10
|
+
"version": { "const": 3 },
|
|
11
11
|
"name": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
12
12
|
"requireAttestation": { "type": "boolean" },
|
|
13
13
|
"profiles": {
|
|
@@ -28,11 +28,52 @@
|
|
|
28
28
|
"additionalProperties": false,
|
|
29
29
|
"required": ["id", "version"],
|
|
30
30
|
"properties": {
|
|
31
|
-
"id": { "enum": ["bun", "nginx", "arangodb", "cloudflared", "ufw", "openssh-client"] },
|
|
31
|
+
"id": { "enum": ["bun", "nginx", "arangodb", "cloudflared", "cloudflare-warp", "ufw", "openssh-client"] },
|
|
32
32
|
"version": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]{0,31}$" }
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
"service": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["strategy", "publicPort", "applicationPorts", "command", "healthPath"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"strategy": { "enum": ["direct", "blue-green"] },
|
|
42
|
+
"publicPort": { "type": "integer", "minimum": 1024, "maximum": 65535 },
|
|
43
|
+
"applicationPorts": {
|
|
44
|
+
"oneOf": [
|
|
45
|
+
{
|
|
46
|
+
"type": "object", "additionalProperties": false,
|
|
47
|
+
"required": ["mode", "ports"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"mode": { "const": "fixed" },
|
|
50
|
+
"ports": {
|
|
51
|
+
"type": "array", "minItems": 1, "maxItems": 2, "uniqueItems": true,
|
|
52
|
+
"items": { "type": "integer", "minimum": 1024, "maximum": 65535 }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "object", "additionalProperties": false,
|
|
58
|
+
"required": ["mode", "from", "to"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"mode": { "const": "dynamic" },
|
|
61
|
+
"from": { "type": "integer", "minimum": 1024, "maximum": 65535 },
|
|
62
|
+
"to": { "type": "integer", "minimum": 1024, "maximum": 65535 }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"command": {
|
|
68
|
+
"type": "array", "minItems": 1, "maxItems": 256,
|
|
69
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 16384 }
|
|
70
|
+
},
|
|
71
|
+
"healthPath": { "type": "string", "pattern": "^/", "maxLength": 256 },
|
|
72
|
+
"maxConnections": { "type": "integer", "minimum": 1, "maximum": 1000000 },
|
|
73
|
+
"websocket": { "type": "boolean" },
|
|
74
|
+
"drainMs": { "type": "integer", "minimum": 0, "maximum": 300000 }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
36
77
|
"capacityCalibration": {
|
|
37
78
|
"type": "object",
|
|
38
79
|
"additionalProperties": false,
|
|
@@ -53,10 +94,11 @@
|
|
|
53
94
|
"steps": {
|
|
54
95
|
"type": "array",
|
|
55
96
|
"minItems": 1,
|
|
97
|
+
"maxItems": 256,
|
|
56
98
|
"items": {
|
|
57
99
|
"type": "object",
|
|
58
100
|
"additionalProperties": false,
|
|
59
|
-
"required": ["name", "phase", "scope", "
|
|
101
|
+
"required": ["name", "phase", "scope", "exec"],
|
|
60
102
|
"properties": {
|
|
61
103
|
"name": { "type": "string", "minLength": 1 },
|
|
62
104
|
"phase": { "enum": ["build", "release", "migrate", "health"] },
|
|
@@ -67,7 +109,12 @@
|
|
|
67
109
|
"uniqueItems": true,
|
|
68
110
|
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$" }
|
|
69
111
|
},
|
|
70
|
-
"
|
|
112
|
+
"exec": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"minItems": 1,
|
|
115
|
+
"maxItems": 256,
|
|
116
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 16384 }
|
|
117
|
+
},
|
|
71
118
|
"secrets": { "type": "array", "items": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" }, "uniqueItems": true },
|
|
72
119
|
"always": { "type": "boolean" },
|
|
73
120
|
"when": {
|