robot-resources 1.6.1 → 1.7.0
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/lib/wizard.js +38 -8
- package/package.json +2 -2
package/lib/wizard.js
CHANGED
|
@@ -69,14 +69,12 @@ export async function runWizard({ nonInteractive = false } = {}) {
|
|
|
69
69
|
|
|
70
70
|
if (res.ok) {
|
|
71
71
|
const { data } = await res.json();
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
});
|
|
79
|
-
}
|
|
72
|
+
writeConfig({
|
|
73
|
+
api_key: data.api_key,
|
|
74
|
+
key_id: data.key_id,
|
|
75
|
+
claim_url: data.claim_url,
|
|
76
|
+
signup_source: 'auto',
|
|
77
|
+
});
|
|
80
78
|
results.auth = true;
|
|
81
79
|
results.authMethod = 'auto';
|
|
82
80
|
results.claimUrl = data.claim_url;
|
|
@@ -267,6 +265,38 @@ export async function runWizard({ nonInteractive = false } = {}) {
|
|
|
267
265
|
}
|
|
268
266
|
}
|
|
269
267
|
|
|
268
|
+
// ── Install Complete Telemetry ───────────────────────────────────────────
|
|
269
|
+
//
|
|
270
|
+
// Fire once after install, using the API key directly (not from config read-back).
|
|
271
|
+
// This immediately populates last_used_at and proves the key works end-to-end.
|
|
272
|
+
|
|
273
|
+
if (results.auth) {
|
|
274
|
+
try {
|
|
275
|
+
const config = readConfig();
|
|
276
|
+
const platformUrl = process.env.RR_PLATFORM_URL || 'https://api.robotresources.ai';
|
|
277
|
+
await fetch(`${platformUrl}/v1/telemetry`, {
|
|
278
|
+
method: 'POST',
|
|
279
|
+
headers: {
|
|
280
|
+
'Authorization': `Bearer ${config.api_key}`,
|
|
281
|
+
'Content-Type': 'application/json',
|
|
282
|
+
},
|
|
283
|
+
body: JSON.stringify({
|
|
284
|
+
product: 'cli',
|
|
285
|
+
event_type: 'install_complete',
|
|
286
|
+
payload: {
|
|
287
|
+
router: results.router || false,
|
|
288
|
+
service: results.service || false,
|
|
289
|
+
scraper: results.scraper || false,
|
|
290
|
+
source: 'wizard',
|
|
291
|
+
},
|
|
292
|
+
}),
|
|
293
|
+
signal: AbortSignal.timeout(5_000),
|
|
294
|
+
});
|
|
295
|
+
} catch {
|
|
296
|
+
// Non-fatal — install_complete is best-effort
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
270
300
|
// ── Summary ─────────────────────────────────────────────────────────────
|
|
271
301
|
|
|
272
302
|
const somethingInstalled = results.router || results.service || results.scraper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robot-resources",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Robot Resources — AI agent runtime tools. One command to install everything.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@robot-resources/cli-core": "*",
|
|
21
21
|
"@robot-resources/openclaw-plugin": "*",
|
|
22
|
-
"@robot-resources/scraper": "^0.
|
|
22
|
+
"@robot-resources/scraper": "^0.3.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"vitest": "^1.2.0"
|