kylon-cli 0.4.1-next.750 → 0.4.1-next.752
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 +59 -69
- package/dist/kylon-bundle.manifest.json +3 -3
- package/dist/kylon-bundle.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -539,78 +539,68 @@ instead of waiting out inactivity timeouts and heartbeat intervals.
|
|
|
539
539
|
|
|
540
540
|
## Remote diagnostics
|
|
541
541
|
|
|
542
|
-
The CLI
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
`
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
542
|
+
The CLI reports to the server through one channel (`src/lib/telemetry.ts`):
|
|
543
|
+
every logger record passes through it after redaction, and what leaves the
|
|
544
|
+
machine depends on the identity the running operation selected. This is event
|
|
545
|
+
logging into the API-to-Grafana Loki pipeline (`service=cli-client`), not
|
|
546
|
+
OpenTelemetry/Tempo tracing. It never ships Grafana credentials and never falls
|
|
547
|
+
back to another saved identity.
|
|
548
|
+
|
|
549
|
+
- **Machine identity** (the computer daemon and its supervisor, locked by the
|
|
550
|
+
computer session): posts to `POST /workspaces/:ws/computers/:id/client-events`
|
|
551
|
+
every `warn`/`error` record, the info-level names on the shared inventory, and
|
|
552
|
+
the daemon lifecycle events (`daemon.started`, `daemon.crash_detected`,
|
|
553
|
+
`daemon.system_wake`, `daemon.shutdown`). Fields are flattened one level and
|
|
554
|
+
bounded (32 keys, 300 characters); a prose message is normalized to a
|
|
555
|
+
snake_case name with the wording kept in `text`. The server stamps
|
|
556
|
+
`p2EventType=cli_daemon_event` and the machine's CLI version and OS, holds
|
|
557
|
+
each machine to 300 events per 5 minutes, and announces what it dropped or
|
|
558
|
+
rejected. The operator's `remoteDiagnostics` gateway setting is the consent
|
|
559
|
+
for this path, read at every flush.
|
|
560
|
+
- **User identity** (any other command once it has a credential): posts to
|
|
561
|
+
`POST /client-logs/cli` under the event and field allowlists in
|
|
562
|
+
`@p2/types/cli-telemetry`, so a command never uploads paths, prompts, argv,
|
|
563
|
+
or arbitrary error text. Identity and workspace attribution come from server
|
|
564
|
+
authentication, not client fields.
|
|
565
|
+
- **Anonymous** (status (`status`/`auth status`, `gateway status`), `diagnose`,
|
|
566
|
+
the upgrade commands (`upgrade`, `provider update`, `gateway service`), and a
|
|
567
|
+
failed login): the same URL without a credential, command outcomes only,
|
|
568
|
+
with an even narrower metadata allowlist. Other commands never fall back to
|
|
569
|
+
anonymous submission when authentication fails.
|
|
570
|
+
|
|
571
|
+
Telemetry initialization calls the installation store's `ensure()`:
|
|
572
|
+
`install.json` in the CLI configuration directory holds the random `installId`,
|
|
573
|
+
sent as `install_id` on every record. It is created before login and reused
|
|
574
|
+
across runs; deleting the file resets it, copying the configuration can
|
|
575
|
+
duplicate it. It identifies an installation, not a device or a person, so these
|
|
576
|
+
are pseudonymous diagnostics. If the installation cannot be read or created,
|
|
577
|
+
telemetry stays off.
|
|
578
|
+
|
|
579
|
+
Set `KYLON_TELEMETRY_DISABLED=1` in the CLI/daemon process environment to turn
|
|
580
|
+
the whole channel off; local diagnostic logs are unchanged. Restart a running
|
|
581
|
+
daemon after changing its environment.
|
|
582
|
+
|
|
583
|
+
Delivery: a bounded queue of 200 records (oldest dropped first, the count
|
|
584
|
+
announced as `gateway.remote_events.dropped_locally`), one batch of up to 20
|
|
585
|
+
every five seconds, plus an immediate flush for the daemon lifecycle events. A
|
|
586
|
+
`401`, `403`, or `404` stops the channel for the rest of the process; any other
|
|
587
|
+
failure keeps the batch and backs off, doubling from 30 seconds to 5 minutes.
|
|
588
|
+
Requests do not follow redirects; a command's request is cut after 800 ms, the
|
|
589
|
+
daemon's after 5 seconds. Normal command completion flushes the latest batch;
|
|
590
|
+
hard kills can lose events. The API limits each user identity to 60 batches per
|
|
591
|
+
minute and 32 KiB per batch, anonymous sources to 20 batches per minute per
|
|
592
|
+
hashed IP.
|
|
590
593
|
|
|
591
594
|
### Event inventory
|
|
592
595
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
It also forwards **25 existing event names**, covering command failure,
|
|
602
|
-
gateway connection failures/reconnect scheduling, assignment receipt/acceptance,
|
|
603
|
-
provider execution, cancellation, result delivery/outbox replay, supervisor
|
|
604
|
-
lifecycle and upgrade outcomes. The shared allowlist is the exact inventory.
|
|
605
|
-
Unexpected command exceptions now reuse `cli.command_failed` instead of an
|
|
606
|
-
unstructured event name. Workspace API failures are captured in the shared
|
|
607
|
-
workspace client; other HTTP clients retain their existing selected diagnostics.
|
|
608
|
-
Successful HTTP requests are not uploaded in this first version.
|
|
609
|
-
|
|
610
|
-
Validation extends the existing logger and API route tests, plus the real
|
|
611
|
-
credential/middleware integration test for CLI/computer keys and forbidden
|
|
612
|
-
sibling/read routes. Live customer-machine-to-Grafana verification is still
|
|
613
|
-
required after deployment; these tests do not prove Grafana delivery.
|
|
596
|
+
Info-level names are the shared inventory in `@p2/types/cli-telemetry`:
|
|
597
|
+
command lifecycle (`cli.command.started`, `cli.command.completed`,
|
|
598
|
+
`cli.command_failed`, `cli.api.failed`), connection open/close, gateway
|
|
599
|
+
connection failures and reconnect scheduling, assignment receipt and
|
|
600
|
+
acceptance, provider execution, cancellation, result delivery and outbox
|
|
601
|
+
replay, supervisor lifecycle, and upgrade outcomes. A machine identity adds
|
|
602
|
+
every warn/error record and the daemon lifecycle; a user identity is limited to
|
|
603
|
+
the inventory on both ends.
|
|
614
604
|
|
|
615
605
|
## State Model
|
|
616
606
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.4.1-next.
|
|
3
|
-
"fingerprint": "
|
|
4
|
-
"source_commit": "
|
|
2
|
+
"version": "0.4.1-next.752",
|
|
3
|
+
"fingerprint": "72d4e7b056b874c4e1c0c7994fac93eafa335cce5cc34863901250db72a170aa",
|
|
4
|
+
"source_commit": "8b9d1cc7d5420e7bb082a18a9fd89cf31dff164f"
|
|
5
5
|
}
|