@forgezero/agent 0.1.2 → 0.1.9
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 +45 -2
- package/dist/attestation-client.d.ts +22 -0
- package/dist/attestation-client.test.d.ts +1 -0
- package/dist/compute.d.ts +122 -0
- package/dist/compute.js +150 -0
- package/dist/compute.test.d.ts +1 -0
- package/dist/control.d.ts +57 -0
- package/dist/control.test.d.ts +1 -0
- package/dist/definition.d.ts +34 -0
- package/dist/definition.js +159 -0
- package/dist/definition.test.d.ts +1 -0
- package/dist/deployment-pull.d.ts +60 -0
- package/dist/deployment-pull.test.d.ts +1 -0
- package/dist/deployment-runner.d.ts +23 -0
- package/dist/deployment-runner.js +199 -0
- package/dist/deployment-runner.test.d.ts +1 -0
- package/dist/deployment-watch.d.ts +36 -0
- package/dist/deployment-watch.test.d.ts +1 -0
- package/dist/deployment.d.ts +86 -0
- package/dist/deployment.test.d.ts +1 -0
- package/dist/fz-agent.js +2879 -158
- package/dist/guest-enrolment.d.ts +29 -0
- package/dist/guest-enrolment.js +88 -0
- package/dist/guest-enrolment.test.d.ts +1 -0
- package/dist/index.d.ts +50 -4
- package/dist/metal-helper-socket.d.ts +15 -0
- package/dist/metal-helper-socket.js +1123 -0
- package/dist/metal-helper-socket.test.d.ts +1 -0
- package/dist/metal-isolation.d.ts +14 -0
- package/dist/metal-isolation.test.d.ts +1 -0
- package/dist/metal-provision.d.ts +85 -0
- package/dist/metal-provision.js +1014 -0
- package/dist/metal-provision.test.d.ts +1 -0
- package/dist/node-vault.d.ts +24 -0
- package/dist/node-vault.js +211 -0
- package/dist/node-vault.test.d.ts +1 -0
- package/dist/provision.d.ts +50 -2
- package/dist/provision.js +286 -12
- package/dist/provisioning-pull.d.ts +75 -0
- package/dist/provisioning-pull.js +188 -0
- package/dist/provisioning-pull.test.d.ts +1 -0
- package/dist/signed-node-http.d.ts +14 -0
- package/dist/snp-attestation.d.ts +18 -0
- package/dist/snp-attestation.test.d.ts +1 -0
- package/dist/socket.d.ts +4 -23
- package/package.json +21 -5
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
|
|
109
|
-
*
|
|
110
|
-
*
|
|
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.
|
|
4
|
+
"version": "0.1.9",
|
|
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/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,8 +16,8 @@
|
|
|
16
16
|
"@noble/post-quantum": "^0.6.1"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@forgezero/runtime": "^0.1.
|
|
20
|
-
"@forgezero/vault": "^0.1.
|
|
19
|
+
"@forgezero/runtime": "^0.1.2",
|
|
20
|
+
"@forgezero/vault": "^0.1.1",
|
|
21
21
|
"@noble/curves": "^2.2.0",
|
|
22
22
|
"@noble/hashes": "^2.2.0",
|
|
23
23
|
"@noble/post-quantum": "^0.6.1",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"attestation",
|
|
46
46
|
"sev-snp"
|
|
47
47
|
],
|
|
48
|
-
"homepage": "https://forgezero.net/docs/agent",
|
|
48
|
+
"homepage": "https://www.forgezero.net/docs/agent",
|
|
49
49
|
"repository": {
|
|
50
50
|
"type": "git",
|
|
51
51
|
"url": "git+https://github.com/axxra/forgezero.git",
|
|
@@ -65,6 +65,10 @@
|
|
|
65
65
|
"types": "./dist/pipeline.d.ts",
|
|
66
66
|
"default": "./dist/pipeline.js"
|
|
67
67
|
},
|
|
68
|
+
"./definition": {
|
|
69
|
+
"types": "./dist/definition.d.ts",
|
|
70
|
+
"default": "./dist/definition.js"
|
|
71
|
+
},
|
|
68
72
|
"./ssh-listen": {
|
|
69
73
|
"types": "./dist/ssh-listen.d.ts",
|
|
70
74
|
"default": "./dist/ssh-listen.js"
|
|
@@ -72,6 +76,18 @@
|
|
|
72
76
|
"./ssh-server": {
|
|
73
77
|
"types": "./dist/ssh-server.d.ts",
|
|
74
78
|
"default": "./dist/ssh-server.js"
|
|
79
|
+
},
|
|
80
|
+
"./compute": {
|
|
81
|
+
"types": "./dist/compute.d.ts",
|
|
82
|
+
"default": "./dist/compute.js"
|
|
83
|
+
},
|
|
84
|
+
"./provisioning-pull": {
|
|
85
|
+
"types": "./dist/provisioning-pull.d.ts",
|
|
86
|
+
"default": "./dist/provisioning-pull.js"
|
|
87
|
+
},
|
|
88
|
+
"./metal-provision": {
|
|
89
|
+
"types": "./dist/metal-provision.d.ts",
|
|
90
|
+
"default": "./dist/metal-provision.js"
|
|
75
91
|
}
|
|
76
92
|
}
|
|
77
93
|
}
|