@decantr/cli 2.3.0 → 2.3.1
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 +5 -0
- package/dist/bin.js +1 -1
- package/dist/{chunk-FSZ6OIAC.js → chunk-2JWVKBNB.js} +85 -0
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ decantr check
|
|
|
82
82
|
decantr health --ci --fail-on error
|
|
83
83
|
decantr studio --port 4319 --host 127.0.0.1
|
|
84
84
|
decantr telemetry status
|
|
85
|
+
decantr telemetry explain
|
|
85
86
|
decantr telemetry link --enable --org <org-slug>
|
|
86
87
|
decantr content-health --ci --fail-on error
|
|
87
88
|
decantr registry summary --namespace @official --json
|
|
@@ -135,12 +136,16 @@ If the project has explicitly enabled Decantr CLI telemetry, `new --telemetry`,
|
|
|
135
136
|
```bash
|
|
136
137
|
decantr telemetry status
|
|
137
138
|
decantr telemetry status --json
|
|
139
|
+
decantr telemetry explain
|
|
140
|
+
decantr telemetry explain --json
|
|
138
141
|
decantr login --api-key=<key>
|
|
139
142
|
decantr telemetry link --enable --org <org-slug>
|
|
140
143
|
```
|
|
141
144
|
|
|
142
145
|
`telemetry link` calls the hosted `/v1/me/telemetry-link` endpoint with only opaque ids, optional org slug, and optional label. The API verifies org membership, writes `telemetry_identity_aliases`, clears the actor-resolution cache, audit logs the change, and emits `telemetry.identity_linked`.
|
|
143
146
|
|
|
147
|
+
`telemetry explain` prints the CLI event catalog subset, aggregate field categories, current opaque ids if they already exist, and the explicit never-collected list. It is designed for security review and customer trust conversations before a team opts in.
|
|
148
|
+
|
|
144
149
|
## Content Health
|
|
145
150
|
|
|
146
151
|
`decantr content-health` is the local supply-chain observability command for registry content repositories such as `decantr-content`. It is separate from Project Health: Project Health checks an end-user app against its Decantr contract, while Content Health checks published content inputs before they flow into the hosted registry.
|
package/dist/bin.js
CHANGED
|
@@ -4184,6 +4184,7 @@ function resolveDriftEntries(projectRoot, options) {
|
|
|
4184
4184
|
}
|
|
4185
4185
|
|
|
4186
4186
|
// src/commands/telemetry.ts
|
|
4187
|
+
import { DECANTR_TELEMETRY_EVENT_CATALOG } from "@decantr/telemetry";
|
|
4187
4188
|
var BOLD5 = "\x1B[1m";
|
|
4188
4189
|
var CYAN6 = "\x1B[36m";
|
|
4189
4190
|
var DIM11 = "\x1B[2m";
|
|
@@ -4201,6 +4202,10 @@ async function cmdTelemetry(args, projectRoot = process.cwd()) {
|
|
|
4201
4202
|
printTelemetryStatus(projectRoot, options);
|
|
4202
4203
|
return;
|
|
4203
4204
|
}
|
|
4205
|
+
if (subcommand === "explain") {
|
|
4206
|
+
printTelemetryExplain(projectRoot, options);
|
|
4207
|
+
return;
|
|
4208
|
+
}
|
|
4204
4209
|
if (subcommand === "link") {
|
|
4205
4210
|
await linkTelemetryIdentity(projectRoot, options);
|
|
4206
4211
|
return;
|
|
@@ -4213,11 +4218,13 @@ ${BOLD5}decantr telemetry${RESET11} \u2014 Inspect and link privacy-filtered CLI
|
|
|
4213
4218
|
|
|
4214
4219
|
${BOLD5}Usage:${RESET11}
|
|
4215
4220
|
decantr telemetry status [--json]
|
|
4221
|
+
decantr telemetry explain [--json]
|
|
4216
4222
|
decantr telemetry link [--enable] [--org <slug>] [--label <label>] [--api-key <key>] [--api-url <url>]
|
|
4217
4223
|
|
|
4218
4224
|
${BOLD5}Examples:${RESET11}
|
|
4219
4225
|
decantr init --telemetry
|
|
4220
4226
|
decantr telemetry status
|
|
4227
|
+
decantr telemetry explain
|
|
4221
4228
|
decantr login --api-key=<your-key>
|
|
4222
4229
|
decantr telemetry link --org my-team --label "CI runner"
|
|
4223
4230
|
`);
|
|
@@ -4242,6 +4249,82 @@ ${BOLD5}Decantr telemetry${RESET11}`);
|
|
|
4242
4249
|
console.log(DIM11 + "Run `decantr init --telemetry` or `decantr telemetry link --enable` to opt in." + RESET11);
|
|
4243
4250
|
}
|
|
4244
4251
|
}
|
|
4252
|
+
function printTelemetryExplain(projectRoot, options) {
|
|
4253
|
+
const status = getCliTelemetryIdentityStatus(projectRoot, { create: false });
|
|
4254
|
+
const cliEvents = DECANTR_TELEMETRY_EVENT_CATALOG.filter((entry) => entry.allowedSources.includes("cli")).map((entry) => ({
|
|
4255
|
+
name: entry.name,
|
|
4256
|
+
bucket: entry.bucket,
|
|
4257
|
+
privacy: entry.privacy,
|
|
4258
|
+
publicIngest: entry.publicIngest,
|
|
4259
|
+
notes: entry.privacyNotes
|
|
4260
|
+
}));
|
|
4261
|
+
const report = {
|
|
4262
|
+
source: "cli",
|
|
4263
|
+
enabled: status.enabled,
|
|
4264
|
+
hasProjectConfig: status.hasProjectConfig,
|
|
4265
|
+
identifiers: {
|
|
4266
|
+
installId: status.installId ?? null,
|
|
4267
|
+
projectId: status.projectId ?? null,
|
|
4268
|
+
meaning: "Opaque Decantr-generated ids used only when this project has opted into CLI telemetry."
|
|
4269
|
+
},
|
|
4270
|
+
endpoint: process.env.DECANTR_TELEMETRY_ENDPOINT ?? "https://api.decantr.ai/v1/telemetry/events",
|
|
4271
|
+
events: cliEvents,
|
|
4272
|
+
aggregateFields: [
|
|
4273
|
+
"command name",
|
|
4274
|
+
"success or failure",
|
|
4275
|
+
"duration",
|
|
4276
|
+
"workflow and adoption mode",
|
|
4277
|
+
"project scope",
|
|
4278
|
+
"registry source",
|
|
4279
|
+
"aggregate analyze counts",
|
|
4280
|
+
"Project Health status, score, and finding counts",
|
|
4281
|
+
"CI gate outcome",
|
|
4282
|
+
"Studio start and refresh activity",
|
|
4283
|
+
"remediation prompt request outcome"
|
|
4284
|
+
],
|
|
4285
|
+
neverCollected: [
|
|
4286
|
+
"source code",
|
|
4287
|
+
"prompt text",
|
|
4288
|
+
"local file paths",
|
|
4289
|
+
"repository names",
|
|
4290
|
+
"emails",
|
|
4291
|
+
"secrets",
|
|
4292
|
+
"raw route names",
|
|
4293
|
+
"private package slugs",
|
|
4294
|
+
"health report bodies",
|
|
4295
|
+
"finding evidence"
|
|
4296
|
+
],
|
|
4297
|
+
controls: {
|
|
4298
|
+
optIn: "Run decantr init --telemetry, decantr new --telemetry, or decantr telemetry link --enable.",
|
|
4299
|
+
optOut: 'Set "telemetry": false in .decantr/project.json.',
|
|
4300
|
+
link: "Run decantr telemetry link after login to attach opaque ids to your Decantr account/org."
|
|
4301
|
+
}
|
|
4302
|
+
};
|
|
4303
|
+
if (options.json) {
|
|
4304
|
+
console.log(JSON.stringify(report, null, 2));
|
|
4305
|
+
return;
|
|
4306
|
+
}
|
|
4307
|
+
console.log(`
|
|
4308
|
+
${BOLD5}Decantr telemetry explanation${RESET11}`);
|
|
4309
|
+
console.log(` Source: cli`);
|
|
4310
|
+
console.log(` Enabled: ${status.enabled ? `${GREEN11}yes${RESET11}` : "no"}`);
|
|
4311
|
+
console.log(` Install ID: ${status.installId ?? `${DIM11}not created yet${RESET11}`}`);
|
|
4312
|
+
console.log(` Project ID: ${status.projectId ?? `${DIM11}not created yet${RESET11}`}`);
|
|
4313
|
+
console.log(` Events: ${cliEvents.length} CLI event types in the public catalog`);
|
|
4314
|
+
console.log(`
|
|
4315
|
+
${BOLD5}Aggregate fields${RESET11}`);
|
|
4316
|
+
for (const field of report.aggregateFields) {
|
|
4317
|
+
console.log(` - ${field}`);
|
|
4318
|
+
}
|
|
4319
|
+
console.log(`
|
|
4320
|
+
${BOLD5}Never collected${RESET11}`);
|
|
4321
|
+
for (const field of report.neverCollected) {
|
|
4322
|
+
console.log(` - ${field}`);
|
|
4323
|
+
}
|
|
4324
|
+
console.log(`
|
|
4325
|
+
${DIM11}${report.controls.optOut}${RESET11}`);
|
|
4326
|
+
console.log(`${DIM11}${report.controls.link}${RESET11}`);
|
|
4327
|
+
}
|
|
4245
4328
|
async function linkTelemetryIdentity(projectRoot, options) {
|
|
4246
4329
|
if (options.enable && !isOptedIn(projectRoot)) {
|
|
4247
4330
|
optIn(projectRoot);
|
|
@@ -7233,6 +7316,7 @@ ${BOLD7}Usage:${RESET14}
|
|
|
7233
7316
|
decantr content-health [--json] [--markdown] [--ci]
|
|
7234
7317
|
decantr studio [--port 4319] [--host 127.0.0.1] [--report decantr-health.json]
|
|
7235
7318
|
decantr telemetry status [--json]
|
|
7319
|
+
decantr telemetry explain [--json]
|
|
7236
7320
|
decantr telemetry link [--enable] [--org <slug>]
|
|
7237
7321
|
decantr rules preview [--project=<path>]
|
|
7238
7322
|
decantr rules apply [--project=<path>]
|
|
@@ -7320,6 +7404,7 @@ ${BOLD7}Examples:${RESET14}
|
|
|
7320
7404
|
decantr studio
|
|
7321
7405
|
decantr studio --report decantr-health.json
|
|
7322
7406
|
decantr telemetry status
|
|
7407
|
+
decantr telemetry explain
|
|
7323
7408
|
decantr telemetry link --enable --org my-team
|
|
7324
7409
|
decantr audit
|
|
7325
7410
|
decantr audit src/pages/HomePage.tsx
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decantr/cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Decantr CLI - scaffold, audit, inspect Project Health, and maintain Decantr projects from the terminal",
|
|
5
5
|
"author": "Decantr AI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ajv": "^8.20.0",
|
|
34
34
|
"@decantr/core": "2.0.0",
|
|
35
|
-
"@decantr/telemetry": "2.2.
|
|
36
|
-
"@decantr/
|
|
35
|
+
"@decantr/telemetry": "2.2.1",
|
|
36
|
+
"@decantr/essence-spec": "2.0.1",
|
|
37
37
|
"@decantr/verifier": "2.0.0",
|
|
38
|
-
"@decantr/
|
|
38
|
+
"@decantr/registry": "2.0.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsup",
|