@pippit-dev/cli 1.0.37 → 1.0.38

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 CHANGED
@@ -369,9 +369,9 @@ npx @pippit-dev/cli install --source HOST
369
369
  pippit-tool-cli update --source HOST
370
370
  ```
371
371
 
372
- 直接使用 `npm install -g @pippit-dev/cli` 时,可由宿主在该次命令的环境中设置 `PIPPIT_CLI_SOURCE`。install/update 的显式 `--source` 优先于此环境变量;首尾空白去除,显式空值清空来源。该值不持久化;生成命令运行环境中若也存在此变量,同样会读取它作为宿主来源,具体兜底规则见下文。
372
+ 直接使用 `npm install -g @pippit-dev/cli` 时,可由宿主在该次命令的环境中设置 `PIPPIT_CLI_SOURCE`。安装和更新均按显式 `--source`(命令支持时)、`PIPPIT_CLI_SOURCE`、已核实宿主运行标记的顺序识别来源;首尾空白去除,显式空值清空来源。该值不持久化;生成命令运行环境中若也存在此变量,同样会读取它作为宿主来源,具体兜底规则见下文。
373
373
 
374
- `report_telemetry` 新增可选请求字段 `host_platform` 上报宿主标识;原有 `source` 保留 `npm_install`、`npx_install`、`cli_update`,`event` 区分 install/update,`platform` 仍表示操作系统。当前仅完成 CLI 字段上报,服务端协议和指标接收仍需适配。帮助不安装也不上报,`PIPPIT_CLI_DISABLE_TELEMETRY=1` 仍可关闭上报。内部 `install-cli.js` 仅安装二进制,沿用不安装 Skill、不上报的原有行为。
374
+ `report_telemetry` 新增可选请求字段 `host_platform` 上报宿主标识;原有 `source` 保留 `npm_install`、`npx_install`、`cli_update`,`event` 区分 install/update,`platform` 仍表示操作系统。服务端通过独立的 `host_platform` 指标标签统计宿主来源。帮助不安装也不上报,`PIPPIT_CLI_DISABLE_TELEMETRY=1` 仍可关闭上报。内部 `install-cli.js` 仅安装二进制,沿用不安装 Skill、不上报的原有行为。
375
375
 
376
376
  ### 宿主来源统计
377
377
 
package/checksums.txt CHANGED
@@ -1,6 +1,6 @@
1
- ef54466711739e6d6060dbdc5dd186d3953f76a65e613d028c5f4ee2e33bd9f4 pippit-tool-cli-1.0.37-darwin-amd64.tar.gz
2
- 56c413f48de1e411f0cfefbe20f7589a0c4baaa66c49e640ef034dc683eec4a6 pippit-tool-cli-1.0.37-darwin-arm64.tar.gz
3
- 48647c2756b5a6007385bfcaa4566907e7f80098fdd912dbb22314f840cdef19 pippit-tool-cli-1.0.37-linux-amd64.tar.gz
4
- c7f6c85f512b4ccb4a524515178e5e0cf56009ff8ec0628bc2db780c0f248cfb pippit-tool-cli-1.0.37-linux-arm64.tar.gz
5
- 6d5ab207b53ded67b1be1ee8cd7f7eb7725f3f87a6c83d2115feb0e3acdf5bef pippit-tool-cli-1.0.37-windows-amd64.zip
6
- d180077635826e968629278da2c17d5e8f733238db94e74ece273d2be36e6b9f pippit-tool-cli-1.0.37-windows-arm64.zip
1
+ 3fca50bc9ffb2c14e74ea65781fb706d4fa2c79484d5b20b3c08ad15847afc30 pippit-tool-cli-1.0.38-darwin-amd64.tar.gz
2
+ 0e7d976179d944a2b8f99800acb91c6d3c035f0920cf4ec4348010b3a03d9e38 pippit-tool-cli-1.0.38-darwin-arm64.tar.gz
3
+ 4f5723713fc910121982885172079ab1e787d2af9f2515961e59f7e53ba48737 pippit-tool-cli-1.0.38-linux-amd64.tar.gz
4
+ 07d8ff5920dfa6748ad46076fcffbabc7b5d8dcef6714d802c7fa5b4b515494e pippit-tool-cli-1.0.38-linux-arm64.tar.gz
5
+ 61f18a00f457ffff80c20593b3c0af84b93a3e8db871b00ed043f61024c6b441 pippit-tool-cli-1.0.38-windows-amd64.zip
6
+ c07399e11956f7c6565e00c74a24f864012613539a61341636f9900d85a72654 pippit-tool-cli-1.0.38-windows-arm64.zip
@@ -1,6 +1,6 @@
1
- ef54466711739e6d6060dbdc5dd186d3953f76a65e613d028c5f4ee2e33bd9f4 pippit-tool-cli-1.0.37-darwin-amd64.tar.gz
2
- 56c413f48de1e411f0cfefbe20f7589a0c4baaa66c49e640ef034dc683eec4a6 pippit-tool-cli-1.0.37-darwin-arm64.tar.gz
3
- 48647c2756b5a6007385bfcaa4566907e7f80098fdd912dbb22314f840cdef19 pippit-tool-cli-1.0.37-linux-amd64.tar.gz
4
- c7f6c85f512b4ccb4a524515178e5e0cf56009ff8ec0628bc2db780c0f248cfb pippit-tool-cli-1.0.37-linux-arm64.tar.gz
5
- 6d5ab207b53ded67b1be1ee8cd7f7eb7725f3f87a6c83d2115feb0e3acdf5bef pippit-tool-cli-1.0.37-windows-amd64.zip
6
- d180077635826e968629278da2c17d5e8f733238db94e74ece273d2be36e6b9f pippit-tool-cli-1.0.37-windows-arm64.zip
1
+ 3fca50bc9ffb2c14e74ea65781fb706d4fa2c79484d5b20b3c08ad15847afc30 pippit-tool-cli-1.0.38-darwin-amd64.tar.gz
2
+ 0e7d976179d944a2b8f99800acb91c6d3c035f0920cf4ec4348010b3a03d9e38 pippit-tool-cli-1.0.38-darwin-arm64.tar.gz
3
+ 4f5723713fc910121982885172079ab1e787d2af9f2515961e59f7e53ba48737 pippit-tool-cli-1.0.38-linux-amd64.tar.gz
4
+ 07d8ff5920dfa6748ad46076fcffbabc7b5d8dcef6714d802c7fa5b4b515494e pippit-tool-cli-1.0.38-linux-arm64.tar.gz
5
+ 61f18a00f457ffff80c20593b3c0af84b93a3e8db871b00ed043f61024c6b441 pippit-tool-cli-1.0.38-windows-amd64.zip
6
+ c07399e11956f7c6565e00c74a24f864012613539a61341636f9900d85a72654 pippit-tool-cli-1.0.38-windows-arm64.zip
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pippit-dev/cli",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "Pippit CLI",
5
5
  "bin": {
6
6
  "pippit-tool-cli": "scripts/run.js"
@@ -21,7 +21,7 @@ PIPPIT_CLI_INSTALL_PACKAGE can override the package/version to install.
21
21
 
22
22
  Options:
23
23
  --source HOST Real host identifier reported as host_platform; unknown hosts omit it
24
- Defaults to PIPPIT_CLI_SOURCE when unset; an explicit empty value omits host_platform
24
+ Defaults to PIPPIT_CLI_SOURCE, then known host runtime markers; an explicit empty value omits host_platform
25
25
  -h, --help Show this help without installing, updating, or sending telemetry
26
26
  `;
