@defai.digital/automatosx 11.3.0 → 11.3.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/README.md +1 -1
- package/dist/index.js +1442 -907
- package/dist/mcp/index.js +30 -8
- package/package.json +1 -1
package/dist/mcp/index.js
CHANGED
|
@@ -2755,8 +2755,12 @@ ${fullPrompt}
|
|
|
2755
2755
|
logger.debug(`Full prompt saved to ${debugPath}`);
|
|
2756
2756
|
}
|
|
2757
2757
|
const result = await this.executeCLI(fullPrompt);
|
|
2758
|
+
const latencyMs = Date.now() - startTime;
|
|
2758
2759
|
this.health.consecutiveFailures = 0;
|
|
2759
2760
|
this.health.available = true;
|
|
2761
|
+
this.health.errorRate = 0;
|
|
2762
|
+
this.health.latencyMs = latencyMs;
|
|
2763
|
+
this.health.lastCheck = Date.now();
|
|
2760
2764
|
const response = {
|
|
2761
2765
|
content: result,
|
|
2762
2766
|
model: "default",
|
|
@@ -2767,7 +2771,7 @@ ${fullPrompt}
|
|
|
2767
2771
|
completion: 0,
|
|
2768
2772
|
total: 0
|
|
2769
2773
|
},
|
|
2770
|
-
latencyMs
|
|
2774
|
+
latencyMs,
|
|
2771
2775
|
finishReason: "stop",
|
|
2772
2776
|
cached: false
|
|
2773
2777
|
};
|
|
@@ -2787,6 +2791,8 @@ ${fullPrompt}
|
|
|
2787
2791
|
this.health.consecutiveFailures++;
|
|
2788
2792
|
this.health.available = false;
|
|
2789
2793
|
this.health.errorRate = 1;
|
|
2794
|
+
this.health.latencyMs = Date.now() - startTime;
|
|
2795
|
+
this.health.lastCheck = Date.now();
|
|
2790
2796
|
throw this.handleError(error);
|
|
2791
2797
|
}
|
|
2792
2798
|
}
|
|
@@ -2807,6 +2813,8 @@ ${fullPrompt}
|
|
|
2807
2813
|
} catch (error) {
|
|
2808
2814
|
this.health.available = false;
|
|
2809
2815
|
this.health.errorRate = 1;
|
|
2816
|
+
this.health.lastCheck = Date.now();
|
|
2817
|
+
this.health.consecutiveFailures = this.health.consecutiveFailures + 1;
|
|
2810
2818
|
return false;
|
|
2811
2819
|
}
|
|
2812
2820
|
}
|
|
@@ -2814,13 +2822,13 @@ ${fullPrompt}
|
|
|
2814
2822
|
* Get health status
|
|
2815
2823
|
*/
|
|
2816
2824
|
async healthCheck() {
|
|
2817
|
-
|
|
2825
|
+
await this.isAvailable();
|
|
2818
2826
|
return {
|
|
2819
|
-
available:
|
|
2827
|
+
available: this.health.available,
|
|
2820
2828
|
latencyMs: this.health.latencyMs,
|
|
2821
|
-
errorRate:
|
|
2822
|
-
consecutiveFailures:
|
|
2823
|
-
lastCheckTime:
|
|
2829
|
+
errorRate: this.health.errorRate,
|
|
2830
|
+
consecutiveFailures: this.health.consecutiveFailures,
|
|
2831
|
+
lastCheckTime: this.health.lastCheck
|
|
2824
2832
|
};
|
|
2825
2833
|
}
|
|
2826
2834
|
/**
|
|
@@ -3538,8 +3546,9 @@ var init_cli_wrapper = __esm({
|
|
|
3538
3546
|
child.stdin.write(prompt);
|
|
3539
3547
|
child.stdin.end();
|
|
3540
3548
|
}
|
|
3549
|
+
let rl = null;
|
|
3541
3550
|
if (child.stdout && renderer) {
|
|
3542
|
-
|
|
3551
|
+
rl = readline.createInterface({
|
|
3543
3552
|
input: child.stdout,
|
|
3544
3553
|
crlfDelay: Infinity
|
|
3545
3554
|
});
|
|
@@ -3547,6 +3556,11 @@ var init_cli_wrapper = __esm({
|
|
|
3547
3556
|
stdout += line + "\n";
|
|
3548
3557
|
renderer.processLine(line);
|
|
3549
3558
|
});
|
|
3559
|
+
rl.on("error", (error) => {
|
|
3560
|
+
logger.warn("Readline error during streaming", {
|
|
3561
|
+
error: error.message
|
|
3562
|
+
});
|
|
3563
|
+
});
|
|
3550
3564
|
} else if (child.stdout) {
|
|
3551
3565
|
child.stdout.on("data", (data) => {
|
|
3552
3566
|
stdout += data.toString();
|
|
@@ -3562,6 +3576,10 @@ var init_cli_wrapper = __esm({
|
|
|
3562
3576
|
clearTimeout(timeoutHandle);
|
|
3563
3577
|
timeoutHandle = null;
|
|
3564
3578
|
}
|
|
3579
|
+
if (rl) {
|
|
3580
|
+
rl.close();
|
|
3581
|
+
rl = null;
|
|
3582
|
+
}
|
|
3565
3583
|
this.activeProcesses.delete(child);
|
|
3566
3584
|
if (hasTimedOut) {
|
|
3567
3585
|
return;
|
|
@@ -3589,6 +3607,10 @@ var init_cli_wrapper = __esm({
|
|
|
3589
3607
|
clearTimeout(timeoutHandle);
|
|
3590
3608
|
timeoutHandle = null;
|
|
3591
3609
|
}
|
|
3610
|
+
if (rl) {
|
|
3611
|
+
rl.close();
|
|
3612
|
+
rl = null;
|
|
3613
|
+
}
|
|
3592
3614
|
this.activeProcesses.delete(child);
|
|
3593
3615
|
if (!hasTimedOut) {
|
|
3594
3616
|
if (renderer) {
|
|
@@ -5250,7 +5272,7 @@ var PRECOMPILED_CONFIG = {
|
|
|
5250
5272
|
"enableFreeTierPrioritization": true,
|
|
5251
5273
|
"enableWorkloadAwareRouting": true
|
|
5252
5274
|
},
|
|
5253
|
-
"version": "11.3.
|
|
5275
|
+
"version": "11.3.1"
|
|
5254
5276
|
};
|
|
5255
5277
|
|
|
5256
5278
|
// src/core/config/schemas.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defai.digital/automatosx",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.1",
|
|
4
4
|
"description": "Provider-agnostic AI orchestration platform with 20+ specialized agents, persistent memory, and multi-provider routing for Claude Code, Gemini CLI, Codex CLI, and ax-cli",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|