@alfe.ai/gateway 0.9.15 → 0.9.17
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/dist/health.js +46 -5
- package/package.json +5 -5
package/dist/health.js
CHANGED
|
@@ -4533,7 +4533,26 @@ _enum(MOONSHOT_MODELS);
|
|
|
4533
4533
|
_enum(QWEN_MODELS);
|
|
4534
4534
|
string().trim().min(1);
|
|
4535
4535
|
AnthropicModel.Opus5, AnthropicModel.Opus48, AnthropicModel.Opus47, AnthropicModel.Opus46, AnthropicModel.Sonnet5, AnthropicModel.Sonnet46, AnthropicModel.Haiku45, OpenAIModel.GPT4o, OpenAIModel.GPT4oMini, OpenAIModel.O3, OpenAIModel.GPT41, OpenAIModel.GPT41Mini, OpenAIModel.GPT41Nano, OpenAIModel.GPT54, OpenAIModel.GPT54Mini, OpenAIModel.GPT54Nano, OpenAIModel.GPT54Pro, OpenAIModel.GPT55, OpenAIModel.GPT55Pro, OpenAIModel.GPT56Sol, OpenAIModel.GPT56Terra, OpenAIModel.GPT56Luna, OpenAIModel.O3Mini, OpenAIModel.O4Mini, OpenAIModel.TextEmbedding3Small, OpenAIModel.TextEmbedding3Large, DeepSeekModel.Chat, DeepSeekModel.Reasoner, DeepSeekModel.V4Flash, DeepSeekModel.V4Pro, GoogleModel.Gemini35Flash, GoogleModel.Gemini31Pro, GoogleModel.Gemini31FlashLite, GoogleModel.Gemini25Pro, GoogleModel.Gemini25Flash, GoogleModel.Gemini25FlashLite, GoogleModel.Gemini20Flash, MiniMaxModel.M3, MiniMaxModel.M27, MiniMaxModel.M27HighSpeed, MiniMaxModel.M25, MiniMaxModel.M21, MiniMaxModel.M2, MistralModel.Large, MistralModel.Medium, MistralModel.Small, MistralModel.Codestral, MistralModel.Ministral8b, MistralModel.Ministral3b, MistralModel.MagistralMedium, MistralModel.MagistralSmall, MistralModel.DevstralMedium, XAIModel.Grok45, XAIModel.Grok43, XAIModel.Grok4, XAIModel.Grok41Fast, ZhipuModel.GLM52, ZhipuModel.GLM51, ZhipuModel.GLM46, ZhipuModel.GLM45, ZhipuModel.GLM45Air, MoonshotModel.K3, MoonshotModel.K26, MoonshotModel.K27Code, MoonshotModel.K27CodeHighSpeed, QwenModel.Qwen37Max, QwenModel.Qwen37Plus, QwenModel.Qwen36Flash, QwenModel.Qwen35Flash;
|
|
4536
|
-
|
|
4536
|
+
/**
|
|
4537
|
+
* Alfe-hosted open-weight models are promoted dynamically only in regions
|
|
4538
|
+
* whose private data plane exists. Keep them out of ALL_MODELS so the standard
|
|
4539
|
+
* external-provider seed cannot accidentally register one without its exact
|
|
4540
|
+
* SageMaker route, while still sharing one price contract with model and
|
|
4541
|
+
* billing seeding.
|
|
4542
|
+
*/
|
|
4543
|
+
const AlfeAwsModel = { Qwen3_8B: "alfe-qwen3-8b" };
|
|
4544
|
+
/** Reviewed Sydney Bedrock catalog. These are runtime IDs, never cross-region profiles. */
|
|
4545
|
+
const BedrockModel = {
|
|
4546
|
+
GptOss120B: "openai.gpt-oss-120b-1:0",
|
|
4547
|
+
GptOss20B: "openai.gpt-oss-20b-1:0",
|
|
4548
|
+
Qwen3Coder30B: "qwen.qwen3-coder-30b-a3b-v1:0",
|
|
4549
|
+
Glm5: "zai.glm-5",
|
|
4550
|
+
KimiK25: "moonshotai.kimi-k2.5",
|
|
4551
|
+
DeepSeekV32: "deepseek.v3.2",
|
|
4552
|
+
TitanEmbedTextV2: "amazon.titan-embed-text-v2:0"
|
|
4553
|
+
};
|
|
4554
|
+
BedrockModel.GptOss120B, BedrockModel.GptOss20B, BedrockModel.Qwen3Coder30B, BedrockModel.Glm5, BedrockModel.KimiK25, BedrockModel.DeepSeekV32;
|
|
4555
|
+
AlfeAwsModel.Qwen3_8B, BedrockModel.GptOss120B, BedrockModel.GptOss20B, BedrockModel.Qwen3Coder30B, BedrockModel.Glm5, BedrockModel.KimiK25, BedrockModel.DeepSeekV32, BedrockModel.TitanEmbedTextV2;
|
|
4537
4556
|
AnthropicModel.Opus5, AnthropicModel.Opus48, AnthropicModel.Opus47, AnthropicModel.Opus46, AnthropicModel.Sonnet5, AnthropicModel.Sonnet46, AnthropicModel.Haiku45, OpenAIModel.GPT4o, OpenAIModel.GPT4oMini, OpenAIModel.O3, OpenAIModel.GPT41, OpenAIModel.GPT41Mini, OpenAIModel.GPT41Nano, OpenAIModel.GPT54, OpenAIModel.GPT54Mini, OpenAIModel.GPT54Nano, OpenAIModel.GPT54Pro, OpenAIModel.GPT55, OpenAIModel.GPT55Pro, OpenAIModel.GPT56Sol, OpenAIModel.GPT56Terra, OpenAIModel.GPT56Luna, OpenAIModel.O3Mini, OpenAIModel.O4Mini, OpenAIModel.TextEmbedding3Small, OpenAIModel.TextEmbedding3Large, DeepSeekModel.Chat, DeepSeekModel.Reasoner, DeepSeekModel.V4Flash, DeepSeekModel.V4Pro, GoogleModel.Gemini35Flash, GoogleModel.Gemini31Pro, GoogleModel.Gemini31FlashLite, GoogleModel.Gemini25Pro, GoogleModel.Gemini25Flash, GoogleModel.Gemini25FlashLite, GoogleModel.Gemini20Flash, MiniMaxModel.M3, MiniMaxModel.M27, MiniMaxModel.M27HighSpeed, MiniMaxModel.M25, MiniMaxModel.M21, MiniMaxModel.M2, MistralModel.Large, MistralModel.Medium, MistralModel.Small, MistralModel.Codestral, MistralModel.Ministral8b, MistralModel.Ministral3b, MistralModel.MagistralMedium, MistralModel.MagistralSmall, MistralModel.DevstralMedium, XAIModel.Grok45, XAIModel.Grok43, XAIModel.Grok4, XAIModel.Grok41Fast, ZhipuModel.GLM52, ZhipuModel.GLM51, ZhipuModel.GLM46, ZhipuModel.GLM45, ZhipuModel.GLM45Air, MoonshotModel.K3, MoonshotModel.K26, MoonshotModel.K27Code, MoonshotModel.K27CodeHighSpeed, QwenModel.Qwen37Max, QwenModel.Qwen37Plus, QwenModel.Qwen36Flash, QwenModel.Qwen35Flash;
|
|
4538
4557
|
enumValues({
|
|
4539
4558
|
Standard: "standard",
|
|
@@ -4748,7 +4767,8 @@ var AlfeApiClient = class {
|
|
|
4748
4767
|
result: {
|
|
4749
4768
|
ok: false,
|
|
4750
4769
|
error: errorMessage ?? (typeof body === "string" ? body : `API error: ${String(res.status)}`),
|
|
4751
|
-
status: res.status
|
|
4770
|
+
status: res.status,
|
|
4771
|
+
...typeof errBody?.code === "string" ? { code: errBody.code } : {}
|
|
4752
4772
|
}
|
|
4753
4773
|
};
|
|
4754
4774
|
}
|
|
@@ -5758,7 +5778,7 @@ function isDesiredConfig(value) {
|
|
|
5758
5778
|
}
|
|
5759
5779
|
function isDesiredIntegration(value) {
|
|
5760
5780
|
if (!isRecord(value)) return false;
|
|
5761
|
-
return isNonEmptyString(value.integrationId) && typeof value.version === "string" && (value.desiredStatus === "active" || value.desiredStatus === "removed") && (value.reinstallRequestedAt === void 0 || typeof value.reinstallRequestedAt === "string") && (value.customSource === void 0 || isDesiredCustomSource(value.customSource));
|
|
5781
|
+
return isNonEmptyString(value.integrationId) && typeof value.version === "string" && (value.desiredStatus === "active" || value.desiredStatus === "removed") && (value.reinstallRequestedAt === void 0 || typeof value.reinstallRequestedAt === "string") && (value.connectionAuthorityVersion === void 0 || typeof value.connectionAuthorityVersion === "string" && /^[a-f0-9]{64}$/.test(value.connectionAuthorityVersion)) && (value.customSource === void 0 || isDesiredCustomSource(value.customSource));
|
|
5762
5782
|
}
|
|
5763
5783
|
/**
|
|
5764
5784
|
* Type guard: is this a cloud COMMAND message?
|
|
@@ -5993,8 +6013,29 @@ var ReconciliationEngine = class {
|
|
|
5993
6013
|
const localMap = new Map(localIntegrations.map((i) => [i.id, i]));
|
|
5994
6014
|
const desiredMap = new Map(desiredIntegrations.map((d) => [d.integrationId, d]));
|
|
5995
6015
|
try {
|
|
5996
|
-
for (const desired of desiredIntegrations) if (desired.desiredStatus === "active")
|
|
5997
|
-
|
|
6016
|
+
for (const desired of desiredIntegrations) if (desired.desiredStatus === "active") {
|
|
6017
|
+
const local = localMap.get(desired.integrationId);
|
|
6018
|
+
if (desired.connectionAuthorityVersion !== void 0 && local?.connectionAuthorityPendingVersion !== void 0 && local.status === "error" && (local.version === desired.version || desired.version === "" || local.version === "unknown") && !(desired.reinstallRequestedAt && local.installedAt && desired.reinstallRequestedAt > local.installedAt) && await this.manager.isInstallIntact(desired.integrationId)) report.results.push({
|
|
6019
|
+
integrationId: desired.integrationId,
|
|
6020
|
+
action: "activated",
|
|
6021
|
+
actualStatus: "active"
|
|
6022
|
+
});
|
|
6023
|
+
else await this.reconcileActive(desired, local, report);
|
|
6024
|
+
const result = report.results.find((item) => item.integrationId === desired.integrationId);
|
|
6025
|
+
if (result?.actualStatus === "active" && desired.connectionAuthorityVersion !== void 0 && (local?.connectionAuthorityPendingVersion !== void 0 || desired.connectionAuthorityVersion !== local?.connectionAuthorityVersion)) try {
|
|
6026
|
+
await this.manager.refreshConnections(desired.integrationId, desired.connectionAuthorityVersion, { onBeforeRuntimeMutation: () => this.ensureSuspended() });
|
|
6027
|
+
} catch (err) {
|
|
6028
|
+
captureIntegrationFailure(desired.integrationId, "refresh_connections", err);
|
|
6029
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
6030
|
+
report.errors.push({
|
|
6031
|
+
integrationId: desired.integrationId,
|
|
6032
|
+
error
|
|
6033
|
+
});
|
|
6034
|
+
result.action = "error";
|
|
6035
|
+
result.actualStatus = "error";
|
|
6036
|
+
result.errorMessage = error;
|
|
6037
|
+
}
|
|
6038
|
+
} else await this.reconcileRemoved(desired.integrationId, localMap.get(desired.integrationId), report);
|
|
5998
6039
|
for (const local of localIntegrations) if (!desiredMap.has(local.id)) await this.reconcileRemoved(local.id, local, report);
|
|
5999
6040
|
} finally {
|
|
6000
6041
|
await this.resumeIfSuspended();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/gateway",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "Alfe local gateway daemon — persistent control plane for agent integrations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"pino-roll": "^1.2.0",
|
|
24
24
|
"smol-toml": ">=1.6.1",
|
|
25
25
|
"ws": "^8.18.0",
|
|
26
|
+
"@alfe.ai/agent-api-client": "^0.19.0",
|
|
26
27
|
"@alfe.ai/ai-proxy-local": "^0.0.17",
|
|
27
28
|
"@alfe.ai/config": "^0.4.1",
|
|
28
|
-
"@alfe.ai/
|
|
29
|
-
"@alfe.ai/
|
|
30
|
-
"@alfe.ai/
|
|
31
|
-
"@alfe.ai/mcp-bundler": "^0.4.1"
|
|
29
|
+
"@alfe.ai/integration-manifest": "^0.4.1",
|
|
30
|
+
"@alfe.ai/integrations": "^0.6.5",
|
|
31
|
+
"@alfe.ai/mcp-bundler": "^0.4.2"
|
|
32
32
|
},
|
|
33
33
|
"license": "UNLICENSED",
|
|
34
34
|
"homepage": "https://alfe.ai",
|