osai-agent 4.2.12 → 4.2.14

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.2.12",
3
+ "version": "4.2.14",
4
4
  "type": "module",
5
5
  "description": "OS AI Agent - YOUR AI AGENT",
6
6
  "main": "src/index.js",
@@ -15,8 +15,6 @@ import { TOOLS, SAFETY_TIERS, MODES, EXECUTION_MODES, READ_ONLY_TOOLS, READ_FRES
15
15
  import { discoverSkills, loadSkill, createSkill, formatSkillsList } from '../../skills/loader.js';
16
16
  import { runSubagent } from '../subagent.js';
17
17
  import { logger } from '../../utils/logger.js';
18
- import inquirer from 'inquirer';
19
- import chalk from 'chalk';
20
18
  import path from 'path';
21
19
 
22
20
  // Helper: yield rapide pour ne pas bloquer l'event loop
@@ -240,14 +238,10 @@ export default {
240
238
  // Sudo password prompt
241
239
  if (tool === TOOLS.LOCAL_CMD && /^sudo\b/.test(toolCall.cmd?.trim()) && !this.isSubagent) {
242
240
  if (!this.sudoPassword) {
243
- this.onMarkdown(chalk.dim('\n_This command requires sudo. Enter your password:_\n'));
244
- const { password } = await inquirer.prompt([{
245
- type: 'password',
246
- name: 'password',
247
- message: ' sudo password:',
248
- mask: '*',
249
- }]);
250
- this.sudoPassword = password;
241
+ this.onMarkdown('\n_This command requires sudo. Enter your password:_\n');
242
+ this.sudoPassword = await new Promise((resolve) => {
243
+ this.readline.question(' sudo password: ', (answer) => resolve(answer.trim()));
244
+ });
251
245
  }
252
246
  }
253
247
 
@@ -274,7 +274,8 @@ export class AgentLoop {
274
274
  await this._connectWebSocket();
275
275
  } catch (err) {
276
276
  this.onConnectionChange(false);
277
- logger.warn(`WebSocket connection failed, continuing via HTTP: ${err.message}`);
277
+ logger.debug(`WebSocket connection failed: ${err.message}`);
278
+ logger.warn('Server unavailable, running in offline mode');
278
279
  this.ws = null;
279
280
  }
280
281
  } else {