veryfront 0.1.838 → 0.1.840
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/esm/deno.js +1 -1
- package/esm/src/agent/runtime/constants.d.ts.map +1 -1
- package/esm/src/agent/runtime/constants.js +3 -0
- package/esm/src/agent/runtime/model-resolution.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-resolution.js +10 -1
- package/esm/src/config/env.d.ts +4 -0
- package/esm/src/config/env.d.ts.map +1 -1
- package/esm/src/config/env.js +6 -0
- package/esm/src/integrations/_data.js +2 -2
- package/esm/src/integrations/schema.d.ts +4 -4
- package/esm/src/modules/server/module-server.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.js +15 -8
- package/esm/src/provider/model-registry.d.ts.map +1 -1
- package/esm/src/provider/model-registry.js +24 -1
- package/esm/src/provider/veryfront-cloud/model-catalog.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/model-catalog.js +34 -2
- package/esm/src/provider/veryfront-cloud/provider.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/provider.js +2 -1
- package/esm/src/provider/veryfront-cloud/shared.d.ts +1 -1
- package/esm/src/provider/veryfront-cloud/shared.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/shared.js +2 -0
- package/esm/src/release-assets/build-executor.d.ts.map +1 -1
- package/esm/src/release-assets/build-executor.js +59 -45
- package/esm/src/release-assets/manifest-cache.d.ts +9 -1
- package/esm/src/release-assets/manifest-cache.d.ts.map +1 -1
- package/esm/src/release-assets/manifest-cache.js +31 -10
- package/esm/src/release-assets/module-consumption.d.ts +3 -1
- package/esm/src/release-assets/module-consumption.d.ts.map +1 -1
- package/esm/src/release-assets/module-consumption.js +3 -3
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,MAA2B,CAAC;AAC3D,eAAO,MAAM,mBAAmB,GAA6B,CAAC;AAC9D,eAAO,MAAM,sBAAsB,QAAmC,CAAC;AACvE,eAAO,MAAM,iBAAiB,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,MAA2B,CAAC;AAC3D,eAAO,MAAM,mBAAmB,GAA6B,CAAC;AAC9D,eAAO,MAAM,sBAAsB,QAAmC,CAAC;AACvE,eAAO,MAAM,iBAAiB,KAAK,CAAC;AA+BpC,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK/E"}
|
|
@@ -17,6 +17,9 @@ const MODEL_MAX_OUTPUT_TOKENS = {
|
|
|
17
17
|
"google-ai-studio/gemini-3.1-flash-lite": 65_536,
|
|
18
18
|
"google-ai-studio/gemini-2.5-pro": 65_536,
|
|
19
19
|
"google-ai-studio/gemini-2.5-flash": 65_536,
|
|
20
|
+
"mistral/mistral-large-2512": 131_072,
|
|
21
|
+
"mistral/mistral-medium-3-5": 131_072,
|
|
22
|
+
"mistral/mistral-small-2603": 131_072,
|
|
20
23
|
};
|
|
21
24
|
const MODEL_MAX_OUTPUT_TOKEN_ALIASES = {
|
|
22
25
|
"google/gemini-3.1-pro": "google-ai-studio/gemini-3.1-pro-preview",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-resolution.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/model-resolution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-resolution.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/model-resolution.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAgDvC,wBAAgB,yBAAyB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED,wBAAgB,2BAA2B,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAWlE;AAiBD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CA6B1D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAnthropicEnvConfig, getGoogleGenAIEnvConfig, getOpenAIEnvConfig, } from "../../config/env.js";
|
|
1
|
+
import { getAnthropicEnvConfig, getGoogleGenAIEnvConfig, getMistralEnvConfig, getOpenAIEnvConfig, } from "../../config/env.js";
|
|
2
2
|
import { findAvailableCloudModel } from "../../provider/index.js";
|
|
3
3
|
import { DEFAULT_LOCAL_MODEL } from "../../provider/local/model-catalog.js";
|
|
4
4
|
import { isVeryfrontCloudEnabled } from "../../platform/cloud/resolver.js";
|
|
@@ -7,6 +7,7 @@ const HOSTED_PROVIDER_NAMES = new Set([
|
|
|
7
7
|
"anthropic",
|
|
8
8
|
"google",
|
|
9
9
|
"google-ai-studio",
|
|
10
|
+
"mistral",
|
|
10
11
|
"moonshotai",
|
|
11
12
|
"openai",
|
|
12
13
|
]);
|
|
@@ -40,6 +41,12 @@ const LEGACY_MODEL_ALIASES = {
|
|
|
40
41
|
"gemini-2.5-flash": "google-ai-studio/gemini-2.5-flash",
|
|
41
42
|
"kimi-k2.6": "moonshotai/kimi-k2.6",
|
|
42
43
|
"kimi-k2.5": "moonshotai/kimi-k2.5",
|
|
44
|
+
"mistral-large": "mistral/mistral-large-2512",
|
|
45
|
+
"mistral-large-2512": "mistral/mistral-large-2512",
|
|
46
|
+
"mistral-medium": "mistral/mistral-medium-3-5",
|
|
47
|
+
"mistral-medium-3-5": "mistral/mistral-medium-3-5",
|
|
48
|
+
"mistral-small": "mistral/mistral-small-2603",
|
|
49
|
+
"mistral-small-2603": "mistral/mistral-small-2603",
|
|
43
50
|
};
|
|
44
51
|
export function normalizeAgentModelConfig(model) {
|
|
45
52
|
const normalized = model?.trim();
|
|
@@ -61,6 +68,8 @@ function hasDirectProviderCredentials(provider) {
|
|
|
61
68
|
return Boolean(getAnthropicEnvConfig().apiKey);
|
|
62
69
|
case "google":
|
|
63
70
|
return Boolean(getGoogleGenAIEnvConfig().apiKey);
|
|
71
|
+
case "mistral":
|
|
72
|
+
return Boolean(getMistralEnvConfig().apiKey);
|
|
64
73
|
case "openai":
|
|
65
74
|
return Boolean(getOpenAIEnvConfig().apiKey);
|
|
66
75
|
default:
|
package/esm/src/config/env.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export declare function getAnthropicEnvConfig(): {
|
|
|
24
24
|
export declare function getGoogleGenAIEnvConfig(): {
|
|
25
25
|
apiKey?: string;
|
|
26
26
|
};
|
|
27
|
+
export declare function getMistralEnvConfig(): {
|
|
28
|
+
apiKey?: string;
|
|
29
|
+
baseURL?: string;
|
|
30
|
+
};
|
|
27
31
|
export declare function isDebugEnvEnabled(env?: EnvironmentConfig): boolean;
|
|
28
32
|
export declare function isCiEnv(env?: EnvironmentConfig): boolean;
|
|
29
33
|
export declare function isDenoTestingEnv(env?: EnvironmentConfig): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/src/config/env.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,yBAAyB,CAAC;AAqBvF,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,iBAA0C,GAAG,OAAO,CAEjG;AAED,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,iBAA0C,GAAG,MAAM,CAExF;AAED,wBAAgB,gCAAgC,CAC9C,YAAY,SAAI,EAChB,GAAG,GAAE,iBAA0C,GAC9C,MAAM,CAER;AAED,wBAAgB,cAAc,CAC5B,GAAG,GAAE,iBAA0C,GAC9C,MAAM,GAAG,SAAS,CAEpB;AA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AAED,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,iBAA0C,GAAG,OAAO,CAEjG;AAED,wBAAgB,mBAAmB,CACjC,GAAG,GAAE,iBAA0C,GAC9C,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,qBAAqB,CACnC,GAAG,GAAE,iBAA0C,GAC9C,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,iBAA0C,GAAG;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAUA;AAED,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,iBAA0C,GAAG;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAOA"}
|
package/esm/src/config/env.js
CHANGED
|
@@ -72,6 +72,12 @@ export function getAnthropicEnvConfig() {
|
|
|
72
72
|
export function getGoogleGenAIEnvConfig() {
|
|
73
73
|
return { apiKey: getEnv("GOOGLE_API_KEY") || getEnv("GOOGLE_GENERATIVE_AI_API_KEY") };
|
|
74
74
|
}
|
|
75
|
+
export function getMistralEnvConfig() {
|
|
76
|
+
return {
|
|
77
|
+
apiKey: getEnv("MISTRAL_API_KEY"),
|
|
78
|
+
baseURL: getEnv("MISTRAL_BASE_URL") || "https://api.mistral.ai/v1",
|
|
79
|
+
};
|
|
80
|
+
}
|
|
75
81
|
export function isDebugEnvEnabled(env = getEnvironmentConfig()) {
|
|
76
82
|
return env.debug;
|
|
77
83
|
}
|
|
@@ -32465,7 +32465,7 @@ export const connectors = [
|
|
|
32465
32465
|
"model": {
|
|
32466
32466
|
"type": "string",
|
|
32467
32467
|
"in": "path",
|
|
32468
|
-
"description": "Model ID, e.g. mistral-large-
|
|
32468
|
+
"description": "Model ID, e.g. mistral-large-2512 or mistral-small-2603",
|
|
32469
32469
|
"required": true,
|
|
32470
32470
|
},
|
|
32471
32471
|
},
|
|
@@ -32481,7 +32481,7 @@ export const connectors = [
|
|
|
32481
32481
|
"body": {
|
|
32482
32482
|
"model": {
|
|
32483
32483
|
"type": "string",
|
|
32484
|
-
"description": "Model ID to use, e.g. mistral-large-
|
|
32484
|
+
"description": "Model ID to use, e.g. mistral-large-2512",
|
|
32485
32485
|
"required": true,
|
|
32486
32486
|
},
|
|
32487
32487
|
"messages": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InferSchema } from "../extensions/schema/index.js";
|
|
2
|
-
export declare const getIntegrationNameSchema: () => import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "polygon" | "segment" | "zoom" | "twitter" | "azure" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "
|
|
2
|
+
export declare const getIntegrationNameSchema: () => import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "polygon" | "mistral" | "segment" | "zoom" | "twitter" | "azure" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "pagerduty" | "perplexity" | "productboard" | "razorpay" | "resend" | "salesflare" | "sendgrid" | "shortcut" | "tavily" | "typeform" | "apify" | "assemblyai" | "axiom" | "betterstack" | "browserbase" | "buildkite" | "checkly" | "clickhouse" | "deepgram" | "elevenlabs" | "fal" | "fireworks-ai" | "fly-io" | "grafana-cloud" | "groq" | "heroku" | "huggingface" | "langfuse" | "langsmith" | "launchdarkly" | "mongodb-atlas" | "netlify" | "new-relic" | "openrouter" | "pinecone" | "planetscale" | "qdrant" | "railway" | "redis-cloud" | "replicate" | "snyk" | "stability-ai" | "together-ai" | "vercel" | "weaviate" | "bamboohr" | "cal-com" | "customer-io" | "discord" | "docusign" | "gocardless" | "google-bigquery" | "google-contacts" | "help-scout" | "telegram" | "whatsapp" | "woocommerce" | "zoho-crm" | "adyen" | "azure-blob-storage" | "bigcommerce" | "brave-search" | "chargebee" | "databricks" | "deel" | "front" | "google-cloud-storage" | "google-forms" | "gorgias" | "greenhouse" | "guru" | "mollie" | "paddle" | "pandadoc" | "personio" | "portkey" | "power-bi" | "ramp" | "rippling" | "serpapi" | "shopware" | "surveymonkey" | "tally" | "wix" | "workable" | "azure-document-intelligence" | "billbee" | "cleverreach" | "datev" | "factorial" | "finapi" | "gcp" | "hetzner" | "ionos" | "klarna" | "lexoffice" | "mindee" | "moss" | "neo4j" | "north-data" | "qonto" | "sendcloud" | "sevdesk" | "skribble" | "stackit" | "trusted-shops" | "unstructured" | "unzer" | "voyage-ai" | "xentral" | "alphavantage" | "daytona" | "e2b" | "sprites">;
|
|
3
3
|
/** Zod schema for integration name. */
|
|
4
|
-
export declare const IntegrationNameSchema: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "polygon" | "segment" | "zoom" | "twitter" | "azure" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "
|
|
4
|
+
export declare const IntegrationNameSchema: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "polygon" | "mistral" | "segment" | "zoom" | "twitter" | "azure" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "pagerduty" | "perplexity" | "productboard" | "razorpay" | "resend" | "salesflare" | "sendgrid" | "shortcut" | "tavily" | "typeform" | "apify" | "assemblyai" | "axiom" | "betterstack" | "browserbase" | "buildkite" | "checkly" | "clickhouse" | "deepgram" | "elevenlabs" | "fal" | "fireworks-ai" | "fly-io" | "grafana-cloud" | "groq" | "heroku" | "huggingface" | "langfuse" | "langsmith" | "launchdarkly" | "mongodb-atlas" | "netlify" | "new-relic" | "openrouter" | "pinecone" | "planetscale" | "qdrant" | "railway" | "redis-cloud" | "replicate" | "snyk" | "stability-ai" | "together-ai" | "vercel" | "weaviate" | "bamboohr" | "cal-com" | "customer-io" | "discord" | "docusign" | "gocardless" | "google-bigquery" | "google-contacts" | "help-scout" | "telegram" | "whatsapp" | "woocommerce" | "zoho-crm" | "adyen" | "azure-blob-storage" | "bigcommerce" | "brave-search" | "chargebee" | "databricks" | "deel" | "front" | "google-cloud-storage" | "google-forms" | "gorgias" | "greenhouse" | "guru" | "mollie" | "paddle" | "pandadoc" | "personio" | "portkey" | "power-bi" | "ramp" | "rippling" | "serpapi" | "shopware" | "surveymonkey" | "tally" | "wix" | "workable" | "azure-document-intelligence" | "billbee" | "cleverreach" | "datev" | "factorial" | "finapi" | "gcp" | "hetzner" | "ionos" | "klarna" | "lexoffice" | "mindee" | "moss" | "neo4j" | "north-data" | "qonto" | "sendcloud" | "sevdesk" | "skribble" | "stackit" | "trusted-shops" | "unstructured" | "unzer" | "voyage-ai" | "xentral" | "alphavantage" | "daytona" | "e2b" | "sprites">;
|
|
5
5
|
/**
|
|
6
6
|
* Every registered integration name. The single source of truth for catalog
|
|
7
7
|
* surfaces (CLI validation, MCP listings) — derive from this instead of
|
|
@@ -515,7 +515,7 @@ export declare const IntegrationPromptSchema: import("../internal-agents/schema.
|
|
|
515
515
|
icon: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
516
516
|
}>>;
|
|
517
517
|
export declare const getIntegrationConfigSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
518
|
-
name: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "polygon" | "segment" | "zoom" | "twitter" | "azure" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "
|
|
518
|
+
name: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "polygon" | "mistral" | "segment" | "zoom" | "twitter" | "azure" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "pagerduty" | "perplexity" | "productboard" | "razorpay" | "resend" | "salesflare" | "sendgrid" | "shortcut" | "tavily" | "typeform" | "apify" | "assemblyai" | "axiom" | "betterstack" | "browserbase" | "buildkite" | "checkly" | "clickhouse" | "deepgram" | "elevenlabs" | "fal" | "fireworks-ai" | "fly-io" | "grafana-cloud" | "groq" | "heroku" | "huggingface" | "langfuse" | "langsmith" | "launchdarkly" | "mongodb-atlas" | "netlify" | "new-relic" | "openrouter" | "pinecone" | "planetscale" | "qdrant" | "railway" | "redis-cloud" | "replicate" | "snyk" | "stability-ai" | "together-ai" | "vercel" | "weaviate" | "bamboohr" | "cal-com" | "customer-io" | "discord" | "docusign" | "gocardless" | "google-bigquery" | "google-contacts" | "help-scout" | "telegram" | "whatsapp" | "woocommerce" | "zoho-crm" | "adyen" | "azure-blob-storage" | "bigcommerce" | "brave-search" | "chargebee" | "databricks" | "deel" | "front" | "google-cloud-storage" | "google-forms" | "gorgias" | "greenhouse" | "guru" | "mollie" | "paddle" | "pandadoc" | "personio" | "portkey" | "power-bi" | "ramp" | "rippling" | "serpapi" | "shopware" | "surveymonkey" | "tally" | "wix" | "workable" | "azure-document-intelligence" | "billbee" | "cleverreach" | "datev" | "factorial" | "finapi" | "gcp" | "hetzner" | "ionos" | "klarna" | "lexoffice" | "mindee" | "moss" | "neo4j" | "north-data" | "qonto" | "sendcloud" | "sevdesk" | "skribble" | "stackit" | "trusted-shops" | "unstructured" | "unzer" | "voyage-ai" | "xentral" | "alphavantage" | "daytona" | "e2b" | "sprites">;
|
|
519
519
|
displayName: import("../internal-agents/schema.js").Schema<string>;
|
|
520
520
|
icon: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
521
521
|
description: import("../internal-agents/schema.js").Schema<string>;
|
|
@@ -677,7 +677,7 @@ export declare const getIntegrationConfigSchema: () => import("../internal-agent
|
|
|
677
677
|
}>>;
|
|
678
678
|
/** Zod schema for integration config. */
|
|
679
679
|
export declare const IntegrationConfigSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
680
|
-
name: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "polygon" | "segment" | "zoom" | "twitter" | "azure" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "
|
|
680
|
+
name: import("../internal-agents/schema.js").Schema<"close" | "render" | "openai" | "cohere" | "github" | "cloudflare" | "square" | "anthropic" | "polygon" | "mistral" | "segment" | "zoom" | "twitter" | "azure" | "linear" | "gmail" | "slack" | "calendar" | "jira" | "notion" | "servicenow" | "confluence" | "gitlab" | "outlook" | "teams" | "figma" | "sap" | "sheets" | "airtable" | "supabase" | "neon" | "sharepoint" | "stripe" | "salesforce" | "onedrive" | "bitbucket" | "sentry" | "posthog" | "persona" | "zendesk" | "asana" | "harvest" | "hubspot" | "monday" | "trello" | "box" | "shopify" | "clickup" | "intercom" | "pipedrive" | "mailchimp" | "webex" | "freshdesk" | "quickbooks" | "xero" | "drive" | "docs-google" | "snowflake" | "mixpanel" | "twilio" | "aws" | "todoist" | "calendly" | "google-analytics" | "klaviyo" | "datadog" | "paypal" | "activecampaign" | "algolia" | "amplitude" | "apollo" | "ashby" | "attio" | "basecamp" | "brevo" | "circleci" | "coda" | "dialpad" | "digitalocean" | "exa" | "fathom" | "firecrawl" | "fireflies" | "folk" | "gemini" | "gong" | "google-chat" | "gusto" | "jotform" | "lever" | "metabase" | "pagerduty" | "perplexity" | "productboard" | "razorpay" | "resend" | "salesflare" | "sendgrid" | "shortcut" | "tavily" | "typeform" | "apify" | "assemblyai" | "axiom" | "betterstack" | "browserbase" | "buildkite" | "checkly" | "clickhouse" | "deepgram" | "elevenlabs" | "fal" | "fireworks-ai" | "fly-io" | "grafana-cloud" | "groq" | "heroku" | "huggingface" | "langfuse" | "langsmith" | "launchdarkly" | "mongodb-atlas" | "netlify" | "new-relic" | "openrouter" | "pinecone" | "planetscale" | "qdrant" | "railway" | "redis-cloud" | "replicate" | "snyk" | "stability-ai" | "together-ai" | "vercel" | "weaviate" | "bamboohr" | "cal-com" | "customer-io" | "discord" | "docusign" | "gocardless" | "google-bigquery" | "google-contacts" | "help-scout" | "telegram" | "whatsapp" | "woocommerce" | "zoho-crm" | "adyen" | "azure-blob-storage" | "bigcommerce" | "brave-search" | "chargebee" | "databricks" | "deel" | "front" | "google-cloud-storage" | "google-forms" | "gorgias" | "greenhouse" | "guru" | "mollie" | "paddle" | "pandadoc" | "personio" | "portkey" | "power-bi" | "ramp" | "rippling" | "serpapi" | "shopware" | "surveymonkey" | "tally" | "wix" | "workable" | "azure-document-intelligence" | "billbee" | "cleverreach" | "datev" | "factorial" | "finapi" | "gcp" | "hetzner" | "ionos" | "klarna" | "lexoffice" | "mindee" | "moss" | "neo4j" | "north-data" | "qonto" | "sendcloud" | "sevdesk" | "skribble" | "stackit" | "trusted-shops" | "unstructured" | "unzer" | "voyage-ai" | "xentral" | "alphavantage" | "daytona" | "e2b" | "sprites">;
|
|
681
681
|
displayName: import("../internal-agents/schema.js").Schema<string>;
|
|
682
682
|
icon: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
683
683
|
description: import("../internal-agents/schema.js").Schema<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-server.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/server/module-server.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAG5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AA0DtE;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwDrD,CAAC;AAyEF,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"module-server.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/server/module-server.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAG5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AA0DtE;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwDrD,CAAC;AAyEF,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAqczF;AAwWD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGrD"}
|
|
@@ -337,13 +337,15 @@ export function serveModule(req, options) {
|
|
|
337
337
|
shouldCacheReleaseVersionedModule(url, options, isSSR);
|
|
338
338
|
let releaseDependencyManifest = null;
|
|
339
339
|
let releaseDependencyManifestVersion = null;
|
|
340
|
-
let
|
|
340
|
+
let releaseDependencyRewriteEnabled = false;
|
|
341
341
|
if (canCacheReleaseVersionedModule) {
|
|
342
|
-
const manifestState = await getReleaseDependencyRewriteManifestState(options.releaseId
|
|
342
|
+
const manifestState = await getReleaseDependencyRewriteManifestState(options.releaseId, {
|
|
343
|
+
refreshCachedNull: true,
|
|
344
|
+
});
|
|
343
345
|
if (manifestState.enabled) {
|
|
346
|
+
releaseDependencyRewriteEnabled = true;
|
|
344
347
|
releaseDependencyManifest = manifestState.manifest;
|
|
345
348
|
releaseDependencyManifestVersion = manifestState.manifest?.manifestVersion ?? null;
|
|
346
|
-
releaseDependencyManifestRequired = manifestState.manifest === null;
|
|
347
349
|
}
|
|
348
350
|
}
|
|
349
351
|
const releaseModuleResponseCacheKey = canCacheReleaseVersionedModule
|
|
@@ -362,7 +364,7 @@ export function serveModule(req, options) {
|
|
|
362
364
|
if (releaseModuleResponseCacheKey) {
|
|
363
365
|
const cachedResponse = await getReleaseModuleResponse(releaseModuleResponseCacheKey);
|
|
364
366
|
if (cachedResponse?.entry) {
|
|
365
|
-
const canUseCachedResponse = !
|
|
367
|
+
const canUseCachedResponse = !releaseDependencyRewriteEnabled ||
|
|
366
368
|
!(await hasReleaseDependencyImportSpecifiers(cachedResponse.entry.body));
|
|
367
369
|
if (canUseCachedResponse) {
|
|
368
370
|
markRequestProfilePhase("module.response_cache_hit");
|
|
@@ -371,7 +373,7 @@ export function serveModule(req, options) {
|
|
|
371
373
|
}
|
|
372
374
|
return createModuleResponse(method, cachedResponse.entry.body, cachedResponse.entry.status, Object.fromEntries(cachedResponse.entry.headers));
|
|
373
375
|
}
|
|
374
|
-
markRequestProfilePhase("module.
|
|
376
|
+
markRequestProfilePhase("module.response_cache_dependency_blocked");
|
|
375
377
|
}
|
|
376
378
|
markRequestProfilePhase("module.response_cache_miss");
|
|
377
379
|
}
|
|
@@ -463,15 +465,20 @@ export function serveModule(req, options) {
|
|
|
463
465
|
if (!isSSR) {
|
|
464
466
|
code = await rewriteReleaseDependencyImportsForModule(code, {
|
|
465
467
|
releaseId: options.releaseId,
|
|
466
|
-
manifest: releaseDependencyManifest
|
|
468
|
+
manifest: releaseDependencyRewriteEnabled ? releaseDependencyManifest : undefined,
|
|
469
|
+
manifestReadOptions: { refreshCachedNull: true },
|
|
467
470
|
readDependencySource: (path) => platformFs.readTextFile(path),
|
|
468
471
|
});
|
|
469
472
|
code = await addReleaseVersionToFallbackImports(code, modulePath, options.releaseId);
|
|
470
473
|
}
|
|
471
474
|
}
|
|
475
|
+
const hasUnrewrittenReleaseDependencyImports = releaseDependencyRewriteEnabled &&
|
|
476
|
+
await hasReleaseDependencyImportSpecifiers(code);
|
|
472
477
|
const canCacheModuleResponse = releaseModuleResponseCacheKey !== null &&
|
|
473
|
-
|
|
474
|
-
|
|
478
|
+
!hasUnrewrittenReleaseDependencyImports;
|
|
479
|
+
if (hasUnrewrittenReleaseDependencyImports) {
|
|
480
|
+
markRequestProfilePhase("module.response_cache_dependency_blocked");
|
|
481
|
+
}
|
|
475
482
|
const headers = getModuleHeaders(modulePath, {
|
|
476
483
|
cacheable: canCacheModuleResponse,
|
|
477
484
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-registry.d.ts","sourceRoot":"","sources":["../../../src/src/provider/model-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"model-registry.d.ts","sourceRoot":"","sources":["../../../src/src/provider/model-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAyBH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,sDAAsD;AACtD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,YAAY,CAAC;AAOrE;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,IAAI,CAEN;AAgMD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAWvD;AAMD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CA6D9D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGtD;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,EAAE,CAGtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
15
|
import { createError, fromError, toError } from "../errors/veryfront-error.js";
|
|
16
|
-
import { getAnthropicEnvConfig, getGoogleGenAIEnvConfig, getOpenAIEnvConfig, } from "../config/env.js";
|
|
16
|
+
import { getAnthropicEnvConfig, getGoogleGenAIEnvConfig, getMistralEnvConfig, getOpenAIEnvConfig, } from "../config/env.js";
|
|
17
17
|
import { ensureBuiltinLLMProviders } from "../extensions/builtin-extensions.js";
|
|
18
18
|
import { tryResolve } from "../extensions/contracts.js";
|
|
19
19
|
import { LLMProviderRegistryName } from "../extensions/llm/index.js";
|
|
@@ -125,6 +125,29 @@ function autoInitializeFromEnv() {
|
|
|
125
125
|
}));
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
+
if (!manager.has("mistral")) {
|
|
129
|
+
manager.registerShared("mistral", (id) => {
|
|
130
|
+
const config = getMistralEnvConfig();
|
|
131
|
+
if (!config.apiKey) {
|
|
132
|
+
throw toError(createError({
|
|
133
|
+
type: "config",
|
|
134
|
+
message: "MISTRAL_API_KEY not set. Set the environment variable or register a custom provider with registerModelProvider().",
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
const registry = ensureBuiltinLLMProviders();
|
|
138
|
+
const provider = registry.get("openai");
|
|
139
|
+
if (provider) {
|
|
140
|
+
return provider.createModel(id, {
|
|
141
|
+
credential: config.apiKey,
|
|
142
|
+
baseURL: config.baseURL,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
throw toError(createError({
|
|
146
|
+
type: "config",
|
|
147
|
+
message: "OpenAI-compatible provider not installed. Add @veryfront/ext-llm-openai to use mistral/* models.",
|
|
148
|
+
}));
|
|
149
|
+
});
|
|
150
|
+
}
|
|
128
151
|
// Register the local provider (always available, no API key needed).
|
|
129
152
|
// createLocalModel is a lightweight synchronous constructor — the actual
|
|
130
153
|
// @huggingface/transformers import and model loading happen lazily on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/src/provider/veryfront-cloud/model-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,4DAA4D;AAC5D,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,0DAA0D;AAC1D,MAAM,MAAM,uBAAuB,GAAG;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,gCAAgC,SAAS,CAAC;AACvD,iDAAiD;AACjD,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../../src/src/provider/veryfront-cloud/model-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,4DAA4D;AAC5D,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,0DAA0D;AAC1D,MAAM,MAAM,uBAAuB,GAAG;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,gCAAgC,SAAS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D,eAAO,MAAM,kCAAkC,4CAAsC,CAAC"}
|
|
@@ -8,6 +8,7 @@ const VERYFRONT_CLOUD_GATEWAY_MODEL_PROVIDER_PREFIXES = [
|
|
|
8
8
|
"google/",
|
|
9
9
|
"google-ai-studio/",
|
|
10
10
|
"moonshotai/",
|
|
11
|
+
"mistral/",
|
|
11
12
|
];
|
|
12
13
|
/** Shared Veryfront Cloud chat models value. */
|
|
13
14
|
export const VERYFRONT_CLOUD_CHAT_MODELS = [
|
|
@@ -62,6 +63,27 @@ export const VERYFRONT_CLOUD_CHAT_MODELS = [
|
|
|
62
63
|
name: "Kimi K2.6",
|
|
63
64
|
description: "Deep thinking and multimodal",
|
|
64
65
|
},
|
|
66
|
+
{
|
|
67
|
+
id: "mistral-large",
|
|
68
|
+
modelId: "mistral/mistral-large-2512",
|
|
69
|
+
provider: "mistral",
|
|
70
|
+
name: "Mistral Large 3",
|
|
71
|
+
description: "Flagship multimodal Mistral model",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "mistral-medium",
|
|
75
|
+
modelId: "mistral/mistral-medium-3-5",
|
|
76
|
+
provider: "mistral",
|
|
77
|
+
name: "Mistral Medium 3.5",
|
|
78
|
+
description: "Balanced Mistral model for agentic and coding tasks",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "mistral-small",
|
|
82
|
+
modelId: "mistral/mistral-small-2603",
|
|
83
|
+
provider: "mistral",
|
|
84
|
+
name: "Mistral Small 4",
|
|
85
|
+
description: "Fast Mistral model for lightweight tasks",
|
|
86
|
+
},
|
|
65
87
|
];
|
|
66
88
|
/** Find Veryfront Cloud model. */
|
|
67
89
|
export function findVeryfrontCloudModel(id) {
|
|
@@ -84,7 +106,10 @@ export function getVeryfrontCloudProviderFromModelId(modelId) {
|
|
|
84
106
|
const prefix = normalizedModelId.split("/")[0];
|
|
85
107
|
if (prefix === "google-ai-studio")
|
|
86
108
|
return "google";
|
|
87
|
-
if (prefix === "openai" ||
|
|
109
|
+
if (prefix === "openai" ||
|
|
110
|
+
prefix === "anthropic" ||
|
|
111
|
+
prefix === "moonshotai" ||
|
|
112
|
+
prefix === "mistral")
|
|
88
113
|
return prefix;
|
|
89
114
|
throw new Error(`Unknown model provider prefix "${prefix}" in model ID "${modelId}"`);
|
|
90
115
|
}
|
|
@@ -163,8 +188,15 @@ const PROVIDER_LABELS = {
|
|
|
163
188
|
openai: "OpenAI",
|
|
164
189
|
google: "Google",
|
|
165
190
|
moonshotai: "Kimi",
|
|
191
|
+
mistral: "Mistral",
|
|
166
192
|
};
|
|
167
|
-
const PROVIDER_ORDER = [
|
|
193
|
+
const PROVIDER_ORDER = [
|
|
194
|
+
"anthropic",
|
|
195
|
+
"openai",
|
|
196
|
+
"google",
|
|
197
|
+
"moonshotai",
|
|
198
|
+
"mistral",
|
|
199
|
+
];
|
|
168
200
|
/** Group Veryfront Cloud models by provider. */
|
|
169
201
|
export function groupVeryfrontCloudModelsByProvider() {
|
|
170
202
|
return PROVIDER_ORDER.map((provider) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/src/provider/veryfront-cloud/provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAShD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/src/provider/veryfront-cloud/provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAShD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAuEvE"}
|
|
@@ -35,7 +35,8 @@ export function createVeryfrontCloudModel(modelId) {
|
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
37
|
case "openai":
|
|
38
|
-
case "moonshotai":
|
|
38
|
+
case "moonshotai":
|
|
39
|
+
case "mistral": {
|
|
39
40
|
const openai = registry.get("openai");
|
|
40
41
|
if (openai) {
|
|
41
42
|
return openai.createModel(upstreamModelId, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Public API contract for Veryfront Cloud provider ID. */
|
|
2
|
-
export type VeryfrontCloudProviderId = "anthropic" | "openai" | "google" | "moonshotai";
|
|
2
|
+
export type VeryfrontCloudProviderId = "anthropic" | "openai" | "google" | "moonshotai" | "mistral";
|
|
3
3
|
interface ParsedVeryfrontCloudModelId {
|
|
4
4
|
provider: VeryfrontCloudProviderId;
|
|
5
5
|
modelId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/src/provider/veryfront-cloud/shared.ts"],"names":[],"mappings":"AAGA,2DAA2D;AAC3D,MAAM,MAAM,wBAAwB,GAChC,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/src/provider/veryfront-cloud/shared.ts"],"names":[],"mappings":"AAGA,2DAA2D;AAC3D,MAAM,MAAM,wBAAwB,GAChC,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,SAAS,CAAC;AAEd,UAAU,2BAA2B;IACnC,QAAQ,EAAE,wBAAwB,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAiCD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,GAAG,WAAW,GAC7B,2BAA2B,CA+B7B;AAED,wBAAgB,8BAA8B,IAAI;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAmBA;AAED,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,wBAAwB,GACjC,MAAM,CAER;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,KAAK,CAed"}
|
|
@@ -6,12 +6,14 @@ const PROVIDER_ALIASES = {
|
|
|
6
6
|
google: "google",
|
|
7
7
|
"google-ai-studio": "google",
|
|
8
8
|
moonshotai: "moonshotai",
|
|
9
|
+
mistral: "mistral",
|
|
9
10
|
};
|
|
10
11
|
const GATEWAY_PATHS = {
|
|
11
12
|
anthropic: "ai/gateway/anthropic/v1",
|
|
12
13
|
openai: "ai/gateway/openai/v1",
|
|
13
14
|
google: "ai/gateway/google/v1beta",
|
|
14
15
|
moonshotai: "ai/gateway/moonshotai/v1",
|
|
16
|
+
mistral: "ai/gateway/mistral/v1",
|
|
15
17
|
};
|
|
16
18
|
function joinUrl(base, path) {
|
|
17
19
|
return `${base.replace(/\/+$/, "")}/${path.replace(/^\/+/, "")}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-executor.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/build-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAiCH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA0B/C,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,MAAM,EAAE,uBAAuB,CAAC;IAChC,sDAAsD;IAEtD,OAAO,EAAE,GAAG,C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CACrB;AAED,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,KAAK,EAAE,UAAU,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"build-executor.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/build-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAiCH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA0B/C,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,MAAM,EAAE,uBAAuB,CAAC;IAChC,sDAAsD;IAEtD,OAAO,EAAE,GAAG,CAAC;IACb;;;;OAIG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,gCAAgC,CAAC;CACtD;AAED,MAAM,MAAM,qBAAqB,GAAG,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAElB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,KAC9E,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB,MAAM,WAAW,4BAA4B;IAC3C,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,WAAW,EAA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AAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC5C,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC,CAkCD;AAsDD,wBAAsB,+BAA+B,CAAC,OAAO,EAAE;IAC7D,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC;IACV,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC5C,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC,CAkCD;AAgbD,wBAAsB,8BAA8B,CAAC,OAAO,EAAE;IAC5D,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,GAAG,OAAO,CAAC;IACV,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC5C,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC,CAqCD;AAkDD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,CAAC,CA2ClC"}
|
|
@@ -324,6 +324,10 @@ function addDependencyModule(dependencies, dependency) {
|
|
|
324
324
|
function normalizeDependencySpecifier(specifier) {
|
|
325
325
|
return specifier.replace(/[?#].*$/, "");
|
|
326
326
|
}
|
|
327
|
+
function pushGap(gaps, gap) {
|
|
328
|
+
if (!gaps.includes(gap))
|
|
329
|
+
gaps.push(gap);
|
|
330
|
+
}
|
|
327
331
|
function dependencyLookupKeys(specifier) {
|
|
328
332
|
const keys = new Set([specifier, normalizeDependencySpecifier(specifier)]);
|
|
329
333
|
if (specifier.startsWith("http://") || specifier.startsWith("https://")) {
|
|
@@ -710,7 +714,18 @@ async function finalizeProjectModules(transformedModules, knownPaths, dependency
|
|
|
710
714
|
if (!transformed)
|
|
711
715
|
return null;
|
|
712
716
|
const nextStack = [...stack, logicalPath];
|
|
713
|
-
|
|
717
|
+
let imports;
|
|
718
|
+
try {
|
|
719
|
+
imports = await collectProjectModuleImports(transformed.code, logicalPath, knownPaths);
|
|
720
|
+
}
|
|
721
|
+
catch (error) {
|
|
722
|
+
pushGap(gaps, `module-import-parse-failed:${logicalPath}`);
|
|
723
|
+
logger.warn("Module import parse failed during release asset finalization", {
|
|
724
|
+
path: logicalPath,
|
|
725
|
+
error: sanitizeError(error),
|
|
726
|
+
});
|
|
727
|
+
return null;
|
|
728
|
+
}
|
|
714
729
|
for (const importedPath of imports.values()) {
|
|
715
730
|
await finalize(importedPath, nextStack);
|
|
716
731
|
}
|
|
@@ -762,7 +777,22 @@ async function collectCyclicProjectModules(transformedModules, knownPaths, gaps)
|
|
|
762
777
|
return;
|
|
763
778
|
visiting.add(logicalPath);
|
|
764
779
|
stack.push(logicalPath);
|
|
765
|
-
|
|
780
|
+
let imports;
|
|
781
|
+
try {
|
|
782
|
+
imports = await collectProjectModuleImports(transformed.code, logicalPath, knownPaths);
|
|
783
|
+
}
|
|
784
|
+
catch (error) {
|
|
785
|
+
cyclic.add(logicalPath);
|
|
786
|
+
pushGap(gaps, `module-import-parse-failed:${logicalPath}`);
|
|
787
|
+
logger.warn("Module import parse failed during release asset cycle collection", {
|
|
788
|
+
path: logicalPath,
|
|
789
|
+
error: sanitizeError(error),
|
|
790
|
+
});
|
|
791
|
+
stack.pop();
|
|
792
|
+
visiting.delete(logicalPath);
|
|
793
|
+
visited.add(logicalPath);
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
766
796
|
for (const importedPath of imports.values()) {
|
|
767
797
|
if (transformedModules.has(importedPath))
|
|
768
798
|
await visit(importedPath);
|
|
@@ -1048,23 +1078,15 @@ async function runBuildInner(input, tempDir, client, transform) {
|
|
|
1048
1078
|
});
|
|
1049
1079
|
}
|
|
1050
1080
|
catch (error) {
|
|
1051
|
-
// Hard requirement: any module transform failure -> report failed, stop.
|
|
1052
1081
|
const sanitized = sanitizeError(error);
|
|
1082
|
+
pushGap(gaps, `module-transform-failed:${logicalPath}`);
|
|
1053
1083
|
logger.warn("Module transform failed during release asset build", {
|
|
1054
1084
|
path: logicalPath,
|
|
1055
1085
|
error: sanitized,
|
|
1056
1086
|
});
|
|
1057
|
-
|
|
1058
|
-
return {
|
|
1059
|
-
success: false,
|
|
1060
|
-
state: "failed",
|
|
1061
|
-
moduleCount: 0,
|
|
1062
|
-
cssCount: 0,
|
|
1063
|
-
routeCount: 0,
|
|
1064
|
-
gaps,
|
|
1065
|
-
error: sanitized,
|
|
1066
|
-
};
|
|
1087
|
+
return null;
|
|
1067
1088
|
}
|
|
1089
|
+
const unvendoredCode = code;
|
|
1068
1090
|
if (vendorDependencies) {
|
|
1069
1091
|
try {
|
|
1070
1092
|
const vendored = await vendorHttpImports(code, {
|
|
@@ -1078,24 +1100,28 @@ async function runBuildInner(input, tempDir, client, transform) {
|
|
|
1078
1100
|
}
|
|
1079
1101
|
catch (error) {
|
|
1080
1102
|
const sanitized = sanitizeError(error);
|
|
1103
|
+
pushGap(gaps, `module-dependency-vendor-failed:${logicalPath}`);
|
|
1081
1104
|
logger.warn("HTTP dependency vendoring failed during release asset build", {
|
|
1082
1105
|
path: logicalPath,
|
|
1083
1106
|
error: sanitized,
|
|
1084
1107
|
});
|
|
1085
|
-
|
|
1086
|
-
return {
|
|
1087
|
-
success: false,
|
|
1088
|
-
state: "failed",
|
|
1089
|
-
moduleCount: 0,
|
|
1090
|
-
cssCount: 0,
|
|
1091
|
-
routeCount: 0,
|
|
1092
|
-
gaps,
|
|
1093
|
-
error: sanitized,
|
|
1094
|
-
};
|
|
1108
|
+
code = unvendoredCode;
|
|
1095
1109
|
}
|
|
1096
1110
|
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1111
|
+
let imports;
|
|
1112
|
+
try {
|
|
1113
|
+
imports = await collectProjectModuleImports(code, logicalPath, knownPaths);
|
|
1114
|
+
}
|
|
1115
|
+
catch (error) {
|
|
1116
|
+
const sanitized = sanitizeError(error);
|
|
1117
|
+
pushGap(gaps, `module-import-parse-failed:${logicalPath}`);
|
|
1118
|
+
logger.warn("Module import parse failed during release asset build", {
|
|
1119
|
+
path: logicalPath,
|
|
1120
|
+
error: sanitized,
|
|
1121
|
+
});
|
|
1122
|
+
return null;
|
|
1123
|
+
}
|
|
1124
|
+
transformedModules.set(logicalPath, { logicalPath, code, unvendoredCode });
|
|
1099
1125
|
for (const importedPath of imports.values()) {
|
|
1100
1126
|
const failure = await transformProjectModule(importedPath);
|
|
1101
1127
|
if (failure)
|
|
@@ -1120,19 +1146,10 @@ async function runBuildInner(input, tempDir, client, transform) {
|
|
|
1120
1146
|
}
|
|
1121
1147
|
catch (error) {
|
|
1122
1148
|
const sanitized = sanitizeError(error);
|
|
1149
|
+
pushGap(gaps, "dependency-vendor-failed:react-import-map");
|
|
1123
1150
|
logger.warn("React import-map dependency vendoring failed during release asset build", {
|
|
1124
1151
|
error: sanitized,
|
|
1125
1152
|
});
|
|
1126
|
-
await client.reportReleaseAssetManifestState(input.releaseVersionRef, "failed", sanitized);
|
|
1127
|
-
return {
|
|
1128
|
-
success: false,
|
|
1129
|
-
state: "failed",
|
|
1130
|
-
moduleCount: 0,
|
|
1131
|
-
cssCount: 0,
|
|
1132
|
-
routeCount: 0,
|
|
1133
|
-
gaps,
|
|
1134
|
-
error: sanitized,
|
|
1135
|
-
};
|
|
1136
1153
|
}
|
|
1137
1154
|
}
|
|
1138
1155
|
let httpDependencies;
|
|
@@ -1144,19 +1161,16 @@ async function runBuildInner(input, tempDir, client, transform) {
|
|
|
1144
1161
|
}
|
|
1145
1162
|
catch (error) {
|
|
1146
1163
|
const sanitized = sanitizeError(error);
|
|
1164
|
+
pushGap(gaps, "dependency-finalize-failed");
|
|
1147
1165
|
logger.warn("HTTP dependency finalization failed during release asset build", {
|
|
1148
1166
|
error: sanitized,
|
|
1149
1167
|
});
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
routeCount: 0,
|
|
1157
|
-
gaps,
|
|
1158
|
-
error: sanitized,
|
|
1159
|
-
};
|
|
1168
|
+
for (const transformed of transformedModules.values()) {
|
|
1169
|
+
transformed.code = transformed.unvendoredCode;
|
|
1170
|
+
}
|
|
1171
|
+
dependencyModules.clear();
|
|
1172
|
+
httpDependencies = {};
|
|
1173
|
+
httpDependencyFallbackUrls = new Map();
|
|
1160
1174
|
}
|
|
1161
1175
|
httpDependencies = exposeDependencySpecifierAliases(httpDependencies, dependencyModules);
|
|
1162
1176
|
const dependencyUrls = buildDependencyUrlMap(httpDependencies, dependencyModules);
|
|
@@ -23,6 +23,14 @@
|
|
|
23
23
|
* @module release-assets/manifest-cache
|
|
24
24
|
*/
|
|
25
25
|
import { type ReleaseAssetManifest } from "./manifest-schema.js";
|
|
26
|
+
export interface ReadyManifestReadOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Retry a cached non-ready result after a short throttle instead of waiting
|
|
29
|
+
* for the full null TTL. Used by module responses that cannot be cached
|
|
30
|
+
* safely until dependency imports can be rewritten through the manifest.
|
|
31
|
+
*/
|
|
32
|
+
refreshCachedNull?: boolean;
|
|
33
|
+
}
|
|
26
34
|
/**
|
|
27
35
|
* Fetcher used to retrieve a manifest for a release. Registered per-releaseId
|
|
28
36
|
* by the runtime adapter that owns that release, so the correct project-scoped
|
|
@@ -73,7 +81,7 @@ export declare function getReadyManifestForRender(releaseId: string | null | und
|
|
|
73
81
|
* falls back to null when the flag is off, no fetcher is registered, the
|
|
74
82
|
* manifest is unavailable, or the fetch fails.
|
|
75
83
|
*/
|
|
76
|
-
export declare function getReadyManifestForRenderAsync(releaseId: string | null | undefined): Promise<ReleaseAssetManifest | null>;
|
|
84
|
+
export declare function getReadyManifestForRenderAsync(releaseId: string | null | undefined, options?: ReadyManifestReadOptions): Promise<ReleaseAssetManifest | null>;
|
|
77
85
|
/** Clear cached manifest bodies while keeping registered fetchers intact. */
|
|
78
86
|
export declare function clearCachedReleaseAssetManifests(): void;
|
|
79
87
|
/** Clear the cache and fetcher registry (tests / adapter teardown). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-cache.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/manifest-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAWH,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest-cache.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/manifest-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAWH,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAgC5F,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAOD;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAC1B;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAChE,CAAC;CACH;AAKD;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,2BAA2B,GACnC,IAAI,CAEN;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE3E;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,2BAA2B,GAAG,SAAS,GAC/C,IAAI,CAMN;AASD,yEAAyE;AACzE,wBAAgB,6BAA6B,IAAI,OAAO,CAKvD;AAiCD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,oBAAoB,GAAG,IAAI,CAgC7B;AAED;;;;;;;GAOG;AACH,wBAAsB,8BAA8B,CAClD,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAkCtC;AAgGD,6EAA6E;AAC7E,wBAAgB,gCAAgC,IAAI,IAAI,CAIvD;AAED,uEAAuE;AACvE,wBAAgB,8BAA8B,IAAI,IAAI,CAGrD"}
|
|
@@ -34,6 +34,8 @@ const logger = serverLogger.component("release-asset-manifest");
|
|
|
34
34
|
const MAX_CACHED_MANIFESTS = 500;
|
|
35
35
|
/** Short TTL for non-ready / missing results (ms). */
|
|
36
36
|
const NON_READY_TTL_MS = 30_000;
|
|
37
|
+
/** Minimum delay before an awaited consumer can retry a cached non-ready result. */
|
|
38
|
+
const NON_READY_REVALIDATE_MS = 5_000;
|
|
37
39
|
/** TTL for ready manifests — long but finite so superseded entries are picked up (15 min). */
|
|
38
40
|
const READY_TTL_MS = 15 * 60 * 1000;
|
|
39
41
|
/** Background revalidation interval for ready manifests (1 min). */
|
|
@@ -162,7 +164,7 @@ export function getReadyManifestForRender(releaseId) {
|
|
|
162
164
|
* falls back to null when the flag is off, no fetcher is registered, the
|
|
163
165
|
* manifest is unavailable, or the fetch fails.
|
|
164
166
|
*/
|
|
165
|
-
export async function getReadyManifestForRenderAsync(releaseId) {
|
|
167
|
+
export async function getReadyManifestForRenderAsync(releaseId, options = {}) {
|
|
166
168
|
if (!releaseId) {
|
|
167
169
|
markManifestDecision("no_release_id");
|
|
168
170
|
return null;
|
|
@@ -181,8 +183,13 @@ export async function getReadyManifestForRenderAsync(releaseId) {
|
|
|
181
183
|
maybeScheduleReadyRefresh(releaseId, best);
|
|
182
184
|
return best.manifest;
|
|
183
185
|
}
|
|
186
|
+
const now = Date.now();
|
|
184
187
|
const plain = manifestCache.get(releaseId);
|
|
185
|
-
if (plain && plain.expiresAt >
|
|
188
|
+
if (plain && plain.expiresAt > now) {
|
|
189
|
+
if (options.refreshCachedNull && (plain.refreshAfter ?? plain.expiresAt) <= now) {
|
|
190
|
+
markManifestDecision("cached_null_refresh");
|
|
191
|
+
return await fetchManifest(releaseId);
|
|
192
|
+
}
|
|
186
193
|
markManifestDecision("cached_null");
|
|
187
194
|
return null;
|
|
188
195
|
}
|
|
@@ -211,14 +218,15 @@ function fetchManifest(releaseId) {
|
|
|
211
218
|
return null;
|
|
212
219
|
if (!result) {
|
|
213
220
|
markManifestDecision("fetch_missing");
|
|
214
|
-
|
|
221
|
+
cacheNonReadyManifest(releaseId);
|
|
215
222
|
return null;
|
|
216
223
|
}
|
|
217
|
-
const
|
|
224
|
+
const manifestState = normalizeManifestState(result.state);
|
|
225
|
+
const manifest = isUsableManifestState(result.state) && result.manifest
|
|
218
226
|
? parseReleaseAssetManifest(result.manifest)
|
|
219
227
|
: null;
|
|
220
228
|
if (manifest) {
|
|
221
|
-
markManifestDecision("fetch_ready");
|
|
229
|
+
markManifestDecision(manifestState === "partial" ? "fetch_partial" : "fetch_ready");
|
|
222
230
|
const key = cacheKey(releaseId, manifest.manifestVersion);
|
|
223
231
|
manifestCache.set(key, {
|
|
224
232
|
manifest,
|
|
@@ -228,17 +236,16 @@ function fetchManifest(releaseId) {
|
|
|
228
236
|
logger.debug("Cached ready manifest", {
|
|
229
237
|
releaseId,
|
|
230
238
|
manifestVersion: manifest.manifestVersion,
|
|
239
|
+
state: result.state,
|
|
231
240
|
ttlMs: READY_TTL_MS,
|
|
232
241
|
refreshMs: READY_REVALIDATE_MS,
|
|
233
242
|
});
|
|
234
243
|
return manifest;
|
|
235
244
|
}
|
|
236
245
|
else {
|
|
246
|
+
markManifestDecision(`fetch_${manifestState}`);
|
|
237
247
|
markManifestDecision("fetch_not_ready");
|
|
238
|
-
|
|
239
|
-
manifest: null,
|
|
240
|
-
expiresAt: Date.now() + NON_READY_TTL_MS,
|
|
241
|
-
});
|
|
248
|
+
cacheNonReadyManifest(releaseId);
|
|
242
249
|
return null;
|
|
243
250
|
}
|
|
244
251
|
}
|
|
@@ -250,7 +257,7 @@ function fetchManifest(releaseId) {
|
|
|
250
257
|
if (fetchGeneration !== cacheGeneration)
|
|
251
258
|
return null;
|
|
252
259
|
markManifestDecision("fetch_failed");
|
|
253
|
-
|
|
260
|
+
cacheNonReadyManifest(releaseId);
|
|
254
261
|
return null;
|
|
255
262
|
}
|
|
256
263
|
finally {
|
|
@@ -263,6 +270,20 @@ function fetchManifest(releaseId) {
|
|
|
263
270
|
inFlight.set(releaseId, { generation: fetchGeneration, token, promise });
|
|
264
271
|
return promise;
|
|
265
272
|
}
|
|
273
|
+
function isUsableManifestState(state) {
|
|
274
|
+
return state === "ready" || state === "partial";
|
|
275
|
+
}
|
|
276
|
+
function normalizeManifestState(state) {
|
|
277
|
+
return state.toLowerCase().replace(/[^a-z0-9_]/g, "_").slice(0, 32) || "unknown";
|
|
278
|
+
}
|
|
279
|
+
function cacheNonReadyManifest(releaseId) {
|
|
280
|
+
const now = Date.now();
|
|
281
|
+
manifestCache.set(releaseId, {
|
|
282
|
+
manifest: null,
|
|
283
|
+
expiresAt: now + NON_READY_TTL_MS,
|
|
284
|
+
refreshAfter: now + NON_READY_REVALIDATE_MS,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
266
287
|
/** Clear cached manifest bodies while keeping registered fetchers intact. */
|
|
267
288
|
export function clearCachedReleaseAssetManifests() {
|
|
268
289
|
cacheGeneration++;
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module release-assets/module-consumption
|
|
10
10
|
*/
|
|
11
|
+
import { type ReadyManifestReadOptions } from "./manifest-cache.js";
|
|
11
12
|
import type { ReleaseAssetManifest } from "./manifest-schema.js";
|
|
12
13
|
export interface RewriteReleaseDependencyImportsOptions {
|
|
13
14
|
releaseId?: string | null;
|
|
14
15
|
readDependencySource: (path: string) => Promise<string>;
|
|
15
16
|
manifest?: ReleaseAssetManifest | null;
|
|
17
|
+
manifestReadOptions?: ReadyManifestReadOptions;
|
|
16
18
|
}
|
|
17
19
|
export interface ReleaseDependencyRewriteManifestState {
|
|
18
20
|
enabled: boolean;
|
|
@@ -20,6 +22,6 @@ export interface ReleaseDependencyRewriteManifestState {
|
|
|
20
22
|
}
|
|
21
23
|
export declare function isReleaseDependencyImportMapRewriteEnabled(): boolean;
|
|
22
24
|
export declare function hasReleaseDependencyImportSpecifiers(code: string): Promise<boolean>;
|
|
23
|
-
export declare function getReleaseDependencyRewriteManifestState(releaseId: string | null | undefined): Promise<ReleaseDependencyRewriteManifestState>;
|
|
25
|
+
export declare function getReleaseDependencyRewriteManifestState(releaseId: string | null | undefined, options?: ReadyManifestReadOptions): Promise<ReleaseDependencyRewriteManifestState>;
|
|
24
26
|
export declare function rewriteReleaseDependencyImportsForModule(code: string, options: RewriteReleaseDependencyImportsOptions): Promise<string>;
|
|
25
27
|
//# sourceMappingURL=module-consumption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-consumption.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/module-consumption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"module-consumption.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/module-consumption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAkC,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,sCAAsC;IACrD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACvC,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;CAChD;AAED,MAAM,WAAW,qCAAqC;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACvC;AAED,wBAAgB,0CAA0C,IAAI,OAAO,CAEpE;AAWD,wBAAsB,oCAAoC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASzF;AAED,wBAAsB,wCAAwC,CAC5D,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,qCAAqC,CAAC,CAShD;AAmDD,wBAAsB,wCAAwC,CAC5D,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,sCAAsC,GAC9C,OAAO,CAAC,MAAM,CAAC,CA6BjB"}
|
|
@@ -37,13 +37,13 @@ export async function hasReleaseDependencyImportSpecifiers(code) {
|
|
|
37
37
|
}
|
|
38
38
|
return false;
|
|
39
39
|
}
|
|
40
|
-
export async function getReleaseDependencyRewriteManifestState(releaseId) {
|
|
40
|
+
export async function getReleaseDependencyRewriteManifestState(releaseId, options = {}) {
|
|
41
41
|
if (!releaseId || !isReleaseDependencyImportMapRewriteEnabled()) {
|
|
42
42
|
return { enabled: false, manifest: null };
|
|
43
43
|
}
|
|
44
44
|
return {
|
|
45
45
|
enabled: true,
|
|
46
|
-
manifest: await getReadyManifestForRenderAsync(releaseId),
|
|
46
|
+
manifest: await getReadyManifestForRenderAsync(releaseId, options),
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
function dependencyAssetUrl(manifest, specifier) {
|
|
@@ -101,7 +101,7 @@ export async function rewriteReleaseDependencyImportsForModule(code, options) {
|
|
|
101
101
|
return code;
|
|
102
102
|
const manifest = options.manifest !== undefined
|
|
103
103
|
? options.manifest
|
|
104
|
-
: await getReadyManifestForRenderAsync(options.releaseId);
|
|
104
|
+
: await getReadyManifestForRenderAsync(options.releaseId, options.manifestReadOptions);
|
|
105
105
|
if (!manifest || Object.keys(manifest.dependencies).length === 0)
|
|
106
106
|
return code;
|
|
107
107
|
const replacements = new Map();
|