@defai.digital/automatosx 11.4.0 → 12.1.0
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 -4
- package/dist/index.js +2781 -6610
- package/dist/mcp/index.js +305 -309
- package/package.json +3 -3
package/dist/mcp/index.js
CHANGED
|
@@ -26,12 +26,6 @@ import { gzipSync, gunzipSync } from 'zlib';
|
|
|
26
26
|
|
|
27
27
|
var __defProp = Object.defineProperty;
|
|
28
28
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
29
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
30
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
31
|
-
}) : x)(function(x) {
|
|
32
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
33
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
34
|
-
});
|
|
35
29
|
var __esm = (fn, res) => function __init() {
|
|
36
30
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
37
31
|
};
|
|
@@ -40,7 +34,7 @@ var __export = (target, all) => {
|
|
|
40
34
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
41
35
|
};
|
|
42
36
|
var init_esm_shims = __esm({
|
|
43
|
-
"node_modules/tsup/assets/esm_shims.js"() {
|
|
37
|
+
"node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.20.6_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js"() {
|
|
44
38
|
}
|
|
45
39
|
});
|
|
46
40
|
function sanitizeObject(obj, maxDepth = 5, currentDepth = 0) {
|
|
@@ -2013,7 +2007,7 @@ function isRateLimitError(error, providerName) {
|
|
|
2013
2007
|
function isLimitError(error, providerName) {
|
|
2014
2008
|
return isQuotaError(error, providerName) || isRateLimitError(error, providerName);
|
|
2015
2009
|
}
|
|
2016
|
-
var GEMINI_PATTERNS, CLAUDE_PATTERNS, OPENAI_PATTERNS,
|
|
2010
|
+
var GEMINI_PATTERNS, CLAUDE_PATTERNS, OPENAI_PATTERNS, PROVIDER_ERROR_PATTERNS, GENERIC_ERROR_PATTERNS;
|
|
2017
2011
|
var init_error_patterns = __esm({
|
|
2018
2012
|
"src/providers/error-patterns.ts"() {
|
|
2019
2013
|
init_esm_shims();
|
|
@@ -2097,64 +2091,27 @@ var init_error_patterns = __esm({
|
|
|
2097
2091
|
"billing_hard_limit_reached"
|
|
2098
2092
|
]
|
|
2099
2093
|
};
|
|
2100
|
-
AX_CLI_PATTERNS = {
|
|
2101
|
-
quota: [
|
|
2102
|
-
// GLM patterns
|
|
2103
|
-
"quota exceeded",
|
|
2104
|
-
"quota limit reached",
|
|
2105
|
-
"insufficient quota",
|
|
2106
|
-
// OpenAI patterns (via ax-cli)
|
|
2107
|
-
"insufficient_quota",
|
|
2108
|
-
"quota_exceeded",
|
|
2109
|
-
"billing hard limit reached",
|
|
2110
|
-
"usage limit exceeded",
|
|
2111
|
-
"monthly quota exceeded",
|
|
2112
|
-
"credit limit reached",
|
|
2113
|
-
// Generic patterns
|
|
2114
|
-
"daily quota exceeded",
|
|
2115
|
-
"api quota exceeded"
|
|
2116
|
-
],
|
|
2117
|
-
rateLimit: [
|
|
2118
|
-
// Common patterns
|
|
2119
|
-
"rate_limit_exceeded",
|
|
2120
|
-
"rate limit exceeded",
|
|
2121
|
-
"too_many_requests",
|
|
2122
|
-
"too many requests",
|
|
2123
|
-
"requests per minute exceeded",
|
|
2124
|
-
"tokens per minute exceeded",
|
|
2125
|
-
"rate limit reached",
|
|
2126
|
-
// Anthropic patterns (via ax-cli)
|
|
2127
|
-
"rate_limit_error",
|
|
2128
|
-
"overloaded_error",
|
|
2129
|
-
"overloaded",
|
|
2130
|
-
// xAI/Grok patterns
|
|
2131
|
-
"throttled",
|
|
2132
|
-
"request throttled"
|
|
2133
|
-
],
|
|
2134
|
-
statusCodes: [429, 529],
|
|
2135
|
-
errorCodes: [
|
|
2136
|
-
"insufficient_quota",
|
|
2137
|
-
"rate_limit_exceeded",
|
|
2138
|
-
"quota_exceeded",
|
|
2139
|
-
"rate_limit_error",
|
|
2140
|
-
"overloaded_error",
|
|
2141
|
-
"RATE_LIMIT_EXCEEDED",
|
|
2142
|
-
"QUOTA_EXCEEDED"
|
|
2143
|
-
]
|
|
2144
|
-
};
|
|
2145
2094
|
PROVIDER_ERROR_PATTERNS = {
|
|
2146
2095
|
// Primary providers
|
|
2147
2096
|
gemini: GEMINI_PATTERNS,
|
|
2148
2097
|
claude: CLAUDE_PATTERNS,
|
|
2149
2098
|
codex: OPENAI_PATTERNS,
|
|
2150
|
-
|
|
2099
|
+
// v12.0.0: Removed ax-cli (deprecated)
|
|
2100
|
+
glm: OPENAI_PATTERNS,
|
|
2101
|
+
// v12.0.0: GLM uses OpenAI-compatible API
|
|
2102
|
+
grok: OPENAI_PATTERNS,
|
|
2103
|
+
// v12.0.0: Grok uses OpenAI-compatible API
|
|
2151
2104
|
// Aliases - reference same patterns to avoid duplication
|
|
2152
2105
|
"gemini-cli": GEMINI_PATTERNS,
|
|
2153
2106
|
// Alias for gemini
|
|
2154
2107
|
"claude-code": CLAUDE_PATTERNS,
|
|
2155
2108
|
// Alias for claude
|
|
2156
|
-
"openai": OPENAI_PATTERNS
|
|
2109
|
+
"openai": OPENAI_PATTERNS,
|
|
2157
2110
|
// Alias for codex (same underlying API)
|
|
2111
|
+
"ax-glm": OPENAI_PATTERNS,
|
|
2112
|
+
// v12.0.0: Alias for glm
|
|
2113
|
+
"ax-grok": OPENAI_PATTERNS
|
|
2114
|
+
// v12.0.0: Alias for grok
|
|
2158
2115
|
};
|
|
2159
2116
|
GENERIC_ERROR_PATTERNS = {
|
|
2160
2117
|
quota: [
|
|
@@ -2195,10 +2152,11 @@ function getRetryableErrors(provider) {
|
|
|
2195
2152
|
return [...baseErrors, ...GEMINI_RETRYABLE_ERRORS];
|
|
2196
2153
|
case "openai":
|
|
2197
2154
|
return [...baseErrors, ...OPENAI_RETRYABLE_ERRORS];
|
|
2198
|
-
case "ax-cli":
|
|
2199
|
-
return [...baseErrors, ...AX_CLI_RETRYABLE_ERRORS];
|
|
2200
2155
|
case "codex":
|
|
2201
2156
|
return [...baseErrors, ...CODEX_RETRYABLE_ERRORS];
|
|
2157
|
+
case "glm":
|
|
2158
|
+
case "grok":
|
|
2159
|
+
return [...baseErrors, ...OPENAI_RETRYABLE_ERRORS];
|
|
2202
2160
|
case "base":
|
|
2203
2161
|
default:
|
|
2204
2162
|
return baseErrors;
|
|
@@ -2212,7 +2170,7 @@ function shouldRetryError(error, provider) {
|
|
|
2212
2170
|
const retryableErrors = getRetryableErrors(provider);
|
|
2213
2171
|
return containsErrorPattern(message, retryableErrors);
|
|
2214
2172
|
}
|
|
2215
|
-
var COMMON_NETWORK_ERRORS, COMMON_RATE_LIMIT_ERRORS, COMMON_SERVER_ERRORS, CLAUDE_RETRYABLE_ERRORS, GEMINI_RETRYABLE_ERRORS, OPENAI_RETRYABLE_ERRORS,
|
|
2173
|
+
var COMMON_NETWORK_ERRORS, COMMON_RATE_LIMIT_ERRORS, COMMON_SERVER_ERRORS, CLAUDE_RETRYABLE_ERRORS, GEMINI_RETRYABLE_ERRORS, OPENAI_RETRYABLE_ERRORS, CODEX_RETRYABLE_ERRORS, NON_RETRYABLE_ERRORS;
|
|
2216
2174
|
var init_retry_errors = __esm({
|
|
2217
2175
|
"src/providers/retry-errors.ts"() {
|
|
2218
2176
|
init_esm_shims();
|
|
@@ -2248,17 +2206,6 @@ var init_retry_errors = __esm({
|
|
|
2248
2206
|
OPENAI_RETRYABLE_ERRORS = [
|
|
2249
2207
|
"internal_error"
|
|
2250
2208
|
];
|
|
2251
|
-
AX_CLI_RETRYABLE_ERRORS = [
|
|
2252
|
-
// Inherited from Anthropic (via ax-cli)
|
|
2253
|
-
"overloaded_error",
|
|
2254
|
-
// Inherited from OpenAI (via ax-cli)
|
|
2255
|
-
"internal_error",
|
|
2256
|
-
// ax-cli specific
|
|
2257
|
-
"agent_error",
|
|
2258
|
-
"tool_execution_error",
|
|
2259
|
-
// xAI/Grok specific
|
|
2260
|
-
"service_overloaded"
|
|
2261
|
-
];
|
|
2262
2209
|
CODEX_RETRYABLE_ERRORS = [
|
|
2263
2210
|
...OPENAI_RETRYABLE_ERRORS,
|
|
2264
2211
|
"sandbox_error"
|
|
@@ -2291,8 +2238,7 @@ var init_base_provider = __esm({
|
|
|
2291
2238
|
/**
|
|
2292
2239
|
* Whitelist of allowed provider names for security
|
|
2293
2240
|
* v8.3.0: Support both old (claude-code, gemini-cli) and new (claude, gemini) names for backward compatibility
|
|
2294
|
-
*
|
|
2295
|
-
* v9.2.0: 'glm' is deprecated, use 'ax-cli' instead (kept for backward compatibility)
|
|
2241
|
+
* v12.0.0: Removed ax-cli (deprecated), added native 'glm' and 'grok' providers
|
|
2296
2242
|
*/
|
|
2297
2243
|
static ALLOWED_PROVIDER_NAMES = [
|
|
2298
2244
|
"claude",
|
|
@@ -2303,10 +2249,14 @@ var init_base_provider = __esm({
|
|
|
2303
2249
|
// Backward compatibility - maps to gemini CLI
|
|
2304
2250
|
"openai",
|
|
2305
2251
|
"codex",
|
|
2306
|
-
"ax-cli",
|
|
2307
|
-
// v9.2.0: Multi-model provider via ax-cli (GLM, xAI, OpenAI, Anthropic, Ollama, DeepSeek, Llama)
|
|
2308
2252
|
"glm",
|
|
2309
|
-
//
|
|
2253
|
+
// v12.0.0: Native GLM provider (Zhipu AI)
|
|
2254
|
+
"ax-glm",
|
|
2255
|
+
// v12.0.0: Alias for glm
|
|
2256
|
+
"grok",
|
|
2257
|
+
// v12.0.0: Native Grok provider (xAI)
|
|
2258
|
+
"ax-grok",
|
|
2259
|
+
// v12.0.0: Alias for grok
|
|
2310
2260
|
"test-provider"
|
|
2311
2261
|
// For unit tests
|
|
2312
2262
|
];
|
|
@@ -3042,8 +2992,10 @@ ${fullPrompt}
|
|
|
3042
2992
|
retryableProvider = "openai";
|
|
3043
2993
|
} else if (providerName === "codex") {
|
|
3044
2994
|
retryableProvider = "codex";
|
|
3045
|
-
} else if (providerName === "
|
|
3046
|
-
retryableProvider = "
|
|
2995
|
+
} else if (providerName === "glm" || providerName === "ax-glm") {
|
|
2996
|
+
retryableProvider = "glm";
|
|
2997
|
+
} else if (providerName === "grok" || providerName === "ax-grok") {
|
|
2998
|
+
retryableProvider = "grok";
|
|
3047
2999
|
}
|
|
3048
3000
|
return shouldRetryError(error, retryableProvider);
|
|
3049
3001
|
}
|
|
@@ -4036,6 +3988,9 @@ var init_openai_provider = __esm({
|
|
|
4036
3988
|
}
|
|
4037
3989
|
const startTime = Date.now();
|
|
4038
3990
|
await this.ensureInitialized();
|
|
3991
|
+
if (this.isDestroyed || !this.hybridAdapter) {
|
|
3992
|
+
throw new Error("OpenAIProvider has been destroyed or not properly initialized");
|
|
3993
|
+
}
|
|
4039
3994
|
try {
|
|
4040
3995
|
const result = await this.hybridAdapter.execute(
|
|
4041
3996
|
request.prompt,
|
|
@@ -4161,8 +4116,12 @@ function isSDKModeAvailable() {
|
|
|
4161
4116
|
const hasAPIKey = !!process.env.OPENAI_API_KEY;
|
|
4162
4117
|
let hasSDK = false;
|
|
4163
4118
|
try {
|
|
4164
|
-
|
|
4165
|
-
|
|
4119
|
+
if (typeof import.meta.resolve === "function") {
|
|
4120
|
+
import.meta.resolve("openai");
|
|
4121
|
+
hasSDK = true;
|
|
4122
|
+
} else {
|
|
4123
|
+
hasSDK = true;
|
|
4124
|
+
}
|
|
4166
4125
|
} catch {
|
|
4167
4126
|
hasSDK = false;
|
|
4168
4127
|
}
|
|
@@ -4203,6 +4162,8 @@ function getVersion() {
|
|
|
4203
4162
|
const possiblePaths = [
|
|
4204
4163
|
join(__dirname$1, "../../../package.json"),
|
|
4205
4164
|
// From src/shared/helpers
|
|
4165
|
+
join(__dirname$1, "../../package.json"),
|
|
4166
|
+
// From dist/mcp (bundled MCP entry)
|
|
4206
4167
|
join(__dirname$1, "../package.json")
|
|
4207
4168
|
// From dist
|
|
4208
4169
|
];
|
|
@@ -5195,6 +5156,58 @@ var PRECOMPILED_CONFIG = {
|
|
|
5195
5156
|
"window": "daily",
|
|
5196
5157
|
"resetHourUtc": 0
|
|
5197
5158
|
}
|
|
5159
|
+
},
|
|
5160
|
+
"glm": {
|
|
5161
|
+
"enabled": true,
|
|
5162
|
+
"priority": 4,
|
|
5163
|
+
"timeout": 12e4,
|
|
5164
|
+
"command": "ax-glm",
|
|
5165
|
+
"model": "glm-4",
|
|
5166
|
+
"healthCheck": {
|
|
5167
|
+
"enabled": true,
|
|
5168
|
+
"interval": 3e5,
|
|
5169
|
+
"timeout": 5e3
|
|
5170
|
+
},
|
|
5171
|
+
"circuitBreaker": {
|
|
5172
|
+
"enabled": true,
|
|
5173
|
+
"failureThreshold": 3,
|
|
5174
|
+
"recoveryTimeout": 6e4
|
|
5175
|
+
},
|
|
5176
|
+
"processManagement": {
|
|
5177
|
+
"gracefulShutdownTimeout": 5e3,
|
|
5178
|
+
"forceKillDelay": 1e3
|
|
5179
|
+
},
|
|
5180
|
+
"versionDetection": {
|
|
5181
|
+
"timeout": 5e3,
|
|
5182
|
+
"forceKillDelay": 1e3,
|
|
5183
|
+
"cacheEnabled": true
|
|
5184
|
+
}
|
|
5185
|
+
},
|
|
5186
|
+
"grok": {
|
|
5187
|
+
"enabled": true,
|
|
5188
|
+
"priority": 5,
|
|
5189
|
+
"timeout": 12e4,
|
|
5190
|
+
"command": "ax-grok",
|
|
5191
|
+
"model": "grok-3",
|
|
5192
|
+
"healthCheck": {
|
|
5193
|
+
"enabled": true,
|
|
5194
|
+
"interval": 3e5,
|
|
5195
|
+
"timeout": 5e3
|
|
5196
|
+
},
|
|
5197
|
+
"circuitBreaker": {
|
|
5198
|
+
"enabled": true,
|
|
5199
|
+
"failureThreshold": 3,
|
|
5200
|
+
"recoveryTimeout": 6e4
|
|
5201
|
+
},
|
|
5202
|
+
"processManagement": {
|
|
5203
|
+
"gracefulShutdownTimeout": 5e3,
|
|
5204
|
+
"forceKillDelay": 1e3
|
|
5205
|
+
},
|
|
5206
|
+
"versionDetection": {
|
|
5207
|
+
"timeout": 5e3,
|
|
5208
|
+
"forceKillDelay": 1e3,
|
|
5209
|
+
"cacheEnabled": true
|
|
5210
|
+
}
|
|
5198
5211
|
}
|
|
5199
5212
|
},
|
|
5200
5213
|
"execution": {
|
|
@@ -5406,7 +5419,15 @@ var PRECOMPILED_CONFIG = {
|
|
|
5406
5419
|
"enableFreeTierPrioritization": true,
|
|
5407
5420
|
"enableWorkloadAwareRouting": true
|
|
5408
5421
|
},
|
|
5409
|
-
"
|
|
5422
|
+
"featureFlags": {
|
|
5423
|
+
"sdkFirstMode": false,
|
|
5424
|
+
"mcpBidirectional": false,
|
|
5425
|
+
"autoInjectMCPConfig": false,
|
|
5426
|
+
"sdkFallbackEnabled": true,
|
|
5427
|
+
"deprecationWarnings": true,
|
|
5428
|
+
"providerMetrics": true
|
|
5429
|
+
},
|
|
5430
|
+
"version": "12.1.0"
|
|
5410
5431
|
};
|
|
5411
5432
|
|
|
5412
5433
|
// src/core/config/schemas.ts
|
|
@@ -5418,10 +5439,14 @@ z.enum([
|
|
|
5418
5439
|
"gemini-cli",
|
|
5419
5440
|
"openai",
|
|
5420
5441
|
"codex",
|
|
5421
|
-
"ax-cli",
|
|
5422
|
-
// v9.2.0: Multi-model provider (GLM, xAI, OpenAI, Anthropic, Ollama, DeepSeek, Llama)
|
|
5423
5442
|
"glm",
|
|
5424
|
-
//
|
|
5443
|
+
// v12.0.0: Native GLM provider (Zhipu AI)
|
|
5444
|
+
"ax-glm",
|
|
5445
|
+
// v12.0.0: Alias for glm
|
|
5446
|
+
"grok",
|
|
5447
|
+
// v12.0.0: Native Grok provider (xAI)
|
|
5448
|
+
"ax-grok",
|
|
5449
|
+
// v12.0.0: Alias for grok
|
|
5425
5450
|
"test-provider"
|
|
5426
5451
|
]).describe("Provider name (whitelisted for security)");
|
|
5427
5452
|
var commandSchema = z.string().min(1, "command is required").max(VALIDATION_LIMITS.MAX_COMMAND_LENGTH).regex(
|
|
@@ -7195,8 +7220,8 @@ var ProviderMetricsTracker = class extends EventEmitter {
|
|
|
7195
7220
|
p50,
|
|
7196
7221
|
p95,
|
|
7197
7222
|
p99,
|
|
7198
|
-
min: latencies[0],
|
|
7199
|
-
max: latencies[latencies.length - 1]
|
|
7223
|
+
min: latencies.length > 0 ? latencies[0] : 0,
|
|
7224
|
+
max: latencies.length > 0 ? latencies[latencies.length - 1] : 0
|
|
7200
7225
|
},
|
|
7201
7226
|
quality: {
|
|
7202
7227
|
totalRequests: records.length,
|
|
@@ -17116,20 +17141,25 @@ var PROVIDER_MAP = {
|
|
|
17116
17141
|
mcpToActual: {
|
|
17117
17142
|
"claude": "claude-code",
|
|
17118
17143
|
"gemini": "gemini-cli",
|
|
17119
|
-
"openai": "openai"
|
|
17144
|
+
"openai": "openai",
|
|
17145
|
+
"glm": "glm",
|
|
17146
|
+
"grok": "grok"
|
|
17120
17147
|
},
|
|
17121
17148
|
// Actual name → MCP name
|
|
17122
17149
|
actualToMcp: {
|
|
17123
17150
|
"claude-code": "claude",
|
|
17124
17151
|
"gemini-cli": "gemini",
|
|
17125
|
-
"openai": "openai"
|
|
17152
|
+
"openai": "openai",
|
|
17153
|
+
"glm": "glm",
|
|
17154
|
+
"grok": "grok"
|
|
17126
17155
|
},
|
|
17127
17156
|
// Normalized caller → Actual name (for Smart Routing)
|
|
17128
17157
|
normalizedToActual: {
|
|
17129
17158
|
"claude": "claude-code",
|
|
17130
17159
|
"gemini": "gemini-cli",
|
|
17131
17160
|
"codex": "openai",
|
|
17132
|
-
"
|
|
17161
|
+
"glm": "glm",
|
|
17162
|
+
"grok": "grok"
|
|
17133
17163
|
}
|
|
17134
17164
|
};
|
|
17135
17165
|
function mapMcpProviderToActual(mcpProvider) {
|
|
@@ -18134,6 +18164,126 @@ Task: ${task}`;
|
|
|
18134
18164
|
};
|
|
18135
18165
|
}
|
|
18136
18166
|
|
|
18167
|
+
// src/mcp/tools/get-capabilities.ts
|
|
18168
|
+
init_esm_shims();
|
|
18169
|
+
init_logger();
|
|
18170
|
+
function categorizeTools(name) {
|
|
18171
|
+
if (name.startsWith("memory_") || name === "search_memory") return "memory";
|
|
18172
|
+
if (name.startsWith("session_")) return "session";
|
|
18173
|
+
if (name.startsWith("create_task") || name.startsWith("run_task") || name.startsWith("get_task") || name.startsWith("list_task") || name.startsWith("delete_task")) return "task";
|
|
18174
|
+
if (name === "get_capabilities" || name === "list_agents" || name === "get_status" || name === "get_agent_context") return "discovery";
|
|
18175
|
+
if (name.includes("context")) return "context";
|
|
18176
|
+
return "execution";
|
|
18177
|
+
}
|
|
18178
|
+
function getExecutionMode(providerName, providerConfig) {
|
|
18179
|
+
if (providerName === "glm" || providerName === "grok") {
|
|
18180
|
+
return "sdk";
|
|
18181
|
+
}
|
|
18182
|
+
if (providerName === "claude-code" || providerName === "gemini-cli") {
|
|
18183
|
+
return "cli";
|
|
18184
|
+
}
|
|
18185
|
+
if (providerName === "openai") {
|
|
18186
|
+
return "hybrid";
|
|
18187
|
+
}
|
|
18188
|
+
return "cli";
|
|
18189
|
+
}
|
|
18190
|
+
function getProviderType(providerName) {
|
|
18191
|
+
if (providerName === "glm" || providerName === "grok") return "sdk";
|
|
18192
|
+
if (providerName === "openai") return "hybrid";
|
|
18193
|
+
return "cli";
|
|
18194
|
+
}
|
|
18195
|
+
function createGetCapabilitiesHandler(deps) {
|
|
18196
|
+
return async () => {
|
|
18197
|
+
logger.info("[MCP] get_capabilities called");
|
|
18198
|
+
try {
|
|
18199
|
+
const projectDir = process.cwd();
|
|
18200
|
+
const config = await loadConfig(projectDir);
|
|
18201
|
+
const version = getVersion();
|
|
18202
|
+
const providers = [];
|
|
18203
|
+
const providerConfigs = config.providers || {};
|
|
18204
|
+
for (const [name, providerConfig] of Object.entries(providerConfigs)) {
|
|
18205
|
+
const cfg = providerConfig;
|
|
18206
|
+
const enabled = cfg.enabled === true;
|
|
18207
|
+
let available = false;
|
|
18208
|
+
try {
|
|
18209
|
+
const availableProviders = await deps.router.getAvailableProviders();
|
|
18210
|
+
available = availableProviders.some((p) => p.name === name);
|
|
18211
|
+
} catch {
|
|
18212
|
+
available = enabled;
|
|
18213
|
+
}
|
|
18214
|
+
providers.push({
|
|
18215
|
+
name,
|
|
18216
|
+
enabled,
|
|
18217
|
+
available,
|
|
18218
|
+
type: getProviderType(name),
|
|
18219
|
+
executionMode: getExecutionMode(name, cfg),
|
|
18220
|
+
priority: cfg.priority || 0,
|
|
18221
|
+
model: cfg.model
|
|
18222
|
+
});
|
|
18223
|
+
}
|
|
18224
|
+
providers.sort((a, b) => b.priority - a.priority);
|
|
18225
|
+
const agentNames = await deps.profileLoader.listProfiles();
|
|
18226
|
+
const agents = [];
|
|
18227
|
+
for (const agentName of agentNames) {
|
|
18228
|
+
try {
|
|
18229
|
+
const profile = await deps.profileLoader.loadProfile(agentName);
|
|
18230
|
+
agents.push({
|
|
18231
|
+
name: profile.name,
|
|
18232
|
+
displayName: profile.displayName,
|
|
18233
|
+
role: profile.role,
|
|
18234
|
+
description: profile.systemPrompt?.substring(0, 200),
|
|
18235
|
+
team: profile.team,
|
|
18236
|
+
abilities: profile.abilities || []
|
|
18237
|
+
});
|
|
18238
|
+
} catch (error) {
|
|
18239
|
+
logger.warn(`Failed to load profile for ${agentName}`, { error });
|
|
18240
|
+
}
|
|
18241
|
+
}
|
|
18242
|
+
const tools = deps.toolSchemas.map((schema) => ({
|
|
18243
|
+
name: schema.name,
|
|
18244
|
+
description: schema.description,
|
|
18245
|
+
category: categorizeTools(schema.name)
|
|
18246
|
+
}));
|
|
18247
|
+
const memoryStats = await deps.memoryManager.getStats();
|
|
18248
|
+
const activeSessions = await deps.sessionManager.getActiveSessions();
|
|
18249
|
+
const result = {
|
|
18250
|
+
version,
|
|
18251
|
+
providers,
|
|
18252
|
+
agents,
|
|
18253
|
+
tools,
|
|
18254
|
+
memory: {
|
|
18255
|
+
enabled: true,
|
|
18256
|
+
entryCount: memoryStats.totalEntries,
|
|
18257
|
+
maxEntries: config.memory?.maxEntries || 1e4
|
|
18258
|
+
},
|
|
18259
|
+
sessions: {
|
|
18260
|
+
enabled: true,
|
|
18261
|
+
activeCount: activeSessions.length,
|
|
18262
|
+
maxSessions: config.orchestration?.session?.maxSessions || 100
|
|
18263
|
+
},
|
|
18264
|
+
features: {
|
|
18265
|
+
smartRouting: true,
|
|
18266
|
+
// Always enabled in v13.0.0
|
|
18267
|
+
memorySearch: true,
|
|
18268
|
+
multiAgentSessions: true,
|
|
18269
|
+
streamingNotifications: false
|
|
18270
|
+
// Configured via MCP server options
|
|
18271
|
+
}
|
|
18272
|
+
};
|
|
18273
|
+
logger.info("[MCP] get_capabilities completed", {
|
|
18274
|
+
version,
|
|
18275
|
+
providersCount: providers.length,
|
|
18276
|
+
agentsCount: agents.length,
|
|
18277
|
+
toolsCount: tools.length
|
|
18278
|
+
});
|
|
18279
|
+
return result;
|
|
18280
|
+
} catch (error) {
|
|
18281
|
+
logger.error("[MCP] get_capabilities failed", { error });
|
|
18282
|
+
throw new Error(`Capabilities check failed: ${error.message}`);
|
|
18283
|
+
}
|
|
18284
|
+
};
|
|
18285
|
+
}
|
|
18286
|
+
|
|
18137
18287
|
// src/mcp/tools/task/index.ts
|
|
18138
18288
|
init_esm_shims();
|
|
18139
18289
|
|
|
@@ -18173,7 +18323,8 @@ var TaskEngineSchema = z.enum([
|
|
|
18173
18323
|
"gemini",
|
|
18174
18324
|
"claude",
|
|
18175
18325
|
"codex",
|
|
18176
|
-
"
|
|
18326
|
+
"glm",
|
|
18327
|
+
"grok"
|
|
18177
18328
|
]);
|
|
18178
18329
|
var TaskStatusSchema = z.enum([
|
|
18179
18330
|
"pending",
|
|
@@ -18186,7 +18337,8 @@ var OriginClientSchema = z.enum([
|
|
|
18186
18337
|
"claude-code",
|
|
18187
18338
|
"gemini-cli",
|
|
18188
18339
|
"codex-cli",
|
|
18189
|
-
"
|
|
18340
|
+
"glm",
|
|
18341
|
+
"grok",
|
|
18190
18342
|
"unknown"
|
|
18191
18343
|
]);
|
|
18192
18344
|
var CreateTaskInputSchema = z.object({
|
|
@@ -18210,7 +18362,7 @@ var TaskFilterSchema = z.object({
|
|
|
18210
18362
|
offset: z.number().int().min(0).default(0)
|
|
18211
18363
|
});
|
|
18212
18364
|
z.object({
|
|
18213
|
-
engineOverride: z.enum(["gemini", "claude", "codex", "
|
|
18365
|
+
engineOverride: z.enum(["gemini", "claude", "codex", "glm", "grok"]).optional(),
|
|
18214
18366
|
timeoutMs: z.number().int().min(5e3).max(3e5).optional(),
|
|
18215
18367
|
skipCache: z.boolean().default(false)
|
|
18216
18368
|
});
|
|
@@ -18240,10 +18392,13 @@ var CLIENT_NORMALIZATION_MAP = {
|
|
|
18240
18392
|
"codex-cli": "codex-cli",
|
|
18241
18393
|
"openai": "codex-cli",
|
|
18242
18394
|
"gpt": "codex-cli",
|
|
18243
|
-
// ax-cli
|
|
18244
|
-
"
|
|
18245
|
-
"
|
|
18246
|
-
"
|
|
18395
|
+
// v12.0.0: GLM and Grok (replacing ax-cli)
|
|
18396
|
+
"glm": "glm",
|
|
18397
|
+
"zhipu": "glm",
|
|
18398
|
+
"ax-glm": "glm",
|
|
18399
|
+
"grok": "grok",
|
|
18400
|
+
"xai": "grok",
|
|
18401
|
+
"ax-grok": "grok"
|
|
18247
18402
|
};
|
|
18248
18403
|
var LoopGuard = class {
|
|
18249
18404
|
config;
|
|
@@ -18496,7 +18651,7 @@ var SQL = {
|
|
|
18496
18651
|
id TEXT PRIMARY KEY,
|
|
18497
18652
|
type TEXT NOT NULL CHECK (type IN ('web_search', 'code_review', 'code_generation', 'analysis', 'custom')),
|
|
18498
18653
|
status TEXT NOT NULL DEFAULT 'pending' CHECK (status IN ('pending', 'running', 'completed', 'failed', 'expired')),
|
|
18499
|
-
engine TEXT CHECK (engine IN ('gemini', 'claude', 'codex', '
|
|
18654
|
+
engine TEXT CHECK (engine IN ('gemini', 'claude', 'codex', 'glm', 'grok', NULL)),
|
|
18500
18655
|
priority INTEGER NOT NULL DEFAULT 5 CHECK (priority BETWEEN 1 AND 10),
|
|
18501
18656
|
|
|
18502
18657
|
payload_compressed BLOB NOT NULL,
|
|
@@ -19693,7 +19848,8 @@ function mapNormalizedProviderToOriginClient(provider) {
|
|
|
19693
19848
|
"claude": "claude-code",
|
|
19694
19849
|
"gemini": "gemini-cli",
|
|
19695
19850
|
"codex": "codex-cli",
|
|
19696
|
-
"
|
|
19851
|
+
"glm": "glm",
|
|
19852
|
+
"grok": "grok",
|
|
19697
19853
|
"unknown": "unknown"
|
|
19698
19854
|
};
|
|
19699
19855
|
return mapping[provider] ?? "unknown";
|
|
@@ -19715,7 +19871,7 @@ var createTaskSchema = {
|
|
|
19715
19871
|
},
|
|
19716
19872
|
engine: {
|
|
19717
19873
|
type: "string",
|
|
19718
|
-
enum: ["auto", "gemini", "claude", "codex", "
|
|
19874
|
+
enum: ["auto", "gemini", "claude", "codex", "glm", "grok"],
|
|
19719
19875
|
default: "auto",
|
|
19720
19876
|
description: "Target engine (auto = router decides)"
|
|
19721
19877
|
},
|
|
@@ -19806,7 +19962,7 @@ var runTaskSchema = {
|
|
|
19806
19962
|
},
|
|
19807
19963
|
engine_override: {
|
|
19808
19964
|
type: "string",
|
|
19809
|
-
enum: ["gemini", "claude", "codex", "
|
|
19965
|
+
enum: ["gemini", "claude", "codex", "glm", "grok"],
|
|
19810
19966
|
description: "Override the estimated engine"
|
|
19811
19967
|
},
|
|
19812
19968
|
timeout_ms: {
|
|
@@ -19967,7 +20123,7 @@ var listTasksSchema = {
|
|
|
19967
20123
|
},
|
|
19968
20124
|
engine: {
|
|
19969
20125
|
type: "string",
|
|
19970
|
-
enum: ["gemini", "claude", "codex", "
|
|
20126
|
+
enum: ["gemini", "claude", "codex", "glm", "grok"],
|
|
19971
20127
|
description: "Filter by engine"
|
|
19972
20128
|
},
|
|
19973
20129
|
limit: {
|
|
@@ -20787,27 +20943,33 @@ var McpClientPool = class extends EventEmitter {
|
|
|
20787
20943
|
}
|
|
20788
20944
|
startHealthChecks() {
|
|
20789
20945
|
this.healthCheckTimer = setInterval(async () => {
|
|
20790
|
-
|
|
20791
|
-
const
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20946
|
+
try {
|
|
20947
|
+
for (const [provider, pool] of this.pools) {
|
|
20948
|
+
const toRemove = [];
|
|
20949
|
+
for (const pooledClient of pool.clients) {
|
|
20950
|
+
if (!pooledClient.inUse && pooledClient.client.isConnected()) {
|
|
20951
|
+
const healthy = await pooledClient.client.healthCheck();
|
|
20952
|
+
if (!healthy) {
|
|
20953
|
+
toRemove.push(pooledClient);
|
|
20954
|
+
}
|
|
20797
20955
|
}
|
|
20798
20956
|
}
|
|
20799
|
-
|
|
20800
|
-
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20957
|
+
for (const pooledClient of toRemove) {
|
|
20958
|
+
if (pooledClient.inUse) {
|
|
20959
|
+
logger.debug("[MCP Pool] Skipping unhealthy client removal - now in use", { provider });
|
|
20960
|
+
continue;
|
|
20961
|
+
}
|
|
20962
|
+
this.emitEvent("health_check_failed", provider);
|
|
20963
|
+
logger.warn("[MCP Pool] Health check failed, removing connection", { provider });
|
|
20964
|
+
await pooledClient.client.disconnect();
|
|
20965
|
+
this.removeFromPool(pool, pooledClient);
|
|
20966
|
+
this.emitEvent("connection_closed", provider, { reason: "health_check_failed" });
|
|
20804
20967
|
}
|
|
20805
|
-
this.emitEvent("health_check_failed", provider);
|
|
20806
|
-
logger.warn("[MCP Pool] Health check failed, removing connection", { provider });
|
|
20807
|
-
await pooledClient.client.disconnect();
|
|
20808
|
-
this.removeFromPool(pool, pooledClient);
|
|
20809
|
-
this.emitEvent("connection_closed", provider, { reason: "health_check_failed" });
|
|
20810
20968
|
}
|
|
20969
|
+
} catch (error) {
|
|
20970
|
+
logger.error("[MCP Pool] Unexpected error in health check interval", {
|
|
20971
|
+
error: error.message
|
|
20972
|
+
});
|
|
20811
20973
|
}
|
|
20812
20974
|
}, this.config.healthCheckIntervalMs);
|
|
20813
20975
|
}
|
|
@@ -20870,7 +21032,8 @@ var EventSourceSchema = z.enum([
|
|
|
20870
21032
|
"claude",
|
|
20871
21033
|
"gemini",
|
|
20872
21034
|
"codex",
|
|
20873
|
-
"
|
|
21035
|
+
"glm",
|
|
21036
|
+
"grok",
|
|
20874
21037
|
"mcp",
|
|
20875
21038
|
"internal"
|
|
20876
21039
|
]);
|
|
@@ -22044,201 +22207,12 @@ var CodexEventNormalizer = class extends BaseEventNormalizer {
|
|
|
22044
22207
|
}
|
|
22045
22208
|
};
|
|
22046
22209
|
|
|
22047
|
-
// src/core/events/normalizers/ax-cli-normalizer.ts
|
|
22048
|
-
init_esm_shims();
|
|
22049
|
-
var AxCliEventNormalizer = class extends BaseEventNormalizer {
|
|
22050
|
-
source = "ax-cli";
|
|
22051
|
-
tokenCount = 0;
|
|
22052
|
-
startTime = Date.now();
|
|
22053
|
-
canHandle(rawEvent) {
|
|
22054
|
-
if (typeof rawEvent !== "object" || rawEvent === null) {
|
|
22055
|
-
return false;
|
|
22056
|
-
}
|
|
22057
|
-
const event = rawEvent;
|
|
22058
|
-
if ("type" in event && typeof event.type === "string") {
|
|
22059
|
-
const validPatterns = [
|
|
22060
|
-
"execution.",
|
|
22061
|
-
"tool.",
|
|
22062
|
-
"agent.",
|
|
22063
|
-
"memory.",
|
|
22064
|
-
"session.",
|
|
22065
|
-
// Legacy ax-cli event types
|
|
22066
|
-
"start",
|
|
22067
|
-
"progress",
|
|
22068
|
-
"complete",
|
|
22069
|
-
"error",
|
|
22070
|
-
"token"
|
|
22071
|
-
];
|
|
22072
|
-
return validPatterns.some(
|
|
22073
|
-
(pattern) => event.type.includes(pattern) || event.type === pattern.replace(".", "")
|
|
22074
|
-
);
|
|
22075
|
-
}
|
|
22076
|
-
return false;
|
|
22077
|
-
}
|
|
22078
|
-
normalize(rawEvent, correlationId) {
|
|
22079
|
-
if (!this.canHandle(rawEvent)) {
|
|
22080
|
-
return null;
|
|
22081
|
-
}
|
|
22082
|
-
const event = rawEvent;
|
|
22083
|
-
if (this.isUnifiedFormat(event.type)) {
|
|
22084
|
-
return this.normalizeUnifiedEvent(event, correlationId);
|
|
22085
|
-
}
|
|
22086
|
-
return this.normalizeLegacyEvent(event, correlationId);
|
|
22087
|
-
}
|
|
22088
|
-
/**
|
|
22089
|
-
* Check if event type matches unified format
|
|
22090
|
-
*/
|
|
22091
|
-
isUnifiedFormat(type) {
|
|
22092
|
-
const unifiedTypes = [
|
|
22093
|
-
"execution.started",
|
|
22094
|
-
"execution.progress",
|
|
22095
|
-
"execution.token",
|
|
22096
|
-
"execution.completed",
|
|
22097
|
-
"execution.error",
|
|
22098
|
-
"execution.cancelled",
|
|
22099
|
-
"tool.called",
|
|
22100
|
-
"tool.progress",
|
|
22101
|
-
"tool.result",
|
|
22102
|
-
"tool.error",
|
|
22103
|
-
"agent.selected",
|
|
22104
|
-
"agent.delegated",
|
|
22105
|
-
"agent.context_loaded",
|
|
22106
|
-
"memory.searched",
|
|
22107
|
-
"memory.added",
|
|
22108
|
-
"session.created",
|
|
22109
|
-
"session.updated",
|
|
22110
|
-
"session.completed"
|
|
22111
|
-
];
|
|
22112
|
-
return unifiedTypes.includes(type);
|
|
22113
|
-
}
|
|
22114
|
-
/**
|
|
22115
|
-
* Normalize events that already match unified format
|
|
22116
|
-
*/
|
|
22117
|
-
normalizeUnifiedEvent(event, correlationId) {
|
|
22118
|
-
const payload = this.buildPayload(event);
|
|
22119
|
-
return this.createEvent(
|
|
22120
|
-
event.type,
|
|
22121
|
-
payload,
|
|
22122
|
-
correlationId
|
|
22123
|
-
);
|
|
22124
|
-
}
|
|
22125
|
-
/**
|
|
22126
|
-
* Normalize legacy ax-cli event types
|
|
22127
|
-
*/
|
|
22128
|
-
normalizeLegacyEvent(event, correlationId) {
|
|
22129
|
-
const type = event.type.toLowerCase();
|
|
22130
|
-
if (type === "start" || type.includes("start")) {
|
|
22131
|
-
this.startTime = Date.now();
|
|
22132
|
-
this.tokenCount = 0;
|
|
22133
|
-
return this.createEvent("execution.started", {
|
|
22134
|
-
agent: event.agent || "ax-cli",
|
|
22135
|
-
task: event.task || event.message || "Unknown task",
|
|
22136
|
-
provider: event.provider || "ax-cli",
|
|
22137
|
-
model: event.model
|
|
22138
|
-
}, correlationId);
|
|
22139
|
-
}
|
|
22140
|
-
if (type === "progress") {
|
|
22141
|
-
return this.createEvent("execution.progress", {
|
|
22142
|
-
agent: event.agent || "ax-cli",
|
|
22143
|
-
progress: event.progress ?? 0,
|
|
22144
|
-
message: event.message,
|
|
22145
|
-
stage: event.stage
|
|
22146
|
-
}, correlationId);
|
|
22147
|
-
}
|
|
22148
|
-
if (type === "token") {
|
|
22149
|
-
this.tokenCount += 1;
|
|
22150
|
-
return this.createEvent("execution.token", {
|
|
22151
|
-
agent: event.agent || "ax-cli",
|
|
22152
|
-
token: event.token || event.content || "",
|
|
22153
|
-
tokensReceived: event.tokensReceived ?? this.tokenCount,
|
|
22154
|
-
throughput: event.throughput
|
|
22155
|
-
}, correlationId);
|
|
22156
|
-
}
|
|
22157
|
-
if (type === "complete" || type.includes("complete")) {
|
|
22158
|
-
const latencyMs = Date.now() - this.startTime;
|
|
22159
|
-
return this.createEvent("execution.completed", {
|
|
22160
|
-
agent: event.agent || "ax-cli",
|
|
22161
|
-
content: event.content || "",
|
|
22162
|
-
tokens: event.tokens || {
|
|
22163
|
-
prompt: 0,
|
|
22164
|
-
completion: this.tokenCount,
|
|
22165
|
-
total: this.tokenCount
|
|
22166
|
-
},
|
|
22167
|
-
latencyMs: event.latencyMs ?? latencyMs,
|
|
22168
|
-
provider: event.provider || "ax-cli",
|
|
22169
|
-
model: event.model
|
|
22170
|
-
}, correlationId);
|
|
22171
|
-
}
|
|
22172
|
-
if (type === "error") {
|
|
22173
|
-
const errorMessage = typeof event.error === "string" ? event.error : event.error?.message || "Unknown error";
|
|
22174
|
-
return this.createEvent("execution.error", {
|
|
22175
|
-
agent: event.agent || "ax-cli",
|
|
22176
|
-
error: errorMessage,
|
|
22177
|
-
code: event.code,
|
|
22178
|
-
retryable: event.retryable ?? false,
|
|
22179
|
-
provider: event.provider || "ax-cli"
|
|
22180
|
-
}, correlationId);
|
|
22181
|
-
}
|
|
22182
|
-
return null;
|
|
22183
|
-
}
|
|
22184
|
-
/**
|
|
22185
|
-
* Build payload from event data
|
|
22186
|
-
*/
|
|
22187
|
-
buildPayload(event) {
|
|
22188
|
-
const payload = {};
|
|
22189
|
-
const copyFields = [
|
|
22190
|
-
"agent",
|
|
22191
|
-
"task",
|
|
22192
|
-
"provider",
|
|
22193
|
-
"model",
|
|
22194
|
-
"content",
|
|
22195
|
-
"progress",
|
|
22196
|
-
"message",
|
|
22197
|
-
"stage",
|
|
22198
|
-
"token",
|
|
22199
|
-
"tokensReceived",
|
|
22200
|
-
"throughput",
|
|
22201
|
-
"tokens",
|
|
22202
|
-
"latencyMs",
|
|
22203
|
-
"tool",
|
|
22204
|
-
"arguments",
|
|
22205
|
-
"result",
|
|
22206
|
-
"success",
|
|
22207
|
-
"caller",
|
|
22208
|
-
"error",
|
|
22209
|
-
"code",
|
|
22210
|
-
"retryable",
|
|
22211
|
-
"fromAgent",
|
|
22212
|
-
"toAgent",
|
|
22213
|
-
"reason",
|
|
22214
|
-
"score",
|
|
22215
|
-
"confidence",
|
|
22216
|
-
"alternatives",
|
|
22217
|
-
"autoSelected"
|
|
22218
|
-
];
|
|
22219
|
-
for (const field of copyFields) {
|
|
22220
|
-
if (field in event && event[field] !== void 0) {
|
|
22221
|
-
payload[field] = event[field];
|
|
22222
|
-
}
|
|
22223
|
-
}
|
|
22224
|
-
if (!payload.agent) payload.agent = "ax-cli";
|
|
22225
|
-
return payload;
|
|
22226
|
-
}
|
|
22227
|
-
/**
|
|
22228
|
-
* Reset state for new execution
|
|
22229
|
-
*/
|
|
22230
|
-
reset() {
|
|
22231
|
-
this.tokenCount = 0;
|
|
22232
|
-
this.startTime = Date.now();
|
|
22233
|
-
}
|
|
22234
|
-
};
|
|
22235
|
-
|
|
22236
22210
|
// src/mcp/server.ts
|
|
22237
22211
|
var CLIENT_PATTERNS = [
|
|
22238
22212
|
[["claude"], "claude"],
|
|
22239
22213
|
[["gemini"], "gemini"],
|
|
22240
|
-
[["codex", "openai"], "codex"]
|
|
22241
|
-
|
|
22214
|
+
[["codex", "openai"], "codex"]
|
|
22215
|
+
// v12.0.0: Removed ax-cli (deprecated)
|
|
22242
22216
|
];
|
|
22243
22217
|
var STDIO_MAX_ITERATIONS = 100;
|
|
22244
22218
|
var STDIO_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
@@ -22331,6 +22305,22 @@ var McpServer = class _McpServer {
|
|
|
22331
22305
|
description: "Get AutomatosX system status and configuration",
|
|
22332
22306
|
inputSchema: { type: "object", properties: {} }
|
|
22333
22307
|
},
|
|
22308
|
+
// v13.0.0: Enhanced Service Discovery
|
|
22309
|
+
{
|
|
22310
|
+
name: "get_capabilities",
|
|
22311
|
+
description: `Get comprehensive AutomatosX capabilities for service discovery.
|
|
22312
|
+
|
|
22313
|
+
Returns:
|
|
22314
|
+
- providers: All AI providers with execution modes (cli/sdk/hybrid)
|
|
22315
|
+
- agents: All available agent profiles with roles and abilities
|
|
22316
|
+
- tools: All MCP tools organized by category
|
|
22317
|
+
- memory: Memory system status (entries, limits)
|
|
22318
|
+
- sessions: Session management status
|
|
22319
|
+
- features: Enabled features (smart routing, streaming, etc.)
|
|
22320
|
+
|
|
22321
|
+
Use this tool first to understand what AutomatosX offers.`,
|
|
22322
|
+
inputSchema: { type: "object", properties: {} }
|
|
22323
|
+
},
|
|
22334
22324
|
{
|
|
22335
22325
|
name: "session_create",
|
|
22336
22326
|
description: "Create a new multi-agent session",
|
|
@@ -22507,7 +22497,6 @@ var McpServer = class _McpServer {
|
|
|
22507
22497
|
this.eventBridge.registerNormalizer(new ClaudeEventNormalizer());
|
|
22508
22498
|
this.eventBridge.registerNormalizer(new GeminiEventNormalizer());
|
|
22509
22499
|
this.eventBridge.registerNormalizer(new CodexEventNormalizer());
|
|
22510
|
-
this.eventBridge.registerNormalizer(new AxCliEventNormalizer());
|
|
22511
22500
|
if (this.enableStreamingNotifications) {
|
|
22512
22501
|
this.streamingNotifier = getGlobalStreamingNotifier({
|
|
22513
22502
|
enabled: true,
|
|
@@ -22601,6 +22590,13 @@ var McpServer = class _McpServer {
|
|
|
22601
22590
|
profileLoader: this.profileLoader,
|
|
22602
22591
|
memoryManager: this.memoryManager
|
|
22603
22592
|
}));
|
|
22593
|
+
register("get_capabilities", createGetCapabilitiesHandler({
|
|
22594
|
+
memoryManager: this.memoryManager,
|
|
22595
|
+
sessionManager: this.sessionManager,
|
|
22596
|
+
router: this.router,
|
|
22597
|
+
profileLoader: this.profileLoader,
|
|
22598
|
+
toolSchemas: staticSchemas
|
|
22599
|
+
}));
|
|
22604
22600
|
register("create_task", createCreateTaskHandler({
|
|
22605
22601
|
getSession: () => this.session
|
|
22606
22602
|
}));
|