robot-resources 1.9.6 → 1.9.7

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.
Files changed (2) hide show
  1. package/lib/wizard.js +19 -2
  2. package/package.json +1 -1
package/lib/wizard.js CHANGED
@@ -9,6 +9,22 @@ import { installService, isServiceRunning, isServiceInstalled } from './service.
9
9
  import { configureToolRouting, registerScraperMcp, restartOpenClawGateway } from './tool-config.js';
10
10
  import { checkHealth } from './health-report.js';
11
11
  import { header, step, success, warn, error, info, blank, summary } from './ui.js';
12
+
13
+ // Stamped onto every CLI telemetry payload so we can tell which `robot-resources`
14
+ // version a user actually ran. Without this, npx-cached old installers look
15
+ // identical to fresh runs in Supabase — which is exactly the visibility gap
16
+ // that left us blind on real-user install failures despite shipping rich
17
+ // diagnostics in PR #163. Read once at module load; safe to fail (telemetry
18
+ // just lands without the field).
19
+ const CLI_VERSION = (() => {
20
+ try {
21
+ return JSON.parse(
22
+ readFileSync(new URL('../package.json', import.meta.url), 'utf-8'),
23
+ ).version;
24
+ } catch {
25
+ return null;
26
+ }
27
+ })();
12
28
  /**
13
29
  * Classify an install error into a short reason code + bounded detail string.
14
30
  *
@@ -165,6 +181,7 @@ export async function runWizard({ nonInteractive = false } = {}) {
165
181
  product: 'cli',
166
182
  event_type: 'wizard_started',
167
183
  payload: {
184
+ cli_version: CLI_VERSION,
168
185
  auth_method: results.authMethod,
169
186
  non_interactive: nonInteractive,
170
187
  },
@@ -424,6 +441,7 @@ export async function runWizard({ nonInteractive = false } = {}) {
424
441
  // another event.
425
442
  const installPayload = {
426
443
  source: 'wizard',
444
+ cli_version: CLI_VERSION,
427
445
  router: results.router || false,
428
446
  service: results.service || false,
429
447
  scraper: results.scraper || false,
@@ -556,10 +574,9 @@ export async function runWizard({ nonInteractive = false } = {}) {
556
574
  try {
557
575
  const statusDir = join(homedir(), '.robot-resources');
558
576
  mkdirSync(statusDir, { recursive: true });
559
- const pkgVersion = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8')).version;
560
577
  writeFileSync(join(statusDir, 'wizard-status.json'), JSON.stringify({
561
578
  completed_at: new Date().toISOString(),
562
- version: pkgVersion,
579
+ version: CLI_VERSION,
563
580
  router: results.router || false,
564
581
  service: results.service || false,
565
582
  scraper: results.scraper || false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robot-resources",
3
- "version": "1.9.6",
3
+ "version": "1.9.7",
4
4
  "description": "Robot Resources — AI agent tools. One command to install everything.",
5
5
  "type": "module",
6
6
  "bin": {