@forgezero/agent 0.1.31 → 0.1.33
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 +60 -5
- package/dist/agent-heartbeat.d.ts +12 -2
- package/dist/agent-heartbeat.js +416 -60
- package/dist/agent-update-helper.d.ts +41 -2
- package/dist/agent-update-helper.js +361 -43
- package/dist/agent-update.d.ts +1 -0
- package/dist/agent-update.js +34 -2
- package/dist/attestation-client.d.ts +2 -0
- package/dist/cli/agent-install.d.ts +6 -0
- package/dist/cli/genesis.d.ts +7 -48
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/session-store.d.ts +22 -0
- package/dist/deployment-pull.d.ts +2 -0
- package/dist/deployment.d.ts +3 -0
- package/dist/egress-policy.d.ts +50 -0
- package/dist/fz-agent.js +5088 -1699
- package/dist/fz.js +10334 -7613
- package/dist/git-egress.d.ts +35 -0
- package/dist/index.d.ts +19 -2
- package/dist/metal-helper-socket.js +12 -1
- package/dist/metal-provision.d.ts +2 -0
- package/dist/metal-provision.js +12 -1
- package/dist/migration-pull.d.ts +2 -0
- package/dist/migration-pull.js +18 -6
- package/dist/node-vault.d.ts +2 -0
- package/dist/node-vault.js +2 -1
- package/dist/provision.d.ts +13 -1
- package/dist/provision.js +540 -52
- package/dist/provisioning-pull.d.ts +2 -0
- package/dist/provisioning-pull.js +20 -7
- package/dist/telemetry-runtime.d.ts +20 -0
- package/dist/telemetry.d.ts +56 -0
- package/dist/version.d.ts +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -17,14 +17,17 @@ The one public package installs both commands. Keeping bootstrap and the daemon
|
|
|
17
17
|
in one version prevents a newly installed `fz` from provisioning a different
|
|
18
18
|
agent protocol.
|
|
19
19
|
|
|
20
|
-
The operator command
|
|
21
|
-
|
|
20
|
+
The operator command starts browser-first platform genesis, inspects status,
|
|
21
|
+
wraps processes, and installs the daemon. Genesis opens the one-use founder
|
|
22
|
+
invitation, waits for the new passkey account to approve this CLI through device
|
|
23
|
+
authorization, then continues custody in the browser. Passkey PRF output and
|
|
24
|
+
both recovery phrases never enter the terminal:
|
|
22
25
|
|
|
23
26
|
```bash
|
|
24
27
|
fz keys
|
|
25
28
|
fz status
|
|
26
|
-
fz genesis --mode 2-of-3
|
|
27
|
-
fz unlock
|
|
29
|
+
fz genesis --mode 2-of-3 --api https://api.example --app https://console.example
|
|
30
|
+
fz unlock --phrase-file /secure/offline-phrase.txt # run once per participating custodian
|
|
28
31
|
```
|
|
29
32
|
|
|
30
33
|
Install the service explicitly:
|
|
@@ -136,6 +139,44 @@ are generated adapters. They contain no independent architecture or progress.
|
|
|
136
139
|
by hand. Tools and skills remain optional execution aids; accepted decisions and
|
|
137
140
|
status live in the repository and therefore survive switching AI agents.
|
|
138
141
|
|
|
142
|
+
## Browser-authorized project control
|
|
143
|
+
|
|
144
|
+
Sign in from any checkout with the public CLI. The terminal displays a device
|
|
145
|
+
code and the browser approves it in the selected tenant realm:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
fz login --api https://api.forgezero.net --realm acme
|
|
149
|
+
fz whoami
|
|
150
|
+
fz ui routes --json
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The short session is stored by API origin and realm in an owner-only local file.
|
|
154
|
+
It is never committed to `.fz/config.json`. A protected mutation opens a browser
|
|
155
|
+
page for passkey or TOTP proof and then replays the exact request once; the CLI
|
|
156
|
+
has no privileged server mode.
|
|
157
|
+
|
|
158
|
+
Any ordinary website operation is available to developers and AI agents through
|
|
159
|
+
the same API and access matrix:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
fz ui routes pipeline
|
|
163
|
+
fz ui get /workspace/pipelines --query projectKey=my-project
|
|
164
|
+
fz api post /workspace/pipelines/status \
|
|
165
|
+
--data '{"pipelineKey":"pl_…","enabled":false}'
|
|
166
|
+
generate-request | fz api post /workspace/action --data -
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Only realm-relative paths are accepted, so the saved session cannot be forwarded
|
|
170
|
+
to another origin. Inline JSON, stdin and JSON files are supported. Use
|
|
171
|
+
`fz logout` to revoke the remote session and remove the local copy.
|
|
172
|
+
|
|
173
|
+
`fz ui routes --json` reads the action catalog from the API's enforced access
|
|
174
|
+
matrix. It lists only the current account's current realm, stage and grants, so
|
|
175
|
+
developers and AI agents can discover the available control surface without a
|
|
176
|
+
copied CLI command list or a visit to the website. Execute any listed action
|
|
177
|
+
with `fz ui <method> <path>`; sensitive actions open the same fresh-proof flow
|
|
178
|
+
as the website and replay the exact request once.
|
|
179
|
+
|
|
139
180
|
## Deployment definitions
|
|
140
181
|
|
|
141
182
|
A repository may commit `.fz/deploy.json` with its own profiles, prerequisite
|
|
@@ -155,6 +196,20 @@ fz deploy check
|
|
|
155
196
|
fz deploy sync
|
|
156
197
|
```
|
|
157
198
|
|
|
199
|
+
After sign-in, create and operate the durable pipeline from the same checkout.
|
|
200
|
+
The project defaults to `.fz/config.json`; compute/profile attachments remain
|
|
201
|
+
control-plane state rather than fields in the deploy file:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
fz deploy connect --provider github --repository acme/web \
|
|
205
|
+
--clone-url https://github.com/acme/web.git --auth public \
|
|
206
|
+
--target compute-eu@api --target compute-us@api
|
|
207
|
+
fz deploy list
|
|
208
|
+
fz deploy runs --pipeline <pipeline-key>
|
|
209
|
+
fz deploy release --pipeline <pipeline-key> \
|
|
210
|
+
--revision <full-40-character-commit> --wait
|
|
211
|
+
```
|
|
212
|
+
|
|
158
213
|
`init` refuses to invent a generic release or health check: both generated steps
|
|
159
214
|
exit non-zero until the project replaces them. `check` validates the published
|
|
160
215
|
v2 schema and active software coordinates, then prints a formatting-independent
|
|
@@ -209,7 +264,7 @@ only claims assigned to its enrolled hostname, then passes
|
|
|
209
264
|
the fixed claim over a local Unix socket to a narrowly privileged root helper.
|
|
210
265
|
The helper can materialize the audited QEMU profile; it cannot clone a project,
|
|
211
266
|
read Vault data, accept arbitrary commands, or retain tenant credentials. Root
|
|
212
|
-
SSH is an operator-only platform
|
|
267
|
+
SSH is an operator-only platform recovery path, not the normal tenant
|
|
213
268
|
dispatch mechanism.
|
|
214
269
|
|
|
215
270
|
New guests also call this same public `fz agent install --apply --enrol` path
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NodeKeyPair } from '@forgezero/runtime/identity';
|
|
2
2
|
import { type AgentRelease } from './agent-update';
|
|
3
|
-
import { type AgentUpdateResponse } from './agent-update-helper';
|
|
3
|
+
import { type AgentUpdateReceipt, type AgentUpdateResponse } from './agent-update-helper';
|
|
4
|
+
import type { AgentOperationTelemetry } from './telemetry-runtime';
|
|
4
5
|
export interface AgentObservation {
|
|
5
6
|
version: string;
|
|
6
7
|
os: {
|
|
@@ -9,12 +10,18 @@ export interface AgentObservation {
|
|
|
9
10
|
};
|
|
10
11
|
architecture: string;
|
|
11
12
|
mode: 'attested' | 'enrolled';
|
|
13
|
+
update?: AgentUpdateReceipt;
|
|
12
14
|
}
|
|
13
15
|
export interface AgentHeartbeatResponse {
|
|
14
16
|
ok: true;
|
|
15
17
|
nodeKey: string;
|
|
16
18
|
intervalSeconds: number;
|
|
17
19
|
desiredAgentRelease?: AgentRelease;
|
|
20
|
+
desiredAgentUpdate?: {
|
|
21
|
+
attemptId: string;
|
|
22
|
+
leaseExpiresAtTs: number;
|
|
23
|
+
release: AgentRelease;
|
|
24
|
+
};
|
|
18
25
|
}
|
|
19
26
|
export interface AgentHeartbeatOptions {
|
|
20
27
|
apiUrl: string;
|
|
@@ -26,14 +33,17 @@ export interface AgentHeartbeatOptions {
|
|
|
26
33
|
fetch?: (input: URL, init: RequestInit) => Promise<Response>;
|
|
27
34
|
requestTimeoutMs?: number;
|
|
28
35
|
observation?: () => AgentObservation;
|
|
36
|
+
receiptPath?: string;
|
|
37
|
+
now?: () => number;
|
|
29
38
|
/** Stop new lifecycle/deploy claims and await current jobs before replacement. */
|
|
30
39
|
prepareUpdate?: (release: AgentRelease) => Promise<void>;
|
|
31
40
|
/** Restart the drained current process if staging is refused before activation. */
|
|
32
41
|
recoverUpdate?: (cause: unknown) => Promise<void> | void;
|
|
33
|
-
applyUpdate?: (release: AgentRelease, currentVersion: string) => Promise<AgentUpdateResponse>;
|
|
42
|
+
applyUpdate?: (release: AgentRelease, currentVersion: string, attemptId: string) => Promise<AgentUpdateResponse>;
|
|
34
43
|
setTimer?: (callback: () => void, ms: number) => unknown;
|
|
35
44
|
clearTimer?: (handle: unknown) => void;
|
|
36
45
|
onEvent?: (event: string, detail?: unknown) => void;
|
|
46
|
+
telemetry?: AgentOperationTelemetry;
|
|
37
47
|
}
|
|
38
48
|
export declare function observeAgentHost(version?: string, mode?: AgentObservation['mode'], osRelease?: string, architecture?: NodeJS.Architecture): AgentObservation;
|
|
39
49
|
/** One PQ-authenticated observation and optional supervised update decision. */
|