@forgezero/agent 0.1.2 → 0.1.10

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 (55) hide show
  1. package/README.md +70 -4
  2. package/dist/attestation-client.d.ts +22 -0
  3. package/dist/attestation-client.test.d.ts +1 -0
  4. package/dist/cli/agent-install.d.ts +82 -0
  5. package/dist/cli/agent-install.test.d.ts +1 -0
  6. package/dist/cli/custody.d.ts +35 -0
  7. package/dist/cli/genesis.d.ts +79 -0
  8. package/dist/cli/index.d.ts +12 -0
  9. package/dist/cli/options.test.d.ts +1 -0
  10. package/dist/cli/run.d.ts +92 -0
  11. package/dist/cli/run.test.d.ts +1 -0
  12. package/dist/compute.d.ts +122 -0
  13. package/dist/compute.js +150 -0
  14. package/dist/compute.test.d.ts +1 -0
  15. package/dist/control.d.ts +57 -0
  16. package/dist/control.test.d.ts +1 -0
  17. package/dist/definition.d.ts +34 -0
  18. package/dist/definition.js +159 -0
  19. package/dist/definition.test.d.ts +1 -0
  20. package/dist/deployment-pull.d.ts +61 -0
  21. package/dist/deployment-pull.test.d.ts +1 -0
  22. package/dist/deployment-runner.d.ts +23 -0
  23. package/dist/deployment-runner.js +199 -0
  24. package/dist/deployment-runner.test.d.ts +1 -0
  25. package/dist/deployment-watch.d.ts +36 -0
  26. package/dist/deployment-watch.test.d.ts +1 -0
  27. package/dist/deployment.d.ts +100 -0
  28. package/dist/deployment.test.d.ts +1 -0
  29. package/dist/fz-agent.js +2934 -182
  30. package/dist/fz.js +1270 -0
  31. package/dist/guest-enrolment.d.ts +29 -0
  32. package/dist/guest-enrolment.js +88 -0
  33. package/dist/guest-enrolment.test.d.ts +1 -0
  34. package/dist/index.d.ts +50 -4
  35. package/dist/metal-helper-socket.d.ts +15 -0
  36. package/dist/metal-helper-socket.js +1123 -0
  37. package/dist/metal-helper-socket.test.d.ts +1 -0
  38. package/dist/metal-isolation.d.ts +14 -0
  39. package/dist/metal-isolation.test.d.ts +1 -0
  40. package/dist/metal-provision.d.ts +85 -0
  41. package/dist/metal-provision.js +1014 -0
  42. package/dist/metal-provision.test.d.ts +1 -0
  43. package/dist/node-vault.d.ts +24 -0
  44. package/dist/node-vault.js +211 -0
  45. package/dist/node-vault.test.d.ts +1 -0
  46. package/dist/provision.d.ts +50 -2
  47. package/dist/provision.js +286 -12
  48. package/dist/provisioning-pull.d.ts +75 -0
  49. package/dist/provisioning-pull.js +188 -0
  50. package/dist/provisioning-pull.test.d.ts +1 -0
  51. package/dist/signed-node-http.d.ts +14 -0
  52. package/dist/snp-attestation.d.ts +18 -0
  53. package/dist/snp-attestation.test.d.ts +1 -0
  54. package/dist/socket.d.ts +4 -23
  55. package/package.json +27 -9
package/dist/socket.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import { type Server } from 'node:net';
2
2
  import { signRequest, type NodeKeyPair } from '@forgezero/runtime/identity';
3
- import { type Pipeline, type RunResult, type RunOptions } from './pipeline';
4
3
  import type { SecretCache } from './cache';
