@forgezero/agent 0.1.65 → 0.1.68
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 +751 -157
- package/dist/agent-heartbeat.js +1 -1
- package/dist/bootstrap-bundle.d.ts +1 -0
- package/dist/bootstrap-bundle.js +4 -3
- package/dist/bootstrap.d.ts +7 -1
- package/dist/bootstrap.js +264 -13
- package/dist/community-rehearsal-host.d.ts +12 -0
- package/dist/community-rehearsal-host.js +99 -36
- package/dist/definition.js +41 -4
- package/dist/deploy-compiler.js +4 -4
- package/dist/deploy-file.js +41 -4
- package/dist/deploy-plan-runner.js +4 -4
- package/dist/deploy-plan.js +4 -4
- package/dist/fz-agent.js +165 -76
- package/dist/fz.js +619 -262
- package/dist/index.d.ts +1 -1
- package/dist/metal-bootstrap.js +120 -46
- package/dist/metal-helper-socket.js +406 -65
- package/dist/metal-provision.js +402 -61
- package/dist/operator-bootstrap.d.ts +48 -5
- package/dist/operator-bootstrap.js +594 -205
- package/dist/platform-bootstrap-runtime.d.ts +33 -0
- package/dist/platform-bootstrap-runtime.js +551 -44
- package/dist/platform-fleet-verification.js +242 -18
- package/dist/platform-genesis-config.d.ts +7 -1
- package/dist/platform-genesis.d.ts +16 -17
- package/dist/platform-genesis.js +464 -0
- package/dist/provision.js +42 -5
- package/dist/software-helper.js +41 -4
- package/dist/software.d.ts +8 -2
- package/dist/software.js +41 -4
- package/dist/ssh-bootstrap.d.ts +5 -0
- package/dist/ubuntu.d.ts +15 -14
- package/dist/ubuntu.js +345 -9
- package/dist/version.d.ts +1 -1
- package/package.json +8 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PlatformBootstrapSecrets } from './bootstrap';
|
|
2
|
-
import { type
|
|
1
|
+
import { type PlatformBootstrapConfig, type PlatformBootstrapSecrets } from './bootstrap';
|
|
2
|
+
import { type PlatformGenesisGuest } from './platform-genesis';
|
|
3
3
|
export interface OperatorSshHop {
|
|
4
4
|
address: string;
|
|
5
5
|
port: number;
|
|
@@ -21,10 +21,22 @@ export interface OperatorMetalBootstrapRequest {
|
|
|
21
21
|
target: OperatorPlatformBootstrapRequest['target'];
|
|
22
22
|
metalConfigFile: string;
|
|
23
23
|
genesis: {
|
|
24
|
-
|
|
24
|
+
nodes: readonly [PlatformGenesisGuest, PlatformGenesisGuest, PlatformGenesisGuest];
|
|
25
|
+
rehearsalNode?: PlatformGenesisGuest;
|
|
25
26
|
sshPublicKeyFiles: string[];
|
|
26
27
|
};
|
|
27
28
|
}
|
|
29
|
+
export interface OperatorGuestHostKeyEvidence {
|
|
30
|
+
format: 1;
|
|
31
|
+
kind: 'forgezero-operator-guest-host-keys';
|
|
32
|
+
metalHostKeySha256: string;
|
|
33
|
+
nodes: readonly {
|
|
34
|
+
name: string;
|
|
35
|
+
address: string;
|
|
36
|
+
hostKey: string;
|
|
37
|
+
hostKeySha256: string;
|
|
38
|
+
}[];
|
|
39
|
+
}
|
|
28
40
|
export interface OperatorPlatformBootstrapFleetRequest {
|
|
29
41
|
kind: 'platform-fleet-remote';
|
|
30
42
|
requests: readonly [string, string, string];
|
|
@@ -33,7 +45,7 @@ export interface OperatorPlatformBootstrapFleetPlan {
|
|
|
33
45
|
kind: 'platform-fleet-remote';
|
|
34
46
|
mode: OperatorPlatformBootstrapMode;
|
|
35
47
|
mutation: boolean;
|
|
36
|
-
environment:
|
|
48
|
+
environment: PlatformBootstrapConfig['environment'];
|
|
37
49
|
nodes: readonly {
|
|
38
50
|
computeReference: string;
|
|
39
51
|
address: string;
|
|
@@ -53,8 +65,19 @@ export interface OperatorPlatformBootstrapFleetResult {
|
|
|
53
65
|
ok: boolean;
|
|
54
66
|
outcomes: readonly OperatorPlatformBootstrapFleetOutcome[];
|
|
55
67
|
}
|
|
68
|
+
export interface OperatorPlatformFleetCoordinates {
|
|
69
|
+
environment: PlatformBootstrapConfig['environment'];
|
|
70
|
+
appOrigin: string;
|
|
71
|
+
apiOrigin: string;
|
|
72
|
+
nodes: readonly {
|
|
73
|
+
computeReference: string;
|
|
74
|
+
address: string;
|
|
75
|
+
nodeHostname: string;
|
|
76
|
+
databaseRole: 'master' | 'joiner';
|
|
77
|
+
}[];
|
|
78
|
+
}
|
|
56
79
|
export type OperatorPlatformBootstrapMode = 'apply' | 'status';
|
|
57
|
-
export type OperatorMetalBootstrapMode = 'apply' | 'genesis' | 'rehearsal' | 'rehearsal-cleanup' | 'status';
|
|
80
|
+
export type OperatorMetalBootstrapMode = 'apply' | 'genesis' | 'rehearsal' | 'rehearsal-cleanup' | 'host-keys' | 'rehearsal-host-keys' | 'status';
|
|
58
81
|
export interface OperatorPlatformBootstrapPlan {
|
|
59
82
|
kind: 'platform-remote';
|
|
60
83
|
mode: OperatorPlatformBootstrapMode;
|
|
@@ -103,9 +126,27 @@ export declare function readOperatorPlatformBootstrapFleetRequest(path: string):
|
|
|
103
126
|
export declare function writeOperatorPlatformBootstrapFleetRequest(path: string, requestFiles: readonly [string, string, string]): string;
|
|
104
127
|
export declare function readOperatorMetalBootstrapRequest(path: string): OperatorMetalBootstrapRequest;
|
|
105
128
|
export declare function writeOperatorMetalBootstrapRequest(path: string, request: OperatorMetalBootstrapRequest): string;
|
|
129
|
+
export declare function readOperatorGuestHostKeyEvidence(path: string, request?: OperatorMetalBootstrapRequest): OperatorGuestHostKeyEvidence;
|
|
130
|
+
export declare function writeOperatorGuestHostKeyEvidence(path: string, evidence: OperatorGuestHostKeyEvidence, request?: OperatorMetalBootstrapRequest): string;
|
|
106
131
|
export declare function planOperatorMetalBootstrap(request: OperatorMetalBootstrapRequest, mode: OperatorMetalBootstrapMode): OperatorMetalBootstrapPlan;
|
|
107
132
|
export declare function planOperatorPlatformBootstrap(request: OperatorPlatformBootstrapRequest, mode: OperatorPlatformBootstrapMode): OperatorPlatformBootstrapPlan;
|
|
133
|
+
/** Exact non-secret coordinates derived from the same reviewed files bootstrap applies. */
|
|
134
|
+
export declare function operatorPlatformFleetCoordinates(fleet: OperatorPlatformBootstrapFleetRequest): OperatorPlatformFleetCoordinates;
|
|
108
135
|
export declare function planOperatorPlatformFleetBootstrap(fleet: OperatorPlatformBootstrapFleetRequest, mode: OperatorPlatformBootstrapMode): OperatorPlatformBootstrapFleetPlan;
|
|
136
|
+
export declare function collectOperatorGuestHostKeys(request: OperatorMetalBootstrapRequest, options?: OperatorPlatformBootstrapOptions, includeRehearsal?: boolean): Promise<OperatorGuestHostKeyEvidence>;
|
|
137
|
+
export interface OperatorGuestTransport {
|
|
138
|
+
run(nodeName: string, argv: readonly string[], options?: {
|
|
139
|
+
stdin?: string;
|
|
140
|
+
secret?: boolean;
|
|
141
|
+
allowFailure?: boolean;
|
|
142
|
+
}): Promise<OperatorCommandResult>;
|
|
143
|
+
copy(nodeName: string, localPath: string, remotePath: string): Promise<void>;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Execute a bounded callback through the same pinned Metal jump, operator
|
|
147
|
+
* public identity selector and reviewed guest host keys used by bootstrap.
|
|
148
|
+
*/
|
|
149
|
+
export declare function withOperatorGuestTransport<T>(request: OperatorMetalBootstrapRequest, evidence: OperatorGuestHostKeyEvidence, callback: (transport: OperatorGuestTransport) => Promise<T>, options?: OperatorPlatformBootstrapOptions): Promise<T>;
|
|
109
150
|
/**
|
|
110
151
|
* Run one reviewed operator action. No private SSH key, credential value or
|
|
111
152
|
* management token is placed in argv; OpenSSH selects the matching private key
|
|
@@ -125,6 +166,8 @@ export declare function applyOperatorPlatformBootstrap(request: OperatorPlatform
|
|
|
125
166
|
export declare function applyOperatorPlatformFleetBootstrap(fleet: OperatorPlatformBootstrapFleetRequest, mode: OperatorPlatformBootstrapMode, options?: OperatorPlatformBootstrapOptions & {
|
|
126
167
|
secrets?: PlatformBootstrapSecrets;
|
|
127
168
|
}): Promise<OperatorPlatformBootstrapFleetResult>;
|
|
169
|
+
/** Run the fixed host acceptance operation through each request's pinned SSH identity. */
|
|
170
|
+
export declare function verifyOperatorPlatformFleet(fleet: OperatorPlatformBootstrapFleetRequest, expectedVersion: string, options?: OperatorPlatformBootstrapOptions): Promise<OperatorPlatformBootstrapFleetResult>;
|
|
128
171
|
/**
|
|
129
172
|
* Install/bootstrap one blank metal host or provision its exact three-node
|
|
130
173
|
* platform seed through the same pinned SSH transport used for guest bootstrap.
|