osai-agent 4.2.27 → 4.2.29
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
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
if (msg.type === 'REGISTERED') { clearTimeout(connectTimeout); this.ws = ws; resolve(msg); }
|
|
40
40
|
else if (msg.type === 'COMMANDS') { this.pendingCommands = msg.commands; this.currentTaskId = msg.taskId; }
|
|
41
41
|
else if (msg.type === 'CANCEL_ACK') { logger.info('Cancellation acknowledged by server'); }
|
|
42
|
-
|
|
42
|
+
else if (msg.type === 'ERROR') { clearTimeout(connectTimeout); ws.close(); reject(new Error(msg.message)); }
|
|
43
43
|
else if (msg.type === 'CANCEL_SUBAGENT') {
|
|
44
44
|
if (this._subagentActive && this._subagentLoop) {
|
|
45
45
|
this._subagentLoop.cancel();
|
package/src/agent/react-loop.js
CHANGED
|
@@ -274,6 +274,10 @@ export class AgentLoop {
|
|
|
274
274
|
await this._connectWebSocket();
|
|
275
275
|
} catch (err) {
|
|
276
276
|
this.onConnectionChange(false);
|
|
277
|
+
if (err.message.toLowerCase().includes('disabled')) {
|
|
278
|
+
console.log(chalk.red(`\n ${err.message}\n`));
|
|
279
|
+
process.exit(1);
|
|
280
|
+
}
|
|
277
281
|
logger.debug(`WebSocket connection failed: ${err.message}`);
|
|
278
282
|
logger.warn('Server unavailable, running in offline mode');
|
|
279
283
|
this.ws = null;
|