5
4
  /**
6
5
  * The signing socket — why the application on managed compute holds nothing.
7
6
  *
8
- * `@forgezero/vault` discovers `/run/forgezero.sock` and prefers it over
7
+ * `@forgezero/vault` discovers `/run/forgezero/vault.sock` and prefers it over
9
8
  * `FORGEZERO_API_KEY`, so moving an app onto managed compute is DELETING an
10
9
  * environment variable. That only means anything if something is listening, and
11
10
  * for a long time nothing was: the client knew how to prefer the socket and the
@@ -56,9 +55,6 @@ export type Request = {
56
55
  op: 'sync';
57
56
  } | {
58
57
  op: 'held';
59
- } | {
60
- op: 'run';
61
- pipeline: Pipeline;
62
58
  };
63
59
  export type Response = {
64
60
  ok: true;
@@ -91,10 +87,6 @@ export type Response = {
91
87
  op: 'held';
92
88
  names: string[];
93
89
  staleForMs: number;
94
- } | {
95
- ok: true;
96
- op: 'run';
97
- result: RunResult;
98
90
  } | {
99
91
  ok: false;
100
92
  error: {
@@ -105,11 +97,9 @@ export type Response = {
105
97
  /**
106
98
  * Produces a hardware attestation report for this guest.
107
99
  *
108
- * Injected rather than implemented here, and ABSENT by default. A SEV-SNP report
109
- * is only meaningful if something verifies it against a measurement and a
110
- * freshness window, and the freshness window is an open architectural question
111
- * in this repo — `architecture.ts` carries it as `status: 'open'`. Inventing a
112
- * number would produce a check that looks like attestation and is not one.
100
+ * Injected and absent by default. A SEV-SNP report is meaningful only when the
101
+ * API verifies it against the server challenge, catalog measurement, TCB floor
102
+ * and AMD chain; this socket merely obtains the signed bytes.
113
103
  *
114
104
  * So with no source configured, `attest` REFUSES. It does not return an empty
115
105
  * report, and it does not silently succeed: a caller that believes it verified
@@ -126,15 +116,6 @@ export interface AgentOptions {
126
116
  /** The node's identifier, as the platform knows it. */
127
117
  nodeKey: string;
128
118
  attestation?: AttestationSource;
