@defai.digital/automatosx 11.2.9 → 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 +4 -5
- package/dist/index.js +3650 -229
- package/dist/mcp/index.js +42 -10
- package/package.json +1 -1
package/dist/mcp/index.js
CHANGED
|
@@ -2685,8 +2685,18 @@ var init_base_provider = __esm({
|
|
|
2685
2685
|
/**
|
|
2686
2686
|
* Check if CLI is available - Template method pattern
|
|
2687
2687
|
* Uses getCLICommand() to determine which CLI to check
|
|
2688
|
+
*
|
|
2689
|
+
* v11.2.9 Fix: Always return true in mock mode (AX_MOCK_PROVIDERS=true)
|
|
2690
|
+
* This allows integration tests in CI to run without installing actual provider CLIs
|
|
2688
2691
|
*/
|
|
2689
2692
|
async checkCLIAvailable() {
|
|
2693
|
+
if (process.env.AX_MOCK_PROVIDERS === "true") {
|
|
2694
|
+
logger.debug(`${this.getCLICommand()} CLI availability check (mock mode)`, {
|
|
2695
|
+
available: true,
|
|
2696
|
+
mockMode: true
|
|
2697
|
+
});
|
|
2698
|
+
return true;
|
|
2699
|
+
}
|
|
2690
2700
|
try {
|
|
2691
2701
|
const cliCommand = this.getCLICommand();
|
|
2692
2702
|
const result = findOnPath(cliCommand);
|
|
@@ -2745,8 +2755,12 @@ ${fullPrompt}
|
|
|
2745
2755
|
logger.debug(`Full prompt saved to ${debugPath}`);
|
|
2746
2756
|
}
|
|
2747
2757
|
const result = await this.executeCLI(fullPrompt);
|
|
2758
|
+
const latencyMs = Date.now() - startTime;
|
|
2748
2759
|
this.health.consecutiveFailures = 0;
|
|
2749
2760
|
this.health.available = true;
|
|
2761
|
+
this.health.errorRate = 0;
|
|
2762
|
+
this.health.latencyMs = latencyMs;
|
|
2763
|
+
this.health.lastCheck = Date.now();
|
|
2750
2764
|
const response = {
|
|
2751
2765
|
content: result,
|
|
2752
2766
|
model: "default",
|
|
@@ -2757,7 +2771,7 @@ ${fullPrompt}
|
|
|
2757
2771
|
completion: 0,
|
|
2758
2772
|
total: 0
|
|
2759
2773
|
},
|
|
2760
|
-
latencyMs
|
|
2774
|
+
latencyMs,
|
|
2761
2775
|
finishReason: "stop",
|
|
2762
2776
|
cached: false
|
|
2763
2777
|
};
|
|
@@ -2777,6 +2791,8 @@ ${fullPrompt}
|
|
|
2777
2791
|
this.health.consecutiveFailures++;
|
|
2778
2792
|
this.health.available = false;
|
|
2779
2793
|
this.health.errorRate = 1;
|
|
2794
|
+
this.health.latencyMs = Date.now() - startTime;
|
|
2795
|
+
this.health.lastCheck = Date.now();
|
|
2780
2796
|
throw this.handleError(error);
|
|
2781
2797
|
}
|
|
2782
2798
|
}
|
|
@@ -2797,6 +2813,8 @@ ${fullPrompt}
|
|
|
2797
2813
|
} catch (error) {
|
|
2798
2814
|
this.health.available = false;
|
|
2799
2815
|
this.health.errorRate = 1;
|
|
2816
|
+
this.health.lastCheck = Date.now();
|
|
2817
|
+
this.health.consecutiveFailures = this.health.consecutiveFailures + 1;
|
|
2800
2818
|
return false;
|
|
2801
2819
|
}
|
|
2802
2820
|
}
|
|
@@ -2804,13 +2822,13 @@ ${fullPrompt}
|
|
|
2804
2822
|
* Get health status
|
|
2805
2823
|
*/
|
|
2806
2824
|
async healthCheck() {
|
|
2807
|
-
|
|
2825
|
+
await this.isAvailable();
|
|
2808
2826
|
return {
|
|
2809
|
-
available:
|
|
2827
|
+
available: this.health.available,
|
|
2810
2828
|
latencyMs: this.health.latencyMs,
|
|
2811
|
-
errorRate:
|
|
2812
|
-
consecutiveFailures:
|
|
2813
|
-
lastCheckTime:
|
|
2829
|
+
errorRate: this.health.errorRate,
|
|
2830
|
+
consecutiveFailures: this.health.consecutiveFailures,
|
|
2831
|
+
lastCheckTime: this.health.lastCheck
|
|
2814
2832
|
};
|
|
2815
2833
|
}
|
|
2816
2834
|
/**
|
|
@@ -3528,8 +3546,9 @@ var init_cli_wrapper = __esm({
|
|
|
3528
3546
|
child.stdin.write(prompt);
|
|
3529
3547
|
child.stdin.end();
|
|
3530
3548
|
}
|
|
3549
|
+
let rl = null;
|
|
3531
3550
|
if (child.stdout && renderer) {
|
|
3532
|
-
|
|
3551
|
+
rl = readline.createInterface({
|
|
3533
3552
|
input: child.stdout,
|
|
3534
3553
|
crlfDelay: Infinity
|
|
3535
3554
|
});
|
|
@@ -3537,6 +3556,11 @@ var init_cli_wrapper = __esm({
|
|
|
3537
3556
|
stdout += line + "\n";
|
|
3538
3557
|
renderer.processLine(line);
|
|
3539
3558
|
});
|
|
3559
|
+
rl.on("error", (error) => {
|
|
3560
|
+
logger.warn("Readline error during streaming", {
|
|
3561
|
+
error: error.message
|
|
3562
|
+
});
|
|
3563
|
+
});
|
|
3540
3564
|
} else if (child.stdout) {
|
|
3541
3565
|
child.stdout.on("data", (data) => {
|
|
3542
3566
|
stdout += data.toString();
|
|
@@ -3552,6 +3576,10 @@ var init_cli_wrapper = __esm({
|
|
|
3552
3576
|
clearTimeout(timeoutHandle);
|
|
3553
3577
|
timeoutHandle = null;
|
|
3554
3578
|
}
|
|
3579
|
+
if (rl) {
|
|
3580
|
+
rl.close();
|
|
3581
|
+
rl = null;
|
|
3582
|
+
}
|
|
3555
3583
|
this.activeProcesses.delete(child);
|
|
3556
3584
|
if (hasTimedOut) {
|
|
3557
3585
|
return;
|
|
@@ -3579,6 +3607,10 @@ var init_cli_wrapper = __esm({
|
|
|
3579
3607
|
clearTimeout(timeoutHandle);
|
|
3580
3608
|
timeoutHandle = null;
|
|
3581
3609
|
}
|
|
3610
|
+
if (rl) {
|
|
3611
|
+
rl.close();
|
|
3612
|
+
rl = null;
|
|
3613
|
+
}
|
|
3582
3614
|
this.activeProcesses.delete(child);
|
|
3583
3615
|
if (!hasTimedOut) {
|
|
3584
3616
|
if (renderer) {
|
|
@@ -5240,7 +5272,7 @@ var PRECOMPILED_CONFIG = {
|
|
|
5240
5272
|
"enableFreeTierPrioritization": true,
|
|
5241
5273
|
"enableWorkloadAwareRouting": true
|
|
5242
5274
|
},
|
|
5243
|
-
"version": "11.
|
|
5275
|
+
"version": "11.3.1"
|
|
5244
5276
|
};
|
|
5245
5277
|
|
|
5246
5278
|
// src/core/config/schemas.ts
|
|
@@ -12270,8 +12302,8 @@ var ProjectContextLoader = class {
|
|
|
12270
12302
|
const projectMatch = markdown.match(/>\s*Project:\s*(.+?)$/im);
|
|
12271
12303
|
if (projectMatch && projectMatch[1]) {
|
|
12272
12304
|
const parts = projectMatch[1].trim().split(/\s+v/);
|
|
12273
|
-
metadata.name = parts[0];
|
|
12274
|
-
if (parts[1]) {
|
|
12305
|
+
metadata.name = parts[0] || "";
|
|
12306
|
+
if (parts.length > 1 && parts[1]) {
|
|
12275
12307
|
metadata.version = parts[1];
|
|
12276
12308
|
}
|
|
12277
12309
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defai.digital/automatosx",
|
|
3
|
-
"version": "11.
|
|
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": {
|