@forgezero/agent 0.1.41 → 0.1.43
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 +1509 -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 +3636 -1263
- 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 +150 -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 +5709 -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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PlatformBootstrapConfig } from './bootstrap';
|
|
2
|
+
export interface PlatformGenesisNodeConfigInput {
|
|
3
|
+
nodeHostname: string;
|
|
4
|
+
cloudflareHandoffFile: string;
|
|
5
|
+
}
|
|
6
|
+
/** Expand one reviewed common template into the exact three genesis hosts. */
|
|
7
|
+
export declare function platformGenesisBootstrapConfigs(template: PlatformBootstrapConfig, nodes: readonly PlatformGenesisNodeConfigInput[]): readonly PlatformBootstrapConfig[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RemoteProvisionClaim } from './provisioning-pull';
|
|
2
|
+
export declare const PLATFORM_GENESIS_ENVIRONMENTS: readonly ["production", "development"];
|
|
3
|
+
export type PlatformGenesisEnvironment = (typeof PLATFORM_GENESIS_ENVIRONMENTS)[number];
|
|
4
|
+
export interface PlatformGenesisGuest {
|
|
5
|
+
name: string;
|
|
6
|
+
address: string;
|
|
7
|
+
cpuPoolKey: string;
|
|
8
|
+
physicalCores: number;
|
|
9
|
+
vcpu: number;
|
|
10
|
+
memoryGib: number;
|
|
11
|
+
diskGib: number;
|
|
12
|
+
egressGuaranteedMbps: number;
|
|
13
|
+
egressBurstMbps: number;
|
|
14
|
+
}
|
|
15
|
+
/** Package-owned provisioning coordinates for the exact three-node platform seed. */
|
|
16
|
+
export declare const PLATFORM_GENESIS_FLEETS: Record<PlatformGenesisEnvironment, readonly PlatformGenesisGuest[]>;
|
|
17
|
+
export declare function platformGenesisClaims(environment: PlatformGenesisEnvironment, sshPublicKeys: readonly string[]): readonly RemoteProvisionClaim[];
|
package/dist/provision.d.ts
CHANGED
|
@@ -26,13 +26,22 @@
|
|
|
26
26
|
* a box somebody rebuilds by hand.
|
|
27
27
|
*/
|
|
28
28
|
export interface Check {
|
|
29
|
-
/**
|
|
29
|
+
/** Stable display label; execution uses the typed operation. */
|
|
30
30
|
command: string;
|
|
31
|
+
operation: CapabilityOperation;
|
|
31
32
|
/** True when the output proves the property. */
|
|
32
33
|
satisfied: (stdout: string, exitCode: number) => boolean;
|
|
33
34
|
/** Shown when it fails. Says what to do, not merely what is wrong. */
|
|
34
35
|
remedy: string;
|
|
35
36
|
}
|
|
37
|
+
export type CapabilityOperation = {
|
|
38
|
+
kind: 'path-exists';
|
|
39
|
+
path: string;
|
|
40
|
+
nodeType: 'file' | 'directory';
|
|
41
|
+
} | {
|
|
42
|
+
kind: 'version';
|
|
43
|
+
argv: readonly string[];
|
|
44
|
+
};
|
|
36
45
|
/**
|
|
37
46
|
* Semver-ish floor check tolerant of `v` prefixes and build suffixes.
|
|
38
47
|
*
|
|
@@ -103,6 +112,10 @@ export interface UnitOptions {
|
|
|
103
112
|
/** Claim API-owned SSH bootstrap jobs; the private key stays a systemd credential on this runner. */
|
|
104
113
|
pullBootstrap?: boolean;
|
|
105
114
|
bootstrapSshCredentialPath?: string;
|
|
115
|
+
/** Optional imported private key. When absent the runner generates its own. */
|
|
116
|
+
bootstrapSshSourcePath?: string;
|
|
117
|
+
/** Non-secret authorized_keys line reported during enrolment. */
|
|
118
|
+
bootstrapSshPublicKeyPath?: string;
|
|
106
119
|
bootstrapTargetTelemetryEndpoint?: string;
|
|
107
120
|
/** Root-owned declarative lifecycle profile; never supplied by a migration claim. */
|
|
108
121
|
lifecycleProfilePath?: string;
|
|
@@ -135,6 +148,7 @@ export interface UnitOptions {
|
|
|
135
148
|
telemetryEndpoint?: string;
|
|
136
149
|
}
|
|
137
150
|
export declare const DEPLOYMENT_RUNNER_USER = "forgezero-runner";
|
|
151
|
+
export declare const APPLICATION_RUNTIME_USER = "forgezero-app";
|
|
138
152
|
export declare const DEPLOYMENT_GROUP = "forgezero-deploy";
|
|
139
153
|
export declare const VAULT_GROUP = "forgezero-vault";
|
|
140
154
|
export declare const LIFECYCLE_GROUP = "forgezero-lifecycle";
|
|
@@ -152,7 +166,7 @@ export declare const DEFAULT_RUNNER_PUBLIC_TCP_PORTS: readonly [443];
|
|
|
152
166
|
/** Root-owned policy monitor. The credential-bearing Agent is bound to it. */
|
|
153
167
|
export declare function agentEgressUnit(options: Pick<UnitOptions, 'binPath' | 'user' | 'repository' | 'pullDeployments' | 'runnerLoopbackPorts' | 'runnerPublicTcpPorts'>): string;
|
|
154
168
|
/** Root may execute only package-owned OS strategies selected by id + version. */
|
|
155
|
-
export declare function softwareHelperUnit(options: Pick<UnitOptions, 'binPath'>): string;
|
|
169
|
+
export declare function softwareHelperUnit(options: Pick<UnitOptions, 'binPath' | 'deployRoot'>): string;
|
|
156
170
|
/** Fixed root boundary for verified, health-gated Agent replacement. */
|
|
157
171
|
export declare function agentUpdateHelperUnit(options: Pick<UnitOptions, 'binPath'>): string;
|
|
158
172
|
/**
|
|
@@ -192,13 +206,72 @@ export declare function deploymentRunnerUnit(options: Pick<UnitOptions, 'binPath
|
|
|
192
206
|
*/
|
|
193
207
|
export declare function agentUnit(options: UnitOptions): string;
|
|
194
208
|
export interface Step {
|
|
195
|
-
/**
|
|
209
|
+
/** Stable display, never executed. */
|
|
196
210
|
command: string;
|
|
211
|
+
/** Closed typed operation executed with native fs and fixed argv only. */
|
|
212
|
+
operation: ProvisionOperation;
|
|
197
213
|
/** What it is for, in an operator's words. */
|
|
198
214
|
label: string;
|
|
199
215
|
/** A step that may fail without failing the provision. */
|
|
200
216
|
optional?: boolean;
|
|
201
217
|
}
|
|
218
|
+
export interface FixedHostCommand {
|
|
219
|
+
argv: readonly string[];
|
|
220
|
+
acceptedExitCodes?: readonly number[];
|
|
221
|
+
}
|
|
222
|
+
export interface DirectorySpec {
|
|
223
|
+
path: string;
|
|
224
|
+
mode: number;
|
|
225
|
+
owner?: string;
|
|
226
|
+
group?: string;
|
|
227
|
+
}
|
|
228
|
+
export type ProvisionOperation = {
|
|
229
|
+
kind: 'commands';
|
|
230
|
+
commands: readonly FixedHostCommand[];
|
|
231
|
+
} | {
|
|
232
|
+
kind: 'directories';
|
|
233
|
+
directories: readonly DirectorySpec[];
|
|
234
|
+
} | {
|
|
235
|
+
kind: 'install-runtime';
|
|
236
|
+
source: string;
|
|
237
|
+
binary: string;
|
|
238
|
+
version: string;
|
|
239
|
+
} | {
|
|
240
|
+
kind: 'ensure-seed';
|
|
241
|
+
credential: string;
|
|
242
|
+
} | {
|
|
243
|
+
kind: 'ensure-git-identity';
|
|
244
|
+
credential: string;
|
|
245
|
+
publicKey: string;
|
|
246
|
+
} | {
|
|
247
|
+
kind: 'ensure-bootstrap-ssh-identity';
|
|
248
|
+
credential: string;
|
|
249
|
+
publicKey: string;
|
|
250
|
+
source?: string;
|
|
251
|
+
} | {
|
|
252
|
+
kind: 'ensure-enrolment';
|
|
253
|
+
state: string;
|
|
254
|
+
source: string;
|
|
255
|
+
credential: string;
|
|
256
|
+
} | {
|
|
257
|
+
kind: 'wait-socket';
|
|
258
|
+
path: string;
|
|
259
|
+
attempts: number;
|
|
260
|
+
intervalMs: number;
|
|
261
|
+
} | {
|
|
262
|
+
kind: 'verify-file';
|
|
263
|
+
path: string;
|
|
264
|
+
} | {
|
|
265
|
+
kind: 'verify-egress';
|
|
266
|
+
runnerPublicTcpPorts: readonly number[];
|
|
267
|
+
runnerLoopbackPorts: readonly number[];
|
|
268
|
+
} | {
|
|
269
|
+
kind: 'verify-resolved-stub';
|
|
270
|
+
} | {
|
|
271
|
+
kind: 'install-warp';
|
|
272
|
+
} | {
|
|
273
|
+
kind: 'verify-warp';
|
|
274
|
+
};
|
|
202
275
|
export interface ProvisionPlan {
|
|
203
276
|
mode: AgentMode;
|
|
204
277
|
reason: string;
|