@akilium/telemetry-collector 0.1.7 → 0.1.8
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 +1 -1
- package/bin/akilium-telemetry.mjs +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Before changing an existing operations-managed installation, run `akilium-teleme
|
|
|
12
12
|
|
|
13
13
|
## Protected enrollment
|
|
14
14
|
|
|
15
|
-
An operator prepares a setup link in **Connections → Telemetry enrollment**. On the intended computer, use the endpoint from
|
|
15
|
+
An operator prepares a setup link in **Connections → Telemetry enrollment**. On a new reporter, install the collector service with `akilium-telemetry install --mode native --agents codex` (or use `--mode docker`). On the intended computer, use the endpoint from the setup link and paste the invitation at the hidden prompt:
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
18
|
akilium-telemetry login --endpoint https://YOUR_PROJECT.supabase.co --name "My laptop" --invite-stdin
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
readJson, fileBytes,
|
|
14
14
|
} from "../lib/agent-telemetry.mjs";
|
|
15
15
|
|
|
16
|
+
const CLI_VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
16
17
|
const [action = "help", ...args] = process.argv.slice(2);
|
|
17
18
|
const home = process.env.AGENT_TELEMETRY_HOME || homedir();
|
|
18
19
|
const p = paths(home);
|
|
@@ -393,7 +394,7 @@ async function managedLogin() {
|
|
|
393
394
|
};
|
|
394
395
|
if (!started || !started.expiresAt || Date.parse(started.expiresAt) <= Date.now()) {
|
|
395
396
|
const machineName = option("--name", process.env.HOSTNAME || "local collector");
|
|
396
|
-
const created = await post("/start", {machineName,collectorVersion:
|
|
397
|
+
const created = await post("/start", {machineName,collectorVersion:CLI_VERSION});
|
|
397
398
|
if (!created || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(created.requestId ?? "") || !/^AKLA-[0-9A-HJKMNP-TV-Z]{5}-[0-9A-HJKMNP-TV-Z]{5}$/.test(created.code ?? "") || !validSecret(created.pollSecret) || !Number.isFinite(Date.parse(created.expiresAt)))
|
|
398
399
|
throw new Error("Invalid device-link response");
|
|
399
400
|
started = {...created, endpoint:origin, machineName, version:2, claimed:false};
|