osai-agent 4.1.4 → 4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osai-agent",
3
- "version": "4.1.4",
3
+ "version": "4.1.5",
4
4
  "type": "module",
5
5
  "description": "OS AI Agent - YOUR AI AGENT",
6
6
  "main": "src/index.js",
@@ -63,6 +63,7 @@
63
63
  "serpapi": "^2.2.1",
64
64
  "ssh2": "^1.15.0",
65
65
  "tokenx": "^1.3.0",
66
+ "update-notifier": "^7.3.1",
66
67
  "uuid": "^14.0.0",
67
68
  "ws": "^8.18.0"
68
69
  },
@@ -15,7 +15,9 @@ export const showConfig = () => {
15
15
  const config = new Conf({ projectName: 'osai-agent' });
16
16
  const os = config.get('os') || `${detectDefaultOS()} (auto-detected)`;
17
17
  printInfo(`Version: ${APP_VERSION}`);
18
- printInfo(`Server: ${config.get('server') || 'not configured'}`);
18
+ const serverUrl = config.get('server') || '';
19
+ const displayServer = serverUrl ? serverUrl.replace(/\/\/([^@]+?)(\.|$)/, '//***$2') : 'not configured';
20
+ printInfo(`Server: ${displayServer}`);
19
21
  printInfo(`Token: ${config.get('token') ? 'present' : 'absent'}`);
20
22
  printInfo(`User ID: ${config.get('userId') || 'absent'}`);
21
23
  printInfo(`Plan: ${config.get('plan') || 'absent'}`);
package/src/index.js CHANGED
@@ -26,6 +26,11 @@ import { handleMcpCommand } from './commands/mcp.js';
26
26
  import { stopSubagent } from './commands/stop-subagent.js';
27
27
  import { claimProKey } from './commands/pro.js';
28
28
  import minimist from 'minimist';
29
+ import updateNotifier from 'update-notifier';
30
+ import { createRequire } from 'module';
31
+ const require = createRequire(import.meta.url);
32
+ const pkg = require('../package.json');
33
+ updateNotifier({ pkg }).notify({ isGlobal: true, shouldNotifyInNpmScript: false });
29
34
 
30
35
  const args = minimist(process.argv.slice(2));
31
36
  const cmd = args._[0];
@@ -3,7 +3,10 @@
3
3
  // =============================================================================
4
4
 
5
5
  export const APP_NAME = 'osai-agent';
6
- export const APP_VERSION = '4.0.0';
6
+ import { createRequire } from 'module';
7
+ const require = createRequire(import.meta.url);
8
+ const pkg = require('../../package.json');
9
+ export const APP_VERSION = pkg.version;
7
10
 
8
11
  /** Default runtime parameters — can be overridden via environment variables */
9
12
  export const DEFAULTS = {