@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.
Files changed (64) hide show
  1. package/README.md +299 -86
  2. package/dist/agent-heartbeat.js +6 -3
  3. package/dist/agent-update-helper.js +5 -2
  4. package/dist/agent-update.js +5 -2
  5. package/dist/bootstrap.d.ts +17 -8
  6. package/dist/bootstrap.js +1509 -512
  7. package/dist/cli/agent-install.d.ts +6 -5
  8. package/dist/cli/cloudflare-bootstrap.d.ts +12 -1
  9. package/dist/cli/maintenance.d.ts +23 -0
  10. package/dist/cli/run.d.ts +3 -1
  11. package/dist/cli/session-store.d.ts +5 -0
  12. package/dist/cloudflare-bootstrap.d.ts +73 -35
  13. package/dist/cloudflare-bootstrap.js +587 -90
  14. package/dist/cloudflare-edge.d.ts +64 -12
  15. package/dist/cloudflare-edge.js +103 -8
  16. package/dist/community-rehearsal-host.d.ts +51 -0
  17. package/dist/community-rehearsal-host.js +272 -0
  18. package/dist/credential-schema.d.ts +54 -0
  19. package/dist/credential-schema.js +47 -0
  20. package/dist/definition.d.ts +31 -5
  21. package/dist/definition.js +271 -44
  22. package/dist/deploy-file.js +294 -68
  23. package/dist/deployment-runner.js +18 -5
  24. package/dist/deployment.d.ts +13 -1
  25. package/dist/fz-agent.js +3932 -582
  26. package/dist/fz-git-ssh.js +122 -0
  27. package/dist/fz.js +3636 -1263
  28. package/dist/git-ssh.d.ts +5 -0
  29. package/dist/guest-enrolment.d.ts +2 -0
  30. package/dist/guest-enrolment.js +1 -0
  31. package/dist/host-maintenance.d.ts +39 -0
  32. package/dist/host-maintenance.js +135 -0
  33. package/dist/index.d.ts +4 -2
  34. package/dist/mesh-connector.d.ts +16 -0
  35. package/dist/mesh-connector.js +46 -0
  36. package/dist/metal-bootstrap.js +150 -7
  37. package/dist/metal-helper-socket.js +61 -31
  38. package/dist/metal-provision.d.ts +2 -2
  39. package/dist/metal-provision.js +62 -32
  40. package/dist/operator-bootstrap.d.ts +90 -0
  41. package/dist/operator-bootstrap.js +5709 -0
  42. package/dist/otel-collector.d.ts +18 -0
  43. package/dist/pipeline.d.ts +3 -2
  44. package/dist/pipeline.js +1 -1
  45. package/dist/platform-bootstrap-runtime.d.ts +39 -21
  46. package/dist/platform-bootstrap-runtime.js +182 -59
  47. package/dist/platform-fleet-verification.d.ts +19 -0
  48. package/dist/platform-fleet-verification.js +3873 -0
  49. package/dist/platform-genesis-config.d.ts +7 -0
  50. package/dist/platform-genesis.d.ts +17 -0
  51. package/dist/provision.d.ts +76 -3
  52. package/dist/provision.js +1061 -229
  53. package/dist/recovery-host.d.ts +7 -0
  54. package/dist/recovery-host.js +124 -0
  55. package/dist/service-supervisor.d.ts +42 -0
  56. package/dist/software-helper.d.ts +4 -0
  57. package/dist/software-helper.js +865 -63
  58. package/dist/software.d.ts +14 -3
  59. package/dist/software.js +163 -37
  60. package/dist/ssh-bootstrap.d.ts +97 -0
  61. package/dist/supervised-app.d.ts +2 -0
  62. package/dist/version.d.ts +1 -1
  63. package/package.json +175 -164
  64. package/schema/{deploy-v2.json → deploy-v3.json} +53 -6
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  GENERATED FILE — do not edit.
3
3
 
4
- Change scripts/generate-guides.ts or its typed sources, run `bun run guides`,
4
+ Change tools/generate-guides.ts or its typed sources, run `bun run guides`,
5
5
  and commit the generator and rendered files together.
6
6
  -->
7
7
 
@@ -9,309 +9,522 @@
9
9
 
10
10
  The node agent deploys on a compute; tenant mode also holds one complete project across environments in RAM and serves it over a group-scoped unix socket, while platform mode never duplicates the API vault.
11
11
 
12
- ## Global package root and supported runtimes
12
+ ## Package overview
13
13
 
14
- Every managed compute. It owns node identity, attestation and repository pipelines. Tenant mode additionally holds one whole project across its environments in RAM and answers over a unix socket; platform mode never replicates the API vault beside the process that already holds every unlocked realm seed. Supported runtimes: bun, node. The global base/root import is @forgezero/agent. Every public import or command is listed below; the documentation inventory is checked in both directions against package.json exports.
14
+ Every managed compute. It owns node identity, attestation and repository pipelines. Tenant mode additionally holds one whole project across its environments in RAM and answers over a unix socket; platform mode never replicates the API vault beside the process that already holds every unlocked realm seed. Supported runtimes: bun, node. Package root: @forgezero/agent. The sections below show the actual named imports emitted by each declaration entry point; wildcard imports are intentionally not used in the documentation.
15
15
 
16
16
  ```text
17
- import * as root from '@forgezero/agent';
17
+ bun add -g @forgezero/agent
18
18
  ```
19
19
 