27
27
 
@@ -67,7 +67,7 @@ function main(args = process.argv.slice(2)) {
67
67
  console.log(INSTALL_HELP);
68
68
  return;
69
69
  }
70
- let source = process.env.PIPPIT_CLI_SOURCE || '';
70
+ let source;
71
71
  for (let i = 0; i < args.length; i++) {
72
72
  if (args[i] === '--source' && i + 1 < args.length && !args[i + 1].startsWith('--')) {
73
73
  source = args[++i];
@@ -79,7 +79,7 @@ function main(args = process.argv.slice(2)) {
79
79
  return;
80
80
  }
81
81
  }
82
- source = source.trim();
82
+ if (source !== undefined) source = source.trim();
83
83
  const pkg = installPackage();
84
84
  const installed = getGloballyInstalledVersion();
85
85
  if (installed) {
@@ -137,7 +137,7 @@ function install({ cliOnly = false } = {}) {
137
137
  if (!cliOnly) {
138
138
  if (process.env.PIPPIT_CLI_SKIP_SKILLS !== "1") {
139
139
  installSkillsFromRoot(ROOT);
140
- reportBundledSkillTelemetry("install", "npm_install", process.env.PIPPIT_CLI_SOURCE);
140
+ reportBundledSkillTelemetry("install", "npm_install");
141
141
  } else {
142
142
  cleanupLegacyGlobalSkills();
143
143
  }
@@ -19,10 +19,26 @@ function telemetryBaseURL() {
19
19
  return DEFAULT_BASE_URL;
20
20
  }
21
21
 
22
+ // Keep the same attribution rules as native CLI common.DetectHostSource.
23
+ function resolveHostSource(explicit) {
24
+ if (explicit !== undefined) return explicit.trim();
25
+ if ((process.env.PIPPIT_CLI_SOURCE || "").trim()) return process.env.PIPPIT_CLI_SOURCE.trim();
26
+ const hosts = new Set();
27
+ for (const [key, host] of [
28
+ ["CODEX_THREAD_ID", "codex"], ["CODEX_SESSION_ID", "codex"],
29
+ ["CLAUDECODE", "claude_code"], ["CURSOR_AGENT", "cursor"], ["GEMINI_CLI", "gemini_cli"],
30
+ ]) {
31
+ const value = (process.env[key] || "").trim().toLowerCase();
32
+ if (value && value !== "0" && value !== "false") hosts.add(host);
33
+ }
34
+ return hosts.size === 1 ? [...hosts][0] : "";
35
+ }
36
+
22
37
  function reportBundledSkillTelemetry(event, source, hostPlatform) {
23
38
  if (process.env.PIPPIT_CLI_DISABLE_TELEMETRY === "1") {
24
39
  return;
25
40
  }
41
+ hostPlatform = resolveHostSource(hostPlatform);
26
42
  for (const skillName of SKILL_NAMES) {
27
43
  reportSkillTelemetry({
28
44
  event,