@forgezero/agent 0.1.57 → 0.1.59

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 CHANGED
@@ -278,14 +278,15 @@ import type { AgentUpdateOutcome, AgentUpdateReceipt, AgentUpdateRequest, AgentU
278
278
  <a id="forgezero-agent-bootstrap"></a>
279
279
  ## @forgezero/agent/bootstrap
280
280
 
281
- Typed one-time platform bootstrap and internal API-driven enrolled-compute activation contracts. Named value imports: BOOTSTRAP_STATE_PATH, PLATFORM_BOOTSTRAP_PROFILES, applyBootstrap, bootstrapIdentityDigest, bootstrapStatus, localBootstrapHost, planBootstrap, preparePlatformBootstrap, readBootstrapConfig, resolveInstalledBootstrapKind, validateBootstrapConfig. Named type imports: BootstrapConfig, BootstrapEnvironment, BootstrapHost, BootstrapPlan, BootstrapResult, BootstrapStatus, BootstrapStep, DatabaseAgencyParticipation, DatabaseBootstrapRole, EnrolledComputeActivationConfig, InstalledBootstrapKind, PlatformBootstrapConfig, PlatformBootstrapPreparation, PlatformBootstrapProfile, PlatformEnrolmentSource. Import only the names used by this file.
281
+ Typed one-time platform bootstrap and internal API-driven enrolled-compute activation contracts. Named value imports: BOOTSTRAP_STATE_PATH, PLATFORM_BOOTSTRAP_PROFILES, applyBootstrap, bootstrapIdentityDigest, bootstrapStatus, localBootstrapHost, planBootstrap, preparePlatformBootstrap, readBootstrapConfig, resolveInstalledBootstrapKind, validateBootstrapConfig, validateEnrolledComputeBootstrapSecrets, validatePlatformBootstrapSecrets. Named type imports: BootstrapConfig, BootstrapEnvironment, BootstrapHost, BootstrapPlan, BootstrapResult, BootstrapSecrets, BootstrapStatus, BootstrapStep, DatabaseAgencyParticipation, DatabaseBootstrapRole, EnrolledComputeActivationConfig, EnrolledComputeBootstrapSecrets, InstalledBootstrapKind, PlatformBootstrapConfig, PlatformBootstrapPreparation, PlatformBootstrapProfile, PlatformBootstrapSecrets, PlatformEnrolmentSource. Import only the names used by this file.
282
282
 
283
283
  ```text
284
284
  import { BOOTSTRAP_STATE_PATH, PLATFORM_BOOTSTRAP_PROFILES, applyBootstrap, bootstrapIdentityDigest, bootstrapStatus, localBootstrapHost } from '@forgezero/agent/bootstrap';
285
- import { planBootstrap, preparePlatformBootstrap, readBootstrapConfig, resolveInstalledBootstrapKind, validateBootstrapConfig } from '@forgezero/agent/bootstrap';
286
- import type { BootstrapConfig, BootstrapEnvironment, BootstrapHost, BootstrapPlan, BootstrapResult, BootstrapStatus } from '@forgezero/agent/bootstrap';
287
- import type { BootstrapStep, DatabaseAgencyParticipation, DatabaseBootstrapRole, EnrolledComputeActivationConfig, InstalledBootstrapKind, PlatformBootstrapConfig } from '@forgezero/agent/bootstrap';
288
- import type { PlatformBootstrapPreparation, PlatformBootstrapProfile, PlatformEnrolmentSource } from '@forgezero/agent/bootstrap';
285
+ import { planBootstrap, preparePlatformBootstrap, readBootstrapConfig, resolveInstalledBootstrapKind, validateBootstrapConfig, validateEnrolledComputeBootstrapSecrets } from '@forgezero/agent/bootstrap';
286
+ import { validatePlatformBootstrapSecrets } from '@forgezero/agent/bootstrap';
287
+ import type { BootstrapConfig, BootstrapEnvironment, BootstrapHost, BootstrapPlan, BootstrapResult, BootstrapSecrets } from '@forgezero/agent/bootstrap';
288
+ import type { BootstrapStatus, BootstrapStep, DatabaseAgencyParticipation, DatabaseBootstrapRole, EnrolledComputeActivationConfig, EnrolledComputeBootstrapSecrets } from '@forgezero/agent/bootstrap';
289
+ import type { InstalledBootstrapKind, PlatformBootstrapConfig, PlatformBootstrapPreparation, PlatformBootstrapProfile, PlatformBootstrapSecrets, PlatformEnrolmentSource } from '@forgezero/agent/bootstrap';
289
290
  ```
290
291
 
291
292
  <a id="forgezero-agent-operator-bootstrap"></a>
@@ -345,27 +346,28 @@ import type { CapacityCalibration, CapacityCalibrationOptions, CapacityStage, Va
345
346
  <a id="forgezero-agent-cloudflare-bootstrap"></a>
346
347
  ## @forgezero/agent/cloudflare-bootstrap
347
348
 
348
- Attended two-token Cloudflare Tunnel/DNS reconciliation and per-node connector/KV runtime handoff for existing KV resources. Named value imports: applyCloudflareBootstrap, cloudflareHostHandoffPath, finalizeCloudflareBootstrapAcceptance, planCloudflareBootstrap, readCloudflareBootstrapAcceptanceEvidence, readCloudflareBootstrapTokens, readCloudflareConnectorHandoff, readCloudflareHostHandoff, readOwnerApiToken, runAttendedCloudflareBootstrap, validateCloudflareBootstrapCoordinates, verifyCloudflareBootstrapAcceptance, writeOwnerBootstrapOutput. Named type imports: AttendedCloudflareBootstrapRequest, CloudflareBootstrapAcceptanceEvidence, CloudflareBootstrapAcceptedNode, CloudflareBootstrapCoordinates, CloudflareBootstrapDependencies, CloudflareBootstrapEvidence, CloudflareBootstrapFinalizeRequest, CloudflareBootstrapNodeCoordinates, CloudflareBootstrapOutput, CloudflareBootstrapPhaseRunner, CloudflareBootstrapPlan, CloudflareBootstrapTokenFiles, CloudflareBootstrapTokens, CloudflareConnectorHandoff, CloudflareHostHandoff, CloudflareMeshCoordinates, CloudflareRealtimeCoordinates. Import only the names used by this file.
349
+ Attended two-token Cloudflare Tunnel/DNS reconciliation and per-node connector/KV runtime handoff for existing KV resources. Named value imports: applyCloudflareBootstrap, cloudflareHostHandoffPath, deriveCloudflareRealtimeSecrets, finalizeCloudflareBootstrapAcceptance, planCloudflareBootstrap, readCloudflareBootstrapAcceptanceEvidence, readCloudflareConnectorHandoff, readCloudflareHostHandoff, runAttendedCloudflareBootstrap, validateCloudflareBootstrapCoordinates, validateCloudflareBootstrapTokens, verifyCloudflareBootstrapAcceptance, writeOwnerBootstrapOutput. Named type imports: AttendedCloudflareBootstrapRequest, CloudflareBootstrapAcceptanceEvidence, CloudflareBootstrapAcceptedNode, CloudflareBootstrapCoordinates, CloudflareBootstrapDependencies, CloudflareBootstrapEvidence, CloudflareBootstrapFinalizeRequest, CloudflareBootstrapNodeCoordinates, CloudflareBootstrapOutput, CloudflareBootstrapPhaseRunner, CloudflareBootstrapPlan, CloudflareBootstrapTokens, CloudflareConnectorHandoff, CloudflareHostHandoff, CloudflareMeshCoordinates, CloudflareRealtimeCoordinates. Import only the names used by this file.
349
350
 
350
351
  ```text
351
- import { applyCloudflareBootstrap, cloudflareHostHandoffPath, finalizeCloudflareBootstrapAcceptance, planCloudflareBootstrap, readCloudflareBootstrapAcceptanceEvidence, readCloudflareBootstrapTokens } from '@forgezero/agent/cloudflare-bootstrap';
352
- import { readCloudflareConnectorHandoff, readCloudflareHostHandoff, readOwnerApiToken, runAttendedCloudflareBootstrap, validateCloudflareBootstrapCoordinates, verifyCloudflareBootstrapAcceptance } from '@forgezero/agent/cloudflare-bootstrap';
352
+ import { applyCloudflareBootstrap, cloudflareHostHandoffPath, deriveCloudflareRealtimeSecrets, finalizeCloudflareBootstrapAcceptance, planCloudflareBootstrap, readCloudflareBootstrapAcceptanceEvidence } from '@forgezero/agent/cloudflare-bootstrap';
353
+ import { readCloudflareConnectorHandoff, readCloudflareHostHandoff, runAttendedCloudflareBootstrap, validateCloudflareBootstrapCoordinates, validateCloudflareBootstrapTokens, verifyCloudflareBootstrapAcceptance } from '@forgezero/agent/cloudflare-bootstrap';
353
354
  import { writeOwnerBootstrapOutput } from '@forgezero/agent/cloudflare-bootstrap';
354
355
  import type { AttendedCloudflareBootstrapRequest, CloudflareBootstrapAcceptanceEvidence, CloudflareBootstrapAcceptedNode, CloudflareBootstrapCoordinates, CloudflareBootstrapDependencies, CloudflareBootstrapEvidence } from '@forgezero/agent/cloudflare-bootstrap';
355
- import type { CloudflareBootstrapFinalizeRequest, CloudflareBootstrapNodeCoordinates, CloudflareBootstrapOutput, CloudflareBootstrapPhaseRunner, CloudflareBootstrapPlan, CloudflareBootstrapTokenFiles } from '@forgezero/agent/cloudflare-bootstrap';
356
- import type { CloudflareBootstrapTokens, CloudflareConnectorHandoff, CloudflareHostHandoff, CloudflareMeshCoordinates, CloudflareRealtimeCoordinates } from '@forgezero/agent/cloudflare-bootstrap';
356
+ import type { CloudflareBootstrapFinalizeRequest, CloudflareBootstrapNodeCoordinates, CloudflareBootstrapOutput, CloudflareBootstrapPhaseRunner, CloudflareBootstrapPlan, CloudflareBootstrapTokens } from '@forgezero/agent/cloudflare-bootstrap';
357
+ import type { CloudflareConnectorHandoff, CloudflareHostHandoff, CloudflareMeshCoordinates, CloudflareRealtimeCoordinates } from '@forgezero/agent/cloudflare-bootstrap';
357
358
  ```
358
359
 
359
360
  <a id="forgezero-agent-cloudflare-edge"></a>
360
361
  ## @forgezero/agent/cloudflare-edge
361
362
 
362
- Strict Cloudflare REST operations used by the attended bootstrap controller. Named value imports: configureCloudflareEdge, configureCloudflareRealtimeSecrets, ensureCloudflareMeshConnector, ensureCloudflarePrivateDatabaseRoute, ensureCloudflarePrivateRoute, ensureCloudflareTunnel, ensureCloudflareWarpDatabaseInclude, ensureCloudflareWarpNetworkIncludes, removeCloudflarePrivateDatabaseRoute, removeCloudflarePrivateRoute, removeCloudflareWarpDatabaseInclude, verifyCloudflareWorkerDurableObjects. Named type imports: CloudflareDurableObjectNamespace, CloudflareEdgeConfig, CloudflareMeshConnector, CloudflarePrivateRoute, CloudflarePrivateRouteConfig, CloudflareTunnel, CloudflareWarpIncludeConfig. Import only the names used by this file.
363
+ Strict Cloudflare REST operations used by the attended bootstrap controller. Named value imports: configureCloudflareEdge, configureCloudflareRealtimeSecrets, discoverCloudflareBootstrapResources, ensureCloudflareMeshConnector, ensureCloudflarePrivateDatabaseRoute, ensureCloudflarePrivateRoute, ensureCloudflareTunnel, ensureCloudflareWarpDatabaseInclude, ensureCloudflareWarpNetworkIncludes, removeCloudflarePrivateDatabaseRoute, removeCloudflarePrivateRoute, removeCloudflareWarpDatabaseInclude, retrieveCloudflareConnectorTokens, verifyCloudflareWorkerDurableObjects. Named type imports: CloudflareBootstrapDiscovery, CloudflareDurableObjectNamespace, CloudflareEdgeConfig, CloudflareMeshConnector, CloudflarePrivateRoute, CloudflarePrivateRouteConfig, CloudflareTunnel, CloudflareWarpIncludeConfig. Import only the names used by this file.
363
364
 
364
365
  ```text
365
- import { configureCloudflareEdge, configureCloudflareRealtimeSecrets, ensureCloudflareMeshConnector, ensureCloudflarePrivateDatabaseRoute, ensureCloudflarePrivateRoute, ensureCloudflareTunnel } from '@forgezero/agent/cloudflare-edge';
366
- import { ensureCloudflareWarpDatabaseInclude, ensureCloudflareWarpNetworkIncludes, removeCloudflarePrivateDatabaseRoute, removeCloudflarePrivateRoute, removeCloudflareWarpDatabaseInclude, verifyCloudflareWorkerDurableObjects } from '@forgezero/agent/cloudflare-edge';
367
- import type { CloudflareDurableObjectNamespace, CloudflareEdgeConfig, CloudflareMeshConnector, CloudflarePrivateRoute, CloudflarePrivateRouteConfig, CloudflareTunnel } from '@forgezero/agent/cloudflare-edge';
368
- import type { CloudflareWarpIncludeConfig } from '@forgezero/agent/cloudflare-edge';
366
+ import { configureCloudflareEdge, configureCloudflareRealtimeSecrets, discoverCloudflareBootstrapResources, ensureCloudflareMeshConnector, ensureCloudflarePrivateDatabaseRoute, ensureCloudflarePrivateRoute } from '@forgezero/agent/cloudflare-edge';
367
+ import { ensureCloudflareTunnel, ensureCloudflareWarpDatabaseInclude, ensureCloudflareWarpNetworkIncludes, removeCloudflarePrivateDatabaseRoute, removeCloudflarePrivateRoute, removeCloudflareWarpDatabaseInclude } from '@forgezero/agent/cloudflare-edge';
368
+ import { retrieveCloudflareConnectorTokens, verifyCloudflareWorkerDurableObjects } from '@forgezero/agent/cloudflare-edge';
369
+ import type { CloudflareBootstrapDiscovery, CloudflareDurableObjectNamespace, CloudflareEdgeConfig, CloudflareMeshConnector, CloudflarePrivateRoute, CloudflarePrivateRouteConfig } from '@forgezero/agent/cloudflare-edge';
370
+ import type { CloudflareTunnel, CloudflareWarpIncludeConfig } from '@forgezero/agent/cloudflare-edge';
369
371
  ```
370
372
 
371
373
  <a id="forgezero-agent-mesh-connector"></a>
@@ -749,7 +749,7 @@ async function postSignedNode(options, path, body) {
749
749
  }
750
750
 
751
751
  // src/version.ts
752
- var VERSION3 = "0.1.57";
752
+ var VERSION3 = "0.1.59";
753
753
 
754
754
  // src/agent-heartbeat.ts
755
755
  var unquote = (value) => value.replace(/^['"]|['"]$/g, "");
@@ -34,14 +34,10 @@ export interface PlatformBootstrapConfig {
34
34
  address?: string;
35
35
  master?: string;
36
36
  coordinators: string[];
37
- /** Owner/root-only file containing the shared 64-hex bootstrap code. */
38
- bootstrapSecretFile: string;
39
37
  };
40
38
  /** Explicit authority source; never inferred from a node number. */
41
39
  enrolment: {
42
40
  source: PlatformEnrolmentSource;
43
- /** Required only for an API-issued post-genesis capability. */
44
- tokenFile?: string;
45
41
  };
46
42
  runtime: {
47
43
  environment: PlatformSharedEnvironment;
@@ -51,10 +47,6 @@ export interface PlatformBootstrapConfig {
51
47
  greenPort: number;
52
48
  healthPath: string;
53
49
  keepReleases: number;
54
- credentialFiles?: {
55
- emailSecret?: string;
56
- backupS3Secret?: string;
57
- };
58
50
  };
59
51
  firewall: {
60
52
  enabled: boolean;
@@ -79,7 +71,6 @@ export interface EnrolledComputeActivationConfig {
79
71
  telemetryEndpoint: string;
80
72
  /** Same Vault-first, same-name systemd fallback contract as platform deploys. */
81
73
  deploymentCredentials?: Record<string, string>;
82
- enrolTokenFile: string;
83
74
  repository?: string;
84
75
  branch?: string;
85
76
  profile?: string;
@@ -100,6 +91,24 @@ export interface EnrolledComputeActivationConfig {
100
91
  };
101
92
  }
102
93
  export type BootstrapConfig = PlatformBootstrapConfig | EnrolledComputeActivationConfig;
94
+ /** Ephemeral values accepted only from hidden input and sealed on the target. */
95
+ export interface PlatformBootstrapSecrets {
96
+ clusterBootstrapCode: string;
97
+ emailSecret: string;
98
+ /** Required only for an API-issued post-genesis capability. */
99
+ enrolmentToken?: string;
100
+ backupS3Secret?: string;
101
+ cloudflareTunnelToken?: string;
102
+ cloudflareApiToken?: string;
103
+ }
104
+ export interface EnrolledComputeBootstrapSecrets {
105
+ enrolmentToken: string;
106
+ cloudflareTunnelToken?: string;
107
+ cloudflareApiToken?: string;
108
+ }
109
+ export type BootstrapSecrets = PlatformBootstrapSecrets | EnrolledComputeBootstrapSecrets;
110
+ export declare function validateEnrolledComputeBootstrapSecrets(config: EnrolledComputeActivationConfig, input: unknown): EnrolledComputeBootstrapSecrets;
111
+ export declare function validatePlatformBootstrapSecrets(config: PlatformBootstrapConfig, input: unknown): PlatformBootstrapSecrets;
103
112
  export interface BootstrapStep {
104
113
  id: string;
105
114
  label: string;
@@ -167,7 +176,7 @@ export interface BootstrapHost {
167
176
  }): Promise<SoftwareCommandResult>;
168
177
  sleep?(milliseconds: number): Promise<void>;
169
178
  ensureSoftware(requirements: readonly SoftwareRequirement[]): Promise<unknown>;
170
- installAgent(config: BootstrapConfig, enrolTokenSourcePath?: string): Promise<ProvisionPlan>;
179
+ installAgent(config: BootstrapConfig): Promise<ProvisionPlan>;
171
180
  }
172
181
  export declare const BOOTSTRAP_STATE_PATH = "/var/lib/forgezero/bootstrap.json";
173
182
  export declare function validateBootstrapConfig(value: BootstrapConfig): BootstrapConfig;
@@ -182,6 +191,8 @@ export declare function bootstrapIdentityDigest(config: BootstrapConfig): string
182
191
  */
183
192
  export declare function preparePlatformBootstrap(input: PlatformBootstrapConfig, host?: BootstrapHost): Promise<PlatformBootstrapPreparation>;
184
193
  export declare function bootstrapStatus(host?: BootstrapHost): Promise<BootstrapStatus>;
185
- export declare function applyBootstrap(input: BootstrapConfig, host?: BootstrapHost): Promise<BootstrapResult>;
194
+ export declare function applyBootstrap(input: BootstrapConfig, host?: BootstrapHost, secrets?: BootstrapSecrets, dependencies?: {
195
+ fetcher?: typeof fetch;
196
+ }): Promise<BootstrapResult>;
186
197
  export declare function readBootstrapConfig(path: string): BootstrapConfig;
187
198
  export declare function localBootstrapHost(): BootstrapHost;