129
- /**
130
- * Runs a pipeline step. ABSENT by default, and that is the security posture.
131
- *
132
- * An agent that can execute arbitrary commands is a remote shell with a vault
133
- * attached. Shipping one on by default would mean every compute that installs
134
- * the agent for its secrets also accepts remote execution, which is not the
135
- * trade anybody agreed to. An operator turns it on for the boxes that deploy.
136
- */
137
- exec?: RunOptions['exec'];
138
119
  /**
139
120
  * Secrets, cached in memory on this guest.
140
121
  *
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "//": "Publishing happens from an operator's machine, not CI \u2014 CLAUDE.md records that the absence of CI is deliberate. npm's `provenance` attests a tarball was built by a recognised CI provider from a named commit, so it cannot be produced here: it was set, and the first publish failed with `Automatic provenance generation not supported for provider: null`. A setting that can never be satisfied is worse than none, because it reads as a guarantee nobody is getting. Restore it the day this publishes from CI, and not before.",
3
3
  "name": "@forgezero/agent",
4
- "version": "0.1.2",
4
+ "version": "0.1.10",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "check": "tsc --noEmit",
8
- "build": "bun build src/index.ts --outfile dist/fz-agent.js --target bun --format esm --packages external && bun build src/provision.ts src/subscribe.ts src/pipeline.ts src/ssh-server.ts src/ssh-listen.ts --root src --outdir dist --target browser --format esm --packages external && tsc --emitDeclarationOnly --declaration --noEmit false --outDir dist",
8
+ "build": "bun build src/index.ts --outfile dist/fz-agent.js --target bun --format esm --packages external && bun build src/cli/index.ts --outfile dist/fz.js --target bun --format esm --packages external && bun build src/compute.ts src/provision.ts src/subscribe.ts src/pipeline.ts src/definition.ts src/ssh-server.ts src/ssh-listen.ts src/provisioning-pull.ts src/guest-enrolment.ts src/node-vault.ts src/metal-provision.ts src/metal-helper-socket.ts src/deployment-runner.ts --root src --outdir dist --target browser --format esm --packages external && tsc --emitDeclarationOnly --declaration --noEmit false --outDir dist",
9
9
  "prepublishOnly": "bun run check && bun run build"
10
10
  },
11
11
  "devDependencies": {
@@ -16,15 +16,17 @@
16
16
  "@noble/post-quantum": "^0.6.1"
17
17
  },
18
18
  "dependencies": {
19
- "@forgezero/runtime": "^0.1.0",
20
- "@forgezero/vault": "^0.1.0",
19
+ "@forgezero/access": "^0.1.0",
20
+ "@forgezero/runtime": "^0.1.2",
21
+ "@forgezero/vault": "^0.1.1",
21
22
  "@noble/curves": "^2.2.0",
22
23
  "@noble/hashes": "^2.2.0",
23
24
  "@noble/post-quantum": "^0.6.1",
24
25
  "@scure/bip39": "^2.2.0"
25
26
  },
26
27
  "bin": {
27
- "fz-agent": "./dist/fz-agent.js"
28
+ "fz-agent": "./dist/fz-agent.js",
29
+ "fz": "./dist/fz.js"
28
30
  },
29
31
  "publishConfig": {
30
32
  "access": "public"
@@ -35,7 +37,7 @@
35
37
  "LICENSE"
36
38
  ],
37
39
  "license": "MIT",
38
- "description": "The ForgeZero node agent \u2014 holds a project-scoped vault replica in RAM and serves it over a unix socket, so applications hold no credential.",
40
+ "description": "ForgeZero machine tooling: the fz operator command and fz-agent for vault access, provisioning and deployment.",
39
41
  "keywords": [
40
42
  "agent",
41
43
  "forgezero",
@@ -45,13 +47,13 @@
45
47
  "attestation",
46
48
  "sev-snp"
47
49
  ],
48
- "homepage": "https://forgezero.net/docs/agent",
50
+ "homepage": "https://www.forgezero.net/docs/agent",
49
51
  "repository": {
50
52
  "type": "git",
51
- "url": "git+https://github.com/axxra/forgezero.git",
53
+ "url": "git+https://github.com/forgezero-net/packages.git",
52
54
  "directory": "packages/agent"
53
55
  },
54
- "bugs": "https://github.com/axxra/forgezero/issues",
56
+ "bugs": "https://github.com/forgezero-net/packages/issues",
55
57
  "exports": {
56
58
  "./provision": {
57
59
  "types": "./dist/provision.d.ts",
@@ -65,6 +67,10 @@
65
67
  "types": "./dist/pipeline.d.ts",
66
68
  "default": "./dist/pipeline.js"
67
69
  },
70
+ "./definition": {
71
+ "types": "./dist/definition.d.ts",
72
+ "default": "./dist/definition.js"
73
+ },
68
74
  "./ssh-listen": {
69
75
  "types": "./dist/ssh-listen.d.ts",
70
76
  "default": "./dist/ssh-listen.js"
@@ -72,6 +78,18 @@
72
78
  "./ssh-server": {
73
79
  "types": "./dist/ssh-server.d.ts",
74
80
  "default": "./dist/ssh-server.js"
81
+ },
82
+ "./compute": {
83
+ "types": "./dist/compute.d.ts",
84
+ "default": "./dist/compute.js"
85
+ },
86
+ "./provisioning-pull": {
87
+ "types": "./dist/provisioning-pull.d.ts",
88
+ "default": "./dist/provisioning-pull.js"
89
+ },
90
+ "./metal-provision": {
91
+ "types": "./dist/metal-provision.d.ts",
92
+ "default": "./dist/metal-provision.js"
75
93
  }
76
94
  }
77
95
  }