@geminilight/mindos 0.1.4 → 0.1.5

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/bin/cli.js +8 -6
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -354,15 +354,16 @@ const launchd = {
354
354
  `;
355
355
  writeFileSync(LAUNCHD_PLIST, plist, 'utf-8');
356
356
  console.log(green(`✔ Wrote ${LAUNCHD_PLIST}`));
357
+ // Bootout first to ensure the new plist (with updated PATH) takes effect.
358
+ // Safe to ignore errors here — service may not be loaded yet.
359
+ try { execSync(`launchctl bootout gui/${launchctlUid()}/${LAUNCHD_LABEL}`, { stdio: 'pipe' }); } catch {}
357
360
  try {
358
361
  execSync(`launchctl bootstrap gui/${launchctlUid()} ${LAUNCHD_PLIST}`, { stdio: 'pipe' });
359
362
  } catch (e) {
360
- const msg = e.stderr?.toString() ?? e.message ?? '';
361
- // Error 5 (ENOENT / already loaded) is benign — service is already bootstrapped
362
- if (!msg.includes('5:') && !msg.includes('already')) {
363
- console.error(yellow(` ⚠ launchctl bootstrap: ${msg.trim()}`));
364
- console.error(dim(' If this persists, try: launchctl bootout gui/$(id -u)/com.mindos.app'));
365
- }
363
+ const msg = (e.stderr?.toString() ?? e.message ?? '').trim();
364
+ console.error(red(`\n✘ launchctl bootstrap failed: ${msg}`));
365
+ console.error(dim(' Try running: launchctl bootout gui/$(id -u)/com.mindos.app then retry.\n'));
366
+ process.exit(1);
366
367
  }
367
368
  console.log(green('✔ Service installed'));
368
369
  },
@@ -839,6 +840,7 @@ ${dim('Shortcut: mindos start --daemon → install + start in one step')}
839
840
  if (daemonRunning) {
840
841
  console.log(cyan('\n Daemon is running — restarting to apply the new version...'));
841
842
  await runGatewayCommand('stop');
843
+ await runGatewayCommand('install'); // regenerate plist/unit with updated PATH and binary
842
844
  await runGatewayCommand('start');
843
845
  const webPort = process.env.MINDOS_WEB_PORT || '3000';
844
846
  console.log(dim(' (Waiting for Web UI to come back up...)'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geminilight/mindos",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "MindOS — Human-Agent Collaborative Mind System. Local-first knowledge base that syncs your mind to all AI Agents via MCP.",
5
5
  "keywords": [
6
6
  "mindos",