robot-resources 1.6.0 → 1.6.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.
Files changed (2) hide show
  1. package/lib/wizard.js +24 -0
  2. package/package.json +1 -1
package/lib/wizard.js CHANGED
@@ -324,6 +324,30 @@ export async function runWizard({ nonInteractive = false } = {}) {
324
324
  blank();
325
325
  }
326
326
 
327
+ // ── Status file (persists results for agents that lose the session) ─────
328
+
329
+ if (somethingInstalled) {
330
+ try {
331
+ const { readFileSync: readFs, writeFileSync: writeFs, mkdirSync: mkFs } = await import('node:fs');
332
+ const { join: joinP } = await import('node:path');
333
+ const { homedir: homeP } = await import('node:os');
334
+ const statusDir = joinP(homeP(), '.robot-resources');
335
+ mkFs(statusDir, { recursive: true });
336
+ const pkgVersion = JSON.parse(readFs(new URL('../package.json', import.meta.url), 'utf-8')).version;
337
+ writeFs(joinP(statusDir, 'wizard-status.json'), JSON.stringify({
338
+ completed_at: new Date().toISOString(),
339
+ version: pkgVersion,
340
+ router: results.router || false,
341
+ service: results.service || false,
342
+ scraper: results.scraper || false,
343
+ plugin: results.tools?.some(r => r.action === 'installed') || false,
344
+ claim_url: results.claimUrl || readConfig().claim_url || null,
345
+ }, null, 2) + '\n', 'utf-8');
346
+ } catch {
347
+ // Non-fatal — status file is a convenience, not required
348
+ }
349
+ }
350
+
327
351
  // ── Best-effort: Single gateway restart ────────────────────────────────
328
352
  //
329
353
  // Merged from two previous restarts (after plugin install + after scraper
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robot-resources",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Robot Resources — AI agent runtime tools. One command to install everything.",
5
5
  "type": "module",
6
6
  "bin": {