pi-skillful 0.3.1 → 0.3.2
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/install-telemetry.ts +28 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ This project follows the spirit of [Keep a Changelog](https://keepachangelog.com
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.2] - 2026-05-10
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Disabled install telemetry reporting when running in CI workflows.
|
|
14
|
+
|
|
9
15
|
## [0.3.1] - 2026-05-10
|
|
10
16
|
|
|
11
17
|
### Added
|
package/package.json
CHANGED
package/src/install-telemetry.ts
CHANGED
|
@@ -7,6 +7,22 @@ import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
|
7
7
|
const PACKAGE_NAME = "pi-skillful";
|
|
8
8
|
const INSTALL_TELEMETRY_URL = "https://mocito.dev/api/report-install";
|
|
9
9
|
const INSTALL_TELEMETRY_TIMEOUT_MS = 5000;
|
|
10
|
+
const CI_ENVIRONMENT_VARIABLES = [
|
|
11
|
+
"APPVEYOR",
|
|
12
|
+
"BITBUCKET_BUILD_NUMBER",
|
|
13
|
+
"BUILDKITE",
|
|
14
|
+
"CIRCLECI",
|
|
15
|
+
"CODESPACES",
|
|
16
|
+
"DRONE",
|
|
17
|
+
"GITHUB_ACTIONS",
|
|
18
|
+
"GITLAB_CI",
|
|
19
|
+
"JENKINS_URL",
|
|
20
|
+
"NETLIFY",
|
|
21
|
+
"TEAMCITY_VERSION",
|
|
22
|
+
"TF_BUILD",
|
|
23
|
+
"TRAVIS",
|
|
24
|
+
"VERCEL",
|
|
25
|
+
];
|
|
10
26
|
|
|
11
27
|
interface InstallTelemetryState {
|
|
12
28
|
lastReportedVersion?: string;
|
|
@@ -29,7 +45,19 @@ function isTruthyEnvFlag(value: string | undefined): boolean {
|
|
|
29
45
|
return value === "1" || value.toLowerCase() === "true" || value.toLowerCase() === "yes";
|
|
30
46
|
}
|
|
31
47
|
|
|
48
|
+
function isPresentEnvFlag(value: string | undefined): boolean {
|
|
49
|
+
if (!value) return false;
|
|
50
|
+
const normalized = value.toLowerCase();
|
|
51
|
+
return normalized !== "0" && normalized !== "false" && normalized !== "no";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function isCiEnvironment(): boolean {
|
|
55
|
+
if (isTruthyEnvFlag(process.env.CI)) return true;
|
|
56
|
+
return CI_ENVIRONMENT_VARIABLES.some((name) => isPresentEnvFlag(process.env[name]));
|
|
57
|
+
}
|
|
58
|
+
|
|
32
59
|
function isInstallTelemetryEnabled(): boolean {
|
|
60
|
+
if (isCiEnvironment()) return false;
|
|
33
61
|
if (isTruthyEnvFlag(process.env.PI_OFFLINE)) return false;
|
|
34
62
|
if (process.env.PI_TELEMETRY !== undefined) return isTruthyEnvFlag(process.env.PI_TELEMETRY);
|
|
35
63
|
|