@forgezero/agent 0.1.11 → 0.1.12

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 (48) hide show
  1. package/README.md +36 -9
  2. package/dist/deployment.d.ts +1 -1
  3. package/dist/fz-agent.js +514 -490
  4. package/dist/fz.js +34 -12
  5. package/dist/guest-enrolment.d.ts +2 -1
  6. package/dist/guest-enrolment.js +81 -23
  7. package/dist/index.d.ts +5 -29
  8. package/dist/metal-helper-socket.js +117 -24
  9. package/dist/metal-provision.d.ts +2 -2
  10. package/dist/metal-provision.js +117 -24
  11. package/dist/node-vault.d.ts +9 -0
  12. package/dist/node-vault.js +53 -17
  13. package/dist/provision.d.ts +1 -0
  14. package/dist/provision.js +14 -4
  15. package/dist/provisioning-pull.d.ts +22 -1
  16. package/dist/provisioning-pull.js +21 -10
  17. package/dist/signed-node-http.d.ts +1 -1
  18. package/dist/socket.d.ts +11 -4
  19. package/dist/ubuntu.d.ts +16 -0
  20. package/dist/ubuntu.js +18 -0
  21. package/dist/version.d.ts +2 -0
  22. package/package.json +11 -6
  23. package/dist/attestation-client.test.d.ts +0 -1
  24. package/dist/cache.test.d.ts +0 -1
  25. package/dist/cli/agent-install.test.d.ts +0 -1
  26. package/dist/cli/options.test.d.ts +0 -1
  27. package/dist/cli/run.test.d.ts +0 -1
  28. package/dist/compute.test.d.ts +0 -1
  29. package/dist/control.test.d.ts +0 -1
  30. package/dist/definition.test.d.ts +0 -1
  31. package/dist/deployment-pull.test.d.ts +0 -1
  32. package/dist/deployment-runner.test.d.ts +0 -1
  33. package/dist/deployment-watch.d.ts +0 -36
  34. package/dist/deployment-watch.test.d.ts +0 -1
  35. package/dist/deployment.test.d.ts +0 -1
  36. package/dist/guest-enrolment.test.d.ts +0 -1
  37. package/dist/index.test.d.ts +0 -1
  38. package/dist/metal-helper-socket.test.d.ts +0 -1
  39. package/dist/metal-isolation.test.d.ts +0 -1
  40. package/dist/metal-provision.test.d.ts +0 -1
  41. package/dist/node-vault.test.d.ts +0 -1
  42. package/dist/pipeline.test.d.ts +0 -1
  43. package/dist/provisioning-pull.test.d.ts +0 -1
  44. package/dist/snp-attestation.test.d.ts +0 -1
  45. package/dist/socket.test.d.ts +0 -1
  46. package/dist/ssh-listen.test.d.ts +0 -1
  47. package/dist/ssh-server.test.d.ts +0 -1
  48. package/dist/subscribe.test.d.ts +0 -1
package/README.md CHANGED
@@ -49,8 +49,9 @@ not exist on the box.
49
49
 
50
50
  ## A local copy, not a cache
51
51
 
52
- The agent holds the **whole assigned project + environment**, not just what has
53
- already been read. That is the difference between surviving an outage and not: a
52
+ The agent holds the **whole assigned project across every environment**, not
53
+ just what has already been read. Each application still selects one environment
54
+ and cannot cross the enrolled project boundary. That is the difference between surviving an outage and not: a
54
55
  cache only has what you fetched, so a secret you have never read is exactly the
55
56
  one you cannot get when the platform is unreachable.
56
57
 
@@ -80,7 +81,24 @@ it is worse off than one that receives an error — the error is visible.
80
81
 
81
82
  Both are real. `enrolled` is still strictly better than an API key in the
82
83
  application: the key never leaves the agent, rotation reaches every process, and
83
- the socket is filesystem-scoped.
84
+ the socket is filesystem-scoped. The socket is mode `0660` under the dedicated
85
+ `forgezero-vault` group; add only the intended application service account to
86
+ that group. The credential-free deployment runner is not a member.
87
+
88
+ The attested posture is the intended production upgrade, not current live
89
+ evidence: report acquisition and AMD-rooted measurement verification still have
90
+ to cross the production fleet. Until then the node is honestly `enrolled`; the
91
+ Agent never manufactures an attestation-shaped fallback.
92
+
93
+ Every tenant Vault sync request uses the same hybrid signature codec as an
94
+ external API key and signs its one-use hybrid ML-KEM-768 + X25519 response key.
95
+ Vault values are AES-256-GCM sealed to that request before crossing the edge;
96
+ there is no Ed25519-only or plaintext-response downgrade.
97
+
98
+ The first guest enrolment uses the same contract before the identity exists in
99
+ the database: the guest signs the exact token and public-key body with both keys
100
+ it is asking the API to admit, and it accepts only an ML-KEM-sealed
101
+ acknowledgement. The short-lived token is therefore not an unsigned Agent path.
84
102
 
85
103
  ## The socket interface
86
104
 
@@ -112,12 +130,21 @@ file before executing any command, prepares only the selected role, and gives a
112
130
  step only the vault values it explicitly names. `await` returns the complete
113
131
  pipeline result; no polling service or persistent queue is required.
114
132
 
115
- The daemon owns source checkout and command execution. On a platform node it
116
- watches the configured branch after bootstrap, resolves every change to an
117
- exact commit, and writes `pending` then `running` before submitting that commit
118
- to the keyed queue. A restart in either state resumes the exact commit; only an
119
- awaited successful pipeline writes `deployed`. Tenant nodes receive the same
120
- exact-commit request from the signed API claim path.
133
+ The daemon owns source checkout and command execution. Bootstrap explicitly
134
+ awaits release one because the API does not exist yet, then the Agent consumes a
135
+ one-use platform enrolment capability. There is no branch watcher. Every normal
136
+ platform or tenant release is a durable API row bound to one exact compute:
137
+ `pending` is written before dispatch, `running` and a fenced lease before project
138
+ code, and only an awaited successful pipeline writes `deployed`. An expired
139
+ claim can be recovered; its stale token cannot renew or finish.
140
+
141
+ The same package also runs the identity-only Metal Agent. It initiates outbound
142
+ signed HTTPS to pull only claims assigned to its enrolled hostname, then passes
143
+ the fixed claim over a local Unix socket to a narrowly privileged root helper.
144
+ The helper can materialize the audited QEMU profile; it cannot clone a project,
145
+ read Vault data, accept arbitrary commands, or retain tenant credentials. Root
146
+ SSH is an operator-only platform-genesis/recovery path, not the normal tenant
147
+ dispatch mechanism.
121
148
 
122
149
  Repository read authorization is explicit per pipeline: public HTTPS, the
123
150
  compute's systemd-sealed SSH deploy key, or a fine-grained HTTPS token selected
@@ -41,7 +41,7 @@ export type GitSourceAuth = {
41
41
  username?: string;
42
42
  };
43
43
  export interface DeploymentOptions {
44
- /** Queue key. Same project/environment is serial; other managers may run in parallel. */
44
+ /** Queue key. The same deployment target is serial; different targets may run in parallel. */
45
45
  key: string;
46
46
  repository: string;
47
47
  branch: string;