progon-agent 1.1.2 → 1.2.0
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 +48 -33
- package/dist/supervisor/cli.js +57 -48
- package/extension-bundle.json +3 -3
- package/extension-dist/background/background.js +26 -26
- package/extension-dist/content/content.css +1 -1
- package/extension-dist/content/content.js +75 -75
- package/extension-dist/manifest.json +1 -1
- package/extension-dist/popup/popup.css +1 -1
- package/extension-dist/popup/popup.js +12 -12
- package/extension-dist/sidepanel/sidepanel.css +1 -1
- package/extension-dist/sidepanel/sidepanel.js +37 -35
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -99,11 +99,14 @@ The enrollment dialog in Progon (**Settings → Agents**) hands you the complete
|
|
|
99
99
|
machine, install included:
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
|
-
npm i -g progon-agent && progon-agent enroll <code>
|
|
102
|
+
npm i -g progon-agent && progon-agent enroll <code> && progon-agent start
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
No address is needed: this package was built for one deployment and carries its address
|
|
106
|
+
(`extension-bundle.json`), so `enroll` knows where to go. The dialog may hand you the longer form
|
|
107
|
+
with `--server "https://your-progon-host"` — that still works and still wins over the built-in
|
|
108
|
+
address; it is simply no longer required. Either way the server is persisted next to the
|
|
109
|
+
credential, so every later `progon-agent start` needs nothing of its own.
|
|
107
110
|
|
|
108
111
|
On Windows, run this in PowerShell 7 or cmd — Windows PowerShell 5.1 does not support `&&`;
|
|
109
112
|
there, run the commands one at a time.
|
|
@@ -138,11 +141,12 @@ Enrollment binds this machine to one agent record in your Progon company and giv
|
|
|
138
141
|
3. On the agent machine, run:
|
|
139
142
|
|
|
140
143
|
```bash
|
|
141
|
-
progon-agent enroll <code>
|
|
144
|
+
progon-agent enroll <code>
|
|
142
145
|
```
|
|
143
146
|
|
|
144
|
-
`--server`
|
|
145
|
-
|
|
147
|
+
`--server "https://your-progon-host"` may be added and takes precedence over everything else; it is
|
|
148
|
+
needed only when this build carries no deployment of its own (a source checkout) or when you mean a
|
|
149
|
+
different one. (On a machine that is already enrolled the server is read from the state file
|
|
146
150
|
instead — but so is the credential, and the command then refuses the code rather than spending it,
|
|
147
151
|
because a credential already exists.) The command redeems the code, persists the credential — the
|
|
148
152
|
server URL with it — and exits: it does not start the daemon, does not download Chromium and does
|
|
@@ -249,8 +253,13 @@ Precedence, highest first:
|
|
|
249
253
|
1. **`--server <url>`** on the `enroll` command — it sets `PROGON_SERVER_URL` for that one process.
|
|
250
254
|
2. **`PROGON_SERVER_URL`** in the environment.
|
|
251
255
|
3. **The enrolled deployment** — the `serverUrl` this machine's state file records. This is why
|
|
252
|
-
`progon-agent start` needs
|
|
253
|
-
|
|
256
|
+
`progon-agent start` needs nothing after `enroll`: the URL was persisted together with the
|
|
257
|
+
credential it belongs to.
|
|
258
|
+
4. **The deployment this package was built for** — `appUrl` in `extension-bundle.json` inside the
|
|
259
|
+
installed package, the same address the bundled extension is compiled against (see the top of
|
|
260
|
+
this file). This is why a clean machine needs no address at all. A **source checkout has no such
|
|
261
|
+
file** — nothing writes it outside the publish pipeline — so there you must pass `--server` or
|
|
262
|
+
export `PROGON_SERVER_URL`.
|
|
254
263
|
|
|
255
264
|
Two rules complete it:
|
|
256
265
|
|
|
@@ -261,9 +270,9 @@ Two rules complete it:
|
|
|
261
270
|
for recovering from a state file that cannot be read — so on that path the state file is not
|
|
262
271
|
consulted for the server either, and `PROGON_SERVER_URL` is required.
|
|
263
272
|
|
|
264
|
-
|
|
265
|
-
says so and names
|
|
266
|
-
it reads no configuration at all.
|
|
273
|
+
If none of the four names a deployment — a source checkout, not enrolled, nothing exported — every
|
|
274
|
+
command that needs a server says so and names each place it looked. `progon-agent install-browser`
|
|
275
|
+
is the exception that needs none of them: it reads no configuration at all.
|
|
267
276
|
|
|
268
277
|
### Enrolling one machine into two deployments
|
|
269
278
|
|
|
@@ -288,8 +297,10 @@ progon-agent start
|
|
|
288
297
|
```
|
|
289
298
|
|
|
290
299
|
Requires an enrolled machine, and nothing else: the server comes from the state file the
|
|
291
|
-
enrollment wrote
|
|
292
|
-
|
|
300
|
+
enrollment wrote — and on a machine that has not enrolled, from the deployment this package was
|
|
301
|
+
built for, which is why the error you get there names the missing enrollment rather than a missing
|
|
302
|
+
variable. (Set `PROGON_SERVER_URL` and it must match the enrollment.) The daemon boots
|
|
303
|
+
(config → identity →
|
|
293
304
|
extension dist → Chromium → gateway), then reconciles the backend's desired state and executes the
|
|
294
305
|
runs it is given, until you stop it.
|
|
295
306
|
|
|
@@ -332,18 +343,18 @@ A `401` is _not_ revocation: it backs off and retries, and never wipes anything.
|
|
|
332
343
|
|
|
333
344
|
### Runtime
|
|
334
345
|
|
|
335
|
-
| Variable | Required
|
|
336
|
-
| ----------------------------------- |
|
|
337
|
-
| `PROGON_SERVER_URL` |
|
|
338
|
-
| `PROGON_AGENT_TOKEN` | no
|
|
339
|
-
| `PROGON_AGENT_ENROLL_CODE` | no
|
|
340
|
-
| `PROGON_RUNNER_STATE_DIR` | no
|
|
341
|
-
| `PROGON_AGENT_EXTENSION_DIST` | no
|
|
342
|
-
| `PROGON_AGENT_HEADFUL` | no
|
|
343
|
-
| `PROGON_AGENT_ALLOW_INSECURE_HTTPS` | no
|
|
344
|
-
| `PROGON_AGENT_EXTRA_CA_CERTS` | no
|
|
345
|
-
| `PROGON_LOG_LEVEL` | no
|
|
346
|
-
| `NODE_ENV` | no
|
|
346
|
+
| Variable | Required | Meaning |
|
|
347
|
+
| ----------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
348
|
+
| `PROGON_SERVER_URL` | no (source checkouts: yes) | Base URL of the Progon backend. `https://` only, except loopback hosts. Scheme + host + optional path prefix — **no** embedded credentials, **no** query string, **no** fragment (the agent-gateway routes are appended to it). An installed package does not need it: the URL comes from this machine's enrollment, else from the deployment the package was built for. Setting it to a deployment other than the enrollment makes `start` refuse. Required only on a build that carries no bundled deployment. See [Which server the daemon uses](#which-server-the-daemon-uses). |
|
|
349
|
+
| `PROGON_AGENT_TOKEN` | no | An existing `pgat_` credential. Takes precedence over the state file — this is the rotation mechanism. Must match the `pgat_` wire format; set-but-empty is rejected. |
|
|
350
|
+
| `PROGON_AGENT_ENROLL_CODE` | no | One-shot enrollment code, the env form of `progon-agent enroll <code>`. Must be at least 32 characters. |
|
|
351
|
+
| `PROGON_RUNNER_STATE_DIR` | no | Overrides the platform state directory. **Required** on platforms other than darwin/linux/win32, and when the user has no home directory. |
|
|
352
|
+
| `PROGON_AGENT_EXTENSION_DIST` | no | Absolute path of an already agent-mode qa-extension dist, replacing the bundled one (dev/E2E). Relative paths are rejected. |
|
|
353
|
+
| `PROGON_AGENT_HEADFUL` | no | `true`/`false`/`1`/`0`. Shows the browser window on this machine's desktop. Default `false`. It can only turn headful **on** — the server still decides per run. Any other value is rejected. |
|
|
354
|
+
| `PROGON_AGENT_ALLOW_INSECURE_HTTPS` | no | `true`/`false`/`1`/`0`. The run browser opens a stand whose certificate it cannot verify — a self-signed internal stand. Default `false`. Any other value is rejected. See [Self-signed stands](#self-signed-stands). |
|
|
355
|
+
| `PROGON_AGENT_EXTRA_CA_CERTS` | no | Absolute path to a readable PEM bundle whose authority the **agent's own** connections to the backend trust, on top of the public roots. Refused at startup if the path is relative or the file cannot be read. Does not reach the browser. |
|
|
356
|
+
| `PROGON_LOG_LEVEL` | no | pino log level. Default: `info` when `NODE_ENV=production`, `debug` otherwise. |
|
|
357
|
+
| `NODE_ENV` | no | Default `production`. Anything else additionally switches logging to human-readable `pino-pretty` output. |
|
|
347
358
|
|
|
348
359
|
### Inherited by the Chromium installer and launch
|
|
349
360
|
|
|
@@ -407,14 +418,18 @@ is set to something the enrollment does not match. Point it back, unset it — a
|
|
|
407
418
|
reads the server from its own state file — or remove the state file and enroll against the new
|
|
408
419
|
deployment.
|
|
409
420
|
|
|
410
|
-
**`start` fails saying
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
`PROGON_RUNNER_STATE_DIR` set, `start` needs the same
|
|
415
|
-
its server are. Exporting `PROGON_SERVER_URL` alone
|
|
416
|
-
server but no agent, so the next step refuses for want of an
|
|
417
|
-
alongside `PROGON_AGENT_TOKEN`.
|
|
421
|
+
**`start` fails saying the agent does not know which deployment to talk to.** None of the places
|
|
422
|
+
it looks names one: no `PROGON_SERVER_URL`, no state file in the state directory, and no
|
|
423
|
+
`extension-bundle.json` — the last of which means you are running a source checkout, since every
|
|
424
|
+
published package has one. Pass `--server "https://your-progon-host"` to `enroll`, or export
|
|
425
|
+
`PROGON_SERVER_URL`. If you enrolled with `PROGON_RUNNER_STATE_DIR` set, `start` needs the same
|
|
426
|
+
variable — that is where the credential and its server are. Exporting `PROGON_SERVER_URL` alone
|
|
427
|
+
does not make `start` work: it names a server but no agent, so the next step refuses for want of an
|
|
428
|
+
identity — it is enough only alongside `PROGON_AGENT_TOKEN`.
|
|
429
|
+
|
|
430
|
+
**`start` on an installed package says this machine has no agent identity.** The server was found
|
|
431
|
+
(the deployment this package was built for), but the machine has never enrolled. Run
|
|
432
|
+
`progon-agent enroll` — no address needed.
|
|
418
433
|
|
|
419
434
|
**The daemon exits 1 mid-run reporting a revocation.** The agent was revoked server-side and its
|
|
420
435
|
local credential has been wiped. Mint a new code and re-enroll — see
|