@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.
@@ -1,5 +1,5 @@
1
- import { type PlatformBootstrapSecrets } from './bootstrap';
2
- import { type PlatformGenesisEnvironment } from './platform-genesis';
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
- environment: PlatformGenesisEnvironment;
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: PlatformGenesisEnvironment;
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.