20
+ ## ForgeZero package family
21
+
22
+ The five packages are installation boundaries. Choose a package by who installs it; choose a subpath by the capability used in that file.
23
+
24
+ | package | short description | runtimes | documentation |
25
+ |---|---|---|---|
26
+ | @forgezero/vault | Scoped secret access with Agent, API-key and systemd-credential sources. | bun, node, workers, deno | [Open](https://www.forgezero.net/docs/vault-package) |
27
+ | @forgezero/access | Typed route, principal, factor, RBAC and request-pipeline contracts. | bun, node, workers, deno | [Open](https://www.forgezero.net/docs/access) |
28
+ | @forgezero/providers | Typed external providers with priority, health and classified fallback. | bun, node, workers, deno | [Open](https://www.forgezero.net/docs/providers) |
29
+ | @forgezero/runtime | Portable runtime primitives for queries, jobs, events, schemas and finance. | bun, node | [Open](https://www.forgezero.net/docs/runtime) |
30
+ | @forgezero/agent | Operator CLI and managed-node agent for bootstrap, deploy and lifecycle. | bun, node | [Open](https://www.forgezero.net/docs/agent) |
31
+
32
+ ## @forgezero/agent public imports and commands
33
+
34
+ Every row links to the detailed explanation and named-import/example area below. This table and those details are generated from the package inventory and emitted declarations.
35
+
36
+ | public entry | short description | runtime | details |
37
+ |---|---|---|---|
38
+ | fz | The operator command: keys, status, genesis, unlock, run, and agent install. | Bun/Node host | [Details + example](#fz) |
39
+ | fz run | The fallback for software that cannot read the local socket: start a process with scoped vault values in its environment. | Bun/Node host | [Details + example](#fz-run) |
40
+ | fz agent install | Provision the same hardened agent service locally that the platform provisions remotely. | Bun/Node host | [Details + example](#fz-agent-install) |
41
+ | fz-agent | The service entry point. Identity and private Git material arrive only as systemd credentials. A platform bootstrap may use a statically configured local control socket; an enrolled tenant guest instead builds each deployment manager from the signed server claim and reads all commands from the checked-out .fz definition. Tenant cache scope and live attestation still need to be constructed from enrolment. | Bun/Node host | [Details + example](#fz-agent) |
42
+ | fz-agent (socket) | identity, sign, attest, get, sync and held — the whole interface an application sees. | Bun/Node host | [Details + example](#fz-agent-socket) |
43
+ | @forgezero/agent/migration-pull | PQ-authenticated outbound lifecycle claims with fenced renewal, awaited async execution, idempotent acknowledgement and bounded shutdown drain. The executor reports local facts only. | Bun/Node host | [Details + example](#forgezero-agent-migration-pull) |
44
+ | @forgezero/agent/lifecycle-helper | The root-owned fixed-operation boundary for migration work. Signed controller claims can request only private reachability probes, local health checks, or stops of units named in a root-owned profile; they cannot carry commands. | Bun/Node host | [Details + example](#forgezero-agent-lifecycle-helper) |
45
+ | @forgezero/agent/provision | The install plan as data, with no transport — so `fz` running locally and the platform running over SSH provision an identical machine. | Bun/Node host | [Details + example](#forgezero-agent-provision) |
46
+ | @forgezero/agent/subscribe | Realtime scope sync over a WebSocket, with the poll kept underneath it: the poll is what establishes freshness, and a change it finds that the socket never sent is proof the socket is lying. | Bun/Node host | [Details + example](#forgezero-agent-subscribe) |
47
+ | @forgezero/agent/ssh-listen | The socket SSH_AUTH_SOCK points at. The protocol handler had nowhere to speak — an agent protocol with no socket is a parser. The containing directory is 0700 before anything binds, because the socket’s own mode is only corrected after it already exists. | Bun/Node host | [Details + example](#forgezero-agent-ssh-listen) |
48
+ | @forgezero/agent/ssh-server | Serve the SSH agent protocol so SSH_AUTH_SOCK points at the vault — two operations implemented, and ADD_IDENTITY refused so no process can inject a key ssh would offer to every host. | Bun/Node host | [Details + example](#forgezero-agent-ssh-server) |
49
+ | @forgezero/agent/pipeline | CI/CD on the compute: secrets reach the step that named them and nothing else, attestation gates the run, and a required attestation that fails is a refusal rather than a downgrade. | Bun/Node host | [Details + example](#forgezero-agent-pipeline) |
50
+ | @forgezero/agent/agent-heartbeat | Signed node health publication with bounded renewal and shutdown withdrawal. | Bun/Node host | [Details + example](#forgezero-agent-agent-heartbeat) |
51
+ | @forgezero/agent/agent-update | Verified Agent update planning against the platform release coordinate. | Bun/Node host | [Details + example](#forgezero-agent-agent-update) |
52
+ | @forgezero/agent/agent-update-helper | Root-owned fixed update operations with registry origin and integrity validation. | Bun/Node host | [Details + example](#forgezero-agent-agent-update-helper) |
53
+ | @forgezero/agent/bootstrap | Typed one-time platform bootstrap and internal API-driven enrolled-compute activation contracts. | Bun/Node host | [Details + example](#forgezero-agent-bootstrap) |
54
+ | @forgezero/agent/operator-bootstrap | Pinned-host operator transport that stages owner-only handoffs and invokes the same typed platform bootstrap through the caller-approved SSH agent. | Bun/Node host | [Details + example](#forgezero-agent-operator-bootstrap) |
55
+ | @forgezero/agent/host-maintenance | Closed host maintenance plans for staging transaction rehearsal and fleet-fenced schema consolidation through fixed transient systemd units. | Bun/Node host | [Details + example](#forgezero-agent-host-maintenance) |
56
+ | @forgezero/agent/capacity-calibration | One-time target-local safe-concurrency calibration with private evidence. | Bun/Node host | [Details + example](#forgezero-agent-capacity-calibration) |
57
+ | @forgezero/agent/cloudflare-bootstrap | Attended two-token Cloudflare Tunnel/DNS reconciliation and per-node connector/KV runtime handoff for existing KV resources. | Bun/Node host | [Details + example](#forgezero-agent-cloudflare-bootstrap) |
58
+ | @forgezero/agent/cloudflare-edge | Strict Cloudflare REST operations used by the attended bootstrap controller. | Bun/Node host | [Details + example](#forgezero-agent-cloudflare-edge) |
59
+ | @forgezero/agent/mesh-connector | Fixed Cloudflare Mesh/WARP connector enrollment using only the unit-loaded connector credential. | Bun/Node host | [Details + example](#forgezero-agent-mesh-connector) |
60
+ | @forgezero/agent/compute | Compute claim, renewal, execution and completion client contracts. | Bun/Node host | [Details + example](#forgezero-agent-compute) |
61
+ | @forgezero/agent/credential-schema | Canonical systemd credential names and validation shared by bootstrap and services. | Bun/Node host | [Details + example](#forgezero-agent-credential-schema) |
62
+ | @forgezero/agent/definition | Validated project deployment definition and workload profiles. | Bun/Node host | [Details + example](#forgezero-agent-definition) |
63
+ | @forgezero/agent/deploy-file | Read and validate a checked-out .fz deployment file without executing project input. | Bun/Node host | [Details + example](#forgezero-agent-deploy-file) |
64
+ | @forgezero/agent/metal-bootstrap | Physical-metal bootstrap planning, application and status evidence. | Bun/Node host | [Details + example](#forgezero-agent-metal-bootstrap) |
65
+ | @forgezero/agent/metal-provision | Validated confidential guest provisioning profiles and cloud-init rendering. | Bun/Node host | [Details + example](#forgezero-agent-metal-provision) |
66
+ | @forgezero/agent/platform-bootstrap-runtime | Pure platform bootstrap validation, render and resumable phase-state contracts. | Bun/Node host | [Details + example](#forgezero-agent-platform-bootstrap-runtime) |
67
+ | @forgezero/agent/project-context | Project identity and repository context validation for operator and managed runs. | Bun/Node host | [Details + example](#forgezero-agent-project-context) |
68
+ | @forgezero/agent/provisioning-pull | Signed provisioning work claim, renewal, execution and acknowledgement. | Bun/Node host | [Details + example](#forgezero-agent-provisioning-pull) |
69
+ | @forgezero/agent/schema/deploy-v3.json | Published JSON Schema for deployment definition version 3 with exact argv execution. | Bun/Node host | [Details + example](#forgezero-agent-schema-deploy-v3-json) |
70
+ | @forgezero/agent/software | Exact managed-software inventory, requirement and evidence contracts. | Bun/Node host | [Details + example](#forgezero-agent-software) |
71
+ | @forgezero/agent/software-helper | Root-owned fixed installation/update boundary for declared software. | Bun/Node host | [Details + example](#forgezero-agent-software-helper) |
72
+ | @forgezero/agent/ubuntu | Ubuntu host validation and deterministic systemd/unit rendering helpers. | Bun/Node host | [Details + example](#forgezero-agent-ubuntu) |
73
+ | fz-agent (replica) | The project-scoped vault replica: resident in RAM, never on disk, invalidated by cursor rather than by timer, and refusing a read it can no longer vouch for. | Bun/Node host | [Details + example](#fz-agent-replica) |
74
+
20
75
  ## Commands
21
76
 
22
77
  bun add -g @forgezero/agent — Install the version-matched fz operator CLI and fz-agent daemon.
78
+ fz bootstrap platform remote prepare --bootstrap-config /secure/forgezero/development/dev-fz-n1-remote.json — Dry-plan one pinned operator-to-guest bootstrap; add --apply only after review.
23
79
  fz bootstrap platform --help — Inspect attended platform bootstrap inputs before applying them.
24
- fz bootstrap tenant --help — Inspect tenant enrolment/bootstrap inputs.
80
+ fz bootstrap metal --help — Inspect the identity-only physical provisioner bootstrap.
81
+ fz host transactions|schema-plan|schema-apply — Plan fixed supervised database maintenance; add --apply only after reviewing the exact argv and credential names.
25
82
  fz status — Read installed service and bootstrap evidence.
26
83
 
27
84
  ```text
28
85
  bun add -g @forgezero/agent
86
+ fz bootstrap platform remote prepare --bootstrap-config /secure/forgezero/development/dev-fz-n1-remote.json
29
87
  fz bootstrap platform --help
30
- fz bootstrap tenant --help
88
+ fz bootstrap metal --help
89
+ fz host transactions|schema-plan|schema-apply
31
90
  fz status
32
91
  ```
33
92
 
93
+ <a id="fz"></a>
34
94
  ## fz
35
95
 
36
- The operator command: keys, status, genesis, unlock, run, and agent install. This entry requires a Bun/Node host runtime.
96
+ The operator command: keys, status, genesis, unlock, run, and agent install. This entry requires a Bun/Node host runtime. Run the command with `--help` before applying it.
37
97
 
38
98
  ```text
39
99
  fz --help
40
100
  ```
41
101
 
102
+ ## fz — Keep project truth synchronized
103
+
104
+ One versioned ForgeZero manifest generates thin AI-tool adapters and CI rejects drift.
105
+
106
+ ```text
107
+ fz project init
108
+ fz project sync
109
+ fz project check
110
+ ```
111
+
112
+ <a id="fz-run"></a>
42
113
  ## fz run
43
114
 
44
- The fallback for software that cannot read the local socket: start a process with scoped vault values in its environment. This entry requires a Bun/Node host runtime.
115
+ The fallback for software that cannot read the local socket: start a process with scoped vault values in its environment. This entry requires a Bun/Node host runtime. Run the command with `--help` before applying it.
45
116
 
46
117
  ```text
47
118
  fz run --help
48
119
  ```
49
120
 
121
+ <a id="fz-agent-install"></a>
50
122
  ## fz agent install
51
123
 
52
- Provision the same hardened agent service locally that the platform provisions remotely. This entry requires a Bun/Node host runtime.
124
+ Provision the same hardened agent service locally that the platform provisions remotely. This entry requires a Bun/Node host runtime. Run the command with `--help` before applying it.
53
125
 
54
126
  ```text
55
127
  fz agent install --help
56
128
  ```
57
129
 
130
+ <a id="fz-agent"></a>
58
131
  ## fz-agent
59
132
 
60
- The service entry point. Identity and private Git material arrive only as systemd credentials. A platform bootstrap may use a statically configured local control socket; an enrolled tenant guest instead builds each deployment manager from the signed server claim and reads all commands from the checked-out .fz definition. Tenant cache scope and live attestation still need to be constructed from enrolment. This entry requires a Bun/Node host runtime.
133
+ The service entry point. Identity and private Git material arrive only as systemd credentials. A platform bootstrap may use a statically configured local control socket; an enrolled tenant guest instead builds each deployment manager from the signed server claim and reads all commands from the checked-out .fz definition. Tenant cache scope and live attestation still need to be constructed from enrolment. This entry requires a Bun/Node host runtime. Run the command with `--help` before applying it.
61
134
 
62
135
  ```text
63
136
  fz-agent --help
64
137
  ```
65
138
 
139
+ <a id="fz-agent-socket"></a>
66
140
  ## fz-agent (socket)
67
141
 
68
- identity, sign, attest, get, sync and held — the whole interface an application sees. This entry requires a Bun/Node host runtime.
142
+ identity, sign, attest, get, sync and held — the whole interface an application sees. This entry requires a Bun/Node host runtime. Run the command with `--help` before applying it.
69
143
 
70
144
  ```text
71
145
  fz-agent (socket) --help
72
146
  ```
73
147
 
148
+ ## fz-agent (socket) — Outbound control boundary
149
+
150
+ The Metal Agent initiates outbound signed HTTPS for orchestration. Applications use the project-scoped local Unix socket; the platform never opens an inbound shell control plane.
151
+
152
+ ```text
153
+ metal/compute Agent -> outbound signed HTTPS -> platform API
154
+ application -> local Unix socket -> project-scoped Vault replica
155
+ ```
156
+
157
+ <a id="forgezero-agent-migration-pull"></a>
74
158
  ## @forgezero/agent/migration-pull
75
159
 
76
- PQ-authenticated outbound lifecycle claims with fenced renewal, awaited async execution, idempotent acknowledgement and bounded shutdown drain. The executor reports local facts only.
160
+ PQ-authenticated outbound lifecycle claims with fenced renewal, awaited async execution, idempotent acknowledgement and bounded shutdown drain. The executor reports local facts only. Named value imports: pullMigrationOnce, startMigrationPull. Named type imports: MigrationAction, MigrationEvidence, MigrationEvidenceProfile, MigrationNetwork, MigrationPullOptions, MigrationPullResult, RemoteMigrationClaim. Import only the names used by this file.
77
161
 
78
162
  ```text
79
- import * as api from '@forgezero/agent/migration-pull';
163
+ import { pullMigrationOnce, startMigrationPull } from '@forgezero/agent/migration-pull';
164
+ import type { MigrationAction, MigrationEvidence, MigrationEvidenceProfile, MigrationNetwork, MigrationPullOptions, MigrationPullResult } from '@forgezero/agent/migration-pull';
165
+ import type { RemoteMigrationClaim } from '@forgezero/agent/migration-pull';
80
166
  ```
81
167
 
168
+ <a id="forgezero-agent-lifecycle-helper"></a>
82
169
  ## @forgezero/agent/lifecycle-helper
83
170
 
84
- The root-owned fixed-operation boundary for migration work. Signed controller claims can request only private reachability probes, local health checks, or stops of units named in a root-owned profile; they cannot carry commands.
171
+ The root-owned fixed-operation boundary for migration work. Signed controller claims can request only private reachability probes, local health checks, or stops of units named in a root-owned profile; they cannot carry commands. Named value imports: DEFAULT_LIFECYCLE_HELPER_SOCKET, executeLifecycleAction, loadLifecycleProfile, requestLifecycleAction, spawnLifecycleCommand, startLifecycleHelper, validateLifecycleProfile. Named type imports: LifecycleCommandResult, LifecycleExec, LifecycleProfile. Import only the names used by this file.
85
172
 
86
173
  ```text
87
- import * as api from '@forgezero/agent/lifecycle-helper';
174
+ import { DEFAULT_LIFECYCLE_HELPER_SOCKET, executeLifecycleAction, loadLifecycleProfile, requestLifecycleAction, spawnLifecycleCommand, startLifecycleHelper } from '@forgezero/agent/lifecycle-helper';
175
+ import { validateLifecycleProfile } from '@forgezero/agent/lifecycle-helper';
176
+ import type { LifecycleCommandResult, LifecycleExec, LifecycleProfile } from '@forgezero/agent/lifecycle-helper';
88
177
  ```
89
178
 
179
+ <a id="forgezero-agent-provision"></a>
90
180
  ## @forgezero/agent/provision
91
181
 
92
- The install plan as data, with no transport — so `fz` running locally and the platform running over SSH provision an identical machine.
182
+ The install plan as data, with no transport — so `fz` running locally and the platform running over SSH provision an identical machine. Named value imports: AGENT_EGRESS_UNIT_PATH, AGENT_SOCKET_PROXY_UNIT_PATH, AGENT_SOCKET_UNIT_PATH, APPLICATION_RUNTIME_USER, CAPABILITY_CHECKS, DEFAULT_RUNNER_PUBLIC_TCP_PORTS, DEPLOYMENT_GROUP, DEPLOYMENT_RUNNER_SOCKET, DEPLOYMENT_RUNNER_UNIT_PATH, DEPLOYMENT_RUNNER_USER, ENROLMENT_UNIT_PATH, LIFECYCLE_GROUP, LIFECYCLE_HELPER_SOCKET, LIFECYCLE_HELPER_UNIT_PATH, UNIT_PATH, VAULT_GROUP, WARP_CONFIG_UNIT_PATH, WARP_SERVICE_DROP_IN_PATH, agentBackendSocketPath, agentEgressUnit, agentEnrolmentUnit, agentSocketProxyUnit, agentSocketUnit, agentUnit, agentUpdateHelperUnit, atLeast, deploymentRunnerUnit, lifecycleHelperUnit, modeFor, planProvision, reasonFor, softwareHelperUnit, warpConfigUnit, warpServiceDropIn. Named type imports: AgentMode, Capabilities, CapabilityId, CapabilityOperation, Check, DirectorySpec, FixedHostCommand, ProvisionOperation, ProvisionPlan, Step, UnitOptions. Import only the names used by this file.
93
183
 
94
184
  ```text
95
- import * as api from '@forgezero/agent/provision';
185
+ import { AGENT_EGRESS_UNIT_PATH, AGENT_SOCKET_PROXY_UNIT_PATH, AGENT_SOCKET_UNIT_PATH, APPLICATION_RUNTIME_USER, CAPABILITY_CHECKS, DEFAULT_RUNNER_PUBLIC_TCP_PORTS } from '@forgezero/agent/provision';
186
+ import { DEPLOYMENT_GROUP, DEPLOYMENT_RUNNER_SOCKET, DEPLOYMENT_RUNNER_UNIT_PATH, DEPLOYMENT_RUNNER_USER, ENROLMENT_UNIT_PATH, LIFECYCLE_GROUP } from '@forgezero/agent/provision';
187
+ import { LIFECYCLE_HELPER_SOCKET, LIFECYCLE_HELPER_UNIT_PATH, UNIT_PATH, VAULT_GROUP, WARP_CONFIG_UNIT_PATH, WARP_SERVICE_DROP_IN_PATH } from '@forgezero/agent/provision';
188
+ import { agentBackendSocketPath, agentEgressUnit, agentEnrolmentUnit, agentSocketProxyUnit, agentSocketUnit, agentUnit } from '@forgezero/agent/provision';
189
+ import { agentUpdateHelperUnit, atLeast, deploymentRunnerUnit, lifecycleHelperUnit, modeFor, planProvision } from '@forgezero/agent/provision';
190
+ import { reasonFor, softwareHelperUnit, warpConfigUnit, warpServiceDropIn } from '@forgezero/agent/provision';
191
+ import type { AgentMode, Capabilities, CapabilityId, CapabilityOperation, Check, DirectorySpec } from '@forgezero/agent/provision';
192
+ import type { FixedHostCommand, ProvisionOperation, ProvisionPlan, Step, UnitOptions } from '@forgezero/agent/provision';
96
193
  ```
97
194
 
195
+ <a id="forgezero-agent-subscribe"></a>
98
196
  ## @forgezero/agent/subscribe
99
197
 
100
- Realtime scope sync over a WebSocket, with the poll kept underneath it: the poll is what establishes freshness, and a change it finds that the socket never sent is proof the socket is lying.
198
+ Realtime scope sync over a WebSocket, with the poll kept underneath it: the poll is what establishes freshness, and a change it finds that the socket never sent is proof the socket is lying. Named value imports: backoffMs, subscribe. Named type imports: ChangeFrame, SocketLike, SubscribeOptions, Subscriber. Import only the names used by this file.
101
199
 
102
200
  ```text
103
- import * as api from '@forgezero/agent/subscribe';
201
+ import { backoffMs, subscribe } from '@forgezero/agent/subscribe';
202
+ import type { ChangeFrame, SocketLike, SubscribeOptions, Subscriber } from '@forgezero/agent/subscribe';
104
203
  ```
105
204
 
205
+ <a id="forgezero-agent-ssh-listen"></a>
106
206
  ## @forgezero/agent/ssh-listen
107
207
 
108
- The socket SSH_AUTH_SOCK points at. The protocol handler had nowhere to speak — an agent protocol with no socket is a parser. The containing directory is 0700 before anything binds, because the socket’s own mode is only corrected after it already exists.
208
+ The socket SSH_AUTH_SOCK points at. The protocol handler had nowhere to speak — an agent protocol with no socket is a parser. The containing directory is 0700 before anything binds, because the socket’s own mode is only corrected after it already exists. Named value imports: MAX_MESSAGE_BYTES, startSshAgent. Named type imports: SshListenOptions. Import only the names used by this file.
109
209
 
110
210
  ```text
111
- import * as api from '@forgezero/agent/ssh-listen';
211
+ import { MAX_MESSAGE_BYTES, startSshAgent } from '@forgezero/agent/ssh-listen';
212
+ import type { SshListenOptions } from '@forgezero/agent/ssh-listen';
112
213
  ```
113
214
 
215
+ <a id="forgezero-agent-ssh-server"></a>
114
216
  ## @forgezero/agent/ssh-server
115
217
 
116
- Serve the SSH agent protocol so SSH_AUTH_SOCK points at the vault — two operations implemented, and ADD_IDENTITY refused so no process can inject a key ssh would offer to every host.
218
+ Serve the SSH agent protocol so SSH_AUTH_SOCK points at the vault — two operations implemented, and ADD_IDENTITY refused so no process can inject a key ssh would offer to every host. Named value imports: MAX_MESSAGE_BYTES, SSH_AGENT_FAILURE, SSH_AGENT_IDENTITIES_ANSWER, SSH_AGENT_SIGN_RESPONSE, SSH_AGENT_SUCCESS, SshAgentError, describeIdentities, frame, handleMessage, readMessage. Named type imports: AgentBackend, AgentIdentity. Import only the names used by this file.
117
219
 
118
220
  ```text
119
- import * as api from '@forgezero/agent/ssh-server';
221
+ import { MAX_MESSAGE_BYTES, SSH_AGENT_FAILURE, SSH_AGENT_IDENTITIES_ANSWER, SSH_AGENT_SIGN_RESPONSE, SSH_AGENT_SUCCESS, SshAgentError } from '@forgezero/agent/ssh-server';
222
+ import { describeIdentities, frame, handleMessage, readMessage } from '@forgezero/agent/ssh-server';
223
+ import type { AgentBackend, AgentIdentity } from '@forgezero/agent/ssh-server';
120
224
  ```
121
225
 
226
+ <a id="forgezero-agent-pipeline"></a>
122
227
  ## @forgezero/agent/pipeline
123
228
 
124
- CI/CD on the compute: secrets reach the step that named them and nothing else, attestation gates the run, and a required attestation that fails is a refusal rather than a downgrade.
229
+ CI/CD on the compute: secrets reach the step that named them and nothing else, attestation gates the run, and a required attestation that fails is a refusal rather than a downgrade. Named value imports: PipelineError, redact, runPipeline. Named type imports: Pipeline, PipelineStep, RunOptions, RunResult, StepOutcome, StepResult. Import only the names used by this file.
125
230
 
126
231
  ```text
127
- import * as api from '@forgezero/agent/pipeline';
232
+ import { PipelineError, redact, runPipeline } from '@forgezero/agent/pipeline';
233
+ import type { Pipeline, PipelineStep, RunOptions, RunResult, StepOutcome, StepResult } from '@forgezero/agent/pipeline';
128
234
  ```
129
235
 
236
+ <a id="forgezero-agent-agent-heartbeat"></a>
130
237
  ## @forgezero/agent/agent-heartbeat
131
238
 
132
- Signed node health publication with bounded renewal and shutdown withdrawal.
239
+ Signed node health publication with bounded renewal and shutdown withdrawal. Named value imports: heartbeatAgentOnce, observeAgentHost, startAgentHeartbeat. Named type imports: AgentHeartbeatOptions, AgentHeartbeatResponse, AgentObservation. Import only the names used by this file.
133
240
 
134
241
  ```text
135
- import * as api from '@forgezero/agent/agent-heartbeat';
242
+ import { heartbeatAgentOnce, observeAgentHost, startAgentHeartbeat } from '@forgezero/agent/agent-heartbeat';
243
+ import type { AgentHeartbeatOptions, AgentHeartbeatResponse, AgentObservation } from '@forgezero/agent/agent-heartbeat';
136
244
  ```
137
245
 
246
+ <a id="forgezero-agent-agent-update"></a>
138
247
  ## @forgezero/agent/agent-update
139
248
 
140
- Verified Agent update planning against the platform release coordinate.
249
+ Verified Agent update planning against the platform release coordinate. Named value imports: DEFAULT_AGENT_RELEASE_ROOT, DEFAULT_AGENT_UPDATE_SOCKET, MAX_AGENT_TARBALL_BYTES, compareVersions, restoreAgentRelease, selectAgentRelease, stageAgentRelease, validateAgentRelease. Named type imports: AgentRelease, StagedAgentRelease, UpdateCommand, UpdateCommandResult. Import only the names used by this file.
141
250
 
142
251
  ```text
143
- import * as api from '@forgezero/agent/agent-update';
252
+ import { DEFAULT_AGENT_RELEASE_ROOT, DEFAULT_AGENT_UPDATE_SOCKET, MAX_AGENT_TARBALL_BYTES, compareVersions, restoreAgentRelease, selectAgentRelease } from '@forgezero/agent/agent-update';
253
+ import { stageAgentRelease, validateAgentRelease } from '@forgezero/agent/agent-update';
254
+ import type { AgentRelease, StagedAgentRelease, UpdateCommand, UpdateCommandResult } from '@forgezero/agent/agent-update';
144
255
  ```
145
256
 
257
+ <a id="forgezero-agent-agent-update-helper"></a>
146
258
  ## @forgezero/agent/agent-update-helper
147
259
 
148
- Root-owned fixed update operations with registry origin and integrity validation.
260
+ Root-owned fixed update operations with registry origin and integrity validation. Named value imports: AGENT_UPDATE_GROUP, AGENT_UPDATE_HELPER_UNIT_PATH, AGENT_UPDATE_JOURNAL, AGENT_UPDATE_RECEIPT, activateAgentRelease, probeAgentSocket, readAgentUpdateReceipt, recoverInterruptedAgentUpdate, requestAgentUpdate, startAgentUpdateHelper. Named type imports: AgentUpdateOutcome, AgentUpdateReceipt, AgentUpdateRequest, AgentUpdateResponse. Import only the names used by this file.
149
261
 
150
262
  ```text
151
- import * as api from '@forgezero/agent/agent-update-helper';
263
+ import { AGENT_UPDATE_GROUP, AGENT_UPDATE_HELPER_UNIT_PATH, AGENT_UPDATE_JOURNAL, AGENT_UPDATE_RECEIPT, activateAgentRelease, probeAgentSocket } from '@forgezero/agent/agent-update-helper';
264
+ import { readAgentUpdateReceipt, recoverInterruptedAgentUpdate, requestAgentUpdate, startAgentUpdateHelper } from '@forgezero/agent/agent-update-helper';
265
+ import type { AgentUpdateOutcome, AgentUpdateReceipt, AgentUpdateRequest, AgentUpdateResponse } from '@forgezero/agent/agent-update-helper';
152
266
  ```
153
267
 
268
+ <a id="forgezero-agent-bootstrap"></a>
154
269
  ## @forgezero/agent/bootstrap
155
270
 
156
- Typed platform and tenant bootstrap planning, application and status contracts.
271
+ 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.
272
+
273
+ ```text
274
+ import { BOOTSTRAP_STATE_PATH, PLATFORM_BOOTSTRAP_PROFILES, applyBootstrap, bootstrapIdentityDigest, bootstrapStatus, localBootstrapHost } from '@forgezero/agent/bootstrap';
275
+ import { planBootstrap, preparePlatformBootstrap, readBootstrapConfig, resolveInstalledBootstrapKind, validateBootstrapConfig } from '@forgezero/agent/bootstrap';
276
+ import type { BootstrapConfig, BootstrapEnvironment, BootstrapHost, BootstrapPlan, BootstrapResult, BootstrapStatus } from '@forgezero/agent/bootstrap';
277
+ import type { BootstrapStep, DatabaseAgencyParticipation, DatabaseBootstrapRole, EnrolledComputeActivationConfig, InstalledBootstrapKind, PlatformBootstrapConfig } from '@forgezero/agent/bootstrap';
278
+ import type { PlatformBootstrapPreparation, PlatformBootstrapProfile, PlatformEnrolmentSource } from '@forgezero/agent/bootstrap';
279
+ ```
280
+
281
+ <a id="forgezero-agent-operator-bootstrap"></a>
282
+ ## @forgezero/agent/operator-bootstrap
283
+
284
+ Pinned-host operator transport that stages owner-only handoffs and invokes the same typed platform bootstrap through the caller-approved SSH agent. Named value imports: applyOperatorMetalBootstrap, applyOperatorPlatformBootstrap, planOperatorMetalBootstrap, planOperatorPlatformBootstrap, readOperatorMetalBootstrapRequest, readOperatorPlatformBootstrapRequest. Named type imports: OperatorCommand, OperatorCommandResult, OperatorMetalBootstrapMode, OperatorMetalBootstrapPlan, OperatorMetalBootstrapRequest, OperatorPlatformBootstrapMode, OperatorPlatformBootstrapOptions, OperatorPlatformBootstrapPlan, OperatorPlatformBootstrapRequest, OperatorSshHop. Import only the names used by this file.
285
+
286
+ ```text
287
+ import { applyOperatorMetalBootstrap, applyOperatorPlatformBootstrap, planOperatorMetalBootstrap, planOperatorPlatformBootstrap, readOperatorMetalBootstrapRequest, readOperatorPlatformBootstrapRequest } from '@forgezero/agent/operator-bootstrap';
288
+ import type { OperatorCommand, OperatorCommandResult, OperatorMetalBootstrapMode, OperatorMetalBootstrapPlan, OperatorMetalBootstrapRequest, OperatorPlatformBootstrapMode } from '@forgezero/agent/operator-bootstrap';
289
+ import type { OperatorPlatformBootstrapOptions, OperatorPlatformBootstrapPlan, OperatorPlatformBootstrapRequest, OperatorSshHop } from '@forgezero/agent/operator-bootstrap';
290
+ ```
291
+
292
+ ## @forgezero/agent/operator-bootstrap — Run the same typed platform bootstrap from an operator laptop
293
+
294
+ The request contains only an explicit target IP, pinned host public key/fingerprint, the caller public-key file, SSH-agent socket and a path to the reviewed platform config. Credential values stay in owner-only files, the private SSH key stays in the operator agent, and the default command is a non-contacting plan.
295
+
296
+ ```text
297
+ fz bootstrap platform remote prepare \
298
+ --bootstrap-config /secure/forgezero/development/dev-fz-n1-remote.json
299
+ # Review, then allow the SSH-agent approval prompt:
300
+ fz bootstrap platform remote prepare \
301
+ --bootstrap-config /secure/forgezero/development/dev-fz-n1-remote.json --apply
302
+ ```
303
+
304
+ <a id="forgezero-agent-host-maintenance"></a>
305
+ ## @forgezero/agent/host-maintenance
306
+
307
+ Closed host maintenance plans for staging transaction rehearsal and fleet-fenced schema consolidation through fixed transient systemd units. Named value imports: applyHostMaintenance, planHostMaintenance. Named type imports: HostMaintenanceOperation, HostMaintenancePlan, HostMaintenanceRequest, HostMaintenanceResult, HostMaintenanceRuntime. Import only the names used by this file.
157
308
 
158
309
  ```text
159
- import * as api from '@forgezero/agent/bootstrap';
310
+ import { applyHostMaintenance, planHostMaintenance } from '@forgezero/agent/host-maintenance';
311
+ import type { HostMaintenanceOperation, HostMaintenancePlan, HostMaintenanceRequest, HostMaintenanceResult, HostMaintenanceRuntime } from '@forgezero/agent/host-maintenance';
160
312
  ```
161
313
 
314
+ ## @forgezero/agent/host-maintenance — Plan a fixed supervised host operation
315
+
316
+ The library discovers only a trusted blue/green slot, attaches fixed credential names and returns exact argv as reviewable data. The public fz host commands use the same operation and require root only for apply.
317
+
318
+ ```text
319
+ import { planHostMaintenance } from '@forgezero/agent/host-maintenance';
320
+
321
+ const plan = planHostMaintenance({ operation: 'schema-plan' });
322
+ console.log(plan.argv);
323
+ ```
324
+
325
+ <a id="forgezero-agent-capacity-calibration"></a>
162
326
  ## @forgezero/agent/capacity-calibration
163
327
 
164
- One-time target-local safe-concurrency calibration with private evidence.
328
+ One-time target-local safe-concurrency calibration with private evidence. Named value imports: calibrateHttpConcurrency, localCalibrationEndpoint, validateCapacityCalibrationOptions. Named type imports: CapacityCalibration, CapacityCalibrationOptions, CapacityStage, ValidatedCapacityCalibrationOptions. Import only the names used by this file.
165
329
 
166
330
  ```text
167
- import * as api from '@forgezero/agent/capacity-calibration';
331
+ import { calibrateHttpConcurrency, localCalibrationEndpoint, validateCapacityCalibrationOptions } from '@forgezero/agent/capacity-calibration';
332
+ import type { CapacityCalibration, CapacityCalibrationOptions, CapacityStage, ValidatedCapacityCalibrationOptions } from '@forgezero/agent/capacity-calibration';
168
333
  ```
169
334
 
335
+ <a id="forgezero-agent-cloudflare-bootstrap"></a>
170
336
  ## @forgezero/agent/cloudflare-bootstrap
171
337
 
172
- Attended Cloudflare Tunnel, KV and runtime-token bootstrap with private resumable handoff.
338
+ 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.
173
339
 
174
340
  ```text
175
- import * as api from '@forgezero/agent/cloudflare-bootstrap';
341
+ import { applyCloudflareBootstrap, cloudflareHostHandoffPath, finalizeCloudflareBootstrapAcceptance, planCloudflareBootstrap, readCloudflareBootstrapAcceptanceEvidence, readCloudflareBootstrapTokens } from '@forgezero/agent/cloudflare-bootstrap';
342
+ import { readCloudflareConnectorHandoff, readCloudflareHostHandoff, readOwnerApiToken, runAttendedCloudflareBootstrap, validateCloudflareBootstrapCoordinates, verifyCloudflareBootstrapAcceptance } from '@forgezero/agent/cloudflare-bootstrap';
343
+ import { writeOwnerBootstrapOutput } from '@forgezero/agent/cloudflare-bootstrap';
344
+ import type { AttendedCloudflareBootstrapRequest, CloudflareBootstrapAcceptanceEvidence, CloudflareBootstrapAcceptedNode, CloudflareBootstrapCoordinates, CloudflareBootstrapDependencies, CloudflareBootstrapEvidence } from '@forgezero/agent/cloudflare-bootstrap';
345
+ import type { CloudflareBootstrapFinalizeRequest, CloudflareBootstrapNodeCoordinates, CloudflareBootstrapOutput, CloudflareBootstrapPhaseRunner, CloudflareBootstrapPlan, CloudflareBootstrapTokenFiles } from '@forgezero/agent/cloudflare-bootstrap';
346
+ import type { CloudflareBootstrapTokens, CloudflareConnectorHandoff, CloudflareHostHandoff, CloudflareMeshCoordinates, CloudflareRealtimeCoordinates } from '@forgezero/agent/cloudflare-bootstrap';
176
347
  ```
177
348
 
349
+ <a id="forgezero-agent-cloudflare-edge"></a>
178
350
  ## @forgezero/agent/cloudflare-edge
179
351
 
180
- Strict Cloudflare REST operations used by the attended bootstrap controller.
352
+ 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.
181
353
 
182
354
  ```text
183
- import * as api from '@forgezero/agent/cloudflare-edge';
355
+ import { configureCloudflareEdge, configureCloudflareRealtimeSecrets, ensureCloudflareMeshConnector, ensureCloudflarePrivateDatabaseRoute, ensureCloudflarePrivateRoute, ensureCloudflareTunnel } from '@forgezero/agent/cloudflare-edge';
356
+ import { ensureCloudflareWarpDatabaseInclude, ensureCloudflareWarpNetworkIncludes, removeCloudflarePrivateDatabaseRoute, removeCloudflarePrivateRoute, removeCloudflareWarpDatabaseInclude, verifyCloudflareWorkerDurableObjects } from '@forgezero/agent/cloudflare-edge';
357
+ import type { CloudflareDurableObjectNamespace, CloudflareEdgeConfig, CloudflareMeshConnector, CloudflarePrivateRoute, CloudflarePrivateRouteConfig, CloudflareTunnel } from '@forgezero/agent/cloudflare-edge';
358
+ import type { CloudflareWarpIncludeConfig } from '@forgezero/agent/cloudflare-edge';
184
359
  ```
185
360
 
361
+ <a id="forgezero-agent-mesh-connector"></a>
362
+ ## @forgezero/agent/mesh-connector
363
+
364
+ Fixed Cloudflare Mesh/WARP connector enrollment using only the unit-loaded connector credential. Named value imports: configureMeshConnector, readMeshConnectorCredential. Named type imports: MeshConnectorCommandResult, MeshConnectorExec. Import only the names used by this file.
365
+
366
+ ```text
367
+ import { configureMeshConnector, readMeshConnectorCredential } from '@forgezero/agent/mesh-connector';
368
+ import type { MeshConnectorCommandResult, MeshConnectorExec } from '@forgezero/agent/mesh-connector';
369
+ ```
370
+
371
+ <a id="forgezero-agent-compute"></a>
186
372
  ## @forgezero/agent/compute
187
373
 
188
- Compute claim, renewal, execution and completion client contracts.
374
+ Compute claim, renewal, execution and completion client contracts. Named value imports: ComputeError, deviceInUse, guestUnit, parseCensus, qemuArgv, shapeEgressCommands, shapeEgressUnitDirectives, tapFor, unitName. Named type imports: GuestSpec, RunningGuest. Import only the names used by this file.
189
375
 
190
376
  ```text
191
- import * as api from '@forgezero/agent/compute';
377
+ import { ComputeError, deviceInUse, guestUnit, parseCensus, qemuArgv, shapeEgressCommands } from '@forgezero/agent/compute';
378
+ import { shapeEgressUnitDirectives, tapFor, unitName } from '@forgezero/agent/compute';
379
+ import type { GuestSpec, RunningGuest } from '@forgezero/agent/compute';
192
380
  ```
193
381
 
382
+ <a id="forgezero-agent-credential-schema"></a>
194
383
  ## @forgezero/agent/credential-schema
195
384
 
196
- Canonical systemd credential names and validation shared by bootstrap and services.
385
+ Canonical systemd credential names and validation shared by bootstrap and services. Named value imports: AGENT_CREDENTIAL_LOCATIONS, AGENT_CREDENTIAL_POLICY, CLOUDFLARE_CREDENTIAL_NAMES, CLOUDFLARE_CREDENTIAL_SCHEMA, METAL_SYSTEMD_CREDENTIALS, credentialBinding, deploymentCredentialSchema. Named type imports: AgentCredentialLocation, DeploymentCredentialBinding, DeploymentCredentialSchema. Import only the names used by this file.
197
386
 
198
387
  ```text
199
- import * as api from '@forgezero/agent/credential-schema';
388
+ import { AGENT_CREDENTIAL_LOCATIONS, AGENT_CREDENTIAL_POLICY, CLOUDFLARE_CREDENTIAL_NAMES, CLOUDFLARE_CREDENTIAL_SCHEMA, METAL_SYSTEMD_CREDENTIALS, credentialBinding } from '@forgezero/agent/credential-schema';
389
+ import { deploymentCredentialSchema } from '@forgezero/agent/credential-schema';
390
+ import type { AgentCredentialLocation, DeploymentCredentialBinding, DeploymentCredentialSchema } from '@forgezero/agent/credential-schema';
200
391
  ```
201
392
 
393
+ <a id="forgezero-agent-definition"></a>
202
394
  ## @forgezero/agent/definition
203
395
 
204
- Validated project deployment definition and workload profiles.
396
+ Validated project deployment definition and workload profiles. Named value imports: DEPLOY_SCHEMA_URL, DefinitionError, PIPELINE_VERSION, parseDeployDefinition, phasePipeline, validateDeploymentService. Named type imports: DeployDefinition, DeployStep, DeploymentPortAllocation, DeploymentService, PipelineProfile. Import only the names used by this file.
205
397
 
206
398
  ```text
207
- import * as api from '@forgezero/agent/definition';
399
+ import { DEPLOY_SCHEMA_URL, DefinitionError, PIPELINE_VERSION, parseDeployDefinition, phasePipeline, validateDeploymentService } from '@forgezero/agent/definition';
400
+ import type { DeployDefinition, DeployStep, DeploymentPortAllocation, DeploymentService, PipelineProfile } from '@forgezero/agent/definition';
208
401
  ```
209
402
 
403
+ <a id="forgezero-agent-deploy-file"></a>
210
404
  ## @forgezero/agent/deploy-file
211
405
 
212
- Read and validate a checked-out .fz deployment file without executing project input.
406
+ Read and validate a checked-out .fz deployment file without executing project input. Named value imports: DEPLOY_FILE, DEPLOY_SCHEMA_URL, DEPLOY_TODO_PREFIX, defaultDeployFile, deployDefinitionDigest, initializeDeployFile, inspectDeployFile. Named type imports: DeployFileSummary, InitializedDeployFile. Import only the names used by this file.
213
407
 
214
408
  ```text
215
- import * as api from '@forgezero/agent/deploy-file';
409
+ import { DEPLOY_FILE, DEPLOY_SCHEMA_URL, DEPLOY_TODO_PREFIX, defaultDeployFile, deployDefinitionDigest, initializeDeployFile } from '@forgezero/agent/deploy-file';
410
+ import { inspectDeployFile } from '@forgezero/agent/deploy-file';
411
+ import type { DeployFileSummary, InitializedDeployFile } from '@forgezero/agent/deploy-file';
216
412
  ```
217
413
 
414
+ <a id="forgezero-agent-metal-bootstrap"></a>
218
415
  ## @forgezero/agent/metal-bootstrap
219
416
 
220
- Physical-metal bootstrap planning, application and status evidence.
417
+ Physical-metal bootstrap planning, application and status evidence. Named value imports: METAL_BOOTSTRAP_STATE_PATH, MetalBootstrapError, applyMetalBootstrap, metalBootstrapStatus, planMetalBootstrap, readMetalBootstrapConfig, renderMetalUnits, validateMetalBootstrapConfig, validateOwnerOnlyPath. Named type imports: MetalBootstrapApplyOptions, MetalBootstrapConfig, MetalBootstrapExec, MetalBootstrapPlan, MetalBootstrapResult, MetalBootstrapStatus. Import only the names used by this file.
221
418
 
222
419
  ```text
223
- import * as api from '@forgezero/agent/metal-bootstrap';
420
+ import { METAL_BOOTSTRAP_STATE_PATH, MetalBootstrapError, applyMetalBootstrap, metalBootstrapStatus, planMetalBootstrap, readMetalBootstrapConfig } from '@forgezero/agent/metal-bootstrap';
421
+ import { renderMetalUnits, validateMetalBootstrapConfig, validateOwnerOnlyPath } from '@forgezero/agent/metal-bootstrap';
422
+ import type { MetalBootstrapApplyOptions, MetalBootstrapConfig, MetalBootstrapExec, MetalBootstrapPlan, MetalBootstrapResult, MetalBootstrapStatus } from '@forgezero/agent/metal-bootstrap';
224
423
  ```
225
424
 
425
+ <a id="forgezero-agent-metal-provision"></a>
226
426
  ## @forgezero/agent/metal-provision
227
427
 
228
- Validated confidential guest provisioning profiles and cloud-init rendering.
428
+ Validated confidential guest provisioning profiles and cloud-init rendering. Named value imports: MetalProvisionError, allocateAddress, allocateCpuPool, cloudInit, guestBootstrapOperations, guestNameFor, macForAddress, provisionMetalGuest, removeMetalGuest, tapNameFor, validateMetalProfile. Named type imports: GuestManifest, MetalCommandResult, MetalCpuPool, MetalExec, MetalImage, MetalProvisionProfile. Import only the names used by this file.
229
429
 
230
430
  ```text
231
- import * as api from '@forgezero/agent/metal-provision';
431
+ import { MetalProvisionError, allocateAddress, allocateCpuPool, cloudInit, guestBootstrapOperations, guestNameFor } from '@forgezero/agent/metal-provision';
432
+ import { macForAddress, provisionMetalGuest, removeMetalGuest, tapNameFor, validateMetalProfile } from '@forgezero/agent/metal-provision';
433
+ import type { GuestManifest, MetalCommandResult, MetalCpuPool, MetalExec, MetalImage, MetalProvisionProfile } from '@forgezero/agent/metal-provision';
232
434
  ```
233
435
 
436
+ <a id="forgezero-agent-platform-bootstrap-runtime"></a>
234
437
  ## @forgezero/agent/platform-bootstrap-runtime
235
438
 
236
- Pure platform bootstrap validation, render and resumable phase-state contracts.
439
+ Pure platform bootstrap validation, render and resumable phase-state contracts. Named value imports: activatePlatformRelease, planLocalOtlpProof, planPlatformActivation, platformApiCredentialSpecs, renderPlatformActivationFiles, renderPlatformApiUnits, renderPlatformNginx, renderPlatformSharedEnvironment, validatePlatformSharedEnvironment. Named type imports: ActivationBoundary, ApiRuntimeRenderOptions, ApiSlot, LocalOtlpProofPlan, PlatformActivationCommandResult, PlatformActivationConfig, PlatformActivationExec, PlatformBootstrapEmail, PlatformDatabaseRole, PlatformSharedEnvironment, PlatformSoftwareProfile, SystemdCredentialSpec. Import only the names used by this file.
237
440
 
238
441
  ```text
239
- import * as api from '@forgezero/agent/platform-bootstrap-runtime';
442
+ import { activatePlatformRelease, planLocalOtlpProof, planPlatformActivation, platformApiCredentialSpecs, renderPlatformActivationFiles, renderPlatformApiUnits } from '@forgezero/agent/platform-bootstrap-runtime';
443
+ import { renderPlatformNginx, renderPlatformSharedEnvironment, validatePlatformSharedEnvironment } from '@forgezero/agent/platform-bootstrap-runtime';
444
+ import type { ActivationBoundary, ApiRuntimeRenderOptions, ApiSlot, LocalOtlpProofPlan, PlatformActivationCommandResult, PlatformActivationConfig } from '@forgezero/agent/platform-bootstrap-runtime';
445
+ import type { PlatformActivationExec, PlatformBootstrapEmail, PlatformDatabaseRole, PlatformSharedEnvironment, PlatformSoftwareProfile, SystemdCredentialSpec } from '@forgezero/agent/platform-bootstrap-runtime';
240
446
  ```
241
447
 
448
+ <a id="forgezero-agent-project-context"></a>
242
449
  ## @forgezero/agent/project-context
243
450
 
244
- Project identity and repository context validation for operator and managed runs.
451
+ Project identity and repository context validation for operator and managed runs. Named value imports: PROJECT_CONTEXT_VERSION, ProjectContextError, checkProjectContext, defaultProjectContext, initializeProjectContext, parseProjectContext, projectContextFiles, renderProjectContext, syncProjectContext. Named type imports: ContextCheck, ContextFile, ProjectContextManifest, ProjectTruthSource. Import only the names used by this file.
245
452
 
246
453
  ```text
247
- import * as api from '@forgezero/agent/project-context';
454
+ import { PROJECT_CONTEXT_VERSION, ProjectContextError, checkProjectContext, defaultProjectContext, initializeProjectContext, parseProjectContext } from '@forgezero/agent/project-context';
455
+ import { projectContextFiles, renderProjectContext, syncProjectContext } from '@forgezero/agent/project-context';
456
+ import type { ContextCheck, ContextFile, ProjectContextManifest, ProjectTruthSource } from '@forgezero/agent/project-context';
248
457
  ```
249
458
 
459
+ <a id="forgezero-agent-provisioning-pull"></a>
250
460
  ## @forgezero/agent/provisioning-pull
251
461
 
252
- Signed provisioning work claim, renewal, execution and acknowledgement.
462
+ Signed provisioning work claim, renewal, execution and acknowledgement. Named value imports: pullProvisioningOnce, startProvisioningPull. Named type imports: CreateRemoteProvisionClaim, GuestAccess, ProvisionPullResult, ProvisionResult, ProvisionRunner, ProvisioningPullOptions, RemoteProvisionClaim. Import only the names used by this file.
253
463
 
254
464
  ```text
255
- import * as api from '@forgezero/agent/provisioning-pull';
465
+ import { pullProvisioningOnce, startProvisioningPull } from '@forgezero/agent/provisioning-pull';
466
+ import type { CreateRemoteProvisionClaim, GuestAccess, ProvisionPullResult, ProvisionResult, ProvisionRunner, ProvisioningPullOptions } from '@forgezero/agent/provisioning-pull';
467
+ import type { RemoteProvisionClaim } from '@forgezero/agent/provisioning-pull';
256
468
  ```
257
469
 
258
- ## @forgezero/agent/schema/deploy-v2.json
470
+ <a id="forgezero-agent-schema-deploy-v3-json"></a>
471
+ ## @forgezero/agent/schema/deploy-v3.json
259
472
 
260
- Published JSON Schema for deployment definition version 2.
473
+ Published JSON Schema for deployment definition version 3 with exact argv execution. This entry is JSON data rather than a JavaScript namespace.
261
474
 
262
475
  ```text
263
- import * as api from '@forgezero/agent/schema/deploy-v2.json';
476
+ import schema from '@forgezero/agent/schema/deploy-v3.json' with { type: 'json' };
264
477
  ```
265
478
 
266
- ## @forgezero/agent/software
479
+ ## @forgezero/agent/schema/deploy-v3.json — Validate a deployment definition against the published schema
267
480
 
268
- Exact managed-software inventory, requirement and evidence contracts.
481
+ Definition version 3 rejects unknown fields and shell command strings; every step is a bounded exact argv vector. Credentials remain named references resolved by Vault or the same-named encrypted systemd fallback.
269
482
 
270
483
  ```text
271
- import * as api from '@forgezero/agent/software';
272
- ```
273
-
274
- ## @forgezero/agent/software-helper
275
-
276
- Root-owned fixed installation/update boundary for declared software.
484
+ import deploySchema from '@forgezero/agent/schema/deploy-v3.json' with { type: 'json' };
485
+ import Ajv from 'ajv';
277
486
 
278
- ```text
279
- import * as api from '@forgezero/agent/software-helper';
487
+ const validate = new Ajv({ allErrors: true, strict: true }).compile(deploySchema);
488
+ if (!validate(deploymentDefinition)) throw new Error(JSON.stringify(validate.errors));
280
489
  ```
281
490
 
282
- ## @forgezero/agent/ubuntu
491
+ <a id="forgezero-agent-software"></a>
492
+ ## @forgezero/agent/software
283
493
 
284
- Ubuntu host validation and deterministic systemd/unit rendering helpers.
494
+ Exact managed-software inventory, requirement and evidence contracts. Named value imports: BUN_RELEASE_SHA256, OS_CATALOG, PINNED_BUN_VERSION, SOFTWARE_CATALOG, ensureSoftwareRequirements, executeSoftwareOperation, observeSoftwareHost, validateSoftwareRequirements. Named type imports: CatalogStatus, DeploymentChannel, OsCatalogEntry, SoftwareCatalogEntry, SoftwareCommandResult, SoftwareExec, SoftwareId, SoftwareObservation, SoftwareOperation, SoftwareRequirement. Import only the names used by this file.
285
495
 
286
496
  ```text
287
- import * as api from '@forgezero/agent/ubuntu';
497
+ import { BUN_RELEASE_SHA256, OS_CATALOG, PINNED_BUN_VERSION, SOFTWARE_CATALOG, ensureSoftwareRequirements, executeSoftwareOperation } from '@forgezero/agent/software';
498
+ import { observeSoftwareHost, validateSoftwareRequirements } from '@forgezero/agent/software';
499
+ import type { CatalogStatus, DeploymentChannel, OsCatalogEntry, SoftwareCatalogEntry, SoftwareCommandResult, SoftwareExec } from '@forgezero/agent/software';
500
+ import type { SoftwareId, SoftwareObservation, SoftwareOperation, SoftwareRequirement } from '@forgezero/agent/software';
288
501
  ```
289
502
 
290
- ## fz-agent (replica)
503
+ <a id="forgezero-agent-software-helper"></a>
504
+ ## @forgezero/agent/software-helper
291
505
 
292
- The project-scoped vault replica: resident in RAM, never on disk, invalidated by cursor rather than by timer, and refusing a read it can no longer vouch for.
506
+ Root-owned fixed installation/update boundary for declared software. Named value imports: DEFAULT_SOFTWARE_HELPER_SOCKET, SOFTWARE_HELPER_GROUP, SOFTWARE_HELPER_UNIT_PATH, requestServiceActivation, requestSoftware, startSoftwareHelper. Named type imports: none. Import only the names used by this file.
293
507
 
294
508
  ```text
295
- fz-agent (replica) --help
509
+ import { DEFAULT_SOFTWARE_HELPER_SOCKET, SOFTWARE_HELPER_GROUP, SOFTWARE_HELPER_UNIT_PATH, requestServiceActivation, requestSoftware, startSoftwareHelper } from '@forgezero/agent/software-helper';
296
510
  ```
297
511
 
298
- ## Outbound control boundary
512
+ <a id="forgezero-agent-ubuntu"></a>
513
+ ## @forgezero/agent/ubuntu
299
514
 
300
- The Metal Agent initiates outbound signed HTTPS for orchestration. Applications use the project-scoped local Unix socket; the platform never opens an inbound shell control plane.
515
+ Ubuntu host validation and deterministic systemd/unit rendering helpers. Named value imports: SUPPORTED_GUEST_IMAGE, assertSupportedGuestImage. Named type imports: none. Import only the names used by this file.
301
516
 
302
517
  ```text
303
- metal/compute Agent -> outbound signed HTTPS -> platform API
304
- application -> local Unix socket -> project-scoped Vault replica
518
+ import { SUPPORTED_GUEST_IMAGE, assertSupportedGuestImage } from '@forgezero/agent/ubuntu';
305
519
  ```
306
520
 
307
- ## Keep project truth synchronized
521
+ <a id="fz-agent-replica"></a>
522
+ ## fz-agent (replica)
308
523
 
309
- One versioned ForgeZero manifest generates thin AI-tool adapters and CI rejects drift.
524
+ The project-scoped vault replica: resident in RAM, never on disk, invalidated by cursor rather than by timer, and refusing a read it can no longer vouch for. Run the command with `--help` before applying it.
310
525
 
311
526
  ```text
312
- fz project init
313
- fz project sync
314
- fz project check
527
+ fz-agent (replica) --help
315
528
  ```
316
529
 
317
530
  ## Install both machine commands
@@ -340,7 +553,7 @@ fz project check # CI/handoff drift gate
340
553
  The CLI starts device authorization before the founder exists and opens the one-use invitation created by `fz bootstrap platform`. The browser creates the account, registers and freshly proves its passkey, confirms the account recovery phrase, then explicitly approves the displayed terminal code and continues to custody. The CLI receives only a bounded session. Custody phrases and passkey PRF output remain in the browser. After restart, each participating custodian opens only their own phrase envelope using an owner-only phrase file or stdin and contributes the share from their own authenticated, freshly proved session. No CLI process collects several custodians’ phrases. SSH remains transport and Git interoperability only; it is not a ForgeZero authentication or custody factor. Neither path creates a privileged server bypass.
341
554
 
342
555
  ```text
343
- fz genesis --mode 2-of-3 --api https://api.example --app https://console.example
556
+ fz genesis --mode 1-of-1
344
557
  fz status
345
558
  fz unlock --phrase-file /secure/offline-phrase.txt
346
559
  ```