neoagent 2.1.0 → 2.1.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.
package/lib/manager.js CHANGED
@@ -23,6 +23,7 @@ const PLIST_DST = path.join(os.homedir(), 'Library', 'LaunchAgents', 'com.neoage
23
23
  const SYSTEMD_UNIT = path.join(os.homedir(), '.config', 'systemd', 'user', 'neoagent.service');
24
24
  const FLUTTER_APP_DIR = path.join(APP_DIR, 'flutter_app');
25
25
  const WEB_CLIENT_DIR = path.join(APP_DIR, 'server', 'public');
26
+ const PACKAGE_JSON_PATH = path.join(APP_DIR, 'package.json');
26
27
 
27
28
  const COLORS = process.stdout.isTTY
28
29
  ? {
@@ -139,6 +140,30 @@ function runQuiet(cmd, args, options = {}) {
139
140
  return spawnSync(cmd, args, { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf8', cwd: APP_DIR, ...options });
140
141
  }
141
142
 
143
+ function readInstalledPackageVersion() {
144
+ try {
145
+ const pkg = JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, 'utf8'));
146
+ return pkg.version || 'unknown';
147
+ } catch {
148
+ return 'unknown';
149
+ }
150
+ }
151
+
152
+ function readGitVersionLabel() {
153
+ const gitVersion = runQuiet('git', ['describe', '--tags', '--always', '--dirty']);
154
+ if (gitVersion.status !== 0) return null;
155
+ return gitVersion.stdout.trim().replace(/^v/, '') || null;
156
+ }
157
+
158
+ function currentInstalledVersionLabel() {
159
+ const pkg = readInstalledPackageVersion();
160
+ const git = readGitVersionLabel();
161
+ if (git && git !== pkg) {
162
+ return `${pkg} (${git})`;
163
+ }
164
+ return pkg;
165
+ }
166
+
142
167
  function withInstallEnv(extraEnv = {}) {
143
168
  return {
144
169
  ...process.env,
@@ -520,6 +545,8 @@ function cmdUpdate() {
520
545
  heading(`Update ${APP_NAME}`);
521
546
  migrateLegacyRuntime((msg) => logInfo(msg));
522
547
  ensureRuntimeDirs();
548
+ const versionBefore = currentInstalledVersionLabel();
549
+ let versionAfter = versionBefore;
523
550
 
524
551
  if (fs.existsSync(path.join(APP_DIR, '.git')) && commandExists('git')) {
525
552
  const branch = runQuiet('git', ['rev-parse', '--abbrev-ref', 'HEAD']);
@@ -527,9 +554,9 @@ function cmdUpdate() {
527
554
 
528
555
  runOrThrow('git', ['fetch', 'origin']);
529
556
  if (branch.status === 0) {
530
- runOrThrow('git', ['pull', '--rebase', 'origin', branch.stdout.trim()]);
557
+ runOrThrow('git', ['pull', '--rebase', '--autostash', 'origin', branch.stdout.trim()]);
531
558
  } else {
532
- runOrThrow('git', ['pull', '--rebase']);
559
+ runOrThrow('git', ['pull', '--rebase', '--autostash']);
533
560
  }
534
561
 
535
562
  const next = runQuiet('git', ['rev-parse', '--short', 'HEAD']);
@@ -558,11 +585,14 @@ function cmdUpdate() {
558
585
  }
559
586
  }
560
587
 
588
+ versionAfter = currentInstalledVersionLabel();
589
+
561
590
  if (!hasBundledWebClient()) {
562
591
  throw new Error('No bundled Flutter web client found after update.');
563
592
  }
564
593
 
565
594
  cmdRestart();
595
+ logOk(`Installed version ${versionBefore} -> ${versionAfter}`);
566
596
  }
567
597
 
568
598
  async function cmdEnv(args = []) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Proactive personal AI agent with no limits",
5
5
  "license": "MIT",
6
6
  "main": "server/index.js",
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"052f31d115eceda8cbff1b3481fcde4330c4ae
37
37
 
38
38
  _flutter.loader.load({
39
39
  serviceWorkerSettings: {
40
- serviceWorkerVersion: "1934719529" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
40
+ serviceWorkerVersion: "2048284406" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });