@forgezero/agent 0.1.33 → 0.1.35
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 +21 -0
- package/dist/agent-heartbeat.js +1 -1
- package/dist/bootstrap.d.ts +128 -0
- package/dist/bootstrap.js +3361 -0
- package/dist/capacity-calibration.d.ts +51 -0
- package/dist/capacity-calibration.js +119 -0
- package/dist/cli/cloudflare-bootstrap.d.ts +11 -0
- package/dist/cloudflare-bootstrap.d.ts +218 -0
- package/dist/cloudflare-bootstrap.js +1196 -0
- package/dist/cloudflare-edge.d.ts +265 -0
- package/dist/cloudflare-edge.js +424 -0
- package/dist/definition.d.ts +3 -0
- package/dist/definition.js +174 -2
- package/dist/deploy-file.js +174 -2
- package/dist/deployment.d.ts +11 -0
- package/dist/fz-agent.js +1855 -3370
- package/dist/fz.js +8092 -6437
- package/dist/index.d.ts +2 -0
- package/dist/metal-bootstrap.d.ts +52 -0
- package/dist/metal-bootstrap.js +942 -0
- package/dist/platform-bootstrap-runtime.d.ts +161 -0
- package/dist/platform-bootstrap-runtime.js +462 -0
- package/dist/provision.js +5 -4
- package/dist/version.d.ts +1 -1
- package/package.json +26 -2
- package/schema/deploy-v2.json +14 -0
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export { attestNodeOnce, startNodeAttestation } from './attestation-client';
|
|
|
48
48
|
export type { NodeAttestationOptions } from './attestation-client';
|
|
49
49
|
export { applyMetalIsolation, metalGuestSliceUnit, metalHousekeepingDropIn } from './metal-isolation';
|
|
50
50
|
export { assertSupportedGuestImage, SUPPORTED_GUEST_IMAGE } from './ubuntu';
|
|
51
|
+
export { calibrateHttpConcurrency, localCalibrationEndpoint } from './capacity-calibration';
|
|
52
|
+
export type { CapacityCalibration, CapacityCalibrationOptions, CapacityStage } from './capacity-calibration';
|
|
51
53
|
/**
|
|
52
54
|
* The node seed, on disk, owner-only.
|
|
53
55
|
*
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type MetalCommandResult, type MetalProvisionProfile } from './metal-provision';
|
|
2
|
+
declare const PROFILE_PATH = "/etc/forgezero/metal.json";
|
|
3
|
+
export interface MetalBootstrapConfig {
|
|
4
|
+
kind: 'metal';
|
|
5
|
+
metalHostname: string;
|
|
6
|
+
profile: MetalProvisionProfile;
|
|
7
|
+
hostTelemetryEndpoint: 'http://127.0.0.1:4318';
|
|
8
|
+
hostTelemetryUnit: string;
|
|
9
|
+
/** Optional operator-supplied entropy. Consumed after PID 1 seals it. */
|
|
10
|
+
agentSeedFile?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MetalBootstrapPlan {
|
|
13
|
+
kind: 'metal';
|
|
14
|
+
metalHostname: string;
|
|
15
|
+
profilePath: typeof PROFILE_PATH;
|
|
16
|
+
units: readonly string[];
|
|
17
|
+
steps: readonly string[];
|
|
18
|
+
requiresRoot: true;
|
|
19
|
+
consumes: readonly string[];
|
|
20
|
+
}
|
|
21
|
+
export interface MetalBootstrapStatus {
|
|
22
|
+
initialized: boolean;
|
|
23
|
+
profileValid: boolean;
|
|
24
|
+
profileMode: number | null;
|
|
25
|
+
imageVerified: boolean;
|
|
26
|
+
units: Record<string, 'active' | 'inactive' | 'missing'>;
|
|
27
|
+
helperSocketReady: boolean;
|
|
28
|
+
updateSocketReady: boolean;
|
|
29
|
+
metalHostname?: string;
|
|
30
|
+
problems: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface MetalBootstrapResult extends MetalBootstrapStatus {
|
|
33
|
+
publicIdentity: string;
|
|
34
|
+
}
|
|
35
|
+
export type MetalBootstrapExec = (argv: readonly string[], stdin?: string) => Promise<MetalCommandResult>;
|
|
36
|
+
export interface MetalBootstrapApplyOptions {
|
|
37
|
+
agentSourcePath: string;
|
|
38
|
+
repair?: boolean;
|
|
39
|
+
exec?: MetalBootstrapExec;
|
|
40
|
+
getuid?: () => number;
|
|
41
|
+
}
|
|
42
|
+
export declare class MetalBootstrapError extends Error {
|
|
43
|
+
}
|
|
44
|
+
export declare function validateMetalBootstrapConfig(config: MetalBootstrapConfig): MetalBootstrapConfig;
|
|
45
|
+
/** Reject symlinks and group/world access before parsing coordinates or entropy. */
|
|
46
|
+
export declare function validateOwnerOnlyPath(path: string, requireRootOwner: boolean): void;
|
|
47
|
+
export declare function readMetalBootstrapConfig(path: string): MetalBootstrapConfig;
|
|
48
|
+
export declare function planMetalBootstrap(config: MetalBootstrapConfig): MetalBootstrapPlan;
|
|
49
|
+
export declare function renderMetalUnits(config: MetalBootstrapConfig): Record<string, string>;
|
|
50
|
+
export declare function applyMetalBootstrap(config: MetalBootstrapConfig, options: MetalBootstrapApplyOptions): Promise<MetalBootstrapResult>;
|
|
51
|
+
export declare function metalBootstrapStatus(exec?: MetalBootstrapExec): Promise<MetalBootstrapStatus>;
|
|
52
|
+
export {};
|